huminmin
2026-06-01 a563ea879ef5fb6897e76d2df661e465dce2ab9b
src/views/qualityManagement/processInspection/index.vue
@@ -2,13 +2,6 @@
  <div class="app-container">
    <div class="search_form mb20">
      <div>
        <span class="search_title">工序:</span>
        <el-input v-model="searchForm.process"
                  style="width: 240px"
                  placeholder="请输入工序搜索"
                  @change="handleQuery"
                  clearable
                  :prefix-icon="Search" />
        <span style="margin-left: 10px"
              class="search_title">检测日期:</span>
        <el-date-picker v-model="searchForm.entryDate"
@@ -18,28 +11,18 @@
                        placeholder="请选择"
                        clearable
                        @change="changeDaterange" />
        <span style="margin-left: 10px"
              class="search_title">生产工单号:</span>
        <el-input v-model="searchForm.workOrderNo"
                  style="width: 240px"
                  placeholder="请输入生产工单号搜索"
                  @change="handleQuery"
                  clearable
                  :prefix-icon="Search" />
        <el-button type="primary"
                   @click="handleQuery"
                   style="margin-left: 10px">搜索</el-button>
      </div>
      <div>
        <el-button type="primary"
                   @click="openForm('add')">新增</el-button>
        <el-button @click="handleOut">导出</el-button>
        <el-button type="danger"
                   plain
                   @click="handleDelete">删除</el-button>
      </div>
    </div>
    <div class="table_list">
       <div style="margin-bottom: 20px; text-align: right;">
      <el-button type="primary" @click="openQuickCheck">快速检验</el-button>
      <el-button type="primary" @click="openForm('add')">新增</el-button>
      <el-button @click="handleOut">导出</el-button>
      <el-button type="danger" plain @click="handleDelete">删除</el-button>
    </div>
      <PIMTable rowKey="id"
                :column="tableColumn"
                :tableData="tableData"
@@ -56,6 +39,9 @@
             @close="handleQuery"></FormDia>
    <files-dia ref="filesDia"
               @close="handleQuery"></files-dia>
    <QuickCheckDia ref="quickCheckDia"
                   @close="handleQuery"
                   @success="getList"></QuickCheckDia>
    <el-dialog v-model="dialogFormVisible"
               title="编辑检验员"
               width="30%"
@@ -85,6 +71,8 @@
        </div>
      </template>
    </el-dialog>
  </div>
</template>
@@ -100,6 +88,7 @@
  } from "vue";
  import InspectionFormDia from "@/views/qualityManagement/processInspection/components/inspectionFormDia.vue";
  import FormDia from "@/views/qualityManagement/processInspection/components/formDia.vue";
  import QuickCheckDia from "@/views/qualityManagement/processInspection/components/quickCheckDia.vue";
  import { ElMessageBox } from "element-plus";
  import {
    downloadQualityInspect,
@@ -115,7 +104,6 @@
  const data = reactive({
    searchForm: {
      process: "",
      entryDate: undefined, // 录入日期
      workOrderNo: "",
      entryDateStart: undefined,
@@ -126,6 +114,7 @@
    },
  });
  const { searchForm } = toRefs(data);
  const tableColumn = ref([
    {
      label: "检测日期",
@@ -133,18 +122,13 @@
      width: 120,
    },
    {
      label: "生产工单号",
      prop: "workOrderNo",
      width: 120,
    },
    {
      label: "工序",
      prop: "process",
      width: 230,
    },
    {
      label: "检验员",
      prop: "checkName",
    },
    {
      label: "采购合同号",
      prop: "purchaseContractNo",
         width: 150,
    },
    {
      label: "产品名称",
@@ -314,6 +298,7 @@
  const formDia = ref();
  const filesDia = ref();
  const inspectionFormDia = ref();
  const quickCheckDia = ref();
  const { proxy } = getCurrentInstance();
  const userStore = useUserStore();
  const changeDaterange = value => {
@@ -372,6 +357,26 @@
      formDia.value?.openDialog(type, row);
    });
  };
  // 打开快速检验确认框
  const openQuickCheck = () => {
    // 检查是否选择了数据
    if (!selectedRows.value || selectedRows.value.length === 0) {
      proxy.$modal.msgWarning("请先选择要检验的数据");
      return;
    }
    // 过滤出未提交的数据
    const unSubmittedRows = selectedRows.value.filter(item => item.inspectState !== 1);
    if (unSubmittedRows.length === 0) {
      proxy.$modal.msgWarning("选中的数据已全部提交,无需重复检验");
      return;
    }
    const ids = unSubmittedRows.map(item => item.id);
    quickCheckDia.value?.openDialog(ids, unSubmittedRows);
  };
  // 打开新增检验弹框
  const openInspectionForm = (type, row) => {
    nextTick(() => {