yxh
2026-10-13 1511a7f94b1e3a88b4a54234ec144655a91eace7
src/views/project/fund/applyDetail0/index.vue
@@ -11,8 +11,8 @@
                clearable
                style="width: 100%"
                v-model="form.createTime"
                type="date"
                value-format="yyyy-MM-dd HH:mm:ss"
                type="date" format="yyyy-MM-dd"
                value-format="yyyy-MM-dd"
                placeholder="申请日期"
              >
              </el-date-picker>
@@ -1227,6 +1227,7 @@
import Li_area_select from "@/components/Address";
import OrgSelecter from "@/views/project/components/orgselect";
import { getToken } from "@/utils/auth";
import { moneySum, moneyAdd, moneySub, moneyMul, moneyRound } from "@/utils/money";
export default {
  //import引入的组件需要注入到对象中才能使用
@@ -2103,11 +2104,7 @@
          this.$store.dispatch("tagsView/delView", this.$route);
          this.$router.go(-1);
        } else {
          if (res.msg) {
            this.$modal.msgError("操作失误");
          } else {
            this.$modal.msgError(res.msg);
          }
          this.$modal.msgError(res.msg || "操作失败");
        }
      });
    },
@@ -2876,32 +2873,28 @@
      }
    },
    //计算总金额
    //计算总金额(金额一律走精确运算)
    sumTotalFee(row) {
      let allSum = 0;
      const detailsArr = [];
      if (this.form.applytype != null) {
        for (let i = 0; i < this.rbDetails.length; i++) {
          const detail = this.rbDetails[i];
          let totalFee = 0;
          let taxFee = 0;
          if (this.form.applytype == 1 || this.form.applytype == 2) {
            //计算当前报销内容费用合计
            if (!isNaN(parseFloat(this.rbDetails[i].amount))) {
              totalFee += parseFloat(this.rbDetails[i].amount);
              taxFee += parseFloat(this.rbDetails[i].amount);
            //计算当前报销内容费用合计:税前 - 扣税
            if (!isNaN(parseFloat(detail.amount))) {
              totalFee = moneyAdd(totalFee, detail.amount);
            }
            if (!isNaN(parseFloat(this.rbDetails[i].taxamount))) {
              totalFee -= parseFloat(this.rbDetails[i].taxamount);
              taxFee -= parseFloat(this.rbDetails[i].taxamount);
            if (!isNaN(parseFloat(detail.taxamount))) {
              totalFee = moneySub(totalFee, detail.taxamount);
            }
          } else if (this.form.applytype == 3 || this.form.applytype == 4) {
            //单价*数量=税前金额
            if (
              !isNaN(parseFloat(this.rbDetails[i].price)) &&
              !isNaN(parseFloat(this.rbDetails[i].quantity))
              !isNaN(parseFloat(detail.price)) &&
              !isNaN(parseFloat(detail.quantity))
            ) {
              totalFee +=
                parseFloat(this.rbDetails[i].price) *
                parseFloat(this.rbDetails[i].quantity);
              totalFee = moneyMul(detail.price, detail.quantity);
              this.rbDetails[i].amount = totalFee;
            }
          }
@@ -2911,10 +2904,10 @@
          //   this.rbDetails[i].taxedamount = taxFee.toFixed(2);
          // }
          allSum += totalFee;
          detailsArr.push(totalFee);
        }
      }
      // this.form.amountrequested = allSum.toFixed(2);
      // this.form.amountrequested = moneyRound(moneySum(detailsArr)).toFixed(2);
      // this.$forceUpdate();
    },
@@ -3279,13 +3272,13 @@
  //生命周期 - 挂载完成(可以访问DOM元素)
  mounted() {
    window.addEventListener("beforeunload", e => this.beforeunloadHandler(e));
    // 存住同一个引用,否则 removeEventListener 传新箭头函数无法真正移除,会泄漏监听器
    this._beforeUnloadHandler = e => this.beforeunloadHandler(e);
    window.addEventListener("beforeunload", this._beforeUnloadHandler);
    this.getUserList();
    this.getUserProfile();
    let apifunddetailForm = this.funddetailForm;
    let apiform = this.form;
    console.log(apiform);
    console.log(apifunddetailForm);
    // this.getFeeUnitList();
  },
@@ -3294,7 +3287,12 @@
  beforeMount() {}, //生命周期 - 挂载之前
  beforeUpdate() {}, //生命周期 - 更新之前
  updated() {}, //生命周期 - 更新之后
  beforeDestroy() {}, //生命周期 - 销毁之前
  beforeDestroy() {
    if (this._beforeUnloadHandler) {
      window.removeEventListener("beforeunload", this._beforeUnloadHandler);
      this._beforeUnloadHandler = null;
    }
  }, //生命周期 - 销毁之前
  destroyed() {}, //生命周期 - 销毁完成
  activated() {} //如果页面有keep-alive缓存功能,这个函数会触发
};