From 41cad2434411b2eac1b9814d47d06e34c291f285 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期五, 29 三月 2024 16:29:40 +0800
Subject: [PATCH] 完成首页等问题修改

---
 src/views/quality/packageinspect/index.vue |   64 ++++++++++++++++---------------
 1 files changed, 33 insertions(+), 31 deletions(-)

diff --git a/src/views/quality/packageinspect/index.vue b/src/views/quality/packageinspect/index.vue
index 9e58f4b..e6093cd 100644
--- a/src/views/quality/packageinspect/index.vue
+++ b/src/views/quality/packageinspect/index.vue
@@ -17,7 +17,7 @@
   <template>
     <div class="mod-config">
         <basic-container>
-            <ttable 
+            <ttable
             :table="table"
             :resultData="resultData"
             @handleSelectionChange="handleSelectionChange"
@@ -74,7 +74,7 @@
                 // 鏍囬
                 column: [
                     {
-                        minWidth: '150',
+                        minWidth: '180',
                         prop: 'packInsNo',
                         label: '鍖呰妫�楠岀紪鍙�',
                         isTrue: true,
@@ -83,7 +83,7 @@
                         render: { fun: this.addOrUpdateHandle }
                     },
                     {
-                        minWidth: '150',
+                        minWidth: '180',
                         prop: 'packageNo',
                         label: '鍖呰缂栫爜',
                         isTrue: true,
@@ -91,7 +91,7 @@
                         searchInfoType: 'text'
                     },
                     {
-                        minWidth: '150',
+                        minWidth: '180',
                         prop: 'contractNo',
                         label: '鍚堝悓鍙�',
                         isTrue: true,
@@ -99,7 +99,7 @@
                         searchInfoType: 'text'
                     },
                     {
-                        minWidth: '150',
+                        minWidth: '180',
                         prop: 'projectName',
                         label: '椤圭洰鍚嶇О',
                         isTrue: true,
@@ -107,7 +107,7 @@
                         searchInfoType: 'text'
                     },
                     {
-                        minWidth: '150',
+                        minWidth: '180',
                         prop: 'customerName',
                         label: '瀹㈡埛鍚嶇О',
                         isTrue: true,
@@ -115,17 +115,17 @@
                         searchInfoType: 'text'
                     },
                     {
-                        minWidth: '150',
+                        minWidth: '180',
                         prop: 'createTime',
                         label: '鎶ユ鏃ユ湡',
                         isTrue: true,
                         sort: true,
                         isSearch: true,
-                        searchInfoType: 'text',
+                        searchInfoType: 'date',
                         formatter: this.formatDateTime,
                     },
                     {
-                        minWidth: '150',
+                        minWidth: '180',
                         prop: 'createUser',
                         label: '鎶ユ浜�',
                         isTrue: true,
@@ -133,32 +133,21 @@
                         searchInfoType: 'text'
                     },
                     {
-                        minWidth: '150',
+                        minWidth: '200',
                         prop: 'result',
                         label: '缁撹',
                         isTrue: true,
                         isSearch: true,
+                        searchInfoType: 'text'
                     },
                 ],
-                toolbar: [
-                    // {
-                    //     text: '鏂板',
-                    //     type: 'primary',
-                    //     fun: this.addOrUpdateHandle
-                    // },
-                ],
-                operator: [
-                {
-                    text: '浣滃簾',
-                    type: 'text',
-                    size: 'small',
-                    fun: this.deleteHandle
-                }],
+                toolbar: [],
+                operator: null,
                 operatorConfig: {
                 fixed: 'right',
                 label: '鎿嶄綔',
-                width: 120,
-                minWidth: 120
+                width: 100,
+                minWidth: 100
                 },
             },
         }
@@ -166,7 +155,16 @@
     components: {
         ttable,
     },
-    created() { },
+    created() {
+        if(this.permissions.quality_packageinspect_del){
+            this.table.operator = [{
+                    text: '浣滃簾',
+                    type: 'text',
+                    size: 'small',
+                    fun: this.deleteHandle
+                }]
+        }
+     },
     computed: {
         ...mapGetters(['permissions'])
     },
@@ -198,11 +196,16 @@
         },
         // 鏂板 / 淇敼
         addOrUpdateHandle(row) {
+            if(!this.permissions.quality_packageinspect_edit && row.id!=null){
+                this.$message.error("璇ヨ鑹叉病鏈夋搷浣滄潈闄�")
+                return
+            }
             this.$router.push({
                 name: 'packageInspectForm',
-                query: { 
-                    id: row == null ? null : row.id,
-                 }
+                query: {
+                    id: row == null ? null : row.id
+                 },
+                 params:{resultVal : row.result=='' ? null : row.result}
             })
         },
         formatResult(row, column, cellValue){
@@ -226,4 +229,3 @@
     }
   }
   </script>
-  
\ No newline at end of file

--
Gitblit v1.9.3