yxh
yxh
2023-07-30 7a46adff3aae94ca4dabc24d9c4921a752d3a827
yxh
已修改6个文件
1246 ■■■■ 文件已修改
src/layout/components/Navbar.vue 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/project/fund/expertFeeFundApply/index.vue 882 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/project/fund/medicalCostFundApply/index.vue 133 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/project/travelexpenseslist/Modifydetails/index.vue 193 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/project/travelexpenseslist/index.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/components/Navbar.vue
@@ -113,20 +113,20 @@
    };
  },
  mounted() {
    this.returs();
    // this.returs();
  },
  methods: {
    async returs() {
      await listSystemmessageCount()
        .then((res) => {
          this.badgeVal = res.data;
          if (this.badgeVal > 0) {
            this.isBadgeHidden = false;
          }
        })
        .catch((error) => {});
    },
//     async returs() {
//       await listSystemmessageCount()
//         .then((res) => {
//           this.badgeVal = res.data;
// console.log('跑');
//           if (this.badgeVal > 0) {
//             this.isBadgeHidden = false;
//           }
//         })
//         .catch((error) => {});
//     },
    clickMessage() {
      this.$router.push({
        path: "/message",
src/views/project/fund/expertFeeFundApply/index.vue
@@ -96,10 +96,10 @@
                  <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>
                      " size="mini" type="text" icon="el-icon-edit" @click="(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)">修改</el-button>
                      " size="mini" type="text" icon="el-icon-edit" @click="date(scope.row)">修改</el-button>
                    <el-button size="mini" type="text" icon="el-icon-edit" @click="handleDetail(scope.row)">查看</el-button>
                    <!-- v-hasPermi="['project:expretfund:edit']" -->
                    <el-button v-if="scope.row.recordstatus == -1 ||
@@ -409,7 +409,7 @@
              <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-preview="downFile" :disabled='dialogType == "detail"' :on-error="loadError"
                :on-exceed="handleExceed" :on-remove="remove" accept="image/*,.pdf">
                <el-button :disabled='dialogType == "detail"' size="small" type="primary">上传</el-button>
              </el-upload>
@@ -622,7 +622,6 @@
  data() {
    //这里存放数据
    return {
      // 遮罩层
      loading: true,
      // 导出遮罩层
@@ -801,6 +800,440 @@
  // },
  //方法集合
  methods: {
    //生命周期 - 创建完成(可以访问当前this实例)
    created() {
      this.getUnitList();
      this.getList();
      this.getBaseInfoList();
      this.getlistUser();
      this.getCurFundType();
    },
    //生命周期 - 挂载完成(可以访问DOM元素)
    mounted() {
      this.selectReporters();
      this.getUsermsg();
      this.getlistExternalperson();
    },
    beforeCreate() { }, //生命周期 - 创建之前
    beforeMount() { }, //生命周期 - 挂载之前
    beforeUpdate() { }, //生命周期 - 更新之前
    updated() { }, //生命周期 - 更新之后
    beforeDestroy() { }, //生命周期 - 销毁之前
    destroyed() { }, //生命周期 - 销毁完成
    activated() { }, //如果页面有keep-alive缓存功能,这个函数会触发
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.daterangeReporttime = [];
      this.resetForm("queryForm");
      this.handleQuery();
    },
    /** 下载文件按钮操作 */
    downFile(item) {
      const url = process.env.VUE_APP_BASE_API + item.url
      var a = document.createElement('a');
      var event = new MouseEvent('click');
      a.download = item.name;
      a.href = url;
      a.dispatchEvent(event);
    },
    /** 新增按钮操作 */
    handleAdd() {
      if (this.curCase.id) {
        this.istrue += 2;
        this.reset();
        this.queryParams.params = {};
        this.form.donorno = this.curCase.donorno;
        this.form.name = this.curCase.name;
        this.form.infoid = this.curCase.id;
        this.form.username = this.defaultperson.nickName;
        this.form.userno = this.defaultperson.userName;
        // this.form.phone = this.defaultperson.phone;
        this.form.deptmentname = this.defaultperson.dept.deptName;
        this.form.deptmentno = this.defaultperson.dept.deptId;
        this.form.managername = this.defaultperson.dept.leader;
        // this.form.createTime = nowdate;
        //this.open = true;
        //this.initFundApplyForm();
        this.fundDetails = [];
        this.addRow();
        this.dialogOpen = true;
        this.dialogType = "edit";
        this.title = "费用申请";
      } else {
        const h = this.$createElement;
        this.$message({
          message: h("p", null, [h("span", null, "请先选择左方捐献案例 ")]),
        });
      }
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.isopen = 0;
      this.reset();
      this.queryParams.params = {};
      this.form.donorno = this.curCase.donorno;
      this.form.infoid = this.curCase.id;
      this.dialogOpen = true;
      this.title = "修改费用申请";
      this.dialogType = "edit";
      const id = row.id || this.ids;
      getFund(id).then((response) => {
        this.form = response.data;
        // this.form.recordstate =-1;
        // this.form.recordstatus = response.data.recordstatus + "";
        this.form.name = this.curCase.name;
        //附件处理
        this.fileList = this.form.annexbankcard ? this.form.annexbankcard.split(",").map(item => ({ url: item, name: item })) : []
        getownFundDetail(id).then((res) => {
          this.fundDetails = res.data;
          for (let m = 0; m < this.fundDetails.length; m++) {
            this.fundDetails[m].itemArr = [];
            this.getItemArr(m, this.fundDetails[m]);
            //获取费用项目的详细信息
            this.fundDetails[m].rowfeeblocks = [];
            this.fundDetails[m].rowfeeblocks.push({
              servicesscope: this.fundDetails[m].servicesscope,
              expensedescribe: this.fundDetails[m].servicesscopename,
              expense: this.fundDetails[m].expense,
              remark: this.fundDetails[m].servicesscopename,
            });
            // getdetailsByItemId(this.fundDetails[m].itemid).then((res) => {
            //   let fundmsg = res.data;
            //   fundmsg.forEach((item) => {
            //     this.fundDetails[m].rowfeeblocks.push({
            //       servicesscope: item.id,
            //       expensedescribe: item.expensedescribe,
            //       expense: item.expense,
            //       remark: item.expensedescribe,
            //     });
            //   });
            // });
          }
          if (this.fundDetails.length == 0) {
            this.addRow();
          }
        });
      });
    },
    /** 查看按钮操作 */
    handleDetail(row) {
      this.isopen = 0;
      this.reset();
      this.queryParams.params = {};
      this.form.donorno = this.curCase.donorno;
      this.form.infoid = this.curCase.id;
      this.dialogOpen = true;
      this.title = "查看费用申请";
      this.dialogType = "detail";
      const id = row.id || this.ids;
      getFund(id).then((response) => {
        this.form = response.data;
        this.form.name = this.curCase.name;
        let listFundflowparams = {
          fundid: row.id,
          fundtype: 2,
        };
        //附件处理
        this.fileList = this.form.annexbankcard ? this.form.annexbankcard.split(",").map(item => ({ url: item, name: item })) : []
        listFundflow(listFundflowparams).then((res) => {
          this.fundflowList = res.rows;
        });
        getownFundDetail(id).then((res) => {
          this.fundDetails = res.data;
          for (let m = 0; m < this.fundDetails.length; m++) {
            this.fundDetails[m].itemArr = [];
            this.getItemArr(m, this.fundDetails[m]);
            this.fundDetails[m].rowfeeblocks = [];
            this.fundDetails[m].rowfeeblocks.push({
              expense: this.fundDetails[m].expense,
              expensedescribe: this.fundDetails[m].servicesscopename,
              remark: this.fundDetails[m].servicesscope,
              servicesscope: this.fundDetails[m].servicesscope,
            });
          }
          if (this.fundDetails.length == 0) {
            this.addRow();
          }
        });
      });
    },
    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.getfundList();
          this.$modal.msgSuccess("删除成功");
        })
        .catch(() => { });
    },
    /** 上报按钮操作 */
    handleup(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: "已取消申请",
          });
        });
    },
    /** 提交按钮 */
    submitForm() {
      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.fundDetails.length; k++) {
            let tempDetail = this.fundDetails[k];
            if (tempDetail.itemid == null) {
              this.$modal.msgWarning("服务项目表中,第" + (k + 1).toString() + "行的服务项目未选择,请先选择服务项目后再提交保存!");
              return;
            }
            if (tempDetail.servicesscope == null) {
              this.$modal.msgWarning("服务项目表中,第" + (k + 1).toString() + "行的费用说明未选择,请选择费用说明后再提交保存!");
              return;
            }
            if (tempDetail.beneficiaryno == null) {
              this.$modal.msgWarning("服务项目表中,第" + (k + 1).toString() + "行的服务人员姓名为选择,请选择人员后再提交保存!");
              return;
            }
            // //判断单位 unitSel
            // try {
            //   let unitIndex = this.unitList.findIndex(
            //     (item) => tempDetail.unitno == item.organizationid
            //   );
            //   if (unitIndex > -1) {
            //     tempDetail.unitname = this.unitList[unitIndex].organizationname;
            //   } else {
            //     tempDetail.unitname = tempDetail.unitno;
            //   }
            // } catch {
            //   tempDetail.unitname = tempDetail.unitno;
            // }
          }
          //附件处理
          let list = this.fileList;
          if (list.length > 0) {
            this.form.annexfiles = list.map(item => item.url).join(",");
          }
          //处理明细
          for (let i = 0; i < this.fundDetails.length; i++) {
            let tempDetail = this.fundDetails[i];
            //获取服务项目明细
            let tempItemArr = tempDetail.itemArr;
            let itemIndex = tempItemArr.findIndex(
              (item) => tempDetail.itemid == item.id
            );
            if (itemIndex > -1) {
              tempDetail.itemname = tempItemArr[itemIndex].itemName;
              tempDetail.itemid = tempItemArr[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.fundDetails[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.fundDetails[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.fundDetails[k] = tempDetail;
                  this.totalAfterTaxAmount += parseFloat(tempDetail.taxedamount);
                  this.totalAmount += parseFloat(tempDetail.amount);
                  console.log("1", this.amount);
                }
              });
            }
            */
          }
          //费用合计
          // this.form.pretaxcost = parseFloat(this.totalPreTaxAmount).toFixed(2);
          // this.form.taxedcost = parseFloat(this.totalAfterTaxAmount).toFixed(2);
          // this.form.amountrequested = this.totalAmount.toFixed(2);
          //保存数据
          this.loading = true;
          this.form.serviceFunddetails = 0;
          this.fundDetails.map((item) => {
            this.form.serviceFunddetails += item.amount;
          });
          this.form.serviceFunddetails = this.fundDetails;
          if (this.form.id != null) {
            //捐献者
            this.form.donorname = this.curCase.name;
          }
          else {
            this.form.recordstatus = -1;
          }
          batchUploadFund(this.form).then((response) => {
            if (response.code === 200) {
              this.$modal.msgSuccess("专家劳务费保存成功!");
              this.selectDonotor(this.curCase);
            } else {
              this.$modal.msgError("专家劳务费保存失败:" + response.msg);
            }
          });
          //关闭窗口
          this.loading = false;
          this.dialogOpen = false;
        }
      });
    },
    // 取消按钮
    cancel() {
      this.dialogOpen = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        recordstate: -1,
        userno: null,
        username: null,
        id: 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,
        applytype: "1",
        servicetypename: null,
        servicesscope: null,
        servicesscopename: null,
      };
      this.resetForm("form");
      //清空附件
      this.fileList = []
    },
    ShowDetailDialog(spoce, showType) {
      this.expertfrom = "1";
      this.funddetailForm.index = spoce.$index;
@@ -928,44 +1361,11 @@
      this.showDetailInfoDialog = false;
    },
    handleup(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: "已取消申请",
          });
        });
    },
    //获取当前用户信息
    getUsermsg() {
      getUserProfile().then((response) => {
        this.defaultperson = response.data;
        console.log("this.defaultperson", this.defaultperson);
        this.standardlevel = response.data.standardlevel;
        if (this.defaultperson.createBy == "admin" || this.defaultperson.createBy == "001" || this.defaultperson.createBy == "002") {
          this.ismanager = true;
@@ -1043,17 +1443,6 @@
      });
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.daterangeReporttime = [];
      this.resetForm("queryForm");
      this.handleQuery();
    },
    /** 查询捐献人道慰问金列表 */
    getList() {
      this.loading = true;
@@ -1066,6 +1455,8 @@
      // this.queryParams.residencetown = this.$refs.areaSelect.getQu();
      listDonatebaseinfo(this.queryParams).then((response) => {
        this.donatebaseinfoList = response.rows;
        console.log("this.queryParams", this.queryParams)
        console.log("this.donatebaseinfoList", this.donatebaseinfoList)
        this.total = response.total;
        this.loading = false;
      });
@@ -1090,36 +1481,6 @@
      });
    },
    /** 新增按钮操作 */
    handleAdd() {
      if (this.curCase.id) {
        this.istrue += 2;
        this.reset();
        this.queryParams.params = {};
        this.form.donorno = this.curCase.donorno;
        this.form.name = this.curCase.name;
        this.form.infoid = this.curCase.id;
        this.form.username = this.defaultperson.nickName;
        this.form.userno = this.defaultperson.userName;
        this.form.deptmentname = this.defaultperson.dept.deptName;
        this.form.deptmentno = this.defaultperson.dept.deptId;
        this.form.managername = this.defaultperson.dept.leader;
        // this.form.createTime = nowdate;
        //this.open = true;
        //this.initFundApplyForm();
        this.fundDetails = [];
        this.addRow();
        this.dialogOpen = true;
        this.dialogType = "edit";
        this.title = "费用申请";
      } else {
        const h = this.$createElement;
        this.$message({
          message: h("p", null, [h("span", null, "请先选择左方捐献案例 ")]),
        });
      }
    },
    //点击捐献案例列表触发方法
    selectDonotor(row, column, event) {
      this.curCase = row;
@@ -1133,59 +1494,6 @@
        this.loading = false;
        this.donateconsolationfundList = response.rows;
      });
    },
    // 取消按钮
    cancel() {
      this.dialogOpen = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        recordstate: -1,
        userno: null,
        username: null,
        id: 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,
        applytype: "1",
        servicetypename: null,
        servicesscope: null,
        servicesscopename: null,
      };
      this.resetForm("form");
      //清空附件
      this.fileList = []
    },
    //导入所有项目
