From 306660c86f86cc92a725db3cc1c2f324cf6eaf96 Mon Sep 17 00:00:00 2001
From: buhuazhen <hua100783@gmail.com>
Date: 星期五, 29 五月 2026 13:54:11 +0800
Subject: [PATCH] fix:所有采购合同号改为采购单号。销售合同号改为销售单号。

---
 src/views/salesManagement/salesLedger/index.vue |  198 ++++++++++++++++++++++++------------------------
 1 files changed, 99 insertions(+), 99 deletions(-)

diff --git a/src/views/salesManagement/salesLedger/index.vue b/src/views/salesManagement/salesLedger/index.vue
index 9972416..c9a3b47 100644
--- a/src/views/salesManagement/salesLedger/index.vue
+++ b/src/views/salesManagement/salesLedger/index.vue
@@ -6,7 +6,7 @@
           <el-input v-model="searchForm.customerName" placeholder="璇疯緭鍏�" clearable prefix-icon="Search"
             @change="handleQuery" />
         </el-form-item>
-        <el-form-item label="閿�鍞悎鍚屽彿锛�">
+        <el-form-item label="閿�鍞崟鍙凤細">
           <el-input v-model="searchForm.salesContractNo" placeholder="璇疯緭鍏�" clearable prefix-icon="Search"
             @change="handleQuery" />
         </el-form-item>
@@ -95,8 +95,8 @@
             <!--鎿嶄綔-->
               <el-table-column Width="60px" label="鎿嶄綔" align="center">
                 <template #default="scope">
-                  <el-button 
-                    link 
+                  <el-button
+                    link
                     type="primary"
                     :disabled="!canShip(scope.row)"
                     @click="openDeliveryForm(scope.row)">
@@ -108,7 +108,7 @@
           </template>
         </el-table-column>
         <el-table-column align="center" label="搴忓彿" type="index" width="60" />
-        <el-table-column label="閿�鍞悎鍚屽彿" prop="salesContractNo" width="180" show-overflow-tooltip />
+        <el-table-column label="閿�鍞崟鍙�" prop="salesContractNo" width="180" show-overflow-tooltip />
         <el-table-column label="瀹㈡埛鍚嶇О" prop="customerName" width="300" show-overflow-tooltip />
         <el-table-column label="涓氬姟鍛�" prop="salesman" width="100" show-overflow-tooltip />
         <el-table-column label="椤圭洰鍚嶇О" prop="projectName" width="180" show-overflow-tooltip />
@@ -143,7 +143,7 @@
 				</el-row>
         <el-row :gutter="30">
           <el-col :span="12">
-            <el-form-item label="閿�鍞悎鍚屽彿锛�" prop="salesContractNo">
+            <el-form-item label="閿�鍞崟鍙凤細" prop="salesContractNo">
               <el-input v-model="form.salesContractNo" placeholder="鑷姩鐢熸垚" clearable disabled />
             </el-form-item>
           </el-col>
@@ -234,7 +234,7 @@
 					<el-table-column label="涓嶅惈绋庢�讳环(鍏�)" prop="taxExclusiveTotalPrice" :formatter="formattedNumber" />
 					<el-table-column fixed="right" label="鎿嶄綔" min-width="60" align="center" v-if="operationType !== 'view'">
 						<template #default="scope">
-							<el-button link type="primary" size="small" 
+							<el-button link type="primary" size="small"
 								:disabled="isProductShipped(scope.row)"
 								@click="openProductForm('edit', scope.row,scope.$index)">缂栬緫</el-button>
 						</template>
@@ -292,7 +292,7 @@
 				<el-button type="primary" @click="fetchQuotationList">鎼滅储</el-button>
 				<el-button @click="resetQuotationSearch">閲嶇疆</el-button>
 			</div>
-			
+
 			<el-table
 				:data="quotationList"
 				border
@@ -317,7 +317,7 @@
 					</template>
 				</el-table-column>
 			</el-table>
-			
+
 			<pagination
 				v-show="quotationPage.total > 0"
 				:total="quotationPage.total"
@@ -326,7 +326,7 @@
 				:limit="quotationPage.size"
 				@pagination="quotationPaginationChange"
 			/>
-			
+
 			<template #footer>
 				<el-button @click="quotationDialogVisible = false">鍏抽棴</el-button>
 			</template>
@@ -482,7 +482,7 @@
 							<div class="header">
 								<div class="document-title">闆跺敭鍙戣揣鍗�</div>
 							</div>
-							
+
 							<div class="info-section">
 								<div class="info-row">
 									<div>
