From 6784281753fefac72e044cb52b0e3b22615841e4 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 11 七月 2025 13:27:01 +0800
Subject: [PATCH] 1.采购管理-来票登记的登记弹框表格加合计,小数点两位
---
src/store/modules/user.js | 2 +-
src/views/procurementManagement/invoiceEntry/components/Modal.vue | 32 ++++++++++++++++++++++++--------
src/views/salesManagement/invoiceRegistration/index.vue | 5 +++--
3 files changed, 28 insertions(+), 11 deletions(-)
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 2dd2797..89e9c2b 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -52,7 +52,7 @@
this.avatar = avatar
this.currentFactoryName = user.currentFactoryName
this.nickName = user.nickName
- this.currentDeptId = user.currentDeptId
+ this.currentDeptId = user.tenantId
resolve(res)
}).catch(error => {
reject(error)
diff --git a/src/views/procurementManagement/invoiceEntry/components/Modal.vue b/src/views/procurementManagement/invoiceEntry/components/Modal.vue
index e3d96af..ecd2b06 100644
--- a/src/views/procurementManagement/invoiceEntry/components/Modal.vue
+++ b/src/views/procurementManagement/invoiceEntry/components/Modal.vue
@@ -113,12 +113,14 @@
rowKey="id"
:column="columns"
:tableData="form.productData"
+ :summaryMethod="summarizeChildrenTable"
+ :isShowSummary="true"
height="auto"
>
<template #ticketsNumRef="{ row }">
<el-input-number
v-model="row.ticketsNum"
- placeholder="璇烽�夋嫨"
+ placeholder="璇疯緭鍏�"
:min="0"
:step="0.1"
clearable
@@ -129,7 +131,7 @@
<template #ticketsAmountRef="{ row }">
<el-input-number
v-model="row.ticketsAmount"
- placeholder="璇烽�夋嫨"
+ placeholder="璇疯緭鍏�"
:min="0"
:step="0.1"
clearable
@@ -283,10 +285,12 @@
{
label: "鏈潵绁ㄦ暟",
prop: "futureTickets",
+ width: 100,
},
{
label: "鏈潵绁ㄩ噾棰�(鍏�)",
prop: "futureTicketsAmount",
+ width: 200,
},
];
@@ -316,7 +320,19 @@
form.productData = data.productData;
}
};
-
+// 瀛愯〃鍚堣鏂规硶
+const summarizeChildrenTable = (param) => {
+ return proxy.summarizeTable(param, [
+ "taxInclusiveUnitPrice",
+ "taxInclusiveTotalPrice",
+ "taxExclusiveTotalPrice",
+ "ticketsNum",
+ "ticketsAmount",
+ "ticketsAmountRef",
+ "futureTickets",
+ "futureTicketsAmount",
+ ]);
+};
//鏈鏉ョエ鏁板け鐒︽搷浣�
const invoiceNumBlur = (row) => {
if (!row.ticketsNum || row.ticketsNum === "") {
@@ -328,11 +344,11 @@
return;
}
// 璁$畻鏈鏉ョエ閲戦
- row.ticketsAmount = row.ticketsNum * row.taxInclusiveUnitPrice;
+ row.ticketsAmount = (row.ticketsNum * row.taxInclusiveUnitPrice).toFixed(2)
// 璁$畻鏈潵绁ㄦ暟
- row.futureTickets = row.tempFutureTickets - row.ticketsNum;
+ row.futureTickets = (row.tempFutureTickets - row.ticketsNum).toFixed(2)
// 璁$畻鏈潵绁ㄩ噾棰�
- row.futureTicketsAmount = row.tempFutureTicketsAmount - row.ticketsAmount;
+ row.futureTicketsAmount = (row.tempFutureTicketsAmount - row.ticketsAmount).toFixed(2)
calculateinvoiceAmount();
};
@@ -351,9 +367,9 @@
(row.ticketsAmount / row.taxInclusiveUnitPrice).toFixed(2)
);
// 璁$畻鏈潵绁ㄦ暟
- row.futureTickets = row.tempFutureTickets - row.ticketsNum;
+ row.futureTickets = (row.tempFutureTickets - row.ticketsNum).toFixed(2)
// 璁$畻鏈潵绁ㄩ噾棰�
- row.futureTicketsAmount = row.tempFutureTicketsAmount - row.ticketsAmount;
+ row.futureTicketsAmount = (row.tempFutureTicketsAmount - row.ticketsAmount).toFixed(2)
calculateinvoiceAmount();
};
diff --git a/src/views/salesManagement/invoiceRegistration/index.vue b/src/views/salesManagement/invoiceRegistration/index.vue
index e9dd49e..f5c293c 100644
--- a/src/views/salesManagement/invoiceRegistration/index.vue
+++ b/src/views/salesManagement/invoiceRegistration/index.vue
@@ -320,7 +320,7 @@
<template #default="scope">
<el-input-number :step="0.1" :min="0" style="width: 100%"
v-model="scope.row.currentInvoiceNum"
- @blur="invoiceNumBlur(scope.row)"
+ @change="invoiceNumBlur(scope.row)"
></el-input-number>
</template>
</el-table-column>
@@ -332,7 +332,7 @@
<template #default="scope">
<el-input-number :step="0.01" :min="0" style="width: 100%"
v-model="scope.row.currentInvoiceAmount"
- @blur="invoiceAmountBlur(scope.row)"
+ @change="invoiceAmountBlur(scope.row)"
></el-input-number>
</template>
</el-table-column>
@@ -539,6 +539,7 @@
"currentInvoiceAmount",
"noInvoiceNum",
"noInvoiceAmount",
+ "currentInvoiceNum",
]);
};
// 鎵撳紑寮规
--
Gitblit v1.9.3