@@ -1350,155 +1658,7 @@
      //   row.itemArr = res.data;
      //   this.$forceUpdate();
      // });
    },
    /** 提交按钮 */
    submitForm() {
      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.fundDetails.length; k++) {
            let tempDetail = this.fundDetails[k];
            if (tempDetail.itemid == null) {
              this.$modal.msgWarning("服务项目表中,第" + (k + 1).toString() + "行的服务项目未选择,请先选择服务项目后再提交保存!");
              return;
            }
            if (tempDetail.servicesscope == null) {
              this.$modal.msgWarning("服务项目表中,第" + (k + 1).toString() + "行的费用说明未选择,请选择费用说明后再提交保存!");
              return;
            }
            if (tempDetail.beneficiaryno == null) {
              this.$modal.msgWarning("服务项目表中,第" + (k + 1).toString() + "行的服务人员姓名为选择,请选择人员后再提交保存!");
              return;
            }
            // //判断单位 unitSel
            // try {
            //   let unitIndex = this.unitList.findIndex(
            //     (item) => tempDetail.unitno == item.organizationid
            //   );
            //   if (unitIndex > -1) {
            //     tempDetail.unitname = this.unitList[unitIndex].organizationname;
            //   } else {
            //     tempDetail.unitname = tempDetail.unitno;
            //   }
            // } catch {
            //   tempDetail.unitname = tempDetail.unitno;
            // }
          }
          //附件处理
          let list = this.fileList;
          if (list.length > 0) {
            this.form.annexfiles = list.map(item => item.url).join(",");
          }
          //处理明细
          for (let i = 0; i < this.fundDetails.length; i++) {
            let tempDetail = this.fundDetails[i];
            //获取服务项目明细
            let tempItemArr = tempDetail.itemArr;
            let itemIndex = tempItemArr.findIndex(
              (item) => tempDetail.itemid == item.id
            );
            if (itemIndex > -1) {
              tempDetail.itemname = tempItemArr[itemIndex].itemName;
              tempDetail.itemid = tempItemArr[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.fundDetails[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.fundDetails[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.fundDetails[k] = tempDetail;
                  this.totalAfterTaxAmount += parseFloat(tempDetail.taxedamount);
                  this.totalAmount += parseFloat(tempDetail.amount);
                  console.log("1", this.amount);
                }
              });
            }
            */
          }
          //费用合计
          // this.form.pretaxcost = parseFloat(this.totalPreTaxAmount).toFixed(2);
          // this.form.taxedcost = parseFloat(this.totalAfterTaxAmount).toFixed(2);
          // this.form.amountrequested = this.totalAmount.toFixed(2);
          //保存数据
          this.loading = true;
          this.form.serviceFunddetails = 0;
          this.fundDetails.map((item) => {
            this.form.serviceFunddetails += item.amount;
          });
          this.form.serviceFunddetails = this.fundDetails;
          if (this.form.id != null) {
            //捐献者
            this.form.donorname = this.curCase.name;
          }
          else {
            this.form.recordstatus = -1;
          }
          batchUploadFund(this.form).then((response) => {
            if (response.code === 200) {
              this.$modal.msgSuccess("专家劳务费保存成功!");
              this.selectDonotor(this.curCase);
            } else {
              this.$modal.msgError("专家劳务费保存失败:" + response.msg);
            }
          });
          //关闭窗口
          this.loading = false;
          this.dialogOpen = false;
        }
      });
    },
    },
    //获取专家列表
    getlistExternalperson() {
@@ -1535,7 +1695,7 @@
          row.branchbankname = res.branchbankname;
          row.depositbank = res.depositbank;
          row.idcardno = res.idcardno;
          row.phone = res.telephone;
          row.phone = res.phonenumber;
          row.title = res.title;
          row.unitname = res.unitname;
          row.unitno = res.unitno;
@@ -1547,130 +1707,10 @@
    getlistUser() {
      listUser().then((res) => {
        console.log("listUser", res);
        this.userlist = res.data;
      });
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.isopen = 0;
      this.reset();
      this.queryParams.params = {};
      this.form.donorno = this.curCase.donorno;
      this.form.infoid = this.curCase.id;
      this.dialogOpen = true;
      this.title = "修改费用申请";
      this.dialogType = "edit";
      const id = row.id || this.ids;
      getFund(id).then((response) => {
        this.form = response.data;
        // this.form.recordstate =-1;
        // this.form.recordstatus = response.data.recordstatus + "";
        this.form.name = this.curCase.name;
        //附件处理
        this.fileList = this.form.annexbankcard ? this.form.annexbankcard.split(",").map(item => ({ url: item, name: item })) : []
        getownFundDetail(id).then((res) => {
          this.fundDetails = res.data;
          for (let m = 0; m < this.fundDetails.length; m++) {
            this.fundDetails[m].itemArr = [];
            this.getItemArr(m, this.fundDetails[m]);
            //获取费用项目的详细信息
            this.fundDetails[m].rowfeeblocks = [];
            this.fundDetails[m].rowfeeblocks.push({
              servicesscope: this.fundDetails[m].servicesscope,
              expensedescribe: this.fundDetails[m].servicesscopename,
              expense: this.fundDetails[m].expense,
              remark: this.fundDetails[m].servicesscopename,
            });
            // getdetailsByItemId(this.fundDetails[m].itemid).then((res) => {
            //   let fundmsg = res.data;
            //   fundmsg.forEach((item) => {
            //     this.fundDetails[m].rowfeeblocks.push({
            //       servicesscope: item.id,
            //       expensedescribe: item.expensedescribe,
            //       expense: item.expense,
            //       remark: item.expensedescribe,
            //     });
            //   });
            // });
          }
          if (this.fundDetails.length == 0) {
            this.addRow();
          }
        });
      });
    },
    /** 查看按钮操作 */
    handleDetail(row) {
      this.isopen = 0;
      this.reset();
      this.queryParams.params = {};
      this.form.donorno = this.curCase.donorno;
      this.form.infoid = this.curCase.id;
      this.dialogOpen = true;
      this.title = "查看费用申请";
      this.dialogType = "detail";
      const id = row.id || this.ids;
      getFund(id).then((response) => {
        this.form = response.data;
        this.form.name = this.curCase.name;
        let listFundflowparams = {
          fundid: row.id,
          fundtype: 2,
        };
        //附件处理
        this.fileList = this.form.annexbankcard ? this.form.annexbankcard.split(",").map(item => ({ url: item, name: item })) : []
        listFundflow(listFundflowparams).then((res) => {
          this.fundflowList = res.rows;
        });
        getownFundDetail(id).then((res) => {
          this.fundDetails = res.data;
          for (let m = 0; m < this.fundDetails.length; m++) {
            this.fundDetails[m].itemArr = [];
            this.getItemArr(m, this.fundDetails[m]);
            this.fundDetails[m].rowfeeblocks = [];
            this.fundDetails[m].rowfeeblocks.push({
              expense: this.fundDetails[m].expense,
              expensedescribe: this.fundDetails[m].servicesscopename,
              remark: this.fundDetails[m].servicesscope,
              servicesscope: this.fundDetails[m].servicesscope,
            });
          }
          if (this.fundDetails.length == 0) {
            this.addRow();
          }
        });
      });
    },
    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.getfundList();
          this.$modal.msgSuccess("删除成功");
        })
        .catch(() => { });
    },
    },
    deleteRows(row, index, rows) {
      this.$confirm("是否确认删除?", "提示", {
@@ -1872,41 +1912,11 @@
      } else {
        this.$modal.msgError(response.msg);
      }
    },
    // 下载文件
    downFile(item) {
      const url = process.env.VUE_APP_BASE_API + item.url
      var a = document.createElement('a');
      var event = new MouseEvent('click');
      a.download = item.name;
      a.href = url;
      a.dispatchEvent(event);
    },
    },
  },
  //生命周期 - 创建完成(可以访问当前this实例)
  created() {
    this.getUnitList();
    this.getList();
    this.getBaseInfoList();
    this.getlistUser();
    this.getCurFundType();
  },
  //生命周期 - 挂载完成(可以访问DOM元素)
  mounted() {
    this.selectReporters();
    this.getUsermsg();
    this.getlistExternalperson();
  },
  beforeCreate() { }, //生命周期 - 创建之前
  beforeMount() { }, //生命周期 - 挂载之前
  beforeUpdate() { }, //生命周期 - 更新之前
  updated() { }, //生命周期 - 更新之后
  beforeDestroy() { }, //生命周期 - 销毁之前
  destroyed() { }, //生命周期 - 销毁完成
  activated() { }, //如果页面有keep-alive缓存功能,这个函数会触发
};
</script>
<style scoped>
src/views/project/fund/medicalCostFundApply/index.vue
@@ -207,7 +207,7 @@
          </el-col>
        </el-row>
        <el-row style="margin-top: 5px; margin-bottom: 5px">
          <el-table :data="fundDetailArr" border highlight-current-row>
          <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="排序" />
