From 38c26c3049d55ffda598ce0263498448b7c60834 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期日, 08 十一月 2026 23:34:45 +0800
Subject: [PATCH] 增加增值税城建税
---
src/views/project/tallage/computingBill/index.vue | 225 ++++++++++++++++++++++++++++++++++++++------------------
1 files changed, 153 insertions(+), 72 deletions(-)
diff --git a/src/views/project/tallage/computingBill/index.vue b/src/views/project/tallage/computingBill/index.vue
index b1412ce..508a1cf 100644
--- a/src/views/project/tallage/computingBill/index.vue
+++ b/src/views/project/tallage/computingBill/index.vue
@@ -61,21 +61,50 @@
</el-form-item>
</el-col>
<el-col :span="6"
- ><el-form-item label="鎵g◣閲戦" prop="donateno">
+ ><el-form-item label="澧炲�肩◣" prop="donateno">
+ <el-input
+ v-model="form.vatAmount"
+ :disabled="true"
+ placeholder="璇疯緭鍏ュ鍊肩◣"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="6"
+ ><el-form-item label="鍩庡缓绋�" prop="donateno">
+ <el-input
+ v-model="form.cityTaxAmount"
+ :disabled="true"
+ placeholder="璇疯緭鍏ュ煄寤虹◣"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="6"
+ ><el-form-item label="鍔冲姟绋庡墠" prop="donateno">
+ <el-input
+ v-model="form.laborPretaxAmount"
+ :disabled="true"
+ placeholder="璇疯緭鍏ュ姵鍔$◣鍓�"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="6"
+ ><el-form-item label="鍔冲姟涓◣" prop="donateno">
<el-input
v-model="form.taxMoney"
:disabled="true"
- placeholder="璇疯緭鍏ユ墸绋庨噾棰�"
+ placeholder="璇疯緭鍏ュ姵鍔′釜绋�"
/>
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item label="绋庡悗閲戦" prop="donationcategory">
+ <el-form-item label="鍔冲姟绋庡悗" prop="donationcategory">
<el-input
v-model="form.taxedamount"
:disabled="true"
- placeholder="璇疯緭鍏ユ敹娆捐鍙�"
+ placeholder="璇疯緭鍏ュ姵鍔$◣鍚�"
/>
</el-form-item>
</el-col>
@@ -195,23 +224,50 @@
/>
</template>
</el-table-column>
- <el-table-column label="鎵g◣閲戦" align="center" prop="taXmoney">
+ <el-table-column prop="vatCost" align="center" label="澧炲�肩◣">
<template slot-scope="scope">
<el-input
- v-model="scope.row.taXmoney"
+ v-model="scope.row.vatCost"
:disabled="true"
- placeholder="鎵g◣閲戦"
+ placeholder="澧炲�肩◣"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column prop="cityTaxCost" align="center" label="鍩庡缓绋�">
+ <template slot-scope="scope">
+ <el-input
+ v-model="scope.row.cityTaxCost"
+ :disabled="true"
+ placeholder="鍩庡缓绋�"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column prop="laborPretaxCost" align="center" label="鍔冲姟绋庡墠">
+ <template slot-scope="scope">
+ <el-input
+ v-model="scope.row.laborPretaxCost"
+ :disabled="true"
+ placeholder="鍔冲姟绋庡墠"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column label="鍔冲姟涓◣" align="center" prop="taxcost">
+ <template slot-scope="scope">
+ <el-input
+ v-model="scope.row.taxcost"
+ :disabled="true"
+ placeholder="鍔冲姟涓◣"
/>
</template>
</el-table-column>
- <el-table-column prop="taxedcost" align="center" label="绋庡悗閲戦">
+ <el-table-column prop="taxedcost" align="center" label="鍔冲姟绋庡悗">
<template slot-scope="scope">
<el-input
@blur="chargeSum"
:disabled="true"
v-model="scope.row.taxedcost"
- placeholder="绋庡悗閲戦"
+ placeholder="鍔冲姟绋庡悗"
/>
</template>
</el-table-column>
@@ -397,14 +453,32 @@
>
</el-table-column>
<el-table-column
- prop="taXmoney"
- label="鎵g◣閲戦"
+ prop="vatCost"
+ label="澧炲�肩◣"
+ show-overflow-tooltip
+ >
+ </el-table-column>
+ <el-table-column
+ prop="cityTaxCost"
+ label="鍩庡缓绋�"
+ show-overflow-tooltip
+ >
+ </el-table-column>
+ <el-table-column
+ prop="laborPretaxCost"
+ label="鍔冲姟绋庡墠"
+ show-overflow-tooltip
+ >
+ </el-table-column>
+ <el-table-column
+ prop="taxcost"
+ label="鍔冲姟涓◣"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop="taxedcost"
- label="绋庡悗閲戦"
+ label="鍔冲姟绋庡悗"
show-overflow-tooltip
>
</el-table-column>
@@ -812,8 +886,6 @@
});
}
this.donorchargeorgans.forEach(item => {
- item.taXmoney = item.pretaxcost - item.taxedcost;
- item.taXmoney = item.taXmoney.toFixed(2);
this.accumulation();
});
if (this.form.id) {
@@ -828,47 +900,81 @@
this.dialogVisiblepatient = false;
},
- // 璁$畻涓◣
+ // 璁$畻涓◣锛堝厛淇濆瓨褰撳墠鍗曟嵁锛屼繚瀛樻垚鍔熷悗鍐嶇畻绋庯紱绠楃◣鎴愬姛鍚庝粠鍚庣閲嶆柊鍔犺浇锛屼笉鍐嶇敤椤甸潰鏃ч噾棰濆洖鍐欙級
calculateFn() {
if (this.form.id >= this.MaxFundTaxId) {
- this.$modal.loading("姝e湪鎻愪氦锛岃绋嶅�欙紒");
this.$modal
- .confirm("鍗冲皢杩涜绠楃◣鏄惁宸蹭繚瀛樺叏閮ㄦ暟鎹�?")
- .then(res => {
- listbxiaostatistics({
- fundTaxId: Number(this.form.id),
- addOrupdate: 1
- }).then(res1 => {
- if (res1.code == 200) {
- this.$modal.msgSuccess("璁$畻鎴愬姛");
- this.$modal.closeLoading();
- 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);
+ .confirm("绠楃◣鍓嶄細鍏堜繚瀛樺綋鍓嶅崟鎹紝鏄惁缁х画?")
+ .then(() => {
+ this.form.serviceFunds = this.donorchargeorgans;
+ this.$refs["form"].validate(valid => {
+ if (!valid) {
+ this.$modal.msgError("鍗曟嵁鏍¢獙鏈�氳繃锛岃妫�鏌ュ悗閲嶈瘯");
+ return;
}
+ this.$modal.loading("姝e湪鎻愪氦锛岃绋嶅�欙紒");
+ updateFundtax(this.form).then(res0 => {
+ if (res0.code != 200) {
+ this.$modal.closeLoading();
+ this.$modal.msgError(res0.msg);
+ return;
+ }
+ listbxiaostatistics({
+ fundTaxId: Number(this.form.id),
+ addOrupdate: 1
+ }).then(res1 => {
+ if (res1.code == 200) {
+ // 鍚庣宸插洖鍐� service_fund / service_fundtax锛岃繖閲屽彧鍋氶噸鏂板姞杞�
+ this.refreshFundtax().then(() => {
+ this.$modal.closeLoading();
+ this.$modal.msgSuccess("璁$畻鎴愬姛");
+ });
+ } else {
+ this.$modal.closeLoading();
+ this.$modal.msgError(res1.msg);
+ }
+ });
+ });
});
})
-
.catch(() => {});
} else {
this.$modal.msgError("褰撳墠鍗曟嵁涓嶄负鏈�鏂扮敵璇峰崟");
}
},
- // 閲戦鍚堣
+ // 浠庡悗绔噸鏂板姞杞芥眹鎬诲崟锛堝惈鏄庣粏鍗曟嵁琛岋級骞堕噸绠楀悎璁�
+ refreshFundtax() {
+ return getFundtax(this.form.id).then(response => {
+ this.form = response.data;
+ if (this.form.serviceFunds && this.form.serviceFunds[0]) {
+ this.donorchargeorgans = this.form.serviceFunds;
+ this.donorchargeorgans.forEach((item, index) => {
+ item.index = index + 1;
+ });
+ }
+ this.accumulation();
+ return response;
+ });
+ },
+ // 閲戦鍚堣锛�6 涓噾棰濆叏閮ㄥ彇鑷崟鎹笂鐨勫悗绔噾棰濓紝涓嶅啀鐢ㄢ�滅◣鍓�-绋庡悗鈥濆�掔畻锛�
accumulation() {
this.form.pretaxamount = this.donorchargeorgans
- .reduce((acc, obj) => acc + Number(obj.pretaxcost), 0)
+ .reduce((acc, obj) => acc + Number(obj.pretaxcost || 0), 0)
+ .toFixed(2);
+ this.form.vatAmount = this.donorchargeorgans
+ .reduce((acc, obj) => acc + Number(obj.vatCost || 0), 0)
+ .toFixed(2);
+ this.form.cityTaxAmount = this.donorchargeorgans
+ .reduce((acc, obj) => acc + Number(obj.cityTaxCost || 0), 0)
+ .toFixed(2);
+ this.form.laborPretaxAmount = this.donorchargeorgans
+ .reduce((acc, obj) => acc + Number(obj.laborPretaxCost || 0), 0)
.toFixed(2);
this.form.taxMoney = this.donorchargeorgans
- .reduce((acc, obj) => acc + Number(obj.taXmoney), 0)
+ .reduce((acc, obj) => acc + Number(obj.taxcost || 0), 0)
.toFixed(2);
this.form.taxedamount = this.donorchargeorgans
- .reduce((acc, obj) => acc + Number(obj.taxedcost), 0)
+ .reduce((acc, obj) => acc + Number(obj.taxedcost || 0), 0)
.toFixed(2);
},
// 澶氶�夋閫変腑鏁版嵁
@@ -1011,14 +1117,12 @@
this.title = "涓撳璐规眹鎬诲崟缂栬緫";
getFundtax(this.curId).then(response => {
this.form = response.data;
- if (this.form.serviceFunds[0]) {
+ if (this.form.serviceFunds && this.form.serviceFunds[0]) {
this.donorchargeorgans = this.form.serviceFunds;
this.donorchargeorgans.forEach((item, index) => {
- item.taXmoney = item.pretaxcost - item.taxedcost;
- item.taXmoney = item.taXmoney.toFixed(2);
item.index = index + 1;
- this.accumulation();
});
+ this.accumulation();
}
});
},
@@ -1028,14 +1132,12 @@
this.title = "鏌ョ湅涓撳璐规眹鎬诲崟";
getFundtax(this.curId).then(response => {
this.form = response.data;
- if (this.form.serviceFunds[0]) {
+ if (this.form.serviceFunds && this.form.serviceFunds[0]) {
this.donorchargeorgans = this.form.serviceFunds;
this.donorchargeorgans.forEach((item, index) => {
- item.taXmoney = item.pretaxcost - item.taxedcost;
- item.taXmoney = item.taXmoney.toFixed(2);
item.index = index + 1;
- this.accumulation();
});
+ this.accumulation();
}
});
},
@@ -1053,21 +1155,10 @@
if (this.form.id != null) {
updateFundtax(this.form).then(res1 => {
if (res1.code == 200) {
- console.log(3);
this.$modal.msgSuccess("淇濆瓨鎴愬姛锛�");
- getFundtax(this.form.id).then(response => {
- this.form = response.data;
- if (this.form.serviceFunds[0]) {
- this.donorchargeorgans = this.form.serviceFunds;
- this.donorchargeorgans.forEach((item, index) => {
- item.taXmoney = item.pretaxcost - item.taxedcost;
- item.taXmoney = item.taXmoney.toFixed(2);
- item.index = index + 1;
- this.accumulation();
- });
- }
+ this.refreshFundtax().then(() => {
+ this.$modal.closeLoading();
});
- this.$modal.closeLoading();
} else {
this.$modal.closeLoading();
this.$modal.msgError(res1.msg);
@@ -1077,20 +1168,10 @@
addFundtax(this.form).then(response => {
if (response.code == 200) {
this.$modal.msgSuccess("鏂板鎴愬姛锛�");
- getFundtax(response.data.fundTaxId).then(res => {
- this.form = res.data;
- if (this.form.serviceFunds[0]) {
- this.donorchargeorgans = this.form.serviceFunds;
- this.donorchargeorgans.forEach((item, index) => {
- item.taXmoney = item.pretaxcost - item.taxedcost;
- item.taXmoney = item.taXmoney.toFixed(2);
- item.index = index + 1;
-
- this.accumulation();
- });
- }
+ this.form.id = response.data.fundTaxId;
+ this.refreshFundtax().then(() => {
+ this.$modal.closeLoading();
});
- this.$modal.closeLoading();
} else {
this.$modal.msgError(response.msg);
this.$modal.closeLoading();
--
Gitblit v1.9.3