11
WXL
2024-03-20 1e487a42549384f6e937a5c7d557563aedafec2c
src/views/project/tallage/computingBill/index.vue
@@ -752,7 +752,15 @@
        item.taXmoney = item.taXmoney.toFixed(2);
        this.accumulation();
      });
      this.$modal.msgSuccess("添加成功!");
      if (this.form.id) {
        this.form.istax = 0;
        this.form.taxedtime = "";
        this.$modal.confirm("添加成功!,需要重新保存并计算单据!").then(() => {
          this.submitForm();
        });
      } else {
        this.$modal.msgSuccess("添加成功!");
      }
      this.dialogVisiblepatient = false;
    },
@@ -770,19 +778,11 @@
              if (res1.code == 200) {
                this.$modal.msgSuccess("计算成功");
                this.$modal.closeLoading();
                getFundtax(this.form.id).then(response => {
                  this.form = response.data;
                  if (this.form.serviceFunds[0]) {
                    this.donorchargeorgans = this.form.serviceFunds;
                    this.donorchargeorgans.forEach(item => {
                      item.taXmoney = item.pretaxcost - item.taxedcost;
                      item.taXmoney = item.taXmoney.toFixed(2);
                      this.accumulation(); //计算
                      this.form.istax = 1;
                      this.submitForm();
                    });
                  }
                });
                this.form.istax = 1;
                this.form.taxedtime = this.$moment().format(
                  "YYYY-MM-DD HH:mm:ss"
                );
                this.submitForm();
              } else {
                this.$modal.closeLoading();
                this.$modal.msgError(res1.msg);
@@ -921,6 +921,17 @@
            updateFundtax(this.form).then(res1 => {
              if (res1.code == 200) {
                this.$modal.msgSuccess("保存成功!");
                getFundtax(this.curId).then(response => {
                  this.form = response.data;
                  if (this.form.serviceFunds[0]) {
                    this.donorchargeorgans = this.form.serviceFunds;
                    this.donorchargeorgans.forEach(item => {
                      item.taXmoney = item.pretaxcost - item.taxedcost;
                      item.taXmoney = item.taXmoney.toFixed(2);
                      this.accumulation();
                    });
                  }
                });
                this.$modal.closeLoading();
              } else {
                this.$modal.closeLoading();
@@ -932,6 +943,17 @@
              if (response.code == 200) {
                this.form.id = response.data.fundTaxId;
                this.$modal.msgSuccess("新增成功!");
                getFundtax(response.msg).then(response => {
                  this.form = response.data;
                  if (this.form.serviceFunds[0]) {
                    this.donorchargeorgans = this.form.serviceFunds;
                    this.donorchargeorgans.forEach(item => {
                      item.taXmoney = item.pretaxcost - item.taxedcost;
                      item.taXmoney = item.taXmoney.toFixed(2);
                      this.accumulation();
                    });
                  }
                });
                this.$modal.closeLoading();
              } else {
                this.$modal.msgError(response.msg);
@@ -978,18 +1000,13 @@
        .then(() => {
          CalculationDetail({ id: row.id }).then(res2 => {
            if (res2.code == 200) {
              this.$modal.msgSuccess("删除成功!");
              getFundtax(this.curId).then(response => {
                this.form = response.data;
                if (this.form.serviceFunds[0]) {
                  this.donorchargeorgans = this.form.serviceFunds;
                  this.donorchargeorgans.forEach(item => {
                    item.taXmoney = item.pretaxcost - item.taxedcost;
                    item.taXmoney = item.taXmoney.toFixed(2);
                    this.accumulation();
                  });
                }
              });
              this.form.istax = 0;
              this.form.taxedtime = "";
              this.$modal
                .confirm("删除成功,需要重新保存并计算单据!")
                .then(() => {
                  this.submitForm();
                });
            }
          });
        })