@@ -503,7 +503,7 @@
 									<span class="value">{{ item.salesContractNo }}</span>
 								</div>
 							</div>
-							
+
 							<div class="table-section">
 								<table class="product-table">
 									<thead>
@@ -541,7 +541,7 @@
 									</tfoot>
 								</table>
 							</div>
-							
+
 							<div class="footer-section">
 								<div class="footer-row">
 									<div class="footer-item">
@@ -644,15 +644,15 @@
 				<el-row :gutter="30">
 					<el-col :span="24">
 						<el-form-item label="鍙戣揣鍥剧墖锛�">
-							<el-upload 
-								v-model:file-list="deliveryFileList" 
-								:action="upload.url" 
-								multiple 
-								ref="deliveryFileUpload" 
+							<el-upload
+								v-model:file-list="deliveryFileList"
+								:action="upload.url"
+								multiple
+								ref="deliveryFileUpload"
 								auto-upload
-								:headers="upload.headers" 
+								:headers="upload.headers"
 								:data="{ type: 9 }"
-								:on-success="handleDeliveryUploadSuccess" 
+								:on-success="handleDeliveryUploadSuccess"
 								:on-remove="handleDeliveryRemove"
 								list-type="picture-card"
 								:limit="9"
@@ -1067,7 +1067,7 @@
 		if (children && children.length > 0) {
 			newItem.children = convertIdToValue(children);
 		}
-		
+
 		return newItem;
 	});
 }
@@ -1236,10 +1236,10 @@
 const applyQuotation = (row) => {
 	if (!row) return;
 	selectedQuotation.value = row;
-	
+
 	// 涓氬姟鍛�
 	form.value.salesman = (row.salesperson || "").trim();
-	
+
 	// 瀹㈡埛鍚嶇О -> customerId
 	const qCustomerName = String(row.customer || "").trim();
 	const customer = (customerOption.value || []).find((c) => {
@@ -1252,7 +1252,7 @@
 		// 濡傛灉鎵句笉鍒帮紝淇濈暀鍘熷�硷紙鍏佽鐢ㄦ埛鎵嬪姩閫夋嫨/涓嶆墦鏂凡鏈夎緭鍏ワ級
 		form.value.customerId = form.value.customerId || "";
 	}
-	
+
 	// 浜у搧淇℃伅鏄犲皠锛氭姤浠� products -> 鍙拌处 productData
 	const products = Array.isArray(row.products) ? row.products : [];
 	productData.value = products.map((p) => {
@@ -1274,7 +1274,7 @@
 			invoiceType: "澧炴櫘绁�",
 		};
 	});
-	
+
 	quotationDialogVisible.value = false;
 };
 function changs(val) {
@@ -1356,7 +1356,7 @@
 		proxy.$modal.msgWarning("宸插彂璐ф垨瀹℃牳閫氳繃鐨勪骇鍝佷笉鑳界紪杈�");
 		return;
 	}
-	
+
 	productOperationType.value = type;
 	productForm.value = {};
 	proxy.resetForm("productFormRef");
@@ -1423,14 +1423,14 @@
 		proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
 		return;
 	}
-	
+
 	// 妫�鏌ユ槸鍚︽湁宸插彂璐ф垨瀹℃牳閫氳繃鐨勪骇鍝�
 	const shippedProducts = productSelectedRows.value.filter(row => isProductShipped(row));
 	if (shippedProducts.length > 0) {
 		proxy.$modal.msgWarning("宸插彂璐ф垨瀹℃牳閫氳繃鐨勪骇鍝佷笉鑳藉垹闄�");
 		return;
 	}
