From aabe08c4baaf7472096e26d14cb8cfda24666b5e Mon Sep 17 00:00:00 2001
From: lishenao <3065849776@qq.com>
Date: 星期五, 04 七月 2025 16:06:25 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev

---
 src/views/qualityManagement/processInspection/components/formDia.vue                 |  216 ++++
 src/views/qualityManagement/rawMaterialInspection/components/inspectionFormDia.vue   |  140 ++
 src/api/qualityManagement/qualityInspectParam.js                                     |   27 
 src/views/qualityManagement/finalInspection/components/formDia.vue                   |  209 ++++
 src/views/qualityManagement/finalInspection/components/inspectionFormDia.vue         |  140 ++
 src/views/qualityManagement/rawMaterialInspection/index.vue                          |   85 
 src/views/qualityManagement/finalInspection/index.vue                                |  236 ++++
 src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue            |  170 +++
 src/views/qualityManagement/processInspection/index.vue                              |  241 ++++
 src/views/qualityManagement/finalInspection/components/filesDia.vue                  |  178 +++
 src/views/qualityManagement/nonconformingManagement/components/formDia.vue           |  249 ++++
 src/views/qualityManagement/rawMaterialInspection/components/formDia.vue             |  208 +++
 src/api/qualityManagement/rawMaterialInspection.js                                   |   34 
 src/views/qualityManagement/processInspection/components/filesDia.vue                |  178 +++
 src/views/qualityManagement/metricMaintenance/index.vue                              |   13 
 src/views/qualityManagement/nonconformingManagement/components/inspectionFormDia.vue |  257 ++++
 src/api/qualityManagement/nonconformingManagement.js                                 |   42 
 src/api/qualityManagement/qualityInspectFile.js                                      |   26 
 src/views/qualityManagement/nonconformingManagement/index.vue                        |  285 +++++
 src/views/qualityManagement/processInspection/components/inspectionFormDia.vue       |  140 ++
 20 files changed, 2,988 insertions(+), 86 deletions(-)

