| | |
| | | that.$refs.sectionCode.focus(); |
| | | }); |
| | | }, |
| | | getScan() { |
| | | getBarInfo() { |
| | | var that = this; |
| | | |
| | | that.isLoading = true; |
| | | that.AxiosHttp("post", 'MesInvItemInCDetails/SaveBarCodes', { |
| | | that.AxiosHttp("post", 'MesCprk/GetBarInfo', { |
| | | sectionCode: that.formData.sectionCode, |
| | | userName: that.userInfo.loginAccount, |
| | | barcode: that.formData.barcode, |
| | |
| | | .then(function (res) { |
| | | var json = res; |
| | | if (json.status == 0) { |
| | | that.formData.itemNo = json.data.tbBillList.itemNo; |
| | | that.formData.sumQuantity = json.data.tbBillList.sumQuantity; |
| | | |
| | | that.itemInsFormData = json.data.tbBillList.itemIns; |
| | | that.itemTableData = json.data.tbBillList.itemInDetails; |
| | | that.tableData = json.data.tbBillList.invItemInCDetails; |
| | | that.barMessage = json.data.tbBillList.message; |
| | | that.$refs.barcode.focus(); |
| | | that.formData.barcode = null; |
| | | that.formData.itemNo = json.data.tbMesItems.itemNo; |
| | | that.formData.itemName = json.data.tbMesItems.itemName; |
| | | that.formData.itemModel = json.data.tbMesItems.itemModel; |
| | | that.formData.barQuantity = json.data.tbBillList.quantity; |
| | | that.formData.DAA001 = json.data.tbBillList.billNo; |
| | | //that.formData.sumQuantity = json.data.tbMesItems.quantity; |
| | | if (that.formData.sectionCode == "" || that.formData.sectionCode == null) { |
| | | that.$refs.sectionCode.focus(); |
| | | } else { |
| | | that.getScan(); |
| | | } |
| | | } |
| | | else { |
| | | that.$toast.fail(json.message); |
| | |
| | | that.$refs.barcode.focus(); |
| | | }); |
| | | }, |
| | | getChaiFen() { |
| | | getScan() { |
| | | var that = this; |
| | | if (that.modeInfo.daa001.length <= 0) { |
| | | that.$toast.fail("领料单号不能为空!"); |
| | | |
| | | if (that.formData.sectionCode.length * 1 <= 0) { |
| | | that.$toast.fail("库位编码不能为空!"); |
| | | return; |
| | | } |
| | | if (that.scanInfo.splitNum * 1 <= 0) { |
| | | that.$toast.fail("拆分数量不能为空!"); |
| | | return; |
| | | } |
| | | if (that.scanInfo.barcode.length * 1 <= 0) { |
| | | if (that.formData.barcode.length * 1 <= 0) { |
| | | that.$toast.fail("物料条码不能为空!"); |
| | | return; |
| | | } |
| | | that.isLoading = true; |
| | | that.AxiosHttp("post", 'Womdaa/ScanCode', { |
| | | daa001: that.modeInfo.daa001, |
| | | that.AxiosHttp("post", 'MesBarCF/CPRK', { |
| | | userName: that.userInfo.loginAccount, |
| | | barcode: that.modeInfo.barcode, |
| | | sectionCode: that.formData.sectionCode, |
| | | barcode: that.formData.barcode, |
| | | }, false) |
| | | .then(function (res) { |
| | | var json = res; |
| | | if (json.status == 0) { |
| | | // that.modeInfo = json.data.tbBillList; |
| | | // that.modeInfo = json.data.tbBillList; |
| | | that.$refs.barcode.focus(); |
| | | that.formData.barcode = null; |
| | | that.formData.cfNum = null; |
| | | that.$notify({ type: 'success', message: json.message }); |
| | | } |
| | | else { |
| | | that.$toast.fail(json.message); |
| | | that.$refs.cfNum.focus(); |
| | | } |
| | | that.isLoading = false; |
| | | }) |
| | |
| | | console.log(error); |
| | | }); |
| | | }, |
| | | //getChaiFen() { |
| | | // var that = this; |
| | | // if (that.modeInfo.daa001.length <= 0) { |
| | | // that.$toast.fail("领料单号不能为空!"); |
| | | // return; |
| | | // } |
| | | // if (that.scanInfo.splitNum * 1 <= 0) { |
| | | // that.$toast.fail("拆分数量不能为空!"); |
| | | // return; |
| | | // } |
| | | // if (that.scanInfo.barcode.length * 1 <= 0) { |
| | | // that.$toast.fail("物料条码不能为空!"); |
| | | // return; |
| | | // } |
| | | // that.isLoading = true; |
| | | // that.AxiosHttp("post", 'Womdaa/ScanCode', { |
| | | // daa001: that.modeInfo.daa001, |
| | | // userName: that.userInfo.loginAccount, |
| | | // barcode: that.modeInfo.barcode, |
| | | // }, false) |
| | | // .then(function (res) { |
| | | // var json = res; |
| | | // if (json.status == 0) { |
| | | // // that.modeInfo = json.data.tbBillList; |
| | | // } |
| | | // else { |
| | | // that.$toast.fail(json.message); |
| | | // } |
| | | // that.isLoading = false; |
| | | // }) |
| | | // .catch(function (error) { |
| | | // that.isLoading = false; |
| | | // that.$toast.fail("网络错误,请重试!"); |
| | | // console.log(error); |
| | | // }); |
| | | //}, |
| | | cleraCode() { |
| | | this.formData.sectionCode = null; |
| | | }, |