dialog-end-work.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754
  1. <template>
  2. <view class="mask" v-if="isLoading"></view>
  3. <dialog-base ref="baseDialog" title="结束报工">
  4. <view class="list-container">
  5. <view class="list-title uni-row">
  6. <text class="label">合格量</text>
  7. <input class="input" @input="handleInputQualifiedNum" style="width: 70%;"
  8. v-model="workInfo.qualifiedNum" placeholder="请输入合格量" />
  9. </view>
  10. <view class="list-title uni-row">
  11. <text class="label">废品信息</text>
  12. <view class="uni-row" style="justify-content: flex-end;"><text class="label" style="color: blue;"
  13. @click="handleAddWasteInfo">+添加</text></view>
  14. </view>
  15. <view class="list-title uni-row" v-for="(item, index) in wasteInfo">
  16. <input class="input" @input="handleInputRejectNum(item)" style="width: 20%;" v-model="item.rejectNum"
  17. placeholder="废品量" />
  18. <uni-data-select style="margin-left: 40rpx;width: 70%;" v-model="item.reason" :localdata="reasonList"
  19. @change="handleReasonChange(item)"></uni-data-select>
  20. <uni-icons class="icon-gear" type="close" size="40" color="red"
  21. @click="handleDeleteWasteInfo(index)"></uni-icons>
  22. </view>
  23. <view class="list-title uni-row">
  24. <text class="label">当前序是否完成</text><text>否</text>
  25. <switch class="switch" @change="switchChange" color="rgba(103, 195, 55, 1.0)" />
  26. <text>是</text>
  27. </view>
  28. <view v-if="showCarrierList && !store.isPreProcess" class="confirmCarrier">
  29. <text class="label">确认载具</text>
  30. <view class="vehicleList uni-row">
  31. <view v-for="(item,index) in bindList" :key="index"
  32. :class="{ 'vehicleNo': true, 'uni-row': true, 'blueBorder': item.flag }">
  33. <text>{{item.carrierCode}}</text>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. <view v-if="store.isPreProcess" class="add-btn-container uni-row">
  39. <button type="default" class="btn" @click="handlePreFinishReporting">结束报工</button>
  40. </view>
  41. <view v-if="!store.isPreProcess" class="add-btn-container uni-row">
  42. <button v-if="showCarrierList" type="primary" class="btnScan" @click="handleScanCode">扫码确认载具</button>
  43. <button type="default" class="btn" @click="handleFinishReporting">结束报工</button>
  44. </view>
  45. </dialog-base>
  46. <QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
  47. </template>
  48. <script setup>
  49. import {
  50. ref,
  51. getCurrentInstance
  52. } from 'vue'
  53. import QrScanner from '@/pages/vueQrCode/index.vue'
  54. import {
  55. onLoad
  56. } from '@dcloudio/uni-app'
  57. import {
  58. updateDayWorkItem,
  59. saveDayWorkItem
  60. } from "@/api/business/dayWorkItem.js"
  61. import {
  62. getDayworkCarrierList
  63. } from '@/api/business/dayworkCarrier.js'
  64. import {
  65. store
  66. } from '@/store/index.js'
  67. import {
  68. timestampToTime,
  69. toHHmmss
  70. } from '@/utils/common.js'
  71. import {
  72. getDictInfoByType
  73. } from '@/api/dict/dict.js'
  74. import {
  75. getSpecialDeptProcessList
  76. } from '@/api/business/deptProcess.js'
  77. import {
  78. debounce
  79. } from '@/utils/common.js'
  80. import {
  81. getDayWorkItemList,
  82. listItem,
  83. getIsFirstOrder,
  84. } from '@/api/business/dayWorkItem.js'
  85. const baseDialog = ref(null)
  86. const workInfo = ref({})
  87. const showQrCodeReader = ref(false);
  88. const wasteInfo = ref([])
  89. const reasonList = ref([])
  90. const emit = defineEmits(['resflushItem'])
  91. const showCarrierList = ref(false) // 工序是否完成显示载具列表
  92. const bindList = ref([])
  93. const confirmCarrierList = ref([])
  94. const isFirstOrder = ref(true); //是否为首序
  95. const endFlag = ref(0)
  96. const isLoading = ref(false);
  97. const specialDeptProcessList = ref([])
  98. const temp = ref(0) // 保存workInfo.value.qualifiedNum的值(还原用)
  99. const lotPreSumReject = ref(0)
  100. const lotPreSumQualifiedNum = ref(0)
  101. const remainingQualifiedNum = ref(0) // 当前的合格量还能最大添加多少(剩余数量)
  102. onLoad(() => {})
  103. function open(data, itemListData) {
  104. console.log(store.isPreProcess)
  105. console.log("777")
  106. resetPage();
  107. workInfo.value = {
  108. ...data,
  109. };
  110. console.log("数据data", workInfo);
  111. //查看是否为首序
  112. getIsFirst(store.dayworkInfo.id);
  113. workInfo.value.qualifiedNum = 0;
  114. Promise.all([getSpecialDeptProcessList(), listItem({
  115. dayworkId: store.dayworkInfo.id,
  116. status: 2
  117. }), ], )
  118. .then(([res, response]) => {
  119. if (res.code == 200 && response.code == 200) {
  120. for (let i = 0; i < res.data.length; i++) {
  121. specialDeptProcessList.value[i] = res.data[i].processId;
  122. }
  123. for (let i = 0; i < response.rows.length; i++) {
  124. if (response.rows[i].processId == workInfo.value.processId) {
  125. lotPreSumReject.value += response.rows[i].rejectSum;
  126. lotPreSumQualifiedNum.value += response.rows[i].qualifiedNum;
  127. }
  128. }
  129. }
  130. if (specialDeptProcessList.value.includes(workInfo.value.processId)) {
  131. workInfo.value.qualifiedNum = store.dayworkInfo.prevProcess != null ?
  132. Math.max(0, store.dayworkInfo.processQualifiedNum - lotPreSumQualifiedNum.value -
  133. lotPreSumReject.value) :
  134. Math.max(0, store.dayworkInfo.productionQuantity - lotPreSumQualifiedNum.value -
  135. lotPreSumReject
  136. .value);
  137. // temp.value = workInfo.value.qualifiedNum;
  138. } else {
  139. workInfo.value.qualifiedNum = 0;
  140. }
  141. }).catch(err => {
  142. console.log('146 err')
  143. });
  144. init();
  145. baseDialog.value.open()
  146. }
  147. function close() {
  148. baseDialog.value.close()
  149. }
  150. function getIsFirst(dayworkId) {
  151. getIsFirstOrder(dayworkId).then(res => {
  152. if (res.code == 200) {
  153. isFirstOrder.value = res.data.isFirstOrder;
  154. }
  155. }).catch(err => {
  156. console.log(err)
  157. })
  158. }
  159. function resetPage() {
  160. workInfo.value.qualifiedNum = null;
  161. workInfo.value = {};
  162. wasteInfo.value = [];
  163. reasonList.value = [];
  164. showCarrierList.value = false;
  165. bindList.value = [];
  166. confirmCarrierList.value = [];
  167. endFlag.value = 0;
  168. lotPreSumReject.value = 0;
  169. lotPreSumQualifiedNum.value = 0;
  170. remainingQualifiedNum.value = 0;
  171. }
  172. function init() {
  173. getDictInfoByType("waste_causes").then(res => {
  174. for (let i = 0; i < res.data.length; i++) {
  175. reasonList.value[i] = {
  176. value: res.data[i].dictValue,
  177. text: res.data[i].dictLabel
  178. }
  179. }
  180. }).catch(err => {
  181. console.log('189 err')
  182. })
  183. getDayworkCarrierList({
  184. dayworkId: store.dayworkInfo.id,
  185. isChanged: 0,
  186. processInspectionId: 0
  187. }).then(res => {
  188. console.log(res)
  189. if (res.code == 200) {
  190. bindList.value = res.rows;
  191. for (let i = 0; i < bindList.value.length; i++) {
  192. bindList.value[i].flag = false;
  193. }
  194. }
  195. }).catch(err => {
  196. console.log('203 err')
  197. })
  198. }
  199. function switchChange(event) {
  200. if (event.detail.value) {
  201. workInfo.value.status = "3"
  202. } else {
  203. workInfo.value.status = "2"
  204. }
  205. console.log(event.detail.value, !store.isPreProcess)
  206. showCarrierList.value = event.detail.value;
  207. }
  208. function handleInputQualifiedNum() {
  209. workInfo.value.qualifiedNum = workInfo.value.qualifiedNum.replace(/^-+|[^\d]/g, '');
  210. }
  211. function handleInputRejectNum(item) {
  212. item.rejectNum = item.rejectNum.replace(/^0+|^-|[^\d]/g, '');
  213. // 合格数随着投产数
  214. //let sumRejectNum = 0;
  215. // for (let i = 0; i < wasteInfo.value.length; i++) {
  216. // wasteInfo.value[i].rejectNum = wasteInfo.value[i].rejectNum.replace(/^0+|^-|[^\d]/g, '');
  217. // // sumRejectNum += Number(wasteInfo.value[i].rejectNum);
  218. // }
  219. // if (temp.value > 0) {
  220. // debounce(function() {
  221. // workInfo.value.qualifiedNum = temp.value;
  222. // workInfo.value.qualifiedNum -= sumRejectNum;
  223. // }, 500)
  224. // }
  225. }
  226. /*
  227. function handleScanCode() {
  228. // 引入原生插件
  229. const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
  230. if (mpaasScanModule) {
  231. //调用插件的 mpaasScan 方法
  232. mpaasScanModule.mpaasScan({
  233. // 扫码识别类型,参数可多选,qrCode、barCode,
  234. // 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
  235. scanType: ["qrCode", "barCode"],
  236. // 是否隐藏相册,默认false不隐藏
  237. hideAlbum: false,
  238. },
  239. (ret) => {
  240. let vehicleObj = JSON.parse(ret.resp_result);
  241. let hasInFlag = false
  242. for (let i = 0; i < bindList.value.length; i++) {
  243. if (vehicleObj.carrierCode == bindList.value[i].carrierCode) {
  244. hasInFlag = true
  245. if (!bindList.value[i].flag) {
  246. endFlag.value += 1;
  247. }
  248. bindList.value[i].flag = true;
  249. }
  250. }
  251. if(!hasInFlag) {
  252. uni.showToast({
  253. icon: 'none',
  254. title: '该批次没有绑定此箱',
  255. duration: 2000
  256. })
  257. }
  258. if (endFlag.value < bindList.value.length && hasInFlag) {
  259. setTimeout(() => {
  260. handleScanCode();
  261. }, 700);
  262. }
  263. }
  264. );
  265. }
  266. }
  267. */
  268. function handleScanCode() {
  269. // 引入原生插件
  270. // const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
  271. // if (mpaasScanModule) {
  272. // //调用插件的 mpaasScan 方法
  273. // mpaasScanModule.mpaasScan({
  274. // // 扫码识别类型,参数可多选,qrCode、barCode,
  275. // // 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
  276. // scanType: ["qrCode", "barCode"],
  277. // // 是否隐藏相册,默认false不隐藏
  278. // hideAlbum: false,
  279. // },
  280. // (ret) => {
  281. // let vehicleObj = {
  282. // carrierCode: ret.resp_result
  283. // };
  284. // let hasInFlag = false
  285. // for (let i = 0; i < bindList.value.length; i++) {
  286. // if (vehicleObj.carrierCode == bindList.value[i].carrierCode) {
  287. // hasInFlag = true
  288. // if (!bindList.value[i].flag) {
  289. // endFlag.value += 1;
  290. // }
  291. // bindList.value[i].flag = true;
  292. // }
  293. // }
  294. // if (!hasInFlag) {
  295. // uni.showToast({
  296. // icon: 'none',
  297. // title: '该批次没有绑定此箱',
  298. // duration: 2000
  299. // })
  300. // }
  301. // if (endFlag.value < bindList.value.length && hasInFlag) {
  302. // setTimeout(() => {
  303. // handleScanCode();
  304. // }, 700);
  305. // }
  306. // }
  307. // );
  308. // } else {
  309. // let vehicleObj = {
  310. // carrierCode: bindList.value[0].carrierCode
  311. // };
  312. // let hasInFlag = false
  313. // for (let i = 0; i < bindList.value.length; i++) {
  314. // if (vehicleObj.carrierCode == bindList.value[i].carrierCode) {
  315. // hasInFlag = true
  316. // if (!bindList.value[i].flag) {
  317. // endFlag.value += 1;
  318. // }
  319. // bindList.value[i].flag = true;
  320. // }
  321. // }
  322. // if (!hasInFlag) {
  323. // uni.showToast({
  324. // icon: 'none',
  325. // title: '该批次没有绑定此箱',
  326. // duration: 2000
  327. // })
  328. // }
  329. // if (endFlag.value < bindList.value.length && hasInFlag) {
  330. // setTimeout(() => {
  331. // handleScanCode();
  332. // }, 700);
  333. // }
  334. // }
  335. showQrCodeReader.value = true;
  336. }
  337. function qrReaderClose() {
  338. showQrCodeReader.value = false;
  339. }
  340. function onDecodeHandler(ret) {
  341. showQrCodeReader.value = false;
  342. let vehicleObj = {
  343. carrierCode: ret
  344. };
  345. let hasInFlag = false
  346. for (let i = 0; i < bindList.value.length; i++) {
  347. if (vehicleObj.carrierCode == bindList.value[i].carrierCode) {
  348. hasInFlag = true
  349. if (!bindList.value[i].flag) {
  350. endFlag.value += 1;
  351. }
  352. bindList.value[i].flag = true;
  353. }
  354. }
  355. if (!hasInFlag) {
  356. uni.showToast({
  357. icon: 'none',
  358. title: '该批次没有绑定此箱',
  359. duration: 2000
  360. })
  361. }
  362. if (endFlag.value < bindList.value.length && hasInFlag) {
  363. setTimeout(() => {
  364. handleScanCode();
  365. }, 700);
  366. }
  367. }
  368. function handlePreFinishReporting() {
  369. //投产数
  370. let number = store.dayworkInfo.prevProcess == null ? store.dayworkInfo.productionQuantity : store.dayworkInfo
  371. .processQualifiedNum;
  372. workInfo.value.prodNum = number
  373. let max = parseInt(number * 1.03);
  374. // max = parseInt(String(max).split("."));
  375. console.log("maxawdjkkaljdalkw", max);
  376. let sunm = parseInt(workInfo.value.qualifiedNum) + lotPreSumQualifiedNum.value; //计算总合格数
  377. let percent = (sunm / number) * 100; //合格率
  378. percent = Math.ceil(percent * 100) / 100; //只入不舍
  379. console.log("合格量", percent)
  380. // let percent = (((parseInt(workInfo.value.qualifiedNum) + lotPreSumQualifiedNum.value) / number) * 100).toFixed(2);
  381. let num = 103;
  382. // 填入数大于剩余量情况
  383. if (parseInt(workInfo.value.qualifiedNum) + lotPreSumQualifiedNum.value - number > 0) {
  384. // 判断当前是否为首序
  385. if (isFirstOrder.value) {
  386. uni.showModal({
  387. title: '提示',
  388. content: `合格数总量超出投入量${percent}%,是否继续保存?`,
  389. success: function(res) {
  390. if (res.confirm) {
  391. handleSave();
  392. } else if (res.cancel) {}
  393. }
  394. })
  395. } else {
  396. if (percent > num) {
  397. uni.showToast({
  398. icon: 'none',
  399. title: '合格数总量为投产量的' + percent + "%,请重新输入!"
  400. })
  401. return;
  402. } else {
  403. handleSave();
  404. }
  405. }
  406. } else {
  407. console.log("999")
  408. //判断当前序合格总数为0 ,不允许保存
  409. console.log(parseInt(workInfo.value.qualifiedNum) + lotPreSumQualifiedNum.value == 0)
  410. if (workInfo.value.status == "3" && parseInt(workInfo.value.qualifiedNum) + lotPreSumQualifiedNum.value == 0) {
  411. uni.showToast({
  412. icon: 'none',
  413. title: '当前序合格总数不能为0',
  414. duration: 2000
  415. })
  416. } else {
  417. handleSave();
  418. }
  419. }
  420. }
  421. function handleFinishReporting() {
  422. console.log(store.isPreProcess)
  423. //投产数
  424. let number = workInfo.value.prodNum;
  425. let percent = (((parseInt(workInfo.value.qualifiedNum) + lotPreSumQualifiedNum.value) / number) * 100).toFixed(
  426. 2);
  427. let num = 103;
  428. //lotPreSumQualifiedNum当前序的所有合格数
  429. if (parseInt(workInfo.value.qualifiedNum) + lotPreSumQualifiedNum.value - number > 0) {
  430. if (isFirstOrder.value) {
  431. if (percent == 103) {
  432. percent = 103.1
  433. }
  434. uni.showModal({
  435. title: '提示',
  436. content: `合格数总量超出投入量${percent}%,是否继续保存?`,
  437. success: function(res) {
  438. if (res.confirm) {
  439. if (showCarrierList.value) {
  440. if (endFlag.value >= bindList.value.length) {
  441. handleSave();
  442. } else {
  443. uni.showToast({
  444. icon: "none",
  445. title: "请先扫码确认载具",
  446. duration: 2000
  447. })
  448. return;
  449. }
  450. } else {
  451. handleSave();
  452. }
  453. } else if (res.cancel) {}
  454. }
  455. })
  456. } else {
  457. if (percent == num) {
  458. percent = 103.01
  459. }
  460. if (percent > num) {
  461. uni.showToast({
  462. icon: 'none',
  463. title: '合格数总量为投产量的' + percent + "%,请重新输入!"
  464. })
  465. return;
  466. } else {
  467. handleSave();
  468. }
  469. }
  470. } else {
  471. //判断当前序合格总数为0 ,不允许保存
  472. if (workInfo.value.status == "3" && parseInt(workInfo.value.qualifiedNum) + lotPreSumQualifiedNum.value == 0) {
  473. uni.showToast({
  474. icon: 'none',
  475. title: '当前序合格总数不能为0'
  476. })
  477. return;
  478. }
  479. if (showCarrierList.value) {
  480. if (endFlag.value >= bindList.value.length) {
  481. handleSave();
  482. } else {
  483. uni.showToast({
  484. icon: "none",
  485. title: "请先扫码确认载具",
  486. duration: 2000
  487. })
  488. return;
  489. }
  490. } else {
  491. handleSave();
  492. }
  493. }
  494. }
  495. function handleSave() {
  496. console.log(workInfo.value.qualifiedNum)
  497. if (workInfo.value.qualifiedNum === null || workInfo.value.qualifiedNum === '') {
  498. uni.showToast({
  499. icon: "none",
  500. title: "请输入合格数",
  501. duration: 2000
  502. })
  503. return;
  504. }
  505. let rejectSum = 0
  506. console.log(rejectSum);
  507. for (let i = 0; i < wasteInfo.value.length; i++) {
  508. if ((!wasteInfo.value[i].rejectNum && wasteInfo.value[i].reason) ||
  509. (wasteInfo.value[i].rejectNum && !wasteInfo.value[i].reason) ||
  510. (!wasteInfo.value[i].rejectNum && !wasteInfo.value[i].reason)) {
  511. uni.showToast({
  512. icon: 'none',
  513. title: "请输入废弃数或废弃原因",
  514. duration: 2000
  515. })
  516. return;
  517. }
  518. rejectSum += Number(wasteInfo.value[i].rejectNum);
  519. }
  520. if (rejectSum > workInfo.value.prodNum) {
  521. uni.showToast({
  522. icon: 'none',
  523. title: '废品数不能大于投产数',
  524. duration: 2000
  525. })
  526. return;
  527. }
  528. if (workInfo.value.status != '3') {
  529. workInfo.value.status = '2';
  530. }
  531. isLoading.value = true; // 显示遮罩层
  532. workInfo.value.endTime = timestampToTime(new Date());
  533. uni.showLoading({
  534. title: '加载中'
  535. });
  536. workInfo.value.rejectList = wasteInfo.value;
  537. workInfo.value.isPreProcess = store.isPreProcess;
  538. workInfo.value.processStepNumber = store.dayworkInfo.currentProcess.processStepNumber
  539. saveDayWorkItem(workInfo.value).then(res => {
  540. isLoading.value = false; // 隐藏遮罩层
  541. uni.hideLoading();
  542. if (res.code === 200) {
  543. uni.showToast({
  544. icon: 'success',
  545. title: '操作成功',
  546. });
  547. emit('resflushItem');
  548. close();
  549. } else {
  550. uni.showToast({
  551. icon: 'none',
  552. title: res.msg
  553. });
  554. }
  555. })
  556. }
  557. function handleAddWasteInfo() {
  558. if (wasteInfo.value.length > 0) {
  559. if (wasteInfo.value.some(item => item.rejectNum == '' || item.reason == '')) {
  560. uni.showToast({
  561. icon: 'none',
  562. title: '请填写废品量或废品原因再点击添加'
  563. })
  564. } else {
  565. wasteInfo.value.push({
  566. rejectNum: '',
  567. reason: ''
  568. })
  569. }
  570. } else {
  571. wasteInfo.value.push({
  572. rejectNum: store.dayworkInfo.processQualifiedNum > 0 ? store.dayworkInfo
  573. .processQualifiedNum - lotPreSumQualifiedNum.value - lotPreSumReject.value - workInfo.value
  574. .qualifiedNum > 0 ? store.dayworkInfo
  575. .processQualifiedNum - lotPreSumQualifiedNum.value - lotPreSumReject.value - workInfo.value
  576. .qualifiedNum : 1 : store.dayworkInfo.isLast == 1 ?
  577. store.dayworkInfo.lastLotQuantity - lotPreSumQualifiedNum.value - lotPreSumReject.value -
  578. workInfo.value.qualifiedNum > 0 ?
  579. store.dayworkInfo.lastLotQuantity - lotPreSumQualifiedNum.value - lotPreSumReject.value -
  580. workInfo.value.qualifiedNum : 1 : store.dayworkInfo.oneLotQuantity - lotPreSumQualifiedNum
  581. .value - lotPreSumReject.value -
  582. workInfo.value.qualifiedNum > 0 ?
  583. store.dayworkInfo.oneLotQuantity - lotPreSumQualifiedNum.value - lotPreSumReject.value -
  584. workInfo.value.qualifiedNum : 1,
  585. reason: ''
  586. })
  587. }
  588. }
  589. function handleDeleteWasteInfo(index) {
  590. wasteInfo.value.splice(index, 1);
  591. }
  592. function handleReasonChange(item) {
  593. if (wasteInfo.value.filter(waste => waste.reason == item.reason).length > 1) {
  594. wasteInfo.value.splice(wasteInfo.value.indexOf(item), 1);
  595. uni.showToast({
  596. icon: 'none',
  597. title: '请勿重复选择废品原因',
  598. duration: 2000
  599. })
  600. }
  601. }
  602. defineExpose({
  603. open
  604. })
  605. </script>
  606. <style lang="scss">
  607. .dialog-body {
  608. .list-container {
  609. width: 100%;
  610. display: flex;
  611. align-items: flex-start;
  612. padding: 0 4rpx;
  613. .list-title {
  614. width: 100%;
  615. margin-top: 16rpx;
  616. height: 64rpx;
  617. line-height: 64rpx;
  618. align-items: center;
  619. .label {
  620. flex: 1;
  621. font-size: 32rpx;
  622. }
  623. .input {
  624. width: 40%;
  625. height: 66rpx;
  626. padding-left: 10rpx;
  627. font-size: 22rpx;
  628. border: 1rpx solid #e1e1e1;
  629. border-radius: 8rpx;
  630. }
  631. .icon-gear {
  632. font-size: 56rpx;
  633. }
  634. }
  635. .switch {
  636. margin-top: -8rpx;
  637. align-items: center;
  638. transform: scale(0.7);
  639. }
  640. .confirmCarrier {
  641. .label {
  642. padding-top: 20rpx;
  643. font-size: 32rpx;
  644. }
  645. .vehicleList {
  646. justify-content: baseline;
  647. align-content: flex-start;
  648. flex-wrap: wrap;
  649. width: 100%;
  650. height: 120rpx;
  651. overflow: auto;
  652. .vehicleNo {
  653. padding: 0 10rpx;
  654. margin: 10rpx 20rpx 0 0;
  655. justify-content: space-between;
  656. align-items: center;
  657. width: auto;
  658. height: 60rpx;
  659. border: 2rpx solid rgba(213, 213, 213, 1);
  660. border-radius: 6rpx;
  661. }
  662. .blueBorder {
  663. background-color: #1684fc;
  664. color: #FFFFFF;
  665. }
  666. }
  667. }
  668. }
  669. .add-btn-container {
  670. margin-top: 32rpx;
  671. .btn {
  672. flex: 1;
  673. background-color: rgba(255, 85, 85, 1);
  674. color: #FFFFFF;
  675. margin-left: 5rpx;
  676. padding: 0;
  677. }
  678. .btnScan {
  679. flex: 1;
  680. color: #FFFFFF;
  681. margin-right: 5rpx;
  682. padding: 0;
  683. }
  684. }
  685. }
  686. .mask {
  687. position: fixed;
  688. top: 0;
  689. left: 0;
  690. right: 0;
  691. bottom: 0;
  692. background-color: rgba(0, 0, 0, 0.5);
  693. z-index: 20;
  694. display: flex;
  695. justify-content: center;
  696. align-items: center;
  697. }
  698. .mask .loading-text {
  699. color: #fff;
  700. font-size: 36rpx;
  701. }
  702. </style>