From cef0ffebad11bf1444be8ff3d54172c83800c78d Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期一, 07 八月 2023 16:39:29 +0800
Subject: [PATCH] yxh

---
 src/views/project/travelexpenseslist/Modifydetails/index.vue |  391 ++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 284 insertions(+), 107 deletions(-)

diff --git a/src/views/project/travelexpenseslist/Modifydetails/index.vue b/src/views/project/travelexpenseslist/Modifydetails/index.vue
index e0e38ae..e6243ef 100644
--- a/src/views/project/travelexpenseslist/Modifydetails/index.vue
+++ b/src/views/project/travelexpenseslist/Modifydetails/index.vue
@@ -166,7 +166,7 @@
           <el-col :span="20">鎶ラ攢鏄庣粏褰曞叆锛�</el-col>
         </el-row>
         <el-row>
-          <el-table :data="rbDetails" border highlight-current-row show-summary>
+          <el-table :data="rbDetails" border highlight-current-row :summary-method="getSummaries" show-summary>
             <el-table-column prop="orderno" slot="" label="搴忓彿" align="center" fixed width="65">
               <template slot-scope="scope">
                 <el-input v-model="scope.row.orderno" placeholder="搴忓彿" />
@@ -274,8 +274,8 @@
             <el-table-column prop="trafficexpense" label="浜ら�氳垂" align="center" width="80">
               <template slot-scope="scope">
                 <el-input v-model="scope.row.trafficexpense" placeholder="浜ら�氳垂" @blur="val => {
-                    sumRowFee(scope.row);
-                  }
+                  sumRowFee(scope.row);
+                }
                   " />
               </template>
             </el-table-column>
@@ -294,8 +294,8 @@
             <el-table-column prop="hotelexpense" label="浣忓璐�" align="center" width="80">
               <template slot-scope="scope">
                 <el-input v-model="scope.row.hotelexpense" placeholder="浣忓璐�" @blur="val => {
-                    sumRowFee(scope.row);
-                  }
+                  sumRowFee(scope.row);
+                }
                   " />
               </template>
             </el-table-column>
@@ -303,24 +303,24 @@
             <el-table-column prop="foodexpenses" label="椁愯垂鎶ラ攢" align="center" width="80">
               <template slot-scope="scope">
                 <el-input v-model="scope.row.foodexpenses" placeholder="浼欓璐规姤閿�" @blur="val => {
-                    sumRowFee(scope.row);
-                  }
+                  sumRowFee(scope.row);
+                }
                   " />
               </template>
             </el-table-column>
             <el-table-column prop="foodallowance" label="浼欓琛ュ姪" align="center" width="80">
               <template slot-scope="scope">
                 <el-input v-model="scope.row.foodallowance" placeholder="浼欓璐硅ˉ鍔�" @blur="val => {
-                    sumRowFee(scope.row);
-                  }
+                  sumRowFee(scope.row);
+                }
                   " />
               </template>
             </el-table-column>
             <el-table-column prop="otherexpense" label="鍏潅璐硅ˉ鍔�" align="center" width="80">
               <template slot-scope="scope">
                 <el-input v-model="scope.row.otherexpense" placeholder="鏉傝垂" @blur="val => {
-                    sumRowFee(scope.row);
-                  }
+                  sumRowFee(scope.row);
+                }
                   " />
               </template>
             </el-table-column>
@@ -328,8 +328,8 @@
             <el-table-column prop="otherfeeamount" label="鍏朵粬璐圭敤" align="center" width="90">
               <template slot-scope="scope">
                 <el-input v-model="scope.row.otherfeeamount" placeholder="鍏朵粬璐圭敤" @blur="val => {
-                    sumRowFee(scope.row);
-                  }
+                  sumRowFee(scope.row);
+                }
                   " />
               </template>
             </el-table-column>
@@ -344,19 +344,14 @@
                 <el-input v-model="scope.row.total" placeholder="鍚堣" />
               </template>
             </el-table-column>