diff --git a/src/api/qualityManagement/nonconformingManagement.js b/src/api/qualityManagement/nonconformingManagement.js
new file mode 100644
index 0000000..cf6ebe0
--- /dev/null
+++ b/src/api/qualityManagement/nonconformingManagement.js
@@ -0,0 +1,42 @@
+import request from '@/utils/request'
+
+// 鏌ヨ涓嶅悎鏍肩鐞嗗垪琛�
+export function qualityUnqualifiedListPage(query) {
+    return request({
+        url: '/quality/qualityUnqualified/listPage',
+        method: 'get',
+        params: query,
+    })
+}
+// 鏂板涓嶅悎鏍肩鐞嗗垪琛�
+export function qualityUnqualifiedAdd(query) {
+    return request({
+        url: '/quality/qualityUnqualified/add',
+        method: 'post',
+        data: query,
+    })
+}
+// 淇敼涓嶅悎鏍肩鐞嗗垪琛�
+export function qualityUnqualifiedUpdate(query) {
+    return request({
+        url: '/quality/qualityUnqualified/update',
+        method: 'post',
+        data: query,
+    })
+}
+// 鍒犻櫎涓嶅悎鏍肩鐞嗗垪琛�
+export function qualityUnqualifiedDel(query) {
+    return request({
+        url: '/quality/qualityUnqualified/del',
+        method: 'delete',
+        data: query,
+    })
+}
+// 鏌ヨ涓嶅悎鏍肩鐞嗕俊鎭�
+export function getQualityUnqualifiedInfo(query) {
+    return request({
+        url: '/quality/qualityUnqualified/' + query,
+        method: 'get',
+        data: query,
+    })
+}
\ No newline at end of file
diff --git a/src/api/qualityManagement/qualityInspectFile.js b/src/api/qualityManagement/qualityInspectFile.js
new file mode 100644
index 0000000..1039755
--- /dev/null
+++ b/src/api/qualityManagement/qualityInspectFile.js
@@ -0,0 +1,26 @@
+import request from '@/utils/request'
+
+// 鏌ヨ闄勪欢鍒楄〃
+export function qualityInspectFileListPage(query) {
+    return request({
+        url: '/quality/qualityInspectFile/listPage',
+        method: 'get',
+        params: query,
+    })
+}
+// 鏌ヨ闄勪欢鍒楄〃
+export function qualityInspectFileAdd(query) {
+    return request({
+        url: '/quality/qualityInspectFile/add',
+        method: 'post',
+        data: query,
+    })
+}
+// 鏌ヨ闄勪欢鍒楄〃
+export function qualityInspectFileDel(query) {
+    return request({
+        url: '/quality/qualityInspectFile/del',
+        method: 'delete',
+        data: query,
+    })
+}
\ No newline at end of file
diff --git a/src/api/qualityManagement/qualityInspectParam.js b/src/api/qualityManagement/qualityInspectParam.js
new file mode 100644
index 0000000..4618820
--- /dev/null
+++ b/src/api/qualityManagement/qualityInspectParam.js
@@ -0,0 +1,27 @@
+import request from '@/utils/request'
+
+// 鏌ヨ妫�楠屾寚鏍�
+export function qualityInspectParamInfo(query) {
+    return request({
+        url: '/quality/qualityInspectParam/' + query,
+        method: 'get',
+        data: query,
+    })
+}
+// 鎻愪氦妫�楠�
+export function qualityInspectParamUpdate(query) {
+    return request({
+        url: '/quality/qualityInspectParam/update',
+        method: 'post',
+        data: query,
+    })
+}
+
+// 鍒犻櫎妫�楠岃褰�
+export function qualityInspectParamDel(query) {
+    return request({
+        url: '/quality/qualityInspectParam/del',
+        method: 'delete',
+        data: query,
+    })
+}
\ No newline at end of file
diff --git a/src/api/qualityManagement/rawMaterialInspection.js b/src/api/qualityManagement/rawMaterialInspection.js
new file mode 100644
index 0000000..e909d1a
--- /dev/null
+++ b/src/api/qualityManagement/rawMaterialInspection.js
@@ -0,0 +1,34 @@
+import request from '@/utils/request'
+
+// 鏌ヨ鍘熸潗鏂欐楠屽垪琛�
+export function qualityInspectListPage(query) {
+    return request({
+        url: '/quality/qualityInspect/listPage',
+        method: 'get',
+        params: query,
+    })
+}
+// 鏂板鍘熸潗鏂欐楠�
+export function qualityInspectAdd(query) {
+    return request({
+        url: '/quality/qualityInspect/add',
+        method: 'post',
+        data: query,
+    })
+}
+// 淇敼鍘熸潗鏂欐楠�
+export function qualityInspectUpdate(query) {
+    return request({
+        url: '/quality/qualityInspect/update',
+        method: 'post',
+        data: query,
+    })
+}
+// 鍒犻櫎鍘熸潗鏂欐楠�
+export function qualityInspectDel(query) {
+    return request({
+        url: '/quality/qualityInspect/del',
+        method: 'delete',
+        data: query,
+    })
+}
diff --git a/src/views/qualityManagement/finalInspection/components/filesDia.vue b/src/views/qualityManagement/finalInspection/components/filesDia.vue
new file mode 100644
index 0000000..008479c
--- /dev/null
+++ b/src/views/qualityManagement/finalInspection/components/filesDia.vue
@@ -0,0 +1,178 @@
+<template>
+  <div>
+    <el-dialog
+        v-model="dialogFormVisible"
+        title="涓婁紶闄勪欢"
+        width="50%"
+        @close="closeDia"
+    >
+      <div style="margin-bottom: 10px;text-align: right">
+        <el-upload
+            v-model:file-list="fileList"
+            class="upload-demo"
+            :action="uploadUrl"
+            :on-success="handleUploadSuccess"
+            :on-error="handleUploadError"
+            name="file"
+            :show-file-list="false"
+            :headers="headers"
+            style="display: inline;margin-right: 10px"
+        >
+          <el-button type="primary">涓婁紶闄勪欢</el-button>
+        </el-upload>
+        <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>
+      </div>
+      <PIMTable
+          rowKey="id"
+          :column="tableColumn"
+          :tableData="tableData"
+          :tableLoading="tableLoading"
+          :isSelection="true"
+          @selection-change="handleSelectionChange"
+          height="600"
+      >
+      </PIMTable>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button @click="closeDia">鍙栨秷</el-button>
+        </div>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import {ref} from "vue";
+import {getStaffJoinInfo, staffJoinAdd, staffJoinUpdate} from "@/api/personnelManagement/onboarding.js";
+import {Search} from "@element-plus/icons-vue";
+import {
+  qualityInspectParamDel,
+  qualityInspectParamInfo,
+  qualityInspectParamUpdate
+} from "@/api/qualityManagement/qualityInspectParam.js";
+import {ElMessageBox} from "element-plus";
+import {getToken} from "@/utils/auth.js";
+import {
+  qualityInspectFileAdd,
+  qualityInspectFileDel,
+  qualityInspectFileListPage
+} from "@/api/qualityManagement/qualityInspectFile.js";
+const { proxy } = getCurrentInstance()
+const emit = defineEmits(['close'])
+
+const dialogFormVisible = ref(false);
+const currentId = ref('')
+const selectedRows = ref([]);
+const tableColumn = ref([
+  {
+    label: "鏂囦欢鍚嶇О",
+    prop: "name",
+  },
+  // {
+  //   label: "涓婁紶浜�",
+  //   prop: "createUser",
+  // },
+  // {
+  //   label: "涓婁紶鏃堕棿",
+  //   prop: "createTime",
+  // },
+  {
+    dataType: "action",
+    label: "鎿嶄綔",
+    align: "center",
+    operation: [
+      {
+        name: "涓嬭浇",
+        type: "text",
+        clickFun: (row) => {
+          downLoadFile(row);
+        },
+      }
+    ],
+  },
+]);
+const tableData = ref([]);
+const fileList = ref([]);
+const tableLoading = ref(false);
+const headers = ref({
+  Authorization: "Bearer " + getToken(),
+});
+const uploadUrl = ref(import.meta.env.VITE_APP_BASE_API + "/file/upload"); // 涓婁紶鐨勫浘鐗囨湇鍔″櫒鍦板潃
+
+// 鎵撳紑寮规
+const openDialog = (row) => {
+  dialogFormVisible.value = true;
+  currentId.value = row.id;
+  getList()
+}
+const getList = () => {
+  qualityInspectFileListPage({inspectId: currentId.value}).then(res => {
+    tableData.value = res.data.records;
+  })
+}
+// 琛ㄦ牸閫夋嫨鏁版嵁
+const handleSelectionChange = (selection) => {
+  selectedRows.value = selection;
+};
+// 涓嬭浇闄勪欢
+const downLoadFile = (row) => {
+  proxy.$download.name(row.url);
+}
+// 鍏抽棴寮规
+const closeDia = () => {
+  dialogFormVisible.value = false;
+  emit('close')
+};
+// 涓婁紶鎴愬姛澶勭悊
+function handleUploadSuccess(res, file) {
+  // 濡傛灉涓婁紶鎴愬姛
+  if (res.code == 200) {
+    const fileRow = {}
+    fileRow.name = res.data.originalName
+    fileRow.url = res.data.tempPath
+    uploadFile(fileRow)
+  } else {
+    proxy.$modal.msgError("鏂囦欢涓婁紶澶辫触");
+  }
+}
+function uploadFile(file) {
+  file.inspectId = currentId.value;
+  qualityInspectFileAdd(file).then(res => {
+    proxy.$modal.msgSuccess("鏂囦欢涓婁紶鎴愬姛");
+    getList()
+  })
+}
+// 涓婁紶澶辫触澶勭悊
+function handleUploadError() {
+  proxy.$modal.msgError("鏂囦欢涓婁紶澶辫触");
+}
+// 鍒犻櫎
+const handleDelete = () => {
+  let ids = [];
+  if (selectedRows.value.length > 0) {
+    ids = selectedRows.value.map((item) => item.id);
+  } else {
+    proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
+    return;
+  }
+  ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "瀵煎嚭", {
+    confirmButtonText: "纭",
+    cancelButtonText: "鍙栨秷",
+    type: "warning",
+  }).then(() => {
+    qualityInspectFileDel(ids).then((res) => {
+      proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+      getList();
+    });
+  }).catch(() => {
+    proxy.$modal.msg("宸插彇娑�");
+  });
+};
+defineExpose({
+  openDialog,
+});
+</script>
+
+<style scoped>
+
+</style>
\ No newline at end of file
diff --git a/src/views/qualityManagement/finalInspection/components/formDia.vue b/src/views/qualityManagement/finalInspection/components/formDia.vue
new file mode 100644
index 0000000..adeb393
--- /dev/null
+++ b/src/views/qualityManagement/finalInspection/components/formDia.vue
@@ -0,0 +1,209 @@
+<template>
+  <div>
+    <el-dialog
+        v-model="dialogFormVisible"
+        :title="operationType === 'add' ? '鏂板鍘熸潗鏂欐楠�' : '缂栬緫鍘熸潗鏂欐楠�'"
+        width="70%"
+        @close="closeDia"
+    >
+      <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef">
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="浜у搧鍚嶇О锛�" prop="productId">
+              <el-tree-select
+                  v-model="form.productId"
+                  placeholder="璇烽�夋嫨"
+                  clearable
+                  check-strictly
+                  @change="getModels"
+                  :data="productOptions"
+                  :render-after-expand="false"
+                  style="width: 100%"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="瑙勬牸鍨嬪彿锛�" prop="model">
+              <el-input v-model="form.model" placeholder="璇疯緭鍏�" clearable/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="鍗曚綅锛�" prop="unit">
+              <el-input v-model="form.unit" placeholder="璇疯緭鍏�" clearable/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="鏁伴噺锛�" prop="quantity">
+              <el-input v-model="form.quantity" placeholder="璇疯緭鍏�" clearable/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="妫�娴嬪崟浣嶏細" prop="checkCompany">
+              <el-input v-model="form.checkCompany" placeholder="璇疯緭鍏�" clearable/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="妫�娴嬬粨鏋滐細" prop="checkResult">
+              <el-select v-model="form.checkResult">
+                <el-option label="鍚堟牸" value="鍚堟牸" />
+                <el-option label="涓嶅悎鏍�" value="涓嶅悎鏍�" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="妫�楠屽憳锛�" prop="checkName">
+              <el-input v-model="form.checkName" placeholder="璇疯緭鍏�" clearable/>
+            
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="妫�娴嬫棩鏈燂細" prop="checkTime">
+              <el-date-picker
+                  v-model="form.checkTime"
+                  type="date"
+                  placeholder="璇烽�夋嫨鏃ユ湡"
+                  value-format="YYYY-MM-DD"
+                  format="YYYY-MM-DD"
+                  clearable
+                  style="width: 100%"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="primary" @click="submitForm">纭</el-button>
+          <el-button @click="closeDia">鍙栨秷</el-button>
+        </div>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import {ref} from "vue";
+import {getOptions} from "@/api/procurementManagement/procurementLedger.js";
+import {productTreeList} from "@/api/basicData/product.js";
+import {qualityInspectAdd, qualityInspectUpdate} from "@/api/qualityManagement/rawMaterialInspection.js";
+const { proxy } = getCurrentInstance()
+const emit = defineEmits(['close'])
+
+const dialogFormVisible = ref(false);
+const operationType = ref('')
+const data = reactive({
+  form: {
+    checkTime: "",
+    process: "",
+    checkName: "",
+    productName: "",
+    productId: "",
+    model: "",
+    unit: "",
+    quantity: "",
+    checkCompany: "",
+    checkResult: "",
+  },
+  rules: {
+    checkTime: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" },],
+    process: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
+    checkName: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
+    productId: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
+    model: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
+    unit: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
+    quantity: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
+    checkCompany: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
+    checkResult: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
+  },
+});
+const { form, rules } = toRefs(data);
+const supplierList = ref([]);
+const productOptions = ref([]);
+
+// 鎵撳紑寮规
+const openDialog = (type, row) => {
+  operationType.value = type;
+  dialogFormVisible.value = true;
+  getOptions().then((res) => {
+    supplierList.value = res.data;
+  });
+  getProductOptions();
+  if (operationType.value === 'edit') {
+    form.value = {...row}
+  }
+}
+const getProductOptions = () => {
+  productTreeList().then((res) => {
+    productOptions.value = convertIdToValue(res);
+  });
+};
+const getModels = (value) => {
+  form.value.productName = findNodeById(productOptions.value, value);
+};
+const findNodeById = (nodes, productId) => {
+  for (let i = 0; i < nodes.length; i++) {
+    if (nodes[i].value === productId) {
+      return nodes[i].label; // 鎵惧埌鑺傜偣锛岃繑鍥炶鑺傜偣
+    }
+    if (nodes[i].children && nodes[i].children.length > 0) {
+      const foundNode = findNodeById(nodes[i].children, productId);
+      if (foundNode) {
+        return foundNode; // 鍦ㄥ瓙鑺傜偣涓壘鍒帮紝杩斿洖璇ヨ妭鐐�
+      }
+    }
+  }
+  return null; // 娌℃湁鎵惧埌鑺傜偣锛岃繑鍥瀗ull
+};
+function convertIdToValue(data) {
+  return data.map((item) => {
+    const { id, children, ...rest } = item;
+    const newItem = {
+      ...rest,
+      value: id, // 灏� id 鏀逛负 value
+    };
+    if (children && children.length > 0) {
+      newItem.children = convertIdToValue(children);
+    }
+    
+    return newItem;
+  });
+}
+// 鎻愪氦浜у搧琛ㄥ崟
+const submitForm = () => {
+  proxy.$refs.formRef.validate(valid => {
+    if (valid) {
+      form.value.inspectType = 2
+      if (operationType.value === "add") {
+        qualityInspectAdd(form.value).then(res => {
+          proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+          closeDia();
+        })
+      } else {
+        qualityInspectUpdate(form.value).then(res => {
+          proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+          closeDia();
+        })
+      }
+    }
+  })
+}
+// 鍏抽棴寮规
+const closeDia = () => {
+  proxy.resetForm("formRef");
+  dialogFormVisible.value = false;
+  emit('close')
+};
+defineExpose({
+  openDialog,
+});
+</script>
+
+<style scoped>
+
+</style>
\ No newline at end of file
diff --git a/src/views/qualityManagement/finalInspection/components/inspectionFormDia.vue b/src/views/qualityManagement/finalInspection/components/inspectionFormDia.vue
new file mode 100644
index 0000000..32a36fa
--- /dev/null
+++ b/src/views/qualityManagement/finalInspection/components/inspectionFormDia.vue
@@ -0,0 +1,140 @@
+<template>
+  <div>
+    <el-dialog
+        v-model="dialogFormVisible"
+        title="濉啓妫�楠岃褰�"
+        width="70%"
+        @close="closeDia"
+    >
+      <div style="margin-bottom: 10px;text-align: right">
+        <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>
+      </div>
+      <PIMTable
+          rowKey="id"
+          :column="tableColumn"
+          :tableData="tableData"
+          :tableLoading="tableLoading"
+          :isSelection="true"
+          @selection-change="handleSelectionChange"
+          height="600"
+      >
+        <template #slot="{ row }">
+          <el-input v-model="row.testValue" clearable/>
+        </template>
+      </PIMTable>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="primary" @click="submitForm">纭</el-button>
+          <el-button @click="closeDia">鍙栨秷</el-button>
+        </div>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import {ref} from "vue";
+import {getStaffJoinInfo, staffJoinAdd, staffJoinUpdate} from "@/api/personnelManagement/onboarding.js";
+import {Search} from "@element-plus/icons-vue";
+import {
+  qualityInspectParamDel,
+  qualityInspectParamInfo,
+  qualityInspectParamUpdate
+} from "@/api/qualityManagement/qualityInspectParam.js";
+import {ElMessageBox} from "element-plus";
+const { proxy } = getCurrentInstance()
+const emit = defineEmits(['close'])
+
+const dialogFormVisible = ref(false);
+const operationType = ref('')
+const currentId = ref('')
+const selectedRows = ref([]);
+const tableColumn = ref([
+  {
+    label: "鎸囨爣",
+    prop: "parameterItem",
+  },
+  {
+    label: "鍗曚綅",
+    prop: "unit",
+  },
+  {
+    label: "鏍囧噯鍊�",
+    prop: "standardValue",
+  },
+  {
+    label: "鍐呮帶鍊�",
+    prop: "controlValue",
+  },
+  {
+    label: "妫�楠屽��",
+    prop: "testValue",
+    dataType: 'slot',
+    slot: 'slot',
+  },
+]);
+const tableData = ref([]);
+const tableLoading = ref(false);
+
+// 鎵撳紑寮规
+const openDialog = (type, row) => {
+  operationType.value = type;
+  dialogFormVisible.value = true;
+  if (operationType.value === 'edit') {
+    currentId.value = row.id;
+    getList()
+  }
+}
+const getList = () => {
+  qualityInspectParamInfo(currentId.value).then(res => {
+    tableData.value = res.data;
+  })
+}
+// 琛ㄦ牸閫夋嫨鏁版嵁
+const handleSelectionChange = (selection) => {
+  selectedRows.value = selection;
+};
+// 鎻愪氦浜у搧琛ㄥ崟
+const submitForm = () => {
+  qualityInspectParamUpdate(tableData.value).then(res => {
+    proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+    closeDia();
+  })
+}
+// 鍏抽棴寮规
+const closeDia = () => {
+  dialogFormVisible.value = false;
+  emit('close')
+};
+// 鍒犻櫎
+const handleDelete = () => {
+  let ids = [];
+  if (selectedRows.value.length > 0) {
+    ids = selectedRows.value.map((item) => item.id);
+  } else {
+    proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
+    return;
+  }
+  ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "瀵煎嚭", {
+    confirmButtonText: "纭",
+    cancelButtonText: "鍙栨秷",
+    type: "warning",
+  })
+      .then(() => {
+        qualityInspectParamDel(ids).then((res) => {
+          proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+          getList();
+        });
+      })
+      .catch(() => {
+        proxy.$modal.msg("宸插彇娑�");
+      });
+};
+defineExpose({
+  openDialog,
+});
+</script>
+
+<style scoped>
+
+</style>
\ No newline at end of file
diff --git a/src/views/qualityManagement/finalInspection/index.vue b/src/views/qualityManagement/finalInspection/index.vue
new file mode 100644
index 0000000..5af2fbb
--- /dev/null
+++ b/src/views/qualityManagement/finalInspection/index.vue
@@ -0,0 +1,236 @@
+<template>
+  <div class="app-container">
+    <div class="search_form">
+      <div>
+        <span class="search_title">浜у搧鍚嶇О锛�</span>
+        <el-input
+            v-model="searchForm.productName"
+            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">
+      <PIMTable
+          rowKey="id"
+          :column="tableColumn"
+          :tableData="tableData"
+          :page="page"
+          :isSelection="true"
+          @selection-change="handleSelectionChange"
+          :tableLoading="tableLoading"
+          @pagination="pagination"
+          :total="page.total"
+      ></PIMTable>
+    </div>
+    <InspectionFormDia ref="inspectionFormDia" @close="handleQuery"></InspectionFormDia>
+    <FormDia ref="formDia" @close="handleQuery"></FormDia>
+    <files-dia ref="filesDia" @close="handleQuery"></files-dia>
+  </div>
+</template>
+
+<script setup>
+import { Search } from "@element-plus/icons-vue";
+import {onMounted, ref} from "vue";
+import InspectionFormDia from "@/views/qualityManagement/finalInspection/components/inspectionFormDia.vue";
+import FormDia from "@/views/qualityManagement/finalInspection/components/formDia.vue";
+import {ElMessageBox} from "element-plus";
+import {qualityInspectDel, qualityInspectListPage} from "@/api/qualityManagement/rawMaterialInspection.js";
+import FilesDia from "@/views/qualityManagement/finalInspection/components/filesDia.vue";
+
+const data = reactive({
+  searchForm: {
+    productName: "",
+  },
+});
+const { searchForm } = toRefs(data);
+const tableColumn = ref([
+  {
+    label: "妫�娴嬫棩鏈�",
+    prop: "checkTime",
+    width: 120
+  },
+  {
+    label: "妫�楠屽憳",
+    prop: "checkName",
+  },
+  {
+    label: "浜у搧鍚嶇О",
+    prop: "productName",
+  },
+  {
+    label: "瑙勬牸鍨嬪彿",
+    prop: "model",
+  },
+  {
+    label: "鍗曚綅",
+    prop: "unit",
+  },
+  {
+    label: "鏁伴噺",
+    prop: "quantity",
+    width: 100
+  },
+  {
+    label: "妫�娴嬪崟浣�",
+    prop: "checkCompany",
+    width: 120
+  },
+  {
+    label: "妫�娴嬬粨鏋�",
+    prop: "checkResult",
+    dataType: "tag",
+    formatType: (params) => {
+      if (params == '涓嶅悎鏍�') {
+        return "danger";
+      } else if (params == '鍚堟牸') {
+        return "success";
+      } else {
+        return null;
+      }
+    },
+  },
+  {
+    dataType: "action",
+    label: "鎿嶄綔",
+    align: "center",
+    fixed: "right",
+    width: 190,
+    operation: [
+      {
+        name: "缂栬緫",
+        type: "text",
+        clickFun: (row) => {
+          openForm("edit", row);
+        },
+      },
+      {
+        name: "鏂板妫�楠岃褰�",
+        type: "text",
+        clickFun: (row) => {
+          openInspectionForm("edit", row);
+        },
+      },
+      {
+        name: "闄勪欢",
+        type: "text",
+        clickFun: (row) => {
+          openFilesFormDia(row);
+        },
+      },
+    ],
+  },
+]);
+const tableData = ref([]);
+const selectedRows = ref([]);
+const tableLoading = ref(false);
+const page = reactive({
+  current: 1,
+  size: 100,
+  total: 0
+});
+const formDia = ref()
+const filesDia = ref()
+const inspectionFormDia = ref()
+const { proxy } = getCurrentInstance()
+
+// 鏌ヨ鍒楄〃
+/** 鎼滅储鎸夐挳鎿嶄綔 */
+const handleQuery = () => {
+  page.current = 1;
+  getList();
+};
+const pagination = (obj) => {
+  page.current = obj.page;
+  page.size = obj.limit;
+  getList();
+};
+const getList = () => {
+  tableLoading.value = true;
+  qualityInspectListPage({...page, ...searchForm.value, inspectType: 2}).then(res => {
+    tableLoading.value = false;
+    tableData.value = res.data.records
+    page.total = res.data.total;
+  }).catch(err => {
+    tableLoading.value = false;
+  })
+};
+// 琛ㄦ牸閫夋嫨鏁版嵁
+const handleSelectionChange = (selection) => {
+  selectedRows.value = selection;
+};
+
+// 鎵撳紑寮规
+const openForm = (type, row) => {
+  nextTick(() => {
+    formDia.value?.openDialog(type, row)
+  })
+};
+// 鎵撳紑鏂板妫�楠屽脊妗�
+const openInspectionForm = (type, row) => {
+  nextTick(() => {
+    inspectionFormDia.value?.openDialog(type, row)
+  })
+};
+// 鎵撳紑闄勪欢寮规
+const openFilesFormDia = (type, row) => {
+  nextTick(() => {
+    filesDia.value?.openDialog(type, row)
+  })
+};
+
+// 鍒犻櫎
+const handleDelete = () => {
+  let ids = [];
+  if (selectedRows.value.length > 0) {
+    ids = selectedRows.value.map((item) => item.id);
+  } else {
+    proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
+    return;
+  }
+  ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "瀵煎嚭", {
+    confirmButtonText: "纭",
+    cancelButtonText: "鍙栨秷",
+    type: "warning",
+  })
+      .then(() => {
+        qualityInspectDel(ids).then((res) => {
+          proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+          getList();
+        });
+      })
+      .catch(() => {
+        proxy.$modal.msg("宸插彇娑�");
+      });
+};
+// 瀵煎嚭
+const handleOut = () => {
+  ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
+    confirmButtonText: "纭",
+    cancelButtonText: "鍙栨秷",
+    type: "warning",
+  })
+      .then(() => {
+        proxy.download("/quality/qualityInspect/export", {inspectType: 2}, "杩囩▼妫�楠�.xlsx");
+      })
+      .catch(() => {
+        proxy.$modal.msg("宸插彇娑�");
+      });
+};
+onMounted(() => {
+  getList();
+});
+</script>
+
+<style scoped></style>
diff --git a/src/views/qualityManagement/metricMaintenance/index.vue b/src/views/qualityManagement/metricMaintenance/index.vue
index bdc672d..016a4c1 100644
--- a/src/views/qualityManagement/metricMaintenance/index.vue
+++ b/src/views/qualityManagement/metricMaintenance/index.vue
@@ -317,14 +317,13 @@
     confirmButtonText: "纭",
     cancelButtonText: "鍙栨秷",
     type: "warning",
