11
WXL
2023-09-27 128aec95c834751e587e7f6615310ffbe3b13b64
11
已添加3个文件
已修改12个文件
3871 ■■■■ 文件已修改
src/api/project/organization.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/project/fund/applyDetail/index.vue 124 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/project/fund/applyDetail0/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/project/fund/ethicalExpertFeeApply/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/project/fund/expertFeeApply/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/project/fund/medicalCostApply/index.vue 401 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/project/fund/officeExpenseApply/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/project/fund/performanceApply/index.vue 555 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/project/fund/performancedetails/index.vue 2100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/project/fundcheck/ethicalExpertFeeCheck/index.vue 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/project/fundcheck/expertFeeCheck/index.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/project/fundcheck/medicalCostCheck/index.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/project/fundcheck/officeExpenseCheck/index.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/project/fundcheck/performanceCheck/index.vue 595 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/project/travelexpenseapply/index.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/project/organization.js
@@ -15,6 +15,13 @@
    method: 'get',
  })
}
// æŸ¥è¯¢ç»©æ•ˆäººå‘˜åˆ—表
export function listperformance(userType) {
  return request({
    url: '/externalperson/group/getPersonInfo/' + userType,
    method: 'get',
  })
}
// æŸ¥è¯¢æœºæž„管理列表
src/views/project/fund/applyDetail/index.vue
@@ -72,18 +72,7 @@
              }}</el-radio>
            </el-form-item>
          </el-col>
          <!-- <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">
            <el-form-item label="联系电话" prop="phone">
              <el-input v-model="form.phone" placeholder="请输入联系电话" />
@@ -109,42 +98,6 @@
          </el-col>
        </el-row>
        <el-row style="text-align: left">
          <!--
          <el-col :span="5">
            <el-form-item label="合计金额" prop="amountrequested">
              <el-input v-model="form.amountrequested" placeholder="申请金额" :disabled="true" />
            </el-form-item>
          </el-col>
          -->
          <!--
          <el-col :span="5">
            <el-form-item label="应缴税" prop="taxcost" v-if="businessType == '1' || businessType == '2'">
              <el-input v-model="form.taxcost" placeholder="应缴税金额合计" :disabled="true" />
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="税后金额" prop="pretaxcost">
              <el-input v-model="form.taxedcost" placeholder="税后金额合计" :disabled="true" />
            </el-form-item>
          </el-col>-->
          <el-col :span="5">
            <el-form-item label="预审状态" prop="infoid">
              <el-select
                v-model="form.checkstatus"
                filterable
                placeholder="请选择预审状态"
              >
                <el-option
                  v-for="item in baselisttages"
                  :key="item.id"
                  :label="item.name"
                  :value="item.id"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="申请说明" prop="remark">
              <el-input v-model="form.remark" placeholder="申请说明" />
@@ -762,8 +715,27 @@
            />
          </el-table>
        </el-row>
        <el-row
          style="margin-top: 25px; margin-bottom: 5px"
          v-if="operationType == 'check'"
        >
          <el-col :span="7">
            <el-form-item label="预审状态" prop="infoid">
              <el-radio-group
                v-model="form.checkstatus"
                align="left"
                :disabled="userprofile.nickName != '陈慕华'"
              >
                <el-radio label="1">待预审</el-radio>
                <el-radio label="2">预审通过等待材料</el-radio>
                <el-radio label="3">已收到报销材料</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row
          style="margin-top: 5px; margin-bottom: 5px"
          v-if="operationType == 'check'"
        >
          <el-col :span="7">
@@ -775,6 +747,7 @@
            </el-form-item>
          </el-col>
        </el-row>
        <el-row v-if="operationType == 'check'">
          <el-col :span="17">
            <el-form-item label="审核备注" align="left">
