chenrui %!s(int64=2) %!d(string=hai) anos
pai
achega
074e8c6b45

+ 132 - 0
pages/vinAnalyse/fitProductlist.vue

@@ -0,0 +1,132 @@
+<template>
+	<view>
+		<view class="searchBox">
+			<view class="searchBox_l"><u-search placeholder="请输入产品编码/产品名称" v-model="keyword" bg-color="#fff" :action-style="searchStyle"></u-search></view>
+			<view class="searchBox_r" @click="sortShow=true">
+				<text>排序</text>
+				<uni-icons color="#666666" type="paixu" @click="clear"></uni-icons>
+				<!-- <u-icon name="https://cdn.uviewui.com/uview/example/button.png" color="#2979ff" size="28"></u-icon> -->
+			</view>
+		</view>
+		<view class="listBox">
+			<view class="listBox_l"><image src="../../static/default/def_img@2x.png" width="100%" height="100%"></image></view>
+			<view class="listBox_r">
+				<view class="type">ddiididid</view>
+				<view class="tit">标题踢踢踢踢i</view>
+				<view class="bot u-flex u-row-between">
+					<view>
+						适配有货
+						<text>3</text>
+						次
+					</view>
+					<view>
+						适配无货
+						<text>3</text>
+						次
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- 排序弹窗 -->
+		<u-popup v-model="sortShow" mode="right">
+			<view>出淤泥而不染,濯清涟而不妖</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			searchStyle: {
+				border: '1rpx solid #189Dff',
+				marginRight: '10rpx',
+				borderRadius: '26rpx',
+				color: '#189Dff',
+				fontSize: '26rpx',
+				padding: '4rpx 10rpx'
+			},
+			sortShow:false,
+			keyword:''
+		};
+	},
+	methods: {}
+};
+</script>
+
+<style lang="less" scoped>
+page {
+	background: #ffffff;
+	padding: 20rpx;
+	display: inherit !important;
+	.searchBox {
+		width: 100%;
+		display: flex;
+		align-items: center;
+		.searchBox_l {
+			width: 80%;
+			border: 1rpx solid #e0e0e0;
+			border-radius: 36rpx;
+			box-sizing: border-box;
+		}
+		.searchBox_r {
+			width: 19%;
+			color: #9da8b5;
+			text-align: right;
+			text {
+				margin-right: 10rpx;
+			}
+		}
+	}
+	.listBox {
+		width: 100%;
+		display: flex;
+		padding: 30rpx 0;
+		border-bottom: 1rpx solid #e0e0e0;
+		.listBox_l {
+			width: 150rpx;
+			height: 150rpx;
+			overflow: hidden;
+			border-radius: 20rpx;
+			margin-right: 20rpx;
+			image {
+				width: 100%;
+				height: 100%;
+				background-color: red;
+			}
+		}
+		.listBox_r {
+			width: calc(100% - 170rpx);
+			.type {
+				color: #222;
+				font-size: 32rpx;
+			}
+			.tit {
+				margin: 10rpx 0;
+				overflow: hidden;
+				text-overflow: ellipsis;
+				display: -webkit-box;
+				-webkit-line-clamp: 1;
+				-webkit-box-orient: vertical;
+			}
+			.bot {
+				width: 100%;
+				view {
+					&::first-child {
+						color: #999;
+						text {
+							color: green;
+						}
+					}
+					&::last-child {
+						color: #999;
+						text {
+							color: red;
+						}
+					}
+				}
+			}
+		}
+	}
+}
+</style>

+ 3 - 3
pages/vinAnalyse/search.vue

@@ -65,9 +65,9 @@
 					date: '',
 					beginDate: '',
 					endDate: '',
-					airConditionerFilterFlag:1,
-					airFilterFlag:1,
-					engineOilFilterFlag:1,
+					airConditionerFilterFlag:null,
+					airFilterFlag:null,
+					engineOilFilterFlag:null,
 					vinCode: undefined, 
 					brandName: undefined,//车辆品牌
 					modelName: undefined//车型

+ 35 - 14
pages/vinAnalyse/shelfAnalyse.vue

@@ -51,9 +51,9 @@
 		<!-- 搜索弹窗 -->
 		<search :showModal="showModal" @refresh="refreshList" @close="showModal=false"/>
 		<!-- vin 详情 -->
-		<div class="cpb_cart-mask" v-if="showCart">
-			<div class="cpb_cart-box">
-				<div class="cpb_close flex align-center justify_center" @click="showCart=false">
+		<div class="cpb_cart-mask" v-if="showCart" @click="showCart=false">
+			<div class="cpb_cart-box" @click.stop="showCart=true">
+				<div class="cpb_close flex align-center justify_center" @click.stop="showCart=false">
 					<u-icon name="close"></u-icon>
 				</div>
 				<div class="cpb_cart-tit">