-  })
-      .then(() => {
-        proxy.download("/quality/qualityTestStandard/export", {}, "妫�娴嬫寚鏍�.xlsx");
-      })
-      .catch(() => {
-        proxy.$modal.msg("宸插彇娑�");
-      });
+  }).then(() => {
+    proxy.download("/quality/qualityTestStandard/export", {}, "妫�娴嬫寚鏍�.xlsx");
+  }).catch(() => {
+    proxy.$modal.msg("宸插彇娑�");
+  });
 };
+
 // 鍒犻櫎鎸囨爣
 const handleDelete = () => {
   let ids = [];
diff --git a/src/views/qualityManagement/nonconformingManagement/components/formDia.vue b/src/views/qualityManagement/nonconformingManagement/components/formDia.vue
new file mode 100644
index 0000000..a6bfbd6
--- /dev/null
+++ b/src/views/qualityManagement/nonconformingManagement/components/formDia.vue
@@ -0,0 +1,249 @@
+<template>
+  <div>
+    <el-dialog
+        v-model="dialogFormVisible"
+        :title="operationType === 'add' ? '鏂板鍘熸潗鏂欐楠�' : '缂栬緫鍘熸潗鏂欐楠�'"
+        width="70%"
+        @close="closeDia"
+    >
+      <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef">
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="鐘舵�侊細" prop="inspectState">
+              <el-select v-model="form.inspectState">
+                <el-option label="寰呭鐞�" :value="0" />
+                <el-option label="宸插鐞�" :value="1" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="绫诲埆锛�" prop="inspectType">
+              <el-select v-model="form.inspectType">
+                <el-option label="鍘熸潗鏂欐楠�" :value="0" />
+                <el-option label="杩囩▼妫�楠�" :value="1" />
+                <el-option label="鍑哄巶妫�楠�" :value="2" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="浜у搧鍚嶇О锛�" prop="productId">
+              <el-tree-select
+                  v-model="form.productId"
+                  placeholder="璇烽�夋嫨"
+                  clearable
+                  check-strictly
+                  @change="getModels"
+                  :data="productOptions"
+                  :render-after-expand="false"
+                  style="width: 100%"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="瑙勬牸鍨嬪彿锛�" prop="model">
+              <el-input v-model="form.model" placeholder="璇疯緭鍏�" clearable/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="鍗曚綅锛�" prop="unit">
+              <el-input v-model="form.unit" placeholder="璇疯緭鍏�" clearable/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="鏁伴噺锛�" prop="quantity">
+              <el-input v-model="form.quantity" placeholder="璇疯緭鍏�" clearable/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="妫�楠屽憳锛�" prop="checkName">
+              <el-input v-model="form.checkName" placeholder="璇疯緭鍏�" clearable/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="妫�娴嬫棩鏈燂細" prop="checkTime">
+              <el-date-picker
+                  v-model="form.checkTime"
+                  type="date"
+                  placeholder="璇烽�夋嫨鏃ユ湡"
+                  value-format="YYYY-MM-DD"
+                  format="YYYY-MM-DD"
+                  clearable
+                  style="width: 100%"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="涓嶅悎鏍肩幇璞★細" prop="defectivePhenomena">
+              <el-input v-model="form.defectivePhenomena" placeholder="璇疯緭鍏�" clearable/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="澶勭悊缁撴灉锛�" prop="dealResult">
+              <el-input v-model="form.dealResult" placeholder="璇疯緭鍏�" clearable/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="澶勭悊浜猴細" prop="dealName">
+              <el-input v-model="form.dealName" placeholder="璇疯緭鍏�" clearable/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="澶勭悊鏃ユ湡锛�" prop="dealTime">
+              <el-date-picker
+                  v-model="form.dealTime"
+                  type="date"
+                  placeholder="璇烽�夋嫨鏃ユ湡"
+                  value-format="YYYY-MM-DD"
+                  format="YYYY-MM-DD"
+                  clearable
+                  style="width: 100%"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="primary" @click="submitForm">纭</el-button>
+          <el-button @click="closeDia">鍙栨秷</el-button>
+        </div>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import {ref} from "vue";
+import {productTreeList} from "@/api/basicData/product.js";
+import {
+  getQualityUnqualifiedInfo,
+  qualityUnqualifiedAdd,
+  qualityUnqualifiedUpdate
+} from "@/api/qualityManagement/nonconformingManagement.js";
+const { proxy } = getCurrentInstance()
+const emit = defineEmits(['close'])
+
+const dialogFormVisible = ref(false);
+const operationType = ref('')
+const data = reactive({
+  form: {
+    checkTime: "",
+    process: "",
+    checkName: "",
+    productName: "",
+    productId: "",
+    model: "",
+    unit: "",
+    quantity: "",
+    checkCompany: "",
+    checkResult: "",
+    inspectState: '',
+    inspectType: '',
+    defectivePhenomena: '',
+    dealResult: '',
+  },
+  rules: {
+    checkTime: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" },],
+    process: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
+    checkName: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
+    productId: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
+    model: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
+    unit: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
+    quantity: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
+    checkCompany: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
+    checkResult: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
+  },
+});
+const { form, rules } = toRefs(data);
+const productOptions = ref([]);
+
+// 鎵撳紑寮规
+const openDialog = (type, row) => {
+  operationType.value = type;
+  dialogFormVisible.value = true;
+  form.value = {}
+  getProductOptions();
+  if (operationType.value === 'edit') {
+    getQualityUnqualifiedInfo(row.id).then(res => {
+      form.value = {...res.data}
+    })
+  }
+}
+const getProductOptions = () => {
+  productTreeList().then((res) => {
+    productOptions.value = convertIdToValue(res);
+  });
+};
+const getModels = (value) => {
+  form.value.productName = findNodeById(productOptions.value, value);
+};
+const findNodeById = (nodes, productId) => {
+  for (let i = 0; i < nodes.length; i++) {
+    if (nodes[i].value === productId) {
+      return nodes[i].label; // 鎵惧埌鑺傜偣锛岃繑鍥炶鑺傜偣
+    }
+    if (nodes[i].children && nodes[i].children.length > 0) {
+      const foundNode = findNodeById(nodes[i].children, productId);
+      if (foundNode) {
+        return foundNode; // 鍦ㄥ瓙鑺傜偣涓壘鍒帮紝杩斿洖璇ヨ妭鐐�
+      }
+    }
+  }
+  return null; // 娌℃湁鎵惧埌鑺傜偣锛岃繑鍥瀗ull
+};
+function convertIdToValue(data) {
+  return data.map((item) => {
+    const { id, children, ...rest } = item;
+    const newItem = {
+      ...rest,
+      value: id, // 灏� id 鏀逛负 value
+    };
+    if (children && children.length > 0) {
+      newItem.children = convertIdToValue(children);
+    }
+    
+    return newItem;
+  });
+}
+// 鎻愪氦浜у搧琛ㄥ崟
+const submitForm = () => {
+  proxy.$refs.formRef.validate(valid => {
+    if (valid) {
+      if (operationType.value === "add") {
+        qualityUnqualifiedAdd(form.value).then(res => {
+          proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+          closeDia();
+        })
+      } else {
+        qualityUnqualifiedUpdate(form.value).then(res => {
+          proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+          closeDia();
+        })
+      }
+    }
+  })
+}
+// 鍏抽棴寮规
+const closeDia = () => {
+  proxy.resetForm("formRef");
+  dialogFormVisible.value = false;
+  emit('close')
+};
+defineExpose({
+  openDialog,
+});
+</script>
+
+<style scoped>
+
+</style>
\ No newline at end of file
diff --git a/src/views/qualityManagement/nonconformingManagement/components/inspectionFormDia.vue b/src/views/qualityManagement/nonconformingManagement/components/inspectionFormDia.vue
new file mode 100644
index 0000000..308d960
--- /dev/null
+++ b/src/views/qualityManagement/nonconformingManagement/components/inspectionFormDia.vue
@@ -0,0 +1,257 @@
+<template>
+  <div>
+    <el-dialog
+        v-model="dialogFormVisible"
+        :title="operationType === 'add' ? '鏂板鍘熸潗鏂欐楠�' : '缂栬緫鍘熸潗鏂欐楠�'"
+        width="70%"
+        @close="closeDia"
+    >
+      <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef">
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="鐘舵�侊細" prop="inspectState">
+              <el-select v-model="form.inspectState">
+                <el-option label="寰呭鐞�" :value="0" />
+                <el-option label="宸插鐞�" :value="1" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="绫诲埆锛�" prop="inspectType">
+              <el-select v-model="form.inspectType" disabled>
+                <el-option label="鍘熸潗鏂欐楠�" :value="0" />
+                <el-option label="杩囩▼妫�楠�" :value="1" />
+                <el-option label="鍑哄巶妫�楠�" :value="2" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="浜у搧鍚嶇О锛�" prop="productId">
+              <el-tree-select
+                  v-model="form.productId"
+                  placeholder="璇烽�夋嫨"
+                  clearable
+                  disabled
+                  check-strictly
+                  @change="getModels"
+                  :data="productOptions"
+                  :render-after-expand="false"
+                  style="width: 100%"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="瑙勬牸鍨嬪彿锛�" prop="model">
+              <el-input v-model="form.model" placeholder="璇疯緭鍏�" clearable disabled/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="鍗曚綅锛�" prop="unit">
+              <el-input v-model="form.unit" placeholder="璇疯緭鍏�" clearable disabled/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="鏁伴噺锛�" prop="quantity">
+              <el-input v-model="form.quantity" placeholder="璇疯緭鍏�" clearable disabled/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="妫�楠屽憳锛�" prop="checkName">
+              <el-input v-model="form.checkName" placeholder="璇疯緭鍏�" clearable disabled/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="妫�娴嬫棩鏈燂細" prop="checkTime">
+              <el-date-picker
+                  v-model="form.checkTime"
+                  type="date"
+                  disabled
+                  placeholder="璇烽�夋嫨鏃ユ湡"
+                  value-format="YYYY-MM-DD"
+                  format="YYYY-MM-DD"
+                  clearable
+                  style="width: 100%"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="涓嶅悎鏍肩幇璞★細" prop="defectivePhenomena">
+              <el-input v-model="form.defectivePhenomena" placeholder="璇疯緭鍏�" clearable/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="澶勭悊缁撴灉锛�" prop="dealResult">
+              <el-input v-model="form.dealResult" placeholder="璇疯緭鍏�" clearable/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="澶勭悊浜猴細" prop="dealName">
+              <el-input v-model="form.dealName" placeholder="璇疯緭鍏�" clearable/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="澶勭悊鏃ユ湡锛�" prop="dealTime">
+              <el-date-picker
+                  v-model="form.dealTime"
+                  type="date"
+                  placeholder="璇烽�夋嫨鏃ユ湡"
+                  value-format="YYYY-MM-DD"
+                  format="YYYY-MM-DD"
+                  clearable
+                  style="width: 100%"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="primary" @click="submitForm">纭</el-button>
+          <el-button @click="closeDia">鍙栨秷</el-button>
+        </div>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import {ref} from "vue";
+import {productTreeList} from "@/api/basicData/product.js";
+import {
+  getQualityUnqualifiedInfo,
+  qualityUnqualifiedAdd,
+  qualityUnqualifiedUpdate
+} from "@/api/qualityManagement/nonconformingManagement.js";
+const { proxy } = getCurrentInstance()
+const emit = defineEmits(['close'])
+
+const dialogFormVisible = ref(false);
+const operationType = ref('')
+const data = reactive({
+  form: {
+    checkTime: "",
+    process: "",
+    checkName: "",
+    productName: "",
+    productId: "",
+    model: "",
+    unit: "",
+    quantity: "",
+    checkCompany: "",
+    checkResult: "",
+    inspectState: '',
+    inspectType: '',
+    defectivePhenomena: '',
+    dealResult: '',
+    dealName: '',
+    dealTime: '',
+  },
+  rules: {
+    checkTime: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" },],
+    process: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
+    checkName: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
+    productId: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
+    model: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
+    unit: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
+    quantity: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
+    checkCompany: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
+    checkResult: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
+    defectivePhenomena: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
+    dealResult: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
+    dealName: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
+    dealTime: [{ required: true, message: "璇疯緭鍏�", trigger: "change" }],
+  },
+});
+const { form, rules } = toRefs(data);
+const productOptions = ref([]);
+
+// 鎵撳紑寮规
+const openDialog = (type, row) => {
+  operationType.value = type;
+  dialogFormVisible.value = true;
+  form.value = {}
+  getProductOptions();
+  if (operationType.value === 'edit') {
+    getQualityUnqualifiedInfo(row.id).then(res => {
+      form.value = {...res.data}
+    })
+  }
+}
+const getProductOptions = () => {
+  productTreeList().then((res) => {
+    productOptions.value = convertIdToValue(res);
+  });
+};
+const getModels = (value) => {
+  form.value.productName = findNodeById(productOptions.value, value);
+};
+const findNodeById = (nodes, productId) => {
+  for (let i = 0; i < nodes.length; i++) {
+    if (nodes[i].value === productId) {
+      return nodes[i].label; // 鎵惧埌鑺傜偣锛岃繑鍥炶鑺傜偣
+    }
+    if (nodes[i].children && nodes[i].children.length > 0) {
+      const foundNode = findNodeById(nodes[i].children, productId);
+      if (foundNode) {
+        return foundNode; // 鍦ㄥ瓙鑺傜偣涓壘鍒帮紝杩斿洖璇ヨ妭鐐�
+      }
+    }
+  }
+  return null; // 娌℃湁鎵惧埌鑺傜偣锛岃繑鍥瀗ull
+};
+function convertIdToValue(data) {
+  return data.map((item) => {
+    const { id, children, ...rest } = item;
+    const newItem = {
+      ...rest,
+      value: id, // 灏� id 鏀逛负 value
+    };
+    if (children && children.length > 0) {
+      newItem.children = convertIdToValue(children);
+    }
+    
+    return newItem;
+  });
+}
+// 鎻愪氦浜у搧琛ㄥ崟
+const submitForm = () => {
+  proxy.$refs.formRef.validate(valid => {
+    if (valid) {
+      if (operationType.value === "add") {
+        qualityUnqualifiedAdd(form.value).then(res => {
+          proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+          closeDia();
+        })
+      } else {
+        qualityUnqualifiedUpdate(form.value).then(res => {
+          proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+          closeDia();
+        })
+      }
+    }
+  })
+}
+// 鍏抽棴寮规
+const closeDia = () => {
+  proxy.resetForm("formRef");
+  dialogFormVisible.value = false;
+  emit('close')
+};
+defineExpose({
+  openDialog,
+});
+</script>
+
+<style scoped>
+
+</style>
\ No newline at end of file
diff --git a/src/views/qualityManagement/nonconformingManagement/index.vue b/src/views/qualityManagement/nonconformingManagement/index.vue
new file mode 100644
index 0000000..319cfd5
--- /dev/null
+++ b/src/views/qualityManagement/nonconformingManagement/index.vue
@@ -0,0 +1,285 @@
+<template>
+  <div class="app-container">
+    <div class="search_form">
+      <div style="display: flex;flex-direction: row;align-items: center;">
+        <div>
+          <span class="search_title">绫诲瀷锛�</span>
+          <el-select v-model="searchForm.inspectType" clearable style="width: 240px" @change="handleQuery">
+            <el-option label="鍘熸潗鏂欐楠�" :value="0" />
+            <el-option label="杩囩▼妫�楠�" :value="1" />
+            <el-option label="鍑哄巶妫�楠�" :value="2" />
+          </el-select>
+        </div>
+        <div style="margin-left: 10px">
+          <span class="search_title">鐘舵�侊細</span>
+          <el-select v-model="searchForm.inspectState" clearable style="width: 240px" @change="handleQuery">
+            <el-option label="寰呭鐞�" :value="0" />
+            <el-option label="宸插鐞�" :value="1" />
+          </el-select>
+        </div>
+        <div style="margin-left: 10px">
+          <span class="search_title">浜у搧鍚嶇О锛�</span>
+          <el-input
+              v-model="searchForm.productName"
+              style="width: 240px"
+              placeholder="璇疯緭鍏ヤ骇鍝佸悕绉版悳绱�"
+              @change="handleQuery"
+              clearable
+              :prefix-icon="Search"
+          />
+        </div>
+        <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">
+      <PIMTable
+          rowKey="id"
+          :column="tableColumn"
+          :tableData="tableData"
+          :page="page"
+          :isSelection="true"
+          @selection-change="handleSelectionChange"
+          :tableLoading="tableLoading"
+          @pagination="pagination"
+          :total="page.total"
+      ></PIMTable>
+    </div>
+    <FormDia ref="formDia" @close="handleQuery"></FormDia>
+    <InspectionFormDia ref="inspectionFormDia" @close="handleQuery"></InspectionFormDia>
+  </div>
+</template>
+
+<script setup>
+import { Search } from "@element-plus/icons-vue";
+import {onMounted, ref} from "vue";
+import FormDia from "@/views/qualityManagement/nonconformingManagement/components/formDia.vue";
+import {ElMessageBox} from "element-plus";
+import {qualityUnqualifiedDel, qualityUnqualifiedListPage} from "@/api/qualityManagement/nonconformingManagement.js";
+import InspectionFormDia from "@/views/qualityManagement/nonconformingManagement/components/inspectionFormDia.vue";
+
+const data = reactive({
+  searchForm: {
+    inspectType: "",
+    inspectState: "",
+    productName: "",
+  },
+});
+const { searchForm } = toRefs(data);
+const tableColumn = ref([
+  {
+    label: "鐘舵��",
+    prop: "inspectState",
+    dataType: "tag",
+    formatData: (params) => {
+      if (params == 0) {
+        return "寰呭鐞�";
+      } else if (params == 1) {
+        return "宸插鐞�";
+      } else {
+        return null;
+      }
+    },
+    formatType: (params) => {
+      if (params == '涓嶅悎鏍�') {
+        return "danger";
+      } else if (params == '鍚堟牸') {
+        return "success";
+      } else {
+        return null;
+      }
+    },
+  },
+  {
+    label: "妫�娴嬫棩鏈�",
+    prop: "checkTime",
+    width: 120
+  },
+  {
+    label: "绫诲埆",
+    prop: "inspectType",
+    dataType: "tag",
+    width: 120,
+    formatData: (params) => {
+      if (params == 0) {
+        return "鍘熸潗鏂欐楠�";
+      } else if (params == 1) {
+        return "杩囩▼妫�楠�";
+      } else {
+        return '鍑哄巶妫�楠�';
+      }
+    },
+    formatType: (params) => {
+      if (params == '涓嶅悎鏍�') {
+        return "info";
+      } else if (params == '鍚堟牸') {
+        return "success";
+      } else {
+        return 'primary';
+      }
+    },
+  },
+  {
+    label: "妫�楠屽憳",
+    prop: "checkName",
+  },
+  {
+    label: "浜у搧鍚嶇О",
+    prop: "productName",
+  },
+  {
+    label: "瑙勬牸鍨嬪彿",
+    prop: "model",
+  },
+  {
+    label: "鍗曚綅",
+    prop: "unit",
+  },
+  {
+    label: "鏁伴噺",
+    prop: "quantity",
+    width: 100
+  },
+  {
+    label: "涓嶅悎鏍肩幇璞�",
+    prop: "defectivePhenomena",
+    width: 120
+  },
+  {
+    label: "澶勭悊缁撴灉",
+    prop: "dealResult",
+    width: 120
+  },
+  {
+    label: "澶勭悊浜�",
+    prop: "dealName",
+    width: 120
+  },
+  {
+    label: "澶勭悊鏃ユ湡",
+    prop: "dealTime",
+    width: 120
+  },
+  {
+    dataType: "action",
+    label: "鎿嶄綔",
+    align: "center",
+    fixed: "right",
+    width: 120,
+    operation: [
+      {
+        name: "缂栬緫",
+        type: "text",
+        clickFun: (row) => {
+          openForm("edit", row);
+        },
+      },
+      {
+        name: "澶勭悊",
+        type: "text",
+        clickFun: (row) => {
+          openInspectionForm("edit", row);
+        },
+      },
+    ],
+  },
+]);
+const tableData = ref([]);
+const selectedRows = ref([]);
+const tableLoading = ref(false);
+const page = reactive({
+  current: 1,
+  size: 100,
+  total: 0
+});
+const formDia = ref()
+const inspectionFormDia = ref()
+const { proxy } = getCurrentInstance()
+
+// 鏌ヨ鍒楄〃
+/** 鎼滅储鎸夐挳鎿嶄綔 */
+const handleQuery = () => {
+  page.current = 1;
+  getList();
+};
+const pagination = (obj) => {
+  page.current = obj.page;
+  page.size = obj.limit;
+  getList();
+};
+const getList = () => {
+  tableLoading.value = true;
+  qualityUnqualifiedListPage({...page, ...searchForm.value}).then(res => {
+    tableLoading.value = false;
+    tableData.value = res.data.records
+    page.total = res.data.total;
+  }).catch(err => {
+    tableLoading.value = false;
+  })
+};
+// 琛ㄦ牸閫夋嫨鏁版嵁
+const handleSelectionChange = (selection) => {
+  selectedRows.value = selection;
+};
+
+// 鎵撳紑寮规
+const openForm = (type, row) => {
+  nextTick(() => {
+    formDia.value?.openDialog(type, row)
+  })
+};
+// 鎵撳紑澶勭悊寮规
+const openInspectionForm = (type, row) => {
+  nextTick(() => {
+    inspectionFormDia.value?.openDialog(type, row)
+  })
+};
+
+// 鍒犻櫎
+const handleDelete = () => {
+  let ids = [];
+  if (selectedRows.value.length > 0) {
+    ids = selectedRows.value.map((item) => item.id);
+  } else {
+    proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
+    return;
+  }
+  ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "瀵煎嚭", {
+    confirmButtonText: "纭",
+    cancelButtonText: "鍙栨秷",
+    type: "warning",
+  })
+      .then(() => {
+        qualityUnqualifiedDel(ids).then((res) => {
+          proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+          getList();
+        });
+      })
+      .catch(() => {
+        proxy.$modal.msg("宸插彇娑�");
+      });
+};
+// 瀵煎嚭
+const handleOut = () => {
+  ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
+    confirmButtonText: "纭",
+    cancelButtonText: "鍙栨秷",
+    type: "warning",
+  })
+      .then(() => {
+        proxy.download("/quality/qualityUnqualified/export", {}, "涓嶅悎鏍肩鐞�.xlsx");
+      })
+      .catch(() => {
+        proxy.$modal.msg("宸插彇娑�");
+      });
+};
+onMounted(() => {
+  getList();
+});
+</script>
+
+<style scoped></style>
diff --git a/src/views/qualityManagement/processInspection/components/filesDia.vue b/src/views/qualityManagement/processInspection/components/filesDia.vue
new file mode 100644
index 0000000..008479c
--- /dev/null
+++ b/src/views/qualityManagement/processInspection/components/filesDia.vue
@@ -0,0 +1,178 @@
+<template>
+  <div>
+    <el-dialog
+        v-model="dialogFormVisible"
+        title="涓婁紶闄勪欢"
+        width="50%"
+        @close="closeDia"
+    >
+      <div style="margin-bottom: 10px;text-align: right">
+        <el-upload
+            v-model:file-list="fileList"
+            class="upload-demo"
+            :action="uploadUrl"
+            :on-success="handleUploadSuccess"
+            :on-error="handleUploadError"
+            name="file"
+            :show-file-list="false"
+            :headers="headers"
+            style="display: inline;margin-right: 10px"
+        >
+          <el-button type="primary">涓婁紶闄勪欢</el-button>
+        </el-upload>
+        <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>
+      </div>
+      <PIMTable
+          rowKey="id"
+          :column="tableColumn"
+          :tableData="tableData"
+          :tableLoading="tableLoading"
+          :isSelection="true"
+          @selection-change="handleSelectionChange"
+          height="600"
+      >
+      </PIMTable>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button @click="closeDia">鍙栨秷</el-button>
+        </div>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import {ref} from "vue";
+import {getStaffJoinInfo, staffJoinAdd, staffJoinUpdate} from "@/api/personnelManagement/onboarding.js";
+import {Search} from "@element-plus/icons-vue";
+import {
+  qualityInspectParamDel,
+  qualityInspectParamInfo,
+  qualityInspectParamUpdate
+} from "@/api/qualityManagement/qualityInspectParam.js";
+import {ElMessageBox} from "element-plus";
+import {getToken} from "@/utils/auth.js";
+import {
+  qualityInspectFileAdd,
+  qualityInspectFileDel,
+  qualityInspectFileListPage
+} from "@/api/qualityManagement/qualityInspectFile.js";
+const { proxy } = getCurrentInstance()
+const emit = defineEmits(['close'])
+
+const dialogFormVisible = ref(false);
+const currentId = ref('')
+const selectedRows = ref([]);
+const tableColumn = ref([
+  {
+    label: "鏂囦欢鍚嶇О",
+    prop: "name",
+  },
+  // {
+  //   label: "涓婁紶浜�",
+  //   prop: "createUser",
+  // },
+  // {
+  //   label: "涓婁紶鏃堕棿",
+  //   prop: "createTime",
+  // },
+  {
+    dataType: "action",
+    label: "鎿嶄綔",
+    align: "center",
+    operation: [
+      {
+        name: "涓嬭浇",
+        type: "text",
+        clickFun: (row) => {
+          downLoadFile(row);
+        },
+      }
+    ],
+  },
+]);
+const tableData = ref([]);
+const fileList = ref([]);
+const tableLoading = ref(false);
+const headers = ref({
+  Authorization: "Bearer " + getToken(),
+});
+const uploadUrl = ref(import.meta.env.VITE_APP_BASE_API + "/file/upload"); // 涓婁紶鐨勫浘鐗囨湇鍔″櫒鍦板潃
+
+// 鎵撳紑寮规
+const openDialog = (row) => {
+  dialogFormVisible.value = true;
+  currentId.value = row.id;
+  getList()
+}
+const getList = () => {
+  qualityInspectFileListPage({inspectId: currentId.value}).then(res => {
+    tableData.value = res.data.records;
+  })
+}
+// 琛ㄦ牸閫夋嫨鏁版嵁
+const handleSelectionChange = (selection) => {
+  selectedRows.value = selection;
+};
+// 涓嬭浇闄勪欢
+const downLoadFile = (row) => {
+  proxy.$download.name(row.url);
+}
+// 鍏抽棴寮规
+const closeDia = () => {
+  dialogFormVisible.value = false;
+  emit('close')
+};
+// 涓婁紶鎴愬姛澶勭悊
+function handleUploadSuccess(res, file) {
+  // 濡傛灉涓婁紶鎴愬姛
+  if (res.code == 200) {
+    const fileRow = {}
+    fileRow.name = res.data.originalName
+    fileRow.url = res.data.tempPath
+    uploadFile(fileRow)
+  } else {
+    proxy.$modal.msgError("鏂囦欢涓婁紶澶辫触");
+  }
+}
+function uploadFile(file) {
+  file.inspectId = currentId.value;
+  qualityInspectFileAdd(file).then(res => {
+    proxy.$modal.msgSuccess("鏂囦欢涓婁紶鎴愬姛");
+    getList()
+  })
+}
+// 涓婁紶澶辫触澶勭悊
+function handleUploadError() {
+  proxy.$modal.msgError("鏂囦欢涓婁紶澶辫触");
+}
+// 鍒犻櫎
+const handleDelete = () => {
+  let ids = [];
+  if (selectedRows.value.length > 0) {
+    ids = selectedRows.value.map((item) => item.id);
+  } else {
+    proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
+    return;
+  }
+  ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "瀵煎嚭", {
+    confirmButtonText: "纭",
+    cancelButtonText: "鍙栨秷",
+    type: "warning",
+  }).then(() => {
+    qualityInspectFileDel(ids).then((res) => {
+      proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+      getList();
+    });
+  }).catch(() => {
+    proxy.$modal.msg("宸插彇娑�");
+  });
+};
+defineExpose({
+  openDialog,
+});
+</script>
+
+<style scoped>
+
+</style>
\ No newline at end of file
diff --git a/src/views/qualityManagement/processInspection/components/formDia.vue b/src/views/qualityManagement/processInspection/components/formDia.vue
new file mode 100644
index 0000000..8e6466a
--- /dev/null
+++ b/src/views/qualityManagement/processInspection/components/formDia.vue
@@ -0,0 +1,216 @@
+<template>
+  <div>
+    <el-dialog
+        v-model="dialogFormVisible"
+        :title="operationType === 'add' ? '鏂板鍘熸潗鏂欐楠�' : '缂栬緫鍘熸潗鏂欐楠�'"
+        width="70%"
+        @close="closeDia"
+    >
+      <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef">
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="宸ュ簭锛�" prop="process">
+              <el-input v-model="form.process" placeholder="璇疯緭鍏�" clearable/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="浜у搧鍚嶇О锛�" prop="productId">
+              <el-tree-select
+                  v-model="form.productId"
+                  placeholder="璇烽�夋嫨"
+                  clearable
+                  check-strictly
+                  @change="getModels"
+                  :data="productOptions"
+                  :render-after-expand="false"
+                  style="width: 100%"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="瑙勬牸鍨嬪彿锛�" prop="model">
+              <el-input v-model="form.model" placeholder="璇疯緭鍏�" clearable/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="鍗曚綅锛�" prop="unit">
+              <el-input v-model="form.unit" placeholder="璇疯緭鍏�" clearable/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="鏁伴噺锛�" prop="quantity">
+              <el-input v-model="form.quantity" placeholder="璇疯緭鍏�" clearable/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="妫�娴嬪崟浣嶏細" prop="checkCompany">
+              <el-input v-model="form.checkCompany" placeholder="璇疯緭鍏�" clearable/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="妫�娴嬬粨鏋滐細" prop="checkResult">
+              <el-select v-model="form.checkResult">
+                <el-option label="鍚堟牸" value="鍚堟牸" />
+                <el-option label="涓嶅悎鏍�" value="涓嶅悎鏍�" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="妫�楠屽憳锛�" prop="checkName">
+              <el-input v-model="form.checkName" placeholder="璇疯緭鍏�" clearable/>
+            
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="妫�娴嬫棩鏈燂細" prop="checkTime">
+              <el-date-picker
+                  v-model="form.checkTime"
+                  type="date"
+                  placeholder="璇烽�夋嫨鏃ユ湡"
+                  value-format="YYYY-MM-DD"
+                  format="YYYY-MM-DD"
+                  clearable
+                  style="width: 100%"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="primary" @click="submitForm">纭</el-button>
+          <el-button @click="closeDia">鍙栨秷</el-button>
+        </div>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import {ref} from "vue";
+import {getOptions} from "@/api/procurementManagement/procurementLedger.js";
+import {productTreeList} from "@/api/basicData/product.js";
+import {qualityInspectAdd, qualityInspectUpdate} from "@/api/qualityManagement/rawMaterialInspection.js";
+const { proxy } = getCurrentInstance()
+const emit = defineEmits(['close'])
+
+const dialogFormVisible = ref(false);
+const operationType = ref('')
+const data = reactive({
+  form: {
+    checkTime: "",
+    process: "",
+    checkName: "",
+    productName: "",
+    productId: "",
+    model: "",
+    unit: "",
+    quantity: "",
+    checkCompany: "",
+    checkResult: "",
+  },
+  rules: {
+    checkTime: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" },],
+    process: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
+    checkName: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
+    productId: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
+    model: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
+    unit: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
+    quantity: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
+    checkCompany: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
+    checkResult: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
+  },
+});
+const { form, rules } = toRefs(data);
+const supplierList = ref([]);
+const productOptions = ref([]);
+
+// 鎵撳紑寮规
+const openDialog = (type, row) => {
+  operationType.value = type;
+  dialogFormVisible.value = true;
+  getOptions().then((res) => {
+    supplierList.value = res.data;
+  });
+  getProductOptions();
+  if (operationType.value === 'edit') {
+    form.value = {...row}
+  }
+}
+const getProductOptions = () => {
+  productTreeList().then((res) => {
+    productOptions.value = convertIdToValue(res);
+  });
+};
+const getModels = (value) => {
+  form.value.productName = findNodeById(productOptions.value, value);
+};
+const findNodeById = (nodes, productId) => {
+  for (let i = 0; i < nodes.length; i++) {
+    if (nodes[i].value === productId) {
+      return nodes[i].label; // 鎵惧埌鑺傜偣锛岃繑鍥炶鑺傜偣
+    }
+    if (nodes[i].children && nodes[i].children.length > 0) {
+      const foundNode = findNodeById(nodes[i].children, productId);
+      if (foundNode) {
+        return foundNode; // 鍦ㄥ瓙鑺傜偣涓壘鍒帮紝杩斿洖璇ヨ妭鐐�
+      }
+    }
+  }
+  return null; // 娌℃湁鎵惧埌鑺傜偣锛岃繑鍥瀗ull
+};
+function convertIdToValue(data) {
+  return data.map((item) => {
+    const { id, children, ...rest } = item;
+    const newItem = {
+      ...rest,
+      value: id, // 灏� id 鏀逛负 value
+    };
+    if (children && children.length > 0) {
+      newItem.children = convertIdToValue(children);
+    }
+    
+    return newItem;
+  });
+}
+// 鎻愪氦浜у搧琛ㄥ崟
+const submitForm = () => {
+  proxy.$refs.formRef.validate(valid => {
+    if (valid) {
+      form.value.inspectType = 1
+      if (operationType.value === "add") {
+        qualityInspectAdd(form.value).then(res => {
+          proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+          closeDia();
+        })
+      } else {
+        qualityInspectUpdate(form.value).then(res => {
+          proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+          closeDia();
+        })
+      }
+    }
+  })
+}
+// 鍏抽棴寮规
+const closeDia = () => {
+  proxy.resetForm("formRef");
+  dialogFormVisible.value = false;
+  emit('close')
+};
+defineExpose({
+  openDialog,
+});
+</script>
+
+<style scoped>
+
+</style>
\ No newline at end of file
diff --git a/src/views/qualityManagement/processInspection/components/inspectionFormDia.vue b/src/views/qualityManagement/processInspection/components/inspectionFormDia.vue
new file mode 100644
index 0000000..32a36fa
--- /dev/null
+++ b/src/views/qualityManagement/processInspection/components/inspectionFormDia.vue
@@ -0,0 +1,140 @@
+<template>
+  <div>
+    <el-dialog
+        v-model="dialogFormVisible"
+        title="濉啓妫�楠岃褰�"
+        width="70%"
+        @close="closeDia"
+    >
+      <div style="margin-bottom: 10px;text-align: right">
+        <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>
+      </div>
+      <PIMTable
+          rowKey="id"
+          :column="tableColumn"
+          :tableData="tableData"
+          :tableLoading="tableLoading"
+          :isSelection="true"
+          @selection-change="handleSelectionChange"
+          height="600"
+      >
+        <template #slot="{ row }">
+          <el-input v-model="row.testValue" clearable/>
+        </template>
+      </PIMTable>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="primary" @click="submitForm">纭</el-button>
+          <el-button @click="closeDia">鍙栨秷</el-button>
+        </div>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import {ref} from "vue";
+import {getStaffJoinInfo, staffJoinAdd, staffJoinUpdate} from "@/api/personnelManagement/onboarding.js";
+import {Search} from "@element-plus/icons-vue";
+import {
+  qualityInspectParamDel,
+  qualityInspectParamInfo,
+  qualityInspectParamUpdate
+} from "@/api/qualityManagement/qualityInspectParam.js";
+import {ElMessageBox} from "element-plus";
+const { proxy } = getCurrentInstance()
+const emit = defineEmits(['close'])
+
+const dialogFormVisible = ref(false);
+const operationType = ref('')
+const currentId = ref('')
+const selectedRows = ref([]);
+const tableColumn = ref([
+  {
+    label: "鎸囨爣",
+    prop: "parameterItem",
+  },
+  {
+    label: "鍗曚綅",
+    prop: "unit",
+  },
+  {
+    label: "鏍囧噯鍊�",
+    prop: "standardValue",
+  },
+  {
+    label: "鍐呮帶鍊�",
+    prop: "controlValue",
+  },
+  {
+    label: "妫�楠屽��",
+    prop: "testValue",
+    dataType: 'slot',
+    slot: 'slot',
+  },
+]);
+const tableData = ref([]);
+const tableLoading = ref(false);
+
+// 鎵撳紑寮规
+const openDialog = (type, row) => {
+  operationType.value = type;
+  dialogFormVisible.value = true;
+  if (operationType.value === 'edit') {
+    currentId.value = row.id;
+    getList()
+  }
+}
+const getList = () => {
+  qualityInspectParamInfo(currentId.value).then(res => {
+    tableData.value = res.data;
+  })
+}
+// 琛ㄦ牸閫夋嫨鏁版嵁
+const handleSelectionChange = (selection) => {
+  selectedRows.value = selection;
+};
+// 鎻愪氦浜у搧琛ㄥ崟
+const submitForm = () => {
+  qualityInspectParamUpdate(tableData.value).then(res => {
+    proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+    closeDia();
+  })
+}
+// 鍏抽棴寮规
+const closeDia = () => {
+  dialogFormVisible.value = false;
+  emit('close')
+};
+// 鍒犻櫎
+const handleDelete = () => {
+  let ids = [];
+  if (selectedRows.value.length > 0) {
+    ids = selectedRows.value.map((item) => item.id);
+  } else {
+    proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
+    return;
+  }
+  ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "瀵煎嚭", {
+    confirmButtonText: "纭",
+    cancelButtonText: "鍙栨秷",
+    type: "warning",
+  })
+      .then(() => {
+        qualityInspectParamDel(ids).then((res) => {
+          proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+          getList();
+        });
+      })
+      .catch(() => {
+        proxy.$modal.msg("宸插彇娑�");
+      });
+};
+defineExpose({
+  openDialog,
+});
+</script>
+
+<style scoped>
+
+</style>
\ No newline at end of file
diff --git a/src/views/qualityManagement/processInspection/index.vue b/src/views/qualityManagement/processInspection/index.vue
new file mode 100644
index 0000000..c8a0ddd
--- /dev/null
+++ b/src/views/qualityManagement/processInspection/index.vue
@@ -0,0 +1,241 @@
+<template>
+  <div class="app-container">
+    <div class="search_form">
+      <div>
+        <span class="search_title">宸ュ簭锛�</span>
+        <el-input
+            v-model="searchForm.process"
+            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">
+      <PIMTable
+          rowKey="id"
+          :column="tableColumn"
+          :tableData="tableData"
+          :page="page"
+          :isSelection="true"
+          @selection-change="handleSelectionChange"
+          :tableLoading="tableLoading"
+          @pagination="pagination"
+          :total="page.total"
+      ></PIMTable>
+    </div>
+    <InspectionFormDia ref="inspectionFormDia" @close="handleQuery"></InspectionFormDia>
+    <FormDia ref="formDia" @close="handleQuery"></FormDia>
+    <files-dia ref="filesDia" @close="handleQuery"></files-dia>
+  </div>
+</template>
+
+<script setup>
+import { Search } from "@element-plus/icons-vue";
+import {onMounted, ref} from "vue";
+import InspectionFormDia from "@/views/qualityManagement/processInspection/components/inspectionFormDia.vue";
+import FormDia from "@/views/qualityManagement/processInspection/components/formDia.vue";
+import {ElMessageBox} from "element-plus";
+import {qualityInspectDel, qualityInspectListPage} from "@/api/qualityManagement/rawMaterialInspection.js";
+import FilesDia from "@/views/qualityManagement/processInspection/components/filesDia.vue";
+
+const data = reactive({
+  searchForm: {
+    process: "",
+  },
+});
+const { searchForm } = toRefs(data);
+const tableColumn = ref([
+  {
+    label: "妫�娴嬫棩鏈�",
+    prop: "checkTime",
+    width: 120
+  },
+  {
+    label: "宸ュ簭",
+    prop: "process",
+    width: 230
+  },
+  {
+    label: "妫�楠屽憳",
+    prop: "checkName",
+  },
+  {
+    label: "浜у搧鍚嶇О",
+    prop: "productName",
+  },
+  {
+    label: "瑙勬牸鍨嬪彿",
+    prop: "model",
+  },
+  {
+    label: "鍗曚綅",
+    prop: "unit",
+  },
+  {
+    label: "鏁伴噺",
+    prop: "quantity",
+    width: 100
+  },
+  {
+    label: "妫�娴嬪崟浣�",
+    prop: "checkCompany",
+    width: 120
+  },
+  {
+    label: "妫�娴嬬粨鏋�",
+    prop: "checkResult",
+    dataType: "tag",
+    formatType: (params) => {
+      if (params == '涓嶅悎鏍�') {
+        return "danger";
+      } else if (params == '鍚堟牸') {
+        return "success";
+      } else {
+        return null;
+      }
+    },
+  },
+  {
+    dataType: "action",
+    label: "鎿嶄綔",
+    align: "center",
+    fixed: "right",
+    width: 190,
+    operation: [
+      {
+        name: "缂栬緫",
+        type: "text",
+        clickFun: (row) => {
+          openForm("edit", row);
+        },
+      },
+      {
+        name: "鏂板妫�楠岃褰�",
+        type: "text",
+        clickFun: (row) => {
+          openInspectionForm("edit", row);
+        },
+      },
+      {
+        name: "闄勪欢",
+        type: "text",
+        clickFun: (row) => {
+          openFilesFormDia(row);
+        },
+      },
+    ],
+  },
+]);
+const tableData = ref([]);
+const selectedRows = ref([]);
+const tableLoading = ref(false);
+const page = reactive({
+  current: 1,
+  size: 100,
+  total: 0
+});
+const formDia = ref()
+const filesDia = ref()
+const inspectionFormDia = ref()
+const { proxy } = getCurrentInstance()
+
+// 鏌ヨ鍒楄〃
+/** 鎼滅储鎸夐挳鎿嶄綔 */
+const handleQuery = () => {
+  page.current = 1;
+  getList();
+};
+const pagination = (obj) => {
+  page.current = obj.page;
+  page.size = obj.limit;
+  getList();
+};
+const getList = () => {
+  tableLoading.value = true;
+  qualityInspectListPage({...page, ...searchForm.value, inspectType: 1}).then(res => {
+    tableLoading.value = false;
+    tableData.value = res.data.records
+    page.total = res.data.total;
+  }).catch(err => {
+    tableLoading.value = false;
+  })
+};
+// 琛ㄦ牸閫夋嫨鏁版嵁
+const handleSelectionChange = (selection) => {
+  selectedRows.value = selection;
+};
+
+// 鎵撳紑寮规
+const openForm = (type, row) => {
+  nextTick(() => {
+    formDia.value?.openDialog(type, row)
+  })
+};
+// 鎵撳紑鏂板妫�楠屽脊妗�
+const openInspectionForm = (type, row) => {
+  nextTick(() => {
+    inspectionFormDia.value?.openDialog(type, row)
+  })
+};
+// 鎵撳紑闄勪欢寮规
+const openFilesFormDia = (type, row) => {
+  nextTick(() => {
+    filesDia.value?.openDialog(type, row)
+  })
+};
+
+// 鍒犻櫎
+const handleDelete = () => {
+  let ids = [];
+  if (selectedRows.value.length > 0) {
+    ids = selectedRows.value.map((item) => item.id);
+  } else {
+    proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
+    return;
+  }
+  ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "瀵煎嚭", {
+    confirmButtonText: "纭",
+    cancelButtonText: "鍙栨秷",
+    type: "warning",
+  })
+      .then(() => {
+        qualityInspectDel(ids).then((res) => {
+          proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+          getList();
+        });
+      })
+      .catch(() => {
+        proxy.$modal.msg("宸插彇娑�");
+      });
+};
+// 瀵煎嚭
+const handleOut = () => {
+  ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
+    confirmButtonText: "纭",
+    cancelButtonText: "鍙栨秷",
+    type: "warning",
+  })
+      .then(() => {
+        proxy.download("/quality/qualityInspect/export", {inspectType: 1}, "杩囩▼妫�楠�.xlsx");
+      })
+      .catch(() => {
+        proxy.$modal.msg("宸插彇娑�");
+      });
+};
+onMounted(() => {
+  getList();
+});
+</script>
+
+<style scoped></style>
diff --git a/src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue b/src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue
index e573db8..cdce2c5 100644
--- a/src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue
+++ b/src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue
@@ -1,9 +1,177 @@
 <template>
