| | |
| | | if (that.form.productType == "TG01") { |
| | | that.$refs.saveForm.open(ScanCodeRecordList); |
| | | } else { |
| | | that.queryCustomName(codeInfo,ScanCodeRecordList); |
| | | that.queryCustomName(codeInfo, ScanCodeRecordList); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | methods: { |
| | | queryCustomName(codeInfo,ScanCodeRecordList) { |
| | | queryCustomName(codeInfo, ScanCodeRecordList) { |
| | | // 查询客户名称 |
| | | this.$u.api.NuclearScaleEntry.queryCustomName({ |
| | | BN: codeInfo.BN, |
| | |
| | | // 扫描报工单二维码 |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "客户不一致:" + res.data + " || " + that.form.customerName1, |
| | | content: |
| | | "客户不一致:" + res.data + " || " + that.form.customerName1, |
| | | showCancel: true, |
| | | success: function (res) { |
| | | that.ScanCodeRecord.unshift(ScanCodeRecordList); |
| | | that.ScanCodeRecord.unshift(ScanCodeRecordList); |
| | | }, |
| | | }); |
| | | } else { |
| | |
| | | }); |
| | | } |
| | | // 使用正确的字段名suppliedQuantity,而不是voltage |
| | | const magnetic = |
| | | const magnetic =( |
| | | Number(this.modalList.verificationWeight) - |
| | | Number(this.modalList.forkliftWeight) - |
| | | grossWeightSum; |
| | | grossWeightSum).toFixed(1); |
| | | this.form.verificationWeight = this.modalList.verificationWeight; |
| | | this.form.forkliftWeight = this.modalList.forkliftWeight; |
| | | switch (this.form.productType) { |
| | | case "DT01": |
| | | if (magnetic >= -3 && magnetic <= 3) { |
| | | this.allSubmit(); |
| | | let that = this; |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "磅差:" + magnetic + ",是否确认提交?", |
| | | success: function (res) { |
| | | that.allSubmit(); |
| | | }, |
| | | }); |
| | | } else { |
| | | this.$u.toast("磅差:" + magnetic + ",请车间核查"); |
| | | } |
| | |
| | | } |
| | | }, |
| | | allSubmit() { |
| | | console.log("进来了", this.ScanCodeRecord); |
| | | this.ScanCodeRecord.forEach((item) => { |
| | | item.batchNo = item.outBatchNo; |
| | | }); |
| | |
| | | .catch(() => { |
| | | uni.hideLoading(); |
| | | this.$refs.saveForm.cancel(); |
| | | this.$u.toast("网络异常,请重试"); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: err.message || "网络异常,请重试", |
| | | showCancel: true, |
| | | success: function (res) {}, |
| | | }); |
| | | }); |
| | | }, |
| | | // 提交按钮 |