-            <el-table-column fixed="right" label="鎿嶄綔" align="center" width="120" v-if="dialogType == 'edit'">
+            <el-table-column fixed="right" label="鎿嶄綔" align="center" width="120">
               <template slot-scope="scope">
-                <el-button type="text" size="mini" @click="addDetailRow(scope.$index)">鏂板</el-button>
-                <el-button @click.native.prevent="
-                  deleteDetailRow(scope.$index, rbDetails, scope.row)
-                  " type="text" size="small">
-                  鍒犻櫎
-                </el-button>
-                <el-button @click.native.prevent="
-                  Filepopup(scope.$index, rbDetails, scope.row)
-                  " type="text" size="small">
-                  闄勪欢
-                </el-button>
+                <el-button type="text" size="mini" @click="addDetailRow(scope.$index)"
+                  v-if="dialogType == 'edit'">鏂板</el-button>
+                <el-button @click.native.prevent="deleteDetailRow(scope.$index, rbDetails, scope.row)" type="text"
+                  size="small" v-if="dialogType == 'edit'">鍒犻櫎</el-button>
+                <el-button @click.native.prevent="Filepopup(scope.$index, rbDetails, scope.row)" type="text"
+                  size="small">绁ㄦ嵁</el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -365,7 +360,7 @@
           <el-col :span="20">鎶ラ攢璇锋鏄庣粏锛�</el-col>
         </el-row>
         <el-row style="margin-top: 30px">
-          <el-table :data="rbPayees" border highlight-current-row show-summary>
+          <el-table :data="rbPayees" border highlight-current-row :summary-method="getSummaries" show-summary>
             <el-table-column prop="orderno" slot="" label="搴忓彿" align="center" fixed width="65">
               <template slot-scope="scope">
                 <el-input v-model="scope.row.orderno" placeholder="搴忓彿" />
@@ -418,17 +413,19 @@
                 <el-input v-model="scope.row.amount" placeholder="鎵撴閲戦" />
               </template>
             </el-table-column>
-            <el-table-column prop="remark" slot="" label="璇锋璇存槑" align="center" fixed width="280">
+            <el-table-column prop="remark" slot="" label="璇锋璇存槑" align="center" fixed>
               <template slot-scope="scope">
                 <el-input v-model="scope.row.remark" placeholder="璇存槑" />
-              </template> </el-table-column><el-table-column prop="paiddate" slot="" label="鎵撴鏃ユ湡" fixed align="center"
-              width="150">
+              </template>
+            </el-table-column>
+            <!--
+            <el-table-column prop="paiddate" slot="" label="鎵撴鏃ユ湡" fixed align="center" width="150">
               <template slot-scope="scope">
                 <el-date-picker clearable size="small" style="width: 100%" v-model="scope.row.paiddate" type="date"
                   value-format="yyyy-MM-dd HH:mm:ss" placeholder="鎵撴鏃ユ湡" :disabled="true">
                 </el-date-picker>
               </template>
-            </el-table-column>
+            </el-table-column>-->
             <el-table-column label="鎿嶄綔" align="center" width="100" v-if="dialogType == 'edit'">
               <template slot-scope="scope">
                 <el-button type="text" size="mini" @click="addPayeeRow(scope.$index)">鏂板</el-button>
@@ -442,7 +439,7 @@
           </el-table>
         </el-row>
 
-        <el-row v-if="dialogType == 'detail'">
+        <el-row v-if="dialogType == 'detail' || dialogType == 'check'">
           <el-table :data="fundflowList" border>
             <el-table-column label="瀹℃牳浜�" align="center" width="120" prop="checkusername" />
             <el-table-column label="瀹℃牳鏃ユ湡" align="center" width="160" prop="createTime" />
@@ -453,10 +450,28 @@
             <el-table-column label="瀹℃牳澶囨敞" align="center" prop="flowcontent" />
           </el-table>
         </el-row>