-  <div></div>
+  <div>
+    <el-dialog
+        v-model="dialogFormVisible"
+        title="涓婁紶闄勪欢"
+        width="50%"
+        @close="closeDia"
+    >
+      <div style="margin-bottom: 10px;text-align: right">
+        <el-upload
+            v-model:file-list="fileList"
+            class="upload-demo"
+            :action="uploadUrl"
+            :on-success="handleUploadSuccess"
+            :on-error="handleUploadError"
+            name="file"
+            :show-file-list="false"
+            :headers="headers"
+            style="display: inline;margin-right: 10px"
+        >
+          <el-button type="primary">涓婁紶闄勪欢</el-button>
+        </el-upload>
+        <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>
+      </div>
+      <PIMTable
+          rowKey="id"
+          :column="tableColumn"
+          :tableData="tableData"
+          :tableLoading="tableLoading"
+          :isSelection="true"
+          @selection-change="handleSelectionChange"
+          height="600"
+      >
+      </PIMTable>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button @click="closeDia">鍙栨秷</el-button>
+        </div>
+      </template>
+    </el-dialog>
+  </div>
 </template>
 
 <script setup>
+import {ref} from "vue";
+import {getStaffJoinInfo, staffJoinAdd, staffJoinUpdate} from "@/api/personnelManagement/onboarding.js";
+import {Search} from "@element-plus/icons-vue";
+import {
+  qualityInspectParamDel,
+  qualityInspectParamInfo,
+  qualityInspectParamUpdate
+} from "@/api/qualityManagement/qualityInspectParam.js";
+import {ElMessageBox} from "element-plus";
+import {getToken} from "@/utils/auth.js";
+import {
+  qualityInspectFileAdd,
+  qualityInspectFileDel,
+  qualityInspectFileListPage
+} from "@/api/qualityManagement/qualityInspectFile.js";
+const { proxy } = getCurrentInstance()
+const emit = defineEmits(['close'])
 
