From f54d7fe89cf6b9143b468a7cc192f13a4c9cec22 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 03 二月 2026 10:42:21 +0800
Subject: [PATCH] 进销存升级 1.生产报工带出来的出厂检数据编辑时,规格型号回显还是有问题 2.用印管理分页数字展示有误

---
 src/views/collaborativeApproval/rulesRegulationsManagement/index.vue |  118 ++++++++++++++++++++++++++++-------------------------------
 1 files changed, 56 insertions(+), 62 deletions(-)

diff --git a/src/views/collaborativeApproval/rulesRegulationsManagement/index.vue b/src/views/collaborativeApproval/rulesRegulationsManagement/index.vue
index edf19ab..ba8e46d 100644
--- a/src/views/collaborativeApproval/rulesRegulationsManagement/index.vue
+++ b/src/views/collaborativeApproval/rulesRegulationsManagement/index.vue
@@ -42,66 +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>
+        <PIMTable
+          rowKey="id"
+          :column="regulationTableColumn"
+          :tableData="regulations"
+          :tableLoading="tableLoading"
+          :page="page"
+          :isShowPagination="true"
+          @pagination="paginationChange"
+        />
       </div>
     </el-card>
     <!-- 鐢ㄥ嵃鐢宠瀵硅瘽妗嗭紙宸茬Щ闄わ級 -->
@@ -293,6 +242,7 @@
     delRuleFile,
     addRuleFile,
   } from "@/api/collaborativeApproval/rulesRegulationsManagementFile.js";
+  import PIMTable from "@/components/PIMTable/PIMTable.vue";
 
   // 鍝嶅簲寮忔暟鎹�
   const operationType = ref("add");
@@ -360,6 +310,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([]);
 
@@ -642,14 +631,19 @@
         regulations.value = res.data.records;
         // 杩囨护鎺夊凡搴熷純鐨勫埗搴�
         // regulations.value = res.data.records.filter(item => item.status !== 'repealed')
-        page.value.total = res.data.total;
+        page.total = res.data.total;
         tableLoading.value = false;
       })
       .catch(err => {
         tableLoading.value = false;
       });
   };
-
+  // 鍒嗛〉鍙樺寲澶勭悊
+  const paginationChange = (obj) => {
+    page.current = obj.page;
+    page.size = obj.limit;
+    getRegulationList();
+  };
   onMounted(() => {
     // 鍒濆鍖�
     getRegulationList();

--
Gitblit v1.9.3