From 9fb9cd1ce924b6d0833ee9ca03581ff04352707b Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期四, 24 八月 2023 10:14:05 +0800
Subject: [PATCH] yxh

---
 src/views/project/fund/applyDetail/index.vue |  168 ++++++++++++++++++++++++++++++++-----------------------
 1 files changed, 98 insertions(+), 70 deletions(-)

diff --git a/src/views/project/fund/applyDetail/index.vue b/src/views/project/fund/applyDetail/index.vue
index 98fa41d..e2f8645 100644
--- a/src/views/project/fund/applyDetail/index.vue
+++ b/src/views/project/fund/applyDetail/index.vue
@@ -14,7 +14,8 @@
           </el-col>
           <el-col :span="5">
             <el-form-item label="缁忓姙浜�" prop="username">
-              <el-select v-model="form.username" placeholder="鐢宠浜�" clearable filterable allow-create style="width: 100%">
+              <el-select v-model="form.username" placeholder="鐢宠浜�" clearable filterable allow-create style="width: 100%"
+                @change="getUserAccount">
                 <el-option v-for="dict in userlist" :key="dict.index" :label="dict.nickname"
                   :value="dict.nickname"></el-option>
               </el-select>
@@ -46,9 +47,13 @@
               }}</el-radio>
             </el-form-item>
           </el-col>
-          <el-col :span="10">
-            <el-form-item label="鐢宠璇存槑" prop="remark">
-              <el-input v-model="form.remark" placeholder="鐢宠璇存槑" />
+          <el-col :span="5">
+            <el-form-item label="閾惰鍚嶇О" prop="bankname">
+              <el-input v-model="form.bankname" placeholder="璇疯緭鍏ラ摱琛屽悕绉�" />
+            </el-form-item>
+          </el-col><el-col :span="5">
+            <el-form-item label="閾惰璐﹀彿" prop="bankcardno">
+              <el-input v-model="form.bankcardno" placeholder="璇疯緭鍏ラ摱琛岃处鍙�" />
             </el-form-item>
           </el-col>
           <el-col :span="5">
@@ -81,6 +86,11 @@
               <el-input v-model="form.taxedcost" placeholder="绋庡悗閲戦鍚堣" :disabled="true" />
             </el-form-item>
           </el-col>-->
+          <el-col :span="10">
+            <el-form-item label="鐢宠璇存槑" prop="remark">
+              <el-input v-model="form.remark" placeholder="鐢宠璇存槑" />
+            </el-form-item>
+          </el-col>
           <el-col :span="5">
             <el-form-item label="鎹愮尞鑰�" prop="name">
               <el-input :disabled="true" v-model="form.name" placeholder="璇疯緭鍏ユ崘鐚�呭鍚�" />
@@ -117,7 +127,7 @@
             </el-table-column>-->
             <el-table-column prop="applytype" align="center" label="鏈嶅姟绫诲瀷" width="200">
               <template slot-scope="scope">
-                <el-select v-model="scope.row.applytype" placeholder="鏈嶅姟绫诲瀷" @change="loadFeeItems(scope.row)">
+                <el-select v-model="scope.row.applytype" placeholder="鏈嶅姟绫诲瀷" @change="verifyFeeItemType(scope.row)">
                   <el-option v-for="dict in rowfeeItemTypes" :key="dict.index" :label="dict.label"
                     :value="dict.value"></el-option>
                 </el-select>
@@ -135,13 +145,13 @@
             <el-table-column prop="servicesscope" align="center" label="鏈嶅姟璇存槑" v-if="form.applytype == '1'" width="180">
               <template slot-scope="scope">
                 <el-select v-model="scope.row.servicesscope" placeholder="鏈嶅姟璇存槑" clearable allow-create filterable
-                  @change="selectedRemark(scope.row)">
+                  @change="verifyFeeRemark(scope.row)">
                   <el-option v-for="dict in scope.row.rowfeeblocks" :key="dict.servicesscope" :label="dict.remark"
                     :value="dict.servicesscope"></el-option>
                 </el-select>
               </template>
             </el-table-column>
