From cbc99e27f63ad2da0369187a8b6f58ad37dd2be3 Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期三, 28 一月 2026 08:09:32 +0800
Subject: [PATCH] #

---
 pages/outbound/orderOut/outLocView.vue    |  295 +++++++++++++++++------------
 pages/outbound/orderOut/orderDetlList.vue |  303 ++++++++---------------------
 2 files changed, 258 insertions(+), 340 deletions(-)

diff --git a/pages/outbound/orderOut/orderDetlList.vue b/pages/outbound/orderOut/orderDetlList.vue
index 8f845ad..949dcd1 100644
--- a/pages/outbound/orderOut/orderDetlList.vue
+++ b/pages/outbound/orderOut/orderDetlList.vue
@@ -15,64 +15,55 @@
 		</view>
 		
 		<!-- 鎼滅储妗� -->
-		<view class="search-bar">
+		<!-- <view class="search-bar">
 			<uni-search-bar v-model="condition" placeholder=" 鎵爜 / 杈撳叆鐗╂枡" bgColor="#F5F5F5" @confirm="search" @cancel="onCancelSearch" />
-		</view>
+		</view> -->
 		
 		<!-- 鏄庣粏鍒楄〃 -->
-		<view class="detl-list">
-			<view class="detl-card" v-for="(item, index) in filterList" :key="index" @click="chose(item)">
-				<!-- 鍗$墖澶撮儴 -->
-				<view class="card-header">
-					<view class="mat-info">
-						<text class="mat-code">{{item.matnrCode}}</text>
-						<text class="mat-name">{{item.maktx || '-'}}</text>
-					</view>
-					<view class="qty-badge" :class="item.enableQty > 0 ? 'badge-active' : 'badge-done'">
-						<text class="qty-text">鍓╀綑 {{item.enableQty}}</text>
-					</view>
-				</view>
-				
-				<!-- 鍗$墖鍐呭 -->
-				<view class="card-body">
-					<view class="info-grid">
-						<view class="info-item">
-							<text class="info-label">瑙勬牸</text>
-							<text class="info-value">{{item.specs || '-'}}</text>
+		<view class="padding-lr margin-top-sm">
+			<block v-for="(item, index) in filterList" :key="index">
+				<view class="cu-list menu sm-border margin-bottom-sm" @click="chose(item)">
+					<view class="cu-bar bg-white solid-bottom">
+						<view class="action">
+							<view class="index">{{index+1}}</view>
+							<view class="text-blue">
+								缂栫爜: {{item.matnrCode}}
+							</view>
 						</view>
-						<view class="info-item">
-							<text class="info-label">鎵规</text>
-							<text class="info-value">{{item.splrBatch || '-'}}</text>
-						</view>
-						<view class="info-item">
-							<text class="info-label">璁㈠崟鏁伴噺</text>
-							<text class="info-value highlight">{{item.anfme}}</text>
-						</view>
-						<view class="info-item">
-							<text class="info-label">宸插畬鎴�</text>
-							<text class="info-value">{{item.qty}}</text>
+						<view class="action">
+							<text :class="getRemaining(item) > 0 ? 'text-blue' : 'text-green'">
+								{{getRemaining(item) > 0 ? '鍓╀綑 ' + getRemaining(item) : '宸插畬鎴�'}}
+							</text>
 						</view>
 					</view>
-					
-					<!-- 杩涘害鏉� -->
-					<view class="progress-wrap">
-						<view class="progress-bar">
-							<view class="progress-fill" :style="{width: getProgress(item) + '%'}"></view>
+					<view class="cu-item">
+						<view class="content">
+							<text class="text-black">鐗╂枡鍚嶇О:</text>
+							<text class="text-grey text-sm margin-left-xs">{{item.maktx || '-'}}</text>
 						</view>
-						<text class="progress-text">{{getProgress(item)}}%</text>
+					</view>
+					<view class="cu-item">
+						<view class="content">
+							<text class="text-black">瑙勬牸:</text>
+							<text class="text-grey margin-left-xs">{{item.specs || '-'}}</text>
+						</view>
+						<view class="action">
+							<text class="text-black">鎵规:</text>
+							<text class="text-grey margin-left-xs">{{item.splrBatch || '-'}}</text>
+						</view>
+					</view>
+					<view class="cu-item">
+						<view class="content">
+							<text class="text-black">璁㈠崟鏁伴噺:</text>
+							<text class="text-blue margin-left-xs">{{item.anfme}}</text>
+						</view>
+						<view class="action">
+							<text class="text-black">宸插畬鎴�:</text>
+							<text class="text-green margin-left-xs">{{item.qty}}</text>
+						</view>
 					</view>
 				</view>