+        <el-row style="margin-top: 25px; margin-bottom: 5px" v-if="dialogType == 'check'">
+          <el-col :span="7">
+            <el-form-item label="瀹℃牳缁撴灉" align="left">
+              <el-radio-group v-model="checkObj.flowlevelone" align="left">
+                <el-radio label="1">閫氳繃</el-radio>
+                <el-radio label="2">涓嶉�氳繃</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row v-if="dialogType == 'check'">
+          <el-col :span="17">
+            <el-form-item label="瀹℃牳澶囨敞" align="left">
+              <el-input v-model="checkObj.flowconclusion" placeholder="澶囨敞" />
+            </el-form-item>
+          </el-col>
+        </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm" v-if="dialogType == 'edit'">淇� 瀛�</el-button>
-        <el-button @click="cancel">鍙� 娑�</el-button>
+        <el-button type="primary" @click="checksubmit" v-if="dialogType == 'check'">鎻� 浜�</el-button>
+        <!--<el-button @click="cancel">閫� 鍑�</el-button>-->
       </div>
     </div>
 
@@ -466,7 +481,7 @@
           <div>
             <el-upload size="mini" class="upload-demo" :action="uploadFileUrl" :file-list="fileListto" multiple
               :limit="20" :headers="headers" :on-success="(response, file, fileList) =>
-                  uploadSccess(response, file, fileList)
+                uploadSccess(response, file, fileList)
                 " :on-preview="downFile" :disabled="dialogType == 'detail'" :on-error="handleUploadError"
               :on-exceed="handleExceed" :on-remove="remove" accept="image/*,.pdf">
               <el-button :disabled="dialogType == 'detail'" size="small" type="primary">涓婁紶</el-button>
@@ -488,11 +503,6 @@
         <div v-else class="pdfimgmins">{{ hintitle }}</div>
       </div>
     </el-dialog>
-
-    <!-- <div class="container">
-      <pdf :src="iframeurl"></pdf>
-    </div> -->
-    <!-- <embed :src="iframeurl" type="application/pdf" width="1000" height="800" /> -->
   </div>
 </template>
 
@@ -514,6 +524,7 @@
   updateReimbursement,
   exportReimbursement,
   getdownload,
+  checkfund,
   fundSubmit
 } from "@/api/project/reimbursement";
 import {
@@ -566,7 +577,9 @@
       //涓嬫媺鍙互閫夋嫨浜哄憳鍒楄〃
       personsSel: [],
       // 閮ㄩ棬鏍戦�夐」
+
       deptOptions: undefined,
+      //绁ㄦ嵁鏂囦欢
       pdftitle: "",
       pdfimg: "",
       pdfVisible: false,
@@ -574,6 +587,7 @@
         value: 0,
         label: ""
       },
+
       hintitle: "閫変腑宸︿晶宸蹭笂浼犳枃浠堕瑙堟煡鐪�",
       atpresent: "",
       iframeurl: "",
@@ -666,19 +680,36 @@
 
       headers: {
         Authorization: "Bearer " + getToken()
-      }
+      },
+
+      //瀹℃壒淇℃伅
+      checkObj: {
+        flowlevelone: null,
+        flowconclusion: null,
+        fundid: null,
+      },
+
+      //淇濆瓨鎸夐挳鎺у埗
+      idisabled: false,
+
     };
   },
 
   created() {
     //鑾峰彇璁板綍鍒楄〃
-    this.getList();
-    this.gainee();
+    // this.getList();
+
     //鑾峰彇鎶ラ攢涓殑浜哄憳淇℃伅
     this.getPersonList();
-  },
 
