From 56158a98729ba25b04f7c80d88aafa59cc41a504 Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期日, 29 三月 2026 22:40:10 +0800
Subject: [PATCH] feat(质量维护): 优化检测项目字段并移除内控值和默认值
---
src/views/qualityManagement/rawMaterialInspection/index.vue | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 50 insertions(+), 10 deletions(-)
diff --git a/src/views/qualityManagement/rawMaterialInspection/index.vue b/src/views/qualityManagement/rawMaterialInspection/index.vue
index 7536274..9751a86 100644
--- a/src/views/qualityManagement/rawMaterialInspection/index.vue
+++ b/src/views/qualityManagement/rawMaterialInspection/index.vue
@@ -64,7 +64,7 @@
<script setup>
import {Search} from "@element-plus/icons-vue";
-import {onMounted, ref} from "vue";
+import {onMounted, ref, reactive, toRefs, getCurrentInstance, nextTick} from "vue";
import InspectionFormDia from "@/views/qualityManagement/rawMaterialInspection/components/inspectionFormDia.vue";
import FormDia from "@/views/qualityManagement/rawMaterialInspection/components/formDia.vue";
import {ElMessageBox} from "element-plus";
@@ -77,16 +77,14 @@
import FilesDia from "@/views/qualityManagement/rawMaterialInspection/components/filesDia.vue";
import dayjs from "dayjs";
import {userListNoPage} from "@/api/system/user.js";
+import useUserStore from "@/store/modules/user";
const data = reactive({
searchForm: {
supplier: "",
- entryDate: [
- dayjs().format("YYYY-MM-DD"),
- dayjs().add(1, "day").format("YYYY-MM-DD"),
- ], // 褰曞叆鏃ユ湡
- entryDateStart: dayjs().format("YYYY-MM-DD"),
- entryDateEnd: dayjs().add(1, "day").format("YYYY-MM-DD"),
+ entryDate: undefined, // 褰曞叆鏃ユ湡
+ entryDateStart: undefined,
+ entryDateEnd: undefined,
},
rules: {
checkName: [{required: true, message: "璇烽�夋嫨", trigger: "change"}],
@@ -97,6 +95,11 @@
{
label: "妫�娴嬫棩鏈�",
prop: "checkTime",
+ width: 120
+ },
+ {
+ label: "閲囪喘璁㈠崟鍙�",
+ prop: "purchaseContractNo",
width: 120
},
{
@@ -115,6 +118,10 @@
{
label: "瑙勬牸鍨嬪彿",
prop: "model",
+ },
+ {
+ label: "UID鐮�",
+ prop: "uidNO",
},
{
label: "鍗曚綅",
@@ -160,7 +167,7 @@
label: "鎿嶄綔",
align: "center",
fixed: "right",
- width: 280,
+ width: 340,
operation: [
{
name: "缂栬緫",
@@ -169,7 +176,27 @@
openForm("edit", row);
},
disabled: (row) => {
- return row.inspectState == 1;
+ // 宸叉彁浜ゅ垯绂佺敤
+ if (row.inspectState == 1) return true;
+ // 濡傛灉妫�楠屽憳鏈夊�硷紝鍙湁褰撳墠鐧诲綍鐢ㄦ埛鑳界紪杈�
+ if (row.checkName) {
+ return row.checkName !== userStore.nickName;
+ }
+ return false;
+ }
+ },
+ {
+ name: "濉啓妫�楠岃褰�",
+ type: "text",
+ clickFun: (row) => {
+ openInspectionForm("edit", row);
+ },
+ disabled: (row) => {
+ if (row.inspectState == 1) return true;
+ if (row.checkName) {
+ return row.checkName !== userStore.nickName;
+ }
+ return false;
}
},
{
@@ -186,7 +213,13 @@
submit(row.id);
},
disabled: (row) => {
- return row.inspectState == 1;
+ // 宸叉彁浜ゅ垯绂佺敤
+ if (row.inspectState == 1) return true;
+ // 濡傛灉妫�楠屽憳鏈夊�硷紝鍙湁褰撳墠鐧诲綍鐢ㄦ埛鑳芥彁浜�
+ if (row.checkName) {
+ return row.checkName !== userStore.nickName;
+ }
+ return false;
}
},
{
@@ -231,6 +264,7 @@
const filesDia = ref()
const inspectionFormDia = ref()
const {proxy} = getCurrentInstance()
+const userStore = useUserStore()
const changeDaterange = (value) => {
searchForm.value.entryDateStart = undefined;
searchForm.value.entryDateEnd = undefined;
@@ -274,6 +308,12 @@
formDia.value?.openDialog(type, row)
})
};
+// 鎵撳紑鏂板妫�楠屽脊妗�
+const openInspectionForm = (type, row) => {
+ nextTick(() => {
+ inspectionFormDia.value?.openDialog(type, row)
+ })
+};
// 鎵撳紑闄勪欢寮规
const openFilesFormDia = (type, row) => {
nextTick(() => {
--
Gitblit v1.9.3