@@ -72,9 +72,9 @@
 				</div>
 				<div class="cpb_body flex justify_between">
 					<div class="cpb_tab">
-						<div :class="selFlag==0?'active':''" @click="changeSel(0)">空调滤清器</div>
-						<div :class="selFlag==1?'active':''" @click="changeSel(1)">空气滤清器</div>
-						<div :class="selFlag==2?'active':''" @click="changeSel(2)">机油滤清器</div>
+						<div :class="selFlag==0?'active':''" @click.stop="changeSel(0)">空调滤清器</div>
+						<div :class="selFlag==1?'active':''" @click.stop="changeSel(1)">空气滤清器</div>
+						<div :class="selFlag==2?'active':''" @click.stop="changeSel(2)">机油滤清器</div>
 					</div>
 					<div class="cpb_cart-list" v-if="productList.length>0">
 							<div 
@@ -109,8 +109,8 @@
 							</view>
 						</div>
 					</div>
-					<view class="cpb_cart-list" v-else>
-						<u-empty text="数据为空" mode="data"></u-empty>
+					<view v-else class="emptyStyle">
+						<u-empty :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="150" text="暂无匹配产品" mode="list"></u-empty>
 					</view>
 				</div>
 		</div>
@@ -147,12 +147,13 @@
 				tempData: null,
 				productList: [],
 				shelfSn:'',//货架名称,
-				selFlag:0
+				selFlag:0,
+				pullDownRefresh:false//下拉刷新
 			}
 		},
 		onNavigationBarButtonTap(e){
 			uni.navigateTo({
-				url:"/pages/vinAnalyse/shelfAnalyse?data="+encodeURIComponent(JSON.stringify(this.detail))
+				url:"/pages/vinAnalyse/fitProductlist"
 			})
 		},
 		onBackPress(e) {
@@ -174,12 +175,15 @@
 		onLoad(option) {
 			this.shelfSn = option.shelfSn
 			let ajaxData={
-				shelf_sn:option.shelfSn,
+				shelfSn:option.shelfSn,
 				pageNo: this.pageNo, 
 				pageSize: this.pageSize 
 			}
 			this.getList(ajaxData);
-			this.theme = getApp().globalData.theme
+			this.theme = getApp().globalData.theme;
+			uni.setNavigationBarTitle({
+				title:option.shelfName
+			})
 		},
 		methods:{
 			toPage(url){
@@ -194,7 +198,7 @@
 				this.totalNum = 0
 				delete val.date;
 				let ajaxData={
-					shelf_sn:this.shelfSn,
+					shelfSn:this.shelfSn,
 					pageNo:1, 
 					pageSize: this.pageSize 
 				}
@@ -221,6 +225,10 @@
 						this.noDataText = res.message
 					}
 					this.status = "loadmore"
+					if(this.pullDownRefresh){
+						uni.stopPullDownRefresh();
+					}
+					
 				})
 			},
 			changeSel(num){
@@ -250,7 +258,7 @@
 			if(this.listData.length < this.totalNum){
 				this.pageNo += 1
 				let ajaxData={
-					shelf_sn:this.shelfSn,
+					shelfSn:this.shelfSn,
 					pageNo: this.pageNo, 
 					pageSize: this.pageSize 
 				}
@@ -258,6 +266,16 @@
 			}else{
 				this.status = "nomore"
 			}
+		},
+		onPullDownRefresh(){
+			this.pullDownRefresh= true;
+			this.pageNo =1
+			let ajaxData={
+				shelfSn:this.shelfSn,
+				pageNo: this.pageNo, 
+				pageSize: this.pageSize 
+			}
+			this.getList(ajaxData)
 		}
 	}
 </script>
@@ -266,6 +284,9 @@
 	.shelf-analyse-content{
 		width:100%;
 		height: 100vh;
+		.emptyStyle{
+			margin:auto;
+		}
 		.checkbox-price{
 			background-color: #fff;
 			display: flex;

+ 1 - 1
pages/vinAnalyse/shelfList.vue

@@ -122,7 +122,7 @@
 			},
 			viewDetail(item){
 				uni.navigateTo({
-					url:"/pages/vinAnalyse/shelfAnalyse?shelfSn="+item.shelfSn
+					url:"/pages/vinAnalyse/shelfAnalyse?shelfSn="+item.shelfSn + '&shelfName='+item.shelfName
 				})
 			},
 		},