-            <el-table-column prop="price" align="center" label="鍗曚环" width="120" v-if="0">
+            <el-table-column prop="price" align="center" label="鍗曚环" width="120" v-if="businessType == 4">
               <template slot-scope="scope">
                 <el-input v-model="scope.row.price" placeholder="鍗曚环" @blur="val => {
                   sumTotalFee(scope.row);
@@ -149,7 +159,7 @@
                   " />
               </template>
             </el-table-column>
-            <el-table-column prop="quantity" align="center" label="鏁伴噺" width="120" v-if="0">
+            <el-table-column prop="quantity" align="center" label="鏁伴噺" width="120" v-if="businessType == 4">
               <template slot-scope="scope">
                 <el-input v-model="scope.row.quantity" placeholder="鏁伴噺" @blur="val => {
                   sumTotalFee(scope.row);
@@ -158,7 +168,7 @@
               </template>
             </el-table-column>
             <el-table-column v-if="businessType == 3 || businessType == 4 || ismanager == true" prop="amount"
-              align="center" label="绋庡墠閲戦" width="120">
+              align="center" :label=amountLabel width="120">
               <template slot-scope="scope">
                 <!--
                   <el-select v-model="scope.row.amount" placeholder="绋庡墠閲戦" clearable filterable allow-create
@@ -167,7 +177,7 @@
                     :value="dict.expense"></el-option>
                 </el-select>
               -->
-                <el-input v-model="scope.row.amount" placeholder="绋庡墠閲戦" />
+                <el-input v-model="scope.row.amount" placeholder="閲戦" />
               </template>
             </el-table-column>
             <el-table-column prop="taxedamount" align="center" label="绋庡悗閲戦" width="120" v-if="(this.ismanager == true) &
@@ -243,7 +253,7 @@
                 <el-input v-model="scope.row.bankcardno" placeholder="閾惰甯愬彿" />
               </template>
             </el-table-column>
-            <el-table-column prop="remark" align="center" label="澶囨敞" v-if="form.applytype == '4'">
+            <el-table-column prop="remark" align="center" label="澶囨敞">
               <template slot-scope="scope">
                 <el-input v-model="scope.row.remark" placeholder="澶囨敞" />
               </template>
@@ -259,7 +269,7 @@
                 </el-button>
                 <el-button @click.native.prevent="
                   Filepopup(scope.$index, rbDetails, scope.row)
-                  " type="text" size="small">绁ㄦ嵁</el-button>
+                  " type="text" size="small" v-if="businessType == 3 || businessType == 4">绁ㄦ嵁</el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -313,18 +323,20 @@
                   uploadSccess(response, file, fileList)
                   " :on-preview="downFile" :disabled="operationType == 'detail'" :on-error="handleUploadError"
                 :on-exceed="handleExceed" :on-remove="remove" accept="image/*,.pdf">
-                <el-button :disabled="operationType == 'detail'" size="small" type="primary">涓婁紶</el-button>
+                <el-button :disabled="operationType == 'detail'" size="small" type="primary">涓婁紶绁ㄦ嵁</el-button>
               </el-upload>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row v-if="operationType == 'detail' || operationType == '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" />
-            <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="120" 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>
@@ -464,7 +476,7 @@
                 uploadSccess(response, file, fileList)
                 " :on-preview="downFile" :disabled="operationType == 'detail'" :on-error="handleUploadError"
               :on-exceed="handleExceed" :on-remove="remove" accept="image/*,.pdf">
-              <el-button :disabled="operationType == 'detail'" size="small" type="primary">涓婁紶</el-button>
+              <el-button :disabled="operationType == 'detail'" size="small" type="primary">涓婁紶绁ㄦ嵁</el-button>
             </el-upload>
           </div>
           <!-- <div
@@ -654,6 +666,8 @@
       //涓撳/鍗曚綅閫夋嫨锛歟xpert/unit
       selectionType: "",
       showSelectionDialog: false,
