From b6c44345b43433a9e28aab4fc33dedfb5ab16efe Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期四, 08 五月 2025 12:30:51 +0800
Subject: [PATCH] Merge branch 'devlop' of http://47.97.1.152:5880/r/pda-master into devlop

---
 pages/listing/itemSelect.vue       |   59 ++++++--------
 pages/listing/matnrPalletising.vue |  135 ++++++++++++++++++++-------------
 pages/rece/other.vue               |    8 +-
 3 files changed, 110 insertions(+), 92 deletions(-)

diff --git a/pages/listing/itemSelect.vue b/pages/listing/itemSelect.vue
index e2d7be3..c65d690 100644
--- a/pages/listing/itemSelect.vue
+++ b/pages/listing/itemSelect.vue
@@ -2,7 +2,7 @@
 	<view>
 		<!-- 鎼滅储妗� -->
 		<view class="search-bar">
-			<uni-search-bar v-model="condition" placeholder=" 杈撳叆鎵规" bgColor="#EEEEEE"  />
+			<uni-search-bar v-model="condition" placeholder=" 杈撳叆鎵规" bgColor="#EEEEEE"  @confirm="search()"/>
 		</view>
 		
 		 
@@ -33,14 +33,7 @@
 								<text class="text-grey ">{{item.asnCode}}</text>
 							</view>
 						</view>
-						<view class="cu-item">
-							<view class="content">
-								<text class="text-black">鐗╂枡鏉$爜:</text>
-							</view>
-							<view class="action">
-								<text class="text-grey ">{{item.trackCode}}</text>
-							</view>
-						</view>
+						
 						<view class="cu-item">
 							<view class="content">
 								<text class="text-black">渚涘簲鍟嗘壒娆�:</text>
@@ -49,23 +42,6 @@
 								<text class="text-grey ">{{item.splrBatch}}</text>
 							</view>
 						</view>
-						<!-- <view class="cu-item">
-							<view class="content">
-								<text class="text-black">搴撳瓨鎵规:</text>
-							</view>
-							<view class="action">
-								<text class="text-grey ">{{item.batch}}</text>
-							</view>
-						</view> -->
-						<!-- <view class="cu-item">
-							<view class="content">
-								<text class="text-black">骞冲彴琛屽彿: <text class="text-grey ">{{item.platformId}}</text></text>
-							</view>
-							<view class="content">
-								<text class="text-black">璐ㄦ缁撴灉: <text class="text-grey ">{{item.inspect}}</text></text>
-							</view>
-						</view> -->
-			
 						<view class="cu-item">
 							<view class="content">
 								<text class="text-black">搴撳瓨鍗曚綅: <text class="text-grey ">{{item.stockUnit}}</text></text>
@@ -97,6 +73,9 @@
 </template>
 
 <script>
