From 08fce1f03f21b9bba84f30a8f4d2179afc5d95c7 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期三, 31 八月 2022 15:03:29 +0800
Subject: [PATCH] #

---
 pages/basics/putOnSale.vue |   66 ++++++-------
 pages/basics/offLines.vue  |   56 ++++++++++
 static/css/putOnSale.css   |  110 +++++++++++++---------
 pages/index/index.vue      |   24 ++--
 4 files changed, 159 insertions(+), 97 deletions(-)

diff --git a/pages/basics/offLines.vue b/pages/basics/offLines.vue
index b16073d..8b20d8e 100644
--- a/pages/basics/offLines.vue
+++ b/pages/basics/offLines.vue
@@ -8,7 +8,7 @@
 			</view>
 			<view class="square-content">
 				<view class="content-input">
-					<input type="text" v-model="yyds" placeholder="鎵爜 / 杈撳叆" @input="find" :focus="focus">
+					<input type="text" v-model="matnr" placeholder="鎵爜 / 杈撳叆" @input="find" :focus="focus">
 					<uni-icons type="closeempty" size="20" color="#dadada"></uni-icons>
 				</view>
 			</view>
@@ -21,11 +21,41 @@
 			</view>
 			<view class="square-content">
 				<view class="content-input">
-					<input type="text" v-model="yyds" placeholder="鎵爜 / 杈撳叆" @input="find" :focus="focus">
+					<input type="text" v-model="locno" placeholder="鎵爜 / 杈撳叆" @input="find" :focus="focus">
 					<uni-icons type="closeempty" size="20" color="#dadada"></uni-icons>
 				</view>
 			</view>
 		</view>
+		
+		<!-- 鍟嗗搧鍒楄〃琛ㄥご -->
+		<view class="square-1">
+			<view class="square-title">
+				<view class="title-sign"><view class="sign"></view></view>
+				<view class="title-text"><text>鍟嗗搧鍒楄〃</text></view>
+			</view>
+		</view>
+		
+		<view class="square-none" v-show="matList.length == 0">
+			<view class="v-show">鏆傛棤鏇村鏁版嵁...</view>
+		</view>
+		
+		<checkbox-group>
+			<view v-for="(item,index) in matList" :key="index" class="data-list bg-false" :class="'bg-'+item.checked" >
+				<view class="data-list-left">
+					<view class="matnr"><text style="width: 400rpx;">缂栫爜锛歿{item.matnr}}</text></view>
+					<view><text style="width: 400rpx;">鍝佸悕锛歿{item.maktx}}</text></view>
+					<view><text style="width: 400rpx;">鎵瑰彿锛歿{item.batch}}</text></view>
+					<view>
+						<text style="width: 400rpx;">鏁伴噺锛歿{item.anfme}}</text>
+					</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="trash" size="25" color="#a5a5a5" @click="removeItem(item,index)"></uni-icons></label>
+				</view>
+			</view>
+		</checkbox-group>
+		
 		<!-- 搴曢儴鎸夐挳 -->
 		<view class="footer flex justify-around">
 			<!-- <label class="label-btn" style="width: 170rpx;">
