From c038caf7b08e3a8cd5573b00bac4fa1ee4076571 Mon Sep 17 00:00:00 2001
From: whycq <you@example.com>
Date: 星期六, 15 十月 2022 08:35:33 +0800
Subject: [PATCH] Merge branch 'bfwms' of http://47.97.1.152:5880/r/wms_app into bfwms

---
 pages/basics/matSelect3.vue |   43 ++++++++++++++++++++++++++++++++-----------
 1 files changed, 32 insertions(+), 11 deletions(-)

diff --git a/pages/basics/matSelect3.vue b/pages/basics/matSelect3.vue
index 3f80eb6..33dfa31 100644
--- a/pages/basics/matSelect3.vue
+++ b/pages/basics/matSelect3.vue
@@ -38,17 +38,17 @@
 		<view class="footer flex" style="height: 100rpx;">
 			<view class="bottom">
 				<view style="display: inline-block;">
-					<button size="mini">涓婁竴椤�</button>
+					<button size="mini" @click="pageUp()">涓婁竴椤�</button>
 				</view>
 				<view style="display: flex;align-items: center;">
 					<text>褰撳墠椤碉細</text>
-					<input v-model="limit" type="text" style="width: 50rpx;border: 1px solid #ccc;height: 30rpx;font-size: 14rpx;">
+					<input v-model="limit" @blur="toPage()" type="text" style="width: 50rpx;border: 1px solid #ccc;height: 30rpx;font-size: 14rpx;">
 				</view>
 				<view style="display: flex;align-items: center;">
 					<text style="font-size: 14rpx;">鍏眥{pages}}椤�</text>
 				</view>
 				<view style="display: inline-block;">
-					<button size="mini">涓嬩竴椤�</button>
+					<button size="mini" @click="pageDown()">涓嬩竴椤�</button>
 				</view>
 			</view>
 		</view>
@@ -64,7 +64,9 @@
 				tag: [],
 				data: [],
 				limit: 1,
-				pages: 10
+				pages: 10,
+				curr: 1,
+				parentId:''
 			}
 		},
 		onLoad() {
@@ -79,6 +81,23 @@
 			})
 		},
 		methods: {
+			pageUp() {
+				this.curr = this.curr - 1
+				this.showMat(this.parentId,this.curr,16)
+				this.limit = this.curr
+				console.log(this.curr);
+			},
+			pageDown() {
+				this.curr = this.curr + 1
+				this.limit = this.curr
+				this.showMat(this.parentId,this.curr,16)
+				console.log(this.curr);
+			},
+			toPage() {
+				this.curr = this.pages
+				
+				this.showMat(this.parentId,this.curr,16)
+			},
 			checkbox() {
 				
 			},
@@ -147,7 +166,7 @@
 							if (res.data != null && res.data.length > 0) {
 								that.tag = res.data
 							} else {
-								that.showMat(parentId)
+								that.showMat(parentId,"1","16")
 							}
 						} else if (res.code === 403 ) {
 							uni.showToast({title: res.msg, icon: "none", position: 'top'})
@@ -163,25 +182,27 @@
 					}
 				});
 			},
-			showMat(tagId) {
+			showMat(tagId,curr,limit) {
 				uni.showLoading();
 				let that = this
 				if (tagId == null || tagId == '' || tagId == undefined) {
 					return;
 				}
 				uni.request({
-				    url: that.commonUrl + '/mat/list/auth2',
+				    url: that.commonUrl + '/mat/list/pad/page/auth',
 				    data: {
 						param: {
-							curr: 1,
-							limit: 16,
-							tag_id:tagId}
+							curr: curr,
+							limit: limit,
+							tagId:tagId,
+							}
 				    },
-					method:"GET",
+					method:"POST",
 				    header: {
 						'token':uni.getStorageSync('token'),
 				    },
 					success(result) {
+						console.log(result);
 						uni.hideLoading();
 						that.tag = null
 						var res = result.data

--
Gitblit v1.9.1