From c5e1e3510e255190c97efe9c05ce6665a445ab82 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 30 九月 2025 10:52:04 +0800
Subject: [PATCH] 临期相关页面

---
 src/views/customerService/expiryAfterSales/index.vue |  122 ++++++++--------------------------------
 1 files changed, 25 insertions(+), 97 deletions(-)

diff --git a/src/views/customerService/expiryAfterSales/index.vue b/src/views/customerService/expiryAfterSales/index.vue
index b958acb..df44504 100644
--- a/src/views/customerService/expiryAfterSales/index.vue
+++ b/src/views/customerService/expiryAfterSales/index.vue
@@ -190,97 +190,21 @@
 // 鑾峰彇鍒楄〃鏁版嵁
 const getList = () => {
 	tableLoading.value = true;
+	// 鍙栨秷娉ㄩ噴骞朵娇鐢ㄧ湡瀹濧PI
+	// expiryAfterSalesListPage({
+	// 	...searchForm.value,
+	// 	current: page.value.current,
+	// 	size: page.value.size
+	// }).then(res => {
+	// 	tableData.value = res.data.records;
+	// 	page.value.total = res.data.total;
+	// 	tableLoading.value = false;
+	// });
 	
-	// 妯℃嫙寮傛璇锋眰
-	setTimeout(() => {
-		// 鍋囨暟鎹�
-		const mockData = [
-			{
-				id: 1,
-				productName: "缁寸敓绱燙鐗�",
-				batchNumber: "VC20240801",
-				expiryDate: "2024-12-15",
-				stockQuantity: 150,
-				customerName: "寮犱笁鑽簵",
-				problemDesc: "涓磋繎淇濊川鏈熼渶瑕佸鐞�",
-				status: 1,
-				handlerName: "",
-				handleDate: "",
-			},
-			{
-				id: 2,
-				productName: "闃胯帿瑗挎灄鑳跺泭",
-				batchNumber: "AM20240715",
-				expiryDate: "2024-11-20",
-				stockQuantity: 80,
-				customerName: "鏉庡洓鍖婚櫌",
-				problemDesc: "搴撳瓨绉帇锛屼复鏈熷鐞�",
-				status: 2,
-				handlerName: "鐜嬩簲",
-				handleDate: "2024-09-25",
-			},
-			{
-				id: 3,
-				productName: "鎰熷啋鐏甸绮�",
-				batchNumber: "GM20240620",
-				expiryDate: "2024-10-30",
-				stockQuantity: 200,
-				customerName: "璧靛叚璇婃墍",
-				problemDesc: "瀛h妭鎬ц嵂鍝侊紝闇�瑕佹竻鐞嗗簱瀛�",
-				status: 1,
-				handlerName: "",
-				handleDate: "",
-			},
-			{
-				id: 4,
-				productName: "澶嶅悎缁寸敓绱犵墖",
-				batchNumber: "FH20240510",
-				expiryDate: "2024-12-01",
-				stockQuantity: 300,
-				customerName: "閽变竷杩為攣",
-				problemDesc: "涓存湡浜у搧閫�鎹㈢敵璇�",
-				status: 2,
-				handlerName: "瀛欏叓",
-				handleDate: "2024-09-20",
-			},
-			{
-				id: 5,
-				productName: "鏉胯摑鏍归绮�",
-				batchNumber: "BL20240430",
-				expiryDate: "2024-11-10",
-				stockQuantity: 120,
-				customerName: "鍛ㄤ節鑽埧",
-				problemDesc: "鎵规闂锛岄渶瑕佸彫鍥�",
-				status: 1,
-				handlerName: "",
-				handleDate: "",
-			}
-		];
-
-		// 绠�鍗曠殑鎼滅储杩囨护
-		let filteredData = mockData;
-		
-		if (searchForm.value.status !== "" && searchForm.value.status !== null) {
-			filteredData = filteredData.filter(item => item.status === searchForm.value.status);
-		}
-		
-		if (searchForm.value.expiryDate) {
-			filteredData = filteredData.filter(item => item.expiryDate === searchForm.value.expiryDate);
-		}
-		
-		if (searchForm.value.handleDate) {
-			filteredData = filteredData.filter(item => item.handleDate === searchForm.value.handleDate);
-		}
-
-		// 鍒嗛〉澶勭悊
-		const start = (page.value.current - 1) * page.value.size;
-		const end = start + page.value.size;
-		const paginatedData = filteredData.slice(start, end);
-
-		tableLoading.value = false;
-		tableData.value = paginatedData;
-		page.value.total = filteredData.length;
-	}, 500); // 妯℃嫙缃戠粶寤惰繜
+	// 鏆傛椂杩斿洖绌烘暟鎹�
+	tableData.value = [];
+	page.value.total = 0;
+	tableLoading.value = false;
 };
 
 // 鎵撳紑寮规
@@ -306,14 +230,18 @@
 	})
 		.then(() => {
 			tableLoading.value = true;
+			// 鍙栨秷娉ㄩ噴骞朵娇鐢ㄧ湡瀹濧PI
+			// expiryAfterSalesDelete(ids).then(() => {
+			// 	proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+			// 	getList();
+			// }).finally(() => {
+			// 	tableLoading.value = false;
+			// });
 			
-			// 妯℃嫙鍒犻櫎鎿嶄綔
-			setTimeout(() => {
-				tableLoading.value = false;
-				proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
-				console.log("妯℃嫙鍒犻櫎鐨勬暟鎹甀D:", ids);
-				getList(); // 閲嶆柊鑾峰彇鏁版嵁
-			}, 300);
+			// 鏆傛椂妯℃嫙鍒犻櫎鎴愬姛
+			tableLoading.value = false;
+			proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+			getList();
 		})
 		.catch(() => {
 			proxy.$modal.msg("宸插彇娑�");

--
Gitblit v1.9.3