-  mounted() {
+    //鑾峰彇鐧诲綍鑰呬俊鎭�
+    getUserProfile().then(response => {
+      this.defaultperson = response.data;
+      this.standardlevel = response.data.standardlevel;
+      console.log("this.defaultperson", this.defaultperson);
+
+    });
+
     //鑾峰彇鎹愮尞鑰呭鍚�
     listDonatebaseinfo().then(res => {
       let list = res.rows;
@@ -696,10 +727,27 @@
       }
     });
 
-    //鑾峰彇鐧诲綍鑰呬俊鎭�
-    this.getUsermsg();
     //鑾峰彇閮ㄩ棬淇℃伅
     //this.getTreeselect();
+
+  },
+
+  mounted() {
+    //閫夋嫨涓氬姟绫诲瀷:1銆佹柊澧烇紱2銆佷慨鏀癸紱3銆佹煡鐪�
+    let ids = this.$route.query.id;
+    let pos = this.$route.query.pos;
+    this.defaultperson = this.$route.query.routerparam;
+    if (pos == 1) {
+      this.handleAdd(ids);
+    } else if (pos == 2) {
+      this.handleUpdate(ids);
+    }
+    else if (pos == 3) {
+      this.handleDetail(ids);
+    }
+    else if (pos == 4) {
+      this.handleCheck(ids);
+    }
   },
 
   methods: {
@@ -724,7 +772,7 @@
       console.log(fileList);
       this.rbDetails;
 
-      //鑾峰彇闄勪欢淇℃伅浣嶇疆
+      //鑾峰彇绁ㄦ嵁淇℃伅浣嶇疆
       if (response.code == 200) {
         this.form.filename = file.raw.name;
         console.log(this.fileList);
@@ -734,10 +782,11 @@
         console.log(this.fileListto);
         this.rbDetails[this.atpresent].annexfilesList = this.fileListto;
       } else {
-        this.$modal.msgError(response.msg);
+        console.log(response.msg);;
+        console.log(response.msg);
       }
     },
-    // 鐐瑰嚮鏂囦欢
+    // 鐐瑰嚮绁ㄦ嵁
     Filepopup(index, rows, row) {
       console.log(index, rows, row);
       this.atpresent = index;
@@ -773,14 +822,6 @@
         this.$modal.msgWarning("褰撳墠鏂囦欢鏆備笉鏀寔棰勮");
         this.previewpdf = false;
       }
-    },
-
-    //鑾峰彇鐧诲綍鐢ㄦ埛淇℃伅
-    getUsermsg() {
-      getUserProfile().then(response => {
-        this.defaultperson = response.data;
-        this.standardlevel = response.data.standardlevel;
-      });
     },
 
     /** 鏌ヨ閮ㄩ棬涓嬫媺鏍戠粨鏋� */
@@ -889,34 +930,36 @@
 
       //璁$畻琛ュ姪
       this.getallowance(row);