@@ -1828,6 +1801,8 @@
      this.reset();
      getFund(this.curId).then(response => {
        console.log(response.data, "初始");
        this.form = response.data;
        sessionStorage.removeItem("apiform");
@@ -1878,6 +1853,8 @@
      this.reset();
      getFund(this.curId).then(response => {
        console.log(response.data, "初始");
        this.form = response.data;
        sessionStorage.removeItem("apiform");
        sessionStorage.setItem("apiform", JSON.stringify(this.form));
@@ -1924,6 +1901,7 @@
      this.reset();
      getFund(this.curId).then(response => {
        console.log(response.data, "初始");
        this.form = response.data;
        sessionStorage.removeItem("apiform");
@@ -2003,9 +1981,9 @@
          //判断是否存在上报记录
          this.form.recordstatus = 0;
          if (!this.form.id) {
            this.form.id = this.$route.query.id
            this.form.id = this.$route.query.id;
          }
          updateFund(this.form).then(response => {
            if (response.code == 200) {
              this.$message({
@@ -2136,44 +2114,6 @@
              ].subjecttypename;
            }
            this.rbDetails[i] = tempDetail;
            /*
            //计算个税
            //if (isNaN(parseFloat(tempDetail.taxedamount)))
            //获取参数
            this.taxParam.beneficiaryNo = tempDetail.beneficiaryno;
            this.taxParam.startTime = this.form.createTime.substring(0, 10);
            // è®¡ç®—税后金额
            if (tempDetail.taxedamount == undefined || tempDetail.taxedamount == null || tempDetail.taxedamount == 0 || tempDetail.taxedamount == '') {
              //获取参数
              this.taxParam.money = tempDetail.amount.toString();
              getTaxByBeneFiciaryNo(this.taxParam).then((res) => {
                if (res.code == 200) {
                  tempDetail.taxamount = res.data;
                  tempDetail.taxedamount = tempDetail.amount - tempDetail.taxamount;
                  this.rbDetails[k] = tempDetail;
                  this.totalAfterTaxAmount += parseFloat(tempDetail.taxedamount);
                  this.totalAmount += parseFloat(tempDetail.amount);
                }
              });
            }
            // è®¡ç®—税前、税费、税后金额
            if (tempDetail.amount == undefined || tempDetail.amount == null || tempDetail.amount == 0 || tempDetail.amount == '') {
              //获取参数
              this.taxParam.money = tempDetail.taxedamount.toString();
              getTaxBeforeByAfterMoney(this.taxParam).then((res) => {
                if (res.code == 200) {
                  tempDetail.taxamount = res.data.nowTax;
                  tempDetail.amount = parseFloat(res.data.nowTaxBeforeMoney);
                  this.rbDetails[k] = tempDetail;
                  this.totalAfterTaxAmount += parseFloat(tempDetail.taxedamount);
                  this.totalAmount += parseFloat(tempDetail.amount);
                }
              });
            }
            */
          }
          //计算当前行报销内容费用合计,税前金额(amount)、扣税金额(taxamount)、税后金额(taxedamount)
          if (this.businessType == "2") {
@@ -2265,6 +2205,7 @@
          );
          sessionStorage.setItem("apiform", JSON.stringify(this.form));
          addorupdateFund(this.form).then(response => {
            console.log(this.form);
            console.log(response, "保存返参");
            if (response.code === 200) {
              this.$modal.msgSuccess("申请单保存成功!");
@@ -2292,6 +2233,10 @@
    //审批提交
    checksubmit() {
      if (this.form.checkstatus != 3 && this.userprofile.nickName == "陈慕华") {
        this.$modal.msgError("请确认收到材料后再提交审核!");
        return;
      }
      let checkFundObj = {
        // fundid: this.checkObj.fundid,
        fundid: this.curId,
@@ -2319,6 +2264,7 @@
    getUserProfile() {
      getUserProfile().then(res => {
        this.userprofile = res.data;
        console.log(this.userprofile);
        this.standardlevel = res.data.standardlevel;
        if (
          this.userprofile.userName == "admin" ||
@@ -2482,6 +2428,7 @@
    //获取服务项目
    getRowFeeItems(rowindex, row) {
      let list = this.feeItemTypes.filter(r => r.itemType == row.applytype);
      console.log(list[0]);
      row.itemlist = list[0].itemDetails;
      this.$set(this.rbDetails, rowindex, row);
    },
@@ -2637,7 +2584,6 @@
      //获取参数
      // this.taxParam.beneficiaryNo = row.beneficiaryno;
      // this.taxParam.startTime = this.form.createTime.substring(0, 10);
      // if (type == "A") {
      //   // è®¡ç®—个税、税后金额
      //   this.taxParam.money = row.amount.toString();
src/views/project/fund/applyDetail0/index.vue
@@ -65,7 +65,7 @@
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="捐献者" prop="name">
            <el-form-item label="捐献者" prop="donorname">
              <el-input :disabled="true" v-model="form.donorname" placeholder="请输入捐献者姓名" />
            </el-form-item>
          </el-col>
src/views/project/fund/ethicalExpertFeeApply/index.vue
@@ -158,8 +158,8 @@
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="捐献者" prop="name">
              <el-input :disabled="true" v-model="form.name" placeholder="请输入捐献者姓名" clearable />
            <el-form-item label="捐献者" prop="donorname">
              <el-input :disabled="true" v-model="form.donorname" placeholder="请输入捐献者姓名" clearable />
            </el-form-item>
          </el-col>
        </el-row>
src/views/project/fund/expertFeeApply/index.vue
@@ -389,10 +389,10 @@
            </el-form-item>
          </el-col>-->
          <el-col :span="5">
            <el-form-item label="捐献者" prop="name">
            <el-form-item label="捐献者" prop="donorname">
              <el-input
                :disabled="true"
                v-model="form.name"
                v-model="form.donorname"
                placeholder="请输入捐献者姓名"
              />
            </el-form-item>
src/views/project/fund/medicalCostApply/index.vue
@@ -116,408 +116,7 @@
        </el-card>
      </el-col>
    </el-row>
    <!-- æ·»åŠ æˆ–ä¿®æ”¹è´¹ç”¨ç”³è¯·å• -->
    <el-dialog :visible.sync="dialogOpen" :close-on-click-modal="false" width="1400px" :title="title"
      style="text-align: center" v-loading="loading">
      <el-form ref="form" :model="form" label-width="120px" :rules="rules">
        <el-row style="text-align: left">
          <el-col :span="5">
            <el-form-item label="申请日期" prop="createTime">
              <el-date-picker clearable style="width: 100%" v-model="form.createTime" type="date"
                value-format="yyyy-MM-dd HH:mm:ss" placeholder="申请日期">
              </el-date-picker>
            </el-form-item>
          </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-option v-for="dict in userlist" :key="dict.index" :label="dict.nickname"
                  :value="dict.nickname"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="所属组别" prop="deptmentname">
              <el-input v-model="form.deptmentname" placeholder="请输入所属组别" clearable />
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="组长" prop="managername">
              <el-input v-model="form.managername" placeholder="请输入组长" clearable />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row style="text-align: left">
          <el-col :span="5">
            <el-form-item label="申请类型">
              <el-radio v-model="form.applytype" label="3">医学成本申请</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-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="捐献者" prop="name">
              <el-input :disabled="true" v-model="form.name" placeholder="请输入捐献者姓名" clearable />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row style="text-align: left">
          <el-col :span="5">
            <el-form-item label="申请金额" prop="amountrequested">
              <el-input v-model="form.amountrequested" placeholder="申请金额" :disabled="true" />
            </el-form-item>
          </el-col>
          <!--<el-col :span="5">
            <el-form-item label="税前金额" prop="pretaxcost">
              <el-input v-model="form.pretaxcost" placeholder="税前金额合计" :disabled="true" />
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="税后金额" prop="pretaxcost">
              <el-input v-model="form.taxedcost" placeholder="税后金额合计" :disabled="true" />
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="审核状态" prop="recordstatus">
              <el-input v-if="0" v-model="form.recordstatus" placeholder="审核意见"/>
              <el-select v-model="form.recordstatus" placeholder="请选择审核状态" clearable size="small" :disabled="true">
                <el-option v-for="dict in dict.type.sys_recordstatus" :key="dict.value" :label="dict.label"
                  :value="dict.value" />
              </el-select>
            </el-form-item>
          </el-col>-->
          <!--
          <el-col :span="5">
            <el-form-item label="联系电话" prop="phone">
              <el-input v-model="form.phone" placeholder="请输入申请者的联系方式" clearable />
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="工作单位" prop="unitno">
              <org-selecter ref="orgSelecter" :org-type="'3'" v-model="form.unitno" />
            </el-form-item>
          </el-col>-->
        </el-row>
        <el-row style="margin-bottom: 10px">
          <el-col :span="4">
            <el-button @click.native.prevent="addAlls" type="primary" size="small">
              å¯¼å…¥æœåŠ¡é¡¹ç›®
            </el-button>
          </el-col>
        </el-row>
        <el-row style="margin-top: 5px; margin-bottom: 5px">
          <el-table :data="fundDetails" border highlight-current-row>
            <el-table-column prop="orderno" align="center" label="排序" width="80">
              <template slot-scope="scope">
                <el-input v-model="scope.row.orderno" placeholder="排序" />
              </template>
            </el-table-column>
            <el-table-column prop="itemtype" align="center" label="费用类型" width="220">
              <template slot-scope="scope">
                <el-select v-model="scope.row.applytype" placeholder="费用类型" @change="LoadItemTypeArr(scope.row)">
                  <el-option v-for="dict in fundtypeArr" :key="dict.value" :label="dict.label"
                    :value="dict.value"></el-option>
                </el-select>
              </template>
            </el-table-column>
            <el-table-column prop="itemtype" align="center" label="服务项目" width="260">
              <template slot-scope="scope">
                <el-select v-model="scope.row.itemid" placeholder="服务项目" clearable filterable allow-create
                  @change="select(scope.row)" :filter-method="val => SearchItem(val, scope)">
                  <el-option v-for="dict in scope.row.itemArr" :key="dict.id" :label="dict.itemName"
                    :value="dict.id"></el-option>
                </el-select>
              </template>
            </el-table-column>
            <el-table-column prop="beneficiaryno" align="center" label="姓名" width="120" v-if="form.applytype != 3">
              <template slot-scope="scope">
                <el-button type="primary" plain @click="ShowDetailDialog(scope, 'name')">{{ scope.row.beneficiaryname
                }}</el-button>
              </template>
            </el-table-column>
            <!-- <el-table-column
              prop="servicesscopename"
              align="center"
              label="费用说明"
              width="180"
            >
              <template slot-scope="scope">
                <el-select
                  v-model="scope.row.servicesscopename"
                  placeholder="费用说明"
                  clearable
                  allow-create
                  filterable
                  @change="selectremark(scope.row)"
                >
                  <el-option
                    v-for="dict in fundblock"
                    :key="dict.expensedescribe"
                    :label="dict.expensedescribe"
                    :value="dict.expensedescribe"
                  ></el-option>
                </el-select>
              </template>
                              </el-table-column> -->
            <el-table-column prop="amount" align="center" label="税前金额" width="120" v-if="form.applytype != 3">
              <template slot-scope="scope">
                <el-select v-model="scope.row.amount" placeholder="税前金额" clearable filterable allow-create
                  @change="selectamount(scope.row)">
                  <el-option v-for="dict in fundblock" :key="dict.expensedescribe" :label="dict.expense"
                    :value="dict.expense"></el-option>
                </el-select>
                <!--
                <el-input
                  v-model="scope.row.amount"
                  placeholder="税前金额"
                  @change="selectamount(scope.row)"
                  @blur="
                    (val) => {
                      sumTotalFee(scope.row);
                    }
                  " />
                    -->
              </template>
            </el-table-column>
            <el-table-column prop="taxamount" align="center" label="扣税" width="120" v-if="form.applytype != '3'">
              <template slot-scope="scope">
                <el-input v-model="scope.row.taxamount" placeholder="扣税" @blur="val => {
                  sumTotalFee(scope.row);
                }
                  " />
              </template>
            </el-table-column>
            <el-table-column prop="taxedamount" align="center" label="税后金额" width="120" v-if="form.applytype != '3'">
              <template slot-scope="scope">
                <el-input v-model="scope.row.taxedamount" placeholder="税后金额" />
              </template>
            </el-table-column>
            <el-table-column prop="price" align="center" label="ä»·æ ¼" width="120" v-if="form.applytype == '3'">
              <template slot-scope="scope">
                <el-input v-model="scope.row.price" placeholder="ä»·æ ¼" @blur="val => {
                  sumTotalFee(scope.row);
                }
                  " />
              </template>
            </el-table-column>
            <el-table-column prop="quantity" align="center" label="数量" width="80" v-if="form.applytype == '3'">
              <template slot-scope="scope">
                <el-input v-model="scope.row.quantity" placeholder="数量" @blur="val => {
                  sumTotalFee(scope.row);
                }
                  " />
              </template>
            </el-table-column>
            <el-table-column prop="amount" align="center" label="金额" width="120" v-if="form.applytype == '3'">
              <template slot-scope="scope">
                <el-input v-model="scope.row.amount" placeholder="ä»·æ ¼" @blur="val => {
                  sumTotalFee(scope.row);
                }
                  " />
              </template>
            </el-table-column>
            <el-table-column prop="unitno" align="center" label="费用单位名称" width="220">
              <template slot-scope="scope">
                <el-button type="primary" plain @click="ShowDetailDialog(scope, 'unit')">{{ scope.row.unitname
                }}</el-button>
              </template>
            </el-table-column>
            <el-table-column prop="depositbank" align="center" label="开户银行" width="200">
              <template slot-scope="scope">
                <el-input v-model="scope.row.depositbank" placeholder="开户银行" />
              </template>
            </el-table-column>
            <el-table-column prop="bankcardno" align="center" label="银行卡号" width="210">
              <template slot-scope="scope">
                <el-input v-model="scope.row.bankcardno" placeholder="银行卡号" />
              </template>
            </el-table-column>
            <el-table-column prop="remark" align="center" label="备注" width="210" v-if="form.applytype == '3'">
              <template slot-scope="scope">
                <el-input v-model="scope.row.remark" placeholder="备注" />
              </template>
            </el-table-column>
            <el-table-column prop="title" align="center" label="职称" width="120" v-if="form.applytype != '3'">
              <template slot-scope="scope">
                <el-input v-model="scope.row.title" placeholder="职称" />
              </template>
            </el-table-column>
            <el-table-column prop="idcardno" align="center" label="身份证号" width="200" v-if="form.applytype != '3'">
              <template slot-scope="scope">
                <el-input v-model="scope.row.idcardno" placeholder="身份证号" />
              </template>
            </el-table-column>
            <el-table-column prop="depositbank" align="center" label="开户银行" width="200" v-if="form.applytype != '3'">
              <template slot-scope="scope">
                <el-input v-model="scope.row.depositbank" placeholder="开户银行" />
              </template>
            </el-table-column>
            <el-table-column prop="bankcardno" align="center" label="银行卡号" width="210" v-if="form.applytype != '3'">
              <template slot-scope="scope">
                <el-input v-model="scope.row.bankcardno" placeholder="银行卡号" />
              </template>
            </el-table-column>
            <el-table-column fixed="right" align="center" label="操作" width="120" v-if="dialogType == 'edit'">
              <template slot-scope="scope">
                <el-button type="text" size="mini" @click="addRow(scope.$index)">新增</el-button>
                <el-button @click.native.prevent="
                  deleteRows(scope.row, scope.$index, fundDetails)
                  " type="text" size="small">
                  åˆ é™¤
                </el-button>
                <el-button @click.native.prevent="
                  Filepopup(scope.$index, fundDetails, scope.row)
                  " type="text" size="small">
                  ç¥¨æ®
                </el-button>
              </template>
            </el-table-column>
          </el-table>
        </el-row>
        <!-- <el-row>
          <el-col :span="4">
            <el-button
              type="primary"
              plain
              icon="el-icon-plus"
              size="mini"
              @click="addRow"
              >新增成本费用</el-button
            >
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="7">
            <el-form-item label="预支金额" prop="prepaidamount">
              <el-input v-model="form.prepaidamount" placeholder="申请金额" />
            </el-form-item>
          </el-col>
          <el-col :span="7">
            <el-form-item label="OPO中心签字" prop="opochecker">
              <el-input v-model="form.opochecker" placeholder="opo中心签字" />
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="财务副院长" prop="finvicepresident">
              <el-input v-model="form.finvicepresident" placeholder="财务副院长" />
            </el-form-item>
          </el-col>
          <el-col :span="7">
            <el-form-item label="业务副院长" prop="busvicepresident">
              <el-input v-model="form.busvicepresident" placeholder="业务副院长" />
            </el-form-item>
          </el-col>
          <el-col :span="7">
            <el-form-item label="办公室主任" prop="officedirector">
              <el-input v-model="form.officedirector" placeholder="请输入办公室主任" />
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="财务部负责人" prop="financedirector">
              <el-input v-model="form.financedirector" placeholder="请输入财务部负责人" />
            </el-form-item>
          </el-col>
          <el-col :span="7">
            <el-form-item label="财务审核" prop="financechecher">
              <el-input v-model="form.financechecher" placeholder="请输入财务审核" />
            </el-form-item>
          </el-col>
        </el-row> -->
        <el-row>
          <el-col :span="24">
            <el-form-item label="费用申请附件:" align="left" prop="annexbankcard">
              <el-upload size="mini" class="upload-demo" :action="uploadFileUrl" :file-list="fileList" multiple
                :limit="20" :headers="headers" :on-success="(response, file, fileList) =>
                  uploadSccess(response, file, fileList)
                  " :on-preview="downFile" :disabled="dialogType == 'detail'" :on-error="handleUploadError"
                :on-exceed="handleExceed" :on-remove="handleremove" accept="image/*,.pdf">
                <el-button :disabled="dialogType == 'detail'" size="small" type="primary">上传</el-button>
              </el-upload>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row v-if="dialogType == 'detail'">
          <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>
            <el-table-column label="审核备注" align="center" prop="flowcontent" />
          </el-table>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm" v-if="dialogType == 'edit'">保 å­˜</el-button>
        <!-- <el-button type="success" @click="print">打 å°</el-button> -->
        <el-button @click="cancel">取 æ¶ˆ</el-button>
      </div>
    </el-dialog>
    <el-dialog :visible.sync="detailInfoDialogShow" :close-on-click-modal="false" :title="'费用单位选择'"
      style="text-align: center" v-loading="loading" width="500px">
      <el-form ref="funddetailForm" :model="funddetailForm" label-width="120px">
        <el-row>
          <el-col :span="24" v-if="detailInfoDialogShowType == 'name'">
            <el-form-item align="left" 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>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="24" v-if="detailInfoDialogShowType == 'unit'">
            <el-form-item align="left" label="单位名称" prop="unitno" label-width="80px">
              <el-select v-model="funddetailForm.unitno" placeholder="请选择单位" clearable filterable allow-create
                style="width: 100%">
                <el-option v-for="(item, index) in bankaccountlist" :key="index" :label="item.reportName"
                  :value="item.reportNo"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="detailInfoDialogShow = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="ConfirmDetailDialog()">ç¡® å®š</el-button>
      </span>
    </el-dialog>
    <el-dialog :title="pdftitle" :visible.sync="pdfVisible" width="50%">
      <div class="pdfimg">
        <div class="box-pdf">
          <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)
                " :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>
            </el-upload>
          </div>
          <!-- <div
            class="pdftit"
            @click="pdffn(item)"
            v-for="item in fileList"
            :key="item.name"
          >
            {{ item.name }}
          </div> -->
        </div>
        <div v-if="this.previewpdf" class="pdfimgmin">
          <img :src="pdfimg" />
        </div>
        <div v-else class="pdfimgmins">{{ hintitle }}</div>
      </div>
    </el-dialog>
  </div>
</template>
src/views/project/fund/officeExpenseApply/index.vue
@@ -119,8 +119,8 @@
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="捐献者" prop="name">
              <el-input :disabled="true" v-model="form.name" placeholder="请输入捐献者姓名" clearable />
            <el-form-item label="捐献者" prop="donorname">
              <el-input :disabled="true" v-model="form.donorname" placeholder="请输入捐献者姓名" clearable />
            </el-form-item>
          </el-col>
        </el-row>
src/views/project/fund/performanceApply/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,555 @@
<!--  -->
<template>
  <div class="app-container">
    <el-form
      :model="queryParams"
      ref="queryForm"
      :inline="true"
      label-width="70px"
    >
      <el-row align="left">
        <el-col :span="5">
          <el-form-item label="经办人" prop="name">
            <el-input
              v-model="queryParams.name"
              placeholder="请输入经办人"
              clearable
              size="small"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
        </el-col>
        <el-col :span="5">
          <el-form-item label="金额" prop="money" style="float: left">
            <el-input
              v-model="queryParams.money"
              placeholder="请输入申请人金额"
              clearable
              size="small"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
        </el-col>
        <el-col :span="7">
          <el-form-item label="申请日期" prop="createTime">
            <el-date-picker
              format="yyyy-MM-dd"
              value-format="yyyy-MM-dd"
              v-model="value1"
              type="daterange"
              @blur="onpick"
              range-separator="至"
              start-placeholder="报销申请开始日期"
              end-placeholder="报销申请结束日期"
              @keyup.enter.native="handleQuery"
            >
            </el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="5">
          <el-form-item label="审批状态" prop="CHECKFLAG" style="float: left">
            <el-select
              v-model="queryParams.CHECKFLAG"
              placeholder="请选择"
              style="width: 100%"
            >
              <el-option
                v-for="item in checkFlagOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-button
            type="primary"
            icon="el-icon-search"
            size="mini"
            @click="handleQuery"
            >搜索</el-button
          >
          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
            >重置</el-button
          >
        </el-col>
      </el-row>
    </el-form>
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          >新增</el-button
        >
        <!-- v-hasPermi="['project:medicalfund:add']" -->
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          :loading="exportLoading"
          @click="handleExport"
          >导出</el-button
        >
      </el-col>
      <!-- v-hasPermi="['project:medicalfund:export']" -->
      <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
    </el-row>
    <el-table v-loading="loading" border :data="donateconsolationfundList">
      <el-table-column
        label="申请日期"
        align="center"
        prop="createTime"
        width="180px"
      >
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
        </template>
      </el-table-column>
      <el-table-column
        label="申请人"
        align="center"
        prop="username"
        width="150px"
      />
      <el-table-column
        label="申请金额"
        align="center"
        prop="pretaxcost"
        width="150px"
      />
      <el-table-column
        label="审核状态"
        width="150"
        align="center"
        prop="recordstatus"
      >
        <template slot-scope="scope">
          <dict-tag
            :options="dict.type.sys_recordstatus"
            :value="scope.row.recordstatus"
          />
        </template>
      </el-table-column>
      <el-table-column
        label="绩效类型"
        width="150"
        align="center"
        prop="performancetype"
      >
        <template slot-scope="scope">
          <dict-tag
            :options="dict.type.sys_performance_type"
            :value="scope.row.performancetype"
          />
        </template>
      </el-table-column>
      <el-table-column label="备注" align="center" prop="remark" />
      <el-table-column
        label="操作"
        fixed="right"
        align="center"
        class-name="small-padding fixed-width"
        width="280px"
      >
        <template slot-scope="scope">
          <el-button
            v-if="scope.row.recordstatus == -1 || scope.row.recordstatus == 1"
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleup(scope.row)"
            >上报</el-button
          >
          <el-button
            v-if="scope.row.recordstatus == -1 || scope.row.recordstatus == 1"
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['project:medicalfund:edit']"
            >修改</el-button
          >
          <el-button
            size="mini"
            type="text"
            icon="el-icon-view"
            @click="handleDetail(scope.row)"
            >查看</el-button
          >
          <el-button
            v-if="scope.row.recordstatus == -1 || scope.row.recordstatus == 1"
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['project:medicalfund:delete']"
            >删除</el-button
          >
          <el-button
            size="mini"
            type="text"
            icon="el-icon-download"
            @click="mixExport(scope.row.id)"
            v-hasPermi="['project:medicalfund:download']"
            >下载</el-button
          >
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>
<script>
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
//例如:import ã€Šç»„件名称》 from '《组件路径》';
import {
  onelistFund,
  listFund,
  getFund,
  delFund,
  addFund,
  updateFund,
  getdownloadYX,
  getdownloadBX
} from "@/api/project/fund";
import {
  delFunddetail,
  addFunddetail,
  getownFundDetail
} from "@/api/project/funddetail";
import Li_area_select from "@/components/Address";
import OrgSelecter from "@/views/project/components/orgselect";
import { getToken } from "@/utils/auth";
export default {
  //import引入的组件需要注入到对象中才能使用
  components: {
    Li_area_select,
    OrgSelecter
  },
  name: "fundApply",
  dicts: [
    "sys_recordstatus",
    "sys_OrganizationType",
    "sys_DonationStatus",
    "sys_depositbank",
    "sys_FamilyRelation",
    "sys_IDType",
    "sys_ConsolationType",
    "sys_fund_type",
    "sys_finsubject",
    "sys_financeitemtype",
    "sys_expensetype",
    "sys_performance_type"
  ],
  data() {
    //这里存放数据
    return {
      businesstype: "4",
      // é®ç½©å±‚
      loading: true,
      // å¯¼å‡ºé®ç½©å±‚
      exportLoading: false,
      total: 0,
      queryParams: {
        organizationname: null,
        organizationtype: null,
        pageNum: 1,
        pageSize: 10,
        name: null,
        idcardno: null,
        residenceprovince: null,
        residencecity: null,
        residencetown: null,
        recordstate: null,
        treatmenthospitalname: null,
        donorno: null,
        reportername: null,
        reporttime: null
      },
      checkFlagOptions: [
        {
          value: 0,
          label: "已审批"
        },
        {
          value: 1,
          label: "待审批"
        },
        {
          value: 2,
          label: "全部"
        }
      ],
      fundQueryParam: {
        infoid: null,
        applytype: "5",
        createBy: null,
        organizationname: null,
        organizationtype: null,
        pageNum: 1,
        pageSize: 10,
        name: null,
        idcardno: null,
        residenceprovince: null,
        residencecity: null,
        residencetown: null,
        recordstate: null,
        treatmenthospitalname: null,
        donorno: null,
        reportername: null,
        reporttime: null
      },
      // è¡¨å•参数
      form: {},
      //捐献案例列表数据
      donatebaseinfoList: [],
      //是否显示费用申请弹窗
      dialogOpen: false,
      //费用申请表单title
      applyFormTitle: "",
      // æçŒ®äººé“慰问金表格数据
      donateconsolationfundList: [],
      //明细记录
      fundDetails: [],
      // å¼¹å‡ºå±‚标题
      title: "",
      itemArr: [],
      //用户
      userlist: [],
      //银行账号
      bankaccountlist: [],
      //机构单位
      unitList: [],
      //费用类型数组
      fundtypeArr: [],
      defaultperson: {},
      fundblock: [],
      fundtypeArrAll: [],
      dialogType: "edit",
      detailInfoDialogShow: false,
      detailInfoDialogShowType: "",
      funddetailForm: {
        beneficiaryname: null,
        beneficiaryno: null,
        unitno: null,
        unitname: null,
        index: null
      },
      //附件列表
      fileList: [],
      //上传附件路径
      uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload",
      headers: {
        Authorization: "Bearer " + getToken()
      }
    };
  },
  //监听属性 ç±»ä¼¼äºŽdata概念
  computed: {},
  //监控data中的数据变化
  watch: {},
  //方法集合
  methods: {
    handleup(row) {
      console.log(row);
      this.$confirm("是否确认将登记记录上报?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
          //查找是否存在登记完成记录
          //判断是否存在上报记录
          row.recordstatus = 0;
          updateFund(row).then(response => {
            if (response.code == 200) {
              this.$message({
                type: "success",
                message: "申请成功"
              });
            } else {
              this.$message({
                type: "error",
                message: "申请失败"
              });
            }
            this.loading = false;
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消申请"
          });
        });
    },
    /** æœç´¢æŒ‰é’®æ“ä½œ */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** é‡ç½®æŒ‰é’®æ“ä½œ */
    resetQuery() {
      this.daterangeReporttime = [];
      this.resetForm("queryForm");
      this.handleQuery();
    },
    /** æ–°å¢žæŒ‰é’®æ“ä½œ */
    handleAdd() {
      this.$router.push({
        path: "/finance/performancedetails/",
        query: { id: 0, businessType: "5", operationType: "add" }
      });
    },
    /** ä¿®æ”¹æŒ‰é’®æ“ä½œ */
    handleUpdate(row) {
      this.$router.push({
        path: "/finance/performancedetails/",
        query: { id: row.id, businessType: "5", operationType: "update" }
      });
    },
    /** æŸ¥çœ‹æŒ‰é’®æ“ä½œ */
    handleDetail(row) {
      this.$router.push({
        path: "/finance/performancedetails/",
        query: { id: row.id, businessType: "5", operationType: "detail" }
      });
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      const queryParams = this.queryParams;
      this.$modal
        .confirm("是否确认导出所有报销申请数据项?")
        .then(() => {
          this.exportLoading = true;
          return exportReimbursement(queryParams);
        })
        .then(response => {
          this.$download.name(response.msg);
          this.exportLoading = false;
        })
        .catch(() => {});
    },
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal
        .confirm("是否确认删除该记录?")
        .then(function() {
          return delFund(ids);
        })
        .then(() => {
          getownFundDetail(ids).then(res => {
            let listdetails = res.data;
            for (let i = 0; i < listdetails.length; i++) {
              delFunddetail(listdetails[i].id);
            }
          });
          this.getList();
          this.$modal.msgSuccess("删除成功");
        })
        .catch(() => {});
    },
    /** æŸ¥è¯¢åˆ—表 */
    getList() {
      this.loading = true;
      this.queryParams.params = {};
      console.log(21);
      listFund(this.fundQueryParam).then(response => {
        console.log(11);
        this.loading = false;
        this.donateconsolationfundList = response.rows;
      });
    },
    // æçŒ®è€…医学统计打印
    dayin2(id) {
      getdownloadYX(id).then(res => {
        if (res.downloadUrl) {
          var fileUrl = res;
          //获取当前网址
          var urlBase = process.env.VUE_APP_BASE_API;
          var curWWWPath = window.document.location.href;
          var pos = curWWWPath.indexOf(window.document.location.pathname);
          // åˆ›å»ºa标签
          var aEle = document.createElement("a");
          aEle.href =
            curWWWPath.substring(0, pos) + urlBase + fileUrl["downloadUrl"];
          aEle.click();
          this.$alert("下载成功", "提示", {
            confirmButtonText: "确定",
            type: "success"
          });
        }
      });
    },
    //汇总打印
    totaldayin(e) {
      // const id =this.row.id
      getdownloadBX(e).then(res => {
        if (res.downloadUrl) {
          var fileUrl = res;
          //获取当前网址
          var urlBase = process.env.VUE_APP_BASE_API;
          var curWWWPath = window.document.location.href;
          var pos = curWWWPath.indexOf(window.document.location.pathname);
          // åˆ›å»ºa标签
          var aEle = document.createElement("a");
          aEle.href =
            curWWWPath.substring(0, pos) + urlBase + fileUrl["downloadUrl"];
          aEle.click();
          this.$alert("下载成功", "提示", {
            confirmButtonText: "确定",
            type: "success"
          });
        }
      });
    },
    // ä¸‹è½½æŒ‰é’®
    mixExport(id) {
      this.dayin2(id);
      //this.totaldayin(id);
    }
  },
  //生命周期 - åˆ›å»ºå®Œæˆï¼ˆå¯ä»¥è®¿é—®å½“前this实例)
  created() {
    this.getList();
  },
  //生命周期 - æŒ‚载完成(可以访问DOM元素)
  mounted() {},
  beforeCreate() {}, //生命周期 - åˆ›å»ºä¹‹å‰
  beforeMount() {}, //生命周期 - æŒ‚载之前
  beforeUpdate() {}, //生命周期 - æ›´æ–°ä¹‹å‰
  updated() {}, //生命周期 - æ›´æ–°ä¹‹åŽ
  beforeDestroy() {}, //生命周期 - é”€æ¯ä¹‹å‰
  destroyed() {}, //生命周期 - é”€æ¯å®Œæˆ
  activated() {} //如果页面有keep-alive缓存功能,这个函数会触发
};
</script>
<style scoped>
/* @import url(); å¼•入公共cssç±» */
</style>
src/views/project/fund/performancedetails/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,2100 @@
<!--  -->
<template>
  <div class="Modifydetailscla">
    <div class="boxdiv">
      <div class="top-text">{{ title }}</div>
      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
        <el-row>
          <el-col :span="5">
            <el-form-item label="申请日期" prop="createTime">
              <el-date-picker
                clearable
                style="width: 100%"
                v-model="form.createTime"
                type="date"
                value-format="yyyy-MM-dd HH:mm:ss"
                placeholder="申请日期"
              >
              </el-date-picker>
            </el-form-item>
          </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%"
                @change="getUserAccount"
              >
                <el-option
                  v-for="dict in userlist"
                  :key="dict.index"
                  :label="dict.nickname"
                  :value="dict.nickname"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="所属组别" prop="deptmentname">
              <el-input
                v-model="form.deptmentname"
                placeholder="请输入所属组别"
                clearable
              />
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="组长" prop="managername">
              <el-input
                v-model="form.managername"
                placeholder="请输入组长"
                clearable
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="5">
            <el-form-item label="申请单类型">
              <el-select
                v-model="form.performancetype"
                filterable
                placeholder="请选择申请单状态"
              >
                <el-option
                  v-for="item in PerformanceType"
                  :key="item.id"
                  :label="item.name"
                  :value="item.id"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="联系电话" prop="phone">
              <el-input v-model="form.phone" placeholder="请输入联系电话" />
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="申请金额" prop="pretaxcost">
              <el-input
                v-model="form.pretaxcost"
                placeholder="税前金额合计"
                :disabled="true"
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row style="text-align: left">
          <el-col :span="5">
            <el-form-item label="预审状态" prop="infoid">
              <el-select
                v-model="form.checkstatus"
                filterable
                placeholder="请选择预审状态"
              >
                <el-option
                  v-for="item in baselisttages"
                  :key="item.id"
                  :label="item.name"
                  :value="item.id"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="申请说明" prop="remark">
              <el-input v-model="form.remark" placeholder="申请说明" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row style="margin-top: 5px; margin-bottom: 5px" />
        <el-row v-if="jurisdiction">
          <el-alert
            title="当前为查看状态,不支持修改存储。"
            type="warning"
            show-icon
          >
          </el-alert>
        </el-row>
        <el-row>
          <el-col :span="3"
            ><div style="margin-bottom: 15px;">
              <el-button
                type="success"
                icon="el-icon-download"
                @click="Batchentry"
                >批量录入</el-button
              >
            </div></el-col
          >
        </el-row>
        <el-row v-if="operationType == 'check'">
          <el-col :span="3"
            ><div style="margin-bottom: 15px;">
              <el-button
                type="success"
                icon="el-icon-edit-outline"
                @click="Manualcalculationfn"
                >计算明细</el-button
              >
            </div></el-col
          >
        </el-row>
        <el-row>
          <el-table
            :data="rbDetails"
            v-loading="loading"
            max-height="800"
            border
            highlight-current-row
          >
            <el-table-column
              prop="orderno"
              align="center"
              label="序号"
              width="88"
            >
              <template slot-scope="scope">
                <el-input v-model="scope.row.orderno" placeholder="序号" />
              </template>
            </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="verifyFeeItemType(scope.row)"
                >
                  <el-option
                    v-for="dict in rowfeeItemTypes"
                    :key="dict.value"
                    :label="dict.label"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </template>
            </el-table-column>
            <el-table-column
              prop="itemid"
              align="center"
              label="服务项目"
              width="260"
            >
              <template slot-scope="scope">
                <el-select
                  v-model="scope.row.itemid"
                  placeholder="请选择服务项目"
                  filterable
                  @change="verifyFeeItem(scope.row)"
                  :filter-method="val => searchItemType(val, scope)"
                >
                  <el-option
                    v-for="dict in scope.row.itemlist"
                    :key="dict.id"
                    :label="dict.itemName"
                    :value="dict.id"
                  ></el-option>
                </el-select>
              </template>
            </el-table-column>
            <el-table-column
              prop="amount"
              align="center"
              label="税前金额"
              width="120"
            >
              <template slot-scope="scope">
                <el-input
                  v-model="scope.row.amount"
                  placeholder="税前金额"
                  @blur="
                    val => {
                      calculateTax(scope.row, 'A');
                    }
                  "
                />
              </template>
            </el-table-column>
            <el-table-column
              prop="taxedamount"
              align="center"
              label="税后金额"
              width="120"
            >
              <template slot-scope="scope">
                <el-input
                  v-model="scope.row.taxedamount"
                  placeholder="税后金额"
                  @blur="
                    val => {
                      calculateTax(scope.row, 'B');
                    }
                  "
                />
              </template>
            </el-table-column>
            <el-table-column
              prop="beneficiaryname"
              align="center"
              label="姓名"
              width="250"
            >
              <template slot-scope="scope">
                <el-button
                  type="primary"
                  plain
                  @click="ShowDetailDialog(scope, 'expert')"
                  >{{
                    scope.row.beneficiaryname
                      ? scope.row.beneficiaryname
                      : "点击选择"
                  }}</el-button
                >
              </template>
            </el-table-column>
            <el-table-column
              prop="depositbank"
              align="center"
              label="开户银行"
              width="200"
            >
              <template slot-scope="scope">
                <el-input
                  v-model="scope.row.depositbank"
                  placeholder="开户银行"
                />
              </template>
            </el-table-column>
            <el-table-column
              prop="bankcardno"
              align="center"
              label="银行帐号"
              width="210"
            >
              <template slot-scope="scope">
                <el-input
                  v-model="scope.row.bankcardno"
                  placeholder="银行帐号"
                />
              </template>
            </el-table-column>
            <el-table-column
              prop="remark"
              align="center"
              width="330"
              label="备注"
            >
              <template slot-scope="scope">
                <el-input
                  type="textarea"
                  :rows="2"
                  v-model="scope.row.remark"
                  placeholder="备注"
                />
              </template>
            </el-table-column>
            <el-table-column
              fixed="right"
              align="center"
              label="操作"
              width="180"
            >
              <template slot-scope="scope">
                <el-button
                  type="text"
                  size="mini"
                  @click="addRow(scope.$index)"
                  v-if="
                    operationType == 'add' ||
                      operationType == 'update' ||
                      operationType == 'check'
                  "
                  >新增</el-button
                >
                <el-button
                  @click.native.prevent="
                    deleteRows(scope.row, scope.$index, rbDetails)
                  "
                  type="text"
                  size="small"
                  v-if="
                    operationType == 'add' ||
                      operationType == 'update' ||
                      operationType == 'check'
                  "
                >
                  åˆ é™¤
                </el-button>
              </template>
            </el-table-column>
          </el-table>
        </el-row>
        <el-row
          v-if="
            operationType == 'detail' ||
              operationType == 'check' ||
              operationType == 'update'
          "
        >
          <el-table :data="fundflowList" border>
            <el-table-column
              label="审核日期"
              align="center"
              width="160"
              prop="createTime"
            />
            <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>
        </el-row>
        <el-row
          style="margin-top: 25px; margin-bottom: 5px"
          v-if="operationType == '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="operationType == '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="
            operationType == 'add' ||
              operationType == 'update' ||
              ismanager == true ||
              beforehandType == '1'
          "
          >提交保存</el-button
        >
        <el-button
          type="success"
          @click="handleup"
          v-if="operationType == 'add' || operationType == 'update'"
          >上报</el-button
        >
        <el-button
          type="primary"
          @click="checksubmit"
          v-if="operationType == 'check' && beforehandType != '1'"
          >提交审核</el-button
        >
        <el-button @click="cancel">关 é—­</el-button>
      </div>
    </div>
    <el-dialog
      :visible.sync="showSelectionDialog"
      :close-on-click-modal="false"
      :title="'个人信息选择'"
      width="500px"
      style="text-align: center"
      v-loading="loading"
    >
      <el-form ref="funddetailForm" :model="funddetailForm">
        <el-row>
          <el-select
            v-model="funddetailForm.userName"
            filterable
            remote
            reserve-keyword
            placeholder="请输入关键词"
            :remote-method="remoteMethod"
            :loading="loadingperformance"
          >
            <el-option
              v-for="item in optionsperformance"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-row>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="showSelectionDialog = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="ConfirmDetailDialog()"
          >ç¡® å®š</el-button
        >
      </span>
    </el-dialog>
    <el-dialog title="提示" :visible.sync="Savereminder" width="30%">
      <el-alert
        :title="
          '您已添加' +
            totalquantity +
            '条数据,为防止数据丢失是否提交保存再继续添加。'
        "
        type="warning"
      >
      </el-alert>
      <span slot="footer" class="dialog-footer">
        <el-button @click="unsave">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="Savenow">ç¡® å®š</el-button>
      </span>
    </el-dialog>
    <!-- æ‰¹é‡é€‰å– -->
    <el-dialog
      title="批量生成明细信息"
      :visible.sync="batchdialogVisible"
      width="40%"
    >
      <div style="max-height: 330px; overflow-y: auto">
        <el-checkbox
          :indeterminate="isIndeterminate"
          v-model="checkAll"
          @change="handleCheckAllChange"
          >全选</el-checkbox
        >
        <div style="margin: 15px 0;"></div>
        <el-checkbox-group
          v-model="checkedCities"
          @change="handleCheckedCitiesChange"
        >
          <el-checkbox
            border
            v-for="city in cityOptions"
            :label="city"
            :key="city.userNo"
            >{{ city.userName }}</el-checkbox
          >
        </el-checkbox-group>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="batchdialogVisible = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="BatchentryFn">ç¡® å®š</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import {
  listDonatebaseinfo,
  getDonatebaseinfo
} from "@/api/project/donatebaseinfo";
import debounce from "lodash/debounce";
import {
  getFund,
  delFund,
  updateFund,
  getdownloadLW,
  checkfund,
  getdownloadBX,
  addorupdateFund,
  ManualCalculation,
  getdetailsByItemId
} from "@/api/project/fund";
import {
  delFunddetail,
  getownFundDetail,
  getItemNames,
  getFundTypeAll
} from "@/api/project/funddetail";
import { listFundflow } from "@/api/project/fundflow";
import {
  listOrganization,
  getOrganization,
  listReportname,
  listperformance,
  listUser
} from "@/api/project/organization";
import {
  listExternalperson,
  addExternalperson,
  updateExternalperson,
  exportExternalperson
} from "@/api/project/externalperson";
import { listItemexpense } from "@/api/project/itemexpense";
import { getUserProfile } from "@/api/system/user";
import Li_area_select from "@/components/Address";
import OrgSelecter from "@/views/project/components/orgselect";
import { getToken } from "@/utils/auth";
export default {
  //import引入的组件需要注入到对象中才能使用
  components: {
    Li_area_select,
    OrgSelecter
  },
  name: "fundApply",
  dicts: ["sys_DonationStatus", "sys_recordstatus", "sys_professionaltitle"],
  data() {
    //这里存放数据
    return {
      // é®ç½©å±‚
      loading: false,
      // å¯¼å‡ºé®ç½©å±‚
      exportLoading: false,
      usernamedata: "",
      jurisdiction: false,
      Routinglevel: 1,
      // è¡¨å•参数
      form: {},
      experthear: "",
      spocewl: "",
      //费用申请表单title
      title: "",
      //申请单类型
      businessType: "0",
      businessName: "",
      //操作类型
      operationType: "",
      //当前单据id
      curId: 0,
      //当前选中捐献案例
      curCase: {},
      total: 0,
      // å½“前用户信息
      userprofile: {},
      //系统用户列表
      userlist: [],
      //所有人员表
      personlist: [],
      //专家列表
      expertlist: [],
      //医疗机构列表
      unitList: [],
      //费用报销机构列表
      feeUnitList: [],
      batchdialogVisible: false,
      itemlist: [],
      cityOptions: [],
      checkAll: false,
      checkedCities: [],
      Personnelforname: null,
      unitforname: null,
      isIndeterminate: true,
      //是否是专家费的OPO审批人员
      ismanager: false,
      //专家费选择:1是专家库,2是新增
      expertfrom: "1",
      baselisttages: [
        {
          id: 1,
          name: "待预审"
        },
        {
          id: 2,
          name: "预审通过等待材料"
        },
        {
          id: 3,
          name: "已收到报销材料"
        }
      ],
      PerformanceType: [
        {
          id: 1,
          name: "月度绩效"
        },
        {
          id: 2,
          name: "季度绩效"
        },
        {
          id: 3,
          name: "年度绩效"
        }
      ],
      //捐献案例列表
      donateList: [],
      //费用明细列表
      rbDetails: [],
      formData: {},
      amount: 0.0,
      totalPreTaxAmount: 0.0,
      totalAfterTaxAmount: 0.0,
      totalAmount: 0.0,
      tableDatatop: [],
      optionsperformance: [],
      valueperformance: [],
      listperformancea: [],
      loadingperformance: false,
      //费用类型数组
      feeItemTypes: [],
      //行记录的费用类型数组
      rowfeeItemTypes: [{ label: "管理成本", value: "9" }],
      //费用说明
      feeBlocks: [],
      fundflowList: [],
      // éšæœºæ•°
      randomnumber: "",
      //专家/单位选择:expert/unit
      selectionType: "",
      showSelectionDialog: false,
      //税前金额标题:专家费-税前金额;医学成本、办公费用-金额
      amountLabel: "税前金额",
      // è¡¨å•校验
      rules: {
        createTime: [
          { required: true, message: "请输入填报日期", trigger: "blur" }
        ],
        reason: [
          { required: true, message: "请输入出差事由", trigger: "blur" }
        ],
        deptmentname: [
          { required: true, message: "请输入所属业务组", trigger: "blur" }
        ]
      },
      funddetailForm: {
        index: null,
        userName: 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
      },
      //审批参数
      checkObj: {
        flowlevelone: null,
        flowconclusion: null,
        fundid: null
      },
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        organizationname: null,
        organizationtype: null,
        pageNum: 1,
        pageSize: 10,
        name: null,
        idcardno: null,
        residenceprovince: null,
        residencecity: null,
        residencetown: null,
        recordstate: null,
        treatmenthospitalname: null,
        donorno: null,
        reportername: null,
        reporttime: null
      },
      fundQueryParam: {
        pageNum: 1,
        pageSize: 100,
        infoid: null,
        applytype: "0",
        createBy: null
      },
      expertQueryParam: {
        pageNum: 1,
        pageSize: 10000,
        userno: null,
        username: null,
        usertype: null
      },
      //计算个税参数
      taxParam: {
        beneficiaryNo: "",
        money: "0",
        startTime: ""
      },
      beforehandType: null,
      //服务费用参数
      expenseQueryParams: {
        pageNum: 1,
        pageSize: 10000,
        itemid: null,
        expense: null,
        expensedescribe: null,
        usestate: null
      },
      //票据文件
      pdftitle: "",
      pdfimg: "",
      pdfimgsrcList: [],
      pdfVisible: false,
      previewpdf: false,
      hintitle: "请上传文件后查看",
      atpresent: "",
      Savereminder: false, //提醒保存弹框
      Reminderquantity: 0, //提醒数量
      totalquantity: 0, //总数量
      Modifyornot: 0 //是否修改
    };
  },
  //监听属性 ç±»ä¼¼äºŽdata概念
  computed: {},
  //监控data中的数据变化
  watch: {},
  //方法集合
  methods: {
    bbaaccss(val) {},
    // æµè§ˆå™¨é¡µé¢å…³é—­æˆ–刷新提示
    beforeunloadHandler(e) {
      if (
        (JSON.stringify(this.form) == sessionStorage.getItem("apiform") &&
          JSON.stringify(this.rbDetails) ==
            sessionStorage.getItem("apifunddetail")) ||
        !sessionStorage.getItem("apifunddetail")
      ) {
      } else {
        this._beforeUnload_time = new Date().getTime();
        e = e || window.event;
        if (e) {
          e.returnValue = "关闭提示";
        }
        return "关闭提示";
      }
    },
    // è¡¨å•重置
    reset() {
      this.form = {
        id: null,
        applytype: "0",
        userno: null,
        username: null,
        deptmentname: null,
        deptmentno: null,
        managername: null,
        infoid: null,
        donorno: null,
        delFlag: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        familyrelations: null,
        name: null,
        remark: null,
        doname: null,
        unitname: null,
        unitno: null,
        sex: null,
        idcardtype: null,
        idcardno: null,
        phone: null,
        donorname: null,
        depositbank: null,
        bankprovince: null,
        bankprovincename: null,
        bankcity: null,
        bankcityname: null,
        banktown: null,
        banktownname: null,
        branchbankname: null,
        bankcardno: null,
        annexbankcard: null,
        annexregistform: null,
        consolationmoney: null,
        servicetypename: null,
        servicesscope: null,
        servicesscopename: null
      };
      this.resetForm("form");
      //清空附件
      // this.fileList = [];
    },
    /** é€šè¿‡å‚数获取业务类型 */
    getroute() {
      console.log(11);
      //选择业务类型:1、新增;2、修改;3、查看
      this.curId = this.$route.query.id;
      this.businessType = this.$route.query.businessType;
      this.operationType = this.$route.query.operationType;
      this.beforehandType = this.$route.query.beforehandType;
      console.log(1);
      //获取费用项目类型
      this.getFeeTypes();
      this.businessName = "绩效申请单";
      this.getUnitList();
      console.log(2);
      if (this.operationType == "add") {
        this.title = this.businessName + "新建";
        this.handleAdd();
      } else if (this.operationType == "update") {
        this.title = this.businessName + "修改";
        console.log(this.title);
        this.handleUpdate();
      } else if (this.operationType == "detail") {
        this.title = this.businessName + "查看";
        this.jurisdiction = true;
        this.handleDetail();
      } else if (this.operationType == "check") {
        this.title = this.businessName + "审核";
        this.handleCheck();
      }
    },
    /** æ–°å¢žæŒ‰é’®æ“ä½œ */
    handleAdd() {
      console.log("新增");
      //初始化
      this.istrue += 2;
      this.reset();
      /** businessType:1:专家费;2:伦理专家费;3:医学成本;4:办公费用*/
      this.form.applytype = this.businessType;
      //初始化明细
      this.rbDetails = [];
      this.addRow(0);
    },
    /** ä¿®æ”¹æŒ‰é’®æ“ä½œ */
    handleUpdate() {
      this.isopen = 0;
      this.reset();
      getFund(this.curId).then(response => {
        this.form = response.data;
        sessionStorage.removeItem("apiform");
        sessionStorage.setItem("apiform", JSON.stringify(this.form));
        //明细处理
        getownFundDetail(this.curId).then(res => {
          this.rbDetails = res.data;
          if (this.rbDetails.length > 0) {
            for (let m = 0; m < this.rbDetails.length; m++) {
              this.rbDetails[m].itemlist = [];
              this.getRowFeeItems(m, this.rbDetails[m]);
              //获取费用项目的详细信息
              this.rbDetails[m].rowfeeblocks = this.feeBlocks.filter(
                r => r.itemid == this.rbDetails[m].itemid
              );
            }
            sessionStorage.removeItem("apifunddetail");
            sessionStorage.setItem(
              "apifunddetail",
              JSON.stringify(this.rbDetails)
            );
          } else {
            this.addRow(0);
          }
        });
        let listFundflowparams = {
          fundid: this.curId,
          fundtype: 2
        };
        listFundflow(listFundflowparams).then(res => {
          this.fundflowList = res.rows;
        });
      });
    },
    /** æŸ¥çœ‹æŒ‰é’®æ“ä½œ */
    handleDetail() {
      this.isopen = 0;
      this.reset();
      getFund(this.curId).then(response => {
        this.form = response.data;
        sessionStorage.removeItem("apiform");
        sessionStorage.setItem("apiform", JSON.stringify(this.form));
        //业务明细
        getownFundDetail(this.curId).then(res => {
          this.rbDetails = res.data;
          console.log("this.feeBlocks", this.feeBlocks);
          for (let m = 0; m < this.rbDetails.length; m++) {
            this.rbDetails[m].itemlist = [];
            this.getRowFeeItems(m, this.rbDetails[m]);
            //获取费用项目的详细信息
            this.rbDetails[m].rowfeeblocks = this.feeBlocks.filter(
              r => r.itemid == this.rbDetails[m].itemid
            );
            console.log(
              "this.rbDetails[m].rowfeeblocks",
              this.rbDetails[m].rowfeeblocks
            );
          }
          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;
      this.reset();
      getFund(this.curId).then(response => {
        this.form = response.data;
        sessionStorage.removeItem("apiform");
        sessionStorage.setItem("apiform", JSON.stringify(this.form));
        //业务明细
        getownFundDetail(this.curId).then(res => {
          this.rbDetails = res.data;
          for (let m = 0; m < this.rbDetails.length; m++) {
            this.rbDetails[m].itemlist = [];
            this.getRowFeeItems(m, this.rbDetails[m]);
            //获取费用项目的详细信息
            this.rbDetails[m].rowfeeblocks = this.feeBlocks.filter(
              r => r.itemid == this.rbDetails[m].itemid
            );
          }
          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("是否确认删除该记录?")
        .then(function() {
          return delFund(this.curId);
        })
        .then(() => {
          getownFundDetail(this.curId).then(res => {
            let listdetails = res.data;
            for (let i = 0; i < listdetails.length; i++) {
              delFunddetail(listdetails[i].id);
            }
          });
          this.getfundList();
          this.$modal.msgSuccess("删除成功");
        })
        .catch(() => {});
    },
    /** ä¸ŠæŠ¥æŒ‰é’®æ“ä½œ */
    handleup() {
      if (
        (JSON.stringify(this.form) == sessionStorage.getItem("apiform") &&
          JSON.stringify(this.rbDetails) ==
            sessionStorage.getItem("apifunddetail")) ||
        !sessionStorage.getItem("apifunddetail")
      ) {
      } else {
        this.$message.error("请保存后再进行上报");
        return;
      }
      this.$confirm("是否确认将登记记录上报?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
          //查找是否存在登记完成记录
          //判断是否存在上报记录
          this.form.recordstatus = 0;
          if (!this.form.id) {
            this.form.id = this.$route.query.id;
          }
          updateFund(this.form).then(response => {
            if (response.code == 200) {
              this.$message({
                type: "success",
                message: "申请成功"
              });
              this.cancel();
            } else {
              this.$message({
                type: "error",
                message: "申请失败"
              });
            }
            this.loading = false;
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消申请"
          });
        });
    },
    generateRandomString(length) {
      const characters =
        "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
      let randomString = "";
      for (let i = 0; i < length; i++) {
        randomString += characters.charAt(
          Math.floor(Math.random() * characters.length)
        );
      }
      return randomString;
    },
    /** æäº¤æŒ‰é’® */
    submitForm: debounce(function() {
      if (!this.randomnumber) {
        this.randomnumber = this.generateRandomString(9);
        this.form.randomnumber = this.randomnumber;
      }
      this.$refs["form"].validate(valid => {
        if (valid) {
          this.formData = this.form;
          //保存前校验数据
          for (let k = 0; k < this.rbDetails.length; k++) {
            let tempDetail = this.rbDetails[k];
            if (tempDetail.itemid == null) {
              this.$modal.msgWarning(
                "服务项目表中,第" +
                  (k + 1).toString() +
                  "行的服务项目未选择,请先选择服务项目后再提交保存!"
              );
              return;
            }
            if (this.businessType == "1") {
              if (tempDetail.servicesscope == null) {
                this.$modal.msgWarning(
                  "服务项目表中,第" +
                    (k + 1).toString() +
                    "行的费用说明未选择,请选择费用说明后再提交保存!"
                );
                return;
              }
              if (tempDetail.beneficiaryno == null) {
                this.$modal.msgWarning(
                  "服务项目表中,第" +
                    (k + 1).toString() +
                    "行的服务人员姓名为选择,请选择人员后再提交保存!"
                );
                return;
              }
            }
          }
          //处理明细
          for (let i = 0; i < this.rbDetails.length; i++) {
            let tempDetail = this.rbDetails[i];
            //获取服务项目明细
            let tempitemlist = tempDetail.itemlist;
            let itemIndex = tempitemlist.findIndex(
              item => tempDetail.itemid == item.id
            );
            if (itemIndex > -1) {
              tempDetail.itemname = tempitemlist[itemIndex].itemName;
              tempDetail.itemid = tempitemlist[itemIndex].id;
            }
            //获取applytypename、服务费用大类
            let applytypeIndex = this.rowfeeItemTypes.findIndex(
              item => tempDetail.applytype == item.value
            );
            if (applytypeIndex > -1) {
              tempDetail.applytypename = this.rowfeeItemTypes[
                applytypeIndex
              ].label;
              tempDetail.subjecttype = this.rowfeeItemTypes[
                applytypeIndex
              ].subjecttype;
              tempDetail.subjecttypename = this.rowfeeItemTypes[
                applytypeIndex
              ].subjecttypename;
            }
            this.rbDetails[i] = tempDetail;
          }
          //计算当前行报销内容费用合计,税前金额(amount)、扣税金额(taxamount)、税后金额(taxedamount)
          if (this.businessType == "2") {
            for (let j = 0; j < this.rbDetails.length; j++) {
              let tempDetail = this.rbDetails[j];
              if (
                isNaN(parseFloat(tempDetail.amount)) ||
                parseFloat(tempDetail.amount) == 0
              ) {
                this.$modal.msgWarning(
                  "服务项目表中,第" +
                    (j + 1).toString() +
                    "行的金额未输入,请先输入金额后再提交保存!"
                );
                return;
              }
            }
          } else if (this.businessType == "3" || this.businessType == "4") {
            for (let j = 0; j < this.rbDetails.length; j++) {
              let tempDetail = this.rbDetails[j];
              if (
                isNaN(parseFloat(tempDetail.amount)) ||
                parseFloat(tempDetail.amount) == 0
              ) {
                this.$modal.msgWarning(
                  "服务项目表中,第" +
                    (j + 1).toString() +
                    "行的金额未输入,请先输入金额后再提交保存!"
                );
                return;
              }
              if (
                isNaN(parseFloat(tempDetail.taxamount)) ||
                parseFloat(tempDetail.taxamount) == 0
              ) {
                tempDetail.taxedamount = parseFloat(tempDetail.amount);
              } else {
                tempDetail.taxedamount =
                  parseFloat(tempDetail.amount) +
                  parseFloat(tempDetail.taxamount);
              }
            }
          }
          //保存数据
          this.loading = true;
          this.form.serviceFunddetails = 0;
          this.rbDetails.map(item => {
            this.form.serviceFunddetails += item.amount;
          });
          this.form.serviceFunddetails = this.rbDetails;
          if (this.form.id != null) {
          } else {
            this.form.recordstatus = -1;
          }
          sessionStorage.setItem(
            "apifunddetail",
            JSON.stringify(this.rbDetails)
          );
          sessionStorage.setItem("apiform", JSON.stringify(this.form));
          addorupdateFund(this.form).then(response => {
            console.log(response, "保存返参");
            if (response.code === 200) {
              this.$modal.msgSuccess("申请单保存成功!");
              this.$store.dispatch("tagsView/delView", this.$route);
              this.$router.push({
                path: "/finance/performancedetails/",
                query: {
                  id: response.data,
                  businessType: "5",
                  operationType: "update"
                }
              });
              this.Routinglevel++;
            } else {
              this.$modal.msgError("申请单保存失败:" + response.msg);
            }
          });
          //关闭窗口
          this.loading = false;
          // this.getfundList();
        }
      });
    }, 500),
    //审批提交
    checksubmit() {
      let checkFundObj = {
        // fundid: this.checkObj.fundid,
        fundid: this.curId,
        flowconclusion: this.checkObj.flowlevelone,
        flowcontent: this.checkObj.flowconclusion
      };
      checkfund(checkFundObj).then(res => {
        //关闭窗口
        this.reset();
        this.$modal.msgSuccess("审核完成!");
        this.$store.dispatch("tagsView/delView", this.$route);
        this.$router.go(-1);
      });
    },
    // å…³é—­æŒ‰é’®
    cancel() {
      console.log(-this.Routinglevel);
      this.$store.dispatch("tagsView/delView", this.$route);
      this.$router.go(-this.Routinglevel);
    },
    //获取当前用户信息
    getUserProfile() {
      getUserProfile().then(res => {
        this.userprofile = res.data;
        this.standardlevel = res.data.standardlevel;
        if (
          this.userprofile.userName == "admin" ||
          this.userprofile.userName == "001" ||
          this.userprofile.userName == "047"
        ) {
          this.ismanager = true;
        } else {
          this.ismanager = false;
        }
        if (this.operationType == "add") {
          this.form.username = this.userprofile.nickName;
          this.form.userno = this.userprofile.userName;
          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;
          if (this.businessType == "4") {
            this.getUserAccount();
          }
        }
      });
    },
    //获取系统用户列表
    getUserList() {
      listUser().then(res => {
        this.userlist = res.data;
      });
    },
    //获取所有专家/医疗机构/费用报销机构列表
    getExternalList() {
      listExternalperson().then(res => {
        this.personlist = res.rows;
        for (let j = 0; j < this.personlist.length; j++) {
          //获取费用报销机构列表
          if (this.personlist[j].usertype == "org") {
            this.feeUnitList.push({
              id: this.personlist[j].id,
              reportNo: this.personlist[j].userno,
              reportName: this.personlist[j].username,
              depositbank: this.personlist[j].depositbank,
              branchbankname: this.personlist[j].branchbankname,
              bankcardno: this.personlist[j].bankcardno
            });
          }
          //专家人员列表
          else if (res.rows[j].usertype == "expert") {
            this.expertlist.push({
              expertNo: this.personlist[j].id,
              exportName: this.personlist[j].username
            });
          }
        }
      });
    },
    //获取经办人账号信息
    getUserAccount() {
      this.personlist.map(res => {
        if (res.username == this.form.username) {
          this.form.bankname = res.depositbank; //res.branchbankname、res.depositbank;
          this.form.bankcardno = res.bankcardno;
          this.form.phone = res.telephone;
        }
      });
    },
    //获取专家人员列表
    getExpertList() {
      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++) {
            templist.push({
              reportName: res.data[j].reportName,
              reportNo: res.data[j].reportNo
            });
          }
          this.expertlist = this.expertlist.concat(templist);
        });
      }
    },
    //获取费用机构列表
    getFeeUnitList() {
      listReportname("org").then(res => {
        this.feeUnitList = res.data;
        console.log(this.feeUnitList);
      });
    },
    //获取医疗机构列表
    getUnitList() {
      listOrganization(3).then(response => {
        for (let i = 0; i < response.rows.length; i++) {
          this.unitList.push({
            //organizationid: response.rows[i].organizationid,
            organizationid: response.rows[i].id,
            organizationname: response.rows[i].organizationname
          });
        }
      });
    },
    //获取捐献案例列表
    getBaseInfoList() {
      this.loading = true;
      listDonatebaseinfo(this.queryParams).then(response => {
        this.donateList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    //获取服务费用类型、服务项目、服务说明
    getFeeTypes() {
      //获取服务费用类型、服务项目
      getFundTypeAll(5).then(res => {
        let dataList = res.data;
        //获取服务费用服务项目
        this.feeItemTypes = dataList;
        console.log(this.feeItemTypes);
        //获取服务费用类型
        this.rowfeeItemTypes = [];
        for (let m = 0; m < dataList.length; m++) {
          this.rowfeeItemTypes.push({
            value: dataList[m].itemType,
            label: dataList[m].itemTypeName,
            subjecttype: dataList[m].subjecttype,
            subjecttypename: dataList[m].subjecttypename
          });
        }
        console.log(this.rowfeeItemTypes);
        console.log(this.feeItemTypes);
      });
      //获取服务费用说明列表
      this.loading = true;
      listItemexpense(this.expenseQueryParams).then(response => {
        response.rows.forEach(item => {
          this.feeBlocks.push({
            servicesscope: JSON.stringify(item.id),
            itemid: item.itemid,
            expense: item.expense,
            expensedescribe: item.expensedescribe,
            remark: item.expensedescribe
          });
        });
        this.loading = false;
      });
    },
    //获取服务项目
    getRowFeeItems(rowindex, row) {
      let list = this.feeItemTypes.filter(r => r.itemType == row.applytype);
      row.itemlist = list[0].itemDetails;
      this.$set(this.rbDetails, rowindex, row);
    },
    //加载服务项目
    verifyFeeItemType(row) {
      let list = this.feeItemTypes.filter(r => r.itemType == row.applytype);
      row.itemlist = list[0].itemDetails;
      row.itemid = null;
      this.$forceUpdate();
    },
    //校验收费项目
    verifyFeeItem(row) {
      row.itemlist.map(res => {
        if (row.itemid === res.id) {
          row.remark = res.itemDescribe;
          row.itemcode = res.itemCode;
        }
      });
      //判断收费项目是否重复
      var repeatNum = 0;
      this.rbDetails.map(res => {
        if (res.applytype === row.applytype && res.itemid == row.itemid) {
          repeatNum++;
        }
      });
      if (repeatNum > 1) {
        this.$modal.msgWarning("您已经提交过该服务项目了");
      }
      //获取费用项目的详细信息
      row.servicesscope = null;
      row.servicesscopename = "";
      row.amount = 0.0;
      row.taxamount = 0.0;
      row.taxedamount = 0.0;
      row.rowfeeblocks = this.feeBlocks.filter(r => r.itemid == row.itemid);
      if (row.rowfeeblocks.length == 1) {
        row.servicesscope = row.rowfeeblocks[0].servicesscope;
        row.servicesscopename = row.rowfeeblocks[0].expensedescribe;
        if (row.servicesscopename.includes("税后")) {
          row.amount = 0.0;
          row.taxamount = 0.0;
          row.taxedamount = row.rowfeeblocks[0].expense;
        } else {
          row.amount = row.rowfeeblocks[0].expense;
          row.taxamount = 0.0;
          row.taxedamount = 0.0;
        }
      }
    },
    //筛查出对应的费用项目
    searchItemType(val, scope) {
      let result = [];
      if (val != "") {
        let tempitemlist = scope.row.itemlist;
        for (let i = 0; i < tempitemlist.length; i++) {
          let pym = tempitemlist[i].itempinyin;
          if (pym != null && pym != undefined && pym != "") {
            if (pym.indexOf(val) != -1) {
              result.push(tempitemlist[i]);
            }
          }
        }
        scope.row.itemlist = result;
      } else {
        getItemNames(scope.row.applytype).then(res => {
          scope.row.itemlist = res.data;
          //this.$set(this.rbDetails, rowindex, row);
        });
      }
    },
    //计算金额
    calculateTax(row, type) {
      let targetValue = 0;
      for (let i = 0; i < this.rbDetails.length; i++) {
        if (!this.rbDetails[i].amount) {
          this.rbDetails[i].amount = 0;
        }
        targetValue += parseFloat(this.rbDetails[i].amount); // å‡è®¾æ¯ä¸ªå¯¹è±¡ä¸­çš„特定值存储在'specificValue'属性下
      }
      console.log(targetValue, "合计");
      this.form.pretaxcost = targetValue;
    },
    unsave() {
      this.Savereminder = false;
      this.Reminderquantity = 0;
    },
    // æŽ¥å—提醒立刻保存
    Savenow() {
      if (!this.randomnumber) {
        this.randomnumber = this.generateRandomString(9);
        this.form.randomnumber = this.randomnumber;
      }
      this.Savereminder = false;
      this.Reminderquantity = 0;
      this.totalquantity = 0;
      this.$refs["form"].validate(valid => {
        if (valid) {
          this.formData = this.form;
          // let totalPreTaxAmount = 0.0;
          // let totalAfterTaxAmount = 0.0;
          // let totalAmount = 0.0;
          //保存前校验数据
          for (let k = 0; k < this.rbDetails.length; k++) {
            let tempDetail = this.rbDetails[k];
            if (tempDetail.itemid == null) {
              this.$modal.msgWarning(
                "服务项目表中,第" +
                  (k + 1).toString() +
                  "行的服务项目未选择,请先选择服务项目后再提交保存!"
              );
              return;
            }
            if (this.businessType == "1") {
              if (tempDetail.servicesscope == null) {
                this.$modal.msgWarning(
                  "服务项目表中,第" +
                    (k + 1).toString() +
                    "行的费用说明未选择,请选择费用说明后再提交保存!"
                );
                return;
              }
              if (tempDetail.beneficiaryno == null) {
                this.$modal.msgWarning(
                  "服务项目表中,第" +
                    (k + 1).toString() +
                    "行的服务人员姓名为选择,请选择人员后再提交保存!"
                );
                return;
              }
            }
          }
          //处理明细
          for (let i = 0; i < this.rbDetails.length; i++) {
            let tempDetail = this.rbDetails[i];
            //获取服务项目明细
            let tempitemlist = tempDetail.itemlist;
            let itemIndex = tempitemlist.findIndex(
              item => tempDetail.itemid == item.id
            );
            if (itemIndex > -1) {
              tempDetail.itemname = tempitemlist[itemIndex].itemName;
              tempDetail.itemid = tempitemlist[itemIndex].id;
            }
            //获取applytypename、服务费用大类
            let applytypeIndex = this.rowfeeItemTypes.findIndex(
              item => tempDetail.applytype == item.value
            );
            if (applytypeIndex > -1) {
              tempDetail.applytypename = this.rowfeeItemTypes[
                applytypeIndex
              ].label;
              tempDetail.subjecttype = this.rowfeeItemTypes[
                applytypeIndex
              ].subjecttype;
              tempDetail.subjecttypename = this.rowfeeItemTypes[
                applytypeIndex
              ].subjecttypename;
            }
            this.rbDetails[i] = tempDetail;
          }
          for (let j = 0; j < this.rbDetails.length; j++) {
            let tempDetail = this.rbDetails[j];
            if (
              isNaN(parseFloat(tempDetail.amount)) ||
              parseFloat(tempDetail.amount) == 0
            ) {
              this.$modal.msgWarning(
                "服务项目表中,第" +
                  (j + 1).toString() +
                  "行的金额未输入,请先输入金额后再提交保存!"
              );
              return;
            }
            if (
              isNaN(parseFloat(tempDetail.taxamount)) ||
              parseFloat(tempDetail.taxamount) == 0
            ) {
              tempDetail.taxedamount = parseFloat(tempDetail.amount);
            } else {
              tempDetail.taxedamount =
                parseFloat(tempDetail.amount) +
                parseFloat(tempDetail.taxamount);
            }
          }
          //保存数据
          this.loading = true;
          this.form.serviceFunddetails = 0;
          this.rbDetails.map(item => {
            this.form.serviceFunddetails += item.amount;
          });
          this.form.serviceFunddetails = this.rbDetails;
          if (this.form.id != null) {
          } else {
            this.form.recordstatus = -1;
          }
          addorupdateFund(this.form).then(response => {
            if (response.code === 200) {
              this.$modal.msgSuccess("申请单保存成功!");
              this.getroute();
              this.getExternalList();
              this.getUserList();
              this.getUserProfile();
            } else {
              this.$modal.msgError("申请单保存失败:" + response.msg);
            }
          });
          //关闭窗口
          this.loading = false;
          // this.getfundList();
        }
      });
    },
    // å…¨é€‰
    handleCheckAllChange(val) {
      this.checkedCities = val ? this.cityOptions : [];
      this.isIndeterminate = false;
    },
    handleCheckedCitiesChange(value) {
      let checkedCount = value.length;
      this.checkAll = checkedCount === this.cityOptions.length;
      this.isIndeterminate =
        checkedCount > 0 && checkedCount < this.cityOptions.length;
    },
    // æ‰‹åŠ¨è®¡ç®—
    Manualcalculationfn() {
      ManualCalculation(this.rbDetails).then(res => {
        console.log(res);
        if (res.code == 200) {
          sessionStorage.removeItem("apiform");
          sessionStorage.removeItem("apifunddetail");
          sessionStorage.setItem(
            "apifunddetail",
            JSON.stringify(this.rbDetails)
          );
          sessionStorage.setItem("apiform", JSON.stringify(this.form));
          this.$router.go(0);
        } else {
          // this.$message({
          //   type: "error",
          //   message: "申请失败"
          // });
        }
      });
    },
    // æ‰¹é‡å½•入点击
    Batchentry() {
      // ethical
      this.listperformance();
      this.batchdialogVisible = true;
    },
    listperformance() {
      listperformance(1).then(res => {
        this.cityOptions = res.data;
        this.listperformancea = [];
        this.listperformancea = this.cityOptions.map(item => {
          return { value: item.userName, label: item.userName };
        });
        console.log(this.cityOptions, "绩效批量");
      });
    },
    // ç¡®è®¤å½•å…¥
    BatchentryFn() {
      this.checkedCities.forEach(item => {
        let rowData = {
          orderno: null,
          fundid: null,
          beneficiaryname: item.userName,
          beneficiaryno: item.usertNo,
          unitname: item.unitname,
          unitno: null,
          uintuserno: null,
          title: item.title,
          idcardtype: null,
          idcardno: item.idcrad,
          sex: null,
          familyrelations: null,
          phone: null,
          depositbank: item.depositBank,
          bankcardno: item.bankCardNo,
          branchbankname: item.branchbankname,
          annexbankcard: null,
          annexregistform: null,
          applytype: "9",
          applytypename: "管理成本",
          itemid: 68,
          itemcode: "68",
          itemname: "绩效工资",
          itemtype: null,
          amount: 200,
          prepaidamount: null,
          taxamount: null,
          invoicecount: null,
          taxedamount: null,
          attachcount: null,
          remark: null,
          recordstatus: "-1",
          delFlag: null,
          createBy: null,
          createTime: null,
          updateBy: null,
          updateTime: null,
          uploadflag: null,
          uploadtime: null,
          itemlist: [{ id: 68, itemName: "绩效工资" }],
          servicesscope: null,
          rowfeeblocks: [],
          annexfiles: null
        };
        this.rbDetails.push(rowData);
      });
      for (let i = 0; i < this.checkedCities.length + 1; i++) {
        this.rbDetails[i].orderno = i + 1;
      }
      this.calculateTax();
      this.batchdialogVisible = false;
      console.log(this.rowfeeItemTypes);
    },
    //新增一行
    addRow(rowIndex) {
      let rowData = {
        orderno: null,
        id: null,
        fundid: null,
        beneficiaryname: null,
        beneficiaryno: null,
        unitname: null,
        unitno: null,
        uintuserno: null,
        title: null,
        idcardtype: null,
        idcardno: null,
        sex: null,
        familyrelations: null,
        phone: null,
        depositbank: null,
        bankcardno: null,
        branchbankname: null,
        annexbankcard: null,
        annexregistform: null,
        applytype: null,
        itemid: null,
        itemname: null,
        itemcode: null,
        itemtype: null,
        amount: null,
        prepaidamount: null,
        taxamount: null,
        invoicecount: null,
        taxedamount: null,
        attachcount: null,
        remark: null,
        recordstatus: "-1",
        delFlag: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        uploadflag: null,
        uploadtime: null,
        itemlist: [],
        servicesscope: null,
        rowfeeblocks: [],
        annexfiles: null
      };
      // if (this.Reminderquantity >= 5) {
      //   this.Savereminder = true;
      //   return;
      // }
      console.log(12);
      if (rowIndex == undefined || rowIndex == null || rowIndex < 0) {
        this.rbDetails.push(rowData);
        console.log(13);
      } else {
        this.rbDetails.splice(rowIndex + 1, 0, rowData);
        console.log(14);
      }
      this.Reminderquantity++;
      this.totalquantity++;
      for (let i = 0; i < this.rbDetails.length; i++) {
        this.rbDetails[i].orderno = i + 1;
      }
    },
    deleteRows(row, index, rows) {
      this.$confirm("删除数据后将不能恢复,确认要删除吗?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "success"
      })
        .then(() => {
          if (this.rbDetails.length == 1) {
            this.addRow(0);
          }
          if (row.id !== null) {
            delFunddetail(row.id).then(res => {
              if (res.code === 200) {
                this.$confirm("删除数据成功", "提示", {
                  confirmButtonText: "确定",
                  cancelButtonText: "取消",
                  type: "success"
                }).then(() => {
                  this.$set(rows, rows.splice(index, 1));
                  getownFundDetail(this.form.id).then(res => {
                    this.$set(this.rbDetails, res.data);
                    for (let i = 0; i < this.rbDetails.length; i++) {
                      this.rbDetails[i].orderno = i + 1;
                    }
                    this.calculateTax();
                    // this.rbDetails = res.data
                  });
                });
              }
            });
          } else {
            rows.splice(index, 1);
            this.calculateTax();
          }
        })
        .catch(() => {
          //几点取消的提示
        });
      //全部删除后添加一条新行
    },
    //专家/医疗机构/费用报销机构选择
    ShowDetailDialog(spoce, showType) {
      this.spocewl = spoce;
      this.selectionType = showType;
      this.selectionType = this.experthear;
      this.expertfrom = "1";
      console.log(spoce);
      this.funddetailForm.index = spoce.$index;
      this.funddetailForm.beneficiaryno = spoce.row.beneficiaryno;
      this.funddetailForm.beneficiaryname = spoce.row.beneficiaryname;
      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.showSelectionDialog = true;
    },
    //专家/医疗机构/费用报销机构选择
    ConfirmDetailDialog() {
      let tempIndex = this.funddetailForm.index;
      let tempExpertName = this.funddetailForm.userName;
      let singleDetail = this.rbDetails[tempIndex];
      //从专家列表获取信息
      this.cityOptions.map(res => {
        if (tempExpertName == 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.bankCardNo;
          singleDetail.phone = res.telephone;
          singleDetail.title = res.title;
          singleDetail.unitname = res.unitname;
          singleDetail.unitno = parseInt(res.unitno);
        }
      });
      this.rbDetails[tempIndex] = singleDetail;
      this.showSelectionDialog = false;
    },
    remoteMethod(query) {
      console.log(this.listperformancea);
      if (query !== "") {
        this.loadingperformance = true;
        setTimeout(() => {
          this.loadingperformance = false;
          this.optionsperformance = this.listperformancea.filter(item => {
            return item.label.toLowerCase().indexOf(query.toLowerCase()) > -1;
          });
        }, 200);
      } else {
        this.optionsperformance = [];
      }
    }
  },
  //生命周期 - åˆ›å»ºå®Œæˆï¼ˆå¯ä»¥è®¿é—®å½“前this实例)
  created() {
    //获取路由参数
    this.getroute();
    this.getExternalList();
    this.getFeeUnitList();
    this.listperformance();
  },
  //生命周期 - æŒ‚载完成(可以访问DOM元素)
  mounted() {
    window.addEventListener("beforeunload", e => this.beforeunloadHandler(e));
    this.getUserList();
    this.getUserProfile();
  },
  destroyed() {
    window.removeEventListener("beforeunload", e => this.beforeunloadFn(e));
  }, //生命周期 - é”€æ¯å®Œæˆ
  activated() {} //如果页面有keep-alive缓存功能,这个函数会触发
};
</script>
<style lang="scss" scoped>
.Modifydetailscla {
  padding: 10px;
  .boxdiv {
    font-size: 18px;
    padding: 0 30px;
    padding-bottom: 60px;
    .top-text {
      text-align: center;
      font-size: 23px;
      font-weight: 600;
      margin: 20px 0;
      margin-bottom: 50px;
    }
    .dialog-footer {
      text-align: left;
      margin-top: 10px;
    }
  }
}
.upload-demo {
  text-align: center;
}
.pdfimg {
  display: flex; // text-align: center;
  width: 100%;
  height: 600px;
  .box-pdf {
    width: 400px;
    padding-top: 20px;
    margin-right: 30px;
    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 {
    width: 200px;
    padding: 20px;
    font-size: 18px;
  }
  .pdftit:hover {
    background: #c0cef7;
  }
  .pdfimgmin {
    width: 60%;
    img {
      width: 100%;
    }
  }
  .pdfimgmins {
    font-size: 28px;
    width: 60%;
    text-align: center;
  }
}
::v-deep .el-input--medium .el-input__inner {
  height: 36px;
  line-height: 36px;
  text-align: center;
}
::v-deep .el-alert__title {
  font-size: 25px;
  line-height: 25px;
}
::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered {
  margin-left: 0 !important;
  margin-bottom: 10px;
}
</style>
src/views/project/fundcheck/ethicalExpertFeeCheck/index.vue
@@ -63,6 +63,20 @@
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="5">
          <el-form-item label="捐献者" prop="donorname" style="float: left">
            <el-input
              v-model="queryParams.donorname"
              placeholder="请输入申请人捐献者"
              clearable
              size="small"
              @keyup.enter.native="flowconclusion"
            />
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-button
            type="primary"
@@ -128,11 +142,6 @@
            prop="managername"
            width="150px"
          />
          <!-- <el-table-column label="工作单位" align="center"  prop="unitname" width="230px" /> -->
          <!-- <el-table-column label="联系电话" align="center"  prop="phone"  width="160"  /> -->
          <!-- <el-table-column label="税后金额" align="center" prop="taxedcost" width="120px" />
          <el-table-column label="申请金额" align="center" prop="amountrequested" width="120px" />
          <el-table-column label="预支费用" align="center" prop="prepaidamount" width="120px" /> -->
          <el-table-column
            label="审核状态"
            align="center"
@@ -173,7 +182,7 @@
            fixed="right"
            align="center"
            class-name="small-padding fixed-width"
            width="160px"
            width="260px"
          >
            <template slot-scope="scope">
              <el-button
src/views/project/fundcheck/expertFeeCheck/index.vue
@@ -41,6 +41,17 @@
        </el-col> -->
      </el-row>
      <el-row>
        <el-col :span="5">
          <el-form-item label="捐献者" prop="donorname" style="float: left">
            <el-input
              v-model="queryParams.donorname"
              placeholder="请输入申请人捐献者"
              clearable
              size="small"
              @keyup.enter.native="flowconclusion"
            />
          </el-form-item>
        </el-col>
        <el-col :span="3">
          <div style="margin-bottom: 15px;">
            <el-button
@@ -105,7 +116,7 @@
          <el-table-column label="备注" align="center" prop="remark" />
          <!--<el-table-column label="捐献编号" align="center" prop="donorno" />
          <el-table-column label="财务审核" align="center" prop="financechecher" width="140" />-->
          <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width" width="160px">
          <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width" width="260px">
            <template slot-scope="scope">
              <el-button size="mini" type="text" icon="el-icon-edit" v-if="scope.row.checkFlag == 0"
                @click="handleDetail(scope.row)">详情</el-button>
@@ -320,7 +331,7 @@
                <el-input v-model="scope.row.bankcardno" placeholder="银行卡号" />
              </template>
            </el-table-column>
            <el-table-column fixed="right" align="center" label="操作" width="120">
            <el-table-column fixed="right" align="center" label="操作" width="200">
              <template slot-scope="scope">
                <el-button @click="saveRows(scope.row, scope.$index)" type="text" size="small" v-if="show === 1">
                  ä¿å­˜
src/views/project/fundcheck/medicalCostCheck/index.vue
@@ -88,6 +88,17 @@
        </el-col> -->
      </el-row>
      <el-row>
        <el-col :span="5">
          <el-form-item label="捐献者" prop="donorname" style="float: left">
            <el-input
              v-model="queryParams.donorname"
              placeholder="请输入申请人捐献者"
              clearable
              size="small"
              @keyup.enter.native="flowconclusion"
            />
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <div style="margin-bottom: 15px;">
            <el-button
@@ -720,7 +731,7 @@
              fixed="right"
              align="center"
              label="操作"
              width="120"
              width="200"
            >
              <template slot-scope="scope">
                <el-button
src/views/project/fundcheck/officeExpenseCheck/index.vue
@@ -69,6 +69,17 @@
        </el-col> -->
      </el-row>
      <el-row>
        <el-col :span="5">
          <el-form-item label="捐献者" prop="donorname" style="float: left">
            <el-input
              v-model="queryParams.donorname"
              placeholder="请输入申请人捐献者"
              clearable
              size="small"
              @keyup.enter.native="flowconclusion"
            />
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <div style="margin-bottom: 15px;">
            <el-button
@@ -219,9 +230,9 @@
                type="text"
                icon="el-icon-download"
                @click="totaldayin(scope.row.id)"
                v-hasPermi="['project:donateconsolationfund:download']"
                >下载</el-button
              >
              <!-- v-hasPermi="['project:donateconsolationfund:download']" -->
              <!-- æ–°å¢žå®¡æ ¸é¡µé¢ -->
              <!-- <el-button
src/views/project/fundcheck/performanceCheck/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,595 @@
<template>
  <div class="app-container">
    <el-form
      :model="queryParams"
      ref="queryForm"
      :inline="true"
      v-show="showSearch"
      label-width="120px"
    >
      <el-row align="left">
        <el-col :span="5">
          <el-form-item label="经办人" prop="name">
            <el-input
              v-model="queryParams.name"
              placeholder="请输入经办人"
              clearable
              size="small"
              @keyup.enter.native="flowconclusion"
            />
          </el-form-item>
        </el-col>
        <el-col :span="7">
          <el-form-item label="申请日期" prop="createTime">
            <el-date-picker
              format="yyyy-MM-dd"
              @change="selectapplication"
              value-format="yyyy-MM-dd"
              v-model="createTime"
              type="daterange"
              range-separator="至"
              start-placeholder="申请开始日期"
              end-placeholder="申请结束日期"
              @keyup.enter.native="flowconclusion"
            >
            </el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="5">
          <el-form-item label="金额" prop="money" style="float: left">
            <el-input
              v-model="queryParams.money"
              placeholder="请输入申请人金额"
              clearable
              size="small"
              @keyup.enter.native="flowconclusion"
            />
          </el-form-item>
        </el-col>
        <el-col :span="5">
          <el-form-item label="审批状态" prop="CHECKFLAG" style="float: left">
            <el-select
              v-model="queryParams.CHECKFLAG"
              placeholder="请选择"
              style="width: 100%"
            >
              <el-option
                v-for="item in checkFlagOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="4">
          <div style="margin-bottom: 15px;">
            <el-button
              type="primary"
              icon="el-icon-search"
              size="mini"
              @click="flowconclusion"
              >搜索</el-button
            >
            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
              >重置</el-button
            >
          </div>
        </el-col>
      </el-row>
    </el-form>
    <el-form ref="infoform" label-width="100px">
      <el-row>
        <el-table
          v-loading="loading"
          border
          :data="donateconsolationfundList"
          @selection-change="handleSelectionChange"
        >
          <el-table-column
            label="申请日期"
            width="180"
            align="center"
            prop="createTime"
          >
            <template slot-scope="scope">
              <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
            </template>
          </el-table-column>
          <el-table-column
            label="经办人"
            align="center"
            prop="username"
            width="150px"
          />
          <el-table-column
            label="申请金额"
            align="center"
            prop="pretaxcost"
            width="200px"
          />
          <el-table-column
            label="绩效类型"
            width="150"
            align="center"
            prop="Performancetype"
          >
            <template slot-scope="scope">
              <dict-tag
                :options="dict.type.sys_performance_type"
                :value="scope.row.Performancetype"
              />
            </template>
          </el-table-column>
          <el-table-column
            label="审核状态"
            align="center"
            prop="recordstatus"
            width="200"
          >
            <template slot-scope="scope">
              <dict-tag
                :options="dict.type.sys_recordstatus"
                :value="scope.row.recordstatus"
              />
            </template>
          </el-table-column>
          <el-table-column
            label="预审状态"
            width="140"
            align="center"
            prop="checkstatus"
          >
            <template slot-scope="scope">
              <dict-tag
                :options="dict.type.sys_stage_type"
                :value="scope.row.checkstatus"
              />
            </template>
          </el-table-column>
          <el-table-column label="备注" align="center" prop="remark" />
          <el-table-column
            label="操作"
            fixed="right"
            align="center"
            class-name="small-padding fixed-width"
            width="260px"
          >
            <template slot-scope="scope">
              <el-button
                size="mini"
                type="text"
                icon="el-icon-edit"
                v-if="scope.row.checkFlag == 0"
                @click="handleDetail(scope.row)"
                >详情</el-button
              >
              <el-button
                v-if="scope.row.checkFlag == 1"
                size="mini"
                type="text"
                icon="el-icon-edit"
                @click="beforehandCheck(scope.row)"
                >预审核</el-button
              >
              <el-button
                v-if="scope.row.checkFlag == 1"
                size="mini"
                type="text"
                icon="el-icon-edit"
                @click="handleCheck(scope.row)"
                >审核</el-button
              >
              <!-- v-hasPermi="['project:donateconsolationfund:edit']" -->
              <el-button
                size="mini"
                type="text"
                icon="el-icon-download"
                @click="totaldayin(scope.row.id)"
                v-hasPermi="['project:donateconsolationfund:download']"
                >下载</el-button
              >
            </template>
          </el-table-column>
        </el-table>
        <pagination
          v-show="total > 0"
          :total="total"
          :page.sync="queryParams.pageNum"
          :limit.sync="queryParams.pageSize"
          @pagination="getlistbypower"
        />
      </el-row>
    </el-form>
  </div>
</template>
<script>
import {
  onelistFund,
  listFund,
  getFund,
  delFund,
  addFund,
  updateFund,
  exportFund,
  getdownloadLW,
  getdownloadSH,
  getdownloadSS,
  getdownloadYX,
  getdownloadBX,
  checkfund,
  listbypower,
  getdetailsByItemId,
  addFundSharedInfo
} from "@/api/project/fund";
import {
  onelistFunds,
  listFunddetails,
  listFunddetail,
  getFunddetail,
  delFunddetail,
  addFunddetail,
  getownFundDetail,
  updateFunddetail,
  exportFunddetail,
  getItemNames,
  getFundType,
  getFundTypeAll,
  listcountItem
} from "@/api/project/funddetail";
import {
  listOrganization,
  getOrganization,
  listReportname,
  listUser
} from "@/api/project/organization";
import {
  listFundflow,
  getFundflow,
  delFundflow,
  addFundflow,
  updateFundflow,
  exportFundflow
} from "@/api/project/fundflow";
import {
  listExternalperson,
  getExternalperson,
  getInfoBytheUserNo,
  delExternalperson,
  addExternalperson,
  updateExternalperson,
  exportExternalperson
} from "@/api/project/externalperson";
import {
  listDonatebaseinfo,
  getDonatebaseinfo
} from "@/api/project/donatebaseinfo";
import Li_area_select from "@/components/Address";
import OrgSelecter from "@/views/project/components/orgselect";
import { getUserProfile } from "@/api/system/user";
import { getToken } from "@/utils/auth";
import { setItem, grtItem, removeItem } from "@/utils/storage.js";
export default {
  components: {
    Li_area_select,
    OrgSelecter
  },
  name: "Donateconsolationfund",
  dicts: [
    "sys_recordstatus",
    "sys_OrganizationType",
    "sys_DonationStatus",
    "sys_depositbank",
    "sys_FamilyRelation",
    "sys_IDType",
    "sys_ConsolationType",
    "sys_fund_type",
    "sys_finsubject",
    "sys_financeitemtype",
    "sys_consolationfundlevel",
    "sys_stage_type"
  ],
  data() {
    return {
      arrr2: [],
      arrr3: [],
      //费用类型数组
      fundtypeArr: [],
      show: 0,
      createTime: [],
      newobj: {
        flowlevelone: null,
        flowconclusion: null,
        fundid: null
      },
      showFirstapprovelevel: false,
      showSecondapprovelevel: false,
      showThirdapprovelevel: false,
      bankprovince: {
        sheng: "",
        shi: "",
        qu: "",
        organizationname: null
      },
      openbtn: true,
      isopen: 0,
      istrue: 1,
      reporters: [],
      lunlilaowu: [],
      arrid: [],
      a: "",
      idss: "",
      updatedatas: {},
      //当前选中捐献者姓名
      curdonordoname: "",
      //当前选中捐献者案例编号
      curdonorno: "",
      // é®ç½©å±‚
      loading: true,
      // å¯¼å‡ºé®ç½©å±‚
      exportLoading: false,
      // é€‰ä¸­æ•°ç»„
      ids: [],
      // éžå•个禁用
      single: true,
      // éžå¤šä¸ªç¦ç”¨
      multiple: true,
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
      showSearch: true,
      // æ€»æ¡æ•°
      total: 0,
      // æçŒ®äººé“慰问金表格数据
      donateconsolationfundList: [],
      // å¼¹å‡ºå±‚标题
      title: "",
      //捐献案例列表数据
      // donationCaseTableData:[],
      donatebaseinfoList: [],
      // æ˜¯å¦æ˜¾ç¤ºå¼¹å‡ºå±‚
      open: false,
      checkFlagOptions: [
        {
          value: 0,
          label: "已审批"
        },
        {
          value: 1,
          label: "待审批"
        },
        {
          value: 2,
          label: "全部"
        }
      ],
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        APPLICANT: null,
        APPLICATIONBEGTIME: null,
        APPLICATIONENDTIME: null,
        CHECKFLAG: 1,
        APPLYTYPE: 5,
        money: null
      },
      // è¡¨å•参数
      form: {},
      // è¡¨å•校验
      rules: {
        username: [
          { required: true, message: "请输入申请人姓名", trigger: "blur" }
        ],
        createTime: [
          { required: true, message: "请输入申请日期", trigger: "blur" }
        ],
        amountrequested: [
          { required: true, message: "请输入申请金额", trigger: "blur" }
        ]
      },
      //当前选中捐献案例
      curCase: {},
      //是否显示费用申请弹窗
      dialogOpen: false,
      // title: "",
      //费用申请表单title
      applyFormTitle: "",
      //费用申请单form
      applicationForm: {},
      fundDetailArr: [],
      fundflowList: [],
      organspeciallist: [],
      yitibody: [],
      donoryixue: [],
      jiashumoney: [],
      itemArr: [],
      allnum: [],
      userlist: [],
      approveLevel: 5,
      fundtypeArrAll: [],
      dialogType: "edit",
      //附件列表
      fileList: [],
      //上传附件路径
      uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload",
      headers: {
        Authorization: "Bearer " + getToken()
      }
    };
  },
  watch: {},
  created() {
    this.resetForm();
    this.getUsermsg();
  },
  mounted() {
    if (grtItem("officeExpenseCheck")) {
      this.queryParams = grtItem("officeExpenseCheck");
    }
    this.getlistOrganization();
    //his.getlistUser();
    this.getlistbypower();
  },
  methods: {
    selectapplication() {
      this.queryParams.APPLICATIONBEGTIME = this.createTime[0];
      this.queryParams.APPLICATIONENDTIME = this.createTime[1];
    },
    getlistbypower() {
      this.loading = true;
      // this.queryParams.params = {};
      console.log("this.queryParams", this.queryParams);
      listbypower(this.queryParams).then(res => {
        removeItem("officeExpenseCheck");
        setItem("officeExpenseCheck", this.queryParams);
        this.loading = false;
        let list = res.rows;
        this.total = res.total;
        this.donateconsolationfundList = list;
      });
    },
    getlistOrganization() {
      listOrganization().then(res => {});
    },
    totaldayin(e) {
      // const id =this.row.id
      getdownloadBX(e).then(res => {
        if (res.downloadUrl) {
          var fileUrl = res;
          //获取当前网址
          var urlBase = process.env.VUE_APP_BASE_API;
          var curWWWPath = window.document.location.href;
          var pos = curWWWPath.indexOf(window.document.location.pathname);
          // åˆ›å»ºa标签
          var aEle = document.createElement("a");
          aEle.href =
            curWWWPath.substring(0, pos) + urlBase + fileUrl["downloadUrl"];
          aEle.click();
          this.$alert("下载成功", "提示", {
            confirmButtonText: "确定",
            type: "success"
          });
        }
      });
    },
    isopenvalue(index) {
      this.isopen = index;
    },
    tojust(e) {
      let username = "111";
      getFund(e).then(res => {
        username = res.data.username;
        this.$modal
          .confirm('是否确认通过"' + username + '"的费用申请?')
          .then(function() {
            getFund(e).then(res => {
              let data = res.data;
              let financechecher = "已审核";
              data.financechecher = financechecher;
              // data.recordstatus = "部门已通过";
              const username = data.username;
              return updateFund(data);
            });
          })
          .then(() => {
            this.getList();
            this.getlistbypower();
            this.$modal.msgSuccess("审核成功");
          });
      });
    },
    /** æœç´¢æŒ‰é’®æ“ä½œ */
    flowconclusion() {
      this.queryParams.pageNum = 1;
      this.getlistbypower();
    },
    /** é‡ç½®æŒ‰é’®æ“ä½œ */
    resetQuery() {
      this.daterangeReporttime = [];
      this.resetForm("queryForm");
      this.getlistbypower();
    },
    // å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id);
      this.single = selection.length !== 1;
      this.multiple = !selection.length;
    },
    beforehandCheck(row) {
      this.$router.push({
        path: "/finance/performancedetails/",
        query: {
          id: row.id,
          businessType: "5",
          beforehandType: "1",
          operationType: "check"
        }
      });
    },
    /** å®¡æ ¸æŒ‰é’®æ“ä½œ */
    handleCheck(row) {
      this.$router.push({
        path: "/finance/performancedetails/",
        query: {
          id: row.id,
          businessType: "5",
          operationType: "check"
        }
      });
      return;
    },
    //查看审核详情
    handleDetail(row) {
      this.$router.push({
        path: "/finance/performancedetails/",
        query: {
          id: row.id,
          businessType: "5",
          operationType: "detail"
        }
      });
      return;
    },
    getto() {
      const infoid = this.curCase.id;
      const aaa = {
        infoid: infoid,
        count: this.idss
      };
      listFunddetails(aaa).then(res => {});
    },
    getUsermsg() {
      getUserProfile().then(response => {
        // this.defaultperson = response.data;
        // this.standardlevel = response.data.standardlevel;
        if (
          response.data.userName === "001" ||
          response.data.userName === "002" ||
          response.data.userName === "admin"
        ) {
          this.show = 1;
        } else {
          this.show = 3;
        }
      });
    },
  }
};
</script>
src/views/project/travelexpenseapply/index.vue
@@ -68,6 +68,19 @@
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="5">
          <el-form-item label="捐献者" prop="donorname" style="float: left">
            <el-input
              v-model="queryParams.donorname"
              placeholder="请输入申请人捐献者"
              clearable
              size="small"
              @keyup.enter.native="flowconclusion"
            />
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item>
            <el-button