| | |
| | | let totalPreTaxAmount = 0.0; |
| | | let totalAfterTaxAmount = 0.0; |
| | | let totalAmount = 0.0; |
| | | |
| | | console.log('1'); |
| | | |
| | | //保存前校验数据 |
| | | for (let k = 0; k < this.fundDetails.length; k++) { |
| | |
| | | (item) => tempDetail.applytype == item.value |
| | | ); |
| | | if (applytypeIndex > -1) { |
| | | console.log("tempData1", tempData); |
| | | console.log("tempDetail", tempDetail); |
| | | tempDetail.applytypename = this.rowfeeItemTypes[applytypeIndex].label; |
| | | tempDetail.subjecttype = this.rowfeeItemTypes[applytypeIndex].subjecttype; |
| | | tempDetail.subjecttypename = this.rowfeeItemTypes[applytypeIndex].subjecttypename; |
| | | } |
| | | this.fundDetails[k] = tempDetail; |
| | | |
| | | this.fundDetails[m] = tempDetail; |
| | | //计算个税 |
| | | //if (isNaN(parseFloat(tempDetail.taxedamount))) |
| | | //获取参数 |
| | |
| | | } |
| | | } |
| | | } |
| | | console.log('2'); |
| | | }); |
| | | }, |
| | | |
| | | // 第二步 |
| | | brforaFn() { |
| | | //附件处理 |
| | | brforaFn() { |
| | | console.log('3'); |
| | | this.loading = true; |
| | | |
| | | //捐献者 |
| | | this.form.donorname = this.curCase.name; |
| | | |
| | | //附件处理 |
| | | let list = this.fileList; |
| | | if (list.length > 0) { |
| | | this.form.annexbankcard = list.map(item => item.url).join(","); |
| | | this.form.annexfiles = list.map(item => item.url).join(","); |
| | | } |
| | | |
| | | // |
| | | this.form.donorname = this.curCase.name; |
| | | //费用合计 |
| | | this.form.pretaxcost = parseFloat(this.totalPreTaxAmount).toFixed(2); |
| | | this.form.taxedcost = parseFloat(this.totalAfterTaxAmount).toFixed(2); |
| | | this.form.amountrequested = this.totalAmount.toFixed(2); |
| | | |
| | | //保存 |
| | | if (this.form.id != null) { |
| | | this.form.recordstatus = -1; |
| | | updateFund(this.form).then((res) => { |
| | |
| | | this.getList(); |
| | | this.selectDonotor(this.curCase); |
| | | |
| | | // this.$modal.msgSuccess("修改成功"); |
| | | this.loading = false; |
| | | for (let m = 0; m < this.fundDetails.length; m++) { |
| | | let tempData = this.fundDetails[m]; |
| | | if (tempData.id > 0) { |
| | |
| | | tempData.fundid = this.formData.id; |
| | | addFunddetail(tempData).then((res) => { }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.loading = false; |
| | | }); |
| | | } else { |
| | | this.form.serviceFunddetails = 0; |