yxh
yxh
2023-07-14 84c2bfd27fa610fb42dd52b9f145ca2507230c18
src/views/project/fund/expertFeeFundApply/index.vue
@@ -9,7 +9,6 @@
              @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">
@@ -87,14 +86,11 @@
                </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">
@@ -284,7 +280,7 @@
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in arrr3"
                    v-for="item in expertlist"
                    :key="item.reportNo"
                    :label="item.reportName"
                    :value="item.reportName"
@@ -439,21 +435,29 @@
      </div>
    </el-dialog>
    <el-dialog :visible.sync="detailInfoDialogShow" :close-on-click-modal="false" :title="'信息修改'" width="500px"
    <el-dialog :visible.sync="showDetailInfoDialog" :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="detailInfoDialogShowType == 'name'">
          <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-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 arrr3" :key="item.reportNo" :label="item.reportName" :value="item.reportName">
                <el-option v-for="item in expertlist" :key="item.reportNo" :label="item.reportName"
                  :value="item.reportName">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="24" v-if="detailInfoDialogShowType == 'unit'">
          <el-col :span="24" v-if="showDetailInfoDialogType == 'unit'">
            <el-form-item label="单位名称" prop="unitno" label-width="80px">
              <el-select v-model="funddetailForm.unitno" placeholder="单位名称" clearable filterable allow-create
                style="width: 100%">
@@ -463,9 +467,65 @@
            </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="detailInfoDialogShow = false">取 消</el-button>
        <el-button @click="showDetailInfoDialog = false">取 消</el-button>
        <el-button type="primary" @click="ConfirmDetailDialog()">确 定</el-button>
      </span>
    </el-dialog>
@@ -477,7 +537,7 @@
//例如:import 《组件名称》 from '《组件路径》';
import {
  listDonatebaseinfo,
  getDonatebaseinfo,
  getDonatebaseinfo
} from "@/api/project/donatebaseinfo";
import {
  onelistFund,
@@ -493,7 +553,7 @@
  getdownloadYX,
  getdownloadBX,
  batchUploadFund,
  getdetailsByItemId,
  getdetailsByItemId
} from "@/api/project/fund";
import {
  onelistFunds,
@@ -520,7 +580,7 @@
  listOrganization,
  getOrganization,
  listReportname,
  listUser,
  listUser
} from "@/api/project/organization";
import {
  listExternalperson,
@@ -529,7 +589,7 @@
  delExternalperson,
  addExternalperson,
  updateExternalperson,
  exportExternalperson,
  exportExternalperson
} from "@/api/project/externalperson";
import { getUserProfile } from "@/api/system/user";
import Li_area_select from "@/components/Address";
@@ -545,25 +605,24 @@
  },
  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,
      // 导出遮罩层
@@ -592,17 +651,29 @@
        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: [
@@ -652,18 +723,54 @@
      //是否是专家费的OPO审批人员
      ismanager: false,
      unitList: [],
      dialogType: "edit",
      fundflowList: [],
      detailInfoDialogShow: false,
      detailInfoDialogShowType: "",
      showDetailInfoDialog: false,
      showDetailInfoDialogType: "",
      funddetailForm: {
        index: null,
        beneficiaryname: null,
        beneficiaryno: null,
        unitno: null,
        unitname: null,
        index: 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,
      },
      //附件列表
@@ -687,13 +794,22 @@
  //方法集合
  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.detailInfoDialogShow = true;
      this.detailInfoDialogShowType = showType;
      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;
    },
    ConfirmDetailDialog() {
@@ -701,23 +817,90 @@
      let tempName = this.funddetailForm.beneficiaryname;
      let tempUnitname = this.funddetailForm.unitname;
      let singleDetail = this.fundDetails[tempIndex];
      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);
          }
        });
      } else if (this.detailInfoDialogShowType == "unit") {
      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;
          }
          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") {
        singleDetail.unitno = this.funddetailForm.unitno;
        try {
          let unitIndex = this.unitList.findIndex(
@@ -734,7 +917,7 @@
      }
      this.fundDetails[tempIndex] = singleDetail;
      this.detailInfoDialogShow = false;
      this.showDetailInfoDialog = false;
    },
    handleup(row) {
@@ -1174,7 +1357,12 @@
          for (let k = 0; k < this.fundDetails.length; k++) {
            let tempDetail = this.fundDetails[k];
            if (tempDetail.itemid == null) {
              this.$modal.msgWarning("服务项目是必选项,请选择服务项目后再提交保存!");
              this.$modal.msgWarning("服务项目表中,第" + (k + 1).toString() + "行的服务项目未选择,请先选择服务项目后再提交保存!");
              return;
            }
            if (tempDetail.servicesscope == null) {
              this.$modal.msgWarning("服务项目表中,第" + (k + 1).toString() + "行的费用说明未选择,请选择费用说明后再提交保存!");
              return;
            }
@@ -1203,7 +1391,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;
@@ -1220,7 +1408,6 @@
              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;
@@ -1338,18 +1525,18 @@
    //专家人员列表
    selectReporters() {
      let arr = ["expert"];
      let arrreportlist = [];
      for (let i = 0; i < arr.length; i++) {
        this.arrr2 = [];
        listReportname(arr[i]).then((res) => {
      let types = ["expert"];
      let templist = [];
      for (let i = 0; i < types.length; i++) {
        templist = [];
        listReportname(types[i]).then((res) => {
          for (let j = 0; j < res.data.length; j++) {
            this.arrr2.push({
            templist.push({
              reportName: res.data[j].reportName,
              reportNo: res.data[j].reportNo,
            });
          }
          this.arrr3 = this.arrr3.concat(this.arrr2);
          this.expertlist = this.expertlist.concat(templist);
        });
      }
    },
@@ -1426,6 +1613,10 @@
            //   });
            // });
          }
          if (this.fundDetails.length == 0) {
            this.addRow();
          }
        });
      });
    },
@@ -1468,6 +1659,10 @@
              servicesscope: this.fundDetails[m].servicesscope,
            });
          }
          if (this.fundDetails.length == 0) {
            this.addRow();
          }
        });
      });
    },