@@ -48,11 +78,29 @@
 
 <script>
 	 export default {
-		 data() {
+		data() {
 		 	return {
-				yyds:'',
+				matnr: '',
+				locno: '',
+				matList: [],
 				focus:true
 			}
+		},
+		methods: {
+			comb() {
+				let that = this
+				var offSaleParam = {}
+				offSaleParam['locNo'] = 'NA002'
+				offSaleParam['matnr'] = 'YJ2022081808312309'
+				uni.request({
+					url:'http://localhost:8081/lywms/mobile/mat/offSale/auth',
+					data:JSON.stringify(offSaleParam),
+					method:'POST',
+					success(result) {
+						console.log(result);
+					}
+				})
+			}
 		}
 	 }
 </script>
diff --git a/pages/basics/putOnSale.vue b/pages/basics/putOnSale.vue
index a3ad205..9543a19 100644
--- a/pages/basics/putOnSale.vue
+++ b/pages/basics/putOnSale.vue
@@ -1,10 +1,10 @@
 <template>
 	<view>
-		<!-- 搴撲綅鐮佽緭鍏ユ -->
+		<!-- 搴撲綅鍙疯緭鍏ユ -->
 		<view class="square-2">
 			<view class="square-title">
 				<view class="title-sign"><view class="sign"></view></view>
-				<view class="title-text"><text>搴撲綅鐮�</text></view>
+				<view class="title-text"><text>搴撲綅鍙�</text></view>
 			</view>
 			<view class="square-content">
 				<view class="content-input">
@@ -31,18 +31,6 @@
 			</view>
 		</view>
 		
-		<!-- <view class="square-2">
-			<view class="square-title">
-				<view class="title-sign"><view class="sign"></view></view>
-				<view class="title-text"><text>鍟嗗搧鐮�</text></view>
-			</view>
-			<view class="square-content">
-				<view class="content-input">
-					<input type="text" v-model="matnr" placeholder="鎵爜 / 杈撳叆" @input="findMat" :focus="matnrFocus">
-					<uni-icons v-show="matnr" type="closeempty" size="20" color="#dadada" @click="remove('matnr')"></uni-icons>
-				</view>
-			</view>
-		</view> -->
 		<!-- 鍟嗗搧鍒楄〃琛ㄥご -->
 		<view class="square-1">
 			<view class="square-title">
@@ -51,31 +39,13 @@
 			</view>
 		</view>
 		
-		<view class="square-none">
-			<view class="v-show" v-show="matList.length == 0">鏆傛棤鏇村鏁版嵁...</view>
+		<view class="square-none" v-show="matList.length == 0">
+			<view class="v-show">鏆傛棤鏇村鏁版嵁...</view>
 		</view>
-		
-		<!-- 鍟嗗搧鍒楄〃 -->
-		<!-- <checkbox-group >
-			<view v-for="(item,index) in matList" :key="index" class="data-list bg-false" :class="'bg-'+item.checked" >
-				<view class="list-left">
-					<view class="lists-item">No:{{listNum}}</view>
-					<view class="lists-item">鍟嗗搧缂栫爜锛歿{item.matnr}}</view>
-					<view class="lists-item">鍟嗗搧鎵瑰彿锛歿{item.batch}}</view>
-					<view class="lists-item">涓婃灦鏁伴噺锛歿{item.anfme}}</view>
-				</view>
-				<view class="list-right">
-					<uni-icons type="trash" size="20" color="#a5a5a5" @click="removeItem(item,index)"></uni-icons>
-				</view>
-			</view>
-		</checkbox-group> -->
 		
 		<checkbox-group>
 			<view v-for="(item,index) in matList" :key="index" class="data-list bg-false" :class="'bg-'+item.checked" >
 				<view class="data-list-left">
-					<!-- <view>
-						<checkbox :value="item.id+''" :checked="item.checked" style="display: block;" />
-					</view> -->
 					<view class="matnr"><text style="width: 400rpx;">缂栫爜锛歿{item.matnr}}</text></view>
 					<view><text style="width: 400rpx;">鍝佸悕锛歿{item.maktx}}</text></view>
 					<view><text style="width: 400rpx;">鎵瑰彿锛歿{item.batch}}</text></view>
@@ -85,7 +55,7 @@
 				</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="trash" size="25" color="#a5a5a5" @click="remove(item,index)"></uni-icons></label>
+					<label><uni-icons type="trash" size="25" color="#a5a5a5" @click="removeItem(item,index)"></uni-icons></label>
 				</view>
 			</view>
 		</checkbox-group>
@@ -247,7 +217,20 @@
 					header: { 'token':uni.getStorageSync('token'),},
 					method:'POST',
 					success(result) {
-						console.log(result)
+						var res = result
+						if (res.code === 200) {
+							uni.showToast({title: res.msg, icon: "none", position: 'top'});
+							that.resst()
+						} 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'})
+						}
 					}
 				})
 			},
@@ -297,4 +280,15 @@
 
 <style>
 	@import url(@/static/css/putOnSale.css);
+	.footer {
+		width: 100%;
+		height: 100rpx;
+		line-height: 100rpx;
+		background-color: #FFF;
+		position: fixed;
+		bottom: 0;
+		border-top: 1px solid #d8d8d8;
+		border-radius: 20rpx 20rpx 0 0 ;
+		z-index: 1;
+	}
 </style>