-	
+
 	if (operationType.value === "add") {
 		productSelectedRows.value.forEach((selectedRow) => {
 			const index = productData.value.findIndex(
@@ -1576,25 +1576,25 @@
 		proxy.$modal.msgWarning("璇烽�夋嫨瑕佹墦鍗扮殑鏁版嵁");
 		return;
 	}
-	
+
 	// 鏄剧ず鍔犺浇鐘舵��
 	proxy.$modal.loading("姝e湪鑾峰彇浜у搧鏁版嵁锛岃绋嶅��...");
-	
+
 	try {
 		// 涓烘瘡涓�変腑鐨勯攢鍞彴璐﹁褰曟煡璇㈠搴旂殑浜у搧鏁版嵁
 		const printDataWithProducts = [];
-		
+
 		for (const row of selectedRows.value) {
 			try {
 				// 璋冪敤productList鎺ュ彛鏌ヨ浜у搧鏁版嵁
 				const productRes = await productList({ salesLedgerId: row.id, type: 1 });
-				
+
 				// 灏嗕骇鍝佹暟鎹暣鍚堝埌閿�鍞彴璐﹁褰曚腑
 				const rowWithProducts = {
 					...row,
 					products: productRes.data || []
 				};
-				
+
 				printDataWithProducts.push(rowWithProducts);
 			} catch (error) {
 				console.error(`鑾峰彇閿�鍞彴璐� ${row.id} 鐨勪骇鍝佹暟鎹け璐�:`, error);
@@ -1605,11 +1605,11 @@
 				});
 			}
 		}
-		
+
 		printData.value = printDataWithProducts;
 		console.log('鎵撳嵃鏁版嵁锛堝寘鍚骇鍝侊級:', printData.value);
 		printPreviewVisible.value = true;
-		
+
 	} catch (error) {
 		console.error('鑾峰彇浜у搧鏁版嵁澶辫触:', error);
 		proxy.$modal.msgError("鑾峰彇浜у搧鏁版嵁澶辫触锛岃閲嶈瘯");
@@ -1621,10 +1621,10 @@
 const executePrint = () => {
 	console.log('寮�濮嬫墽琛屾墦鍗帮紝鏁版嵁鏉℃暟:', printData.value.length);
 	console.log('鎵撳嵃鏁版嵁:', printData.value);
-	
+
 	// 鍒涘缓涓�涓柊鐨勬墦鍗扮獥鍙�
 	const printWindow = window.open('', '_blank', 'width=800,height=600');
-	
+
 	// 鏋勫缓鎵撳嵃鍐呭
 	let printContent = `
     <!DOCTYPE html>
@@ -1760,7 +1760,7 @@
     </head>
     <body>
   `;
-	
+
 	// 涓烘瘡鏉℃暟鎹敓鎴愭墦鍗伴〉闈�
 	printData.value.forEach((item, index) => {
 		printContent += `
@@ -1769,7 +1769,7 @@
           <div class="header">
             <div class="document-title">闆跺敭鍙戣揣鍗�</div>
           </div>
-          
+
           <div class="info-section">
             <div class="info-row">
               <div>
@@ -1857,16 +1857,16 @@
       </div>
     `;
 	});
-	
+
 	printContent += `
     </body>
     </html>
   `;
-	
+
 	// 鍐欏叆鍐呭鍒版柊绐楀彛
 	printWindow.document.write(printContent);
 	printWindow.document.close();
-	
+
 	// 绛夊緟鍐呭鍔犺浇瀹屾垚鍚庢墦鍗�
 	printWindow.onload = () => {
 		setTimeout(() => {
@@ -1957,19 +1957,19 @@
 // 鏍规嵁鍚◣鎬讳环璁$畻鍚◣鍗曚环鍜屾暟閲�
 const calculateFromTotalPrice = () => {
 	if (isCalculating.value) return;
-	
+
 	const totalPrice = parseFloat(productForm.value.taxInclusiveTotalPrice);
 	const quantity = parseFloat(productForm.value.quantity);
-	
+
 	if (!totalPrice || !quantity || quantity <= 0) {
 		return;
 	}
-	
+
 	isCalculating.value = true;
-	
+
 	// 璁$畻鍚◣鍗曚环 = 鍚◣鎬讳环 / 鏁伴噺
 	productForm.value.taxInclusiveUnitPrice = (totalPrice / quantity).toFixed(2);
-	
+
 	// 濡傛灉鏈夌◣鐜囷紝璁$畻涓嶅惈绋庢�讳环
 	if (productForm.value.taxRate) {
 		productForm.value.taxExclusiveTotalPrice =
@@ -1978,7 +1978,7 @@
 				productForm.value.taxRate
 			);
 	}
-	
+
 	isCalculating.value = false;
 };
 
@@ -1989,25 +1989,25 @@
 		return;
 	}
 	if (isCalculating.value) return;
-	
+
 	const exclusiveTotalPrice = parseFloat(productForm.value.taxExclusiveTotalPrice);
 	const quantity = parseFloat(productForm.value.quantity);
 	const taxRate = parseFloat(productForm.value.taxRate);
-	
+
 	if (!exclusiveTotalPrice || !quantity || quantity <= 0 || !taxRate) {
 		return;
 	}
-	
+
 	isCalculating.value = true;
-	
+
 	// 鍏堣绠楀惈绋庢�讳环 = 涓嶅惈绋庢�讳环 / (1 - 绋庣巼/100)
 	const taxRateDecimal = taxRate / 100;
 	const inclusiveTotalPrice = exclusiveTotalPrice / (1 - taxRateDecimal);
 	productForm.value.taxInclusiveTotalPrice = inclusiveTotalPrice.toFixed(2);
-	
+
 	// 璁$畻鍚◣鍗曚环 = 鍚◣鎬讳环 / 鏁伴噺
 	productForm.value.taxInclusiveUnitPrice = (inclusiveTotalPrice / quantity).toFixed(2);
-	
+
 	isCalculating.value = false;
 };
 
@@ -2018,19 +2018,19 @@
 		return;
 	}
 	if (isCalculating.value) return;
-	
+
 	const quantity = parseFloat(productForm.value.quantity);
 	const unitPrice = parseFloat(productForm.value.taxInclusiveUnitPrice);
-	
+
 	if (!quantity || quantity <= 0 || !unitPrice) {
 		return;
 	}
-	
+
 	isCalculating.value = true;
-	
+
 	// 璁$畻鍚◣鎬讳环
 	productForm.value.taxInclusiveTotalPrice = (unitPrice * quantity).toFixed(2);
-	
+
 	// 濡傛灉鏈夌◣鐜囷紝璁$畻涓嶅惈绋庢�讳环
 	if (productForm.value.taxRate) {
 		productForm.value.taxExclusiveTotalPrice =
@@ -2039,7 +2039,7 @@
 				productForm.value.taxRate
 			);
 	}
-	
+
 	isCalculating.value = false;
 };
 
