From 7f6beb1f4d7a027b6391e54bd9e5f3efb06921a1 Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期三, 15 四月 2026 17:40:09 +0800
Subject: [PATCH] feat(qualityManagement): 最终检验页面添加销售单号字段并优化界面布局 - 在表格中新增销售单号列显示

---
 src/views/qualityManagement/finalInspection/index.vue |  260 ++++++++++++++++++++++++++-------------------------
 1 files changed, 133 insertions(+), 127 deletions(-)

diff --git a/src/views/qualityManagement/finalInspection/index.vue b/src/views/qualityManagement/finalInspection/index.vue
index db44222..eaed2e9 100644
--- a/src/views/qualityManagement/finalInspection/index.vue
+++ b/src/views/qualityManagement/finalInspection/index.vue
@@ -11,11 +11,12 @@
             clearable
             :prefix-icon="Search"
         />
-        <span  style="margin-left: 10px" class="search_title">妫�娴嬫棩鏈燂細</span>
-        <el-date-picker  v-model="searchForm.entryDate" value-format="YYYY-MM-DD" format="YYYY-MM-DD" type="daterange"
-                         placeholder="璇烽�夋嫨" clearable @change="changeDaterange" />
+        <span style="margin-left: 10px" class="search_title">妫�娴嬫棩鏈燂細</span>
+        <el-date-picker v-model="searchForm.entryDate" value-format="YYYY-MM-DD" format="YYYY-MM-DD" type="daterange"
+                        placeholder="璇烽�夋嫨" clearable @change="changeDaterange"/>
         <el-button type="primary" @click="handleQuery" style="margin-left: 10px"
-        >鎼滅储</el-button
+        >鎼滅储
+        </el-button
         >
       </div>
       <div>
@@ -40,37 +41,37 @@
     <InspectionFormDia ref="inspectionFormDia" @close="handleQuery"></InspectionFormDia>
     <FormDia ref="formDia" @close="handleQuery"></FormDia>
     <files-dia ref="filesDia" @close="handleQuery"></files-dia>
-		<el-dialog v-model="dialogFormVisible" title="缂栬緫妫�楠屽憳" width="30%"
-							 @close="closeDia">
-			<el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef">
-				<el-form-item label="妫�楠屽憳锛�" prop="checkName">
-					<el-select v-model="form.checkName" placeholder="璇烽�夋嫨" clearable>
-						<el-option v-for="item in userList" :key="item.nickName" :label="item.nickName"
-											 :value="item.nickName"/>
-					</el-select>
-				</el-form-item>
-			</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>
+    <el-dialog v-model="dialogFormVisible" title="缂栬緫妫�楠屽憳" width="30%"
+               @close="closeDia">
+      <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef">
+        <el-form-item label="妫�楠屽憳锛�" prop="checkName">
+          <el-select v-model="form.checkName" placeholder="璇烽�夋嫨" clearable>
+            <el-option v-for="item in userList" :key="item.nickName" :label="item.nickName"
+                       :value="item.nickName"/>
+          </el-select>
+        </el-form-item>
+      </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 { Search } from "@element-plus/icons-vue";
+import {Search} from "@element-plus/icons-vue";
 import {onMounted, ref, reactive, toRefs, getCurrentInstance, nextTick} 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 {
-	downloadQualityInspect,
-	qualityInspectDel,
-	qualityInspectListPage, qualityInspectUpdate,
-	submitQualityInspect
+  downloadQualityInspect,
+  qualityInspectDel,
+  qualityInspectListPage, qualityInspectUpdate,
+  submitQualityInspect
 } from "@/api/qualityManagement/rawMaterialInspection.js";
 import FilesDia from "@/views/qualityManagement/finalInspection/components/filesDia.vue";
 import dayjs from "dayjs";
@@ -84,15 +85,20 @@
     entryDateStart: undefined,
     entryDateEnd: undefined,
   },
