| | |
| | | ItemCode: this.formData.ItemBarcode |
| | | } |
| | | }).then(res => { |
| | | let fr = res.data.tbBillList; |
| | | |
| | | // 数据完整性校验 |
| | | if (!fr) { |
| | | this.$showMessage("获取条码信息失败,请重试"); |
| | | if( res.status == 1 ){ |
| | | this.$showMessage(res.message); |
| | | return; |
| | | } |
| | | |
| | | let fr = res.data.tbBillList; |
| | | |
| | | |
| | | |
| | | if (!fr.itemId || !fr.itemName || !fr.itemNo) { |
| | | this.$showMessage("条码信息不完整,请检查条码"); |
| | |
| | | } |
| | | |
| | | this.formData = fr; |
| | | this.tableData.push(fr); // 将新数据添加到表格 |
| | | let data = { |
| | | id : this.formData.id, |
| | | itemBarcode : this.formData.itemBarcode, |
| | | quantity : this.formData.quantity, |
| | | itemName : this.formData.itemName, |
| | | itemNo : this.formData.itemNo, |
| | | taskNo : this.formData.taskNo, |
| | | itemId : this.formData.itemId |
| | | }; |
| | | this.tableData.push(data); // 将新数据添加到表格 |
| | | this.quantity = this.tableData.reduce(function (accumulator, current) { |
| | | return accumulator + current["quantity"]; |
| | | }, 0); |