+const dialogFormVisible = ref(false);
+const currentId = ref('')
+const selectedRows = ref([]);
+const tableColumn = ref([
+  {
+    label: "鏂囦欢鍚嶇О",
+    prop: "name",
+  },
+  // {
+  //   label: "涓婁紶浜�",
+  //   prop: "createUser",
+  // },
+  // {
+  //   label: "涓婁紶鏃堕棿",
+  //   prop: "createTime",
+  // },
+  {
+    dataType: "action",
+    label: "鎿嶄綔",
+    align: "center",
+    operation: [
+      {
+        name: "涓嬭浇",
+        type: "text",
+        clickFun: (row) => {
+          downLoadFile(row);
+        },
+      }
+    ],
+  },
+]);
+const tableData = ref([]);
+const fileList = ref([]);
+const tableLoading = ref(false);
+const headers = ref({
+  Authorization: "Bearer " + getToken(),
+});
+const uploadUrl = ref(import.meta.env.VITE_APP_BASE_API + "/file/upload"); // 涓婁紶鐨勫浘鐗囨湇鍔″櫒鍦板潃
+
+// 鎵撳紑寮规
+const openDialog = (row) => {
+  dialogFormVisible.value = true;
+  currentId.value = row.id;
+  getList()
+}
+const getList = () => {
+  qualityInspectFileListPage({inspectId: currentId.value}).then(res => {
+    tableData.value = res.data.records;
+  })
+}
+// 琛ㄦ牸閫夋嫨鏁版嵁
+const handleSelectionChange = (selection) => {
+  selectedRows.value = selection;
+};
+
+// 鍏抽棴寮规
+const closeDia = () => {
+  dialogFormVisible.value = false;
+  emit('close')
+};
+// 涓婁紶鎴愬姛澶勭悊
+function handleUploadSuccess(res, file) {
+  // 濡傛灉涓婁紶鎴愬姛
+  if (res.code == 200) {
+    const fileRow = {}
+    fileRow.name = res.data.originalName
+    fileRow.url = res.data.tempPath
+    uploadFile(fileRow)
+  } else {
+    proxy.$modal.msgError("鏂囦欢涓婁紶澶辫触");
+  }
+}
+function uploadFile(file) {
+  file.inspectId = currentId.value;
+  qualityInspectFileAdd(file).then(res => {
+    proxy.$modal.msgSuccess("鏂囦欢涓婁紶鎴愬姛");
+    getList()
+  })
+}
+// 涓婁紶澶辫触澶勭悊
+function handleUploadError() {
+  proxy.$modal.msgError("鏂囦欢涓婁紶澶辫触");
+}
+// 涓嬭浇闄勪欢
+const downLoadFile = (row) => {
+  proxy.$download.name(row.url);
+}
+// 鍒犻櫎
+const handleDelete = () => {
+  let ids = [];
+  if (selectedRows.value.length > 0) {
+    ids = selectedRows.value.map((item) => item.id);
+  } else {
+    proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
+    return;
+  }
+  ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "瀵煎嚭", {
+    confirmButtonText: "纭",
+    cancelButtonText: "鍙栨秷",
+    type: "warning",
+  }).then(() => {
+    qualityInspectFileDel(ids).then((res) => {
+      proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+      getList();
+    });
+  }).catch(() => {
+    proxy.$modal.msg("宸插彇娑�");
+  });
+};
+defineExpose({
+  openDialog,
+});
 </script>
 
 <style scoped>
