From d21d7dd23f15a0ca395a4c9d1b3bb31330ff56c0 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期三, 30 九月 2026 11:27:37 +0800
Subject: [PATCH] 专家费校验
---
src/views/project/fund/ethicalExpertFeeApply/index.vue | 72 +++++++++++++++++-------------------
1 files changed, 34 insertions(+), 38 deletions(-)
diff --git a/src/views/project/fund/ethicalExpertFeeApply/index.vue b/src/views/project/fund/ethicalExpertFeeApply/index.vue
index 87efc48..5be6779 100644
--- a/src/views/project/fund/ethicalExpertFeeApply/index.vue
+++ b/src/views/project/fund/ethicalExpertFeeApply/index.vue
@@ -186,7 +186,7 @@
</template>
</el-table-column>
<el-table-column
- label="鐢宠鏉愭枡鐘舵��"
+ label="鏉愭枡棰勫鐘舵��"
width="140"
align="center"
prop="checkstatus"
@@ -230,7 +230,6 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
- v-hasPermi="['project:ethicalfund:edit']"
>淇敼</el-button
>
<el-button
@@ -247,17 +246,16 @@
"
size="mini"
type="text"
- icon="el-icon-delete"
@click="handleDelete(scope.row)"
- v-hasPermi="['project:ethicalfund:delete']"
- >鍒犻櫎</el-button
+ ><span class="button-delete"
+ ><i class="el-icon-delete"></i>鍒犻櫎</span
+ ></el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-download"
@click="mixExport(scope.row.id)"
- v-hasPermi="['project:ethicalfund:download']"
>涓嬭浇</el-button
>
</template>
@@ -704,7 +702,9 @@
type="text"
size="small"
>
- 鍒犻櫎
+ <span class="button-delete"
+ ><i class="el-icon-delete"></i>鍒犻櫎</span
+ >
</el-button>
</template>
</el-table-column>
@@ -960,6 +960,7 @@
import { getUserProfile } from "@/api/system/user";
import { listFundflow } from "@/api/project/fundflow";
import { getToken } from "@/utils/auth";
+import { moneySum, moneyAdd, moneySub, moneyMul, moneyRound } from "@/utils/money";
export default {
//import寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
@@ -1360,15 +1361,11 @@
// } catch {
// tempDetail.unitname = tempDetail.unitno;
// }
- if (!isNaN(parseFloat(tempDetail.amount))) {
- totalPreTaxAmount += parseFloat(tempDetail.amount);
- totalAmount += parseFloat(tempDetail.amount);
- }
- if (!isNaN(parseFloat(tempDetail.taxedamount))) {
- totalAfterTaxAmount += parseFloat(tempDetail.taxedamount);
- totalAmount += parseFloat(tempDetail.taxedamount);
- }
}
+ //閲戦涓�寰嬭蛋绮剧‘杩愮畻锛岀姝� parseFloat 绱姞
+ totalPreTaxAmount = moneySum(this.fundDetailArr, "amount");
+ totalAfterTaxAmount = moneySum(this.fundDetailArr, "taxedamount");
+ totalAmount = moneyAdd(totalPreTaxAmount, totalAfterTaxAmount);
try {
this.form.unitname = this.$refs.orgSelecter.getOptionByValue(
this.form.unitno
@@ -1736,49 +1733,45 @@
});
},
- //璁$畻鎬婚噾棰�
+ //璁$畻鎬婚噾棰濓紙閲戦涓�寰嬭蛋绮剧‘杩愮畻锛岀姝� parseFloat 绱姞锛�
sumTotalFee() {
- let allSum = 0;
+ const detailsArr = [];
let preTaxSum = 0;
let taxedSum = 0;
if (this.form.applytype != null) {
for (let i = 0; i < this.fundDetailArr.length; i++) {
+ const detail = this.fundDetailArr[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);
- preTaxSum += parseFloat(this.fundDetailArr[i].amount);
+ //璁$畻褰撳墠鎶ラ攢鍐呭璐圭敤鍚堣锛氱◣鍓� - 鎵g◣
+ if (!isNaN(parseFloat(detail.amount))) {
+ totalFee = moneyAdd(totalFee, detail.amount);
+ preTaxSum = moneyAdd(preTaxSum, detail.amount);
}
- if (!isNaN(parseFloat(this.fundDetailArr[i].taxamount))) {
- totalFee -= parseFloat(this.fundDetailArr[i].taxamount);
- taxFee -= parseFloat(this.fundDetailArr[i].taxamount);
+ if (!isNaN(parseFloat(detail.taxamount))) {
+ totalFee = moneySub(totalFee, detail.taxamount);
}
//taxedamount
- if (!isNaN(parseFloat(this.fundDetailArr[i].taxedamount))) {
- taxedSum += parseFloat(this.fundDetailArr[i].taxedamount);
+ if (!isNaN(parseFloat(detail.taxedamount))) {
+ taxedSum = moneyAdd(taxedSum, detail.taxedamount);
}
} else if (this.form.applytype == 3) {
if (
- !isNaN(parseFloat(this.fundDetailArr[i].price)) &&
- !isNaN(parseFloat(this.fundDetailArr[i].quantity))
+ !isNaN(parseFloat(detail.price)) &&
+ !isNaN(parseFloat(detail.quantity))
) {
- totalFee +=
- parseFloat(this.fundDetailArr[i].price) *
- parseFloat(this.fundDetailArr[i].quantity);
+ totalFee = moneyMul(detail.price, detail.quantity);
}
}
// if (!isNaN(parseFloat(taxFee))) {
// this.fundDetailArr[i].taxedamount = taxFee.toFixed(2);
// }
- allSum += totalFee;
+ detailsArr.push(totalFee);
}
}
- this.form.amountrequested = allSum.toFixed(2);
- this.form.pretaxcost = preTaxSum.toFixed(2);
- this.form.taxedcost = taxedSum.toFixed(2);
+ this.form.amountrequested = moneyRound(moneySum(detailsArr)).toFixed(2);
+ this.form.pretaxcost = moneyRound(preTaxSum).toFixed(2);
+ this.form.taxedcost = moneyRound(taxedSum).toFixed(2);
this.$forceUpdate();
},
@@ -2054,7 +2047,7 @@
this.detailInfoDialogShow = false;
},
rowClassName({ row, column, rowIndex, columnIndex }) {
- if (row.recordstatus == -1 && row.backflowlevel >= 0) {
+ if (row.recordstatus == -1 && row.backflowlevel != null) {
return "error-row";
}
return "";
@@ -2086,6 +2079,9 @@
</script>
<style lang="scss" scoped>
/* @import url(); 寮曞叆鍏叡css绫� */
+.button-delete {
+ color: rgb(236, 69, 69);
+}
::v-deep.el-table .error-row {
background: #fcebeb;
}
--
Gitblit v1.9.3