From a42d42855381c77db37306bd40507c043213c7d7 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期二, 03 二月 2026 11:46:12 +0800
Subject: [PATCH] Merge branch 'dev_New' of http://114.132.189.42:9002/r/product-inventory-management into dev_New

---
 src/views/index.vue                                                  |   10 
 src/views/collaborativeApproval/rulesRegulationsManagement/index.vue |  111 +++++++--------
 src/views/qualityManagement/finalInspection/components/formDia.vue   |  123 ++++++++++------
 src/views/productionManagement/productionOrder/index.vue             |    3 
 src/views/salesManagement/salesLedger/index.vue                      |    3 
 src/views/collaborativeApproval/knowledgeBase/index.vue              |   16 ++
 src/views/safeProduction/dangerInvestigation/index.vue               |   10 
 src/views/collaborativeApproval/sealManagement/index.vue             |  100 ++++++++------
 8 files changed, 209 insertions(+), 167 deletions(-)

diff --git a/src/views/collaborativeApproval/knowledgeBase/index.vue b/src/views/collaborativeApproval/knowledgeBase/index.vue
index f7a1ef3..bdaf0b4 100644
--- a/src/views/collaborativeApproval/knowledgeBase/index.vue
+++ b/src/views/collaborativeApproval/knowledgeBase/index.vue
@@ -425,8 +425,15 @@
   listKnowledgeBase({...page.value, ...searchForm.value})
   .then(res => {
     tableLoading.value = false;
-    tableData.value = res.data.records
     page.value.total = res.data.total;
+    // 濡傛灉褰撳墠椤垫暟瓒呰繃鎬婚〉鏁帮紝閲嶇疆鍒扮1椤靛苟閲嶆柊鏌ヨ
+    const maxPage = Math.ceil(res.data.total / page.value.size) || 1;
+    if (page.value.current > maxPage && maxPage > 0) {
+      page.value.current = 1;
+      // 閲嶆柊鏌ヨ绗�1椤垫暟鎹�
+      return getList();
+    }
+    tableData.value = res.data.records;
   }).catch(err => {
     tableLoading.value = false;
   })
@@ -434,9 +441,14 @@
 
 // 鍒嗛〉澶勭悊
 const pagination = (obj) => {
+  const oldSize = page.value.size;
   page.value.current = obj.page;
   page.value.size = obj.limit;
-  handleQuery();
+  // 濡傛灉 size 鏀瑰彉浜嗭紝閲嶇疆鍒扮1椤碉紝閬垮厤褰撳墠椤佃秴鍑鸿寖鍥�
+  if (oldSize !== obj.limit) {
+    page.value.current = 1;
+  }
+  getList();
 };
 
 // 閫夋嫨鍙樺寲澶勭悊
diff --git a/src/views/collaborativeApproval/rulesRegulationsManagement/index.vue b/src/views/collaborativeApproval/rulesRegulationsManagement/index.vue
index 6c3004d..ba8e46d 100644
--- a/src/views/collaborativeApproval/rulesRegulationsManagement/index.vue
+++ b/src/views/collaborativeApproval/rulesRegulationsManagement/index.vue
@@ -42,68 +42,15 @@
             </el-button>
           </el-col>
         </el-row>
