dialog-end-work.vue 20 KB

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