+      //绋庡墠閲戦鏍囬锛氫笓瀹惰垂-绋庡墠閲戦锛涘尰瀛︽垚鏈�佸姙鍏垂鐢�-閲戦
+      amountLabel:"绋庡墠閲戦",
 
       // 琛ㄥ崟鏍¢獙
       rules: {
@@ -845,11 +859,13 @@
       if (this.businessType == "1") {
         this.curCase = this.$route.query.curCase;
         this.businessName = "涓撳鍔冲姟璐圭敵璇峰崟"
+        this.amountLabel="绋庡墠閲戦"
         this.getUnitList();
       }
       else if (this.businessType == "2") {
         this.curCase = this.$route.query.curCase;
         this.businessName = "浼︾悊涓撳鍔冲姟璐圭敵璇峰崟";
+        this.amountLabel="绋庡墠閲戦"
         this.getUnitList();
       }
       else if (this.businessType == "3") {
@@ -857,9 +873,11 @@
           this.curCase = this.$route.query.curCase;
         }
         this.businessName = "鍖诲鎴愭湰鎶ラ攢鍗�";
+        this.amountLabel="閲戦"
       }
       else if (this.businessType == "4") {
         this.businessName = "鍔炲叕璐圭敤鎶ラ攢鍗�";
+        this.amountLabel="閲戦"
 
         // this.getBaseInfoList();
       }
@@ -899,7 +917,6 @@
         this.businessType == "2" ||
         this.businessType == "3"
       ) {
-        console.log("", this.curCase);
         this.form.infoid = this.curCase.id;
         this.form.donorname = this.curCase.name;
         this.form.donorno = this.curCase.donorno;
@@ -925,9 +942,6 @@
         //鏄庣粏澶勭悊
         getownFundDetail(this.curId).then(res => {
           this.rbDetails = res.data;
-          console.log(res);
-
-          console.log(this.curId, res.data);
           if (this.rbDetails.length > 0) {
             for (let m = 0; m < this.rbDetails.length; m++) {
               this.rbDetails[m].itemlist = [];
@@ -959,6 +973,49 @@
         });
       });
     },
+
+    /** 鏌ョ湅鎸夐挳鎿嶄綔 */
+    handleDetail() {
+      this.isopen = 0;
+      this.reset();
+
+      getFund(this.curId).then(response => {
+        this.form = response.data;
+        //闄勪欢澶勭悊
+        // this.fileList = this.form.annexbankcard ? this.form.annexbankcard.split(",").map(item => ({ url: item, name: item })) : []
+
+        //涓氬姟鏄庣粏
+        getownFundDetail(this.curId).then(res => {
+          this.rbDetails = res.data;
+          for (let m = 0; m < this.rbDetails.length; m++) {
+            this.rbDetails[m].itemlist = [];
+            this.getFeeItems(m, this.rbDetails[m]);
+
+            this.rbDetails[m].rowfeeblocks = [];
+            this.rbDetails[m].rowfeeblocks.push({
+              servicesscope: this.rbDetails[m].servicesscope,
+              expensedescribe: this.rbDetails[m].servicesscopename,
+              expense: this.rbDetails[m].expense,
+              remark: this.rbDetails[m].servicesscopename
+            });
+          }
+
+          if (this.rbDetails.length == 0) {
+            this.addRow(0);
+          }
+        });
+
+        //涓氬姟娴佺▼        
+        let listFundflowparams = {
+          fundid: this.curId,
+          fundtype: 2
+        };
+        listFundflow(listFundflowparams).then(res => {
+          this.fundflowList = res.rows;
+        });
+      });
+    },
+
     /** 淇敼鎸夐挳鎿嶄綔 */
     handleCheck() {
       this.isopen = 0;
@@ -997,48 +1054,7 @@
 
     },
 
