| | |
| | | messageId: 0, |
| | | |
| | | show: false, |
| | | |
| | | scanInfo: { barcodeNum: "", splitNum: "", barcode: "" }, |
| | | ip: "", |
| | | port: "", |
| | | oldBarInfo: [], |
| | | cfBarInfo: [], |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | that.show = true; |
| | | } |
| | | else { |
| | | that.$playSound('error'); |
| | | that.$toast.fail(json.message); |
| | | } |
| | | that.isLoading = false; |
| | | }) |
| | | .catch(function (error) { |
| | | that.isLoading = false; |
| | | that.$playSound('error'); |
| | | that.$toast.fail("网络错误,请重试!"); |
| | | console.log(error); |
| | | }); |
| | |
| | | that.itemOutNoList = json.data.tbBillList; |
| | | } |
| | | else { |
| | | that.$playSound('error'); |
| | | that.$toast.fail(json.message); |
| | | } |
| | | that.isLoading = false; |
| | | }) |
| | | .catch(function (error) { |
| | | that.isLoading = false; |
| | | that.$playSound('error'); |
| | | that.$toast.fail("网络错误,请重试!"); |
| | | console.log(error); |
| | | }); |
| | |
| | | that.$refs.barcode.focus(); |
| | | } |
| | | else { |
| | | that.$playSound('error'); |
| | | that.$toast.fail(json.message); |
| | | that.ItemDetail = []; |
| | | } |
| | |
| | | }) |
| | | .catch(function (error) { |
| | | that.isLoading = false; |
| | | that.$playSound('error'); |
| | | that.$toast.fail("网络错误,请重试!"); |
| | | that.ItemDetail = []; |
| | | }); |
| | |
| | | that.scanFormData.barcode = null; |
| | | } |
| | | else { |
| | | that.$playSound('error'); |
| | | that.$toast.fail(json.message); |
| | | that.$refs.barcode.focus(); |
| | | that.scanFormData.barcode = null; |
| | | } |
| | | success |
| | | that.$notify({ type: 'success', message: json.message }); |
| | | that.isLoading = false; |
| | | }) |
| | | .catch(function (error) { |
| | | that.isLoading = false; |
| | | that.$playSound('error'); |
| | | that.$toast.fail("网络错误,请重试!"); |
| | | console.log(error); |
| | | that.$refs.barcode.focus(); |
| | | }); |
| | | }, |
| | | getChaiFen() { |
| | | //this.isPrinterPopupVisible = true; // 显示弹窗 |
| | | |
| | | if (this.isLoading) { |
| | | return; |
| | | } |
| | | |
| | | var that = this; |
| | | if (that.scanFormData.itemOutNo.length <= 0) { |
| | | that.$playSound('error'); |
| | | that.$toast.fail("申请单号不能为空!"); |
| | | return; |
| | | } |
| | | if (that.scanInfo.splitNum * 1 <= 0) { |
| | | that.$playSound('error'); |
| | | that.$toast.fail("拆分数量不能为空!"); |
| | | return; |
| | | } |
| | | if (that.scanInfo.barcode.length * 1 <= 0) { |
| | | that.$playSound('error'); |
| | | that.$toast.fail("物料条码不能为空!"); |
| | | return; |
| | | } |
| | | //that.ip = ""; |
| | | //that.prot = ""; |
| | | //that.getPrintInfo(); |
| | | |
| | | //if (that.ip.length <= 0 || that.prot.length <= 0) { |
| | | // alert(that.ip); |
| | | // alert(that.prot); |
| | | // return; |
| | | //} |
| | | |
| | | that.isLoading = true; |
| | | that.AxiosHttp("post", 'Womdaa/ScanCodeCF', { |
| | | daa001: that.modeInfo.daa001, |
| | | userName: that.userInfo.loginAccount, |
| | | barcode: that.scanInfo.barcode, |
| | | Num: that.scanInfo.splitNum, |
| | | }, false) |
| | | .then(function (res) { |
| | | var json = res; |
| | | if (json.status == 0) { |
| | | // that.modeInfo = json.data.tbBillList; |
| | | that.scanInfo.splitNum = null; |
| | | that.scanInfo.barcodeNum = null; |
| | | that.scanInfo.barcode = null; |
| | | that.$notify({ type: 'success', message: json.message }); |
| | | that.$playSound('success'); |
| | | |
| | | that.sendMessage(json.data.tbBillList); |
| | | |
| | | that.$refs.barcode.focus(); |
| | | that.getModel(); |
| | | } |
| | | else { |
| | | that.$playSound('error'); |
| | | that.$toast.fail(json.message); |
| | | that.$playSound('error'); |
| | | } |
| | | that.isLoading = false; |
| | | }) |
| | | .catch(function (error) { |
| | | that.isLoading = false; |
| | | |
| | | that.$toast.fail("网络错误,请重试!"); |
| | | that.$playSound('error'); |
| | | }); |
| | | }, |
| | | } |
| | | }) |