| | |
| | | formData: { |
| | | barcode: "", |
| | | itemNo: "", |
| | | sumQuantity: 0 |
| | | sumQuantity:0 |
| | | }, |
| | | itemInsFormData: {}, |
| | | tableData: [], |
| | |
| | | //}, |
| | | getScan() { |
| | | var that = this; |
| | | |
| | | |
| | | that.isLoading = true; |
| | | that.AxiosHttp("post", 'MesBarCF/GetBarInfoBefore', { |
| | | barcode: that.formData.barcode, |
| | |
| | | .then(function (res) { |
| | | var json = res; |
| | | if (json.status == 0) { |
| | | |
| | | |
| | | that.formData.sumQuantity = json.data.tbBillList.quantity; |
| | | |
| | | that.formData.itemNo = json.data.tbMesItems.itemNo; |
| | |
| | | //that.barMessage = json.data.tbBillList.message; |
| | | //that.$refs.barcode.focus(); |
| | | //that.formData.barcode = null; |
| | | that.$playSound('success'); |
| | | that.$refs.cfNum.focus(); |
| | | } |
| | | else { |
| | | that.$toast.fail(json.message); |
| | | that.$playSound('error'); |
| | | that.$refs.barcode.focus(); |
| | | that.formData.barcode = null; |
| | | } |
| | |
| | | .catch(function (error) { |
| | | that.isLoading = false; |
| | | that.$toast.fail("网络错误,请重试!"); |
| | | that.$playSound('error'); |
| | | console.log(error); |
| | | that.$refs.barcode.focus(); |
| | | }); |
| | |
| | | |
| | | if (that.formData.cfNum * 1 <= 0) { |
| | | that.$toast.fail("拆分数量不能为空!"); |
| | | that.$playSound('error'); |
| | | return; |
| | | } |
| | | // ... existing code ... |
| | | |
| | | if (parseFloat(that.formData.cfNum) > parseFloat(that.formData.sumQuantity)) { |
| | | that.$toast.fail("拆分数量不能大于条码数量!"); |
| | | that.$playSound('error'); |
| | | return; |
| | | } |
| | | // ... existing code ... |
| | | |
| | | if (that.formData.barcode.length * 1 <= 0) { |
| | | that.$toast.fail("物料条码不能为空!"); |
| | | that.$playSound('error'); |
| | | return; |
| | | } |
| | | that.isLoading = true; |
| | |
| | | that.$refs.barcode.focus(); |
| | | that.formData.barcode = null; |
| | | that.formData.cfNum = null; |
| | | that.$playSound('success'); |
| | | that.$notify({ type: 'success', message: json.message }); |
| | | } |
| | | else { |
| | |
| | | .catch(function (error) { |
| | | that.isLoading = false; |
| | | that.$toast.fail("网络错误,请重试!"); |
| | | that.$playSound('error'); |
| | | console.log(error); |
| | | }); |
| | | }, |