-        <el-table :data="regulations"
-                  border
-                  v-loading="tableLoading"
-                  style="width: 100%">
-          <el-table-column prop="regulationNum"
-                           label="鍒跺害缂栧彿"
-                           width="120" />
-          <el-table-column prop="title"
-                           label="鍒跺害鏍囬"
-                           min-width="150" />
-          <el-table-column prop="category"
-                           label="鍒嗙被"
-                           width="120">
-            <template #default="scope">
-              <el-tag>{{ getCategoryText(scope.row.category) }}</el-tag>
-            </template>
-          </el-table-column>
-          <el-table-column prop="version"
-                           label="鐗堟湰"
-                           width="120" />
-          <el-table-column prop="createUserName"
-                           label="鍙戝竷浜�"
-                           width="120" />
-          <el-table-column prop="createTime"
-                           label="鍙戝竷鏃堕棿"
-                           width="180" />
-          <el-table-column prop="status"
-                           label="鐘舵��"
-                           width="100">
-            <template #default="scope">
-              <el-tag :type="scope.row.status === 'active' ? 'success' : 'info'">
-                {{ scope.row.status === 'active' ? '鐢熸晥涓�' : '宸插簾姝�' }}
-              </el-tag>
-            </template>
-          </el-table-column>
-          <el-table-column prop="readCount"
-                           label="宸茶浜烘暟"
-                           width="100" />
-          <el-table-column label="鎿嶄綔"
-                           width="320"
-                           fixed="right">
-            <template #default="scope">
-              <el-button link
-                         @click="viewRegulation(scope.row)">鏌ョ湅</el-button>
-              <el-button link
-                         type="primary"
-                         @click="handleEdit(scope.row)">缂栬緫</el-button>
-              <el-button link
-                         type="danger"
-                         @click="repealEdit(scope.row)">搴熷純</el-button>
-              <el-button link
-                         type="success"
-                         @click="viewVersionHistory(scope.row)">鐗堟湰鍘嗗彶</el-button>
-              <!-- <el-button link type="warning" @click="viewReadStatus(scope.row)">闃呰鐘舵��</el-button> -->
-              <el-button link
-                         type="primary"
-                         @click="openFileDialog(scope.row)">闄勪欢</el-button>
-            </template>
-          </el-table-column>
-        </el-table>
-        <pagination v-show="page.total > 0" :total="page.total" layout="total, sizes, prev, pager, next, jumper"
-                    :page="page.current" :limit="page.size" @pagination="paginationChange" />
+        <PIMTable
+          rowKey="id"
+          :column="regulationTableColumn"
+          :tableData="regulations"
+          :tableLoading="tableLoading"
+          :page="page"
+          :isShowPagination="true"
+          @pagination="paginationChange"
+        />
       </div>
     </el-card>
     <!-- 鐢ㄥ嵃鐢宠瀵硅瘽妗嗭紙宸茬Щ闄わ級 -->
@@ -295,6 +242,7 @@
     delRuleFile,
     addRuleFile,
   } from "@/api/collaborativeApproval/rulesRegulationsManagementFile.js";
+  import PIMTable from "@/components/PIMTable/PIMTable.vue";
 
   // 鍝嶅簲寮忔暟鎹�
   const operationType = ref("add");
@@ -363,6 +311,45 @@
 
   const regulations = ref([]);
 
+  // 琛ㄦ牸鍒楅厤缃�
+  const regulationTableColumn = ref([
+    { label: "鍒跺害缂栧彿", prop: "regulationNum"},
+    { label: "鍒跺害鏍囬", prop: "title" },
+    {
+      label: "鍒嗙被",
+      prop: "category",
+      dataType: "tag",
+      formatData: (v) => getCategoryText(v),
+      formatType: () => "info",
+    },
+    { label: "鐗堟湰", prop: "version", width: 120 },
+    { label: "鍙戝竷浜�", prop: "createUserName", width: 120 },
+    { label: "鍙戝竷鏃堕棿", prop: "createTime", width: 180 },
+    {
+      label: "鐘舵��",
+      prop: "status",
+      width: 100,
+      dataType: "tag",
+      formatData: (v) => (v === "active" ? "鐢熸晥涓�" : "宸插簾姝�"),
+      formatType: (v) => (v === "active" ? "success" : "info"),
+    },
+    { label: "宸茶浜烘暟", prop: "readCount", width: 100 },
+    {
+      dataType: "action",
+      label: "鎿嶄綔",
+      width: 320,
+      fixed: "right",
+      align: "center",
+      operation: [
+        { name: "鏌ョ湅", clickFun: (row) => viewRegulation(row) },
+        { name: "缂栬緫", clickFun: (row) => handleEdit(row) },
+        { name: "搴熷純", clickFun: (row) => repealEdit(row) },
+        { name: "鐗堟湰鍘嗗彶", clickFun: (row) => viewVersionHistory(row) },
+        { name: "闄勪欢", clickFun: (row) => openFileDialog(row) },
+      ],
+    },
+  ]);
+
   const versionHistory = ref([]);
 
   const readStatusList = ref([]);
