From 935c201bdcf4adde998d46893dd0fa3eddf400bb Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期四, 20 七月 2023 17:55:22 +0800
Subject: [PATCH] 1

---
 src/views/project/fund/expertFeeFundApply/index.vue |  331 +++++++++++-------------------------------------------
 1 files changed, 68 insertions(+), 263 deletions(-)

diff --git a/src/views/project/fund/expertFeeFundApply/index.vue b/src/views/project/fund/expertFeeFundApply/index.vue
index c99482d..d4b0c3f 100644
--- a/src/views/project/fund/expertFeeFundApply/index.vue
+++ b/src/views/project/fund/expertFeeFundApply/index.vue
@@ -9,6 +9,7 @@
               @keyup.enter.native="handleQuery" />
           </el-form-item>
         </el-col>
+
         <el-col :span="6">
           <el-form-item label="鎹愮尞杩涘害" prop="recordstate">
             <el-select v-model="queryParams.recordstate" placeholder="璇烽�夋嫨璁板綍鐘舵��" clearable size="small">
@@ -86,11 +87,14 @@
                 </el-table-column>
                 <el-table-column label="鎵�灞炵粍鍒�" align="center" prop="deptmentname" width="220px" />
                 <el-table-column label="缁勯暱" align="center" prop="managername" width="150px" />
-                <!-- 
-                <el-table-column label="鐢宠閲戦" align="center" prop="amountrequested" width="120px" />    
+                <!-- <el-table-column
+                  label="鐢宠閲戦"
+                  align="center"
+                  prop="amountrequested"
+                  width="120px"
+                                      />    
                 <el-table-column label="鑱旂郴鐢佃瘽" align="center" prop="phone" width="150px" />
-                <el-table-column label="宸ヤ綔鍗曚綅" align="center" prop="unitname" width="220px" /> 
-                -->
+                <el-table-column label="宸ヤ綔鍗曚綅" align="center" prop="unitname" width="220px" /> -->
                 <el-table-column label="鎿嶄綔" fixed="right" align="center" class-name="small-padding fixed-width"
                   width="280px">
                   <template slot-scope="scope">
@@ -280,7 +284,7 @@
                   placeholder="璇烽�夋嫨"
                 >
                   <el-option
-                    v-for="item in expertlist"
+                    v-for="item in arrr3"
                     :key="item.reportNo"
                     :label="item.reportName"
                     :value="item.reportName"
@@ -435,29 +439,21 @@
       </div>
     </el-dialog>
 
-    <el-dialog :visible.sync="showDetailInfoDialog" :close-on-click-modal="false" :title="'瀵煎叆淇℃伅'" width="500px"
+    <el-dialog :visible.sync="detailInfoDialogShow" :close-on-click-modal="false" :title="'淇℃伅淇敼'" width="500px"
       style="text-align: center" v-loading="loading">
       <el-form ref="funddetailForm" :model="funddetailForm">
         <el-row>
-          <el-col :span="24" v-if="showDetailInfoDialogType == 'name'">
-            <el-form-item label="璇烽�夋嫨涓撳淇℃伅锛�" prop="expertfrom">
-              <el-radio-group v-model="expertfrom" style="margin-bottom: 0">
-                <el-radio label="1">涓撳搴�</el-radio>
-                <el-radio label="2">鏂板涓撳</el-radio>
-              </el-radio-group>
-            </el-form-item>
-          </el-col>
-          <el-col :span="24" v-if="showDetailInfoDialogType == 'name' && expertfrom == '1'">
+          <el-col :span="24" v-if="detailInfoDialogShowType == 'name'">
             <el-form-item label="涓撳濮撳悕" prop="beneficiaryname" label-width="80px">
               <el-select filterable allow-create ref="beneficiaryname" default-first-option
                 v-model="funddetailForm.beneficiaryname" placeholder="璇烽�夋嫨" style="width: 100%">
-                <el-option v-for="item in expertlist" :key="item.reportNo" :label="item.reportName"
-                  :value="item.reportName">
+                <el-option v-for="item in arrr3" :key="item.reportNo" :label="item.reportName" :value="item.reportName">
                 </el-option>
               </el-select>
             </el-form-item>
           </el-col>