-				
-				<!-- 鍗$墖搴曢儴 -->
-				<view class="card-footer" v-if="item.ableQty > 0">
-					<text class="action-text">鐐瑰嚮鍑哄簱</text>
-					<uni-icons type="right" size="14" color="#0081ff"></uni-icons>
-				</view>
-				<view class="card-footer card-footer-done" v-else>
-					<text class="done-text">宸插畬鎴�</text>
-					<uni-icons type="checkmarkempty" size="14" color="#28a745"></uni-icons>
-				</view>
-			</view>
+			</block>
 		</view>
 		
 		<!-- 绌虹姸鎬� -->
@@ -119,8 +110,8 @@
 				if (!this.condition.trim()) {
 					// 鎺掑簭锛氭湁鍓╀綑鏁伴噺鐨勬帓鍓嶉潰
 					return [...this.menuList].sort((a, b) => {
-						if (a.enableQty > 0 && b.enableQty <= 0) return -1;
-						if (a.enableQty <= 0 && b.enableQty > 0) return 1;
+						if (a.ableQty > 0 && b.ableQty <= 0) return -1;
+						if (a.ableQty <= 0 && b.ableQty > 0) return 1;
 						return 0;
 					});
 				}
@@ -156,12 +147,14 @@
 			}
 		},
 		methods: {
-			// 璁$畻杩涘害
-			getProgress(item) {
-				if (!item.qty || item.qty === 0) return 0;
-				const progress = (item.qty  / item.anfme * 100).toFixed(0);
-				return Math.min(100, Math.max(0, progress));
-			},
+			// 鑾峰彇鍓╀綑鏁伴噺
+			getRemaining(item) {
+				if (item.ableQty !== undefined && item.ableQty !== null) {
+					return Number(item.ableQty);
+				}
+				// 闄嶇骇閫昏緫锛氳鍗曟暟閲� - 宸插畬鎴愭暟閲�
+				return Number(item.anfme || 0) - Number(item.qty || 0);
+			},			
 			// 鎼滅储
 			async search() {
 				if (!this.condition.trim()) {
@@ -176,7 +169,13 @@
 					}, 'POST', true);
 					
 					if (res.code === 200) {
-						this.menuList = res.data || [];
+						let list = res.data || [];
+						list.forEach(item => {
+							if (item.enableQty === undefined || item.enableQty === null) {
+								item.enableQty = Number(item.anfme || 0) - Number(item.qty || 0);
+							}
+						});
+						this.menuList = list;
 					} else if (res.code === 403) {
 						uni.showToast({ title: res.msg, icon: "none", position: 'top' });
 						setTimeout(() => {
@@ -206,7 +205,13 @@
 					}, 'GET', true);
 					
 					if (res.code === 200) {
-						this.menuList = res.data || [];
+						let list = res.data || [];
+						list.forEach(item => {
+							if (item.enableQty === undefined || item.enableQty === null) {
+								item.enableQty = Number(item.anfme || 0) - Number(item.qty || 0);
+							}
+						});
+						this.menuList = list;
 					} else {
 						this.menuList = res.data || [];
 					}
@@ -285,167 +290,31 @@
 		background: #ffffff;
 		box-shadow: 0 2rpx 8rpx rgba(0, 129, 255, 0.08);
 	}
-	
-	/* 鏄庣粏鍒楄〃 */
-	.detl-list {
-		padding: 0 20rpx;
-	}
-	
-	.detl-card {
-		background: #ffffff;
-		border-radius: 12rpx;
-		margin-top: 12rpx;
-		box-shadow: 0 2rpx 12rpx rgba(0, 129, 255, 0.08);
-		overflow: hidden;
-		transition: transform 0.2s ease;
-		border: 1rpx solid #e4e7ed;
-	}
-	
-	.detl-card:active {
-		transform: scale(0.98);
-	}
-	
-	/* 鍗$墖澶撮儴 */
-	.card-header {
-		display: flex;
-		justify-content: space-between;
-		align-items: flex-start;
-		padding: 14rpx 16rpx;
-		border-bottom: 1rpx solid #f0f0f0;
-	}
-	
-	.mat-info {
-		flex: 1;
-		padding-right: 12rpx;
-	}
-	
-	.mat-code {
-		font-size: 26rpx;
-		color: #303133;
-		font-weight: 600;
+
+	/* 鍒楄〃鏍峰紡杩佺Щ from rece/other.vue */
+	.index {
+		border: 1px solid #e54d42;
+		color: #e54d42;
+		border-radius: 50%;
 		display: block;
+		width: 50rpx;
+		height: 50rpx;
+		line-height: 48rpx;
+		text-align: center;
+		margin-right: 20rpx;
+		font-size: 30rpx;
+	}
+
+	.act {
+		border: 1px solid #e54d42;
+	}
+
+	.text-blue {
+		color: #0081ff !important;
 	}
 	
-	.mat-name {
-		font-size: 22rpx;
-		color: #909399;
-		margin-top: 4rpx;
-		display: block;
-	}
-	
-	.qty-badge {
-		padding: 4rpx 12rpx;
-		border-radius: 16rpx;
-		flex-shrink: 0;
-	}
-	
-	.badge-active {
-		background: linear-gradient(135deg, #0081ff 0%, #1890ff 100%);
-	}
-	
-	.badge-done {
-		background: #e8f5e9;
-	}
-	
-	.qty-text {
-		font-size: 20rpx;
-		font-weight: 500;
-		color: #ffffff;
-	}
-	
-	.badge-done .qty-text {
-		color: #28a745;
-	}
-	
-	/* 鍗$墖鍐呭 */
-	.card-body {
-		padding: 12rpx 16rpx;
-	}
-	
-	.info-grid {
-		display: flex;
-		flex-wrap: wrap;
-	}
-	
-	.info-item {
-		width: 50%;
-		margin-bottom: 8rpx;
-	}
-	
-	.info-label {
-		font-size: 20rpx;
-		color: #909399;
-		display: block;
-	}
-	
-	.info-value {
-		font-size: 24rpx;
-		color: #303133;
-		font-weight: 500;
-		display: block;
-		margin-top: 2rpx;
-	}
-	
-	.info-value.highlight {
-		color: #0081ff;
-		font-weight: 600;
-	}
-	
-	/* 杩涘害鏉� */
-	.progress-wrap {
-		display: flex;
-		align-items: center;
-		margin-top: 8rpx;
-	}
-	
-	.progress-bar {
-		flex: 1;
-		height: 8rpx;
-		background: #e8e8e8;
-		border-radius: 4rpx;
-		overflow: hidden;
-	}
-	
-	.progress-fill {
-		height: 100%;
-		background: linear-gradient(90deg, #0081ff 0%, #1890ff 100%);
-		border-radius: 4rpx;
-		transition: width 0.3s ease;
-	}
-	
-	.progress-text {
-		font-size: 20rpx;
-		color: #909399;
-		margin-left: 12rpx;
-		min-width: 50rpx;
-		text-align: right;
-	}
-	
-	/* 鍗$墖搴曢儴 */
-	.card-footer {
-		display: flex;
-		align-items: center;
-		justify-content: flex-end;
-		padding: 12rpx 16rpx;
-		border-top: 1rpx solid #f0f0f0;
-		background: #fafafa;
-	}
-	
-	.card-footer-done {
-		background: #f0fff4;
-	}
-	
-	.action-text {
-		font-size: 24rpx;
-		color: #0081ff;
-		margin-right: 6rpx;
-		font-weight: 500;
-	}
-	
-	.done-text {
-		font-size: 24rpx;
-		color: #28a745;
-		margin-right: 6rpx;
+	.text-green {
+		color: #39b54a !important;
 	}
 	
 	/* 绌虹姸鎬� */
diff --git a/pages/outbound/orderOut/outLocView.vue b/pages/outbound/orderOut/outLocView.vue
index 7bf1b10..e984808 100644
--- a/pages/outbound/orderOut/outLocView.vue
+++ b/pages/outbound/orderOut/outLocView.vue
@@ -14,50 +14,90 @@
 				<view class="header-row">
 					<text class="header-label">鎬诲嚭搴撴暟閲�</text>
 					<text class="header-value highlight-white">{{orderItem.anfme || 0}}</text>
-				</view>
-				<view class="header-row">
-					<text class="header-label">宸插畬鎴愭暟閲�</text>
-					<text class="header-value highlight-white">{{orderItem.qty || 0}}</text>
-				</view>
+				</view>				
 			</view>
 		</view>
 		
 		<!-- 搴撲綅瑙嗗浘鍒楄〃 -->
-		<view class="loc-list">
-			<view class="loc-card" v-for="(item, index) in locList" :key="index">
-				<!-- 鍗$墖澶撮儴 -->
-				<view class="card-header">
-					<view class="loc-info">
-						<text class="loc-code">{{item.locNo || '-'}}</text>
-						<text class="loc-name">{{item.locName || '搴撲綅'}}</text>
+		<view class="padding-lr margin-top-sm">
+			<block v-for="(item, index) in locList" :key="index">
+				<view class="cu-list menu sm-border margin-bottom-sm">
+					<view class="cu-bar bg-white solid-bottom">
+						<view class="action">
+							<view class="index">{{index+1}}</view>
+							<view class="text-blue">
+								搴撲綅: {{item.locCode || '-'}}
+							</view>
+						</view>
+						<view class="action">
+							<text class="text-black">搴撳瓨:</text>
+							<text class="text-blue margin-left-xs">{{item.anfme || 0}}</text>
+						</view>
 					</view>
-					<view class="qty-badge">
-						<text class="qty-text">{{item.anfme || 0}}</text>
+					<view class="cu-item">
+						<view class="content">
+							<text class="text-black">璁″垝璺熻釜鍙�:</text>
+							<text class="text-grey margin-left-xs">{{item.platWorkCode || '-'}}</text>
+						</view>						
+					</view>
+					<view class="cu-item">
+						<view class="content">
+							<text class="text-black">鎵规:</text>
+							<text class="text-grey margin-left-xs">{{item.batch || '-'}}</text>
+						</view>						
+					</view>
+					
+					<view class="cu-item">
+						<view class="content">
+							<text class="text-black">鎵樼洏:</text>
+							<text class="text-grey margin-left-xs">{{item.barcode || '-'}}</text>
+						</view>						
+					</view>
+					<view class="cu-item">
+						<view class="content">
+							<text class="text-black">鍖哄煙:</text>
+							<text class="text-grey margin-left-xs">{{item.wareArea || '-'}}</text>
+						</view>						
+					</view>
+
+					<view class="cu-item" v-if="item.anfme">
+						<view class="content">
+							<text class="text-blue">鍑哄簱鏁伴噺:</text>							
+						</view>
+						<view class="action">
+							<uni-number-box
+								:min="0"
+								:max="item.anfme"
+								:decimal="2"
+								:step="0.01"
+								v-model="item.outQty"
+							></uni-number-box>
+						</view>						
+					</view>
+					
+					<view class="cu-item" v-if="item.anfme">
+						<view class="content">
+							<text class="text-blue">鍑哄簱绔�:</text>							
+						</view>
+						<view class="action">							
+							<input placeholder="璇疯緭鍏ュ嚭搴撶珯鐐�" v-model="item.outStaInput" @input="checkAgvStation(item)"></input>
+						</view>				
+					</view>
+					<view class="cu-item" v-if="item.anfme">
+						<view class="content">
+							<button
+								style="width: 100%;"
+								class="cu-btn bg-orange shadow-blur"
+								:disabled="repeatClick"
+								@click="confirmOut(item)"
+							>
+								纭畾鍑哄簱
+							</button>
+						</view>
+									
 					</view>
 				</view>
-				
-				<!-- 鍗$墖鍐呭 -->
-				<view class="card-body">
-					<view class="info-grid">
-						<view class="info-item">
-							<text class="info-label">鎵规</text>
-							<text class="info-value">{{item.batch || '-'}}</text>
-						</view>
-						<view class="info-item">
-							<text class="info-label">搴撳瓨鏁伴噺</text>
-							<text class="info-value highlight">{{item.qty || 0}}</text>
-						</view>
-						<view class="info-item">
-							<text class="info-label">鎵樼洏鍙�</text>
-							<text class="info-value">{{item.zpallet || '-'}}</text>
-						</view>
-						<view class="info-item">
-							<text class="info-label">璐ф灦</text>
-							<text class="info-value">{{item.shelfNo || '-'}}</text>
-						</view>
-					</view>
-				</view>
-			</view>
+			</block>
 		</view>
 		
 		<!-- 绌虹姸鎬� -->
@@ -89,12 +129,13 @@
 				orderItem: null,
 				locList: [],
 				loading: false,
+				repeatClick:false
 			}
 		},
 		computed: {
 			// 璁$畻鎬诲簱瀛樻暟閲�
 			totalQty() {
-				return this.locList.reduce((sum, item) => sum + (item.qty || 0), 0);
+				return this.locList.reduce((sum, item) => sum + (item.anfme || 0), 0);
 			}
 		},
 		onLoad() {
@@ -108,6 +149,82 @@
 			}
 		},
 		methods: {
+			async checkAgvStation(item) {
+				const that = this
+				if (item.outStaInput === '' || item.outStaInput === null) {
+					uni.showToast({
+						title: '瀹瑰櫒鐮佷负绌�',
+						icon: 'none',
+						position: 'top'
+					})
+					return
+				}
+				const { code, data, msg } = await request('/check/agvStation', {
+					transferStationNo: item.outStaInput
+				})
+				if (code === 200) {
+					item.agvStationName = data.stationName
+				} else {
+					uni.showToast({
+						title: msg,
+						icon: 'none',
+						position: 'top'
+					})
+					setTimeout(function () {
+						item.agvStationName = ''
+						item.outStaInput = ''
+					}, 200)
+				}
+			},
+			confirmOut(item){
+				if (item.agvStationName === '' || item.agvStationName === null || item.agvStationName === undefined) {
+					uni.showToast({
+						title: '鍑哄簱绔欎负绌�',
+						icon: 'none',
+						position: 'top'
+					})
+					return
+				}
+				if (item.outQty === 0 || item.outQty === null) {
+					uni.showToast({
+						title: '鍑哄簱鏁伴噺涓嶈兘涓�0',
+						icon: 'none',
+						position: 'top'
+					})
+					return
+				}
+				this.submitConfirm(item)
+			},
+			async submitConfirm(item){
+				this.repeatClick = true
+				try {
+					const requestData = {
+						itemId: item.id,
+						outQty: item.outQty,
+						outSta: item.agvStationName
+					}
+					const { code, data, msg } = await request(
+						'/orderOut/getOutLocRun',
+						requestData
+					)
+					if (code === 200) {
+						uni.showToast({
+							title: '鍑哄簱鎴愬姛'
+						})						
+						this.isconfirm = false
+						this.getOutLocView(this.orderItem);
+					} else {
+						uni.showToast({
+							title: msg,
+							icon: 'none',
+							position: 'top'
+						})
+					}
+				} finally {
+					// 鏃犺璇锋眰鎴愬姛杩樻槸澶辫触锛岄兘閲婃斁鎸夐挳閿佸畾
+					this.repeatClick = false
+				}
+			},
 			// 鑾峰彇鍑哄簱搴撲綅瑙嗗浘
 			async getOutLocView(item) {
 				if (!item) return;
@@ -180,95 +297,27 @@
 		font-weight: 600;
 	}
 	
-	/* 搴撲綅鍒楄〃 */
-	.loc-list {
-		padding: 0 20rpx;
-	}
-	
-	.loc-card {
-		background: #ffffff;
-		border-radius: 12rpx;
-		margin-top: 12rpx;
-		box-shadow: 0 2rpx 12rpx rgba(0, 129, 255, 0.08);
-		overflow: hidden;
-		border: 1rpx solid #e4e7ed;
-	}
-	
-	/* 鍗$墖澶撮儴 */
-	.card-header {
-		display: flex;
-		justify-content: space-between;
-		align-items: flex-start;
-		padding: 14rpx 16rpx;
-		border-bottom: 1rpx solid #f0f0f0;
-	}
-	
-	.loc-info {
-		flex: 1;
-		padding-right: 12rpx;
-	}
-	
-	.loc-code {
-		font-size: 26rpx;
-		color: #303133;
-		font-weight: 600;
+	.index {
+		border: 1px solid #e54d42;
+		color: #e54d42;
+		border-radius: 50%;
 		display: block;
+		width: 50rpx;
+		height: 50rpx;
+		line-height: 48rpx;
+		text-align: center;
+		margin-right: 20rpx;
+		font-size: 30rpx;
 	}
-	
-	.loc-name {
-		font-size: 22rpx;
-		color: #909399;
-		margin-top: 4rpx;
-		display: block;
+
+	.act .index {
+		background: #0081ff;
 	}
-	
-	.qty-badge {
-		padding: 4rpx 12rpx;
-		border-radius: 16rpx;
-		flex-shrink: 0;
-		background: linear-gradient(135deg, #0081ff 0%, #1890ff 100%);
+
+	.act {
+		box-shadow: 0 0 10upx rgba(0, 129, 255, 0.6);
 	}
-	
-	.qty-text {
-		font-size: 20rpx;
-		font-weight: 500;
-		color: #ffffff;
-	}
-	
-	/* 鍗$墖鍐呭 */
-	.card-body {
-		padding: 12rpx 16rpx;
-	}
-	
-	.info-grid {
-		display: flex;
-		flex-wrap: wrap;
-	}
-	
-	.info-item {
-		width: 50%;
-		margin-bottom: 8rpx;
-	}
-	
-	.info-label {
-		font-size: 20rpx;
-		color: #909399;
-		display: block;
-	}
-	
-	.info-value {
-		font-size: 24rpx;
-		color: #303133;
-		font-weight: 500;
-		display: block;
-		margin-top: 2rpx;
-	}
-	
-	.info-value.highlight {
-		color: #0081ff;
-		font-weight: 600;
-	}
-	
+
 	/* 绌虹姸鎬� */
 	.empty-state {
 		display: flex;

--
Gitblit v1.9.1