kyy
2025-10-16 a0f48422ed179d2f82d5701a7528e77462f71483
pages/QC/OQC/ScanCode.vue
@@ -162,13 +162,15 @@
          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("条码信息不完整,请检查条码");
@@ -216,7 +218,16 @@
        }
        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);