From 92cf010eaa361321e689bdedfe0fc1de59c3ff21 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期五, 25 八月 2023 15:19:46 +0800
Subject: [PATCH] yxh

---
 src/views/project/travelexpenseapply/travelexpensedetail/index.vue |   76 +++++++++++++++++++++++++-------------
 1 files changed, 50 insertions(+), 26 deletions(-)

diff --git a/src/views/project/travelexpenseapply/travelexpensedetail/index.vue b/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
index 15cffd2..f88787c 100644
--- a/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
+++ b/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
@@ -279,18 +279,15 @@
                   " />
               </template>
             </el-table-column>
-            <!--
             <el-table-column prop="cityfee" label="甯傚唴浜ら�氳垂" align="center" width="100">
               <template slot-scope="scope">
-                <el-input v-model="scope.row.cityfee" placeholder="甯傚唴浜ら�氳垂" @blur="
-                  (val) => {
-                    sumRowFee(scope.row);
-                  }
-                ">{{ Number(scope.row.cityfee).toFixed(2) }}
+                <el-input v-model="scope.row.cityfee" placeholder="甯傚唴浜ら�氳垂" @blur="(val) => {
+                  sumRowFee(scope.row);
+                }
+                  ">{{ Number(scope.row.cityfee).toFixed(2) }}
                 </el-input>
               </template>
             </el-table-column>
-                                                                                                                                      -->
             <el-table-column prop="hotelexpense" label="浣忓璐�" align="center" width="80">
               <template slot-scope="scope">
                 <el-input v-model="scope.row.hotelexpense" placeholder="浣忓璐�" @blur="val => {
@@ -443,13 +440,15 @@
         <el-row style="margin-top: 25px; margin-bottom: 5px" v-if="operationType != 'edit'">
           <el-col :span="20">瀹℃牳璁板綍</el-col>
         </el-row>
-        <el-row v-if="operationType != 'edit'">
+        <el-row v-if="operationType != 'add'">
           <el-table :data="fundflowList" border>
-            <el-table-column label="瀹℃牳浜�" align="center" width="150" prop="checkusername" />
             <el-table-column label="瀹℃牳鏃ユ湡" align="center" width="200" prop="createTime" />
-            <el-table-column label="瀹℃牳缁撴灉" align="center" width="200" prop="flowconclusion"><template
-                slot-scope="scope"><span v-if="scope.row.flowconclusion == 1">閫氳繃</span><span
-                  v-if="scope.row.flowconclusion == 2">涓嶉�氳繃</span></template>
+            <el-table-column label="瀹℃牳浜�" align="center" width="150" prop="checkusername" />
+            <el-table-column label="瀹℃牳缁撴灉" align="center" width="200" prop="flowconclusion">
+              <template slot-scope="scope">
+                <span v-if="scope.row.flowconclusion == 1">閫氳繃</span>
+                <span v-if="scope.row.flowconclusion == 2">涓嶉�氳繃</span>
+              </template>
             </el-table-column>
             <el-table-column label="瀹℃牳澶囨敞" align="center" prop="flowcontent" />
           </el-table>
@@ -608,6 +607,9 @@
       loading: true,
       // 瀵煎嚭閬僵灞�
       exportLoading: false,
+
+      // 褰撳墠鍗曟嵁ID
+      curId: 0,
       // 閫変腑鏁扮粍
       ids: [],
       // 闈炲崟涓鐢�
@@ -735,17 +737,17 @@
 
   mounted() {
     //閫夋嫨涓氬姟绫诲瀷:1銆佹柊澧烇紱2銆佷慨鏀癸紱3銆佹煡鐪�
-    let ids = this.$route.query.id;
+    let curId = this.$route.query.id;
     let pos = this.$route.query.pos;
     this.defaultperson = this.$route.query.routerparam;
     if (pos == 1) {
-      this.handleAdd(ids);
+      this.handleAdd(curId);
     } else if (pos == 2) {
-      this.handleUpdate(ids);
+      this.handleUpdate(curId);
     } else if (pos == 3) {
-      this.handleDetail(ids);
+      this.handleDetail(curId);
     } else if (pos == 4) {
-      this.handleCheck(ids);
+      this.handleCheck(curId);
     }
   },
 