-	rules: {
-		checkName: [{required: true, message: "璇烽�夋嫨", trigger: "change"}],
-	},
+  rules: {
+    checkName: [{required: true, message: "璇烽�夋嫨", trigger: "change"}],
+  },
 });
-const { searchForm } = toRefs(data);
+const {searchForm} = toRefs(data);
 const tableColumn = ref([
   {
     label: "妫�娴嬫棩鏈�",
     prop: "checkTime",
+    width: 120
+  },
+  {
+    label: "閿�鍞崟鍙�",
+    prop: "salesContractNo",
     width: 120
   },
   {
@@ -140,17 +146,17 @@
       }
     },
   },
-	{
-		label: "鎻愪氦鐘舵��",
-		prop: "inspectState",
-		formatData: (params) => {
-			if (params) {
-				return "宸叉彁浜�";
-			} else {
-				return "鏈彁浜�";
-			}
-		},
-	},
+  {
+    label: "鎻愪氦鐘舵��",
+    prop: "inspectState",
+    formatData: (params) => {
+      if (params) {
+        return "宸叉彁浜�";
+      } else {
+        return "鏈彁浜�";
+      }
+    },
+  },
   {
     dataType: "action",
     label: "鎿嶄綔",
@@ -164,15 +170,15 @@
         clickFun: (row) => {
           openForm("edit", row);
         },
-				disabled: (row) => {
-					// 宸叉彁浜ゅ垯绂佺敤
-					if (row.inspectState == 1) return true;
-					// 濡傛灉妫�楠屽憳鏈夊�硷紝鍙湁褰撳墠鐧诲綍鐢ㄦ埛鑳界紪杈�
-					if (row.checkName) {
-						return row.checkName !== userStore.nickName;
-					}
-					return false;
-				}
+        disabled: (row) => {
+          // 宸叉彁浜ゅ垯绂佺敤
+          if (row.inspectState == 1) return true;
+          // 濡傛灉妫�楠屽憳鏈夊�硷紝鍙湁褰撳墠鐧诲綍鐢ㄦ埛鑳界紪杈�
+          if (row.checkName) {
+            return row.checkName !== userStore.nickName;
+          }
+          return false;
+        }
       },
       {
         name: "闄勪欢",
@@ -181,43 +187,43 @@
           openFilesFormDia(row);
         },
       },
-			{
-				name: "鎻愪氦",
-				type: "text",
-				clickFun: (row) => {
-					submit(row.id);
-				},
-				disabled: (row) => {
-					// 宸叉彁浜ゅ垯绂佺敤
-					if (row.inspectState == 1) return true;
-					// 濡傛灉妫�楠屽憳鏈夊�硷紝鍙湁褰撳墠鐧诲綍鐢ㄦ埛鑳芥彁浜�
-					if (row.checkName) {
-						return row.checkName !== userStore.nickName;
-					}
-					return false;
-				}
-			},
-			{
-				name: "鍒嗛厤妫�楠屽憳",
-				type: "text",
-				clickFun: (row) => {
-					if (!row.checkName) {
-						open(row)
-					} else {
-						proxy.$modal.msgError("妫�楠屽憳宸插瓨鍦�");
-					}
-				},
-				disabled: (row) => {
-					return row.inspectState == 1 || row.checkName;
-				}
-			},
-			{
-				name: "涓嬭浇",
-				type: "text",
-				clickFun: (row) => {
-					downLoadFile(row);
-				},
-			},
+      {
+        name: "鎻愪氦",
+        type: "text",
+        clickFun: (row) => {
+          submit(row.id);
+        },
+        disabled: (row) => {
+          // 宸叉彁浜ゅ垯绂佺敤
+          if (row.inspectState == 1) return true;
+          // 濡傛灉妫�楠屽憳鏈夊�硷紝鍙湁褰撳墠鐧诲綍鐢ㄦ埛鑳芥彁浜�
+          if (row.checkName) {
+            return row.checkName !== userStore.nickName;
+          }
+          return false;
+        }
+      },
+      {
+        name: "鍒嗛厤妫�楠屽憳",
+        type: "text",
+        clickFun: (row) => {
+          if (!row.checkName) {
+            open(row)
+          } else {
+            proxy.$modal.msgError("妫�楠屽憳宸插瓨鍦�");
+          }
+        },
+        disabled: (row) => {
+          return row.inspectState == 1 || row.checkName;
+        }
+      },
+      {
+        name: "涓嬭浇",
+        type: "text",
+        clickFun: (row) => {
+          downLoadFile(row);
+        },
+      },
     ],
   },
 ]);
