kyy
2025-10-16 a0f48422ed179d2f82d5701a7528e77462f71483
1、oqc新增获取检验项目
已修改2个文件
57 ■■■■■ 文件已修改
pages/QC/OQC/Add.vue 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/QC/OQC/ScanCode.vue 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/QC/OQC/Add.vue
@@ -109,6 +109,7 @@
    <!-- 操作按钮区域 -->
    <view class="action-buttons">
      <button class="btn btn-primary" @click="getTable">获取检验项目</button>
      <button class="btn btn-primary" @click="submitInspection">提交</button>
      <button class="secondary-btn" @click="uploadImages">上传/查看图片</button>
      <button class="btn btn-secondary" @click="addDefectDescription">添加不合格描述</button>
@@ -253,6 +254,41 @@
        }
      })
    },
    getTable() {
      // 获取检验项目逻辑
      this.$post({
        url: "/MesOqcItemsDetect02/OqcQagetTable",
        data: {
          userNo: this.$loginInfo.account,
          releaseNo: this.formData.releaseNo
        }
      }).then(res => {
        if (res.status == 0) {
          uni.showToast({
            title: res.message.toString(),
            icon: 'success',
            duration: 2000
          })
          this.getDetail5();
        } else {
          uni.showModal({
            title: "提示",
            content: res.message.toString(),
            confirmText: "确定",
            showCancel: false,
            success: (res) => {
            }
          })
        }
      })
    },
    editRemarks() {
      if (this.remarks && this.formData.id) {
        this.$post({
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);