From 7f9514f20911fbb8046ca03716c2bc9304ec2fa0 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 18 二月 2025 17:43:44 +0800
Subject: [PATCH] 1.原材料报检迁移 2.原材料下单迁移 3.同材料下单迁移

---
 src/views/standard/model/index.vue |   69 +++++++++++++++++-----------------
 1 files changed, 35 insertions(+), 34 deletions(-)

diff --git a/src/views/standard/model/index.vue b/src/views/standard/model/index.vue
index 323b197..9a366c8 100644
--- a/src/views/standard/model/index.vue
+++ b/src/views/standard/model/index.vue
@@ -21,29 +21,29 @@
       </div>
       <div class="btn">
         <el-button
-          v-if="checkPermi(['system:standard:model:add'])"
+          v-if="checkPermi(['standard:model:add'])"
           size="small"
           type="primary"
           @click="openAdd"
           >鏂板</el-button
         >
-        <el-button
-          v-if="checkPermi(['system:standard:model:copy'])"
+        <!-- <el-button
+          v-if="checkPermi(['standard:model:copy'])"
           size="small"
           @click="copyTemplate"
           >澶嶅埗妯$増</el-button
-        >
+        > -->
       </div>
     </div>
-    <div class="table">
-      <lims-table
-        :tableData="tableData"
-        :column="column"
-        :page="page"
-        :tableLoading="tableLoading"
-        :height="'calc(100% - 200px)'"
-      ></lims-table>
-    </div>
+    <lims-table
+      :tableData="tableData"
+      :column="column"
+      :page="page"
+      :tableLoading="tableLoading"
+      :height="'calc(100vh - 250px)'"
+      style="padding: 20px; padding-top: 0"
+      @pagination="pagination"
+    ></lims-table>
     <el-dialog
       :before-close="isClose"
       :close-on-click-modal="false"
@@ -109,7 +109,6 @@
   delStandardTemplate,
   getEditTemplatePreparation,
 } from "@/api/standard/model";
-import { checkPermi } from "@/utils/permission"; // 鏉冮檺鍒ゆ柇鍑芥暟
 export default {
   components: {
     Excel,
@@ -153,7 +152,7 @@
           dataType: "action",
           fixed: "right",
           label: "鎿嶄綔",
-          width: "180px",
+          width: "320px",
           operation: [
             {
               name: "缂栬緫",
@@ -164,7 +163,7 @@
                 this.isShowCopyTem = true;
               },
               showHide: (row) => {
-                return this.checkPermi(["system:standard:model:edit"]);
+                return this.checkPermi(["standard:model:edit"]);
               },
             },
             {
@@ -174,7 +173,7 @@
                 this.handleDelete(row);
               },
               showHide: (row) => {
-                return this.checkPermi(["system:standard:model:del"]);
+                return this.checkPermi(["standard:model:del"]);
               },
             },
             {
@@ -184,7 +183,7 @@
                 this.copyTemplate(row);
               },
               showHide: (row) => {
-                return this.checkPermi(["system:standard:model:copy"]);
+                return this.checkPermi(["standard:model:copy"]);
               },
             },
             {
@@ -195,8 +194,8 @@
               },
               showHide: (row) => {
                 return this.checkPermi([
-                  "system:standard:model:edit",
-                  "system:standard:model:add",
+                  "standard:model:edit",
+                  "standard:model:add",
                 ]);
               },
             },
@@ -217,26 +216,34 @@
     this.getList();
   },
   methods: {
-    checkPermi,
     getList() {
       this.tableLoading = true;
-      selectStandardTemplatePageList({ ...this.queryParams, ...this.page })
+      let param = { ...this.queryParams, ...this.page };
+      delete param.total;
+      selectStandardTemplatePageList({ ...param })
         .then((res) => {
           this.tableLoading = false;
           if (res.code === 200) {
-            this.tableData = res.data;
-            this.page.total = res.total;
+            this.tableData = res.data.records;
+            this.page.total = res.data.total;
           }
         })
         .catch((err) => {
           this.tableLoading = false;
         });
     },
+    pagination({ page, limit }) {
+      this.page.current = page;
+      this.page.size = limit;
+      this.getList();
+    },
     refreshTable(e) {
+      this.page.current = 1;
       this.getList();
     },
     refresh() {
       this.queryParams = {};
+      this.page.current = 1;
       this.getList();
     },
     openAdd() {
@@ -278,7 +285,7 @@
                 });
               break;
             case "缂栬緫":
-              params.thing = row.thing;
+              params.thing = this.copyForm.thing ? this.copyForm.thing : "";
               upStandardTemplate(params)
                 .then((res) => {
                   if (res.code == 201) return;
@@ -339,7 +346,7 @@
           return;
         }
         this.row = row;
-        this.row.thing = res.data;
+        this.row.thing = res.msg;
         this.isShow = true;
       });
     },
@@ -439,7 +446,7 @@
 }
 
 .search_label {
-  width: 110px;
+  width: 90px;
   font-size: 14px;
   text-align: right;
 }
@@ -449,13 +456,7 @@
 }
 .btn {
   position: absolute;
-  right: 20px;
+  right: 14px;
   top: 20px;
-}
-
-.table {
-  background-color: #fff;
-  padding: 10px;
-  padding-top: 0;
 }
 </style>

--
Gitblit v1.9.3