| | |
| | | getModel() { |
| | | var that = this; |
| | | that.isLoading = true; |
| | | that.AxiosHttp("post", 'Womdaa/GetItemsByDaa001', { |
| | | daa001: that.modeInfo.daa001, |
| | | that.AxiosHttp("post", 'Womdaahb/GetItemsByDaa001', { |
| | | hbNo: that.modeInfo.daa001, |
| | | userName: that.userInfo.loginAccount |
| | | }, false) |
| | | .then(function (res) { |
| | |
| | | console.log(json) |
| | | that.ItemDetail = json.data.tbBillList; |
| | | that.modeInfo.planNo = json.data.tbBillList.planNo; |
| | | that.$playSound('success'); |
| | | that.$refs.barcode.focus(); |
| | | } |
| | | else { |
| | | that.$toast.fail(json.message); |
| | | that.$playSound('error'); |
| | | that.$refs.daa001.focus(); |
| | | that.modeInfo.daa001 = ""; |
| | | that.modeInfo.planNo = ""; |
| | |
| | | .catch(function (error) { |
| | | that.isLoading = false; |
| | | that.$toast.fail("网络错误,请重试!"); |
| | | that.$playSound('error'); |
| | | console.log(error); |
| | | that.$refs.daa001.focus(); |
| | | that.modeInfo.daa001 = ""; |
| | |
| | | |
| | | var that = this; |
| | | if (that.modeInfo.daa001.length <= 0) { |
| | | that.$toast.fail("工单单号不能为空!"); |
| | | that.$toast.fail("汇报单号不能为空!"); |
| | | that.$playSound('error'); |
| | | return; |
| | | } |
| | | if (that.scanInfo.barcode.length * 1 <= 0) { |
| | | that.$toast.fail("物料条码不能为空!"); |
| | | that.$playSound('error'); |
| | | return; |
| | | } |
| | | |
| | | that.isLoading = true; |
| | | that.AxiosHttp("post", 'Womdaa/ScanCode', { |
| | | daa001: that.modeInfo.daa001, |
| | | that.AxiosHttp("post", 'Womdaahb/ScanCode', { |
| | | hbNo: that.modeInfo.daa001, |
| | | userName: that.userInfo.loginAccount, |
| | | barcode: that.scanInfo.barcode, |
| | | }, false) |
| | |
| | | } |
| | | else if (json.status == 2) { |
| | | that.$refs.splitNum.focus(); |
| | | that.$playSound('success'); |
| | | that.scanInfo.splitNum = json.data.tbBillList.splitNum; |
| | | that.scanInfo.barcodeNum = json.data.tbBillList.barcodeNum; |
| | | } |
| | |
| | | var that = this; |
| | | if (that.modeInfo.daa001.length <= 0) { |
| | | that.$toast.fail("工单单号不能为空!"); |
| | | that.$playSound('error'); |
| | | return; |
| | | } |
| | | if (that.scanInfo.splitNum * 1 <= 0) { |
| | | that.$toast.fail("拆分数量不能为空!"); |
| | | that.$playSound('error'); |
| | | return; |
| | | } |
| | | if (that.scanInfo.barcode.length * 1 <= 0) { |
| | | that.$toast.fail("物料条码不能为空!"); |
| | | that.$playSound('error'); |
| | | return; |
| | | } |
| | | //that.ip = ""; |
| | |
| | | |
| | | that.isLoading = true; |
| | | that.AxiosHttp("post", 'Womdaa/ScanCodeCF', { |
| | | daa001: that.modeInfo.daa001, |
| | | hbNo: that.modeInfo.daa001, |
| | | userName: that.userInfo.loginAccount, |
| | | barcode: that.scanInfo.barcode, |
| | | Num: that.scanInfo.splitNum, |
| | |
| | | console.log(item); |
| | | // 正则匹配第一个方括号内容 |
| | | const regex = /\[([^\]]+)\]/; |
| | | const matchResult = item.name.match(regex); |
| | | const matchResult = item.name; |
| | | |
| | | if (matchResult && matchResult[1]) { |
| | | this.modeInfo.daa001 = matchResult[1]; // PPBOM00000088-1 |
| | | if (matchResult) { |
| | | this.modeInfo.daa001 = matchResult; // PPBOM00000088-1 |
| | | console.log('提取的DAA001:', this.modeInfo.daa001); |
| | | } else { |
| | | this.$toast.fail('工单号格式异常'); |
| | | that.$playSound('error'); |
| | | this.modeInfo.daa001 = ''; |
| | | } |
| | | this.getModel(); |