From d3d2f9861c3d4bccfb9594b7efd76e62d3b44b65 Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期三, 03 六月 2026 16:41:31 +0800
Subject: [PATCH] feat: 添加合格率计算及显示功能
---
src/views/procurementManagement/procurementLedger/index.vue | 45 +++++++++++++++++++++++++++++----------------
1 files changed, 29 insertions(+), 16 deletions(-)
diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index e4328aa..c6d4c93 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -11,7 +11,7 @@
<el-input v-model="searchForm.purchaseContractNumber" style="width: 240px" placeholder="璇疯緭鍏�"
@change="handleQuery" clearable :prefix-icon="Search" />
</el-form-item>
- <el-form-item label="閿�鍞悎鍚屽彿锛�">
+ <el-form-item v-if="showSalesContractBinding" label="閿�鍞悎鍚屽彿锛�">
<el-input v-model="searchForm.salesContractNo" placeholder="璇疯緭鍏�" clearable prefix-icon="Search"
@change="handleQuery" />
</el-form-item>
@@ -76,7 +76,7 @@
</el-table-column>
<el-table-column align="center" label="搴忓彿" type="index" width="60" />
<el-table-column label="閲囪喘鍚堝悓鍙�" prop="purchaseContractNumber" width="160" show-overflow-tooltip />
- <el-table-column label="閿�鍞悎鍚屽彿" prop="salesContractNo" width="160" show-overflow-tooltip />
+ <el-table-column v-if="showSalesContractBinding" label="閿�鍞悎鍚屽彿" prop="salesContractNo" width="160" show-overflow-tooltip />
<el-table-column label="渚涘簲鍟嗗悕绉�" prop="supplierName" width="160" show-overflow-tooltip />
<el-table-column label="椤圭洰鍚嶇О" prop="projectName" width="320" show-overflow-tooltip />
<el-table-column label="瀹℃壒鐘舵��" prop="approvalStatus" width="100" show-overflow-tooltip>
@@ -124,7 +124,7 @@
<el-input v-model="form.purchaseContractNumber" placeholder="璇疯緭鍏�" clearable />
</el-form-item>
</el-col>
- <el-col :span="12">
+ <el-col v-if="showSalesContractBinding" :span="12">
<el-form-item label="閿�鍞悎鍚屽彿锛�" prop="salesLedgerId">
<el-select v-model="form.salesLedgerId" placeholder="璇烽�夋嫨" filterable clearable @change="salesLedgerChange">
<el-option v-for="item in salesContractList" :key="item.id" :label="item.salesContractNo" :value="item.id" />
@@ -310,7 +310,7 @@
<el-row :gutter="30">
<el-col :span="12">
<el-form-item label="鍚◣鍗曚环(鍏�)锛�" prop="taxInclusiveUnitPrice">
- <el-input-number v-model="productForm.taxInclusiveUnitPrice" :precision="2" :step="0.1" :min="0" clearable
+ <el-input-number v-model="productForm.taxInclusiveUnitPrice" :precision="8" :step="0.1" :min="0" clearable
style="width: 100%" @change="mathNum" />
</el-form-item>
</el-col>
@@ -324,13 +324,13 @@
<el-row :gutter="30">
<el-col :span="12">
<el-form-item label="鍚◣鎬讳环(鍏�)锛�" prop="taxInclusiveTotalPrice">
- <el-input-number v-model="productForm.taxInclusiveTotalPrice" :precision="2" :step="0.1" :min="0"
+ <el-input-number v-model="productForm.taxInclusiveTotalPrice" :precision="8" :step="0.1" :min="0"
clearable style="width: 100%" @change="reverseMathNum('taxInclusiveTotalPrice')" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="涓嶅惈绋庢�讳环(鍏�)锛�" prop="taxExclusiveTotalPrice">
- <el-input-number v-model="productForm.taxExclusiveTotalPrice" :precision="2" :step="0.1" :min="0"
+ <el-input-number v-model="productForm.taxExclusiveTotalPrice" :precision="8" :step="0.1" :min="0"
clearable style="width: 100%" @change="reverseMathNum('taxExclusiveTotalPrice')" />
</el-form-item>
</el-col>
@@ -439,6 +439,9 @@
import FileUpload from "@/components/AttachmentUpload/file/index.vue";
const userStore = useUserStore();
+
+// 鏄惁鏄剧ず閿�鍞悎鍚屽彿缁戝畾
+const showSalesContractBinding = false;
// 璁㈠崟瀹℃壒鐘舵�佹樉绀烘枃鏈�
const approvalStatusText = {
@@ -768,7 +771,7 @@
};
const formattedNumber = (row, column, cellValue) => {
- return parseFloat(cellValue).toFixed(2);
+ return parseFloat(cellValue).toFixed(8);
};
// 鏌ヨ鍒楄〃
/** 鎼滅储鎸夐挳鎿嶄綔 */
@@ -890,6 +893,9 @@
{
ticketsNum: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
futureTickets: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
+ taxInclusiveUnitPrice: { decimalPlaces: 8 },
+ taxInclusiveTotalPrice: { decimalPlaces: 8 },
+ taxExclusiveTotalPrice: { decimalPlaces: 8 },
}
);
};
@@ -953,15 +959,25 @@
};
// 涓昏〃鍚堣鏂规硶
const summarizeMainTable = param => {
- return proxy.summarizeTable(param, ["contractAmount"]);
+ return proxy.summarizeTable(param, ["contractAmount"], {
+ contractAmount: { decimalPlaces: 8 },
+ });
};
// 瀛愯〃鍚堣鏂规硶
const summarizeProTable = param => {
- return proxy.summarizeTable(param, [
- "taxInclusiveUnitPrice",
- "taxInclusiveTotalPrice",
- "taxExclusiveTotalPrice",
- ]);
+ return proxy.summarizeTable(
+ param,
+ [
+ "taxInclusiveUnitPrice",
+ "taxInclusiveTotalPrice",
+ "taxExclusiveTotalPrice",
+ ],
+ {
+ taxInclusiveUnitPrice: { decimalPlaces: 8 },
+ taxInclusiveTotalPrice: { decimalPlaces: 8 },
+ taxExclusiveTotalPrice: { decimalPlaces: 8 },
+ }
+ );
};
// 鎵撳紑寮规
const openForm = async (type, row) => {
@@ -1034,7 +1050,6 @@
if (form.value.salesLedgerId == -1) {
form.value.salesLedgerId = null;
}
- console.log(form.value, "form.value===========");
dialogFormVisible.value = true;
} catch (error) {
console.error("鎵撳紑琛ㄥ崟澶辫触:", error);
@@ -1536,9 +1551,7 @@
};
// 閿�鍞悎鍚岄�夋嫨鏀瑰彉鏂规硶
const salesLedgerChange = async row => {
- console.log("row", row);
var index = salesContractList.value.findIndex(item => item.id == row);
- console.log("index", index);
if (index > -1) {
await querygProductInfoByContractNo();
}
--
Gitblit v1.9.3