From eabfdea3f6f37bdcc63d79dccd062210d345d5c2 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期一, 20 三月 2023 08:43:08 +0800
Subject: [PATCH] #

---
 pages/pakin/pakin.vue |  142 +++++++++++++++++++++++++++++++---------------
 1 files changed, 95 insertions(+), 47 deletions(-)

diff --git a/pages/pakin/pakin.vue b/pages/pakin/pakin.vue
index 2ecd03f..56b9ec9 100644
--- a/pages/pakin/pakin.vue
+++ b/pages/pakin/pakin.vue
@@ -9,7 +9,7 @@
 				<view class="code-decs">鐗╂枡鐮�:</view>
 				<input type="text" placeholder=" 鎵爜 / 杈撳叆">
 				<view class="item-right">
-					<text style="text-align: right;">鎻愬彇+</text>
+					<text style="text-align: right;color: #409EFF;">鎻愬彇+</text>
 					<uni-icons type="right" color="#c1c1c1"></uni-icons>
 				</view>
 			</view>
@@ -22,35 +22,72 @@
 				<view class="list-left">
 					<view class="list-left-item">
 						<view class="desc">No锛�</view>
-						<view>{{i + 1}}</view>
+						<view class="left-item">{{i + 1}}</view>
 					</view>
 					<view class="list-left-item">
 						<view class="desc">缂栫爜锛�</view>
-						<view>{{item.matnr}}</view>
+						<view class="left-item">{{item.matnr}}</view>
 					</view>
 					<view class="list-left-item">
 						<view class="desc">鍝佸悕锛�</view>
-						<view>{{item.maktx}}</view>
+						<view class="left-item">{{item.maktx}}</view>
 					</view>
 					<view class="list-left-item">
 						<view class="desc">瑙勬牸锛�</view>
-						<view>{{item.specs}}</view>
+						<view class="left-item">{{item.specs}}</view>
 					</view>
 					<view class="list-left-item">
 						<view class="desc">鎵瑰彿锛�</view>
-						<view>{{item.batch}}</view>
+						<view class="left-item">{{item.batch}}</view>
 					</view>
 					<view class="list-left-item">
 						<view class="desc">鏁伴噺锛�</view>
-						<view>{{item.anfme}}</view>
+						<view class="left-item">{{item.anfme}}</view>
 					</view>
 				</view>
 				<view class="list-right">
-					<uni-icons type="compose" color="#c1c1c1" size="24"></uni-icons>
-					<uni-icons type="trash" color="#c1c1c1" size="24"></uni-icons>
+					<uni-icons type="compose" color="#c1c1c1" size="24" @click="revise(item,i)"></uni-icons>
+					<uni-icons type="trash" color="#c1c1c1" size="24" @click="remove(item,i,'warn')"></uni-icons>
 				</view>
 			</view>
 		</scroll-view>
+		<!-- 搴曢儴鎿嶄綔鎸夐挳 -->
+		<view class="buttom">
+			<button size="mini">閲嶇疆</button>
+			<button size="mini" type="primary">缁勬墭</button>
+		</view>
+		<!-- 寮圭獥 -->
+		<!-- 淇敼鏁伴噺 -->
+		<view>
+			<uni-popup ref="revise" type="dialog">
+				<view class="popup">
+					<!-- 鏍囬 -->
+					<view class="title">淇敼</view>
+					<view class="popup-item">
+						<view class="popup-item-left">鍚堝悓鍙�:</view>
+						<view class="popup-item-right"><input type="text" v-model="batch"></view>
+					</view>
+					<view class="popup-item">
+						<view class="popup-item-left">鏁伴噺:</view>
+						<view class="popup-item-right" style="border: none;justify-content: center;">
+							<uni-number-box :value="count" :max="9999999" color="#747474"  @change="changeValue"/>
+						</view>
+					</view>
+					<view class="btn">
+						<view class="btn-left" @click="close">鍙栨秷</view>
+						<view class="btn-right" @click="confirm()">纭</view>
+					</view>
+				</view>
+			</uni-popup>
+		</view>
+		<!-- 鍒犻櫎纭 -->
+		<view>
+			<!-- 鎻愮ず绐楃ず渚� -->
+			<uni-popup ref="alertDialog" type="dialog">
+				<uni-popup-dialog :type="msgType" title="閫氱煡" content="鏄惁鍒犻櫎褰撳墠鍟嗗搧!" @confirm="removeConfirm"
+					@close="removeClose"></uni-popup-dialog>
+			</uni-popup>
+		</view>
 	</view>
 </template>
 