diff --git a/src/views/collaborativeApproval/sealManagement/index.vue b/src/views/collaborativeApproval/sealManagement/index.vue
index f3599f7..b4a1886 100644
--- a/src/views/collaborativeApproval/sealManagement/index.vue
+++ b/src/views/collaborativeApproval/sealManagement/index.vue
@@ -36,48 +36,15 @@
               </el-col>
             </el-row>
 
-            <el-table :data="sealApplications" border v-loading="tableLoading" style="width: 100%">
-              <el-table-column prop="applicationNum" label="鐢宠缂栧彿" width="120" />
-              <el-table-column prop="title" label="鐢宠鏍囬" min-width="200" />
-              <el-table-column prop="createUserName" label="鐢宠浜�" width="120" />
-              <el-table-column prop="department" label="鎵�灞為儴闂�" width="150" />
-              <el-table-column prop="sealType" label="鐢ㄥ嵃绫诲瀷" width="120">
-                <template #default="scope">
-                  {{ getSealTypeText(scope.row.sealType) }}
-                </template>
-              </el-table-column>
-              <el-table-column prop="createTime" label="鐢宠鏃堕棿" width="180" />
-              <el-table-column prop="status" label="鐘舵��" width="100">
-                <template #default="scope">
-                  <el-tag :type="getStatusType(scope.row.status)">
-                    {{ getStatusText(scope.row.status) }}
-                  </el-tag>
-                </template>
-              </el-table-column>
-              <el-table-column label="鎿嶄綔" width="200" fixed="right">
-                <template #default="scope">
-                  <el-button link @click="viewSealDetail(scope.row)">鏌ョ湅</el-button>
-                  <el-button 
-                    v-if="scope.row.status === 'pending'"
-										link
-                    type="primary" 
-                    @click="approveSeal(scope.row)"
-                  >
-                    瀹℃壒
-                  </el-button>
-                  <el-button 
-                    v-if="scope.row.status === 'pending'"
-										link
-                    type="danger" 
-                    @click="rejectSeal(scope.row)"
-                  >
-                    鎷掔粷
-                  </el-button>
-                </template>
-              </el-table-column>
-            </el-table>
-					<pagination v-show="page.total > 0" :total="page.total" layout="total, sizes, prev, pager, next, jumper"
-											:page="page.current" :limit="page.size" @pagination="paginationChange" />
+            <PIMTable
+              rowKey="id"
+              :column="sealTableColumn"
+              :tableData="sealApplications"
+              :tableLoading="tableLoading"
+              :page="page"
+              :isShowPagination="true"
+              @pagination="paginationChange"
+            />
         </div> 
     </el-card>
 
@@ -294,6 +261,7 @@
 import { userLoginFacotryList } from "@/api/system/user.js"
 import {staffOnJobListPage} from "@/api/personnelManagement/staffOnJob.js"
 import FormDialog from '@/components/Dialog/FormDialog.vue'
+import PIMTable from '@/components/PIMTable/PIMTable.vue'
 
 // 鍝嶅簲寮忔暟鎹�
 const currentUser = ref(null)
@@ -335,7 +303,7 @@
 // 鍒嗛〉鍙傛暟
 const page = reactive({
   current: 1,
-  size: 100,
+  size: 10,
   total: 0
 })
 // 瑙勭珷鍒跺害鐩稿叧
@@ -418,10 +386,56 @@
     official: '鍏珷',
     contract: '鍚堝悓涓撶敤绔�',
     finance: '璐㈠姟涓撶敤绔�',
+    legal: '娉曚汉绔�',
     tegal: '鎶�鏈笓鐢ㄧ珷'
   }
   return sealTypeMap[sealType] || '鏈煡'
 }
