From 9e7ed81d5fcfdc1489fc8a08edf5fe826dfe5fdc Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 25 五月 2026 16:54:43 +0800
Subject: [PATCH] 宝东 1.协同审批部门选择筛选去掉
---
src/views/salesManagement/salesLedger/index.vue | 72 ++++++++++++++++++++---------------
1 files changed, 41 insertions(+), 31 deletions(-)
diff --git a/src/views/salesManagement/salesLedger/index.vue b/src/views/salesManagement/salesLedger/index.vue
index 2784f80..de17401 100644
--- a/src/views/salesManagement/salesLedger/index.vue
+++ b/src/views/salesManagement/salesLedger/index.vue
@@ -700,6 +700,15 @@
style="width: 100%" />
</el-form-item>
</el-col>
+ <el-col :span="12">
+ <el-form-item label="鎬绘暟锛�"
+ prop="totalQuantity">
+ <el-input v-model="productForm.totalQuantity"
+ placeholder="鑷姩璁$畻"
+ disabled
+ style="width: 100%" />
+ </el-form-item>
+ </el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="12">
@@ -1137,6 +1146,7 @@
unit: "",
quantity: "",
singleQuantity: 1,
+ totalQuantity: "",
taxInclusiveUnitPrice: "",
taxRate: "",
taxInclusiveTotalPrice: "",
@@ -1807,6 +1817,12 @@
if (type === "edit") {
productForm.value = { ...row };
productIndex.value = index;
+ // 濡傛灉娌℃湁 totalQuantity锛岃嚜鍔ㄨ绠楋細鎬绘暟 = 姣忎欢鏁伴噺 * 鏁伴噺
+ if (!productForm.value.totalQuantity && productForm.value.quantity) {
+ const singleQuantity = parseInt(productForm.value.singleQuantity) || 1;
+ const quantity = parseFloat(productForm.value.quantity);
+ productForm.value.totalQuantity = (quantity * singleQuantity).toFixed(0);
+ }
// 缂栬緫鏃舵牴鎹骇鍝佸ぇ绫诲悕绉板弽鏌� tree 鑺傜偣 id锛屽苟鍔犺浇瑙勬牸鍨嬪彿鍒楄〃
try {
const options =
@@ -2469,7 +2485,6 @@
const totalPrice = parseFloat(productForm.value.taxInclusiveTotalPrice);
const quantity = parseFloat(productForm.value.quantity);
- const singleQuantity = parseInt(productForm.value.singleQuantity) || 1;
if (!totalPrice || !quantity || quantity <= 0) {
return;
@@ -2477,8 +2492,8 @@
isCalculating.value = true;
- // 璁$畻鍚◣鍗曚环 = 鍚◣鎬讳环 / (鏁伴噺 * 姣忎欢鏁伴噺)
- productForm.value.taxInclusiveUnitPrice = (totalPrice / (quantity * singleQuantity)).toFixed(2);
+ // 璁$畻鍚◣鍗曚环 = 鍚◣鎬讳环 / 鏁伴噺
+ productForm.value.taxInclusiveUnitPrice = (totalPrice / quantity).toFixed(2);
// 濡傛灉鏈夌◣鐜囷紝璁$畻涓嶅惈绋庢�讳环
if (productForm.value.taxRate) {
@@ -2488,6 +2503,10 @@
productForm.value.taxRate
);
}
+
+ // 璁$畻鎬绘暟 = 姣忎欢鏁伴噺 * 鏁伴噺
+ const singleQuantity = parseInt(productForm.value.singleQuantity) || 1;
+ productForm.value.totalQuantity = (quantity * singleQuantity).toFixed(0);
isCalculating.value = false;
};
@@ -2505,7 +2524,6 @@
);
const quantity = parseFloat(productForm.value.quantity);
const taxRate = parseFloat(productForm.value.taxRate);
- const singleQuantity = parseInt(productForm.value.singleQuantity) || 1;
if (!exclusiveTotalPrice || !quantity || quantity <= 0 || !taxRate) {
return;
@@ -2518,10 +2536,14 @@
const inclusiveTotalPrice = exclusiveTotalPrice / (1 - taxRateDecimal);
productForm.value.taxInclusiveTotalPrice = inclusiveTotalPrice.toFixed(2);
- // 璁$畻鍚◣鍗曚环 = 鍚◣鎬讳环 / (鏁伴噺 * 姣忎欢鏁伴噺)
+ // 璁$畻鍚◣鍗曚环 = 鍚◣鎬讳环 / 鏁伴噺
productForm.value.taxInclusiveUnitPrice = (
- inclusiveTotalPrice / (quantity * singleQuantity)
+ inclusiveTotalPrice / quantity
).toFixed(2);
+
+ // 璁$畻鎬绘暟 = 姣忎欢鏁伴噺 * 鏁伴噺
+ const singleQuantity = parseInt(productForm.value.singleQuantity) || 1;
+ productForm.value.totalQuantity = (quantity * singleQuantity).toFixed(0);
isCalculating.value = false;
};
@@ -2536,7 +2558,6 @@
const quantity = parseFloat(productForm.value.quantity);
const unitPrice = parseFloat(productForm.value.taxInclusiveUnitPrice);
- const singleQuantity = parseInt(productForm.value.singleQuantity) || 1;
if (!quantity || quantity <= 0 || !unitPrice) {
return;
@@ -2544,8 +2565,8 @@
isCalculating.value = true;
- // 璁$畻鍚◣鎬讳环 = 鍗曚环 * 鏁伴噺 * 姣忎欢鏁伴噺
- productForm.value.taxInclusiveTotalPrice = (unitPrice * quantity * singleQuantity).toFixed(2);
+ // 璁$畻鍚◣鎬讳环 = 鍗曚环 * 鏁伴噺
+ productForm.value.taxInclusiveTotalPrice = (unitPrice * quantity).toFixed(2);
// 濡傛灉鏈夌◣鐜囷紝璁$畻涓嶅惈绋庢�讳环
if (productForm.value.taxRate) {
@@ -2555,6 +2576,10 @@
productForm.value.taxRate
);
}
+
+ // 璁$畻鎬绘暟 = 姣忎欢鏁伴噺 * 鏁伴噺
+ const singleQuantity = parseInt(productForm.value.singleQuantity) || 1;
+ productForm.value.totalQuantity = (quantity * singleQuantity).toFixed(0);
isCalculating.value = false;
};
@@ -2569,7 +2594,6 @@
const quantity = parseFloat(productForm.value.quantity);
const unitPrice = parseFloat(productForm.value.taxInclusiveUnitPrice);
- const singleQuantity = parseInt(productForm.value.singleQuantity) || 1;
if (!quantity || quantity <= 0 || !unitPrice) {
return;
@@ -2577,8 +2601,8 @@
isCalculating.value = true;
- // 璁$畻鍚◣鎬讳环 = 鍗曚环 * 鏁伴噺 * 姣忎欢鏁伴噺
- productForm.value.taxInclusiveTotalPrice = (unitPrice * quantity * singleQuantity).toFixed(2);
+ // 璁$畻鍚◣鎬讳环 = 鍗曚环 * 鏁伴噺
+ productForm.value.taxInclusiveTotalPrice = (unitPrice * quantity).toFixed(2);
// 濡傛灉鏈夌◣鐜囷紝璁$畻涓嶅惈绋庢�讳环
if (productForm.value.taxRate) {
@@ -2592,35 +2616,21 @@
isCalculating.value = false;
};
- // 鏍规嵁姣忎欢鏁伴噺鍙樺寲璁$畻鎬讳环
+ // 鏍规嵁姣忎欢鏁伴噺鍙樺寲璁$畻鎬绘暟
const calculateFromSingleQuantity = () => {
- if (!productForm.value.taxRate) {
- proxy.$modal.msgWarning("璇峰厛閫夋嫨绋庣巼");
- return;
- }
if (isCalculating.value) return;
const quantity = parseFloat(productForm.value.quantity);
- const unitPrice = parseFloat(productForm.value.taxInclusiveUnitPrice);
- const singleQuantity = parseInt(productForm.value.singleQuantity) || 1;
- if (!quantity || quantity <= 0 || !unitPrice) {
+ if (!quantity || quantity <= 0) {
return;
}
isCalculating.value = true;
- // 璁$畻鍚◣鎬讳环 = 鍗曚环 * 鏁伴噺 * 姣忎欢鏁伴噺
- productForm.value.taxInclusiveTotalPrice = (unitPrice * quantity * singleQuantity).toFixed(2);
-
- // 濡傛灉鏈夌◣鐜囷紝璁$畻涓嶅惈绋庢�讳环
- if (productForm.value.taxRate) {
- productForm.value.taxExclusiveTotalPrice =
- proxy.calculateTaxExclusiveTotalPrice(
- productForm.value.taxInclusiveTotalPrice,
- productForm.value.taxRate
- );
- }
+ // 璁$畻鎬绘暟 = 姣忎欢鏁伴噺 * 鏁伴噺
+ const singleQuantity = parseInt(productForm.value.singleQuantity) || 1;
+ productForm.value.totalQuantity = (quantity * singleQuantity).toFixed(0);
isCalculating.value = false;
};
--
Gitblit v1.9.3