@@ -58,8 +95,10 @@
 	export default {
 		data() {
 			return {
-				dataList: [{
-					matnr: "whycq19950520222222-23232",
+				dataList: 
+				[
+				{
+					matnr: "whycq19950222222-232321111",
 					maktx: "wusuowei",
 					specs: "涓�",
 					batch: "鎵瑰彿",
@@ -101,23 +140,64 @@
 					batch: "鎵瑰彿",
 					anfme: "12"
 				}
-				]
+				],
+				count: 0,
+				rowNum: '',
+				batch: '',
+				msgType: 'success',
 			}
 		},
 		onLoad() {
 	
 		},
-		methods: {}
+		methods: {
+			revise(item,i) {
+				this.count = this.dataList[i].anfme
+				this.batch = this.dataList[i].batch
+				this.rowNum = i
+				this.eject()
+			},
+			eject(type) {
+				this.type = type
+				this.$refs.revise.open(type)
+			},
+			// 鍒楄〃鍒犻櫎鎸夐挳
+			remove(item,i,type) {
+				this.msgType = type
+				this.$refs.alertDialog.open(i)
+			},
+			// 纭鍒犻櫎
+			removeConfirm(i) {
+				this.dataList.splice(i,1)
+			},
+			// 鍙栨秷鍒犻櫎
+			removeClose() {
+				this.$refs.alertDialog.close()
+			},
+			confirm() {
+				this.dataList[this.rowNum].anfme = this.count
+				this.dataList[this.rowNum].batch = this.batch
+				this.$refs.revise.close()
+				this.$forceUpdate() // 寮哄埗鍒锋柊
+			},
+			close() {
+				this.$refs.revise.close()
+			},
+			changeValue(value) {
+				this.count = value
+			},
+		}
 	}
 </script>
 
 <style>
+	@import url('../../static/css/wms.css/wms.css');
 	.code {
 		width: 100%;
 		position: fixed;
 		min-height: 200rpx;
 		background-color: #FFF;
-		z-index: 999;
+		z-index: 10;
 	}
 	.item {
 		display: flex;
@@ -151,41 +231,9 @@
 		background-color: white;
 		position: fixed;
 		margin-top: 200rpx;
-		z-index: 998;
+		z-index: 9;
 		/* border-top: 1px solid #DCDFE6; */
 		text-align: center;
 		box-shadow: 0px 0px 30px 0px rgba(0,0,0,0.5);
-	}
-	
-	.list {
-		display: flex;
-		min-height: 80rpx;
-		background-color: #FFF;
-		margin-top: 20rpx;
-		box-shadow: 0px 0px 30px 0px rgba(0,0,0,0.3);
-	}
-	.list:first-child {
-		margin-top: 310rpx;
-	}
-	.list:last-child {
-		margin-bottom: 120rpx;
-	}
-	.list-left {
-		display: flex;
-		flex-direction: column;
-		margin-left: 20rpx;
-		width: 80vw;
-	}
-	.list-left-item {
-		min-height: 40rpx;
-		line-height: 40rpx;
-		display: flex;
-	}
-	.list-right {
-		display: flex;
-		width: 20vw;
-		justify-content: space-between;
-		align-items: center;
-		margin-right: 20rpx;
 	}
 </style>
\ No newline at end of file

--
Gitblit v1.9.1