From c75027743ea7c3ecc2d0885f01d11d2ad78679a3 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期五, 23 十月 2026 14:23:26 +0800
Subject: [PATCH] Merge branch 'yxh' of http://116.62.18.175:6699/r/~yxh/opo-web
---
src/views/project/tallage/computingBill/index.vue | 136 ++++++++++++++++++++++++++-------------------
1 files changed, 78 insertions(+), 58 deletions(-)
diff --git a/src/views/project/tallage/computingBill/index.vue b/src/views/project/tallage/computingBill/index.vue
index 061e294..dbf2747 100644
--- a/src/views/project/tallage/computingBill/index.vue
+++ b/src/views/project/tallage/computingBill/index.vue
@@ -8,8 +8,8 @@
<el-form-item label="鐢宠鏃ユ湡" prop="createTime">
<el-date-picker
v-model="form.createTime"
- value-format="yyyy-MM-dd HH:mm:ss"
- type="datetime"
+ value-format="yyyy-MM-dd "
+ type="date"
:disabled="true"
placeholder="閫夋嫨鍑虹敓骞存湀"
>
@@ -43,7 +43,7 @@
<el-date-picker
v-model="form.taxedtime"
value-format="yyyy-MM-dd HH:mm:ss"
- type="datetime"
+ type="datetime" format="yyyy-MM-dd HH:mm"
:disabled="true"
placeholder="閫夋嫨鏃堕棿"
>
@@ -115,6 +115,14 @@
show-summary
>
<el-table-column
+ prop="index"
+ align="center"
+ fixed
+ label="搴忓彿"
+ width="120"
+ >
+ </el-table-column>
+ <el-table-column
prop="donorname"
align="center"
fixed
@@ -172,8 +180,8 @@
v-model="scope.row.applyTime"
:disabled="true"
type="date"
- value-format="yyyy-MM-dd HH:mm:ss"
placeholder="鐢宠鏃ユ湡"
+ value-format="yyyy-MM-dd"
>
</el-date-picker>
</template>
@@ -290,6 +298,7 @@
<el-row :gutter="20">
<!--鐢ㄦ埛鏁版嵁-->
<el-form
+ class="opo-query-form"
:model="patientqueryParams"
ref="queryForm"
size="small"
@@ -298,19 +307,29 @@
>
<el-form-item label="鎹愮尞妗堜緥" prop="status">
<el-select
- v-model="patientqueryParams.donorno"
+ v-model="patientqueryParams.donorname"
filterable
+ allow-create
+ default-first-option
placeholder="璇烽�夋嫨"
>
<el-option
v-for="item in donorchargeanlList"
:key="item.id"
:label="item.name"
- :value="item.id"
+ :value="item.name"
>
</el-option>
- </el-select> </el-form-item
- ><el-form-item label="绠楃◣鐘舵��" prop="status">
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鐢宠浜�" prop="name">
+ <el-input
+ v-model="patientqueryParams.pausername"
+ placeholder="璇疯緭鍏ョ敵璇蜂汉濮撳悕"
+ @keyup.enter.native="handleAddpatient"
+ />
+ </el-form-item>
+ <!-- <el-form-item label="绠楃◣鐘舵��" prop="status">
<el-select
v-model="patientqueryParams.istax"
filterable
@@ -324,7 +343,7 @@
>
</el-option>
</el-select>
- </el-form-item>
+ </el-form-item> -->
<el-form-item>
<el-button
@@ -552,6 +571,7 @@
import Li_area_select from "@/components/Address";
import { getUserProfile } from "@/api/system/user";
import { getToken } from "@/utils/auth";
+import { moneySum, moneyRound } from "@/utils/money";
import {
ExpertfeeListnb,
getFundtax,
@@ -568,13 +588,13 @@
Li_area_select,
pdf
},
- dicts: ["sys_gathering", "sys_0_1"],
+ dicts: ["Collection_status", "sys_0_1"],
name: "Donorchargemanager",
data() {
return {
swgatheringlist: [
- { label: "鏈畻绋�", value: 0 },
- { label: "宸茬畻绋�", value: 1 }
+ { label: "宸茬畻绋�", value: 1 },
+ { label: "鏈畻绋�", value: 0 }
],
gatheringlist: [
{ label: "鏈粯娆�", value: "0" },
@@ -586,9 +606,9 @@
overallCase: [],
patientqueryParams: {
paApplyType: 1,
- pacheckno: "047",
- checkstatus: 0,
- istax:0,
+ // pacheckno: "047",
+ // checkstatus: 0,
+ pfundtaxid: 0,
pageNum: 1,
pageSize: 10
},
@@ -775,18 +795,24 @@
},
handleQuery() {},
resetQuery() {
- this.patientqueryParams.donorno = null;
- this.patientqueryParams.donorchargeid = null;
+ this.patientqueryParams.pausername = null;
+ this.patientqueryParams.donorname = null;
this.handleAddpatient();
},
handleUploadError() {},
// 寮规娣诲姞
AddDispatchpatients() {
- this.donorchargeorgans = this.donorchargeorgans.concat(this.overallCase);
- console.log(this.donorchargeorgans, "donorchargeorgans");
- this.donorchargeorgans.forEach(item => {
- CalculationDetail({ id: item.id, fundTaxId: this.form.id });
+ let newArr = this.donorchargeorgans.concat(this.overallCase);
+ this.donorchargeorgans = newArr.filter((item, index, self) => {
+ return !self.slice(index + 1).some(other => other.id === item.id);
});
+
+ console.log(this.donorchargeorgans, "donorchargeorgans");
+ if (this.form.id) {
+ this.donorchargeorgans.forEach(item => {
+ CalculationDetail({ id: item.id, fundTaxId: this.form.id });
+ });
+ }
this.donorchargeorgans.forEach(item => {
item.taXmoney = item.pretaxcost - item.taxedcost;
item.taXmoney = item.taXmoney.toFixed(2);
@@ -837,18 +863,15 @@
},
// 閲戦鍚堣
accumulation() {
- this.form.pretaxamount = this.donorchargeorgans.reduce(
- (acc, obj) => acc + Number(obj.pretaxcost),
- 0
- );
- this.form.taxMoney = this.donorchargeorgans.reduce(
- (acc, obj) => acc + Number(obj.taXmoney),
- 0
- );
- this.form.taxedamount = this.donorchargeorgans.reduce(
- (acc, obj) => acc + Number(obj.taxedcost),
- 0
- );
+ this.form.pretaxamount = this.donorchargeorgans
+ .reduce((acc, obj) => acc + Number(obj.pretaxcost), 0)
+ .toFixed(2);
+ this.form.taxMoney = this.donorchargeorgans
+ .reduce((acc, obj) => acc + Number(obj.taXmoney), 0)
+ .toFixed(2);
+ this.form.taxedamount = this.donorchargeorgans
+ .reduce((acc, obj) => acc + Number(obj.taxedcost), 0)
+ .toFixed(2);
},
// 澶氶�夋閫変腑鏁版嵁
handleSelectionChange(selection) {
@@ -857,7 +880,6 @@
if (this.multipleSelection.length <= selection.length) {
this.multipleSelection = selection;
} else {
- console.log(11);
this.multipleSelection.forEach(item => {
if (selection.includes(item)) {
} else {
@@ -965,11 +987,11 @@
});
},
- /** 閲嶇疆鎸夐挳鎿嶄綔 */
- resetQuery() {
- this.resetForm("queryForm");
- this.handleQuery();
- },
+ // /** 閲嶇疆鎸夐挳鎿嶄綔 */
+ // resetQuery() {
+ // this.resetForm("queryForm");
+ // this.handleQuery();
+ // },
// 鍙栨秷鎸夐挳
cancel() {
@@ -982,7 +1004,7 @@
this.title = "鏂板涓撳璐规眹鎬诲崟";
//鑾峰彇鐧诲綍鑰呬俊鎭�
getUserProfile().then(res => {
- this.form.username = res.createBy;
+ this.form.username = res.data.createBy;
});
},
@@ -993,9 +1015,10 @@
this.form = response.data;
if (this.form.serviceFunds[0]) {
this.donorchargeorgans = this.form.serviceFunds;
- this.donorchargeorgans.forEach(item => {
+ this.donorchargeorgans.forEach((item, index) => {
item.taXmoney = item.pretaxcost - item.taxedcost;
item.taXmoney = item.taXmoney.toFixed(2);
+ item.index = index + 1;
this.accumulation();
});
}
@@ -1009,9 +1032,10 @@
this.form = response.data;
if (this.form.serviceFunds[0]) {
this.donorchargeorgans = this.form.serviceFunds;
- this.donorchargeorgans.forEach(item => {
+ this.donorchargeorgans.forEach((item, index) => {
item.taXmoney = item.pretaxcost - item.taxedcost;
item.taXmoney = item.taXmoney.toFixed(2);
+ item.index = index + 1;
this.accumulation();
});
}
@@ -1037,9 +1061,10 @@
this.form = response.data;
if (this.form.serviceFunds[0]) {
this.donorchargeorgans = this.form.serviceFunds;
- this.donorchargeorgans.forEach(item => {
+ this.donorchargeorgans.forEach((item, index) => {
item.taXmoney = item.pretaxcost - item.taxedcost;
item.taXmoney = item.taXmoney.toFixed(2);
+ item.index = index + 1;
this.accumulation();
});
}
@@ -1058,9 +1083,11 @@
this.form = res.data;
if (this.form.serviceFunds[0]) {
this.donorchargeorgans = this.form.serviceFunds;
- this.donorchargeorgans.forEach(item => {
+ this.donorchargeorgans.forEach((item, index) => {
item.taXmoney = item.pretaxcost - item.taxedcost;
item.taXmoney = item.taXmoney.toFixed(2);
+ item.index = index + 1;
+
this.accumulation();
});
}
@@ -1085,23 +1112,16 @@
this.$modal.msgError("娉ㄦ剰瀹炴敹閲戦涓嶇瓑浜庡簲鏀堕噾棰濓紝璇锋牳瀵规暟鎹紒");
}
},
- //淇敼瀹炴敹鎴栧簲鏀跺悗瑙﹀彂
+ //淇敼瀹炴敹鎴栧簲鏀跺悗瑙﹀彂锛堥噾棰濅竴寰嬭蛋绮剧‘杩愮畻锛�
chargeSum() {
- let ChargeSum = 0;
- let ChargeamountSum = 0;
-
//璐圭敤鍚堣
try {
- for (let i = 0; i < this.donorchargeorgans.length; i++) {
- if (!isNaN(parseFloat(this.donorchargeorgans[i].organcharge))) {
- ChargeSum += parseFloat(this.donorchargeorgans[i].organcharge);
- }
- if (!isNaN(parseFloat(this.donorchargeorgans[i].amount))) {
- ChargeamountSum += parseFloat(this.donorchargeorgans[i].amount);
- }
- }
- this.form.receivableamount = ChargeSum.toFixed(2);
- this.form.receivedamount = ChargeamountSum.toFixed(2);
+ this.form.receivableamount = moneyRound(
+ moneySum(this.donorchargeorgans, "organcharge")
+ ).toFixed(2);
+ this.form.receivedamount = moneyRound(
+ moneySum(this.donorchargeorgans, "amount")
+ ).toFixed(2);
} catch {}
},
--
Gitblit v1.9.3