chenrui пре 2 година
родитељ
комит
b02a41b11f
2 измењених фајлова са 52 додато и 39 уклоњено
  1. 32 20
      pages/vinAnalyse/fitProductlist.vue
  2. 20 19
      pages/vinAnalyse/shelfAnalyse.vue

+ 32 - 20
pages/vinAnalyse/fitProductlist.vue

@@ -1,27 +1,30 @@
 <template>
 <template>
 	<view class="modal-box">
 	<view class="modal-box">
-		<view class="headerName u-flex">
-			<text></text>
-			<view class="shelfName u-line-1">{{shelfName}}</view>
-		</view>
-		<view class="searchBox">
-			<view class="searchBox_l">
-				<u-search
-					placeholder="请输入产品编码/产品名称"
-					@change="getSearchCon"
-					@search="getSearchCon"
-					@custom="getSearchCon"
-					@clear="clearSearch"
-					v-model="keyword"
-					bg-color="#fff"
-					:action-style="searchStyle"
-				></u-search>
+		<view class="header_box">
+			<view class="headerName u-flex">
+				<text></text>
+				<view class="shelfName u-line-1">{{shelfName}}</view>
 			</view>
 			</view>
-			<view class="searchBox_r" @click="sortShow = true">
-				<text>排序</text>
-				<u-icon color="#666666" name="paixu" custom-prefix="iscm-icon"></u-icon>
+			<view class="searchBox">
+				<view class="searchBox_l">
+					<u-search
+						placeholder="请输入产品编码/产品名称"
+						@change="getSearchCon"
+						@search="getSearchCon"
+						@custom="getSearchCon"
+						@clear="clearSearch"
+						v-model="keyword"
+						bg-color="#fff"
+						:action-style="searchStyle"
+					></u-search>
+				</view>
+				<view class="searchBox_r" @click="sortShow = true">
+					<text>排序</text>
+					<u-icon color="#666666" name="paixu" custom-prefix="iscm-icon"></u-icon>
+				</view>
 			</view>
 			</view>
 		</view>
 		</view>
+		<view style="height:126rpx;"></view>
 		<view v-if="list.length > 0">
 		<view v-if="list.length > 0">
 			<view class="listBox" v-for="(item, i) in list" :key="i">
 			<view class="listBox" v-for="(item, i) in list" :key="i">
 				<view class="listBox_l"><image :src="item.images ? item.images : `../../static/${theme}/def_img@2x.png`" width="100%" height="100%"></image></view>
 				<view class="listBox_l"><image :src="item.images ? item.images : `../../static/${theme}/def_img@2x.png`" width="100%" height="100%"></image></view>
@@ -259,8 +262,16 @@ export default {
 	background: #ffffff;
 	background: #ffffff;
 	padding: 20rpx;
 	padding: 20rpx;
 	width: 100%;
 	width: 100%;
+	.header_box{
+		width: 100%;
+		padding: 0 20rpx;
+		position: fixed;
+		top:0;
+		left:0;
+		z-index: 999;
+		background-color: #fff;
 	.headerName{
 	.headerName{
-		padding: 15rpx 0;
+		padding-bottom: 15rpx;
 		color: #222;
 		color: #222;
 		font-size: 30rpx;
 		font-size: 30rpx;
 		text{
 		text{
@@ -295,6 +306,7 @@ export default {
 			}
 			}
 		}
 		}
 	}
 	}
+	}
 	.listBox {
 	.listBox {
 		width: 100%;
 		width: 100%;
 		display: flex;
 		display: flex;

+ 20 - 19
pages/vinAnalyse/shelfAnalyse.vue

@@ -12,7 +12,7 @@
 				<text>筛选</text> <u-icon name="arrow-down"></u-icon>
 				<text>筛选</text> <u-icon name="arrow-down"></u-icon>
 			</view>
 			</view>
 		</view>
 		</view>
-		<scroll-view class="product-list" scroll-y>
+		<scroll-view class="product-list" scroll-y @scrolltolower="onreachBottom">
 			<view class="st-detailList-main">
 			<view class="st-detailList-main">
 				<view class="st-detailList-main-item" v-for="(item, index) in listData" :key="item.id" @click="toViewDetail(item)">
 				<view class="st-detailList-main-item" v-for="(item, index) in listData" :key="item.id" @click="toViewDetail(item)">
 					<view class="st-detailList-item-con flex align_center">
 					<view class="st-detailList-item-con flex align_center">
@@ -265,22 +265,23 @@
 					}
 					}
 				})
 				})
 				 
 				 
-			}
-		},
-		//到底部加载更多
-		onReachBottom() {
-			if(this.listData.length < this.totalNum){
-				this.pageNo += 1
-				let ajaxData={
-					shelfSn:this.shelfSn,
-					pageNo: this.pageNo, 
-					pageSize: this.pageSize 
+			},
+			//到底部加载更多
+			onreachBottom() {
+				if(this.listData.length < this.totalNum){
+					this.pageNo += 1
+					let ajaxData={
+						shelfSn:this.shelfSn,
+						pageNo: this.pageNo, 
+						pageSize: this.pageSize 
+					}
+					this.getList(ajaxData)
+				}else{
+					this.status = "nomore"
 				}
 				}
-				this.getList(ajaxData)
-			}else{
-				this.status = "nomore"
-			}
+			},
 		},
 		},
+		
 		onPullDownRefresh(){
 		onPullDownRefresh(){
 			this.pullDownRefresh= true;
 			this.pullDownRefresh= true;
 			this.pageNo =1
 			this.pageNo =1
@@ -299,9 +300,8 @@
 		width:100%;
 		width:100%;
 		height: 100vh;
 		height: 100vh;
 		.headerName{
 		.headerName{
-			background:#fff;
-			vertical-align: top;
-			padding: 15rpx 20rpx;
+			background-color: #fff;
+			padding:0 20rpx;
 			color: #222;
 			color: #222;
 			font-size: 30rpx;
 			font-size: 30rpx;
 			text{
 			text{
@@ -333,8 +333,9 @@
 			}
 			}
 		}
 		}
 		.product-list{
 		.product-list{
+			height: calc(100vh - 116rpx);
 				.st-detailList-main{
 				.st-detailList-main{
-					padding: 20upx;
+					padding: 20rpx;
 					.st-detailList-main-item{
 					.st-detailList-main-item{
 						width: 100%;
 						width: 100%;
 						box-sizing: border-box;
 						box-sizing: border-box;