From 8aaf0180a50a92c1876c35ff53336a1a46532baa Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期二, 16 四月 2024 18:10:04 +0800
Subject: [PATCH] 优化页面

---
 src/components/view/b1-report-preparation.vue |   61 +++++++++++++++++++++++++++---
 1 files changed, 55 insertions(+), 6 deletions(-)

diff --git a/src/components/view/b1-report-preparation.vue b/src/components/view/b1-report-preparation.vue
index b3a289a..793fe08 100644
--- a/src/components/view/b1-report-preparation.vue
+++ b/src/components/view/b1-report-preparation.vue
@@ -217,7 +217,7 @@
             type: 'text',
             method: 'handleSubmit',
             disabFun: (row, index) => {
-              return row.isExamine != null
+              return row.state != 0
             }
           }, {
             id: 'handleIssued',
@@ -225,7 +225,7 @@
             type: 'text',
             method: 'handleIssued',
             disabFun: (row, index) => {
-              return row.isExamine != null
+              return row.state == null||row.state == 0 ||row.isExamine == 1
             }
           }, {
             id: 'handleApprove',
@@ -233,7 +233,7 @@
             type: 'text',
             method: 'handleApprove',
             disabFun: (row, index) => {
-              return row.isRatify != null
+              return row.state == null||row.state == 0||row.isExamine == 0||row.isExamine == null ||row.isRatify==1
             }
           }],
           linkEvent: {
@@ -262,6 +262,17 @@
                 value: 1,
                 type: 'success',
                 label: '閫氳繃'
+              }]
+            },
+            state: {
+              select: [{
+                value: 0,
+                type: 'danger',
+                label: '寰呮彁浜�'
+              }, {
+                value: 1,
+                type: 'success',
+                label: '宸叉彁浜�'
               }]
             }
           },
@@ -351,7 +362,7 @@
         let edit = false
         let up = false
         let res = false
-        let sub = true
+        let sub = false
         let issued = true
         let approve = true
         for (var i = 0; i < power.length; i++) {
@@ -363,6 +374,9 @@
           }
           if (power[i].menuMethod == 'upReportUrl') {
             res = true
+          }
+          if (power[i].menuMethod == 'writeReport') {
+            sub = true
           }
         }
         if (!approve) {
@@ -413,6 +427,22 @@
       },
       subIssued(){
         this.loadingIssued = true;
+        this.$axios.post(this.$api.insReport.examineReport, {
+								id: this.currentInfo.id,
+                isExamine: 1
+          }).then(res => {
+            if (res.code === 201) {
+              return
+            }
+            this.$message.success('鎻愪氦鎴愬姛')
+            this.refreshTable()
+            this.loadingIssued = false;
+            this.currentInfo = null;
+            this.issuedVisible = false;
+          }).catch(e => {
+            this.$message.error('鎻愪氦澶辫触')
+            this.loadingIssued = false;
+          })
       },
       handleApprove(row){
         this.currentInfo = row;
@@ -427,14 +457,14 @@
 							cancelButtonText: "鍙栨秷",
 							type: "success"
 						}).then(() => {
-							this.$axios.post(this.delUrl, {
+							this.$axios.post(this.$api.insReport.writeReport, {
 								id: row.id
 							}).then(res => {
 								if (res.code === 201) {
 									return
 								}
 								this.$message.success('鎻愪氦鎴愬姛')
-								this.selectList()
+								this.refreshTable()
 							}).catch(e => {
 								this.$message.error('鎻愪氦澶辫触')
 							})
@@ -445,6 +475,25 @@
           return this.$message.error('璇疯緭鍏ュ師鍥�')
         }
         this.loadingIssuedReason = true;
+        this.$axios.post(this.$api.insReport.examineReport, {
+								id: this.currentInfo.id,
+                isExamine: 0,
+                examineTell:this.reason
+          }).then(res => {
+            if (res.code === 201) {
+              return
+            }
+            this.$message.success('鎿嶄綔鎴愬姛')
+            this.refreshTable()
+            this.loadingIssuedReason = false;
+            this.currentInfo = null;
+            this.reason = '';
+            this.issuedVisible = false;
+            this.issuedReasonVisible = false;
+          }).catch(e => {
+            this.$message.error('鎿嶄綔澶辫触')
+            this.loadingIssuedReason = false;
+          })
       },
       handleApproveReason(){
         if(!this.reason){

--
Gitblit v1.9.3