| | |
| | | }); |
| | | }, |
| | | getChaiFen() { |
| | | if (this.isLoading) { |
| | | return; |
| | | } |
| | | |
| | | var that = this; |
| | | |
| | | if (that.formData.cfNum * 1 <= 0) { |
| | | that.$toast.fail("拆分数量不能为空!"); |
| | | return; |
| | | } |
| | | //if (that.formData.cfNum > that.formData.sumQuantity) { |
| | | // that.$toast.fail("拆分数量不能大于条码数量!"); |
| | | // return; |
| | | //} |
| | | |
| | | if (parseFloat(that.formData.cfNum) > parseFloat(that.formData.sumQuantity)) { |
| | | that.$toast.fail("拆分数量不能大于条码数量!"); |
| | | return; |
| | | } |
| | | |
| | | if (that.formData.barcode.length * 1 <= 0) { |
| | | that.$toast.fail("物料条码不能为空!"); |
| | | return; |
| | |
| | | var json = res; |
| | | if (json.status == 0) { |
| | | // that.modeInfo = json.data.tbBillList; |
| | | // 拆分全局调用方法 |
| | | that.sendPrintMessage(json.data.tbBillList); |
| | | that.$refs.barcode.focus(); |
| | | that.formData.barcode = null; |
| | | that.formData.cfNum = null; |
| | |
| | | //cleraCode() { |
| | | // this.formData.sectionCode = null; |
| | | //}, |
| | | handleNumberInput3(value) { |
| | | this.formData.cfNum = value.replace(/[^\d.]/g, '') // 1. 去除非数字和小数点 |
| | | .replace(/(\..*)\./g, '$1') // 2. 禁止多个小数点 |
| | | .replace(/^\./g, ''); |
| | | }, |
| | | |
| | | BarRePrint() { |
| | | if (this.isLoading) { |
| | | return; |
| | | } |
| | | |
| | | var that = this; |
| | | |
| | | if (that.formData.barcode.length * 1 <= 0) { |
| | | that.$toast.fail("物料条码不能为空!"); |
| | | return; |
| | | } |
| | | that.isLoading = true; |
| | | that.AxiosHttp("post", 'MesBarCF/BarRePrint', { |
| | | userName: that.userInfo.loginAccount, |
| | | barcode: that.formData.barcode |
| | | }, false) |
| | | .then(function (res) { |
| | | var json = res; |
| | | if (json.status == 0) { |
| | | // that.modeInfo = json.data.tbBillList; |
| | | // 拆分全局调用方法 |
| | | that.sendPrintMessage(json.data.tbBillList); |
| | | that.$refs.barcode.focus(); |
| | | that.formData.barcode = null; |
| | | that.$notify({ type: 'success', message: json.message }); |
| | | } |
| | | else { |
| | | that.$toast.fail(json.message); |
| | | that.$refs.barcode.focus(); |
| | | } |
| | | that.isLoading = false; |
| | | }) |
| | | .catch(function (error) { |
| | | that.isLoading = false; |
| | | that.$toast.fail("网络错误,请重试!"); |
| | | console.log(error); |
| | | }); |
| | | }, |
| | | |
| | | |
| | | } |
| | | }) |