liding
2025-04-09 efdd02d3d80253bf93f1c58e3ae25016db2d6b31
src/views/business/unpass/components/PurchaseVerification.vue
@@ -44,8 +44,11 @@
          <div>
            <el-form-item class="headLine" label="验证依据文件编号:" label-width="160px" style="width: 100%"
              prop="verifyFileCode">
              <el-input clearable v-model="purchaseForm.verifyFileCode" size="small"
                :disabled="operationType === 'view'" placeholder="请输入"></el-input>
              <el-select v-model="purchaseForm.verifyFileCode" clearable filterable size="small"
                :disabled="operationType === 'view'" placeholder="请选择">
                <el-option v-for="item in fileList" :key="item.id" :label="item.fileName" :value="item.fileName">
                </el-option>
              </el-select>
            </el-form-item>
          </div>
          <h4>
@@ -149,7 +152,8 @@
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="$emit('resetPurchaseDialog')">取 消</el-button>
        <el-button type="primary" @click="handlePurchase" :loading="handlePurchaseLoading" v-if="operationType === 'add'">确定</el-button>
        <el-button type="primary" @click="handlePurchase" :loading="handlePurchaseLoading"
          v-if="operationType === 'add'">确定</el-button>
      </span>
    </el-dialog>
    <el-dialog title="待验证项目" :visible.sync="factoryVerifyItemDia" width="1000px"
@@ -180,6 +184,7 @@
<script>
import { getFactoryVerify, addFactoryVerify } from '@/api/business/unpass.js'
import { getFileListById } from "@/api/structural/workshop.js"
import {
  getInsProduct,
} from "@/api/business/inspectionTask.js";
@@ -196,6 +201,10 @@
      type: String,
      default: () => null
    },
    workShopId: {
      type: [String, Number],
      default: () => null
    }
  },
  data() {
    // 这里存放数据
@@ -240,7 +249,8 @@
      factoryVerifyItemDia: false, // 添加验证项目弹框
      handleFactoryVerifyLoading: false,
      inspectionItemDia: false,
      inspectionItem: ''
      inspectionItem: '',
      fileList: [], // 添加文件列表数据
    }
  },
  // 方法集合
@@ -248,6 +258,8 @@
    async getInsOrder(operationType, item) {
      this.operationType = operationType
      this.info = item
      // 获取文件列表
      await this.getFileList()
      // 查询已提交的数据
      let factoryVerify = await getFactoryVerify({ insOrderId: this.orderId })
      this.purchaseForm = factoryVerify.data
@@ -276,6 +288,20 @@
          this.tableList.push(obj)
        })
        this.tableLoading = false;
      }
    },
    // 获取文件列表
    async getFileList() {
      try {
        const res = await getFileListById({
          workShopId: this.workShopId
        })
        if (res.code === 200) {
          this.fileList = res.data
        }
      } catch (error) {
        console.error('获取文件列表失败:', error)
      }
    },
    handleSelectionChange(val) {
@@ -345,6 +371,7 @@
.headLine>>>.el-form-item__content {
  width: 68%;
}
>>>.el-form-item__content {
  display: inline-block;
}