+	import {
+		request
+	} from '../../common/request.js'
 	export default {
 		data() {
 			return {				
@@ -110,7 +89,7 @@
 				selectedList:[],
 				repeatClick: false,
 				matnrCode:'',
-				asnCode:''
+				asnCode:'',				
 				
 			}
 		},
@@ -126,8 +105,7 @@
 			
 			// 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
 			eventChannel.on('data', function(data) {
-				console.log(data.item)
-				that.matList = data.item
+				that.getDet(data)
 			})
 		},
 		onShow() {
@@ -136,6 +114,15 @@
 			
 		},
 		methods: {
+			search(){
+				let req = {
+					matnrCode: this.condition,
+					asnCode: this.condition,
+					code: this.condition,
+					batch: this.condition
+				}
+				this.getDet(req);
+			},
 			back() {
 				for (var i = 0; i < this.matList.length; i++) {
 					if(this.matList[i].selected === true){
@@ -155,22 +142,27 @@
 					this.matList[index].selected = !this.matList[index].selected
 				}				
 			},
-			async getDet() {
+			async getDet(req) {
 				let that = this;
+				uni.showLoading({
+					title:'鍔犺浇涓�...'
+				})
 				const {
 					code,
 					data,
 					msg
 				} = await request('/asnOrderItem/trackCode', {
-					matnrCode: that.matnrCode,
-					asnCode: that.asnCode
+					matnrCode: req.matnrCode,
+					asnCode: req.asnCode,
+					code: req.code,
+					batch: req.batch
 				}, "post")
 				if (code === 200) {
 					for (var i = 0; i < data.length; i++) {
 						data[i].receiptQty =0;
 						data[i].selected = false;							
 					}	
-					this.list = data
+					this.matList = data
 				} else {
 					uni.showToast({
 						title: msg,
@@ -178,6 +170,7 @@
 						position: 'top'
 					})
 				}
+				uni.hideLoading();
 			},
 			
 		}
diff --git a/pages/listing/matnrPalletising.vue b/pages/listing/matnrPalletising.vue
index 16609ed..c67be93 100644
--- a/pages/listing/matnrPalletising.vue
+++ b/pages/listing/matnrPalletising.vue
@@ -51,15 +51,7 @@
 						<view class="action">
 							<text class="text-grey ">{{item.asnCode}}</text>
 						</view>
-					</view>
-					<view class="cu-item">
-						<view class="content">
-							<text class="text-black">鐗╂枡鏉$爜:</text>
-						</view>
-						<view class="action">
-							<text class="text-grey ">{{item.trackCode}}</text>
-						</view>
-					</view>
+					</view>					
 					<view class="cu-item">
 						<view class="content">
 							<text class="text-black">渚涘簲鍟嗘壒娆�:</text>
@@ -163,56 +155,85 @@
 				find ? this.scrollTo() : this.getDet();
 
 			},
-			async getDet() {
+			getDet() {
 				let that = this;
-				const {
-					code,
-					data,
-					msg
-				} = await request('/asnOrderItem/trackCode', {
-					matnrCode: that.matnrCode,
-					asnCode: that.asnCode
-				}, "post")
-				if (code === 200) {
-					data.map(item => {
-						item.receiptQty = 0;
-						item.selected = false;
-					})
-					// for (var i = 0; i < data.length; i++) {
-					// 	data[i].receiptQty =1;
-					// 	data[i].selected = false;							
-					// }
-					if(data !== [] || data !== null){					
-					uni.navigateTo({
-							url: "../listing/itemSelect",
-							success: function(res) {
-								// 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�   鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
-								res.eventChannel.emit('data', {
-									item: data
-								})
-							},
-							events: {
-								// 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�  鍙﹀涓�涓〉闈紶杩囨潵鐨�
-								backData: function(data) {									
-									that.showBackData(data.data)
-								},
-							},
+				uni.navigateTo({
+					url: "../listing/itemSelect",
+					success: function(res) {
+						// 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�   鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
+						res.eventChannel.emit('data', {
+							matnrCode: that.matnrCode,
+							asnCode: that.asnCode
+						})
+					},
+					events: {
+						// 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�  鍙﹀涓�涓〉闈紶杩囨潵鐨�
+						backData: function(data) {									
+							that.showBackData(data.data)
+						},
+					},
+				
+				
+				});
+			},
+			// async getDet() {
+			// 	let that = this;
+			// 	const {
+			// 		code,
+			// 		data,
+			// 		msg
+			// 	} = await request('/asnOrderItem/trackCode', {
+			// 		matnrCode: that.matnrCode,
+			// 		asnCode: that.asnCode
+			// 	}, "post")
+			// 	if (code === 200) {
+			// 		data.map(item => {
+			// 			item.receiptQty = 0;
+			// 			item.selected = false;
+			// 		})
+			// 		// for (var i = 0; i < data.length; i++) {
+			// 		// 	data[i].receiptQty =1;
+			// 		// 	data[i].selected = false;							
+			// 		// }
+			// 		if(data !== [] || data !== null){					
+			// 		uni.navigateTo({
+			// 				url: "../listing/itemSelect",
+			// 				success: function(res) {
+			// 					// 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�   鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
+			// 					res.eventChannel.emit('data', {
+			// 						item: data
+			// 					})
+			// 				},
+			// 				events: {
+			// 					// 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�  鍙﹀涓�涓〉闈紶杩囨潵鐨�
+			// 					backData: function(data) {									
+			// 						that.showBackData(data.data)
+			// 					},
+			// 				},
 						
 						
-						});
+			// 			});
 						
-					}
+			// 		}
 						
-					// this.list = data
-				} else {
+			// 		// this.list = data
+			// 	} else {
+			// 		uni.showToast({
+			// 			title: msg,
+			// 			icon: "none",
+			// 			position: 'top'
+			// 		})
+			// 	}
+			// },
+			async getList() {
+				if(this.barcode === '' || this.barcode === null){
 					uni.showToast({
-						title: msg,
+						title: "瀹瑰櫒鐮佷负绌�",
 						icon: "none",
 						position: 'top'
 					})
+					return ;
 				}
-			},
-			async getList() {
 				const {
 					code,
 					data,
@@ -230,12 +251,16 @@
 					})
 				}
 			},
-			showBackData(data){
-				this.list = data.map(item => {					
-					return {
-						...item												
-					};
-				});
+			showBackData(data){	
+				data.map(item => {					
+					this.list.push(item)
+				})				
+				this.list = this.list.filter((item, index, self) =>
+					self.findIndex(i => (
+						i.id === item.id // 鏍规嵁id鍘婚噸
+					)) === index
+				);
+								
 			},
 			scrollTo() {
 				const ref = this.$refs[`${this.barcode}ref`][0];
diff --git a/pages/rece/other.vue b/pages/rece/other.vue
index 53bec21..8ed67e7 100644
--- a/pages/rece/other.vue
+++ b/pages/rece/other.vue
@@ -111,7 +111,7 @@
 						<view class="content" v-if="!isconfirm">
 							<view class="cu-form-group padding-lr-0">
 								<view class="title text-blue">渚涘簲鍟嗘壒娆�:</view>
-								<input placeholder="璇疯緭鍏ヤ緵搴斿晢鎵规" v-model="item.splrBatch"></input>
+								{{item.splrBatch}}
 							</view>
 						</view>
 						<view class="content" v-else>
@@ -159,10 +159,10 @@
 
 		<view class="cu-form-group margin-bottom">
 			<view class="title">鏀惰揣鍖�</view>
-			<view>
-				<uni-data-select v-model="whAreaId" :localdata="range" placement="top"
+			<view style="width: 80%;">
+				<uni-data-select style="min-width: 90%; max-width: 90%;" v-model="whAreaId" :localdata="range" placement="top"
 					@change="selChange"></uni-data-select>
-			</view>>
+			</view>
 		</view>
 
 		<view class="cu-bar btn-group foot" v-show="!isconfirm">

--
Gitblit v1.9.1