From 70551b35cac6dd0262f644cb248ba1d03ff2fa08 Mon Sep 17 00:00:00 2001
From: buhuazhen <hua100783@gmail.com>
Date: 星期五, 22 五月 2026 14:53:10 +0800
Subject: [PATCH]   feat: 质量管理检验员筛选和传递优化   1. 检验员下拉框筛选:过程检验、出厂检验、原材料检验的检验员下拉框只显示 roleIds 包含 106 的用户,包括列表页的"检验"弹窗、"分配检验员"弹窗,以及新增/编辑弹窗     2. 检验员默认值优化:点击"检验"按钮时检验员默认为当前登录用户;选择"不合格"打开详情页时检验员从上个页面带入,修复 closeQuickCheck() 重置表单导致检验员值丢失的问题   3. 材料信息新增行修复:生产工单绑定工艺路线弹窗中,新增材料行时根据 productById 是否有值判断显示选择器还是文本

---
 src/views/tool/gen/editTable.vue |   92 +++++++++++++++++++++++----------------------
 1 files changed, 47 insertions(+), 45 deletions(-)

diff --git a/src/views/tool/gen/editTable.vue b/src/views/tool/gen/editTable.vue
index 74304df..874fc94 100644
--- a/src/views/tool/gen/editTable.vue
+++ b/src/views/tool/gen/editTable.vue
@@ -45,22 +45,22 @@
 
           <el-table-column label="鎻掑叆" min-width="5%">
             <template #default="scope">
-              <el-checkbox true-label="1" v-model="scope.row.isInsert"></el-checkbox>
+              <el-checkbox true-label="1" false-label="0" v-model="scope.row.isInsert"></el-checkbox>
             </template>
           </el-table-column>
           <el-table-column label="缂栬緫" min-width="5%">
             <template #default="scope">
-              <el-checkbox true-label="1" v-model="scope.row.isEdit"></el-checkbox>
+              <el-checkbox true-label="1" false-label="0" v-model="scope.row.isEdit"></el-checkbox>
             </template>
           </el-table-column>
           <el-table-column label="鍒楄〃" min-width="5%">
             <template #default="scope">
-              <el-checkbox true-label="1" v-model="scope.row.isList"></el-checkbox>
+              <el-checkbox true-label="1" false-label="0" v-model="scope.row.isList"></el-checkbox>
             </template>
           </el-table-column>
           <el-table-column label="鏌ヨ" min-width="5%">
             <template #default="scope">
-              <el-checkbox true-label="1" v-model="scope.row.isQuery"></el-checkbox>
+              <el-checkbox true-label="1" false-label="0" v-model="scope.row.isQuery"></el-checkbox>
             </template>
           </el-table-column>
           <el-table-column label="鏌ヨ鏂瑰紡" min-width="10%">
@@ -79,7 +79,7 @@
           </el-table-column>
           <el-table-column label="蹇呭~" min-width="5%">
             <template #default="scope">
-              <el-checkbox true-label="1" v-model="scope.row.isRequired"></el-checkbox>
+              <el-checkbox true-label="1" false-label="0" v-model="scope.row.isRequired"></el-checkbox>
             </template>
           </el-table-column>
           <el-table-column label="鏄剧ず绫诲瀷" min-width="12%">
@@ -127,72 +127,74 @@
 </template>
 
 <script setup name="GenEdit">
-import { getGenTable, updateGenTable } from "@/api/tool/gen";
-import { optionselect as getDictOptionselect } from "@/api/system/dict/type";
-import basicInfoForm from "./basicInfoForm";
-import genInfoForm from "./genInfoForm";
+import { getGenTable, updateGenTable } from "@/api/tool/gen"
+import { optionselect as getDictOptionselect } from "@/api/system/dict/type"
+import basicInfoForm from "./basicInfoForm"
+import genInfoForm from "./genInfoForm"
 
-const route = useRoute();
-const { proxy } = getCurrentInstance();
+const route = useRoute()
+const { proxy } = getCurrentInstance()
 
-const activeName = ref("columnInfo");
-const tableHeight = ref(document.documentElement.scrollHeight - 245 + "px");
-const tables = ref([]);
-const columns = ref([]);
-const dictOptions = ref([]);
-const info = ref({});
+const activeName = ref("columnInfo")
+const tableHeight = ref(document.documentElement.scrollHeight - 245 + "px")
+const tables = ref([])
+const columns = ref([])
+const dictOptions = ref([])
+const info = ref({})
 
 /** 鎻愪氦鎸夐挳 */
 function submitForm() {
-  const basicForm = proxy.$refs.basicInfo.$refs.basicInfoForm;
-  const genForm = proxy.$refs.genInfo.$refs.genInfoForm;
+  const basicForm = proxy.$refs.basicInfo.$refs.basicInfoForm
+  const genForm = proxy.$refs.genInfo.$refs.genInfoForm
   Promise.all([basicForm, genForm].map(getFormPromise)).then(res => {
-    const validateResult = res.every(item => !!item);
+    const validateResult = res.every(item => !!item)
     if (validateResult) {
-      const genTable = Object.assign({}, basicForm.model, genForm.model);
-      genTable.columns = columns.value;
+      const genTable = Object.assign({}, info.value)
+      genTable.columns = columns.value
       genTable.params = {
-        treeCode: genTable.treeCode,
-        treeName: genTable.treeName,
-        treeParentCode: genTable.treeParentCode,
-        parentMenuId: genTable.parentMenuId
-      };
+        treeCode: info.value.treeCode,
+        treeName: info.value.treeName,
+        treeParentCode: info.value.treeParentCode,
+        parentMenuId: info.value.parentMenuId
+      }
       updateGenTable(genTable).then(res => {
-        proxy.$modal.msgSuccess(res.msg);
+        proxy.$modal.msgSuccess(res.msg)
         if (res.code === 200) {
-          close();
+          close()
         }
-      });
+      })
     } else {
-      proxy.$modal.msgError("琛ㄥ崟鏍¢獙鏈�氳繃锛岃閲嶆柊妫�鏌ユ彁浜ゅ唴瀹�");
+      proxy.$modal.msgError("琛ㄥ崟鏍¢獙鏈�氳繃锛岃閲嶆柊妫�鏌ユ彁浜ゅ唴瀹�")
     }
-  });
+  })
 }
+
 function getFormPromise(form) {
   return new Promise(resolve => {
     form.validate(res => {
-      resolve(res);
-    });
-  });
+      resolve(res)
+    })
+  })
 }
+
 function close() {
-  const obj = { path: "/tool/gen", query: { t: Date.now(), pageNum: route.query.pageNum } };
-  proxy.$tab.closeOpenPage(obj);
+  const obj = { path: "/tool/gen", query: { t: Date.now(), pageNum: route.query.pageNum } }
+  proxy.$tab.closeOpenPage(obj)
 }
 
 (() => {
-  const tableId = route.params && route.params.tableId;
+  const tableId = route.params && route.params.tableId
   if (tableId) {
     // 鑾峰彇琛ㄨ缁嗕俊鎭�
     getGenTable(tableId).then(res => {
-      columns.value = res.data.rows;
-      info.value = res.data.info;
-      tables.value = res.data.tables;
-    });
+      columns.value = res.data.rows
+      info.value = res.data.info
+      tables.value = res.data.tables
+    })
     /** 鏌ヨ瀛楀吀涓嬫媺鍒楄〃 */
     getDictOptionselect().then(response => {
-      dictOptions.value = response.data;
-    });
+      dictOptions.value = response.data
+    })
   }
-})();
+})()
 </script>

--
Gitblit v1.9.3