+
     },
 
     //璁$畻琛ュ姪
     getallowance(row) {
-      console.log("ro", row);
-      //鍏潅璐硅ˉ鍔╋細鏉窞妗愬簮锛屽缓寰凤紝娣冲畨60锛屾澀宸炲叾浠栧湴鍖�0锛岄潪鏉窞鍦板尯80
-      if (row.destination != "") {
-        var tempStr = row.destination;
+      if (row.persontype == "涓撹亴浜哄憳" || row.persontype == "鍗忚皟鍛�" || row.persontype == "绠$悊浜哄憳") {
+        //鍏潅璐硅ˉ鍔╋細鏉窞妗愬簮锛屽缓寰凤紝娣冲畨60锛屾澀宸炲叾浠栧湴鍖�0锛岄潪鏉窞鍦板尯80
+        if (row.destination != "") {
+          var tempStr = row.destination;
 
-        //楠岃瘉鍩庡競
-        if (tempStr == "鏉窞") {
-          row.otherexpense = "";
-        } else if (
-          tempStr == "鏉窞-妗愬簮" ||
-          tempStr == "鏉窞-寤哄痉" ||
-          tempStr == "鏉窞-娣冲畨"
-        ) {
-          row.otherexpense = (parseInt(row.days) * 60).toString();
-        } else {
-          row.otherexpense = (parseInt(row.days) * 80).toString();
+          //楠岃瘉鍩庡競
+          if (tempStr == "鏉窞") {
+            row.otherexpense = "";
+          } else if (
+            tempStr == "鏉窞-妗愬簮" ||
+            tempStr == "鏉窞-寤哄痉" ||
+            tempStr == "鏉窞-娣冲畨"
+          ) {
+            row.otherexpense = (parseInt(row.days) * 60).toString();
+          } else {
+            row.otherexpense = (parseInt(row.days) * 80).toString();
+          }
         }
+
+        //浼欓璐硅ˉ鍔╋細鍩庡競锛堣タ钘忥紝鏂扮枂锛岄潚娴�.120锛夛紙鍏朵粬100锛�
+        row.foodallowance = (parseInt(row.days) * 100).toString();
+
+        //璁$畻鍚堣
+        this.sumRowFee(row);
       }
-
-      //浼欓璐硅ˉ鍔╋細鍩庡競锛堣タ钘忥紝鏂扮枂锛岄潚娴�.120锛夛紙鍏朵粬100锛�
-      row.foodallowance = (parseInt(row.days) * 100).toString();
-
-      //璁$畻鍚堣
-      this.sumRowFee(row);
     },
 
     getStandard(row) {
@@ -1061,10 +1104,12 @@
         this.loading = false;
       });
     },
+
     // 鍙栨秷鎸夐挳
     cancel() {
-      this.open = false;
+      window.close();
     },
+
     // 琛ㄥ崟閲嶇疆
     reset() {
       this.fileListto = [];
@@ -1116,6 +1161,7 @@
       this.rbPayees = [];
       this.resetForm("form");
     },
+
     //
     handup(e) {
       console.log("涓婃姤", e);
@@ -1133,7 +1179,7 @@
       // this.queryParams.paprovincecode= this.$refs["residenceSelect" ].getSheng();
       // this.queryParams.patowncode= this.$refs["residenceSelect" ].getQu();
       this.queryParams.pageNum = 1;
-      this.getList();
+      // this.getList();
     },
 
     /** 閲嶇疆鎸夐挳鎿嶄綔 */
@@ -1151,11 +1197,12 @@
     /** 鏂板鎸夐挳鎿嶄綔 */
     handleAdd() {
       this.reset();
-
-      this.open = true;
-      this.title = "鏂板鎶ラ攢鐢宠";
+      // this.open = true;
+      this.title = "鏂板宸梾鐢宠鍗�";
       this.dialogType = "edit";
       this.fundflowList = [];
+
+      console.log(this.title, this.defaultperson);
 
       this.form.userno = this.defaultperson.userName;
       this.form.username = this.defaultperson.nickName;
@@ -1166,23 +1213,14 @@
       this.addDetailRow(0);
       this.addPayeeRow(0);
     },
-    gainee() {
-      let ids = this.$route.query.id;
-      let pos = this.$route.query.pos;
-      console.log(ids, pos);
-      if (pos == 2) {
-        this.handleDetail(ids);
-      } else if (pos == 1) {
-        this.handleUpdate(ids);
-      }
-    },
 
     /** 淇敼鎸夐挳鎿嶄綔 */
     handleUpdate(ids) {
-      this.$router.push({
-        path: "/finance/travelexpenseslist/Modifydetails/",
-        query: { id: ids }
-      });
+      // this.$router.push({
+      //   path: "/finance/travelexpenseslist/Modifydetails/",
+      //   query: { id: ids }
+      // });
+
       this.dialogType = "edit";
       this.reset();
       // this.open = true;
@@ -1203,11 +1241,12 @@
         //鑾峰彇鎶ラ攢鏄庣粏淇℃伅
         getReimbursementdetaillist(ids).then(res => {
           this.rbDetails = res.data;
-          console.log(this.rbDetails);
           if (this.rbDetails.length == 0) {
             this.addDetailRow(0);
           }
 
+          //瀹炴椂鍚堣閲戦
+          //this.sumTotalFee();
           for (let i = 0; i < this.rbDetails.length; i++) {
             this.sumRowFee(this.rbDetails[i]);
             //瑙f瀽鍑哄樊鍦板潃
@@ -1219,9 +1258,6 @@
                 qu: this.rbDetails[i].traveltownname,
               }; */
           }
-
-          //瀹炴椂鍚堣閲戦
-          //this.sumTotalFee();
         });
 
         //鑾峰彇鎶ラ攢鎵撴淇℃伅
