From 06218ac82891facefc6f36e57a1dfc6b3998540d Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期四, 29 一月 2026 10:54:17 +0800
Subject: [PATCH] Merge branch 'dev_New' of http://114.132.189.42:9002/r/product-inventory-management into dev_New

---
 src/views/salesManagement/receiptPayment/index.vue                           |    8 +++++++-
 src/views/personnelManagement/employeeRecord/components/NewOrEditFormDia.vue |    2 --
 src/views/productionManagement/productionDispatching/components/formDia.vue  |    2 +-
 src/views/procurementManagement/invoiceEntry/components/Modal.vue            |   42 +++++++++++++++++++++++++-----------------
 4 files changed, 33 insertions(+), 21 deletions(-)

diff --git a/src/views/personnelManagement/employeeRecord/components/NewOrEditFormDia.vue b/src/views/personnelManagement/employeeRecord/components/NewOrEditFormDia.vue
index 687f783..f65509a 100644
--- a/src/views/personnelManagement/employeeRecord/components/NewOrEditFormDia.vue
+++ b/src/views/personnelManagement/employeeRecord/components/NewOrEditFormDia.vue
@@ -179,7 +179,6 @@
     contractTerm: 0,
     contractStartTime: "",
     contractEndTime: "",
-    staffState: "",
     sysPostId: undefined,
     sysDeptId: undefined,
   },
@@ -268,7 +267,6 @@
   }
   proxy.$refs.formRef.validate(valid => {
     if (valid) {
-      form.value.staffState = 1
       if (operationType.value === "add") {
         createStaffOnJob(form.value).then(res => {
           proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
diff --git a/src/views/procurementManagement/invoiceEntry/components/Modal.vue b/src/views/procurementManagement/invoiceEntry/components/Modal.vue
index efd4a4e..b723175 100644
--- a/src/views/procurementManagement/invoiceEntry/components/Modal.vue
+++ b/src/views/procurementManagement/invoiceEntry/components/Modal.vue
@@ -411,13 +411,15 @@
 					item.futureTicketsAmount !== undefined ? item.futureTicketsAmount : (item.taxInclusiveTotalPrice || 0)
 				);
 
-				// 鏂板鏃讹細鏈寮�绁ㄩ粯璁や笉濉紙0锛夛紝閬垮厤涓�鎵撳紑灏辨妸鈥滄湭鏉ョエ鏁扳�濇墸鎴� 0
-				item.ticketsNum = 0;
-				item.ticketsAmount = 0;
-
-				// 椤甸潰灞曠ず鐨勨�滄湭鏉ョエ鏁�/鏈潵绁ㄩ噾棰濃�濋粯璁ゅ睍绀哄師濮嬫湭鏉ュ��
-				item.futureTickets = item.tempFutureTickets;
-				item.futureTicketsAmount = item.tempFutureTicketsAmount;
+				// 鏂板鏃讹細鏈寮�绁ㄦ暟榛樿 = 鏈潵绁ㄦ暟锛堜笖涓嶈兘澶т簬鏈潵绁ㄦ暟锛�
+				item.ticketsNum = Number(item.tempFutureTickets || 0);
+				// 鑱斿姩璁$畻鏈寮�绁ㄩ噾棰濄�佹湭鏉ョエ鏁般�佹湭鏉ョエ閲戦
+				const unitPrice = Number(item.taxInclusiveUnitPrice || 0);
+				item.ticketsAmount = Number((item.ticketsNum * unitPrice).toFixed(2));
+				item.futureTickets = Number((item.tempFutureTickets - item.ticketsNum).toFixed(2));
+				item.futureTicketsAmount = Number(
+					(item.tempFutureTicketsAmount - item.ticketsAmount).toFixed(2)
+				);
 			});
 			
 			form.productData = allProductData;
@@ -426,7 +428,7 @@
 			const totalAmount = allProductData.reduce((sum, item) => {
 				return sum + (Number(item.ticketsAmount) || 0);
 			}, 0);
-			form.invoiceAmount = totalAmount.toFixed(2);
+			form.invoiceAmount = Number(totalAmount.toFixed(2));
 			
 			// 瀛樺偍閫変腑鐨勫悎鍚屾暟鎹�
 			selectedContracts.value = selectedRows;
@@ -467,11 +469,11 @@
 		row.ticketsNum = Number(row.tempFutureTickets || 0);
 	}
 	// 璁$畻鏈鏉ョエ閲戦
-	row.ticketsAmount = (row.ticketsNum * row.taxInclusiveUnitPrice).toFixed(2)
+	row.ticketsAmount = Number((Number(row.ticketsNum) * Number(row.taxInclusiveUnitPrice || 0)).toFixed(2));
 	// 璁$畻鏈潵绁ㄦ暟
-	row.futureTickets = (row.tempFutureTickets - row.ticketsNum).toFixed(2)
+	row.futureTickets = Number((Number(row.tempFutureTickets || 0) - Number(row.ticketsNum || 0)).toFixed(2));
 	// 璁$畻鏈潵绁ㄩ噾棰�
-	row.futureTicketsAmount = (row.tempFutureTicketsAmount - row.ticketsAmount).toFixed(2)
+	row.futureTicketsAmount = Number((Number(row.tempFutureTicketsAmount || 0) - Number(row.ticketsAmount || 0)).toFixed(2));
 	calculateinvoiceAmount();
 };
 
@@ -494,12 +496,12 @@
 		proxy.$modal.msgWarning("鏈寮�绁ㄦ暟涓嶈兘澶т簬鏈潵绁ㄦ暟");
 		row.ticketsNum = Number(row.tempFutureTickets || 0);
 		// 閲嶆柊璁$畻鏈鏉ョエ閲戦
-		row.ticketsAmount = (row.ticketsNum * row.taxInclusiveUnitPrice).toFixed(2);
+		row.ticketsAmount = Number((Number(row.ticketsNum) * Number(row.taxInclusiveUnitPrice || 0)).toFixed(2));
 	}
 	// 璁$畻鏈潵绁ㄦ暟