+
+// 鐢ㄥ嵃鐢宠琛ㄦ牸鍒楅厤缃紙闇�鍦� getStatusText/getSealTypeText 绛変箣鍚庡畾涔夛級
+const sealTableColumn = ref([
+  { label: '鐢宠缂栧彿', prop: 'applicationNum',},
+  { label: '鐢宠鏍囬', prop: 'title', showOverflowTooltip: true },
+  { label: '鐢宠浜�', prop: 'createUserName', },
+  { label: '鎵�灞為儴闂�', prop: 'department', width: 150 },
+  {
+    label: '鐢ㄥ嵃绫诲瀷',
+    prop: 'sealType',
+    dataType: 'tag',
+    formatData: (v) => getSealTypeText(v),
+    formatType: () => 'info'
+  },
+  { label: '鐢宠鏃堕棿', prop: 'createTime', width: 180 },
+  {
+    label: '鐘舵��',
+    prop: 'status',
+    width: 100,
+    dataType: 'tag',
+    formatData: (v) => getStatusText(v),
+    formatType: (v) => getStatusType(v)
+  },
+  {
+    dataType: 'action',
+    label: '鎿嶄綔',
+    width: 200,
+    fixed: 'right',
+    align: 'center',
+    operation: [
+      { name: '鏌ョ湅', clickFun: (row) => viewSealDetail(row) },
+      {
+        name: '瀹℃壒',
+        clickFun: (row) => approveSeal(row),
+        showHide: (row) => row.status === 'pending'
+      },
+      {
+        name: '鎷掔粷',
+        clickFun: (row) => rejectSeal(row),
+        showHide: (row) => row.status === 'pending'
+      }
+    ]
+  }
+])
+
 // 鍒跺害鍒嗙被
 const getCategoryText = (category) => {
   const categoryMap = {
diff --git a/src/views/index.vue b/src/views/index.vue
index 2888b16..401f30a 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -118,11 +118,11 @@
 			<div class="main-panel">
 				<div style="display: flex;justify-content: space-between;">
 					<div class="section-title">搴旀敹搴斾粯缁熻</div>
-					<el-radio-group v-model="radio1" size="large" @change="statisticsReceivable">
-						<el-radio-button label="鎸夊懆" :value="1" />
-						<el-radio-button label="鎸夋湀" :value="2" />
-						<el-radio-button label="鎸夊搴�" :value="3" />
-					</el-radio-group>
+<!--					<el-radio-group v-model="radio1" size="large" @change="statisticsReceivable">-->
+<!--						<el-radio-button label="鎸夊懆" :value="1" />-->
+<!--						<el-radio-button label="鎸夋湀" :value="2" />-->
+<!--						<el-radio-button label="鎸夊搴�" :value="3" />-->
+<!--					</el-radio-group>-->
 				</div>
 				<Echarts ref="chart"
 								 :color="barColors2"
diff --git a/src/views/productionManagement/productionOrder/index.vue b/src/views/productionManagement/productionOrder/index.vue
index ece5ca6..9a4620f 100644
--- a/src/views/productionManagement/productionOrder/index.vue
+++ b/src/views/productionManagement/productionOrder/index.vue
@@ -239,8 +239,9 @@
 
   // 娣诲姞琛ㄨ绫诲悕鏂规硶
   const tableRowClassName = ({ row }) => {
-    const diff = row.deliveryDaysDiff;
+    if (row.isFh) return '';
 
+    const diff = row.deliveryDaysDiff;
     if (diff === 15) {
       return 'yellow';
     } else if (diff === 10) {
diff --git a/src/views/qualityManagement/finalInspection/components/formDia.vue b/src/views/qualityManagement/finalInspection/components/formDia.vue
index 8dfd3ba..6a3e774 100644
--- a/src/views/qualityManagement/finalInspection/components/formDia.vue
+++ b/src/views/qualityManagement/finalInspection/components/formDia.vue
@@ -201,64 +201,91 @@
 const openDialog = async (type, row) => {
   operationType.value = type;
   dialogFormVisible.value = true;
-  getOptions().then((res) => {
-    supplierList.value = res.data;
-  });
-	let userLists = await userListNoPage();
-	userList.value = userLists.data;
-	form.value = {}
+  // 鍏堟竻绌鸿〃鍗曢獙璇佺姸鎬侊紝閬垮厤闂儊
+  await nextTick();
+  proxy.$refs.formRef?.clearValidate();
+  
+  // 骞惰鍔犺浇鍩虹鏁版嵁
+  const [userListsRes] = await Promise.all([
+    userListNoPage(),
+    getProductOptions(),
+    getOptions().then((res) => {
+      supplierList.value = res.data;
+    })
+  ]);
+  userList.value = userListsRes.data;
+  
+  form.value = {}
   testStandardOptions.value = [];
   tableData.value = [];
-  getProductOptions();
+  
   if (operationType.value === 'edit') {
     // 鍏堜繚瀛� testStandardId锛岄伩鍏嶈娓呯┖
     const savedTestStandardId = row.testStandardId;
     // 鍏堣缃〃鍗曟暟鎹紝浣嗘殏鏃舵竻绌� testStandardId锛岀瓑閫夐」鍔犺浇瀹屾垚鍚庡啀璁剧疆
     form.value = {...row, testStandardId: ''}
-		currentProductId.value = row.productId || 0
-		// 缂栬緫妯″紡涓嬶紝鍏堝姞杞芥寚鏍囬�夐」锛岀劧鍚庡姞杞藉弬鏁板垪琛�
-		if (currentProductId.value) {
-			// 鍏堝姞杞芥寚鏍囬�夐」
-			let params = {
-				productId: currentProductId.value,
-				inspectType: 2
-			}
-			qualityInspectDetailByProductId(params).then(res => {
-				testStandardOptions.value = res.data || [];
-				// 浣跨敤 nextTick 鍜� setTimeout 纭繚閫夐」宸茬粡娓叉煋鍒� DOM
-				nextTick(() => {
-					setTimeout(() => {
-						// 濡傛灉缂栬緫鏁版嵁涓湁 testStandardId锛屽垯璁剧疆骞跺姞杞藉搴旂殑鍙傛暟
-						if (savedTestStandardId) {
-							// 纭繚绫诲瀷鍖归厤锛坕tem.id 鍙兘鏄暟瀛楁垨瀛楃涓诧級
-							const matchedOption = testStandardOptions.value.find(item => 
-								item.id == savedTestStandardId || String(item.id) === String(savedTestStandardId)
-							);
-							if (matchedOption) {
-								// 纭繚浣跨敤鍖归厤椤圭殑 id锛堜繚鎸佺被鍨嬩竴鑷达級
-								form.value.testStandardId = matchedOption.id;
-								// 缂栬緫鍦烘櫙淇濈暀宸叉湁妫�楠屽�硷紝鐩存帴鎷夊彇鍘熷弬鏁版暟鎹�
-								getQualityInspectParamList(row.id);
-							} else {
-								// 濡傛灉鎵句笉鍒板尮閰嶉」锛屽皾璇曠洿鎺ヤ娇鐢ㄥ師鍊�
-								console.warn('鏈壘鍒板尮閰嶇殑鎸囨爣閫夐」锛宼estStandardId:', savedTestStandardId, '鍙敤閫夐」:', testStandardOptions.value);
-								form.value.testStandardId = savedTestStandardId;
-								getQualityInspectParamList(row.id);
-							}
-						} else {
-							// 鍚﹀垯浣跨敤鏃х殑閫昏緫
-							getQualityInspectParamList(row.id);
-						}
-					}, 100);
-				});
-			});
-		} else {
-			getQualityInspectParamList(row.id);
-		}
+    currentProductId.value = row.productId || 0
+    // 娓呯┖楠岃瘉鐘舵�侊紝閬垮厤鏁版嵁鍔犺浇杩囩▼涓殑鏍¢獙闂儊
+    nextTick(() => {
+      proxy.$refs.formRef?.clearValidate();
+    });
+    
+    // 缂栬緫妯″紡涓嬶紝骞惰鍔犺浇瑙勬牸鍨嬪彿鍜屾寚鏍囬�夐」
+    if (currentProductId.value) {
+      // 璁剧疆浜у搧鍚嶇О
+      form.value.productName = findNodeById(productOptions.value, currentProductId.value);
+      
+      // 骞惰鍔犺浇瑙勬牸鍨嬪彿鍜屾寚鏍囬�夐」
+      const params = {
+        productId: currentProductId.value,
+        inspectType: 2
+      };
+      
+      Promise.all([
+        modelList({ id: currentProductId.value }),
+        qualityInspectDetailByProductId(params)
+      ]).then(([modelRes, testStandardRes]) => {
+        // 璁剧疆瑙勬牸鍨嬪彿閫夐」
+        modelOptions.value = modelRes || [];
+        // 濡傛灉琛ㄥ崟涓凡鏈� productModelId锛岃缃搴旂殑 model 鍜� unit
+        if (form.value.productModelId && modelOptions.value.length > 0) {
+          const selectedModel = modelOptions.value.find(item => item.id == form.value.productModelId);
+          if (selectedModel) {
+            form.value.model = selectedModel.model || '';
+            form.value.unit = selectedModel.unit || '';
+          }
+        }
+        
+        // 璁剧疆鎸囨爣閫夐」
+        testStandardOptions.value = testStandardRes.data || [];
+        
+        // 璁剧疆 testStandardId 骞跺姞杞藉弬鏁板垪琛�
+        nextTick(() => {
+          if (savedTestStandardId) {
+            // 纭繚绫诲瀷鍖归厤锛坕tem.id 鍙兘鏄暟瀛楁垨瀛楃涓诧級
+            const matchedOption = testStandardOptions.value.find(item => 
+              item.id == savedTestStandardId || String(item.id) === String(savedTestStandardId)
+            );
+            if (matchedOption) {
+              // 纭繚浣跨敤鍖归厤椤圭殑 id锛堜繚鎸佺被鍨嬩竴鑷达級
+              form.value.testStandardId = matchedOption.id;
+            } else {
+              // 濡傛灉鎵句笉鍒板尮閰嶉」锛屽皾璇曠洿鎺ヤ娇鐢ㄥ師鍊�
+              console.warn('鏈壘鍒板尮閰嶇殑鎸囨爣閫夐」锛宼estStandardId:', savedTestStandardId, '鍙敤閫夐」:', testStandardOptions.value);
+              form.value.testStandardId = savedTestStandardId;
+            }
+          }
+          // 缂栬緫鍦烘櫙淇濈暀宸叉湁妫�楠屽�硷紝鐩存帴鎷夊彇鍘熷弬鏁版暟鎹�
+          getQualityInspectParamList(row.id);
+        });
+      });
+    } else {
+      getQualityInspectParamList(row.id);
+    }
   }
 }
 const getProductOptions = () => {
-  productTreeList().then((res) => {
+  return productTreeList().then((res) => {
     productOptions.value = convertIdToValue(res);
   });
 };
diff --git a/src/views/safeProduction/dangerInvestigation/index.vue b/src/views/safeProduction/dangerInvestigation/index.vue
index 90093fa..49965e9 100644
--- a/src/views/safeProduction/dangerInvestigation/index.vue
+++ b/src/views/safeProduction/dangerInvestigation/index.vue
@@ -111,13 +111,13 @@
         </el-table-column>
         <el-table-column fixed="right"
                          label="鎿嶄綔"
-                         min-width="250"
+                         min-width="150"
                          align="center">
           <template #default="scope">
-            <el-button link
+            <!-- <el-button link
                        type="primary"
                        size="small"
-                       @click="openForm('edit', scope.row)">缂栬緫</el-button>
+                       @click="openForm('edit', scope.row)">缂栬緫</el-button> -->
             <el-button link
                        type="primary"
                        size="small"
@@ -125,12 +125,12 @@
             <el-button link
                        type="primary"
                        size="small"
-                       :disabled="scope.row.isRectify"
+                       :disabled="scope.row.isRectify || scope.row.rectifyActualTime"
                        @click="openForm('edit2', scope.row)">鏁存敼</el-button>
             <el-button link
                        type="primary"
                        size="small"
-                       :disabled="!scope.row.rectifyActualTime"
+                       :disabled="!scope.row.rectifyActualTime || scope.row.verifyTime"
                        @click="openForm('edit3', scope.row)">楠屾敹</el-button>
           </template>
         </el-table-column>
diff --git a/src/views/salesManagement/salesLedger/index.vue b/src/views/salesManagement/salesLedger/index.vue
index 5cf762c..8b7b17c 100644
--- a/src/views/salesManagement/salesLedger/index.vue
+++ b/src/views/salesManagement/salesLedger/index.vue
@@ -1004,8 +1004,9 @@
 
 // 娣诲姞琛ㄨ绫诲悕鏂规硶
 const tableRowClassName = ({ row }) => {
-  const diff = row.deliveryDaysDiff;
+  if (row.isFh) return '';
 
+  const diff = row.deliveryDaysDiff;
   if (diff === 15) {
     return 'yellow';
   } else if (diff === 10) {

--
Gitblit v1.9.3