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/officeExpenseApply/index.vue | 79 ++++++++++++++++++++++++---------------
1 files changed, 48 insertions(+), 31 deletions(-)
diff --git a/src/views/project/fund/officeExpenseApply/index.vue b/src/views/project/fund/officeExpenseApply/index.vue
index ccec636..3c72b6b 100644
--- a/src/views/project/fund/officeExpenseApply/index.vue
+++ b/src/views/project/fund/officeExpenseApply/index.vue
@@ -87,8 +87,11 @@
<!-- v-hasPermi="['project:medicalfund:export']" -->
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
</el-row>
- <el-table v-loading="loading" border :data="donateconsolationfundList"
- :row-class-name="rowClassName"
+ <el-table
+ v-loading="loading"
+ border
+ :data="donateconsolationfundList"
+ :row-class-name="rowClassName"
>
<el-table-column
label="鐢宠鏃ユ湡"
@@ -138,7 +141,7 @@
</template>
</el-table-column>
<el-table-column
- label="鐢宠鏉愭枡鐘舵��"
+ label="鏉愭枡棰勫鐘舵��"
width="140"
align="center"
prop="checkstatus"
@@ -177,7 +180,6 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
- v-hasPermi="['project:medicalfund:edit']"
>淇敼</el-button
>
<el-button
@@ -191,17 +193,16 @@
v-if="scope.row.recordstatus == -1 || scope.row.recordstatus == 1"
size="mini"
type="text"
- icon="el-icon-delete"
@click="handleDelete(scope.row)"
- v-hasPermi="['project:medicalfund: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:medicalfund:download']"
>涓嬭浇</el-button
>
</template>
@@ -682,7 +683,9 @@
type="text"
size="small"
>
- 鍒犻櫎
+ <span class="button-delete"
+ ><i class="el-icon-delete"></i>鍒犻櫎</span
+ >
</el-button>
<el-button
@click.native.prevent="
@@ -1165,8 +1168,20 @@
.then(() => {
//鏌ユ壘鏄惁瀛樺湪鐧昏瀹屾垚璁板綍
//鍒ゆ柇鏄惁瀛樺湪涓婃姤璁板綍
- row.recordstatus = 0;var currenttime = new Date();
- row.applyTime = currenttime.getFullYear() + "-" + (currenttime.getMonth()+1) + "-" + currenttime.getDate() + " " + currenttime.getHours() + ":" + currenttime.getMinutes() + ":" + currenttime.getSeconds();
+ row.recordstatus = 0;
+ var currenttime = new Date();
+ row.applyTime =
+ currenttime.getFullYear() +
+ "-" +
+ (currenttime.getMonth() + 1) +
+ "-" +
+ currenttime.getDate() +
+ " " +
+ currenttime.getHours() +
+ ":" +
+ currenttime.getMinutes() +
+ ":" +
+ currenttime.getSeconds();
updateFund(row).then(response => {
if (response.code == 200) {
this.$message({
@@ -1694,41 +1709,40 @@
});
},
- //璁$畻鎬婚噾棰�
+ //璁$畻鎬婚噾棰濓紙閲戦涓�寰嬭蛋绮剧‘杩愮畻锛岀姝� parseFloat 绱姞锛�
sumTotalFee(row) {
- let allSum = 0;
+ const detailsArr = [];
if (this.form.applytype != null) {
for (let i = 0; i < this.fundDetails.length; i++) {
+ const detail = this.fundDetails[i];
let totalFee = 0;
let taxFee = 0;
if (this.form.applytype == 1 || this.form.applytype == 2) {
- //璁$畻褰撳墠鎶ラ攢鍐呭璐圭敤鍚堣
- if (!isNaN(parseFloat(this.fundDetails[i].amount))) {
- totalFee += parseFloat(this.fundDetails[i].amount);
- taxFee += parseFloat(this.fundDetails[i].amount);
+ //璁$畻褰撳墠鎶ラ攢鍐呭璐圭敤鍚堣锛氱◣鍓� - 鎵g◣
+ if (!isNaN(parseFloat(detail.amount))) {
+ totalFee = moneyAdd(totalFee, detail.amount);
+ taxFee = moneyAdd(taxFee, detail.amount);
}
- if (!isNaN(parseFloat(this.fundDetails[i].taxamount))) {
- totalFee -= parseFloat(this.fundDetails[i].taxamount);
- taxFee -= parseFloat(this.fundDetails[i].taxamount);
+ if (!isNaN(parseFloat(detail.taxamount))) {
+ totalFee = moneySub(totalFee, detail.taxamount);
+ taxFee = moneySub(taxFee, detail.taxamount);
}
} else if (this.form.applytype == 3) {
if (
- !isNaN(parseFloat(this.fundDetails[i].price)) &&
- !isNaN(parseFloat(this.fundDetails[i].quantity))
+ !isNaN(parseFloat(detail.price)) &&
+ !isNaN(parseFloat(detail.quantity))
) {
- totalFee +=
- parseFloat(this.fundDetails[i].price) *
- parseFloat(this.fundDetails[i].quantity);
+ totalFee = moneyMul(detail.price, detail.quantity);
}
}
if (!isNaN(parseFloat(taxFee))) {
- this.fundDetails[i].taxedamount = taxFee.toFixed(2);
+ this.fundDetails[i].taxedamount = moneyRound(taxFee).toFixed(2);
}
- allSum += totalFee;
+ detailsArr.push(totalFee);
}
}
//this.form.amountrequested = allSum.toFixed(2);
- this.$set(this.form, "amountrequested", allSum.toFixed(2));
+ this.$set(this.form, "amountrequested", moneyRound(moneySum(detailsArr)).toFixed(2));
//this.$forceUpdate();
},
@@ -1842,7 +1856,7 @@
console.log(url);
const link = document.createElement("a");
link.href = url;
- const name=fileUrl["downloadName"]
+ const name = fileUrl["downloadName"];
link.setAttribute("download", name); // 鏇挎崲file.pdf涓哄疄闄呯殑鏂囦欢鍚�
document.body.appendChild(link);
link.click();
@@ -1930,7 +1944,7 @@
},
rowClassName({ row, column, rowIndex, columnIndex }) {
//姝ゅ垽鏂负鏈�鍚庝笁琛�
- if (row.recordstatus == -1 && row.backflowlevel >= 0) {
+ if (row.recordstatus == -1 && row.backflowlevel != null) {
return "error-row";
}
}
@@ -1975,7 +1989,10 @@
</script>
<style scoped>
/* @import url(); 寮曞叆鍏叡css绫� */
+.button-delete {
+ color: rgb(236, 69, 69);
+}
::v-deep.el-table .error-row {
- background: #FCEBEB;
+ background: #fcebeb;
}
</style>
--
Gitblit v1.9.3