@@ -2050,19 +2050,19 @@
 		return;
 	}
 	if (isCalculating.value) return;
-	
+
 	const quantity = parseFloat(productForm.value.quantity);
 	const unitPrice = parseFloat(productForm.value.taxInclusiveUnitPrice);
-	
+
 	if (!quantity || quantity <= 0 || !unitPrice) {
 		return;
 	}
-	
+
 	isCalculating.value = true;
-	
+
 	// 璁$畻鍚◣鎬讳环
 	productForm.value.taxInclusiveTotalPrice = (unitPrice * quantity).toFixed(2);
-	
+
 	// 濡傛灉鏈夌◣鐜囷紝璁$畻涓嶅惈绋庢�讳环
 	if (productForm.value.taxRate) {
 		productForm.value.taxExclusiveTotalPrice =
@@ -2071,7 +2071,7 @@
 				productForm.value.taxRate
 			);
 	}
-	
+
 	isCalculating.value = false;
 };
 
@@ -2082,23 +2082,23 @@
 		return;
 	}
 	if (isCalculating.value) return;
-	
+
 	const inclusiveTotalPrice = parseFloat(productForm.value.taxInclusiveTotalPrice);
 	const taxRate = parseFloat(productForm.value.taxRate);
-	
+
 	if (!inclusiveTotalPrice || !taxRate) {
 		return;
 	}
-	
+
 	isCalculating.value = true;
-	
+
 	// 璁$畻涓嶅惈绋庢�讳环
 	productForm.value.taxExclusiveTotalPrice =
 		proxy.calculateTaxExclusiveTotalPrice(
 			inclusiveTotalPrice,
 			taxRate
 		);