@@ -1246,7 +1282,68 @@
 
       getReimbursement(id).then(response => {
         this.form = response.data;
-        //闄勪欢
+        //绁ㄦ嵁
+        this.fileListto = this.form.annexfiles
+          ? this.form.annexfiles
+            .split(",")
+            .map(item => ({ url: item, name: item }))
+          : [];
+
+        //瀹℃牳鐘舵��
+        this.form.recordstatus = response.data.recordstatus + "";
+        let ids = response.data.id;
+        let listFundflowparams = {
+          fundid: ids,
+          fundtype: 1
+        };
+        listFundflow(listFundflowparams).then(res => {
+          this.fundflowList = res.rows;
+        });
+
+        //鎶ラ攢鏄庣粏
+        getReimbursementdetaillist(ids).then(res => {
+          this.rbDetails = res.data;
+          /*
+          for (let i = 0; i < this.rbDetails.length; i++) {
+            this.rbDetails[i].index = i;
+            this.rbDetails[i].searchAddress = {
+              sheng: this.rbDetails[i].travelprovincename,
+              shi: this.rbDetails[i].travelcityname,
+              qu: this.rbDetails[i].traveltownname,
+            };
+          }
+          */
+          //鍚堣璐圭敤
+          // if (this.rbDetails.length > 0) this.sumTotalFee();
+          for (let i = 0; i < this.rbDetails.length; i++) {
+            this.sumRowFee(this.rbDetails[i]);
+          }
+        });
+
+        //浠樻淇℃伅
+        this.queryParamsPayee.rbid = ids;
+        listReimbursementpayee(this.queryParamsPayee).then(res => {
+          this.rbPayees = res.rows;
+          if (this.rbPayees.length == 0) {
+            this.addPayeeRow(0);
+          }
+        });
+      });
+    },
+
+    /** 瀹℃牳鎸夐挳鎿嶄綔 */
+    handleCheck(ids) {
+      this.dialogType = "check";
+      this.title = "鎶ラ攢鐢宠璇︽儏";
+
+      this.reset();
+      this.open = true;
+      const id = ids || this.ids;
+      this.checkObj.fundid = id;
+
+      getReimbursement(id).then(response => {
+        this.form = response.data;
+        //绁ㄦ嵁
         this.fileListto = this.form.annexfiles
           ? this.form.annexfiles
             .split(",")
@@ -1278,9 +1375,13 @@
             };
           }
           */
-        });
 
-        if (this.rbDetails.length > 0) this.sumTotalFee();
+          //鍚堣璐圭敤
+          // if (this.rbDetails.length > 0) this.sumTotalFee();
+          for (let i = 0; i < this.rbDetails.length; i++) {
+            this.sumRowFee(this.rbDetails[i]);
+          }
+        });
 
         //浠樻淇℃伅
         this.queryParamsPayee.rbid = ids;
@@ -1293,10 +1394,36 @@
       });
     },
 