-    /** 鏌ョ湅鎸夐挳鎿嶄綔 */
-    handleDetail() {
-      this.isopen = 0;
-      this.reset();
-
-      getFund(this.curId).then(response => {
-        this.form = response.data;
-        //闄勪欢澶勭悊
-        // this.fileList = this.form.annexbankcard ? this.form.annexbankcard.split(",").map(item => ({ url: item, name: item })) : []
-
-        //涓氬姟鏄庣粏
-        getownFundDetail(this.curId).then(res => {
-          console.log(res);
-          this.rbDetails = res.data;
-          for (let m = 0; m < this.rbDetails.length; m++) {
-            this.rbDetails[m].itemlist = [];
-            this.getFeeItems(m, this.rbDetails[m]);
-            this.rbDetails[m].rowfeeblocks = [];
-            this.rbDetails[m].rowfeeblocks.push({
-              expense: this.rbDetails[m].expense,
-              expensedescribe: this.rbDetails[m].servicesscopename,
-              remark: this.rbDetails[m].servicesscope,
-              servicesscope: this.rbDetails[m].servicesscope
-            });
-          }
-
-          if (this.rbDetails.length == 0) {
-            this.addRow(0);
-          }
-        });
-
-        //涓氬姟娴佺▼        
-        let listFundflowparams = {
-          fundid: this.curId,
-          fundtype: 2
-        };
-        listFundflow(listFundflowparams).then(res => {
-          this.fundflowList = res.rows;
-        });
-      });
-    },
-
+    /** 鍒犻櫎鎸夐挳鎿嶄綔 */
     handleDelete() {
       this.$modal
         .confirm("鏄惁纭鍒犻櫎璇ヨ褰曪紵")
@@ -1319,12 +1335,13 @@
         }
         this.form.username = this.userprofile.nickName;
         this.form.userno = this.userprofile.userName;
-        this.form.phone = this.userprofile.phonenumber;
         this.form.deptmentname = this.userprofile.dept.deptName;
         this.form.deptmentno = this.userprofile.dept.deptId;
         this.form.managername = this.userprofile.dept.leader;
+        this.form.phone = this.userprofile.phonenumber;
         // this.form.applytype = this.businessType;
         // this.form.createTime = new Date();
+        this.getUserAccount();
       });
     },
 
@@ -1358,6 +1375,17 @@
               exportName: this.personlist[j].username
             });
           }
+        }
+      });
+    },
+
+    //鑾峰彇缁忓姙浜鸿处鍙蜂俊鎭�
+    getUserAccount() {
+      this.personlist.map(res => {
+        if (res.username == this.form.username) {
+          this.form.bankname = res.depositbank;//res.branchbankname銆乺es.depositbank;
+          this.form.bankcardno = res.bankcardno;
+          this.form.phone = res.telephone;
         }
       });
     },
@@ -1440,7 +1468,7 @@
     },
 
     //鍔犺浇鏈嶅姟椤圭洰
-    loadFeeItems(row) {
+    verifyFeeItemType(row) {
       let list = this.feeItemTypes.filter(r => r.itemType == row.applytype);
       row.itemlist = list[0].itemDetails;
       row.itemid = null;
@@ -1455,7 +1483,7 @@
     },
 
     //鑾峰彇璐圭敤椤圭洰鐨勫娉ㄤ俊鎭�
-    selectedRemark(row) {
+    verifyFeeRemark(row) {
       row.rowfeeblocks.forEach((item, i) => {
         if (item.servicesscope === row.servicesscope) {
           row.servicesscopename = item.expensedescribe;
@@ -2066,13 +2094,13 @@
   created() {
     //鑾峰彇璺敱鍙傛暟
     this.getroute();
-    this.getUserProfile();
-    this.getUserList();
+    this.getExternalList();
   },
 
   //鐢熷懡鍛ㄦ湡 - 鎸傝浇瀹屾垚锛堝彲浠ヨ闂瓺OM鍏冪礌锛�
   mounted() {
-    this.getExternalList();
+    this.getUserList();
+    this.getUserProfile();
     // this.getFeeUnitList();
   },
 

--
Gitblit v1.9.3