From 2b49f7643d15b74889d190f216630559006ed93a Mon Sep 17 00:00:00 2001
From: yanjinhui <3306209981@qq.com>
Date: 星期一, 01 十二月 2025 09:48:43 +0800
Subject: [PATCH] pad和后端的优化

---
 新建文件夹/PDA/pages/stash/outFinish.vue |  158 ++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 108 insertions(+), 50 deletions(-)

diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/outFinish.vue" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/outFinish.vue"
index 795e74a..7a4b864 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/outFinish.vue"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/outFinish.vue"
@@ -438,56 +438,114 @@
 					}
 				})
 			},
-			submit() {
-				if (this.barcode == "") {
-					this.$refs.uToast.show({
-						title: "璇锋壂鎻忚揣浣嶇紪鍙�",
-						type: 'error'
-					})
-					return;
-				}
-				// if (this.materSn.length == 0) {
-				// 	this.$refs.uToast.show({
-				// 		title: "璇疯緭鍏ュ嚭搴撴暟閲�",
-				// 		type: 'error'
-				// 	})
-				// 	return;
-				// }
-				this.$u.post('/api/DeliveryOrder/OutFinish', {
-					MainData: {
-						"locationCode": this.barcode,
-						"taskId":this.taskId,
-						// "warehouseCode": this.warehouseId,
-						// "orderNo": this.orderNo,
-						// "Inqty": this.materSn,
-						// "batchNo": this.batchNo,
-					},
-					// DelKeys: this.sns
-				}).then(res => {
-					this.Testcheck = false;
-					if (res.status) {
-						this.$refs.uToast.show({
-							title: "鍑哄簱鎴愬姛",
-							type: "success"
-						})
-						// this.Inqty=res.message;
-						// this.order_Inqty="宸插嚭搴撴暟閲忥細"+this.Inqty;
-						this.barcode="";
-						// uni.setStorageSync('outTask',true);
-						setTimeout(() => {
-						    uni.navigateBack({
-						        delta: 1
-						    });
-						}, 300);
-						// this.materSn="";
-					} else {
-						this.$refs.uToast.show({
-							title: res.message,
-							type: "error"
-						})
-					}
-				})
-			}
+
+			
+// 	submit() {
+// 			if (this.barcode == "") {
+// 				this.$refs.uToast.show({
+// 				title: "璇锋壂鎻忚揣浣嶇紪鍙�",
+// 				type: 'error'
+// 				})
+// 				return;
+// 			}
+  
+//   this.$u.post('/api/DeliveryOrder/OutFinish', {
+//     MainData: {
+//       "locationCode": this.barcode,
+//       "taskId": this.taskId,
+//     },
+//   }).then(res => {
+//     if (res.status) {
+//       this.$refs.uToast.show({
+//         title: "鍑哄簱鎴愬姛",
+//         type: "success"
+//       })
+//       this.barcode = "";
+      
+//       // 鍏抽敭淇敼锛氫娇鐢� getCurrentPages 鑾峰彇鍓嶄竴涓〉闈㈠苟鐩存帴璋冪敤鍏舵柟娉�
+//       const pages = getCurrentPages();
+//       const prevPage = pages[pages.length - 2]; // 鑾峰彇涓婁竴涓〉闈㈠疄渚�
+      
+//       if (prevPage && prevPage.refreshData) {
+//         // 鐩存帴璋冪敤涓婁竴涓〉闈㈢殑鍒锋柊鏂规硶
+//         prevPage.refreshData();
+//       }
+      
+//       setTimeout(() => {
+//         uni.navigateBack({
+//           delta: 1
+//         });
+//       }, 300);
+//     } else {
+//       this.$refs.uToast.show({
+//         title: res.message,
+//         type: "error"
+//       })
+//     }
+//   })
+// }
+
+
+
+submit() {
+    if (this.barcode == "") {
+        this.$refs.uToast.show({
+            title: "璇锋壂鎻忚揣浣嶇紪鍙�",
+            type: 'error'
+        })
+        return;
+    }
+
+    // 鏂板浜屾纭閫昏緫
+    uni.showModal({
+        title: '纭鍑哄簱',
+        content: '鎮ㄧ‘瀹氳鎻愪氦鍑哄簱淇℃伅鍚楋紵',
+        success: (res) => {
+            if (res.confirm) {
+                // 鐢ㄦ埛鐐瑰嚮纭畾锛屾墽琛屽師鏈夌殑鎻愪氦閫昏緫
+                this.$u.post('/api/DeliveryOrder/OutFinish', {
+                    MainData: {
+                        "locationCode": this.barcode,
+                        "taskId": this.taskId,
+                    },
+                }).then(res => {
+                    if (res.status) {
+                        this.$refs.uToast.show({
+                            title: "鍑哄簱鎴愬姛",
+                            type: "success"
+                        })
+                        this.barcode = "";
+                        
+                        // 鍏抽敭淇敼锛氫娇鐢� getCurrentPages 鑾峰彇鍓嶄竴涓〉闈㈠苟鐩存帴璋冪敤鍏舵柟娉�
+                        const pages = getCurrentPages();
+                        const prevPage = pages[pages.length - 2]; // 鑾峰彇涓婁竴涓〉闈㈠疄渚�
+                        
+                        if (prevPage && prevPage.refreshData) {
+                            // 鐩存帴璋冪敤涓婁竴涓〉闈㈢殑鍒锋柊鏂规硶
+                            prevPage.refreshData();
+                        }
+                        
+                        setTimeout(() => {
+                            uni.navigateBack({
+                                delta: 1
+                            });
+                        }, 300);
+                    } else {
+                        this.$refs.uToast.show({
+                            title: res.message,
+                            type: "error"
+                        })
+                    }
+                })
+            } else {
+                // 鐢ㄦ埛鐐瑰嚮鍙栨秷锛屼笉鍋氫换浣曟搷浣�
+            }
+        }
+    });
+}
+
+
+
 		}
 	}
 </script>

--
Gitblit v1.9.3