-	
+
 	isCalculating.value = false;
 };
 /**
@@ -2110,15 +2110,15 @@
 	if (row.shippingDate || row.shippingCarNumber) {
 		return '宸插彂璐�';
 	}
-	
+
 	// 鑾峰彇鍙戣揣鐘舵�佸瓧娈�
 	const status = row.shippingStatus;
-	
+
 	// 濡傛灉鐘舵�佷负绌烘垨鏈畾涔夛紝榛樿涓�"寰呭彂璐�"
 	if (status === null || status === undefined || status === '') {
 		return '寰呭彂璐�';
 	}
-	
+
 	// 鐘舵�佹槸瀛楃涓�
 	const statusStr = String(status).trim();
 	const statusTextMap = {
@@ -2141,15 +2141,15 @@
 	if (row.shippingDate || row.shippingCarNumber) {
 		return 'success';
 	}
-	
+
 	// 鑾峰彇鍙戣揣鐘舵�佸瓧娈�
 	const status = row.shippingStatus;
-	
+
 	// 濡傛灉鐘舵�佷负绌烘垨鏈畾涔夛紝榛樿涓虹伆鑹诧紙寰呭彂璐э級
 	if (status === null || status === undefined || status === '') {
 		return 'info';
 	}
-	
+
 	// 鐘舵�佹槸瀛楃涓�
 	const statusStr = String(status).trim();
 	const typeTextMap = {
@@ -2173,15 +2173,15 @@
 	if (row.approveStatus !== 1) {
 		return false;
 	}
-	
+
 	// 鑾峰彇鍙戣揣鐘舵��
 	const shippingStatus = row.shippingStatus;
-	
+
 	// 濡傛灉宸插彂璐э紙鏈夊彂璐ф棩鏈熸垨杞︾墝鍙凤級锛屼笉鑳藉啀娆″彂璐�
 	if (row.shippingDate || row.shippingCarNumber) {
 		return false;
 	}
-	
+
 	// 鍙戣揣鐘舵�佸繀椤绘槸"寰呭彂璐�"鎴�"瀹℃牳鎷掔粷"
 	const statusStr = shippingStatus ? String(shippingStatus).trim() : '';
 	return statusStr === '寰呭彂璐�' || statusStr === '瀹℃牳鎷掔粷';
@@ -2209,7 +2209,7 @@
 		proxy.$modal.msgWarning("鍙湁鍦ㄤ骇鍝佺姸鎬佹槸鍏呰冻锛屽彂璐х姸鎬佹槸寰呭彂璐ф垨瀹℃牳鎷掔粷鐨勬椂鍊欐墠鍙互鍙戣揣");
 		return;
 	}
-	
+
 	currentDeliveryRow.value = row;
   deliveryForm.value = {
     type: "璐ц溅",
@@ -2254,13 +2254,13 @@
       // 淇濆瓨褰撳墠灞曞紑鐨勮ID锛屼互渚垮彂璐у悗閲嶆柊鍔犺浇瀛愯〃鏍兼暟鎹�
       const currentExpandedKeys = [...expandedRowKeys.value];
       const salesLedgerId = currentDeliveryRow.value.salesLedgerId;
-      
+
       // 鑾峰彇涓婁紶鍥剧墖鐨勪复鏃禝D
       let tempFileIds = [];
       if (deliveryFileList.value !== null && deliveryFileList.value.length > 0) {
         tempFileIds = deliveryFileList.value.map((item) => item.tempId);
       }
-      
+
       addShippingInfo({
         salesLedgerId: salesLedgerId,
         salesLedgerProductId: currentDeliveryRow.value.id,
@@ -2363,12 +2363,12 @@
 		padding: 15px;
 		border-bottom: 1px solid #e4e7ed;
 		text-align: center;
-		
+
 		.el-button {
 			margin: 0 10px;
 		}
 	}
-	
+
 	.print-preview-content {
 		padding: 20px;
 		background-color: #f5f5f5;
@@ -2400,13 +2400,13 @@
 .header {
 	text-align: center;
 	margin-bottom: 8px;
-	
+
 	.company-name {
 		font-size: 18px;
 		font-weight: bold;
 		margin-bottom: 4px;
 	}
-	
+
 	.document-title {
 		font-size: 16px;
 		font-weight: bold;
@@ -2418,16 +2418,16 @@
 	display: flex;
 	justify-content: space-between;
 	align-items: center;
-	
+
 	.info-row {
 		line-height: 20px;
-		
+
 		.label {
 			font-weight: bold;
 			width: 60px;
 			font-size: 14px;
 		}
-		
+
 		.value {
 			margin-right: 20px;
 			min-width: 80px;
@@ -2439,12 +2439,12 @@
 .table-section {
 	margin-bottom: 4px;
 	flex: 1;
-	
+
 	.product-table {
 		width: 100%;
 		border-collapse: collapse;
 		border: 1px solid #000;
-		
+
 		th, td {
 			border: 1px solid #000;
 			padding: 6px;
@@ -2452,16 +2452,16 @@
 			font-size: 14px;
 			line-height: 1.4;
 		}
-		
+
 		th {
 			font-weight: bold;
 		}
-		
+
 		.total-label {
 			text-align: right;
 			font-weight: bold;
 		}
-		
+
 		.total-value {
 			font-weight: bold;
 		}
@@ -2474,22 +2474,22 @@
 		margin-bottom: 3px;
 		line-height: 20px;
 		justify-content: space-between;
-		
+
 		.footer-item {
 			display: flex;
 			margin-right: 20px;
-			
+
 			.label {
 				font-weight: bold;
 				width: 80px;
 				font-size: 14px;
 			}
-			
+
 			.value {
 				min-width: 80px;
 				font-size: 14px;
 			}
-			
+
 			&.address-item {
 				.address-value {
 					min-width: 200px;
@@ -2503,7 +2503,7 @@
 	.app-container {
 		display: none;
 	}
-	
+
 	.print-page {
 		box-shadow: none;
 		margin: 0;

--
Gitblit v1.9.3