@@ -947,7 +949,16 @@
         }
 
         //浼欓璐硅ˉ鍔╋細鍩庡競锛堣タ钘忥紝鏂扮枂锛岄潚娴�.120锛夛紙鍏朵粬100锛�
-        row.foodallowance = (parseInt(row.days) * 100).toString();
+        if (tempStr == "鏉窞") {
+          row.foodallowance = "";
+        }
+        else if (tempStr == "瑗胯棌" || tempStr == "鏂扮枂" || tempStr == "闈掓捣") {
+          row.foodallowance = (parseInt(row.days) * 120).toString();
+        }
+        else {
+          row.foodallowance = (parseInt(row.days) * 100).toString();
+        }
+
 
         //璁$畻鍚堣
         this.sumRowFee(row);
@@ -1207,7 +1218,7 @@
     },
 
     /** 淇敼鎸夐挳鎿嶄綔 */
-    handleUpdate(ids) {
+    handleUpdate(curId) {
       // this.$router.push({
       //   path: "/finance/travelexpenseslist/Modifydetails/",
       //   query: { id: ids }
@@ -1219,8 +1230,7 @@
       this.title = "鎶ラ攢鐢宠淇敼";
 
       //鑾峰彇鎶ラ攢涓讳俊鎭�
-      const id = ids || this.ids;
-      getReimbursement(id).then(response => {
+      getReimbursement(curId).then(response => {
         this.form = response.data;
         this.fileListto = this.form.annexfiles
           ? this.form.annexfiles
@@ -1229,11 +1239,9 @@
           : [];
         this.form.recordstatus = response.data.recordstatus + "";
 
-        let ids = response.data.id;
         //鑾峰彇鎶ラ攢鏄庣粏淇℃伅
-        getReimbursementdetaillist(ids).then(res => {
+        getReimbursementdetaillist(curId).then(res => {
           this.rbDetails = res.data;
-          console.log(this.rbDetails);
           if (this.rbDetails.length == 0) {
             this.addDetailRow(0);
           }
@@ -1254,13 +1262,24 @@
         });
 
         //鑾峰彇鎶ラ攢鎵撴淇℃伅
-        this.queryParamsPayee.rbid = ids;
+        this.queryParamsPayee.rbid = curId;
         listReimbursementpayee(this.queryParamsPayee).then(res => {
           this.rbPayees = res.rows;
           if (this.rbPayees.length == 0) {
             this.addPayeeRow(0);
           }
         });
+
+        //瀹℃牳鐘舵��
+        this.form.recordstatus = response.data.recordstatus + "";
+        let listFundflowparams = {
+          fundid: curId,
+          fundtype: 1
+        };
+        listFundflow(listFundflowparams).then(res => {
+          this.fundflowList = res.rows;
+        });
+
       });
     },
 
@@ -1408,8 +1427,10 @@
       checkfund(checkfundobj).then(res => {
         this.reset();
         this.open = false;
-        this.getList();
         this.$modal.msgSuccess("鎻愪氦瀹℃牳鎴愬姛!");
+        // 鍏抽棴绐楀彛
+        this.$store.dispatch('tagsView/delView', this.$route)
+        this.$router.go(-1);
       });
     },
 
@@ -1526,7 +1547,9 @@
             this.open = false;
 
             // 鍏抽棴绐楀彛
+            this.$store.dispatch('tagsView/delView', this.$route)
             this.$router.go(-1);
+
             // this.getList();
             // })
             // .catch(err => {
@@ -1554,6 +1577,7 @@
                 this.open = false;
 
                 // 鍏抽棴绐楀彛
+                this.$store.dispatch('tagsView/delView', this.$route)
                 this.$router.go(-1);
               })
               .catch(err => {

--
Gitblit v1.9.3