From d2192e6e8b6a8d0f2fb68dd554c065a436e22c71 Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期二, 20 十月 2026 09:47:51 +0800
Subject: [PATCH] feat: 添加康森商砼的图标
---
src/views/procurementManagement/procurementLedger/index.vue | 103 ++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 76 insertions(+), 27 deletions(-)
diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index bbe8ef3..b28df5d 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -68,6 +68,7 @@
<div style="display: flex;justify-content: flex-end;margin-bottom: 20px;">
<el-button type="success"
plain
+ v-if="false"
@click="handleBatchGenerate">鎵归噺鐢熸垚鏁版嵁</el-button>
<el-button type="primary"
@click="openForm('add')">鏂板鍙拌处</el-button>
@@ -124,7 +125,7 @@
<el-table-column label="鍙敤鏁伴噺"
prop="availableQuality" />
<el-table-column label="閫�璐ф暟閲�"
- prop="returnQuality" />
+ prop="returnQuantity" />
<el-table-column label="绋庣巼(%)"
prop="taxRate" />
<el-table-column label="鍚◣鍗曚环(鍏�)"
@@ -132,10 +133,10 @@
:formatter="formattedNumber" />
<el-table-column label="鍚◣鎬讳环(鍏�)"
prop="taxInclusiveTotalPrice"
- :formatter="formattedNumber" />
+ :formatter="formattedAmount" />
<el-table-column label="涓嶅惈绋庢�讳环(鍏�)"
prop="taxExclusiveTotalPrice"
- :formatter="formattedNumber" />
+ :formatter="formattedAmount" />
</el-table>
</template>
</el-table-column>
@@ -193,7 +194,12 @@
prop="contractAmount"
width="200"
show-overflow-tooltip
- :formatter="formattedNumber" />
+ :formatter="formattedAmount" />
+<!-- <el-table-column label="瀹為檯鍚堝悓閲戦(鍏�)"-->
+<!-- prop="netContractAmount"-->
+<!-- width="200"-->
+<!-- show-overflow-tooltip-->
+<!-- :formatter="formattedNumber" />-->
<el-table-column label="褰曞叆浜�"
prop="recorderName"
width="120"
@@ -426,11 +432,11 @@
width="150" />
<el-table-column label="鍚◣鎬讳环(鍏�)"
prop="taxInclusiveTotalPrice"
- :formatter="formattedNumber"
+ :formatter="formattedAmount"
width="150" />
<el-table-column label="涓嶅惈绋庢�讳环(鍏�)"
prop="taxExclusiveTotalPrice"
- :formatter="formattedNumber"
+ :formatter="formattedAmount"
width="150" />
<el-table-column label="鏄惁璐ㄦ"
prop="isChecked"
@@ -593,7 +599,7 @@
<el-form-item label="鍚◣鍗曚环(鍏�)锛�"
prop="taxInclusiveUnitPrice">
<el-input-number v-model="productForm.taxInclusiveUnitPrice"
- :precision="2"
+ :precision="6"
:step="0.1"
:min="0"
clearable
@@ -606,7 +612,7 @@
prop="quantity">
<el-input-number :step="0.1"
clearable
- :precision="2"
+ :precision="6"
:min="0"
style="width: 100%"
v-model="productForm.quantity"
@@ -620,7 +626,7 @@
<el-form-item label="鍚◣鎬讳环(鍏�)锛�"
prop="taxInclusiveTotalPrice">
<el-input-number v-model="productForm.taxInclusiveTotalPrice"
- :precision="2"
+ :precision="6"
:step="0.1"
:min="0"
clearable
@@ -632,7 +638,7 @@
<el-form-item label="涓嶅惈绋庢�讳环(鍏�)锛�"
prop="taxExclusiveTotalPrice">
<el-input-number v-model="productForm.taxExclusiveTotalPrice"
- :precision="2"
+ :precision="6"
:step="0.1"
:min="0"
clearable
@@ -659,7 +665,7 @@
<el-form-item label="搴撳瓨棰勮鏁伴噺锛�"
prop="warnNum">
<el-input-number v-model="productForm.warnNum"
- :precision="2"
+ :precision="6"
:step="0.1"
:min="0"
clearable
@@ -755,6 +761,7 @@
import { modelList, productTreeList } from "@/api/basicData/product.js";
import dayjs from "dayjs";
import FileUpload from "@/components/AttachmentUpload/file/index.vue";
+ import { roundHalfUp, trimZeros } from "@/utils/formatNumber.js";
const userStore = useUserStore();
@@ -938,7 +945,16 @@
},
});
const { form, rules } = toRefs(data);
- const { form: searchForm } = useFormData(data.searchForm);
+ const { form: searchForm } = useFormData({
+ ...data.searchForm,
+ // 璁剧疆褰曞叆鏃ユ湡鑼冨洿涓哄綋澶�
+ entryDate: [
+ dayjs().startOf("day").format("YYYY-MM-DD"),
+ dayjs().endOf("day").format("YYYY-MM-DD"),
+ ],
+ entryDateStart: dayjs().startOf("day").format("YYYY-MM-DD"),
+ entryDateEnd: dayjs().endOf("day").format("YYYY-MM-DD"),
+ });
// 浜у搧琛ㄥ崟寮规鏁版嵁
const productFormVisible = ref(false);
@@ -1070,7 +1086,15 @@
};
const formattedNumber = (row, column, cellValue) => {
- return parseFloat(cellValue).toFixed(2);
+ return trimZeros(cellValue, 6);
+ };
+ // 閲戦鏄剧ず鏍煎紡鍖栵細鎸夊崄杩涘埗鍥涜垗浜斿叆鍒� 2 浣嶅皬鏁帮紙涓庢暟鎹簱 ROUND 涓�鑷达級锛屽啀鍘绘帀鏈熬澶氫綑鐨� 0
+ const formatAmount = value => {
+ return trimZeros(roundHalfUp(value, 2), 2);
+ };
+ // 閲戦鍒楃殑琛ㄦ牸鏍煎紡鍖栧嚱鏁帮紙鍗曚环鍒椾粛鐢� formattedNumber 淇濈暀 6 浣嶅皬鏁帮級
+ const formattedAmount = (row, column, cellValue) => {
+ return formatAmount(cellValue);
};
// 鏌ヨ鍒楄〃
/** 鎼滅储鎸夐挳鎿嶄綔 */
@@ -1190,6 +1214,12 @@
"futureTicketsAmount",
],
{
+ taxInclusiveUnitPrice: { decimalPlaces: 6, trimZeros: true },
+ // 閲戦鍒楋細姣忚鍏堟寜 2 浣嶅皬鏁板洓鑸嶄簲鍏ュ啀姹傚拰锛屼繚璇佸悎璁′笌鍒楀唴灞曠ず鍊间竴鑷�
+ taxInclusiveTotalPrice: { roundEach: 2, decimalPlaces: 2, trimZeros: true },
+ taxExclusiveTotalPrice: { roundEach: 2, decimalPlaces: 2, trimZeros: true },
+ ticketsAmount: { roundEach: 2, decimalPlaces: 2, trimZeros: true },
+ futureTicketsAmount: { roundEach: 2, decimalPlaces: 2, trimZeros: true },
ticketsNum: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
futureTickets: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
}
@@ -1255,15 +1285,32 @@
};
// 涓昏〃鍚堣鏂规硶
const summarizeMainTable = param => {
- return proxy.summarizeTable(param, ["contractAmount"]);
+ return proxy.summarizeTable(
+ param,
+ ["contractAmount", "netContractAmount"],
+ {
+ // 閲戦鍒楋細姣忚鍏堟寜 2 浣嶅皬鏁板洓鑸嶄簲鍏ュ啀姹傚拰锛屼繚璇佸悎璁′笌鍒楀唴灞曠ず鍊间竴鑷�
+ contractAmount: { roundEach: 2, decimalPlaces: 2, trimZeros: true },
+ netContractAmount: { roundEach: 2, decimalPlaces: 2, trimZeros: true },
+ }
+ );
};
// 瀛愯〃鍚堣鏂规硶
const summarizeProTable = param => {
- return proxy.summarizeTable(param, [
- "taxInclusiveUnitPrice",
- "taxInclusiveTotalPrice",
- "taxExclusiveTotalPrice",
- ]);
+ return proxy.summarizeTable(
+ param,
+ [
+ "taxInclusiveUnitPrice",
+ "taxInclusiveTotalPrice",
+ "taxExclusiveTotalPrice",
+ ],
+ {
+ taxInclusiveUnitPrice: { decimalPlaces: 6, trimZeros: true },
+ // 閲戦鍒楋細姣忚鍏堟寜 2 浣嶅皬鏁板洓鑸嶄簲鍏ュ啀姹傚拰锛屼繚璇佸悎璁′笌鍒楀唴灞曠ず鍊间竴鑷�
+ taxInclusiveTotalPrice: { roundEach: 2, decimalPlaces: 2, trimZeros: true },
+ taxExclusiveTotalPrice: { roundEach: 2, decimalPlaces: 2, trimZeros: true },
+ }
+ );
};
// 鎵撳紑寮规
const openForm = async (type, row) => {
@@ -1771,14 +1818,16 @@
productForm.value.taxInclusiveTotalPrice =
proxy.calculateTaxIncludeTotalPrice(
productForm.value.taxInclusiveUnitPrice,
- productForm.value.quantity
+ productForm.value.quantity,
+ 6
);
if (productForm.value.taxRate) {
// 涓嶅惈绋庢�讳环璁$畻
productForm.value.taxExclusiveTotalPrice =
proxy.calculateTaxExclusiveTotalPrice(
productForm.value.taxInclusiveTotalPrice,
- productForm.value.taxRate
+ productForm.value.taxRate,
+ 6
);
}
};
@@ -1809,7 +1858,7 @@
productForm.value.taxInclusiveUnitPrice = (
Number(productForm.value.taxInclusiveTotalPrice) /
Number(productForm.value.quantity)
- ).toFixed(2);
+ ).toFixed(6);
// 纭繚缁撴灉涓嶄负璐熸暟
if (Number(productForm.value.taxInclusiveUnitPrice) < 0) {
productForm.value.taxInclusiveUnitPrice = "0";
@@ -1820,7 +1869,7 @@
productForm.value.quantity = (
Number(productForm.value.taxInclusiveTotalPrice) /
Number(productForm.value.taxInclusiveUnitPrice)
- ).toFixed(2);
+ ).toFixed(6);
// 纭繚缁撴灉涓嶄负璐熸暟
if (Number(productForm.value.quantity) < 0) {
productForm.value.quantity = "0";
@@ -1830,7 +1879,7 @@
productForm.value.taxExclusiveTotalPrice = (
Number(productForm.value.taxInclusiveTotalPrice) /
(1 + taxRate / 100)
- ).toFixed(2);
+ ).toFixed(6);
// 纭繚缁撴灉涓嶄负璐熸暟
if (Number(productForm.value.taxExclusiveTotalPrice) < 0) {
productForm.value.taxExclusiveTotalPrice = "0";
@@ -1840,7 +1889,7 @@
productForm.value.taxInclusiveTotalPrice = (
Number(productForm.value.taxExclusiveTotalPrice) *
(1 + taxRate / 100)
- ).toFixed(2);
+ ).toFixed(6);
// 纭繚缁撴灉涓嶄负璐熸暟
if (Number(productForm.value.taxInclusiveTotalPrice) < 0) {
productForm.value.taxInclusiveTotalPrice = "0";
@@ -1850,7 +1899,7 @@
productForm.value.taxInclusiveUnitPrice = (
Number(productForm.value.taxInclusiveTotalPrice) /
Number(productForm.value.quantity)
- ).toFixed(2);
+ ).toFixed(6);
// 纭繚缁撴灉涓嶄负璐熸暟
if (Number(productForm.value.taxInclusiveUnitPrice) < 0) {
productForm.value.taxInclusiveUnitPrice = "0";
@@ -1861,7 +1910,7 @@
productForm.value.quantity = (
Number(productForm.value.taxInclusiveTotalPrice) /
Number(productForm.value.taxInclusiveUnitPrice)
- ).toFixed(2);
+ ).toFixed(6);
// 纭繚缁撴灉涓嶄负璐熸暟
if (Number(productForm.value.quantity) < 0) {
productForm.value.quantity = "0";
--
Gitblit v1.9.3