+    //鎻愪氦瀹℃牳鎰忚
+    checksubmit() {
+      let checkfundobj = {
+        flowconclusion: this.checkObj.flowlevelone,
+        flowcontent: this.checkObj.flowconclusion,
+        fundid: this.checkObj.fundid,
+      };
+
+      if (
+        checkfundobj.flowconclusion == null ||
+        checkfundobj.flowconclusion == undefined ||
+        checkfundobj.flowconclusion == ""
+      ) {
+        this.$modal.msgError("璇烽�夋嫨瀹℃牳缁撹鍚庡啀鎻愪氦瀹℃壒缁撴灉!");
+        return;
+      }
+
+      checkfund(checkfundobj).then((res) => {
+        this.reset();
+        this.open = false;
+        this.getList();
+        this.$modal.msgSuccess("鎻愪氦瀹℃牳鎴愬姛!");
+      });
+    },
+
     /** 鎻愪氦淇濆瓨鎸夐挳 */
     submitForm() {
       this.$refs["form"].validate(valid => {
         if (valid) {
+          // idisabled=true;
           /**
            let indexErrTime = this.rbDetails.findIndex((item) => {
              if (item.endtime && item.starttime) {
@@ -1353,7 +1480,7 @@
           }
           */
 
-          //闄勪欢鏂囦欢澶勭悊
+          //绁ㄦ嵁鏂囦欢澶勭悊
           let list = this.fileListto;
           console.log(list);
 
@@ -1405,7 +1532,10 @@
 
             this.$modal.msgSuccess("淇敼鎶ラ攢鍗曚繚瀛樻垚鍔�!");
             this.open = false;
-            this.getList();
+            
+                // 鍏抽棴绐楀彛                
+                this.$router.go(-1);
+            // this.getList();
             // })
             // .catch(err => {
             //   this.$modal.msgError("淇敼鎶ラ攢鍗曚繚瀛樺け璐ワ紒");
@@ -1430,12 +1560,17 @@
 
                 this.$modal.msgSuccess("鏂板鎶ラ攢鍗曚繚瀛樻垚鍔�!");
                 this.open = false;
-                this.getList();
+                
+                // 鍏抽棴绐楀彛                
+                this.$router.go(-1);
+
               })
               .catch(err => {
                 this.$modal.msgError("鏂板鎶ラ攢鍗曚繚瀛樺け璐ワ紒");
               });
           }
+
+
         }
       });
     },
@@ -1854,9 +1989,42 @@
         chineseStr += cnInteger;
       }
       return chineseStr;
-    }
+    },
+
+    //琛ㄦ牸鍚堣
+    getSummaries(param) {
+      const { columns, data } = param;
+      const sums = [];
+      var columnnames = ["bankname", "bankcardno", "remark", "personname", "starttime", "endtime", "departure", "destination", "traffictype", "traffictype2", "departure"];
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = '鍚堣';
+          return;
+        }
+        //鍘婚櫎閮ㄥ垎瀛楁璁$畻
+        if (columnnames.indexOf(column.property) > -1) { return; }
+
+        const values = data.map(item => Number(item[column.property]));
+        if (!values.every(value => isNaN(value))) {
+          sums[index] = values.reduce((prev, curr) => {
+            const value = Number(curr);
+            if (!isNaN(value)) {
+              return prev + curr;
+            } else {
+              return prev;
+            }
+          }, 0);
+          sums[index] += '';
+        } else {
+          sums[index] = '';
+        }
+      });
+      return sums;
+    },
+
   }
 };
+
 </script>
 
 <style lang="scss" scoped>
@@ -1900,6 +2068,7 @@
     border: 1px solid #dcdfe6;
     -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
       0 0 6px 0 rgba(0, 0, 0, 0.04);
+    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1); // <- Add this to fix.  
   }
 
   .pdftit {
@@ -1925,5 +2094,13 @@
     width: 60%;
     text-align: center;
   }
+
+
+}
+
+::v-deep .el-input--medium .el-input__inner {
+  height: 36px;
+  line-height: 36px;
+  text-align: center;
 }
 </style>

--
Gitblit v1.9.3