From 5c3f9ccc6ffd5fbb60e81f3d0118a3541f1ece15 Mon Sep 17 00:00:00 2001
From: skyouc <creaycat@gmail.com>
Date: 星期三, 05 十一月 2025 22:10:45 +0800
Subject: [PATCH] 临时盘点优化

---
 pages/check/TempCheck.vue |   29 +++++++++++++++--------------
 1 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/pages/check/TempCheck.vue b/pages/check/TempCheck.vue
index 600d372..a31445c 100644
--- a/pages/check/TempCheck.vue
+++ b/pages/check/TempCheck.vue
@@ -234,10 +234,11 @@
 					})
 					return;
 				}
-				this.list.push(...this.matnrList)
-				this.matnrList = []
-				this.isconfirm = !this.isconfirm
+				
+				this.confirmAddMatnr()
+				this.matnrList = [];
 			},
+			
 			remove(index) {
 				this.matnrList.splice(index, 1);
 			},
@@ -249,10 +250,15 @@
 					matnrs: this.matnrList
 				})
 				if (code === 200) {
-					
+					that.search()
 				} else {
-					
+					uni.showToast({
+						title: msg,
+						icon: "error",
+						position: 'top'
+					})
 				}
+				this.isconfirm = !this.isconfirm
 			},
 			async addMatnr() {
 				const {
@@ -345,14 +351,9 @@
 					return;
 				}
 				this.repeatClick = true
-				const {
-					code,
-					data,
-					msg
-				} = await request('/saveCheckDiff', {
-					container: that.barcode,
-					checkId: that.check.id,
-					checkDiffItems: that.list
+				const {code, data,	msg	} = await request('/temp/check/confirm', {
+					barcode: that.barcode,
+					items: that.list
 				})
 				if (code === 200) {
 					uni.showToast({
@@ -363,7 +364,7 @@
 				} else {
 					uni.showToast({
 						title: msg,
-						icon: "none",
+						icon: "error",
 					})
 				}
 				this.repeatClick = false

--
Gitblit v1.9.1