1
yxh
2023-07-20 42deb933c04571578b8bf408ada9ca1dcc8d3dd8
src/views/project/fund/medicalCostFundApply/index.vue
@@ -55,6 +55,7 @@
                <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
                  v-hasPermi="['project:medicalfund:add']">医学成本申请</el-button>
              </el-col>
              <el-col :span="9">
                <el-form-item label="捐献编号">
                  <el-input v-model="curCase.donorno" :disabled="true"></el-input>
@@ -167,7 +168,7 @@
            <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-col> <!--<el-col :span="5">
            <el-form-item label="税前金额" prop="pretaxcost">
              <el-input v-model="form.pretaxcost" placeholder="税前金额合计" :disabled="true" />
            </el-form-item>
@@ -179,13 +180,13 @@
          </el-col>
          <el-col :span="5">
            <el-form-item label="审核状态" prop="recordstatus">
              <!--<el-input v-if="0" v-model="form.recordstatus" placeholder="审核意见"/>-->
              <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>-->
          <!--
          <el-col :span="5">
            <el-form-item label="联系电话" prop="phone">
@@ -318,7 +319,7 @@
                  " />
              </template>
            </el-table-column>
            <el-table-column prop="unitno" align="center" label="单位" width="220">
            <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>
@@ -423,11 +424,11 @@
        <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) =>
              <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="remove" accept="image/*,.pdf">
                :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>
@@ -452,7 +453,7 @@
      </div>
    </el-dialog>
    <el-dialog :visible.sync="detailInfoDialogShow" :close-on-click-modal="false" :title="'信息修改'"
    <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>
@@ -466,11 +467,11 @@
            </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
            <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="(spec, index) in unitList" :key="index" :label="spec.organizationname"
                  :value="spec.organizationid"></el-option>
                <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>
@@ -588,6 +589,7 @@
        reportername: null,
        reporttime: null,
      },
      fundQueryParam: {
        pageNum: 1,
        pageSize: 100,
@@ -631,15 +633,18 @@
      // 弹出层标题
      title: "",
      userlist: [],
      itemArr: [],
      reporters: [],
      //用户
      userlist: [],
      //银行账号
      bankaccountlist: [],
      //机构单位
      unitList: [],
      //费用类型数组
      fundtypeArr: [],
      defaultperson: {},
      fundblock: [],
      fundtypeArrAll: [],
      unitList: [],
      dialogType: "edit",
      detailInfoDialogShow: false,
@@ -656,10 +661,10 @@
      fileList: [],
      //上传附件路径
      uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload",
      headers: {
        Authorization: "Bearer " + getToken(),
      },
    };
  },
  //监听属性 类似于data概念
@@ -677,6 +682,7 @@
      this.detailInfoDialogShow = true;
      this.detailInfoDialogShowType = showType;
    },
    ConfirmDetailDialog() {
      let tempIndex = this.funddetailForm.index;
      let tempName = this.funddetailForm.beneficiaryname;
@@ -694,7 +700,7 @@
            singleDetail.phone = res.telephone;
            singleDetail.title = res.title;
            singleDetail.unitname = res.unitname;
            singleDetail.unitno = parseInt(res.unitno);
            singleDetail.unitno = res.unitno;
          } else {
            singleDetail.beneficiaryname = tempName;
            singleDetail.beneficiaryno = tempName;
@@ -702,13 +708,17 @@
        });
      } else if (this.detailInfoDialogShowType == "unit") {
        singleDetail.unitno = this.funddetailForm.unitno;
        console.log("this.funddetailForm", this.funddetailForm);
        try {
          let unitIndex = this.unitList.findIndex(
            (item) => singleDetail.unitno == item.organizationid
          let unitIndex = this.bankaccountlist.findIndex(
            (item) => singleDetail.unitno == item.reportNo
          );
          console.log("this.bankaccountlist[unitIndex]", this.bankaccountlist[unitIndex]);
          if (unitIndex > -1) {
            singleDetail.unitno = this.unitList[unitIndex].organizationid;
            singleDetail.unitname = this.unitList[unitIndex].organizationname;
            singleDetail.unitname = this.bankaccountlist[unitIndex].reportName;
            singleDetail.depositbank = this.bankaccountlist[unitIndex].depositbank;
            singleDetail.bankcardno = this.bankaccountlist[unitIndex].bankcardno;
          } else {
            singleDetail.unitname = singleDetail.unitno;
          }
@@ -716,6 +726,7 @@
          singleDetail.unitname = singleDetail.unitno;
        }
      }
      console.log("singleDetail",singleDetail);
      this.fundDetailArr[tempIndex] = singleDetail;
      this.detailInfoDialogShow = false;
    },
@@ -1032,11 +1043,11 @@
            //判断单位 unitSel
            // try {
            //   //获取服务项目明细
            //   let unitIndex = this.unitList.findIndex(
            //     (item) => tempDetail.unitno == item.organizationid
            //   let unitIndex = this.bankaccountlist.findIndex(
            //     (item) => tempDetail.unitno == item.reportNo
            //   );
            //   if (unitIndex > -1) {
            //     tempDetail.unitname = this.unitList[unitIndex].organizationname;
            //     tempDetail.unitname = this.bankaccountlist[unitIndex].reportName;
            //   } else {
            //     tempDetail.unitname = tempDetail.unitno;
            //   }
@@ -1129,10 +1140,11 @@
      });
    },
    selectReporters() {
    getBankAccount() {
      //专家人员列表
      listReportname("gdc").then((res) => {
        this.reporters = res.data;
      listReportname("org").then((res) => {
        this.bankaccountlist = res.data;
        console.log("this.bankaccountlist", this.bankaccountlist);
      });
    },
@@ -1378,11 +1390,14 @@
    },
    getUnitList() {
      listOrganization(3).then((response) => {
        for (let i = 0; i < response.rows.length; i++) {
      listOrganization(3).then((res) => {
        console.log("listOrganization", res);
        for (let i = 0; i < res.rows.length; i++) {
          this.unitList.push({
            organizationid: response.rows[i].organizationid,
            organizationname: response.rows[i].organizationname,
            organizationid: res.rows[i].organizationid,
            organizationname: res.rows[i].organizationname,
            bankname: res.rows[i].bankname,
            bankaccount: res.rows[i].bankaccount,
          });
        }
      });
@@ -1461,7 +1476,7 @@
    //文件上传
    handleUploadError() { },
    remove(file) {
    handleremove(file) {
      this.fileList.splice(this.fileList.indexOf(file), 1)
    },
    handleExceed() {
@@ -1469,6 +1484,9 @@
    },
    //文件上传成功回调
    uploadSccess(response, file, fileList) {
      console.log("response", response);
      console.log("file", file);
      console.log("fileList", fileList);
      //获取附件信息位置
      if (response.code == 200) {
        this.form.filename = file.raw.name;
@@ -1491,15 +1509,16 @@
  //生命周期 - 创建完成(可以访问当前this实例)
  created() {
    this.getUnitList();
    this.getList();
    this.getBaseInfoList();
    this.getlistUser();
    this.getCurFundType();
    this.getlistUser();
    // this.getUnitList();
  },
  //生命周期 - 挂载完成(可以访问DOM元素)
  mounted() {
    this.selectReporters();
    this.getBankAccount();
    this.getUsermsg();
  },
  beforeCreate() { }, //生命周期 - 创建之前