From 8f9c8986975ce99fea8bdc6e965699895ebaf4fd Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期四, 21 七月 2022 14:05:08 +0800
Subject: [PATCH] #

---
 pages/basics/pakin.vue |   61 +++++++++++++++++-------------
 1 files changed, 34 insertions(+), 27 deletions(-)

diff --git a/pages/basics/pakin.vue b/pages/basics/pakin.vue
index 47f3054..b1fb132 100644
--- a/pages/basics/pakin.vue
+++ b/pages/basics/pakin.vue
@@ -22,14 +22,14 @@
 					<view class="title-text"><text>妫�绱㈠晢鍝�</text></view>
 				</view>
 				<view class="square-content">
-					<view class="content-input-btn">
+					<view class="content-input">
 						<input v-model="matnr" type="text" placeholder="鎵爜 / 杈撳叆" @input="findMat()"
 						:focus="focus" placeholder-style="margin-top:9px">
 						<uni-icons type="closeempty" size="20" color="#dadada" @click="removeMatnr()"></uni-icons>
 					</view>
-					<view class="content-btn">
+					<!-- <view class="content-btn">
 						<button class="cu-btn bg-blue pda-btn" @click="selectMat()">+鎻愬彇</button>
-					</view>
+					</view> -->
 				</view>
 			</view>
 			
@@ -60,7 +60,7 @@
 						</view>
 					</view>
 					<view class="data-list-right">
-						<label><uni-icons type="compose" size="20" color="#a5a5a5" @click="revise(item,index)"></uni-icons></label>
+						<label><uni-icons type="compose" size="20" color="#a5a5a5" @click="revise(index)"></uni-icons></label>
 						<label><uni-icons type="trash" size="25" color="#a5a5a5" @click="remove(item,index)"></uni-icons></label>
 					</view>
 				</view>
@@ -98,7 +98,7 @@
 				</view>
 				<view class="changeBox">
 					<view class="num-box">
-						<uni-number-box v-model="count" :min="minCount" :max="maxCount" color="#747474"  @change="changeValue"/>
+						<uni-number-box v-model="counts" :min="0" :max="99999" color="#747474" />
 					</view> 
 				</view>
 				<view class="revise-box-buttom">
@@ -126,7 +126,7 @@
 				matList:[],
 				result: '',
 				enableQty:'',
-				count:'',
+				counts:'',
 				minCount:0,
 				maxCount:'',
 				rowNum:'',
@@ -242,7 +242,6 @@
 						'token':uni.getStorageSync('token')
 				    },
 					success(result) {
-						console.log(result)
 						uni.hideLoading();
 						var res = result.data
 						if (res.code === 200) {
@@ -296,7 +295,6 @@
 						'token':uni.getStorageSync('token')
 				    },
 					success(result) {
-						console.log(result)
 						uni.vibrateShort();
 						let res = result.data
 						if (res.code === 200 && res.data) {
@@ -308,7 +306,6 @@
 								    // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
 								    matList: function(data) {
 										that.matList.push(data.data)
-										console.log(that.matList)
 									},
 								},
 								success: function(res) {
@@ -352,27 +349,37 @@
 				}
 				uni.vibrateShort();
 			},
-			revise(item,index) {
-				var maxCount = this.matList[index].maxCount
-				if (maxCount == undefined ) {
-					this.matList[index]["maxCount"] = item.enableQty
-				} 
-				this.enableQty = item.enableQty
-				this.count = this.minCount
-				this.maxCount = item.maxCount
+			revise(index) {
+				
 				this.rowNum = index
-				this.eject()
-			},
-			eject(type) {
-				this.type = type
-				// open 鏂规硶浼犲叆鍙傛暟 绛夊悓鍦� uni-popup 缁勪欢涓婄粦瀹� type灞炴��
-				this.$refs.revise.open(type)
-			},
-			changeValue() {
+				
+				this.$refs.revise.open()
+				
+				
+				// this.matList[this.rowNum].count = this.count
+				// this.eject()
+				// var maxCount = this.item.maxCount
+				// if (maxCount == undefined ) {
+				// 	this.matList[index]["maxCount"] = item.enableQty
+				// } 
+				// this.enableQty = item.enableQty
+				// this.count = this.minCount
+				// this.maxCount = item.maxCount
+				
 				
 			},
+			eject() {
+				// this.type = type
+				// open 鏂规硶浼犲叆鍙傛暟 绛夊悓鍦� uni-popup 缁勪欢涓婄粦瀹� type灞炴��
+				this.$refs.revise.open()
+			},
+			
+			// 纭缁勬墭鏁伴噺
 			confirm() {
-				this.matList[this.rowNum].anfme = this.count
+				this.matList[this.rowNum].count = this.counts
+				this.matList = this.matList
+				console.log(this.counts)
+				console.log(this.matList[this.rowNum].count)
 				this.$refs.revise.close()
 			},
 			// 鍒楄〃鍙嶉��
@@ -539,7 +546,7 @@
 		margin-top: 20rpx;
 	}
 	.data-list:last-child {
-		margin-bottom: 120rpx;
+		margin-bottom: 170rpx;
 	}
 	/* .data-list-left {
 		display: inline-block;

--
Gitblit v1.9.1