index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757
  1. <template>
  2. <view class='container'>
  3. <view class="content">
  4. <view>
  5. <text class='title'>批次号</text>
  6. <view class="batchNo uni-row">
  7. <view :class="{'batchNo-item':true, 'uni-row': true}" v-for="(item,index) in batchNoList"
  8. :key='index'>
  9. <!-- ,'batchNoCheck':batchNoCheck === item -->
  10. <!-- @click="handleCheckBatchNo(item)" -->
  11. {{ item.lotCode }}{{ item.isLast == 1 ? ' (尾批)': '' }}
  12. </view>
  13. </view>
  14. <view class="inpAndScan ">
  15. <uni-easyinput v-if="batchNoList.length > 0" class="inp" suffixIcon="checkmarkempty"
  16. v-model="inpValue" placeholder="可手动修正批次" @iconClick="iconClick"></uni-easyinput>
  17. <view class="uni-row" style="justify-content: space-between;">
  18. <view v-if="batchNoList.length > 0 && curDept" class="scanLotCode" @click="handleDoLastLot">
  19. <text>是否加工尾批</text>
  20. </view>
  21. <view v-if="batchNoList.length > 0" class="scanLotCode" @click="handleConfirmLotCode">
  22. <text>扫码修正批次</text>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. <view class='middle'>
  28. <view class='segment'></view>
  29. <uni-icons type="link" size="30" style="margin: 10rpx; transform: rotate(135deg);"></uni-icons>
  30. <view class='segment'></view>
  31. </view>
  32. <!-- <view>
  33. <text class='title'>扫码绑定载具</text>
  34. <view class="vehicleList uni-row">
  35. <view class="vehicleNo uni-row" v-for="(item,index) in vehicleList">
  36. <text>{{item.carrierCode}}</text>
  37. <text @click="handleDelVehicleNo(index)">×</text>
  38. </view>
  39. </view>
  40. <view>
  41. <button style='background-color: rgba(0, 226, 166,1);
  42. color: white;margin: 20rpx auto;
  43. width: 80%;' @click='handleScanCode'>扫码</button>
  44. </view>
  45. </view> -->
  46. <view class="selectedProcess">
  47. <uni-section title="请选择工序" type="square">
  48. <uni-data-select v-model="selectedProcess" :localdata="processList" :clear="false"
  49. @change="handleProcessChange">
  50. <template v-slot:option="{item }">
  51. <!-- 自定义下拉框每一项的显示内容 -->
  52. <span>{{ (item.index) + 1}}</span>
  53. <span>{{ item.text }}</span>
  54. </template></uni-data-select>
  55. </uni-section>
  56. </view>
  57. <view class='middle'>
  58. <view class='segment'></view>
  59. <uni-icons type="paperclip" size="30" style="margin: 10rpx;"></uni-icons>
  60. <view class='segment'></view>
  61. </view>
  62. <view>
  63. <text class='title' style="margin-bottom: 40rpx;">基础信息</text>
  64. <view class="uni-row info" style="align-items: center;">
  65. <label for="HeatNo">炉号:</label>
  66. <uni-data-select id="incomingInfo" class="uni-input data-select" v-model="basicInfo"
  67. :localdata="furnaceNumberInfoList" :clear="false"
  68. @change="handleFurnaceNumberChange"></uni-data-select>
  69. </view>
  70. <!-- <view class='segment' style="width: 90%;margin: 20rpx auto;"></view> -->
  71. <view class="uni-row info">
  72. <label for="productionPlanNo">计划单号:</label>
  73. <text id="productionPlanNo"
  74. class="uni-input">{{ basicInfo.productionPlanNo ? basicInfo.productionPlanNo : '-'}}</text>
  75. </view>
  76. <!-- <view class='segment' style="width: 90%;margin: 20rpx auto;"></view> -->
  77. <view class="uni-row info">
  78. <label for="lineNumber">序号:</label>
  79. <text id="lineNumber"
  80. class="uni-input">{{ basicInfo.lineNumber ? basicInfo.lineNumber : '-'}}</text>
  81. </view>
  82. <!-- <view class='segment' style="width: 90%;margin: 20rpx auto;"></view> -->
  83. <view class="uni-row info">
  84. <label for="factory">厂家:</label>
  85. <text id="factory"
  86. class="material uni-input">{{ basicInfo.factory ? basicInfo.factory : '-'}}</text>
  87. </view>
  88. <view class="uni-row info">
  89. <label for="brandNumber">牌号:</label>
  90. <text id="brandNumber"
  91. class="material uni-input">{{ basicInfo.brandNumber ? basicInfo.brandNumber : '-' }}</text>
  92. </view>
  93. <view class="uni-row info">
  94. <label for="spec">规格:</label>
  95. <text id="spec" class="material uni-input">{{ basicInfo.spec ? basicInfo.spec : '-' }}</text>
  96. </view>
  97. <view class="uni-row info">
  98. <label for="shape">形状:</label>
  99. <text id="shape" class="material uni-input">{{ basicInfo.shape ? basicInfo.shape : '-'}}</text>
  100. </view>
  101. <view class="uni-row info">
  102. <label for="diameter">材料直径:</label>
  103. <text id="diameter"
  104. class="material uni-input">{{ basicInfo.diameter ? basicInfo.diameter : '-' }}</text>
  105. </view>
  106. <view class="uni-row info">
  107. <label for="rawMaterialCode">原料编码:</label>
  108. <text id="rawMaterialCode"
  109. class="material uni-input">{{ basicInfo.rawMaterialCode ? basicInfo.rawMaterialCode : '-' }}</text>
  110. </view>
  111. <view class="uni-row info">
  112. <label for="incomingDate">来料日期:</label>
  113. <text id="incomingDate"
  114. class="material uni-input">{{ basicInfo.incomingDate ? basicInfo.incomingDate : '-' }}</text>
  115. </view>
  116. <view class="uni-row info">
  117. <label for="firstTechnicalRequirement">材质1:</label>
  118. <text id="firstTechnicalRequirement"
  119. class="material uni-input">{{ basicInfo.firstTechnicalRequirement ? basicInfo.firstTechnicalRequirement : '-' }}</text>
  120. </view>
  121. <view class="uni-row info">
  122. <label for="SecondTechnicalRequirement">材质2:</label>
  123. <text id="SecondTechnicalRequirement"
  124. class="material uni-input">{{ basicInfo.SecondTechnicalRequirement ? basicInfo.SecondTechnicalRequirement : '-' }}</text>
  125. </view>
  126. </view>
  127. </view>
  128. <view class='bottom uni-row'>
  129. <button class='add' type=primary @click='handleAdd'>添加</button>
  130. </view>
  131. </view>
  132. </template>
  133. <script setup>
  134. import {
  135. ref
  136. } from 'vue'
  137. import {
  138. onLoad,
  139. onReady
  140. } from '@dcloudio/uni-app'
  141. import {
  142. getLotList,
  143. getWasteRecyclingLot,
  144. getProcessListByLot
  145. } from "@/api/business/lot.js"
  146. import {
  147. saveDayWork
  148. } from '@/api/business/dayWork.js'
  149. import {
  150. store
  151. } from '@/store/index.js'
  152. import {
  153. getCarrierById,
  154. checkCarrier
  155. } from '@/api/business/carrier.js'
  156. import {
  157. getFurnaceNoInfo
  158. } from '@/api/p2/furnaceNoInfo.js'
  159. import {
  160. getToken
  161. } from '@/utils/auth'
  162. import {
  163. getProcessList
  164. } from '@/api/business/deptProcess.js'
  165. import path from '@/api/base/path.js'
  166. const batchNoCheck = ref(null) // 批次号是否选中
  167. const batchNoList = ref([]) // 批次号列表
  168. const vehicleList = ref([])
  169. const basicInfo = ref({}) // 基础信息对象
  170. const dayWork = ref({})
  171. const wasteRecyclingList = ref([])//废品回用批次
  172. const curPlan = ref({})
  173. const furnaceNumberInfoList = ref([])
  174. const emit = defineEmits(['batchReporting-addBatch']);
  175. const inpValue = ref('')
  176. const curDept = ref(false) //判断当前工段是否是该批次的领料部门
  177. const lotList = ref([])
  178. const selectedProcess = ref(null)
  179. const processList = ref([])
  180. onLoad(() => {
  181. // 处理特殊字符JSON解析失败报错
  182. curPlan.value = store.planDetails;
  183. dayWork.value = {
  184. productionPlanDetailId: curPlan.value.id,
  185. productionPlanId: curPlan.value.productionDetailId,
  186. technologicalProcessId: curPlan.value.technologicalProcessId,
  187. deptId: store.curDeptDetails.deptId
  188. }
  189. init();
  190. })
  191. function init() {
  192. let obj = {}
  193. obj.productionPlanDetailId = store.planDetails.id;
  194. //开始新批次,判断当前工段是否能开始这个批次(领料部门是当前工段的;批次的领料部门是当前工段的)
  195. //当前计划单的领料部门是当前工段
  196. if(store.planDetails.requisitionDepartmentId == store.curDeptDetails.deptId) {
  197. curDept.value= true
  198. //只查不是废品回用的批次
  199. getLotList(obj).then(res => {
  200. console.log(res)
  201. lotList.value = res.rows;
  202. if (res.rows.length > 0) {
  203. batchNoList.value = [res.rows[0]];
  204. dayWork.value.lotId = batchNoList.value[0].id;
  205. dayWork.value.lotCode = batchNoList.value[0].lotCode;
  206. if(dayWork.value.technologicalProcessId != batchNoList.value[0].technologicalProcessId){
  207. dayWork.value.technologicalProcessId = batchNoList.value[0].technologicalProcessId;
  208. store.planDetails.technologicalProcessId = batchNoList.value[0].technologicalProcessId;
  209. }
  210. getProcessInfo(batchNoList.value[0])
  211. } else {
  212. batchNoList.value = res.rows;
  213. }
  214. })
  215. }else {
  216. //废品回用的批次(领料部门是当前工段)
  217. getWasteRecyclingLot({productionPlanDetailId:store.planDetails.id,requisitionDepartmentId :store.curDeptDetails.deptId,flag:true}).then(res => {
  218. wasteRecyclingList.value = res.rows
  219. if (res.rows.length > 0) {
  220. //如果废品回用的批次领料部门是当前计划的领料部门,则加到lotList
  221. if(wasteRecyclingList.value[0].requisitionDepartmentId == store.planDetails.requisitionDepartmentId) {
  222. lotList.value.push(wasteRecyclingList.value)
  223. batchNoList.value = [lotList.rows[0]];
  224. dayWork.value.lotId = batchNoList.value[0].id;
  225. dayWork.value.lotCode = batchNoList.value[0].lotCode;
  226. if(dayWork.value.technologicalProcessId != batchNoList.value[0].technologicalProcessId){
  227. dayWork.value.technologicalProcessId = batchNoList.value[0].technologicalProcessId;
  228. store.planDetails.technologicalProcessId = batchNoList.value[0].technologicalProcessId;
  229. }
  230. }else {
  231. lotList.value = res.rows
  232. batchNoList.value = [res.rows[0]];
  233. dayWork.value.lotId = batchNoList.value[0].id;
  234. dayWork.value.lotCode = batchNoList.value[0].lotCode;
  235. if(dayWork.value.technologicalProcessId != batchNoList.value[0].technologicalProcessId){
  236. dayWork.value.technologicalProcessId = batchNoList.value[0].technologicalProcessId;
  237. store.planDetails.technologicalProcessId = batchNoList.value[0].technologicalProcessId;
  238. }
  239. getProcessInfo(batchNoList.value[0])
  240. }
  241. //提示当前批次是废品回用
  242. if(batchNoList.value[0].isWasteRecycling == 1) {
  243. uni.showToast({
  244. icon: "none",
  245. title: "该批是废品回用",
  246. duration: 2000
  247. })
  248. }
  249. } else {
  250. batchNoList.value = res.rows;
  251. }
  252. })
  253. }
  254. // 拉取炉号信息from p2
  255. let token = 'Bearer ' + getToken();
  256. let header = {
  257. Authorization: token
  258. }
  259. uni.request({
  260. url: path.furnaceNoURL + '/business/furnaceNoInfo/getFurnaceNoInfo',
  261. data: {
  262. productionPlanNo: store.planDetails.productionPlanNo,
  263. lineNumber: store.planDetails.lineNumber
  264. },
  265. method: 'GET',
  266. header,
  267. sslVerify: false,
  268. success: (res) => {
  269. console.log(res.data);
  270. if (res.data.code == 200 && res.data.data.length > 0) {
  271. for (let i = 0; i < res.data.data.length; i++) {
  272. furnaceNumberInfoList.value[i] = {
  273. text: res.data.data[i].furnaceNumber,
  274. value: res.data.data[i]
  275. }
  276. }
  277. basicInfo.value = res.data.data[0];
  278. dayWork.value.furnaceNoInfo = basicInfo.value;
  279. console.log(basicInfo.value);
  280. console.log(furnaceNumberInfoList.value)
  281. }
  282. }
  283. })
  284. // getProcessList({
  285. // deptId: store.curDeptDetails.deptId,
  286. // }).then(res => {
  287. // if (res.code == 200) {
  288. // //过滤出工序交集
  289. // //因为废品回用对工序进行单独的修改。所以重新查产品的工艺,如果该批不是废品回用,则查产品工序,如果是,则到
  290. // //对应表查
  291. // //通过批次号查
  292. // console.log(batchNoList.value)
  293. // getProcessListByLot(batchNoList.value[0]).then(res => {
  294. // let lotProcessList = res.data
  295. // let filteredData = lotProcessList.filter((item1) =>
  296. // res.data.some((item2) => item2.processCode === item1.processCode)
  297. // );
  298. // processList.value = filteredData.map(v => ({
  299. // text: v.processAlias,
  300. // value: v.technologicalProcessDetailId,
  301. // processId: v.id
  302. // }))
  303. // console.log(processList.value)
  304. // selectedProcess.value = filteredData[0].technologicalProcessDetailId;
  305. // dayWork.value.processId = filteredData[0].id;
  306. // dayWork.value.technologicalProcessDetailId = selectedProcess.value
  307. // })
  308. // }
  309. // })
  310. }
  311. // function handleCheckBatchNo(item) {
  312. // batchNoCheck.value = item;
  313. // dayWork.value.lotId = item.id;
  314. // }
  315. // function handleDelVehicleNo(index) {
  316. // vehicleList.value.splice(index, 1);
  317. // }
  318. // function handleValidate() {
  319. // if (batchNoCheck.value && vehicleList.value) {
  320. // return true;
  321. // } else {
  322. // return false;
  323. // }
  324. // }
  325. function iconClick() {
  326. checkLotCode(inpValue.value);
  327. }
  328. function checkLotCode(lotCode) {
  329. if (lotList.value.some(item => item.lotCode == lotCode)) {
  330. for (let i = 0; i < lotList.value.length; i++) {
  331. if (lotList.value[i].lotCode == lotCode) {
  332. batchNoList.value = [lotList.value[i]];
  333. dayWork.value.lotId = lotList.value[i].id;
  334. dayWork.value.lotCode = lotList.value[i].lotCode;
  335. if(batchNoList.value[0].isWasteRecycling == 1) {
  336. uni.showToast({
  337. icon: "none",
  338. title: "该批次号可用,该批是废品回用",
  339. duration: 2000
  340. })
  341. }else{
  342. uni.showToast({
  343. icon: "none",
  344. title: "该批次号可用",
  345. duration: 2000
  346. })
  347. }
  348. return true;
  349. }
  350. }
  351. } else {
  352. uni.showToast({
  353. icon: "none",
  354. title: "该批次号已被使用或不属于该产品",
  355. duration: 2000
  356. })
  357. return false;
  358. }
  359. }
  360. function getProcessInfo(data) {
  361. getProcessList({
  362. deptId: store.curDeptDetails.deptId,
  363. }).then(res => {
  364. if (res.code == 200) {
  365. //过滤出工序交集
  366. //因为废品回用对工序进行单独的修改。所以重新查产品的工艺,如果该批不是废品回用,则查产品工序,如果是,则到
  367. //对应表查
  368. //通过批次号查
  369. console.log(batchNoList.value)
  370. getProcessListByLot(data).then(response => {
  371. let lotProcessList = response.data
  372. console.log(lotProcessList)
  373. let filteredData = lotProcessList.filter((item1) =>
  374. res.data.some((item2) => item2.processCode === item1.processCode)
  375. );
  376. processList.value = filteredData.map((v,index) => ({
  377. text: v.processAlias,
  378. value:v.technologicalProcessDetailId?v.technologicalProcessDetailId:v.id,
  379. processId: v.processId,
  380. processStepNumber:v.processStepNumber,
  381. index:index
  382. }))
  383. console.log(processList.value)
  384. selectedProcess.value = filteredData[0].technologicalProcessDetailId;
  385. dayWork.value.processId = filteredData[0].id;
  386. dayWork.value.technologicalProcessDetailId = selectedProcess.value
  387. })
  388. }
  389. })
  390. }
  391. function getProcessInfo(data) {
  392. getProcessList({
  393. deptId: store.curDeptDetails.deptId,
  394. }).then(res => {
  395. if (res.code == 200) {
  396. //过滤出工序交集
  397. //因为废品回用对工序进行单独的修改。所以重新查产品的工艺,如果该批不是废品回用,则查产品工序,如果是,则到
  398. //对应表查
  399. //通过批次号查
  400. console.log(batchNoList.value)
  401. getProcessListByLot(data).then(response => {
  402. let lotProcessList = response.data
  403. console.log(lotProcessList)
  404. let filteredData = lotProcessList.filter((item1) =>
  405. res.data.some((item2) => item2.processCode === item1.processCode)
  406. );
  407. processList.value = filteredData.map((v, index) => ({
  408. text: v.processAlias,
  409. value: v.processStepNumber,
  410. processId: v.processId,
  411. processStepNumber: v.processStepNumber,
  412. index: index
  413. }))
  414. console.log(processList.value)
  415. selectedProcess.value = filteredData[0].technologicalProcessDetailId;
  416. dayWork.value.processId = filteredData[0].id;
  417. dayWork.value.technologicalProcessDetailId = selectedProcess.value
  418. })
  419. }
  420. })
  421. }
  422. function handleDoLastLot() {
  423. uni.showModal({
  424. title: '提示',
  425. content: '确认是否加工尾批?',
  426. success: function(res) {
  427. if (res.confirm) {
  428. if (lotList.value.some(item => item.isLast == 1)) {
  429. for (let i = 0; i < lotList.value.length; i++) {
  430. if (lotList.value[i].isLast == 1) {
  431. batchNoList.value = [lotList.value[i]];
  432. dayWork.value.lotId = lotList.value[i].id;
  433. dayWork.value.lotCode = lotList.value[i].lotCode;
  434. dayWork.value.isLast = '1';
  435. return;
  436. }
  437. }
  438. } else {
  439. uni.showToast({
  440. icon: 'none',
  441. title: '当前计划尾批已被加工',
  442. duration: 2500
  443. })
  444. }
  445. } else if (res.cancel) {}
  446. }
  447. });
  448. }
  449. function handleConfirmLotCode() {
  450. // 引入原生插件
  451. const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
  452. // 调用插件的 mpaasScan 方法
  453. mpaasScanModule.mpaasScan({
  454. // 扫码识别类型,参数可多选,qrCode、barCode,
  455. // 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
  456. scanType: ["qrCode", "barCode"],
  457. // 是否隐藏相册,默认false不隐藏
  458. hideAlbum: false,
  459. },
  460. (ret) => {
  461. console.log(ret);
  462. // uni.showModal({
  463. // title: "扫码结果",
  464. // // 返回值中,有三个参数 resp_code、resp_message、resp_result
  465. // // resp_code 表示返回结果值,10:用户取消,11:其他错误,1000:成功
  466. // // resp_message 表示返回结果信息
  467. // // resp_result 表示扫码结果,只有成功才会有返回
  468. // content: JSON.stringify(ret),
  469. // showCancel: false,
  470. // confirmText: "确定",
  471. // });
  472. if (ret.resp_result) {
  473. checkLotCode(ret.resp_result);
  474. }
  475. }
  476. );
  477. }
  478. function handleFurnaceNumberChange() {
  479. dayWork.value.furnaceNoInfo = basicInfo.value;
  480. }
  481. function handleProcessChange() {
  482. dayWork.value.technologicalProcessDetailId = selectedProcess.value;
  483. dayWork.value.processId = processList.value.findIndex(v => v.value === selectedProcess.value) >= 0 ? processList
  484. .value.find(v => v.value === selectedProcess.value).processId : null
  485. dayWork.value.processStepNumber = processList.value.findIndex(v => v.value === selectedProcess.value) >= 0 ?
  486. processList.value.find(v => v.value === selectedProcess.value).processStepNumber : null
  487. }
  488. // function handleScanCode() {
  489. // uni.scanCode({
  490. // scanType: ['qrCode'],
  491. // onlyFromCamera: true, // 只允许相机扫码
  492. // autoZoom: false,
  493. // success: function(res) {
  494. // let vehicleObj = JSON.parse(res.result);
  495. // if (!vehicleObj.carrierId || vehicleObj.carrierId == "") {
  496. // uni.showToast({
  497. // icon: "error",
  498. // title: "请扫载具码",
  499. // duration: 1000
  500. // })
  501. // return;
  502. // }
  503. // for (let i = 0; i < vehicleList.value.length; i++) {
  504. // if (vehicleList.value[i].carrierId == vehicleObj.carrierId) {
  505. // uni.showToast({
  506. // icon: "error",
  507. // title: "载具已存在",
  508. // duration: 1000
  509. // })
  510. // return;
  511. // }
  512. // }
  513. // checkCarrier(vehicleObj.carrierId).then(response => {
  514. // if (response.code == 200) {
  515. // vehicleList.value.push(vehicleObj);
  516. // } else {
  517. // uni.showToast({
  518. // icon: 'none',
  519. // title: response.msg
  520. // })
  521. // return;
  522. // }
  523. // })
  524. // }
  525. // });
  526. // }
  527. function handleAdd() {
  528. if (selectedProcess.value == null) {
  529. uni.showToast({
  530. icon: 'none',
  531. title: '请选择工序后再开始批次'
  532. })
  533. return;
  534. }
  535. console.log(dayWork.value)
  536. console.log(basicInfo.value)
  537. store.furnaceNumberInfo = basicInfo.value;
  538. if (checkLotCode(dayWork.value.lotCode)) {
  539. saveDayWork(dayWork.value).then(res => {
  540. console.log(res)
  541. if (res.code === 200) {
  542. uni.showToast({
  543. icon: 'success',
  544. title: '添加成功',
  545. duration: 2000
  546. });
  547. // uni.$emit('batchReporting-addBatch');
  548. // uni.$emit('dayworkItemUpdate');
  549. uni.navigateBack({
  550. url: '/pages/batchReporting/index'
  551. })
  552. } else {
  553. uni.showToast({
  554. icon: 'none',
  555. title: res.msg,
  556. duration: 2000
  557. });
  558. }
  559. })
  560. } else {
  561. uni.showToast({
  562. icon: "none",
  563. title: "该批次号已被使用或不属于该产品",
  564. duration: 2000
  565. })
  566. }
  567. }
  568. </script>
  569. <style lang="scss">
  570. .container {
  571. height: 90%;
  572. background-color: #f5f5f5;
  573. padding-bottom: 112rpx;
  574. }
  575. .bottom {
  576. background-color: white;
  577. width: 100%;
  578. position: fixed;
  579. bottom: 0;
  580. align-items: center;
  581. background-color: #ffffff;
  582. padding: 16rpx 0;
  583. .add {
  584. margin: 0 auto;
  585. width: 80%;
  586. height: 80rpx;
  587. }
  588. }
  589. .content {
  590. position: relative;
  591. width: auto;
  592. background-color: rgba(255, 255, 255, 1);
  593. margin: 32rpx;
  594. padding-bottom: 50rpx;
  595. padding-top: 20rpx;
  596. border-radius: 12rpx;
  597. height: 100%;
  598. overflow: auto;
  599. .title {
  600. width: auto;
  601. font-size: 36rpx;
  602. font-weight: bold;
  603. text-align: center;
  604. }
  605. }
  606. .inpAndScan {
  607. justify-content: space-between;
  608. width: calc(88% + 20rpx);
  609. margin: 0 auto;
  610. .inp {
  611. width: calc(100% - 16rpx);
  612. margin: 10rpx auto;
  613. height: 74rpx;
  614. }
  615. .scanLotCode {
  616. border-radius: 6rpx;
  617. border: 1rpx solid rgba(22, 132, 252, 1);
  618. height: 60rpx;
  619. margin: 10rpx;
  620. height: 72rpx;
  621. width: 46%;
  622. text-align: center;
  623. line-height: 72rpx;
  624. background-color: rgba(22, 132, 252, 1);
  625. color: white;
  626. }
  627. }
  628. .batchNo {
  629. // justify-content: flex-start;
  630. // flex-wrap: wrap;
  631. // width: auto;
  632. // height: 320rpx;
  633. // overflow: auto;
  634. // padding-left: calc(100% - 88% - 4rpx - 40rpx);
  635. // margin-bottom: 40rpx;
  636. // border-radius: 6rpx;
  637. justify-content: center;
  638. .batchNo-item {
  639. justify-content: center;
  640. align-items: center;
  641. width: 88%;
  642. margin: 10rpx;
  643. height: 72rpx;
  644. border: 1px solid rgba(213, 213, 213, 1);
  645. border-radius: 6rpx;
  646. }
  647. .batchNoCheck {
  648. color: #FFF;
  649. border: 1rpx solid rgba(22, 132, 252, 1);
  650. background-color: rgba(22, 132, 252, 1);
  651. }
  652. }
  653. .vehicleList {
  654. justify-content: flex-start;
  655. flex-wrap: wrap;
  656. width: auto;
  657. height: 120rpx;
  658. overflow: auto;
  659. padding: 0 80rpx;
  660. .vehicleNo {
  661. padding: 0 10rpx;
  662. margin: 10rpx;
  663. justify-content: space-between;
  664. align-items: center;
  665. width: 230rpx;
  666. height: 60rpx;
  667. border: 1px solid rgba(213, 213, 213, 1);
  668. border-radius: 6rpx;
  669. }
  670. }
  671. .middle {
  672. display: flex;
  673. flex-direction: row;
  674. align-items: center;
  675. justify-content: center
  676. }
  677. .segment {
  678. width: 280rpx;
  679. background-color: rgba(213, 213, 213, 1);
  680. border: 1rpx solid rgba(213, 213, 213, 1);
  681. }
  682. .info {
  683. width: 94%;
  684. justify-content: space-around;
  685. padding: 10rpx;
  686. margin: 0 auto;
  687. label {
  688. flex: 1;
  689. text-combine-upright: all;
  690. margin: 0 30rpx 0 20rpx;
  691. }
  692. text {
  693. flex: 3;
  694. // width: 80%;
  695. }
  696. .data-select {
  697. flex: 3;
  698. width: 80%;
  699. height: 60rpx;
  700. margin-right: 40rpx;
  701. border-radius: 18rpx;
  702. background-color: #FFF;
  703. .data-select-options {
  704. width: 200rpx;
  705. }
  706. }
  707. }
  708. .material {
  709. height: auto;
  710. width: 60%;
  711. }
  712. .selectedProcess {
  713. width: 88%;
  714. margin: 20rpx auto 40rpx;
  715. }
  716. </style>