-          <el-col :span="24" v-if="showDetailInfoDialogType == 'unit'">
+
+          <el-col :span="24" v-if="detailInfoDialogShowType == 'unit'">
             <el-form-item label="鍗曚綅鍚嶇О" prop="unitno" label-width="80px">
               <el-select v-model="funddetailForm.unitno" placeholder="鍗曚綅鍚嶇О" clearable filterable allow-create
                 style="width: 100%">
@@ -467,65 +463,9 @@
             </el-form-item>
           </el-col>
         </el-row>
-        <el-row>
-          <el-col :span="12" v-if="expertfrom == '2'">
-            <el-form-item label="涓撳濮撳悕" prop="expertname" label-width="80px">
-              <el-input v-model="funddetailForm.expertname" placeholder="蹇呭~椤�" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="12" v-if="expertfrom == '2'">
-            <el-form-item label="鑱�    绉�" prop="experttitle" label-width="80px">
-              <el-select v-model="funddetailForm.experttitle" placeholder="蹇呭~椤�">
-                <el-option v-for="dict in dict.type.sys_professionaltitle" :key="dict.value" :label="dict.label"
-                  :value="dict.label"></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24" v-if="expertfrom == '2'">
-            <el-form-item label="韬唤璇佸彿" prop="expertidcardno" label-width="80px">
-              <el-input v-model="funddetailForm.expertidcardno" placeholder="蹇呭~椤�" />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <!--
-        <el-row>
-          <el-col :span="12" v-if="expertfrom == '2'">
-            <el-form-item label="浜哄憳绫诲埆" prop="usertype" label-width="80px">
-              <el-select v-model="funddetailForm.usertype" placeholder="蹇呭~椤�">
-                <el-option v-for="dict in dict.type.sys_UserType" :key="dict.value" :label="dict.label"
-                  :value="dict.value"></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>          
-        </el-row>
-      -->
-        <el-row>
-          <el-col :span="24" v-if="expertfrom == '2'">
-            <el-form-item label="鍗曚綅鍚嶇О" prop="expertunitno" label-width="80px">
-              <el-select v-model="funddetailForm.expertunitno" placeholder="鍗曚綅鍚嶇О" clearable filterable allow-create
-                style="width: 100%">
-                <el-option v-for="(spec, index) in unitList" :key="index" :label="spec.organizationname"
-                  :value="spec.organizationid"></el-option>
-              </el-select>
-            </el-form-item></el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24" v-if="expertfrom == '2'">
-            <el-form-item label="寮�鎴烽摱琛�" prop="expertdepositbank" label-width="80px">
-              <el-input v-model="funddetailForm.expertdepositbank" placeholder="蹇呭~椤�" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="24" v-if="expertfrom == '2'">
-            <el-form-item label="閾惰鍗″彿" prop="expertbankcardno" label-width="80px">
-              <el-input v-model="funddetailForm.expertbankcardno" placeholder="蹇呭~椤�" />
-            </el-form-item>
-          </el-col>
-        </el-row>
       </el-form>
       <span slot="footer" class="dialog-footer">
-        <el-button @click="showDetailInfoDialog = false">鍙� 娑�</el-button>
+        <el-button @click="detailInfoDialogShow = false">鍙� 娑�</el-button>
         <el-button type="primary" @click="ConfirmDetailDialog()">纭� 瀹�</el-button>
       </span>
     </el-dialog>
@@ -537,7 +477,7 @@
 //渚嬪锛歩mport 銆婄粍浠跺悕绉般�� from '銆婄粍浠惰矾寰勩��';
 import {
   listDonatebaseinfo,
-  getDonatebaseinfo
+  getDonatebaseinfo,
 } from "@/api/project/donatebaseinfo";
 import {
   onelistFund,
@@ -553,7 +493,7 @@
   getdownloadYX,
   getdownloadBX,
   batchUploadFund,
-  getdetailsByItemId
+  getdetailsByItemId,
 } from "@/api/project/fund";
 import {
   onelistFunds,
@@ -580,7 +520,7 @@
   listOrganization,
   getOrganization,
   listReportname,
-  listUser
+  listUser,
 } from "@/api/project/organization";
 import {
   listExternalperson,
@@ -589,7 +529,7 @@
   delExternalperson,
   addExternalperson,
   updateExternalperson,
-  exportExternalperson
+  exportExternalperson,
 } from "@/api/project/externalperson";
 import { getUserProfile } from "@/api/system/user";
 import Li_area_select from "@/components/Address";
