From 394a5fc7f6d3987be8af2e28e84aa94dcf96e596 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期三, 19 八月 2026 10:28:52 +0800
Subject: [PATCH] fix: 移除发货小数限制
---
src/views/salesManagement/salesLedger/index.vue | 89 +++++++++++++++++++++++++++-----------------
1 files changed, 55 insertions(+), 34 deletions(-)
diff --git a/src/views/salesManagement/salesLedger/index.vue b/src/views/salesManagement/salesLedger/index.vue
index 23c7438..fbb0da6 100644
--- a/src/views/salesManagement/salesLedger/index.vue
+++ b/src/views/salesManagement/salesLedger/index.vue
@@ -24,6 +24,18 @@
prefix-icon="Search"
@change="handleQuery" />
</el-form-item>
+ <el-form-item label="鍙戣揣鐘舵�侊細">
+ <el-select v-model="searchForm.shippingStatus"
+ placeholder="璇烽�夋嫨"
+ clearable
+ style="width: 160px"
+ @change="handleQuery">
+ <el-option label="鏈彂璐�"
+ value="鏈彂璐�" />
+ <el-option label="宸插彂璐�"
+ value="宸插彂璐�" />
+ </el-select>
+ </el-form-item>
<el-form-item label="褰曞叆鏃ユ湡锛�">
<el-date-picker v-model="searchForm.entryDate"
value-format="YYYY-MM-DD"
@@ -129,8 +141,7 @@
show-overflow-tooltip />
<el-table-column label="鍙戣揣杞︾墝"
minWidth="100px"
- align="center"
- v-if="false">
+ align="center">
<template #default="scope">
<div>
<el-tag type="success"
@@ -249,8 +260,8 @@
</el-button>
<el-button link
type="primary"
- @click="downloadOrder(scope.row.id)">涓嬭浇
- </el-button>
+ @click="openFileDialog(scope.row)">闄勪欢
+ </el-button> <!--downloadOrder(scope.row.id) 涓嬭浇-->
</template>
</el-table-column>
</el-table>
@@ -330,7 +341,7 @@
:label="item.customerName"
:value="item.id">
{{
- item.customerName + "鈥斺��" + item.taxpayerIdentificationNumber
+ item.taxpayerIdentificationNumber ? item.customerName + "鈥斺��" + item.taxpayerIdentificationNumber : item.customerName
}}
</el-option>
</el-select>
@@ -714,12 +725,12 @@
<el-form-item label="鏄惁鐢熶骇锛�"
prop="isProduction">
<div style="display: flex; align-items: center; width: 100%;">
- <el-radio-group v-model="productForm.isProduction">
- <el-radio label="鏄�"
- :value="true" />
- <el-radio label="鍚�"
- :value="false" />
- </el-radio-group>
+ <el-radio-group v-model="productForm.isProduction">
+ <el-radio label="鏄�"
+ :value="true" />
+ <el-radio label="鍚�"
+ :value="false" />
+ </el-radio-group>
<div
v-if="currentStock !== null"
:style="{
@@ -823,7 +834,7 @@
<span class="label">鍙戣揣鏃ユ湡锛�</span>
<span class="value">{{ formatDate(item.createTime) }}</span>
</div>
- <div v-if="false">
+ <div>
<span class="label">鍙戣揣杞︾墝鍙凤細</span>
<span class="value">{{ item.shippingCarNumber }}</span>
</div>
@@ -911,7 +922,7 @@
<!-- 鍙戣揣寮规 -->
<el-dialog v-model="deliveryFormVisible"
title="鍙戣揣淇℃伅"
- width="40%"
+ width="960px"
@close="closeDeliveryDia">
<el-form :model="deliveryForm"
label-width="120px"
@@ -926,11 +937,10 @@
placeholder="璇烽�夋嫨鍙戣揣绫诲瀷"
style="width: 100%"
@change="handleDeliveryTypeChange">
+ <el-option label="璐ц溅"
+ value="璐ц溅" />
<el-option label="蹇��"
value="蹇��" />
- <el-option v-if="false"
- label="璐ц溅"
- value="璐ц溅" />
</el-select>
</el-form-item>
</el-col>
@@ -952,7 +962,7 @@
</el-form-item>
</el-col>
<el-col :span="24"
- v-else-if="false">
+ v-else>
<el-form-item label="蹇�掑叕鍙革細"
prop="expressCompany">
<el-input v-model="deliveryForm.expressCompany"
@@ -962,7 +972,7 @@
</el-col>
</el-row>
<el-row :gutter="30"
- >
+ v-if="deliveryForm.type === '蹇��'">
<el-col :span="24">
<el-form-item label="蹇�掑崟鍙凤細"
prop="expressNumber">
@@ -992,6 +1002,13 @@
<el-table-column label="鎵瑰彿"
prop="batchNo"
min-width="180" />
+ <el-table-column label="閿�鍞鍗曞彿"
+ min-width="180"
+ show-overflow-tooltip>
+ <template #default="scope">
+ {{ formatDeliveryBatchSalesOrderNo(scope.row) }}
+ </template>
+ </el-table-column>
<el-table-column label="浜у搧澶х被"
prop="productName"
min-width="100" />
@@ -1015,8 +1032,6 @@
<el-input-number v-model="scope.row.deliveryQuantity"
:min="0"
:max="getDeliveryBatchDeliveryMax(scope.row)"
- :precision="2"
- :step="0.01"
controls-position="right"
@change="handleDeliveryBatchQuantityChange(scope.row)"
style="width: 100%;" />
@@ -1113,6 +1128,8 @@
searchForm: {
customerName: "", // 瀹㈡埛鍚嶇О
salesContractNo: "", // 閿�鍞悎鍚岀紪鍙�
+ projectName: "", // 椤圭洰鍚嶇О
+ shippingStatus: "", // 鍙戣揣鐘舵�侊紙鏈彂璐�/宸插彂璐э級
entryDate: null, // 褰曞叆鏃ユ湡
entryDateStart: undefined,
entryDateEnd: undefined,
@@ -1216,6 +1233,8 @@
item?.stockQuantity;
return quantity ?? 0;
};
+ const formatDeliveryBatchSalesOrderNo = item =>
+ item?.salesContractNo || "--";
const currentStock = ref(null);
const fetchCurrentStock = async (productModelId) => {
if (!productModelId) {
@@ -1223,7 +1242,7 @@
return;
}
try {
- const res = await getStockInventoryByModelId(productModelId);
+ const res = await getStockInventoryByModelId(productModelId, currentId.value);
const rawList = Array.isArray(res?.data)
? res.data
: res?.data?.records || res?.data?.rows || [];
@@ -1285,9 +1304,9 @@
item => Number(item?.deliveryQuantity || 0) > 0
);
};
- const getDeliveryBatchNoList = async productModelId => {
+ const getDeliveryBatchNoList = async (productModelId, salesLedgerId) => {
if (!productModelId) return [];
- const res = await getStockInventoryByModelId(productModelId);
+ const res = await getStockInventoryByModelId(productModelId, salesLedgerId);
const rawList = Array.isArray(res?.data)
? res.data
: res?.data?.records || res?.data?.rows || [];
@@ -1322,7 +1341,7 @@
shippingCarNumber: "",
expressCompany: "",
expressNumber: "",
- type: "蹇��", // 璐ц溅, 蹇��
+ type: "璐ц溅", // 璐ц溅, 蹇��
},
deliveryRules: {
shippingCarNumber: [
@@ -1503,6 +1522,7 @@
productForm.value.productModelId = p.id;
productForm.value.specificationModel = p.model || '';
productForm.value.unit = p.unit || '';
+ fetchCurrentStock(productForm.value.productModelId);
showProductSelectDialog.value = false;
};
// 鑾峰彇tree瀛愭暟鎹�
@@ -1621,9 +1641,9 @@
param,
["contractAmount", "taxInclusiveTotalPrice", "taxExclusiveTotalPrice"],
buildAmountSummaryFormat([
- "contractAmount",
- "taxInclusiveTotalPrice",
- "taxExclusiveTotalPrice",
+ "contractAmount",
+ "taxInclusiveTotalPrice",
+ "taxExclusiveTotalPrice",
])
);
};
@@ -1650,9 +1670,9 @@
return proxy.summarizeTable(
param,
[
- "taxInclusiveUnitPrice",
- "taxInclusiveTotalPrice",
- "taxExclusiveTotalPrice",
+ "taxInclusiveUnitPrice",
+ "taxInclusiveTotalPrice",
+ "taxExclusiveTotalPrice",
],
buildAmountSummaryFormat([
"taxInclusiveUnitPrice",
@@ -2103,7 +2123,7 @@
const data = res.data || res;
companyName = data.companyName || companyName;
orders.push(data.ledger);
- }
+ }
printSalesMulti(companyName, orders);
} catch (e) {
console.error('鎵撳嵃澶辫触:', e);
@@ -2477,13 +2497,14 @@
currentDeliveryRow.value = row;
const batchNoList = await getDeliveryBatchNoList(
- row.productModelId || row.modelId
+ row.productModelId || row.modelId,
+ row.salesLedgerId
);
deliveryForm.value = {
shippingCarNumber: "",
expressCompany: "",
expressNumber: "",
- type: "蹇��",
+ type: "璐ц溅",
batchNo: [],
batchNoList,
};
@@ -2808,4 +2829,4 @@
page-break-after: avoid;
}
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3