@@ -364,9 +364,14 @@
              <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, fundDetailArr)
                  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>
@@ -629,7 +634,8 @@
      // 捐献人道慰问金表格数据
      donateconsolationfundList: [],
      fundDetailArr: [],
      //明细记录
      fundDetails: [],
      // 弹出层标题
      title: "",
@@ -687,7 +693,7 @@
      let tempIndex = this.funddetailForm.index;
      let tempName = this.funddetailForm.beneficiaryname;
      let tempUnitname = this.funddetailForm.unitname;
      let singleDetail = this.fundDetailArr[tempIndex];
      let singleDetail = this.fundDetails[tempIndex];
      if (this.detailInfoDialogShowType == "name") {
        this.personlist.map((res) => {
          if (tempName == res.username) {
@@ -727,7 +733,7 @@
        }
      }
      console.log("singleDetail",singleDetail);
      this.fundDetailArr[tempIndex] = singleDetail;
      this.fundDetails[tempIndex] = singleDetail;
      this.detailInfoDialogShow = false;
    },
    selectremark(row) {
@@ -736,7 +742,7 @@
          row.servivesscope = item.servivesscope;
          row.amount = item.expense;
          this.form.serviceFunddetails = 0;
          this.fundDetailArr.map((item) => {
          this.fundDetails.map((item) => {
            this.form.serviceFunddetails += item.amount;
          });
          // row.remark
@@ -784,7 +790,7 @@
        }
      });
      var repeatNum = 0;
      this.fundDetailArr.map((res) => {
      this.fundDetails.map((res) => {
        if (res.applytype === row.applytype && res.itemid == row.itemid) {
          repeatNum++;
        }
@@ -878,7 +884,7 @@
        // this.form.createTime = nowdate;
        //this.open = true;
        //this.initFundApplyForm();
        this.fundDetailArr = [];
        this.fundDetails = [];
        this.addRow();
        this.dialogOpen = true;
        this.title = "添加费用申请";
@@ -1005,12 +1011,12 @@
        servivesscope: null,
      };
      if (rowIndex == undefined || rowIndex == null || rowIndex < 0) {
        this.fundDetailArr.push(rowData);
        this.fundDetails.push(rowData);
      } else {
        this.fundDetailArr.splice(rowIndex + 1, 0, rowData);
        this.fundDetails.splice(rowIndex + 1, 0, rowData);
      }
      for (let i = 0; i < this.fundDetailArr.length; i++) {
        this.fundDetailArr[i].orderno = i + 1;
      for (let i = 0; i < this.fundDetails.length; i++) {
        this.fundDetails[i].orderno = i + 1;
      }
    },
@@ -1034,8 +1040,8 @@
      this.$refs["form"].validate((valid) => {
        if (valid) {
          let formData = this.form;
          for (let k = 0; k < this.fundDetailArr.length; k++) {
            let tempDetail = this.fundDetailArr[k];
          for (let k = 0; k < this.fundDetails.length; k++) {
            let tempDetail = this.fundDetails[k];
            if (tempDetail.itemid == null) {
              this.$modal.msgWarning("请选择服务项目");
              return;
@@ -1081,8 +1087,8 @@
              this.selectDonotor(this.curCase);
              this.$modal.msgSuccess("修改成功");
              this.loading = false;
              for (let m = 0; m < this.fundDetailArr.length; m++) {
                let tempData = this.fundDetailArr[m];
              for (let m = 0; m < this.fundDetails.length; m++) {
                let tempData = this.fundDetails[m];
                let tempItemArr = tempData.itemArr;
                tempData.fundid = formData.id;
                //获取服务项目明细
@@ -1102,8 +1108,8 @@
            });
          } else {
            //保存费用申请
            for (let m = 0; m < this.fundDetailArr.length; m++) {
              let tempData = this.fundDetailArr[m];
            for (let m = 0; m < this.fundDetails.length; m++) {
              let tempData = this.fundDetails[m];
              let tempUtemArr = tempData.itemArr;
              //获取服务项目明细
@@ -1121,10 +1127,10 @@
              if (applytypeIndex > -1) {
                tempData.applytypename = this.fundtypeArr[applytypeIndex].label;
              }
              this.fundDetailArr[m] = tempData;
              this.fundDetails[m] = tempData;
            }
            this.form.serviceFunddetails = this.fundDetailArr;
            this.form.serviceFunddetails = this.fundDetails;
            batchUploadFund(this.form).then((response) => {
              if (response.code === 200) {
                this.$modal.msgSuccess("新增成功");
@@ -1174,10 +1180,10 @@
        this.fileList = this.form.annexbankcard ? this.form.annexbankcard.split(",").map(item => ({ url: item, name: item })) : []
        getownFundDetail(id).then(async (res) => {
          this.fundDetailArr = res.data;
          for (let m = 0; m < this.fundDetailArr.length; m++) {
            this.fundDetailArr[m].itemArr = [];
            this.getItemArr(m, this.fundDetailArr[m]);
          this.fundDetails = res.data;
          for (let m = 0; m < this.fundDetails.length; m++) {
            this.fundDetails[m].itemArr = [];
            this.getItemArr(m, this.fundDetails[m]);
          }
        });
      });
@@ -1209,16 +1215,16 @@
          this.fundflowList = res.rows;
        });
        getownFundDetail(id).then((res) => {
          this.fundDetailArr = res.data;
          for (let m = 0; m < this.fundDetailArr.length; m++) {
            this.fundDetailArr[m].itemArr = [];
            this.getItemArr(m, this.fundDetailArr[m]);
            this.fundDetailArr[m].fundblock = [];
            this.fundDetailArr[m].fundblock.push({
              expense: this.fundDetailArr[m].expense,
              expensedescribe: this.fundDetailArr[m].servicesscopename,
              remark: this.fundDetailArr[m].servicesscope,
              servicesscope: this.fundDetailArr[m].servicesscope,
          this.fundDetails = res.data;
          for (let m = 0; m < this.fundDetails.length; m++) {
            this.fundDetails[m].itemArr = [];
            this.getItemArr(m, this.fundDetails[m]);
            this.fundDetails[m].fundblock = [];
            this.fundDetails[m].fundblock.push({
              expense: this.fundDetails[m].expense,
              expensedescribe: this.fundDetails[m].servicesscopename,
              remark: this.fundDetails[m].servicesscope,
              servicesscope: this.fundDetails[m].servicesscope,
            });
          }
        });
@@ -1263,9 +1269,9 @@
                }).then(() => {
                  this.$set(rows, rows.splice(index, 1));
                  getownFundDetail(this.form.id).then((res) => {
                    this.$set(this.fundDetailArr, res.data);
                    this.$set(this.fundDetails, res.data);
                    this.sumTotalFee(row);
                    // this.fundDetailArr = res.data
                    // this.fundDetails = res.data
                  });
                });
              }
@@ -1284,31 +1290,31 @@
    sumTotalFee(row) {
      let allSum = 0;
      if (this.form.applytype != null) {
        for (let i = 0; i < this.fundDetailArr.length; i++) {
        for (let i = 0; i < this.fundDetails.length; i++) {
          let totalFee = 0;
          let taxFee = 0;
          if (this.form.applytype == 1 || this.form.applytype == 2) {
            //计算当前报销内容费用合计
            if (!isNaN(parseFloat(this.fundDetailArr[i].amount))) {
              totalFee += parseFloat(this.fundDetailArr[i].amount);
              taxFee += parseFloat(this.fundDetailArr[i].amount);
            if (!isNaN(parseFloat(this.fundDetails[i].amount))) {
              totalFee += parseFloat(this.fundDetails[i].amount);
              taxFee += parseFloat(this.fundDetails[i].amount);
            }
            if (!isNaN(parseFloat(this.fundDetailArr[i].taxamount))) {
              totalFee -= parseFloat(this.fundDetailArr[i].taxamount);
              taxFee -= parseFloat(this.fundDetailArr[i].taxamount);
            if (!isNaN(parseFloat(this.fundDetails[i].taxamount))) {
              totalFee -= parseFloat(this.fundDetails[i].taxamount);
              taxFee -= parseFloat(this.fundDetails[i].taxamount);
            }
          } else if (this.form.applytype == 3) {
            if (
              !isNaN(parseFloat(this.fundDetailArr[i].price)) &&
              !isNaN(parseFloat(this.fundDetailArr[i].quantity))
              !isNaN(parseFloat(this.fundDetails[i].price)) &&
              !isNaN(parseFloat(this.fundDetails[i].quantity))
            ) {
              totalFee +=
                parseFloat(this.fundDetailArr[i].price) *
                parseFloat(this.fundDetailArr[i].quantity);
                parseFloat(this.fundDetails[i].price) *
                parseFloat(this.fundDetails[i].quantity);
            }
          }
          if (!isNaN(parseFloat(taxFee))) {
            this.fundDetailArr[i].taxedamount = taxFee.toFixed(2);
            this.fundDetails[i].taxedamount = taxFee.toFixed(2);
          }
          allSum += totalFee;
        }
@@ -1336,25 +1342,25 @@
    getItemArr(rowindex, row) {
      let list = this.fundtypeArrAll.filter((r) => r.itemType == row.applytype);
      row.itemArr = list[0].itemDetails;
      this.$set(this.fundDetailArr, rowindex, row);
      this.$set(this.fundDetails, rowindex, row);
      //this.loading = true;
      // getItemNames(row.applytype).then((res) => {
      //   this.loading = false;
      //   row.itemArr = res.data;
      //   this.$set(this.fundDetailArr, rowindex, row);
      //   this.$set(this.fundDetails, rowindex, row);
      // });
    },
    addAlls() {
      this.loading = true;
      this.fundDetailArr = this.fundDetailArr.filter(
      this.fundDetails = this.fundDetails.filter(
        (r) => r.applytype != "" && r.applytype != null
      );
      let listAdd = [];
      //let listAdd = this.fundDetailArr;
      //let listAdd = this.fundDetails;
      for (let i = 0; i < this.fundtypeArrAll.length; i++) {
        for (let j = 0; j < this.fundtypeArrAll[i].itemDetails.length; j++) {
          let list = this.fundDetailArr.filter(
          let list = this.fundDetails.filter(
            (r) =>
              r.applytype == this.fundtypeArrAll[i].itemType &&
              r.itemid == this.fundtypeArrAll[i].itemDetails[j].id
@@ -1375,9 +1381,9 @@
          }
        }
      }
      this.fundDetailArr = listAdd;
      this.fundDetails = listAdd;
      this.loading = false;
      // let Outerarr = this.fundDetailArr;
      // let Outerarr = this.fundDetails;
      // Outerarr.map((res) => {
      //   let onelist = this.fundtypeArr;
      //   onelist.map((item) => {
@@ -1469,7 +1475,7 @@
      } else {
        getItemNames(scope.row.applytype).then((res) => {
          scope.row.itemArr = res.data;
          //this.$set(this.fundDetailArr, rowindex, row);
          //this.$set(this.fundDetails, rowindex, row);
        });
      }
    },
@@ -1507,6 +1513,21 @@
    },
  },
  // 点击文件
  Filepopup(index, rows, row) {
      console.log(index, rows, row);
      this.atpresent = index;
      console.log(this.atpresent);
      this.pdfVisible = true;
      if (this.fundDetails[index].annexfilesList) {
        this.fileListto = this.rbDetails[index].annexfilesList;
      } else {
        this.fileListto = [];
        this.pdfimg = "";
        this.pdftitle = "";
      }
    },
  //生命周期 - 创建完成(可以访问当前this实例)
  created() {
    this.getList();
src/views/project/travelexpenseslist/Modifydetails/index.vue
@@ -166,7 +166,7 @@
          <el-col :span="20">报销明细录入:</el-col>
        </el-row>
        <el-row>
          <el-table :data="rbDetails" border highlight-current-row show-summary>
          <el-table :data="rbDetails" border highlight-current-row :summary-method="getSummaries" show-summary>
            <el-table-column prop="orderno" slot="" label="序号" align="center" fixed width="65">
              <template slot-scope="scope">
                <el-input v-model="scope.row.orderno" placeholder="序号" />
@@ -274,8 +274,8 @@
            <el-table-column prop="trafficexpense" label="交通费" align="center" width="80">
              <template slot-scope="scope">
                <el-input v-model="scope.row.trafficexpense" placeholder="交通费" @blur="val => {
                    sumRowFee(scope.row);
                  }
                  sumRowFee(scope.row);
                }
                  " />
              </template>
            </el-table-column>
@@ -294,8 +294,8 @@
            <el-table-column prop="hotelexpense" label="住宿费" align="center" width="80">
              <template slot-scope="scope">
                <el-input v-model="scope.row.hotelexpense" placeholder="住宿费" @blur="val => {
                    sumRowFee(scope.row);
                  }
                  sumRowFee(scope.row);
                }
                  " />
              </template>
            </el-table-column>
@@ -303,24 +303,24 @@
            <el-table-column prop="foodexpenses" label="餐费报销" align="center" width="80">
              <template slot-scope="scope">
                <el-input v-model="scope.row.foodexpenses" placeholder="伙食费报销" @blur="val => {
                    sumRowFee(scope.row);
                  }
                  sumRowFee(scope.row);
                }
                  " />
              </template>
            </el-table-column>
            <el-table-column prop="foodallowance" label="伙食补助" align="center" width="80">
              <template slot-scope="scope">
                <el-input v-model="scope.row.foodallowance" placeholder="伙食费补助" @blur="val => {
                    sumRowFee(scope.row);
                  }
                  sumRowFee(scope.row);
                }
                  " />
              </template>
            </el-table-column>
            <el-table-column prop="otherexpense" label="公杂费补助" align="center" width="80">
              <template slot-scope="scope">
                <el-input v-model="scope.row.otherexpense" placeholder="杂费" @blur="val => {
                    sumRowFee(scope.row);
                  }
                  sumRowFee(scope.row);
                }
                  " />
              </template>
            </el-table-column>
@@ -328,8 +328,8 @@
            <el-table-column prop="otherfeeamount" label="其他费用" align="center" width="90">
              <template slot-scope="scope">
                <el-input v-model="scope.row.otherfeeamount" placeholder="其他费用" @blur="val => {
                    sumRowFee(scope.row);
                  }
                  sumRowFee(scope.row);
                }
                  " />
              </template>
            </el-table-column>
@@ -344,19 +344,14 @@
                <el-input v-model="scope.row.total" placeholder="合计" />
              </template>
            </el-table-column>
            <el-table-column fixed="right" label="操作" align="center" width="120" v-if="dialogType == 'edit'">
            <el-table-column fixed="right" label="操作" align="center" width="120">
              <template slot-scope="scope">
                <el-button type="text" size="mini" @click="addDetailRow(scope.$index)">新增</el-button>
                <el-button @click.native.prevent="
                  deleteDetailRow(scope.$index, rbDetails, scope.row)
                  " type="text" size="small">
                  删除
                </el-button>
                <el-button @click.native.prevent="
                  Filepopup(scope.$index, rbDetails, scope.row)
                  " type="text" size="small">
                  附件
                </el-button>
                <el-button type="text" size="mini" @click="addDetailRow(scope.$index)"
                  v-if="dialogType == 'edit'">新增</el-button>
                <el-button @click.native.prevent="deleteDetailRow(scope.$index, rbDetails, scope.row)" type="text"
                  size="small" v-if="dialogType == 'edit'">删除</el-button>
                <el-button @click.native.prevent="Filepopup(scope.$index, rbDetails, scope.row)" type="text"
                  size="small">票据</el-button>
              </template>
            </el-table-column>
          </el-table>
@@ -365,7 +360,7 @@
          <el-col :span="20">报销请款明细:</el-col>
        </el-row>
        <el-row style="margin-top: 30px">
          <el-table :data="rbPayees" border highlight-current-row show-summary>
          <el-table :data="rbPayees" border highlight-current-row :summary-method="getSummaries" show-summary>
            <el-table-column prop="orderno" slot="" label="序号" align="center" fixed width="65">
              <template slot-scope="scope">
                <el-input v-model="scope.row.orderno" placeholder="序号" />
@@ -418,17 +413,19 @@
                <el-input v-model="scope.row.amount" placeholder="打款金额" />
              </template>
            </el-table-column>
            <el-table-column prop="remark" slot="" label="请款说明" align="center" fixed width="280">
            <el-table-column prop="remark" slot="" label="请款说明" align="center" fixed>
              <template slot-scope="scope">
                <el-input v-model="scope.row.remark" placeholder="说明" />
              </template> </el-table-column><el-table-column prop="paiddate" slot="" label="打款日期" fixed align="center"
              width="150">
              </template>
            </el-table-column>
            <!--
            <el-table-column prop="paiddate" slot="" label="打款日期" fixed align="center" width="150">
              <template slot-scope="scope">
                <el-date-picker clearable size="small" style="width: 100%" v-model="scope.row.paiddate" type="date"
                  value-format="yyyy-MM-dd HH:mm:ss" placeholder="打款日期" :disabled="true">
                </el-date-picker>
              </template>
            </el-table-column>
            </el-table-column>-->
            <el-table-column label="操作" align="center" width="100" v-if="dialogType == 'edit'">
              <template slot-scope="scope">
                <el-button type="text" size="mini" @click="addPayeeRow(scope.$index)">新增</el-button>
@@ -456,7 +453,7 @@
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm" v-if="dialogType == 'edit'">保 存</el-button>
        <el-button @click="cancel">取 消</el-button>
        <!--<el-button @click="cancel">退 出</el-button>-->
      </div>
    </div>
@@ -466,7 +463,7 @@
          <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)
                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>
@@ -566,7 +563,9 @@
      //下拉可以选择人员列表
      personsSel: [],
      // 部门树选项
      deptOptions: undefined,
      //票据文件
      pdftitle: "",
      pdfimg: "",
      pdfVisible: false,
@@ -574,6 +573,7 @@
        value: 0,
        label: ""
      },
      hintitle: "选中左侧已上传文件预览查看",
      atpresent: "",
      iframeurl: "",
@@ -672,13 +672,19 @@
  created() {
    //获取记录列表
    this.getList();
    this.gainee();
    // this.getList();
    //获取报销中的人员信息
    this.getPersonList();
  },
  mounted() {
    //获取登录者信息
    getUserProfile().then(response => {
      this.defaultperson = response.data;
      this.standardlevel = response.data.standardlevel;
      console.log("this.defaultperson", this.defaultperson);
    });
    //获取捐献者姓名
    listDonatebaseinfo().then(res => {
      let list = res.rows;
@@ -696,10 +702,24 @@
      }
    });
    //获取登录者信息
    this.getUsermsg();
    //获取部门信息
    //this.getTreeselect();
  },
  mounted() {
    //选择业务类型:1、新增;2、修改;3、查看
    let ids = this.$route.query.id;
    let pos = this.$route.query.pos;
    this.defaultperson = this.$route.query.routerparam;
    if (pos == 1) {
      this.handleAdd(ids);
    } else if (pos == 2) {
      this.handleUpdate(ids);
    }
    else if (pos == 3) {
      this.handleDetail(ids);
    }
  },
  methods: {
@@ -724,7 +744,7 @@
      console.log(fileList);
      this.rbDetails;
      //获取附件信息位置
      //获取票据信息位置
      if (response.code == 200) {
        this.form.filename = file.raw.name;
        console.log(this.fileList);
@@ -737,7 +757,7 @@
        this.$modal.msgError(response.msg);
      }
    },
    // 点击文件
    // 点击票据
    Filepopup(index, rows, row) {
      console.log(index, rows, row);
      this.atpresent = index;
@@ -773,14 +793,6 @@
        this.$modal.msgWarning("当前文件暂不支持预览");
        this.previewpdf = false;
      }
    },
    //获取登录用户信息
    getUsermsg() {
      getUserProfile().then(response => {
        this.defaultperson = response.data;
        this.standardlevel = response.data.standardlevel;
      });
    },
    /** 查询部门下拉树结构 */