diff --git a/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue b/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue
index 5d2bcbc..32192c0 100644
--- a/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue
+++ b/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue
@@ -2,21 +2,99 @@
   <div>
     <el-dialog
         v-model="dialogFormVisible"
-        :title="operationType === 'add' ? '鏂板鍏ヨ亴' : '缂栬緫浜哄憳'"
+        :title="operationType === 'add' ? '鏂板鍘熸潗鏂欐楠�' : '缂栬緫鍘熸潗鏂欐楠�'"
         width="70%"
         @close="closeDia"
     >
-      <PIMTable
-          rowKey="id"
-          :column="tableColumn"
-          :tableData="tableData"
-          :tableLoading="tableLoading"
-          height="600"
-      >
-        <template #slot="{ row }">
-          <el-input v-model="row.staffName" clearable/>
-        </template>
-      </PIMTable>
+      <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef">
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="渚涘簲鍟嗭細" prop="supplier">
+              <el-select
+                  v-model="form.supplier"
+                  placeholder="璇烽�夋嫨"
+                  clearable
+              >
+                <el-option
+                    v-for="item in supplierList"
+                    :key="item.id"
+                    :label="item.supplierName"
+                    :value="item.supplierName"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="浜у搧鍚嶇О锛�" prop="productId">
+              <el-tree-select
+                  v-model="form.productId"
+                  placeholder="璇烽�夋嫨"
+                  clearable
+                  check-strictly
+                  @change="getModels"
+                  :data="productOptions"
+                  :render-after-expand="false"
+                  style="width: 100%"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="瑙勬牸鍨嬪彿锛�" prop="model">
+              <el-input v-model="form.model" placeholder="璇疯緭鍏�" clearable/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="鍗曚綅锛�" prop="unit">
+              <el-input v-model="form.unit" placeholder="璇疯緭鍏�" clearable/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="鏁伴噺锛�" prop="quantity">
+              <el-input v-model="form.quantity" placeholder="璇疯緭鍏�" clearable/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="妫�娴嬪崟浣嶏細" prop="checkCompany">
+              <el-input v-model="form.checkCompany" placeholder="璇疯緭鍏�" clearable/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="妫�娴嬬粨鏋滐細" prop="checkResult">
+              <el-select v-model="form.checkResult">
+                <el-option label="鍚堟牸" value="鍚堟牸" />
+                <el-option label="涓嶅悎鏍�" value="涓嶅悎鏍�" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="妫�楠屽憳锛�" prop="checkName">
+              <el-input v-model="form.checkName" placeholder="璇疯緭鍏�" clearable/>
+            
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="妫�娴嬫棩鏈燂細" prop="checkTime">
+              <el-date-picker
+                  v-model="form.checkTime"
+                  type="date"
+                  placeholder="璇烽�夋嫨鏃ユ湡"
+                  value-format="YYYY-MM-DD"
+                  format="YYYY-MM-DD"
+                  clearable
+                  style="width: 100%"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
       <template #footer>
         <div class="dialog-footer">
           <el-button type="primary" @click="submitForm">纭</el-button>
