From 75291ece8be07085269e56210e2d3fe10adb4735 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期三, 31 七月 2024 14:56:16 +0800
Subject: [PATCH] #

---
 pages/home/home.vue       |   14 +++---
 pages/pakin/putDown.vue   |   10 +++-
 pages/login/login.vue     |    3 +
 manifest.json             |    7 +++
 pages/locDetl/locDetl.vue |   84 ++++++++++++++++++++++++++++++++++++++---
 5 files changed, 99 insertions(+), 19 deletions(-)

diff --git a/manifest.json b/manifest.json
index a0a56f3..6a9a5ea 100644
--- a/manifest.json
+++ b/manifest.json
@@ -122,5 +122,10 @@
     "uniStatistics" : {
         "enable" : false
     },
-    "vueVersion" : "2"
+    "vueVersion" : "2",
+    "h5" : {
+        "router" : {
+            "base" : "./"
+        }
+    }
 }
diff --git a/pages/home/home.vue b/pages/home/home.vue
index db39c3c..31ca7d8 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -31,13 +31,13 @@
 						cuIcon: 'pullup',
 						url: '/pakin/comb'
 					},
-					{
-						title: '鍏ュ簱',
-						name: 'Pakin',
-						color: 'red',
-						cuIcon: 'pullup',
-						url: '/pakin/pakin'
-					},
+					// {
+					// 	title: '鍏ュ簱',
+					// 	name: 'Pakin',
+					// 	color: 'red',
+					// 	cuIcon: 'pullup',
+					// 	url: '/pakin/pakin'
+					// },
 					{
 						title: '鍑哄簱',
 						name: 'PutDown',
diff --git a/pages/locDetl/locDetl.vue b/pages/locDetl/locDetl.vue
index 3386dec..d5a2254 100644
--- a/pages/locDetl/locDetl.vue
+++ b/pages/locDetl/locDetl.vue
@@ -15,12 +15,13 @@
 			</view>
 		</scroll-view>
 		<view>
-			<view class="tag-list" v-for="(item,i) in matList" :key="i" @click="findBySelect(item)">
+			<view class="tag-list" v-for="(item,i) in matList" :key="i">				
 				<view class="tag">
-					<view style="display: flex;">
+					<view style="display: flex; justify-content: space-between;">
 						<view class="wms-tag" :style="baColor" >鍟嗗搧</view>
+						<checkbox class="wms-tag" :value="item.matnr" :checked="item.checked" @click="set(i)"/>
 					</view>
-				</view>
+				</view>				
 				<view class="tag-item">搴撲綅鍙凤細 {{item.locNo}}</view>
 				<view class="tag-item">鍟嗗搧缂栫爜锛� {{item.matnr  ? item.matnr : '--'}}</view>
 				<view class="tag-item">鎵瑰彿锛� {{item.batch  ? item.batch : '--'}}</view>
@@ -33,6 +34,8 @@
 			</view>
 		</view>
 		<uni-load-more v-show="matList.length != 0" :status="status" :icon-size="16" :content-text="contentText" />
+		
+		<view class="buttom"><button size="mini" type="primary" @click="findBySelect()">鎻愬彇</button></view>
 	</view>
 </template>
 
@@ -63,7 +66,7 @@
 		onReachBottom() {
 			this.status = 'more';
 			if (this.tagList == null) {
-				this.showMat(this.tagIdNow);
+				this.selectloc2();
 			}
 		},
 		onLoad() {
@@ -83,10 +86,14 @@
 			// this.showTag(10009)
 		},
 		methods: {
+			set(e) {
+				var ck = this.matList[e].checked
+				this.matList[e].checked = ck ? false:true
+			},
 			selectloc(){
 				let that = this
 				that.matList = []
-				
+				that.curr = 1
 				uni.request({
 				    url: that.baseUrl + '/locDetl/pda/select',
 				    data: {
@@ -110,6 +117,54 @@
 							}
 							if (res.data.records.length == 0) {
 								that.status = 'noMore'
+							}
+							for (var i = 0; i < that.matList.length; i++) {
+								that.$set(that.matList[i],'checked',false)
+							}
+							that.baColor = "background-color: #1cbbb4;"
+						} else if (res.code === 403 ) {
+							uni.showToast({title: res.msg, icon: "none", position: 'top'})
+							setTimeout(() => {
+								uni.reLaunch({
+									url: '../login/login'
+								});
+							}, 1000);
+						} else {
+							uni.showToast({title: res.msg, icon: "none",position: 'top'})
+						}
+						
+					}
+				});
+			},
+			selectloc2(){
+				let that = this
+				// that.matList = []
+				uni.request({
+				    url: that.baseUrl + '/locDetl/pda/select',
+				    data: {
+						curr:that.curr,
+						limit: 20,
+						matnr: that.condition
+				    },
+					method:"GET",
+				    header: {
+						'token':uni.getStorageSync('token'),
+				    },
+					success(result) {
+						console.log(result);
+						that.tagList = null
+						var res = result.data
+						if (res.code === 200) {
+							if (res.data.records != null && res.data.records.length > 0) {
+								let list = res.data.records
+								that.matList = that.reload ? list : that.matList.concat(list);
+								that.curr = that.curr + 1
+							}
+							if (res.data.records.length == 0) {
+								that.status = 'noMore'
+							}
+							for (var i = 0; i < that.matList.length; i++) {
+								that.$set(that.matList[i],'checked',false)
 							}
 							that.baColor = "background-color: #1cbbb4;"
 						} else if (res.code === 403 ) {
@@ -242,8 +297,15 @@
 					}
 				});
 			},
-			findBySelect(matnr) {
-				this.getOpenerEventChannel().emit('acceptDataFromOpenedPage', {data: matnr});
+			findBySelect() {
+				var checkedList = []
+				for(var i = 0; i < this.matList.length; i++) {
+					var t = !this.matList[i].checked
+					if (this.matList[i].checked) {
+						checkedList.push(this.matList[i])
+					}
+				}				
+				this.getOpenerEventChannel().emit('acceptDataFromOpenedPage', {data: checkedList});
 				uni.navigateBack({
 					
 				})
@@ -285,4 +347,12 @@
 		color: #606266;
 		font-size: 14px;
 	}
+	.aside {
+		width: 100rpx;
+		/* background-color: #303133; */
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
+	
 </style>
\ No newline at end of file
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 70a0ea1..9cb8e37 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -9,7 +9,7 @@
 		<!-- logo -->
 		<view class="logo">
 			<view class="logo-box">
-				<image src="../../static/img/logo.png" mode="aspectFit"></image>
+				<!-- <image src="../../static/img/logo.png" mode="aspectFit"></image> -->
 			</view>
 		</view>
 		<view class="content">
@@ -361,6 +361,7 @@
 		justify-content: center;
 	}
 	.logo-box {
+		height: 50vw;
 		margin: auto 0;
 	}
 	image {
diff --git a/pages/pakin/putDown.vue b/pages/pakin/putDown.vue
index 11d548b..242c1a3 100644
--- a/pages/pakin/putDown.vue
+++ b/pages/pakin/putDown.vue
@@ -277,8 +277,12 @@
 					events: {
 						// 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�  鍙﹀涓�涓〉闈紶杩囨潵鐨�
 						acceptDataFromOpenedPage: function(data) {
-							that.matData = data.data
-							that.checkMat(that.matData)
+							console.log(data.data)
+							for(var i = 0; i < data.data.length; i++) {
+								that.checkMat(data.data[i])
+							}
+							
+							
 						},
 					},
 
@@ -290,7 +294,7 @@
 				var len = this.dataList.length
 				var add = true ,sameItem = false
 				for (var i = 0; i < len; i++) {
-					if (mat.locNo == this.dataList[i].locNo) {						
+					if (mat.locNo == this.dataList[i].locNo && mat.matnr == this.dataList[i].matnr) {						
 						add = false
 					}
 				}

--
Gitblit v1.9.1