@@ -1061,10 +1073,12 @@
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      window.close();
    },
    // 表单重置
    reset() {
      this.fileListto = [];
@@ -1116,6 +1130,7 @@
      this.rbPayees = [];
      this.resetForm("form");
    },
    //
    handup(e) {
      console.log("上报", e);
@@ -1133,7 +1148,7 @@
      // this.queryParams.paprovincecode= this.$refs["residenceSelect" ].getSheng();
      // this.queryParams.patowncode= this.$refs["residenceSelect" ].getQu();
      this.queryParams.pageNum = 1;
      this.getList();
      // this.getList();
    },
    /** 重置按钮操作 */
@@ -1151,11 +1166,12 @@
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "新增报销申请";
      // this.open = true;
      this.title = "新增差旅申请单";
      this.dialogType = "edit";
      this.fundflowList = [];
      console.log(this.title, this.defaultperson);
      this.form.userno = this.defaultperson.userName;
      this.form.username = this.defaultperson.nickName;
@@ -1166,23 +1182,14 @@
      this.addDetailRow(0);
      this.addPayeeRow(0);
    },
    gainee() {
      let ids = this.$route.query.id;
      let pos = this.$route.query.pos;
      console.log(ids, pos);
      if (pos == 2) {
        this.handleDetail(ids);
      } else if (pos == 1) {
        this.handleUpdate(ids);
      }
    },
    /** 修改按钮操作 */
    handleUpdate(ids) {
      this.$router.push({
        path: "/finance/travelexpenseslist/Modifydetails/",
        query: { id: ids }
      });
      // this.$router.push({
      //   path: "/finance/travelexpenseslist/Modifydetails/",
      //   query: { id: ids }
      // });
      this.dialogType = "edit";
      this.reset();
      // this.open = true;
@@ -1246,7 +1253,7 @@
      getReimbursement(id).then(response => {
        this.form = response.data;
        //附件
        //票据
        this.fileListto = this.form.annexfiles
          ? this.form.annexfiles
            .split(",")
@@ -1353,7 +1360,7 @@
          }
          */
          //附件文件处理
          //票据文件处理
          let list = this.fileListto;
          console.log(list);
@@ -1405,7 +1412,7 @@
            this.$modal.msgSuccess("修改报销单保存成功!");
            this.open = false;
            this.getList();
            // this.getList();
            // })
            // .catch(err => {
            //   this.$modal.msgError("修改报销单保存失败!");
@@ -1430,7 +1437,7 @@
                this.$modal.msgSuccess("新增报销单保存成功!");
                this.open = false;
                this.getList();
                // this.getList();
              })
              .catch(err => {
                this.$modal.msgError("新增报销单保存失败!");
@@ -1854,9 +1861,42 @@
        chineseStr += cnInteger;
      }
      return chineseStr;
    }
    },
    //表格合计
    getSummaries(param) {
      const { columns, data } = param;
      const sums = [];
      var columnnames = ["bankname", "bankcardno", "remark", "personname", "starttime", "endtime", "departure", "destination", "traffictype", "traffictype2", "departure"];
      columns.forEach((column, index) => {
        if (index === 0) {
          sums[index] = '合计';
          return;
        }
        //去除部分字段计算
        if (columnnames.indexOf(column.property) > -1) { return; }
        const values = data.map(item => Number(item[column.property]));
        if (!values.every(value => isNaN(value))) {
          sums[index] = values.reduce((prev, curr) => {
            const value = Number(curr);
            if (!isNaN(value)) {
              return prev + curr;
            } else {
              return prev;
            }
          }, 0);
          sums[index] += '';
        } else {
          sums[index] = '';
        }
      });
      return sums;
    },
  }
};
</script>
<style lang="scss" scoped>
@@ -1900,6 +1940,7 @@
    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 {
@@ -1925,5 +1966,13 @@
    width: 60%;
    text-align: center;
  }
}
::v-deep .el-input--medium .el-input__inner {
  height: 36px;
  line-height: 36px;
  text-align: center;
}
</style>
src/views/project/travelexpenseslist/index.vue
@@ -1845,8 +1845,13 @@
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      console.log("defaultperson",this.defaultperson);
      this.$router.push({
        path: "/finance/travelexpenseslist/Modifydetails/",
        query: { id: 0, pos: 1,routerparam:this.defaultperson}
      });
      this.reset();
      this.open = true;
      this.title = "新增报销申请";
      this.dialogType = "edit";
@@ -1866,7 +1871,7 @@
    handleUpdate(row) {
      this.$router.push({
        path: "/finance/travelexpenseslist/Modifydetails/",
        query: { id: row.id, pos: 1 }
        query: { id: row.id, pos: 2 }
      });
      this.dialogType = "edit";
      this.reset();
@@ -1923,8 +1928,9 @@
    handleDetail(row) {
      this.$router.push({
        path: "/finance/travelexpenseslist/Modifydetails/",
        query: { id: row.id, pos: 2 }
        query: { id: row.id, pos: 3 }
      });
      this.dialogType = "detail";
      this.title = "查看报销申请";
vue.config.js
@@ -35,7 +35,7 @@
      [process.env.VUE_APP_BASE_API]: {        
        target:`http://localhost:8086`,
        // target:`http://116.62.18.175:8080`,
        // target:`http://192.168.1.4:8080`,
        // target:`http://192.168.1.4:8086`,
        // target: `https://slb.hospitalstar.com:9093`,
        changeOrigin: true,
        pathRewrite: {