\ No newline at end of file
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 8bd2c0d..3abdcc8 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -24,12 +24,12 @@
 			return {
 				elements:[
 					
-					// {
-					// 	title: '涓嬫灦绠$悊',
-					// 	name: 'offLines',
-					// 	color: 'blue',
-					// 	cuIcon: 'copy'
-					// },
+					{
+						title: '涓嬫灦绠$悊',
+						name: 'offLines',
+						color: 'blue',
+						cuIcon: 'copy'
+					},
 					{
 						title: '缁勬墭鍏ュ簱',
 						name: 'pakin',
@@ -48,12 +48,12 @@
 						color: 'blue',
 						cuIcon: 'searchlist'
 					},
-					// {
-					// 	title: '涓婃灦',
-					// 	name: 'putOnSale',
-					// 	color: 'blue',
-					// 	cuIcon: 'video'
-					// },
+					{
+						title: '涓婃灦',
+						name: 'putOnSale',
+						color: 'blue',
+						cuIcon: 'video'
+					},
 					{
 						title: '鍗曟嵁鍑哄簱',
 						name: 'orderOut',
diff --git a/static/css/putOnSale.css b/static/css/putOnSale.css
index 0ba664b..e1c5594 100644
--- a/static/css/putOnSale.css
+++ b/static/css/putOnSale.css
@@ -1,3 +1,23 @@
+.revise-box {
+	width: 400rpx;
+	height: 300rpx;
+	border-radius: 25px;
+}
+.revise-box-top {
+	width: 400rpx;
+	height: 120rpx;
+	border-radius: 25px;
+}
+.changeBox {
+	width: 400rpx;
+	height: 100rpx;
+}
+.num-box {
+	margin-left: 100rpx;
+}
+.revise-box-buttom{
+	margin-left: 130rpx;
+}
 .bg-false {
 	background-color: #FFFFFF;
 }
@@ -5,49 +25,49 @@
 	background-color: #ebebeb;
 }
 .data-list {
-		border-bottom: 1px solid #d8d8d8;
-		height: 180rpx;
-		margin: 15rpx;
-		border-radius: 20rpx;
-	}
-	.data-list:first-child {
-		margin-top: 20rpx;
-	}
-	.data-list:last-child {
-		margin-bottom: 120rpx;
-	}
-	/* .data-list-left {
-		display: inline-block;
-		float: left;
-		text-align: center;
-		width: 100rpx;
-		height: 180rpx;
-		line-height: 180rpx;
-	} */
-	.data-list-left {
-		display: inline-block;
-		float: left;
-		margin-left: 6%;
-		height: 180rpx;
-		color: #676767;
-	}
-	.matnr {
-		padding-top: 10rpx;
-	}
-	.data-list-right {
-		display: inline-block;
-		float: right;
-		height: 180rpx;
-		line-height: 180rpx;
-	}
-	/* display: inline-block;
-	float: right;
-	width: 200rpx;
+	border-bottom: 1px solid #d8d8d8;
 	height: 180rpx;
-	line-height: 180rpx; */
-	.data-list-right label {
-		display: inline-block;
-		float: left;
-		width: 80rpx;
-		height: 180rpx;
-	}
\ No newline at end of file
+	margin: 15rpx;
+	border-radius: 20rpx;
+}
+.data-list:first-child {
+	/* margin-top: 20rpx; */
+}
+.data-list:last-child {
+	margin-bottom: 120rpx;
+}
+/* .data-list-left {
+	display: inline-block;
+	float: left;
+	text-align: center;
+	width: 100rpx;
+	height: 180rpx;
+	line-height: 180rpx;
+} */
+.data-list-left {
+	display: inline-block;
+	float: left;
+	margin-left: 6%;
+	height: 180rpx;
+	color: #676767;
+}
+.matnr {
+	padding-top: 10rpx;
+}
+.data-list-right {
+	display: inline-block;
+	float: right;
+	height: 180rpx;
+	line-height: 180rpx;
+}
+/* display: inline-block;
+float: right;
+width: 200rpx;
+height: 180rpx;
+line-height: 180rpx; */
+.data-list-right label {
+	display: inline-block;
+	float: left;
+	width: 80rpx;
+	height: 180rpx;
+}
\ No newline at end of file

--
Gitblit v1.9.1