@@ -605,24 +545,25 @@
   },
   name: "fundApply",
   dicts: [
-    //"sys_consolationfundlevel",
-    //"sys_OrganizationType",
+    "sys_consolationfundlevel",
+    "sys_OrganizationType",
     "sys_DonationStatus",
-    //"sys_depositbank",
-    //"sys_FamilyRelation",
-    //"sys_IDType",
-    //"sys_ConsolationType",
-    //"sys_fund_type",
-    //"sys_finsubject",
-    //"sys_financeitemtype",
-    //"sys_expensetype",
+    "sys_depositbank",
+    "sys_FamilyRelation",
+    "sys_IDType",
+    "sys_ConsolationType",
+    "sys_fund_type",
+    "sys_finsubject",
+    "sys_financeitemtype",
+    "sys_expensetype",
     "sys_recordstatus",
-    "sys_professionaltitle"
   ],
   data() {
     //杩欓噷瀛樻斁鏁版嵁
     return {
-
+      arrr2: [],
+      arrr3: [],
+      currentApplyType: "1",
       // 閬僵灞�
       loading: true,
       // 瀵煎嚭閬僵灞�
@@ -651,29 +592,17 @@
         applytype: "1",
         createBy: null,
       },
-      // 琛ㄥ崟鍙傛暟
-      form: {},
-      //鎵�鏈変汉鍛樿〃
-      personlist: [],
-      expertQueryParam: {
-        pageNum: 1,
-        pageSize: 10000,
-        userno: null,
-        username: null,
-        usertype: null,
-      },
-      //鐢宠鍗曠被鍨�
-      currentApplyType: "1",
-      //涓撳鍒楄〃
-      expertlist: [],
-      //涓撳璐归�夋嫨锛�1鏄笓瀹跺簱锛�2鏄柊澧�
-      expertfrom: "1",
+
       //璁$畻涓◣鍙傛暟
       taxParam: {
         beneficiaryNo: '',
         money: '0',
         startTime: '',
       },
+
+      // 琛ㄥ崟鍙傛暟
+      form: {},
+      personlist: [],
       // 琛ㄥ崟鏍¢獙
       rules: {
         username: [
@@ -723,54 +652,18 @@
       //鏄惁鏄笓瀹惰垂鐨凮PO瀹℃壒浜哄憳
       ismanager: false,
 
-
-
       unitList: [],
       dialogType: "edit",
       fundflowList: [],
 
-      showDetailInfoDialog: false,
-      showDetailInfoDialogType: "",
+      detailInfoDialogShow: false,
+      detailInfoDialogShowType: "",
       funddetailForm: {
-        index: null,
         beneficiaryname: null,
         beneficiaryno: null,
         unitno: null,
         unitname: null,
-        expertname: null,
-        expertidcardno: null,
-        expertunitno: null,
-        expertunitname: null,
-        experttitle: null,
-        expertdepositbank: null,
-        expertbankcardno: null,
-      },
-      expertform: {
-        id: null,
-        address: null,
-        bankcardno: null,
-        branchbankname: null,
-        createBy: null,
-        createTime: null,
-        del_flag: null,
-        depositbank: null,
-        idcardno: null,
-        personnelunitno: null,
-        pym: null,
-        remark: null,
-        searchValue: null,
-        sex: null,
-        telephone: null,
-        title: null,
-        unitname: null,
-        unitno: null,
-        updateBy: null,
-        updateTime: null,
-        username: null,
-        userno: null,
-        userstatus: 1,
-        usertype: null,
-        wbm: null,
+        index: null,
       },
 
       //闄勪欢鍒楄〃
@@ -794,22 +687,13 @@
   //鏂规硶闆嗗悎
   methods: {
     ShowDetailDialog(spoce, showType) {
-      this.expertfrom = "1";
       this.funddetailForm.index = spoce.$index;
       this.funddetailForm.beneficiaryname = spoce.row.beneficiaryname;
       this.funddetailForm.beneficiaryno = spoce.row.beneficiaryno;
       this.funddetailForm.unitno = spoce.row.unitno;
       this.funddetailForm.unitname = spoce.row.unitname;
-      this.funddetailForm.expertname = "";
-      this.funddetailForm.expertidcardno = "";
-      this.funddetailForm.expertunitno = "";
-      this.funddetailForm.expertunitname = "";
-      this.funddetailForm.experttitle = "";
-      this.funddetailForm.expertdepositbank = "";
-      this.funddetailForm.expertbankcardno = "";
-
-      this.showDetailInfoDialog = true;
-      this.showDetailInfoDialogType = showType;
+      this.detailInfoDialogShow = true;
+      this.detailInfoDialogShowType = showType;
     },
 
     ConfirmDetailDialog() {
@@ -817,90 +701,23 @@
       let tempName = this.funddetailForm.beneficiaryname;
       let tempUnitname = this.funddetailForm.unitname;
       let singleDetail = this.fundDetails[tempIndex];
-
-      if (this.showDetailInfoDialogType == "name") {
-
-        if (this.expertfrom == "1") {
-          //浠庝笓瀹跺垪琛ㄨ幏鍙栦俊鎭�
-          this.personlist.map((res) => {
-            if (tempName == res.username) {
-              console.log("閫夋嫨涓撳", res);
-              singleDetail.beneficiaryno = res.userno;
-              singleDetail.beneficiaryname = res.username;
-              singleDetail.bankcardno = res.bankcardno;
-              singleDetail.branchbankname = res.branchbankname;
-              singleDetail.depositbank = res.depositbank;
-              singleDetail.idcardno = res.idcardno;
-              singleDetail.phone = res.telephone;
-              singleDetail.title = res.title;
-              singleDetail.unitname = res.unitname;
-              singleDetail.unitno = parseInt(res.unitno);
-            }
-          });
-        } else {
-          //淇濆瓨鏂板涓撳
-          this.expertform.id = null;
-          this.expertform.userno = this.personlist[this.personlist.length - 1].id + 1;
-          this.expertform.usertype = "expert";
-          this.expertform.username = this.funddetailForm.expertname;
-          this.expertform.idcardno = this.funddetailForm.expertidcardno;
-          this.expertform.sex = null;
-          this.expertform.telephone = null;
-          this.expertform.address = null;
-          this.expertform.wbm = null;
-          this.expertform.pym = null;
-
-          this.expertform.unitno = this.funddetailForm.expertunitno;
-          try {
-            let unitIndex = this.unitList.findIndex(
-              (item) => this.expertform.unitno == item.organizationid
-            );
-            if (unitIndex > -1) {
-              this.expertform.unitname = this.unitList[unitIndex].organizationname;
-            } else {
-              this.expertform.unitname = this.expertform.unitno;
-            }
-          } catch {
-            this.expertform.unitname = this.expertform.unitno;
+      if (this.detailInfoDialogShowType == "name") {
+        this.personlist.map((res) => {
+          if (tempName == res.username) {
+            singleDetail.beneficiaryno = res.userno;
+            singleDetail.beneficiaryname = res.username;
+            singleDetail.bankcardno = res.bankcardno;
+            singleDetail.branchbankname = res.branchbankname;
+            singleDetail.depositbank = res.depositbank;
+            singleDetail.idcardno = res.idcardno;
+            singleDetail.phone = res.telephone;
+            singleDetail.title = res.title;
+            singleDetail.unitname = res.unitname;
+            singleDetail.unitno = parseInt(res.unitno);
           }
-          this.expertform.title = this.funddetailForm.experttitle;
-          this.expertform.personnelunitno = null;
+        });
 
-          this.expertform.depositbank = this.funddetailForm.expertdepositbank;
-          this.expertform.bankcardno = this.funddetailForm.expertbankcardno;
-          this.expertform.branchbankname = null;
-          this.expertform.remark = null;
-          this.expertform.del_flag = "0";
-
-          addExternalperson(this.expertform).then((response) => {
-            if (response.code == 200) {
-              this.$modal.msgSuccess("鏂板涓撳淇℃伅鎴愬姛锛�");
-              
-              listExternalperson().then((res) => {
-                this.personlist = res.rows;
-                console.log("new personlist", this.personlist);
-                //浠庝笓瀹跺垪琛ㄨ幏鍙栦俊鎭�
-                this.personlist.map((res) => {
-                  if (res.username == this.funddetailForm.expertname) {
-                    console.log("鏂板涓撳", res);
-                    singleDetail.beneficiaryno = res.userno;
-                    singleDetail.beneficiaryname = res.username;
-                    singleDetail.bankcardno = res.bankcardno;
-                    singleDetail.branchbankname = res.branchbankname;
-                    singleDetail.depositbank = res.depositbank;
-                    singleDetail.idcardno = res.idcardno;
-                    singleDetail.phone = res.telephone;
-                    singleDetail.title = res.title;
-                    singleDetail.unitname = res.unitname;
-                    singleDetail.unitno = parseInt(res.unitno);
-                  }
-                });
-              });
-            }
-          });
-        }
-
-      } else if (this.showDetailInfoDialogType == "unit") {
+      } else if (this.detailInfoDialogShowType == "unit") {
         singleDetail.unitno = this.funddetailForm.unitno;
         try {
           let unitIndex = this.unitList.findIndex(
@@ -917,7 +734,7 @@
       }
 
       this.fundDetails[tempIndex] = singleDetail;
-      this.showDetailInfoDialog = false;
+      this.detailInfoDialogShow = false;
     },
 
     handleup(row) {
@@ -1357,12 +1174,7 @@
           for (let k = 0; k < this.fundDetails.length; k++) {
             let tempDetail = this.fundDetails[k];
             if (tempDetail.itemid == null) {
-              this.$modal.msgWarning("鏈嶅姟椤圭洰琛ㄤ腑锛岀" + (k + 1).toString() + "琛岀殑鏈嶅姟椤圭洰鏈�夋嫨锛岃鍏堥�夋嫨鏈嶅姟椤圭洰鍚庡啀鎻愪氦淇濆瓨锛�");
-              return;
-            }
-
-            if (tempDetail.servicesscope == null) {
-              this.$modal.msgWarning("鏈嶅姟椤圭洰琛ㄤ腑锛岀" + (k + 1).toString() + "琛岀殑璐圭敤璇存槑鏈�夋嫨,璇烽�夋嫨璐圭敤璇存槑鍚庡啀鎻愪氦淇濆瓨锛�");
+              this.$modal.msgWarning("鏈嶅姟椤圭洰鏄繀閫夐」锛岃閫夋嫨鏈嶅姟椤圭洰鍚庡啀鎻愪氦淇濆瓨锛�");
               return;
             }
 
@@ -1391,7 +1203,7 @@
               //鑾峰彇鍙傛暟
               this.taxParam.beneficiaryNo = tempDetail.beneficiaryno;
               this.taxParam.money = tempDetail.amount.toString();
-              this.taxParam.startTime = this.form.createTime.substring(0, 10);
+              this.taxParam.startTime = this.form.createTime.substring(0, 10); 
               getTaxByBeneFiciaryNo(this.taxParam).then((res) => {
                 if (res.code == 200) {
                   tempDetail.taxamount = res.data;
@@ -1408,6 +1220,7 @@
               this.taxParam.startTime = this.form.createTime.substring(0, 10);
 
               getTaxBeforeByAfterMoney(this.taxParam).then((res) => {
+                console.log("",res);
                 if (res.code == 200) {
                   tempDetail.taxamount = res.data.nowTax;
                   tempDetail.amount = res.data.nowTaxBeforeMoney;
@@ -1525,18 +1338,18 @@
 
     //涓撳浜哄憳鍒楄〃
     selectReporters() {
-      let types = ["expert"];
-      let templist = [];
-      for (let i = 0; i < types.length; i++) {
-        templist = [];
-        listReportname(types[i]).then((res) => {
+      let arr = ["expert"];
+      let arrreportlist = [];
+      for (let i = 0; i < arr.length; i++) {
+        this.arrr2 = [];
+        listReportname(arr[i]).then((res) => {
           for (let j = 0; j < res.data.length; j++) {
-            templist.push({
+            this.arrr2.push({
               reportName: res.data[j].reportName,
               reportNo: res.data[j].reportNo,
             });
           }
-          this.expertlist = this.expertlist.concat(templist);
+          this.arrr3 = this.arrr3.concat(this.arrr2);
         });
       }
     },
@@ -1613,10 +1426,6 @@
             //   });
             // });
           }
-
-          if (this.fundDetails.length == 0) {
-            this.addRow();
-          }
         });
       });
     },
@@ -1658,10 +1467,6 @@
               remark: this.fundDetails[m].servicesscope,
               servicesscope: this.fundDetails[m].servicesscope,
             });
-          }
-
-          if (this.fundDetails.length == 0) {
-            this.addRow();
           }
         });
       });

--
Gitblit v1.9.3