@@ -233,11 +239,11 @@
 const formDia = ref()
 const filesDia = ref()
 const inspectionFormDia = ref()
-const { proxy } = getCurrentInstance()
+const {proxy} = getCurrentInstance()
 const userStore = useUserStore()
 const userList = ref([]);
 const form = ref({
-	checkName: ""
+  checkName: ""
 });
 const dialogFormVisible = ref(false);
 
@@ -263,7 +269,7 @@
 };
 const getList = () => {
   tableLoading.value = true;
-  const params = { ...searchForm.value, ...page };
+  const params = {...searchForm.value, ...page};
   params.entryDate = undefined
   qualityInspectListPage({...params, inspectType: 2}).then(res => {
     tableLoading.value = false;
@@ -338,56 +344,56 @@
 
 // 鎻愪环
 const submit = async (id) => {
-	const res = await submitQualityInspect({id: id})
-	if (res.code === 200) {
-		proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
-		getList();
-	}
+  const res = await submitQualityInspect({id: id})
+  if (res.code === 200) {
+    proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+    getList();
+  }
 }
 
 // 鍏抽棴寮规
 const closeDia = () => {
-	proxy.resetForm("formRef");
-	dialogFormVisible.value = false;
+  proxy.resetForm("formRef");
+  dialogFormVisible.value = false;
 };
 
 const submitForm = () => {
-	if (currentRow.value) {
-		const data = {
-			...form.value,
-			id: currentRow.value.id
-		}
-		qualityInspectUpdate(data).then(res => {
-			proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
-			closeDia();
-			getList();
-		})
-	}
+  if (currentRow.value) {
+    const data = {
+      ...form.value,
+      id: currentRow.value.id
+    }
+    qualityInspectUpdate(data).then(res => {
+      proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+      closeDia();
+      getList();
+    })
+  }
 };
 
 const open = async (row) => {
-	let userLists = await userListNoPage();
-	userList.value = userLists.data;
-	currentRow.value = row
-	dialogFormVisible.value = true
+  let userLists = await userListNoPage();
+  userList.value = userLists.data;
+  currentRow.value = row
+  dialogFormVisible.value = true
 }
 
 const downLoadFile = (row) => {
-	downloadQualityInspect({ id: row.id }).then((blobData) => {
-		const blob = new Blob([blobData], {
-			type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
-		})
-		const downloadUrl = window.URL.createObjectURL(blob)
-		
-		const link = document.createElement('a')
-		link.href = downloadUrl
-		link.download = '鍘熸潗鏂欐楠屾姤鍛�.docx'
-		document.body.appendChild(link)
-		link.click()
-		
-		document.body.removeChild(link)
-		window.URL.revokeObjectURL(downloadUrl)
-	})
+  downloadQualityInspect({id: row.id}).then((blobData) => {
+    const blob = new Blob([blobData], {
+      type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
+    })
+    const downloadUrl = window.URL.createObjectURL(blob)
+
+    const link = document.createElement('a')
+    link.href = downloadUrl
+    link.download = '鍘熸潗鏂欐楠屾姤鍛�.docx'
+    document.body.appendChild(link)
+    link.click()
+
+    document.body.removeChild(link)
+    window.URL.revokeObjectURL(downloadUrl)
+  })
 };
 onMounted(() => {
   getList();

--
Gitblit v1.9.3