From d9afd0924fc3bb5b495d4f879fc8b82b0be7c708 Mon Sep 17 00:00:00 2001
From: pjb <1>
Date: 星期四, 07 五月 2026 10:30:11 +0800
Subject: [PATCH] 功能完善

---
 pages/order/orderComb.vue |   82 +++++++++++++++++++++++++++++++++++-----
 1 files changed, 71 insertions(+), 11 deletions(-)

diff --git a/pages/order/orderComb.vue b/pages/order/orderComb.vue
index 1d2cdba..fd02ab7 100644
--- a/pages/order/orderComb.vue
+++ b/pages/order/orderComb.vue
@@ -62,6 +62,12 @@
 							</view>
 						</view>
 						<view class="info-row">
+							<view class="info-label">宸ュ崟鍙凤細</view>
+							<view class="info-value">
+								<text class="tag tag-primary">{{item.standby1 || '-'}}</text>
+							</view>
+						</view>
+						<view class="info-row">
 							<view class="info-label">鎵瑰彿锛�</view>
 							<view class="info-value">
 								<text class="tag tag-warning">{{item.batch || '-'}}</text>
@@ -109,9 +115,15 @@
 						</view>
 					</view>
 					<view class="popup-item">
-						<view class="popup-item-left">閲嶉噺:</view>
+						<view class="popup-item-left">宸ュ崟鍙�:</view>
 						<view class="popup-item-right">
-							<input type="text" v-model="weight" class="popup-input" placeholder="璇疯緭鍏ラ噸閲�">
+							<input type="text" v-model="standby1" class="popup-input" placeholder="璇疯緭鍏ュ伐鍗曞彿">
+						</view>
+					</view>
+					<view class="popup-item">
+						<view class="popup-item-left">鎵瑰彿:</view>
+						<view class="popup-item-right">
+							<input type="text" v-model="batch" class="popup-input" placeholder="璇疯緭鍏ユ壒鍙�">
 						</view>
 					</view>
 					<view class="popup-item">
@@ -180,6 +192,7 @@
 				msgType1: 'success',
 				msgType: 'success',
 				messageText: '',
+				standby1: '',
 				title: '',
 				content: '',
 				barcodeFocus: true,
@@ -459,11 +472,12 @@
 			},
 			resetClose() {},
 			revise(item, i) {
+				this.standby1 = this.dataList[i].standby1 || ''  //娣诲姞宸ュ崟鍙疯祴鍊�
 				this.matnr1 = this.dataList[i].matnr
 				this.count = this.dataList[i].anfme
-				this.batch = this.dataList[i].batch
+				this.batch = this.dataList[i].batch    
 				this.weight = this.dataList[i].weight
-				this.maxCount = this.dataList[i].maxCount
+				this.maxCount = this.dataList[i].maxCount|| this.dataList[i].anfme || 0  // 娣诲姞榛樿鍊�
 				this.rowNum = i
 				this.eject()
 			},
@@ -483,18 +497,64 @@
 				this.dataList.splice(this.removeNum, 1)
 			},
 			reviseConfirm() {
-				this.dataList[this.rowNum].anfme = this.count
-				this.dataList[this.rowNum].batch = this.batch
-				this.dataList[this.rowNum].weight = this.weight
-				uni.showToast({ title:"淇敼鎴愬姛", icon: "success", position: 'center' })
-				this.$refs.revise.close()
-				this.$forceUpdate()
+			    // 鍐嶆鏍¢獙鏁伴噺鏄惁瓒呰繃鏈�澶у��
+			    if (this.count > this.maxCount) {
+			        uni.showToast({ 
+			            title: `鏁伴噺涓嶈兘瓒呰繃鏈�澶у�� ${this.maxCount}`, 
+			            icon: "none", 
+			            position: 'center' 
+			        })
+			        // 鎭㈠鎴愭渶澶у��
+			        this.count = this.maxCount
+			        return  // 闃绘淇濆瓨
+			    }
+			    
+			    // 鏍¢獙鏁伴噺鏄惁灏忎簬1
+			    if (this.count < 1) {
+			        uni.showToast({ 
+			            title: "鏁伴噺鑷冲皯涓� 1", 
+			            icon: "none", 
+			            position: 'center' 
+			        })
+			        this.count = 1
+			        return  // 闃绘淇濆瓨
+			    }
+			    
+			    // 鏍¢獙閫氳繃锛屼繚瀛樻暟鎹�
+			    this.dataList[this.rowNum].standby1 = this.standby1
+			    this.dataList[this.rowNum].anfme = this.count
+			    this.dataList[this.rowNum].batch = this.batch
+			    this.dataList[this.rowNum].weight = this.weight
+			    uni.showToast({ title:"淇敼鎴愬姛", icon: "success", position: 'center' })
+			    this.$refs.revise.close()
+			    this.$forceUpdate()
 			},
 			reviseClose() {
 				this.$refs.revise.close()
 			},
 			changeValue(value) {
-				this.count = value
+			    // 闄愬埗鏁伴噺涓嶈兘瓒呰繃 maxCount
+			    if (value > this.maxCount) {
+			        uni.showToast({ 
+			            title: `鏁伴噺涓嶈兘瓒呰繃鏈�澶у�� ${this.maxCount}`, 
+			            icon: "none", 
+			            position: 'center' 
+			        })
+			        this.count = this.maxCount
+			        // 灏嗗�艰缃负鏈�澶у��
+			        return
+			    }
+			    // 闄愬埗鏁伴噺涓嶈兘灏忎簬 1
+			    if (value < 1) {
+			        uni.showToast({ 
+			            title: "鏁伴噺鑷冲皯涓� 1", 
+			            icon: "none", 
+			            position: 'center' 
+			        })
+			        this.count = 1
+			        return
+			    }
+			    this.count = value
 			},
 			resst() {
 				this.dataList = []

--
Gitblit v1.9.1