From 3ab45f295fb26c7794b4829976f3fb20c68a012e Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 22 一月 2026 10:33:41 +0800
Subject: [PATCH] 新疆海川开心 1.采购模块的计算都改为保留三位小数并且不四舍五入
---
src/views/procurementManagement/paymentEntry/index.vue | 35 ++++++++++++-----------------------
1 files changed, 12 insertions(+), 23 deletions(-)
diff --git a/src/views/procurementManagement/paymentEntry/index.vue b/src/views/procurementManagement/paymentEntry/index.vue
index 238c487..9db9823 100644
--- a/src/views/procurementManagement/paymentEntry/index.vue
+++ b/src/views/procurementManagement/paymentEntry/index.vue
@@ -29,7 +29,7 @@
<el-form-item style="float: right; margin-right: unset">
<el-button @click="handleExport" style="margin-right: 10px">瀵煎嚭</el-button>
<el-button type="primary" @click="openForm('add')">
- 鏂板浠樻
+ 浠樻鐧昏
</el-button>
<!-- <el-button type="danger" plain @click="handleDelete">-->
<!-- 鍒犻櫎-->
@@ -75,7 +75,7 @@
<el-input-number :step="0.01" :min="0" style="width: 100%"
v-model="scope.row.currentPaymentAmount"
:disabled="!scope.row.editType"
- :precision="2"
+ :precision="3"
placeholder="璇疯緭鍏�"
clearable
/>
@@ -104,7 +104,6 @@
size="small"
@click="changeEditType(scope.row)"
v-if="!scope.row.editType"
- :disabled="scope.row.registrant !== userStore.nickName"
>缂栬緫</el-button
>
<el-button
@@ -113,7 +112,6 @@
size="small"
@click="saveReceiptPayment(scope.row)"
v-if="scope.row.editType"
- :disabled="scope.row.registrant !== userStore.nickName"
>淇濆瓨</el-button
>
<el-button
@@ -121,7 +119,6 @@
type="primary"
size="small"
@click="handleDelete(scope.row)"
- :disabled="scope.row.registrant !== userStore.nickName"
>鍒犻櫎</el-button
>
</template>
@@ -132,6 +129,7 @@
</div>
<el-dialog
v-model="dialogFormVisible"
+ draggable
:title="operationType === 'add' ? '鏂板浠樻鐧昏' : '缂栬緫浠樻鐧昏'"
width="60%"
@close="closeDia"
@@ -201,7 +199,7 @@
<el-col :span="12">
<el-form-item label="鏈浠樻閲戦锛�" prop="currentPaymentAmount">
<el-input-number :step="0.01" :min="0" style="width: 100%"
- :precision="2"
+ :precision="3"
v-model="form.currentPaymentAmount"
placeholder="璇疯緭鍏�"
clearable
@@ -243,7 +241,6 @@
v-model="form.registrant"
placeholder="璇疯緭鍏�"
clearable
- disabled
/>
</el-form-item>
</el-col>
@@ -253,7 +250,6 @@
v-model="form.registrationtDate"
placeholder="璇疯緭鍏�"
clearable
- disabled
/>
</el-form-item>
</el-col>
@@ -288,6 +284,7 @@
updatePaymentRegistration
} from "@/api/procurementManagement/procurementInvoiceLedger.js";
import useFormData from "@/hooks/useFormData";
+import { getCurrentDate, truncate } from "@/utils/index.js";
const { proxy } = getCurrentInstance();
const tableColumn = ref([
@@ -300,10 +297,10 @@
label: "閲囪喘鍚堝悓鍙�",
prop: "purchaseContractNumber",
},
- {
- label: "閿�鍞悎鍚屽彿",
- prop: "salesContractNo",
- },
+ // {
+ // label: "閿�鍞悎鍚屽彿",
+ // prop: "salesContractNo",
+ // },
{
label: "渚涘簲鍟嗗悕绉�",
prop: "supplierName",
@@ -332,21 +329,21 @@
label: "鍙戠エ閲戦(鍏�)",
prop: "invoiceAmount",
formatData: (params) => {
- return params ? parseFloat(params).toFixed(2) : 0;
+ return params ? truncate(parseFloat(params), 3) : 0;
},
},
{
label: "宸蹭粯娆鹃噾棰�(鍏�)",
prop: "paymentAmountTotal",
formatData: (params) => {
- return params ? parseFloat(params).toFixed(2) : 0;
+ return params ? truncate(parseFloat(params), 3) : 0;
},
},
{
label: "寰呬粯娆鹃噾棰�(鍏�)",
prop: "unPaymentAmountTotal",
formatData: (params) => {
- return params ? parseFloat(params).toFixed(2) : 0;
+ return params ? truncate(parseFloat(params), 3) : 0;
},
},
{
@@ -578,14 +575,6 @@
proxy.$modal.msg("宸插彇娑�");
});
};
-// 鑾峰彇褰撳墠鏃ユ湡骞舵牸寮忓寲涓� YYYY-MM-DD
-function getCurrentDate() {
- const today = new Date();
- const year = today.getFullYear();
- const month = String(today.getMonth() + 1).padStart(2, "0"); // 鏈堜唤浠�0寮�濮�
- const day = String(today.getDate()).padStart(2, "0");
- return `${year}-${month}-${day}`;
-}
// 瀵煎嚭
const handleExport = () => {
--
Gitblit v1.9.3