From 40113c299e22cbcf0b236f604b3dcc45645830d7 Mon Sep 17 00:00:00 2001
From: wangguangchao <875536587@qq.com>
Date: Mon, 27 Dec 2021 15:31:53 +0800
Subject: [PATCH] 复核列表复核功能优化

---
 src/model/Trnrel/Event.js              | 66 +++++++++++++++++++++++++++++++++++++++++++++++++-----------------
 src/views/Business/Infdid/index.vue    |  2 ++
 src/views/Business/Trnrel/Inftrnps.vue |  8 +++++---
 3 files changed, 56 insertions(+), 20 deletions(-)

diff --git a/src/model/Trnrel/Event.js b/src/model/Trnrel/Event.js
index 5b610fa..096229d 100644
--- a/src/model/Trnrel/Event.js
+++ b/src/model/Trnrel/Event.js
@@ -95,17 +95,48 @@ export default {
 
         let rtnmsg = await this.executeRule("relrow", params)
         if (rtnmsg.respCode == SUCCESS) {
-
-
-            this.$message({
-                type: 'success',
-                message: 'Reject成功!'
-            });
-
-
+            debugger;
+            let errorMsg = "";
+            let fieldErrorsFlag = (JSON.stringify(rtnmsg.fieldErrors) == "{}");
+            if(!fieldErrorsFlag){
+                let errorMsgkey = "";
+                let errorMsgVal = "";
+                for (const key in rtnmsg.fieldErrors) {
+                    errorMsgkey = key;
+                    errorMsgVal = rtnmsg.fieldErrors[key];
+                }
+                errorMsg = errorMsgkey+':'+errorMsgVal;
+                this.$notify.error({title: '错误',message: '复核失败!错误信息['+errorMsg+']'});
+            }else{
+                this.$notify({
+                    title: '成功',
+                    message: '复核成功',
+                    type: 'success'
+                });
+                debugger;
+                const that = this.root;
+                that.executeRule("searow").then(res => {
+                    //TODO 处理数据逻辑
+                    that.$refs.inftrnps.stmData.data = res.data.trncorco_trnstm.rows;
+                    this.model.trncorco.trnstm = res.data.trncorco_trnstm;
+                })
+            }         
         }
         else {
-            this.$notify.error({ title: '错误', message: '服务请求失败!' });
+            let errorMsg = "";
+            let fieldErrorsFlag = (JSON.stringify(rtnmsg.fieldErrors) == "{}");
+            if(!fieldErrorsFlag){
+                let errorMsgkey = "";
+                let errorMsgVal = "";
+                for (const key in rtnmsg.fieldErrors) {
+                    errorMsgkey = key;
+                    errorMsgVal = rtnmsg.fieldErrors[key];
+                }
+                errorMsg = errorMsgkey+':'+errorMsgVal;
+            }else if(rtnmsg.respMsg){
+                errorMsg = rtnmsg.respMsg;
+            }
+            this.$notify.error({title: '错误',message: '复核失败!错误信息['+errorMsg+']'});
         }
     },
     sleep(ms) {
@@ -287,18 +318,18 @@ export default {
     },
     async handleSearch() {
         const that = this.root;
-        if (this.model.searchAllUsers) {
-            that.executeRule("seajbh").then(res => {
-                //TODO 处理数据逻辑
-                that.$refs.inftrnps.stmData.data = res.data.trncorco_trnstm.rows;
-            })
-        } else {
+        // if (this.model.searchAllUsers) {
+        //     that.executeRule("seajbh").then(res => {
+        //         //TODO 处理数据逻辑
+        //         that.$refs.inftrnps.stmData.data = res.data.trncorco_trnstm.rows;
+        //     })
+        // } else {
             that.executeRule("searow").then(res => {
                 //TODO 处理数据逻辑
                 that.$refs.inftrnps.stmData.data = res.data.trncorco_trnstm.rows;
                 this.model.trncorco.trnstm = res.data.trncorco_trnstm;
             })
-        }
+        // }
     },
 
     async handleReset() {
@@ -312,7 +343,8 @@ export default {
         this.model.trncorco.dflg = "ALL";
         this.model.atptxt = "";
         this.model.searchAllUsers = false;
-    }
+    },
+
 
 
 }
\ No newline at end of file
diff --git a/src/views/Business/Infdid/index.vue b/src/views/Business/Infdid/index.vue
index 59daf24..3a13e32 100644
--- a/src/views/Business/Infdid/index.vue
+++ b/src/views/Business/Infdid/index.vue
@@ -5,7 +5,9 @@
         
             <!--PD000006 -->
            <!-- <el-tab-pane label="信用证查询" name="infsea"> -->
+                <c-content>
                 <m-infsea :model="model" :codes="codes"/>
+                </c-content>
            <!-- </el-tab-pane> -->
  
             <!--PD000001 -->
diff --git a/src/views/Business/Trnrel/Inftrnps.vue b/src/views/Business/Trnrel/Inftrnps.vue
index 4fa69e3..412b6c5 100644
--- a/src/views/Business/Trnrel/Inftrnps.vue
+++ b/src/views/Business/Trnrel/Inftrnps.vue
@@ -412,10 +412,12 @@
                 style="margin-left: 0"
                 size="small"
                 type="primary"
-               
+                @click="display(scope.$index, scope.row)"
               >
-                详情
-              </c-button>
+                快照
+              </c-button> 
+             
+      
               <c-button
                 style="margin-left: 0"
                 size="small"
--
libgit2 0.26.0