| | |
| | | @click="cancelReport(item)" |
| | | > |
| | | <view class="content-header"> |
| | | <view class="content-header-title">{{ ScanCodeRecord.length - index }}</view> |
| | | <view class="content-header-title">{{ |
| | | ScanCodeRecord.length - index |
| | | }}</view> |
| | | </view> |
| | | <view class="content-body"> |
| | | <view class="row-list"> |
| | |
| | | waivDevRejNo: codeInfo.WDR ? codeInfo.WDR : "*", // wdr号 |
| | | productType: that.form.productType, |
| | | }; |
| | | if (codeInfo.CN != "") { |
| | | if (codeInfo.CN != that.form.customerName1) { |
| | | // 扫描报工单二维码 |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: |
| | | "客户不一致:" + codeInfo.CN + "||" + that.form.customerName1, |
| | | showCancel: true, |
| | | success: function (res) { |
| | | const isDuplicate = that.ScanCodeRecord.some( |
| | | (item) => item.outBatchNo === codeInfo.BN |
| | | ); |
| | | if (!isDuplicate) { |
| | | if (that.form.productType == "TG01") { |
| | | that.$refs.saveForm.open(ScanCodeRecordList); |
| | | } else { |
| | | that.ScanCodeRecord.unshift(ScanCodeRecordList); |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | icon: "none", |
| | | title: "请勿重复扫码!", |
| | | duration: 2 * 1000, |
| | | }); |
| | | } |
| | | }, |
| | | }); |
| | | } else { |
| | | if (that.form.productType == "TG01") { |
| | | that.$refs.saveForm.open(ScanCodeRecordList); |
| | | } else { |
| | | that.ScanCodeRecord.unshift(ScanCodeRecordList); |
| | | } |
| | | } |
| | | } else { |
| | | if (that.form.productType == "TG01") { |
| | | that.$refs.saveForm.open(ScanCodeRecordList); |
| | | } else { |
| | | that.ScanCodeRecord.unshift(ScanCodeRecordList); |
| | | } |
| | | that.queryCustomName(codeInfo,ScanCodeRecordList); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | methods: { |
| | | queryCustomName(codeInfo,ScanCodeRecordList) { |
| | | // 查询客户名称 |
| | | this.$u.api.NuclearScaleEntry.queryCustomName({ |
| | | BN: codeInfo.BN, |
| | | }).then((res) => { |
| | | console.log("客户名称:", res); |
| | | if (res.data != this.form.customerName1) { |
| | | let that = this; |
| | | // 扫描报工单二维码 |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "客户不一致:" + res.data + " || " + that.form.customerName1, |
| | | showCancel: true, |
| | | success: function (res) { |
| | | that.ScanCodeRecord.unshift(ScanCodeRecordList); |
| | | }, |
| | | }); |
| | | } else { |
| | | this.ScanCodeRecord.unshift(ScanCodeRecordList); |
| | | } |
| | | }); |
| | | }, |
| | | // 取消扫码记录 |
| | | cancelReport(item) { |
| | | let that = this; |
| | |
| | | this.modalList = { |
| | | verificationWeight: "", |
| | | // }; |
| | | } |
| | | }; |
| | | }) |
| | | .catch((err) => { |
| | | uni.hideLoading(); |