From b02cd77eb78d973c1eb11ebf03d7d5d71b02aa65 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 09 十二月 2025 10:26:53 +0800
Subject: [PATCH] 1.南洋电缆小数点修改
---
src/views/procurementManagement/invoiceEntry/components/Modal.vue | 27 +++++++++++++--------------
1 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/src/views/procurementManagement/invoiceEntry/components/Modal.vue b/src/views/procurementManagement/invoiceEntry/components/Modal.vue
index f29b78a..1b8983c 100644
--- a/src/views/procurementManagement/invoiceEntry/components/Modal.vue
+++ b/src/views/procurementManagement/invoiceEntry/components/Modal.vue
@@ -128,7 +128,6 @@
placeholder="璇疯緭鍏�"
:min="0"
:step="0.1"
- :precision="2"
clearable
style="width: 100%"
@change="invoiceNumBlur(row)"
@@ -139,7 +138,6 @@
v-model="row.ticketsAmount"
placeholder="璇疯緭鍏�"
:min="0"
- :precision="2"
:step="0.1"
clearable
style="width: 100%"
@@ -199,8 +197,7 @@
const rules = ref({
invoiceNumber: [
- { required: true, message: "璇疯緭鍏ュ彂绁ㄥ彿", trigger: "blur" },
- { type: "string" },
+ { required: false, message: "璇疯緭鍏ュ彂绁ㄥ彿", trigger: "blur" },
],
invoiceAmount: [
{ required: true, message: "璇疯緭鍏ュ彂绁ㄩ噾棰�", trigger: "blur" },
@@ -259,7 +256,7 @@
prop: "taxInclusiveUnitPrice",
width: 150,
formatData: (val) => {
- return val ? parseFloat(val).toFixed(2) : 0;
+ return val ? parseFloat(val).toFixed(5) : 0;
},
},
{
@@ -267,7 +264,7 @@
prop: "taxInclusiveTotalPrice",
width: 150,
formatData: (val) => {
- return parseFloat(val).toFixed(2) ?? 0;
+ return parseFloat(val).toFixed(5) ?? 0;
},
},
{
@@ -275,7 +272,7 @@
prop: "taxExclusiveTotalPrice",
width: 150,
formatData: (val) => {
- return parseFloat(val).toFixed(2) ?? 0;
+ return parseFloat(val).toFixed(5) ?? 0;
},
},
{
@@ -350,17 +347,18 @@
if (!row.ticketsNum || row.ticketsNum === "") {
row.ticketsNum = 0;
}
+ row.ticketsNum = row.ticketsNum.toFixed(5);
if (Number(row.ticketsNum) > Number(row.tempFutureTickets)) {
proxy.$modal.msgWarning("鏈寮�绁ㄦ暟涓嶅緱澶т簬鏈紑绁ㄦ暟");
row.ticketsNum = 0;
return;
}
// 璁$畻鏈鏉ョエ閲戦
- row.ticketsAmount = (row.ticketsNum * row.taxInclusiveUnitPrice).toFixed(2)
+ row.ticketsAmount = (row.ticketsNum * row.taxInclusiveUnitPrice).toFixed(5)
// 璁$畻鏈潵绁ㄦ暟
- row.futureTickets = (row.tempFutureTickets - row.ticketsNum).toFixed(2)
+ row.futureTickets = (row.tempFutureTickets - row.ticketsNum).toFixed(5)
// 璁$畻鏈潵绁ㄩ噾棰�
- row.futureTicketsAmount = (row.tempFutureTicketsAmount - row.ticketsAmount).toFixed(2)
+ row.futureTicketsAmount = (row.tempFutureTicketsAmount - row.ticketsAmount).toFixed(5)
calculateinvoiceAmount();
};
@@ -369,6 +367,7 @@
if (!row.ticketsAmount) {
row.ticketsAmount = 0;
}
+ row.ticketsAmount = row.ticketsAmount.toFixed(5);
// 璁$畻鏄惁瓒呰繃鏉ョエ鎬婚噾棰�
if (row.ticketsAmount > row.tempFutureTicketsAmount) {
proxy.$modal.msgWarning("鏈鏉ョエ閲戦涓嶅緱澶т簬鏈潵绁ㄩ噾棰�");
@@ -376,12 +375,12 @@
}
// 璁$畻鏈鏉ョエ鏁�
row.ticketsNum = Number(
- (row.ticketsAmount / row.taxInclusiveUnitPrice).toFixed(2)
+ (row.ticketsAmount / row.taxInclusiveUnitPrice).toFixed(5)
);
// 璁$畻鏈潵绁ㄦ暟
- row.futureTickets = (row.tempFutureTickets - row.ticketsNum).toFixed(2)
+ row.futureTickets = (row.tempFutureTickets - row.ticketsNum).toFixed(5)
// 璁$畻鏈潵绁ㄩ噾棰�
- row.futureTicketsAmount = (row.tempFutureTicketsAmount - row.ticketsAmount).toFixed(2)
+ row.futureTicketsAmount = (row.tempFutureTicketsAmount - row.ticketsAmount).toFixed(5)
calculateinvoiceAmount();
};
@@ -392,7 +391,7 @@
invoiceAmountTotal += Number(item.ticketsAmount);
}
});
- form.invoiceAmount = invoiceAmountTotal.toFixed(2);
+ form.invoiceAmount = invoiceAmountTotal.toFixed(5);
};
const open = (type, eid) => {
--
Gitblit v1.9.3