-	row.futureTickets = (row.tempFutureTickets - row.ticketsNum).toFixed(2)
+	row.futureTickets = Number((Number(row.tempFutureTickets || 0) - Number(row.ticketsNum || 0)).toFixed(2));
 	// 璁$畻鏈潵绁ㄩ噾棰�
-	row.futureTicketsAmount = (row.tempFutureTicketsAmount - row.ticketsAmount).toFixed(2)
+	row.futureTicketsAmount = Number((Number(row.tempFutureTicketsAmount || 0) - Number(row.ticketsAmount || 0)).toFixed(2));
 	calculateinvoiceAmount();
 };
 
@@ -510,7 +512,7 @@
 			invoiceAmountTotal += Number(item.ticketsAmount);
 		}
 	});
-	form.invoiceAmount = invoiceAmountTotal.toFixed(2);
+	form.invoiceAmount = Number(invoiceAmountTotal.toFixed(2));
 };
 
 const open = async (type, selectedRows) => {
@@ -518,9 +520,15 @@
 	
 	// 濡傛灉鏄壒閲忔搷浣滐紝璁剧疆鏍囬
 	if (Array.isArray(selectedRows) && selectedRows.length > 1) {
-		modalOptions.title = `鎵归噺鏂板 (${selectedRows.length}鏉�)`;
+		modalOptions.value = {
+			...(modalOptions.value || {}),
+			title: `鎵归噺鏂板 (${selectedRows.length}鏉�)`,
+		};
 	} else {
-		modalOptions.title = type === "add" ? "鏂板" : "缂栬緫";
+		modalOptions.value = {
+			...(modalOptions.value || {}),
+			title: type === "add" ? "鏂板" : "缂栬緫",
+		};
 	}
 	
 	// 濡傛灉鏄崟涓搷浣滐紝鑾峰彇id
diff --git a/src/views/productionManagement/productionDispatching/components/formDia.vue b/src/views/productionManagement/productionDispatching/components/formDia.vue
index 971bc6e..a514d9a 100644
--- a/src/views/productionManagement/productionDispatching/components/formDia.vue
+++ b/src/views/productionManagement/productionDispatching/components/formDia.vue
@@ -111,7 +111,7 @@
 
 <script setup>
 import {ref} from "vue";
-import {getStaffJoinInfo, staffJoinAdd, staffJoinUpdate} from "@/api/personnelManagement/onboarding.js";
+// import {getStaffJoinInfo, staffJoinAdd, staffJoinUpdate} from "@/api/personnelManagement/onboarding.js";
 import {userListNoPageByTenantId} from "@/api/system/user.js";
 import {productionDispatch} from "@/api/productionManagement/productionOrder.js";
 import useUserStore from "@/store/modules/user.js";
diff --git a/src/views/salesManagement/receiptPayment/index.vue b/src/views/salesManagement/receiptPayment/index.vue
index a2a0b2f..7b03d7d 100644
--- a/src/views/salesManagement/receiptPayment/index.vue
+++ b/src/views/salesManagement/receiptPayment/index.vue
@@ -421,7 +421,11 @@
     proxy.$modal.msgError("璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�");
     return;
   }
-  const validRows = selectedRows.value.filter((item) => item.noReceiptAmount !== 0);
+  // 浠呭厑璁糕�滃緟鍥炴閲戦 > 0鈥濈殑璁板綍杩涘叆鏂板鍥炴寮圭獥锛屽苟杩囨护鎺夊彲鑳芥贩鍏ョ殑绌哄璞�
+  const validRows = selectedRows.value.filter((item) => {
+    if (!item || !item.id) return false;
+    return Number(item.pendingInvoiceTotal ?? 0) > 0;
+  });
   if (validRows.length === 0) {
     proxy.$modal.msgWarning("鎵�閫夎褰曞潎鏃犻渶鍥炴");
     return;
@@ -485,6 +489,8 @@
 const closeDia = () => {
   forms.value = [];
   dialogFormVisible.value = false;
+  // 閬垮厤浜屾鎵撳紑寮圭獥鏃朵粛鎼哄甫涓婁竴娆$殑閫夋嫨瀵艰嚧鈥滃鍑轰竴琛�/鑴忔暟鎹��
+  selectedRows.value = [];
 };
 
 // 鍒犻櫎鍥炴璁板綍

--
Gitblit v1.9.3