@@ -29,62 +107,103 @@
 
 <script setup>
 import {ref} from "vue";
-import {getStaffJoinInfo, staffJoinAdd, staffJoinUpdate} from "@/api/personnelManagement/onboarding.js";
-import {Search} from "@element-plus/icons-vue";
+import {getOptions} from "@/api/procurementManagement/procurementLedger.js";
+import {productTreeList} from "@/api/basicData/product.js";
+import {qualityInspectAdd, qualityInspectUpdate} from "@/api/qualityManagement/rawMaterialInspection.js";
 const { proxy } = getCurrentInstance()
 const emit = defineEmits(['close'])
 
 const dialogFormVisible = ref(false);
 const operationType = ref('')
-const tableColumn = ref([
-  {
-    label: "鎸囨爣",
-    prop: "contractTerm",
+const data = reactive({
+  form: {
+    checkTime: "",
+    supplier: "",
+    checkName: "",
+    productName: "",
+    productId: "",
+    model: "",
+    unit: "",
+    quantity: "",
+    checkCompany: "",
+    checkResult: "",
   },
-  {
-    label: "鍗曚綅",
-    prop: "contractStartTime",
+  rules: {
+    checkTime: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" },],
+    supplier: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
+    checkName: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
+    productId: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
+    model: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
+    unit: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
+    quantity: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
+    checkCompany: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
+    checkResult: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
   },
-  {
-    label: "鏍囧噯鍊�",
-    prop: "contractEndTime",
-  },
-  {
-    label: "鍐呮帶鍊�",
-    prop: "contractEndTime",
-  },
-  {
-    label: "妫�楠屽��",
-    prop: "contractEndTime",
-    dataType: 'slot',
-    slot: 'slot',
-  },
-]);
-const tableData = ref([]);
-const tableLoading = ref(false);
+});
+const { form, rules } = toRefs(data);
+const supplierList = ref([]);
+const productOptions = ref([]);
 
 // 鎵撳紑寮规
 const openDialog = (type, row) => {
   operationType.value = type;
   dialogFormVisible.value = true;
+  getOptions().then((res) => {
+    supplierList.value = res.data;
+  });
+  getProductOptions();
   if (operationType.value === 'edit') {
-    getStaffJoinInfo(row.id).then(res => {
-      // tableData.value = res.data
-    })
+    form.value = {...row}
   }
+}
+const getProductOptions = () => {
+  productTreeList().then((res) => {
+    productOptions.value = convertIdToValue(res);
+  });
+};
+const getModels = (value) => {
+  form.value.productName = findNodeById(productOptions.value, value);
+};
+const findNodeById = (nodes, productId) => {
+  for (let i = 0; i < nodes.length; i++) {
+    if (nodes[i].value === productId) {
+      return nodes[i].label; // 鎵惧埌鑺傜偣锛岃繑鍥炶鑺傜偣
+    }
+    if (nodes[i].children && nodes[i].children.length > 0) {
+      const foundNode = findNodeById(nodes[i].children, productId);
+      if (foundNode) {
+        return foundNode; // 鍦ㄥ瓙鑺傜偣涓壘鍒帮紝杩斿洖璇ヨ妭鐐�
+      }
+    }
+  }
+  return null; // 娌℃湁鎵惧埌鑺傜偣锛岃繑鍥瀗ull
+};
+function convertIdToValue(data) {
+  return data.map((item) => {
+    const { id, children, ...rest } = item;
+    const newItem = {
+      ...rest,
+      value: id, // 灏� id 鏀逛负 value
+    };
+    if (children && children.length > 0) {
+      newItem.children = convertIdToValue(children);
+    }
+    
+    return newItem;
+  });
 }
 // 鎻愪氦浜у搧琛ㄥ崟
 const submitForm = () => {
   proxy.$refs.formRef.validate(valid => {
     if (valid) {
-      form.value.staffState = 0
+      form.value.inspectType = 0
       if (operationType.value === "add") {
-        staffJoinAdd(form.value).then(res => {
+        qualityInspectAdd(form.value).then(res => {
           proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
           closeDia();
         })
       } else {
-        staffJoinUpdate(form.value).then(res => {
+        qualityInspectUpdate(form.value).then(res => {
           proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
           closeDia();
         })
@@ -94,6 +213,7 @@
 }
 // 鍏抽棴寮规
 const closeDia = () => {
+  proxy.resetForm("formRef");
   dialogFormVisible.value = false;
   emit('close')
 };
diff --git a/src/views/qualityManagement/rawMaterialInspection/components/inspectionFormDia.vue b/src/views/qualityManagement/rawMaterialInspection/components/inspectionFormDia.vue
new file mode 100644
index 0000000..32a36fa
--- /dev/null
+++ b/src/views/qualityManagement/rawMaterialInspection/components/inspectionFormDia.vue
@@ -0,0 +1,140 @@
+<template>
+  <div>
+    <el-dialog
+        v-model="dialogFormVisible"
+        title="濉啓妫�楠岃褰�"
+        width="70%"
+        @close="closeDia"
+    >
+      <div style="margin-bottom: 10px;text-align: right">
+        <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>
+      </div>
+      <PIMTable
+          rowKey="id"
+          :column="tableColumn"
+          :tableData="tableData"
+          :tableLoading="tableLoading"
+          :isSelection="true"
+          @selection-change="handleSelectionChange"
+          height="600"
+      >
+        <template #slot="{ row }">
+          <el-input v-model="row.testValue" clearable/>
+        </template>
+      </PIMTable>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="primary" @click="submitForm">纭</el-button>
+          <el-button @click="closeDia">鍙栨秷</el-button>
+        </div>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import {ref} from "vue";
+import {getStaffJoinInfo, staffJoinAdd, staffJoinUpdate} from "@/api/personnelManagement/onboarding.js";
+import {Search} from "@element-plus/icons-vue";
+import {
+  qualityInspectParamDel,
+  qualityInspectParamInfo,
+  qualityInspectParamUpdate
+} from "@/api/qualityManagement/qualityInspectParam.js";
+import {ElMessageBox} from "element-plus";
+const { proxy } = getCurrentInstance()
+const emit = defineEmits(['close'])
+
+const dialogFormVisible = ref(false);
+const operationType = ref('')
+const currentId = ref('')
+const selectedRows = ref([]);
+const tableColumn = ref([
+  {
+    label: "鎸囨爣",
+    prop: "parameterItem",
+  },
+  {
+    label: "鍗曚綅",
+    prop: "unit",
+  },
+  {
+    label: "鏍囧噯鍊�",
+    prop: "standardValue",
+  },
+  {
+    label: "鍐呮帶鍊�",
+    prop: "controlValue",
+  },
+  {
+    label: "妫�楠屽��",
+    prop: "testValue",
+    dataType: 'slot',
+    slot: 'slot',
+  },
+]);
+const tableData = ref([]);
+const tableLoading = ref(false);
+
+// 鎵撳紑寮规
+const openDialog = (type, row) => {
+  operationType.value = type;
+  dialogFormVisible.value = true;
+  if (operationType.value === 'edit') {
+    currentId.value = row.id;
+    getList()
+  }
+}
+const getList = () => {
+  qualityInspectParamInfo(currentId.value).then(res => {
+    tableData.value = res.data;
+  })
+}
+// 琛ㄦ牸閫夋嫨鏁版嵁
+const handleSelectionChange = (selection) => {
+  selectedRows.value = selection;
+};
+// 鎻愪氦浜у搧琛ㄥ崟
+const submitForm = () => {
+  qualityInspectParamUpdate(tableData.value).then(res => {
+    proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+    closeDia();
+  })
+}
+// 鍏抽棴寮规
+const closeDia = () => {
+  dialogFormVisible.value = false;
+  emit('close')
+};
+// 鍒犻櫎
+const handleDelete = () => {
+  let ids = [];
+  if (selectedRows.value.length > 0) {
+    ids = selectedRows.value.map((item) => item.id);
+  } else {
+    proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
+    return;
+  }
+  ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "瀵煎嚭", {
+    confirmButtonText: "纭",
+    cancelButtonText: "鍙栨秷",
+    type: "warning",
+  })
+      .then(() => {
+        qualityInspectParamDel(ids).then((res) => {
+          proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+          getList();
+        });
+      })
+      .catch(() => {
+        proxy.$modal.msg("宸插彇娑�");
+      });
+};
+defineExpose({
+  openDialog,
+});
+</script>
+
+<style scoped>
+
+</style>
\ No newline at end of file
diff --git a/src/views/qualityManagement/rawMaterialInspection/index.vue b/src/views/qualityManagement/rawMaterialInspection/index.vue
index 29e52df..9732bc9 100644
--- a/src/views/qualityManagement/rawMaterialInspection/index.vue
+++ b/src/views/qualityManagement/rawMaterialInspection/index.vue
@@ -2,11 +2,11 @@
   <div class="app-container">
     <div class="search_form">
       <div>
-        <span class="search_title">濮撳悕锛�</span>
+        <span class="search_title">渚涘簲鍟嗭細</span>
         <el-input
-            v-model="searchForm.staffName"
+            v-model="searchForm.supplier"
             style="width: 240px"
-            placeholder="璇疯緭鍏ュ鍚嶆悳绱�"
+            placeholder="璇疯緭鍏ヤ緵搴斿晢鎼滅储"
             @change="handleQuery"
             clearable
             :prefix-icon="Search"
@@ -34,76 +34,73 @@
           :total="page.total"
       ></PIMTable>
     </div>
-    <form-dia ref="formDia" @close="handleQuery"></form-dia>
+    <InspectionFormDia ref="inspectionFormDia" @close="handleQuery"></InspectionFormDia>
+    <FormDia ref="formDia" @close="handleQuery"></FormDia>
+    <files-dia ref="filesDia" @close="handleQuery"></files-dia>
   </div>
 </template>
 
 <script setup>
 import { Search } from "@element-plus/icons-vue";
 import {onMounted, ref} from "vue";
+import InspectionFormDia from "@/views/qualityManagement/rawMaterialInspection/components/inspectionFormDia.vue";
 import FormDia from "@/views/qualityManagement/rawMaterialInspection/components/formDia.vue";
-import {staffJoinDel, staffJoinListPage} from "@/api/personnelManagement/onboarding.js";
 import {ElMessageBox} from "element-plus";
+import {qualityInspectDel, qualityInspectListPage} from "@/api/qualityManagement/rawMaterialInspection.js";
+import FilesDia from "@/views/qualityManagement/rawMaterialInspection/components/filesDia.vue";
 
 const data = reactive({
   searchForm: {
-    staffName: "",
+    supplier: "",
   },
 });
 const { searchForm } = toRefs(data);
 const tableColumn = ref([
   {
     label: "妫�娴嬫棩鏈�",
-    prop: "staffNo",
+    prop: "checkTime",
+    width: 120
   },
   {
     label: "渚涘簲鍟�",
-    prop: "staffName",
+    prop: "supplier",
+    width: 230
   },
   {
     label: "妫�楠屽憳",
-    prop: "sex",
+    prop: "checkName",
   },
   {
     label: "浜у搧鍚嶇О",
-    prop: "nativePlace",
+    prop: "productName",
   },
   {
     label: "瑙勬牸鍨嬪彿",
-    prop: "nativePlace",
+    prop: "model",
   },
   {
     label: "鍗曚綅",
-    prop: "nativePlace",
+    prop: "unit",
   },
   {
     label: "鏁伴噺",
-    prop: "contractStartTime",
+    prop: "quantity",
     width: 120
   },
   {
     label: "妫�娴嬪崟浣�",
-    prop: "contractEndTime",
+    prop: "checkCompany",
     width: 120
   },
   {
     label: "妫�娴嬬粨鏋�",
-    prop: "staffState",
+    prop: "checkResult",
     dataType: "tag",
-    formatData: (params) => {
-      if (params == 0) {
-        return "绂昏亴";
-      } else if (params == 1) {
-        return "鍦ㄨ亴";
-      } else {
-        return null;
-      }
-    },
     formatType: (params) => {
-      if (params == 0) {
+      if (params == '涓嶅悎鏍�') {
         return "danger";
-      } else if (params == 1) {
-        return "primary";
+      } else if (params == '鍚堟牸') {
+        return "success";
       } else {
         return null;
       }
@@ -114,20 +111,27 @@
     label: "鎿嶄綔",
     align: "center",
     fixed: "right",
-    width: 160,
+    width: 190,
     operation: [
       {
-        name: "鏂板妫�楠岃褰�",
+        name: "缂栬緫",
         type: "text",
         clickFun: (row) => {
           openForm("edit", row);
         },
       },
       {
+        name: "鏂板妫�楠岃褰�",
+        type: "text",
+        clickFun: (row) => {
+          openInspectionForm("edit", row);
+        },
+      },
+      {
         name: "闄勪欢",
         type: "text",
         clickFun: (row) => {
-          openForm("edit", row);
+          openFilesFormDia(row);
         },
       },
     ],
@@ -142,6 +146,8 @@
   total: 0
 });
 const formDia = ref()
+const filesDia = ref()
+const inspectionFormDia = ref()
 const { proxy } = getCurrentInstance()
 
 // 鏌ヨ鍒楄〃
@@ -157,11 +163,10 @@
 };
 const getList = () => {
   tableLoading.value = true;
-  staffJoinListPage({...page, ...searchForm.value, staffState: 0}).then(res => {
+  qualityInspectListPage({...page, ...searchForm.value, inspectType: 0}).then(res => {
     tableLoading.value = false;
     tableData.value = res.data.records
     page.total = res.data.total;
-    console.log(page)
   }).catch(err => {
     tableLoading.value = false;
   })
@@ -175,6 +180,18 @@
 const openForm = (type, row) => {
   nextTick(() => {
     formDia.value?.openDialog(type, row)
+  })
+};
+// 鎵撳紑鏂板妫�楠屽脊妗�
+const openInspectionForm = (type, row) => {
+  nextTick(() => {
+    inspectionFormDia.value?.openDialog(type, row)
+  })
+};
+// 鎵撳紑闄勪欢寮规
+const openFilesFormDia = (type, row) => {
+  nextTick(() => {
+    filesDia.value?.openDialog(type, row)
   })
 };
 
@@ -193,7 +210,7 @@
     type: "warning",
   })
       .then(() => {
-        staffJoinDel(ids).then((res) => {
+        qualityInspectDel(ids).then((res) => {
           proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
           getList();
         });
@@ -210,7 +227,7 @@
     type: "warning",
   })
       .then(() => {
-        proxy.download("/staff/staffJoinLeaveRecord/export", {staffState: 0}, "浜哄憳绂昏亴.xlsx");
+        proxy.download("/quality/qualityInspect/export", {inspectType: 0}, "鍘熸潗鏂欐楠�.xlsx");
       })
       .catch(() => {
         proxy.$modal.msg("宸插彇娑�");

--
Gitblit v1.9.3