Browse Source

前端gjy

gjy 3 years ago
parent
commit
d207ce71d4

+ 303 - 24
pageA/product/lookup.vue

@@ -1,8 +1,15 @@
 <template>
 	<view class="content">
-		<view class="search-box">
+		
+			<view style='background:#fff;display:flex;' class="cu-bar search">
+			<view style='flex:6;' class="search-form round" >
+				<text style='color: #ccc;text-indent:6px;' class="cuIcon-search"></text>
+				<input type="text" v-model="searchKeyWord" @input="doSearch" placeholder="请输入货名或标题" confirm-type="search"></input>
+			</view>
+			<view style="width:4%;flex:1;">取消</view>
+			</view>
 			<!-- mSearch组件 如果使用原样式,删除组件元素-->
-			<mSearch class="mSearch-input-box" :mode="2" button="inside" :placeholder="defaultKeyword" @search="doSearch(false)" @input="inputChange" @confirm="doSearch(false)" v-model="keyword"></mSearch>
+			<!-- <mSearch class="mSearch-input-box" :mode="2" button="inside" :placeholder="defaultKeyword" @search="doSearch(false)" @input="inputChange" @confirm="doSearch(false)" v-model="keyword"></mSearch> -->
 			<!-- 原样式 如果使用原样式,恢复下方注销代码 -->
 			<!-- 			
 			<view class="input-box">
@@ -12,25 +19,57 @@
 			<view class="search-btn" @tap="doSearch(false)">搜索</view> 
 			-->
 			<!-- 原样式 end -->
-		</view>
 		<view class="search-keyword" @touchstart="blur">
-			<scroll-view class="keyword-list-box" v-show="isShowKeywordList" scroll-y>
-				<view class="keyword-entry" hover-class="keyword-entry-tap" v-for="row in keywordList" :key="row.keyword">
-					<view class="keyword-text" @tap="doSearch(row.keyword)">
-						<rich-text :nodes="row.htmlStr"></rich-text>
+			<scroll-view style='background:#F5F6FA;' class="keyword-list-box" v-show="isShowKeywordList&&keywordList.length>0" scroll-y>
+				<view style='background:#fff;padding:0 15px;'>
+					<view @click='tabcarchange(0)' class='line' :class='TabCur==0?"active":""'>采购</view>
+					<view @click='tabcarchange(1)' class='line'  :class='TabCur==1?"active":""'>销售</view>
+				</view>
+				<view class="introduce-section">
+					<view v-for="(item, index) in keywordList" :key="index" class="guess-item" @click="navToDetailPage(item)">
+						<view class="price-box">
+							<view class="title">{{item.title}}</view>
+							<view style='dsiplay:flex;' class='flex justify-between'>
+								<view class='address'>
+									{{item.receivePrivate}}{{item.receiveCity}}{{item.receiveArea}}{{item.receiveWarehouse}}
+								</view>
+								<view class='price' v-if='item.procurementPlanType=="期货"'>{{item.basisPrice}}<text style='font-size:13px;color:#333333;'>元/吨</text></view>
+								<view class='price' v-if='item.procurementPlanType=="现货"'>{{item.unitPrice}}<text style='font-size:13px;color:#333;'>元/吨</text></view>
+							</view>
+						</view>
+						<view class='flex justify-between'>
+							<view>
+								<view class='tag1 tag-bule radius line-pink' v-if='item.procurementPlanType=="现货"'>现货</view>
+								<view class='tag1 tag-bule radius line-pink' v-if='item.procurementPlanType=="期货"'>期货</view>
+								<view class='tag1 tag-yellow radius line-green'>{{item.goodsName}}</view>
+								<view class='tag1 tag-red radius line-yellow'>{{item.weight}}吨</view>
+							</view>
+							<view style='color:#878C9C;padding-top:5px;' v-if='item.procurementPlanType=="期货"'>今日基差</view>
+							<view style='color:#878C9C;padding-top:5px;' v-if='item.procurementPlanType=="现货"'>采购价格</view>
+						</view>
 					</view>
-					<view class="keyword-img" @tap="setkeyword(row)">
-						<image src="/static/HM-search/back.png"></image>
+					<view v-show="isLoadMore">
+						<uni-load-more :status="loadStatus"></uni-load-more>
 					</view>
 				</view>
 			</scroll-view>
+			<view style='height:80vh;' v-show="isShowKeywordList&&keywordList.length==0">
+				<view style='background:#fff;padding:0 15px;'>
+					<view @click='tabcarchange(0)' class='line' :class='TabCur==0?"active":""'>采购</view>
+					<view @click='tabcarchange(1)' class='line'  :class='TabCur==1?"active":""'>销售</view>
+				</view>
+				<view style='background:#F5F6FA;height:100%;line-height:80vh;text-align:center;'>
+					暂无相关结果
+				</view>
+			</view>
 			<scroll-view class="keyword-box" v-show="!isShowKeywordList" scroll-y>
 				<view class="keyword-block" v-if="oldKeywordList.length>0">
 					<view class="keyword-list-header">
-						<view>历史搜索</view>
+						<view style='font-size:16px;font-weight:600;'>最近搜索</view>
 						<view>
+							<image @tap="oldDelete" style='width:16px;height:16px;' src="../../static/img/jiaoyi/shanchu@3x.png"></image>
 							<!-- <image @tap="oldDelete" src="./static/delete.png"></image> -->
-							<text class="cuIcon-delete text-gray " @tap="oldDelete" ></text>
+						<!-- 	<text class="cuIcon-delete text-gray "  ></text> -->
 							
 						</view>
 					</view>
@@ -40,7 +79,7 @@
 				</view>
 				 <view class="keyword-block">
 					<view class="keyword-list-header">
-						<view>推荐搜索</view>
+						<view style='font-size:16px;font-weight:600;'>推荐搜索</view>
 						<view>
 							 <image @tap="hotToggle" :src="'/static/HM-search/attention'+forbid+'.png'"></image> 
 						</view>
@@ -61,7 +100,9 @@
 		data() {
 			return {
 				defaultKeyword: "",
-				keyword: "",
+				searchKeyWord: "",
+				pageSize:10,
+				currentPage:1,
 				oldKeywordList: [],
 				hotKeywordList: ["玉米","大豆","小麦","水稻","高粱","玉米淀粉","豆粕"],
 				keywordList: [],
@@ -71,8 +112,13 @@
 			}
 		},
 		onLoad(options) {
+			this.searchKeyWord=options.searchKeyWord
 			this.TabCur = options.TabCur
 			this.init();
+			if(this.searchKeyWord){
+				this.isShowKeywordList=truetrue
+				this.getData()
+			}
 		},
 		components: {
 			//引用mSearch组件,如不需要删除即可
@@ -100,6 +146,26 @@
 				this.isLoadMore = false
 				this.loadData()
 			},
+			getData(){
+				var param1=''
+				if (this.TabCur == 0) {
+					param1 = '/procurementPlanInfo/selectProcurementPlanInfo'
+				} else {
+					param1 = 'buy'
+				}
+				this.$api.doRequest('get', param1,{pageSize:this.pageSize,
+				currentPage:this.currentPage,searchKeyWord:this.searchKeyWord}).then(res => {
+					uni.hideLoading()
+					this.keywordList=res.data.data.records
+				})
+				.catch(res => {
+					uni.showToast({
+						title: res.errmsg,
+						icon:'none',
+						duration: 2000
+					})
+				});
+			},
 			//加载默认搜索关键字
 			loadDefaultKeyword() {
 				//定义默认搜索关键字,可以自己实现ajax请求数据再赋值,用户未输入时,以水印方式显示在输入框,直接不输入内容搜索会搜索默认关键字
@@ -176,16 +242,72 @@
 				this.forbid = this.forbid ? '' : '_forbid';
 			},
 			//执行搜索
-			doSearch(key) {
-				console.log(key)
-				console.log(this.keyword)
-				key = key ? key : this.keyword ? this.keyword : this.defaultKeyword;
-				this.keyword = key;
-				this.saveKeyword(key); //保存为历史 
-				var TabCur = this.TabCur
-				uni.navigateTo({
-					url: `/pageA/product/querylist?keywords=${key}&TabCur=${TabCur}`
+			doSearch(e) {
+				if(e.detail.value.length>0){
+					this.isShowKeywordList=true
+				}else{
+					this.isShowKeywordList=false
+				}
+				uni.showLoading({
+					title: '正在加载',
+					mask:true
 				})
+				var param1=''
+				if (this.TabCur == 0) {
+									param1 = '/procurementPlanInfo/selectProcurementPlanInfo'
+								} else {
+									param1 = 'buy'
+								}
+								this.$api.doRequest('get', param1,{pageSize:this.pageSize,
+				currentPage:this.currentPage,searchKeyWord:this.searchKeyWord}).then(res => {
+									uni.hideLoading()
+									this.keywordList=res.data.data.records
+								})
+								.catch(res => {
+									uni.showToast({
+										title: res.errmsg,
+										icon:'none',
+										duration: 2000
+									})
+								});
+				// console.log(key)
+				// console.log(this.keyword)
+				// key = key ? key : this.keyword ? this.keyword : this.defaultKeyword;
+				// this.keyword = key;
+				// this.saveKeyword(key); //保存为历史 
+				// var TabCur = this.TabCur
+				// uni.navigateTo({
+				// 	url: `/pageA/product/querylist?keywords=${key}&TabCur=${TabCur}`
+				// })
+			},
+			tabcarchange(status){
+				this.TabCur=status
+				if (this.TabCur == 0) {
+									param1 = '/procurementPlanInfo/selectProcurementPlanInfo'
+								} else {
+									param1 = 'buy'
+								}
+								this.$api.doRequest('get', param1,{pageSize:this.pageSize,
+				currentPage:this.currentPage,searchKeyWord:this.searchKeyWord}).then(res => {
+					if(res.data.code==200){
+						uni.hideLoading()
+						this.keywordList=res.data.data.records
+					}else{
+						uni.showToast({
+							title: res.data.message,
+							icon:'none',
+							duration: 2000
+						})
+					}
+									
+								})
+								.catch(res => {
+									uni.showToast({
+										title: res.errmsg,
+										icon:'none',
+										duration: 2000
+									})
+								});
 			},
 			//保存关键字到历史记录
 			saveKeyword(keyword) {
@@ -223,7 +345,29 @@
 	}
 </script>
 <style>
-	view{display:block;}
+	.search-form{
+		    background: #F5F6F9;
+	}
+	.line{
+		display:inline-block;
+		padding:5px;
+		position:relative;
+		font-size:17px;
+	}
+	.line.active{
+		font-size:19px;
+		font-weight: 900;
+	}
+	.line.active:after{
+		content:'';
+		display:block;
+		position:absolute;
+		width:18px;
+		left:50%;
+		transform: translateX(-50%);
+		bottom:0;
+		border-bottom:1px solid #22C572;
+	}
 	.search-box {width:100%;background-color:rgb(242,242,242);padding:15upx 2.5%;display:flex;justify-content:space-between;}
 	.search-box .mSearch-input-box{width: 100%;}
 	.search-box .input-box {width:85%;flex-shrink:1;display:flex;justify-content:center;align-items:center;}
@@ -231,7 +375,7 @@
 	.search-box .input-box>input {width:100%;height:60upx;font-size:32upx;border:0;border-radius:60upx;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0 3%;margin:0;background-color:#ffffff;}
 	.placeholder-class {color:#9e9e9e;}
 	.search-keyword {width:100%;background-color:rgb(242,242,242);}
-	.keyword-list-box {height:calc(100vh - 110upx);padding-top:10upx;border-radius:20upx 20upx 0 0;background-color:#fff;}
+	.keyword-list-box {background:#F5F6FA;height:calc(100vh - 110upx);padding-top:10upx;border-radius:20upx 20upx 0 0;}
 	.keyword-entry-tap {background-color:#eee;}
 	.keyword-entry {width:94%;height:80upx;margin:0 3%;font-size:30upx;color:#333;display:flex;justify-content:space-between;align-items:center;border-bottom:solid 1upx #e7e7e7;}
 	.keyword-entry image {width:60upx;height:60upx;}
@@ -245,4 +389,139 @@
 	.keyword-box .keyword-block .keyword {width:94%;padding:3px 3%;display:flex;flex-flow:wrap;justify-content:flex-start;}
 	.keyword-box .keyword-block .hide-hot-tis {display:flex;justify-content:center;font-size:28upx;color:#6b6b6b;}
 	.keyword-box .keyword-block .keyword>view {display:flex;justify-content:center;align-items:center;border-radius:60upx;padding:0 20upx;margin:10upx 20upx 10upx 0;height:60upx;font-size:28upx;background-color:rgb(242,242,242);color:#6b6b6b;}
+
+	.tag1 {
+		background:#F5F6F9;
+		padding: 5px;
+		color:#333333;
+		display: inline-flex;
+		font-size: 22rpx;
+		border-radius: 3px;
+		margin: 3px;
+	}
+	.tag {
+		background:#F5F6F9;
+		padding: 7px 12px;
+		color:#333333;
+		display: inline-flex;
+		font-size: 22rpx;
+		border-radius: 15px;
+		margin: 3px;
+	}
+	.tag-bule {
+		background: #EBEEFA;
+		color: #5C76DF;
+	}
+	.tag-green {
+		background: #C6F7BC;
+		color: #065112;
+	}
+	.tag-yellow {
+		background: #F9F2EA;
+		color: #BE9C69;
+	}
+	.tag-red {
+		background: #FEECE6;
+		color: #FE6430;
+	}
+.introduce-section .title{
+	font-size: 17px;
+	font-weight: bold;
+	height:40px;
+	line-height: 40px;
+	flex: 2.5;
+	border-bottom:1px solid #EEEEEE;
+}
+.introduce-section .address{
+	color:#878C9C;
+	font-size:12px;
+	padding:15px 0 10px;
+}
+.introduce-section .price{
+	padding:10px 0 10px;
+	color:#FD714F;
+	font-size:19px;
+	font-weight:700;
+}
+	/* 销售信息 */
+	.introduce-section {
+		background: #fff;
+		padding: 0upx 30upx 20upx;
+		margin:10px;
+		border-radius:4px;
+
+		.guess-item {
+			padding-bottom: 20upx;
+			border-bottom: 1px solid #ccc;
+		}
+
+		.title-tip {
+			flex: 1;
+		}
+
+		.price-box {
+			display: flex;
+			align-items: baseline;
+			height: 70upx;
+			padding: 10upx 0;
+			font-size: 26upx;
+			color: $uni-color-primary;
+		}
+
+		.price {
+			font-size: $font-lg + 2upx;
+		}
+
+		.m-price {
+			margin: 0 12upx;
+			color: $font-color-light;
+			text-decoration: line-through;
+		}
+
+		.coupon-tip {
+			align-items: center;
+			padding: 4upx 10upx;
+			background: $uni-color-primary;
+			font-size: $font-sm;
+			color: #fff;
+			border-radius: 6upx;
+			line-height: 1;
+			transform: translateY(-4upx);
+		}
+
+		.bot-row {
+			display: flex;
+			align-items: center;
+			height: 50upx;
+			font-size: $font-sm;
+			color: $font-color-light;
+
+			view {
+				flex: 1;
+			}
+		}
+	}
+	.side-bg{
+		position:absolute;
+		width: 64px;
+		height: 64px;
+		z-index: 1;
+	}
+	.drag {
+		position:relative;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		color: $uni-text-color-inverse;
+		width: 64px;
+		height: 64px;
+		background:transparent;
+		font-size: $uni-font-size-sm;
+		position: fixed;
+		z-index: 9;
+		
+		&.transition {
+			transition: left .3s ease,top .3s ease;
+		}
+	}
 </style>

+ 13 - 157
pageA/product/querylist.vue

@@ -84,137 +84,6 @@
 				</block>
 				</scroll-view>
 			</swiper-item>
-			<!-- <swiper-item class="tab-content" data-id="3">
-				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="onReachBottomTmp">
-					<block v-if="TabCur==2">
-					<view class="guess-section">
-						<view 
-							v-for="(item, index) in tranInfo" :key="index"
-							class="guess-item"
-							@click="navToDetailPage(item)"
-						>
-						<view class="flex justify-between padding-xs ">
-						  <view class="flex-sub padding-xs">
-							  <view class="cu-capsule radius">
-							  	<view class="cu-tag bg-blue">
-							  		{{item.startPlace }}
-							  	</view>
-							  	<view class="cu-tag line-blue">
-							  		{{item.endPlace }}
-							  	</view>
-							  </view>
-						  </view>
-						 
-						  <view class=" padding-xs">
-							  <view v-if="item.status == 0" class="cu-capsule radius">
-								<view  class="cu-tag bg-green">
-									可承运
-								</view>
-								<view class="cu-tag line-green">
-									 <text class="text-price">{{item.price }}</text>
-								</view>
-							  </view>
-							  <view v-else class="cu-capsule radius">
-							  	<view  class="cu-tag bg-red">
-							  		已结束
-							  	</view>
-							  	<view class="cu-tag line-red">
-							  		 <text class="text-price">{{item.price }}</text>
-							  	</view>
-							  </view>
-						  </view>
-						</view>
-						<view class="flex justify-between padding-xs">
-							<view class="flex-sub padding-xs">
-							  <view class="cu-capsule radius">
-								<view class="cu-tag bg-orange">
-									{{item.goodsName}}
-								</view>
-								<view class="cu-tag line-orange">
-									{{numFilter(item.total - item.tranCount) }}吨
-								</view>
-							  </view>
-							</view>
-							<view class=" text-sm padding-xs">
-								<view class=" text-sm padding-xs">
-									<text class="text-gray  text-sm text-right padding-xs-tmp ">{{item.gmtUpdate}}</text>
-								</view>
-							</view>
-						</view>
-						</view>
-						<view v-show="isLoadMore">
-						    <uni-load-more :status="loadStatus" ></uni-load-more>
-						</view>
-					</view>
-				</block>
-				</scroll-view>
-			</swiper-item> -->
-			<!-- <swiper-item class="tab-content" data-id="0">
-				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="onReachBottomTmp">
-					<block v-if="TabCur==3">
-					<view class="guess-section">
-						<view 
-							v-for="(item, index) in carInfo" :key="index"
-							class="guess-item"
-							@click="navToDetailPage(item)"
-						>
-						<view class="flex justify-between padding-xs ">
-						  <view class="flex-sub padding-xs">
-							  <view class="cu-capsule radius">
-							  	<view class="cu-tag bg-blue">
-							  		{{item.startPlace }}
-							  	</view>
-							  	<view class="cu-tag line-blue">
-							  		{{item.endPlace }}
-							  	</view>
-							  </view>
-						  </view>
-						 
-						  <view class=" padding-xs">
-							  <view v-if="item.status == 2" class="cu-capsule radius">
-								<view  class="cu-tag bg-green">
-									可委托
-								</view>
-								<view class="cu-tag line-green">
-									 <text class="text-price">{{item.price }}</text>
-								</view>
-							  </view>
-							  <view v-else class="cu-capsule radius">
-							  	<view  class="cu-tag bg-red">
-							  		已承运
-							  	</view>
-							  	<view class="cu-tag line-red">
-							  		 <text class="text-price">{{item.price }}</text>
-							  	</view>
-							  </view>
-						  </view>
-						</view>
-						<view class="flex justify-between padding-xs">
-							<view class="flex-sub padding-xs">
-							  <view class="cu-capsule radius">
-								<view class="cu-tag bg-orange">
-									{{item.driver}}
-								</view>
-								<view class="cu-tag line-orange">
-									{{item.carNo}}
-								</view>
-							  </view>
-							</view>
-							<view class=" text-sm padding-xs">
-								<view class=" text-sm padding-xs">
-									<text class="text-gray  text-sm text-right padding-xs-tmp ">{{item.gmtUpdate}}</text>
-								</view>
-							</view>
-						</view>
-						</view>
-						<view v-show="isLoadMore">
-						    <uni-load-more :status="loadStatus" ></uni-load-more>
-						</view>
-					</view>
-				</block>
-				
-				</scroll-view>
-			</swiper-item> -->
 		</swiper>
 	</view>
 </template>
@@ -229,6 +98,7 @@
 				swiperLength: 0,
 				carouselList: [],
 				windowSpuList: [],
+				keywords:'',
 				categoryPickList: [],
 				categoryButtomList: [],
 				salesTop: [],
@@ -238,8 +108,8 @@
 				carInfo:[],
 				banner: undefined,
 				isVip: false,
-				pages:1,//页数
-				limit:10 ,//每次取条目数
+				pageSize:10,
+				currentPage:1,
 				loadStatus:'loading',  //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
 				isLoadMore:false  ,//是否加载中
 				TabCur: 0,
@@ -479,30 +349,16 @@
 					})
 				}
 				else if(this.TabCur == 1){
-					that.$api.request('buy', 'getBuyListInfo', {
-						keywords: this.keywords,
-						page: pages,
-						limit:limit
-					},failres => {
-						that.$api.msg(failres.errmsg)
-						that.isLoadMore=false
-						that.loadStatus = 'nomore'
-						if(that.pages>1){that.pages-=1}
-						uni.hideLoading()
-					}).then(res => {
-						let data = res.data
-						//销售信息
-						if(data.length > 0){
-							that.buyInfo = that.buyInfo.concat(data)
-							that.isLoadMore=false
-						}
-						else{
-							if(that.pages>1){that.pages-=1}						
-							that.isLoadMore=true
-							that.loadStatus = 'nomore'
-						}
-						uni.hideLoading()
-					})
+				this.$api.doRequest('get', '/procurementPlanInfo/selectProcurementPlanInfo',{pageSize:this.pageSize,
+					currentPage:this.currentPage,keywords:this.keywords}).then(res => {
+									})
+									.catch(res => {
+										uni.showToast({
+											title: res.errmsg,
+											icon:'none',
+											duration: 2000
+										})
+									});
 				}
 				else if(this.TabCur == 2){
 					that.$api.request('tran', 'getTranListInfo', {

+ 196 - 103
pages/business/business.vue

@@ -1,62 +1,78 @@
 <template>
 	<view>
-		<view>	
-			<picker @change="locationChange" :value="location" :range="locationType">
+		<view style='background:#fff;border-bottom:1px solid #EEE;padding-bottom:10px;'>
+			<view class="cu-bar search">
+			<view style='position:absolute;left:30px;top:50%;transform: translateY(-50%);'>	
+			<picker style='display:inline-block;' @change="locationChange" :value="location" :range="locationType">
 				<view class="picker">
 					{{location>-1?locationType[location]:'请选择'}}
 				</view>
 			</picker>
+			<image style='width:10px;height:6px;margin-left:4px;position:relative;top:-2px;' src='../../static/img/jiaoyi/down.png'></image>
 		</view>
-		<view class='tag tag-bule radius line-pink'>采购</view>
-		<view class='tag tag-bule radius line-pink'>销售</view>
-		<view class="cu-bar search bg-white">
 			<view class="search-form round" @click="naviageToPage('/pageA/product/lookup?TabCur=')">
-				<text style='color: #ccc;' class="cuIcon-search"></text>
+				<text style='color: #ccc;text-indent:56px;' class="cuIcon-search"></text>
 				<input type="text" placeholder="请输入货名或标题" confirm-type="search"></input>
 			</view>
 		</view>
-		<view class='tag tag-bule radius line-pink' @click="sousuo">玉米</view>
-		<view class='tag tag-bule radius line-pink' @click="sousuo">大豆</view>
-		<view class='tag tag-bule radius line-pink' @click="sousuo">小麦</view>
-		<view class='tag tag-bule radius line-pink' @click="sousuo">水稻</view>
-		<view class='tag tag-bule radius line-pink' @click="sousuo">高粱</view>
-		<view class="introduce-section">
+		<view style='margin:0 15px;'>
+			<view class='tag radius line-pink' @click="sousuo('玉米')">玉米</view>
+			<view class='tag radius line-pink' @click="sousuo('大豆')">大豆</view>
+			<view class='tag radius line-pink' @click="sousuo('小麦')">小麦</view>
+			<view class='tag radius line-pink' @click="sousuo('水稻')">水稻</view>
+			<view class='tag radius line-pink' @click="sousuo('高粱')">高粱</view>
+		</view>
+		</view>
+		<view style='background:#fff;padding:0 15px;'>
+			<view @click='tabcarchange(0)' class='line' :class='TabCur==0?"active":""'>采购</view>
+			<view  @click='tabcarchange(1)' class='line'  :class='TabCur==1?"active":""'>销售</view>
+		</view>
+		<view v-if='buyInfo.length>0' class="introduce-section">
 			<view v-for="(item, index) in buyInfo" :key="index" class="guess-item" @click="navToDetailPage(item)">
 				<view class="price-box">
 					<view class="title">{{item.title}}</view>
-					<template v-if='item.isFutures==0'>
-
-						<view v-if="item.price !== 0" class="title-tip">
-							<text class="price-tip">¥</text>
-							<text class="price">{{item.price}}</text>
-							<text class="price-tip">元/吨</text>
-						</view>
-						<view v-else class="title-tip">
-							<text>市场价</text>
-						</view>
-					</template>
-					<view class="title-tip" v-if='item.isFutures==1'>
-						<text style='color:#828282;margin-bottom:10rpx;display:inline-block;'
-							class="price-tip">今日基差</text>&nbsp;
-						<view>
-							<text class="price-tip">¥</text>
-							<text class="price">{{item.basis}}</text>
-							<text class="price-tip">元/吨</text>
+					<view class='flex justify-between'>
+						<view class='address'>
+							{{item.receivePrivate}}{{item.receiveCity}}{{item.receiveArea}}{{item.receiveWarehouse}}
 						</view>
+						<view class='price' v-if='item.procurementPlanType=="期货"'>{{item.basisPrice}}<text style='font-size:13px;color:#333333;'>元/吨</text></view>
+						<view class='price' v-if='item.procurementPlanType=="现货"'>{{item.unitPrice}}<text style='font-size:13px;color:#333;'>元/吨</text></view>
+					</view>
+				</view>
+				<view class='flex justify-between'>
+					<view>
+						<view class='tag1 tag-bule radius line-pink' v-if='item.procurementPlanType=="现货"'>现货</view>
+						<view class='tag1 tag-bule radius line-pink' v-if='item.procurementPlanType=="期货"'>期货</view>
+						<view class='tag1 tag-yellow radius line-green'>{{item.goodsName}}</view>
+						<view class='tag1 tag-red radius line-yellow'>{{item.weight}}吨</view>
 					</view>
+					<view style='color:#878C9C;padding-top:5px;' v-if='item.procurementPlanType=="期货"'>今日基差</view>
+					<view style='color:#878C9C;padding-top:5px;' v-if='item.procurementPlanType=="现货"'>采购价格</view>
 				</view>
-				<view class='tag tag-bule radius line-pink' v-if='item.isFutures==0'>现货</view>
-				<view class='tag tag-bule radius line-pink' v-if='item.isFutures==1'>期货</view>
-				<view class='tag tag-green radius line-green'>{{item.goodsName}}</view>
-				<view class='tag tag-yellow radius line-yellow'>易粮易运</view>
 			</view>
 			<view v-show="isLoadMore">
 				<uni-load-more :status="loadStatus"></uni-load-more>
 			</view>
 		</view>
+		<view style='height:65vh;background:#F5F6FA;line-height:65vh;text-align:center;'  v-if='buyInfo.length==0'>
+			当前暂无结果
+		</view>
 		<u-back-top :scroll-top="scrollTop" tips="顶部" :custom-style="{backgroundColor: '#a0cfff',color: '#2979ff'}"
 			:iconStyle="{color: '#2979ff',fontSize: '34rpx'}" mode="square" icon="arrow-up"></u-back-top>
-		<drag-button :isDock="true" :existTabBar="true" :isIcon="true" text="发布" location="20" @btnClick="fabu" />
+			<view>
+				<view
+					id="_drag_button"
+					class="drag"
+					style="right:0;bottom:60px;"
+					@touchstart="touchstart"
+					@touchmove.stop.prevent="touchmove"
+					@touchend="touchend"
+					@click.stop.prevent="fabu"
+				>
+				<image class='side-bg' src='../../static/img/jiaoyi/ic_fabu@3x.png'></image>
+				</view>
+			</view>
+		<!-- <drag-button :isDock="true" :existTabBar="true" :isIcon="true" text="发布" location="20" @btnClick="fabu" /> -->
 	</view>
 </template>
 
@@ -67,15 +83,15 @@
 			return {
 				PageCur: "buy",
 				buyInfo: [],
-				pages: 1, //页数
 				limit: 10, //每次取条目数
 				loadStatus: 'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
 				isLoadMore: false, //是否加载中
 				showTran: true,
 				scrollTop: 0,
-				pageSize:1,
+				pageSize:10,
 				searchKeyWord:'',
-				currentPage:10,
+				receivePrivate:'',
+				currentPage:1,
 				categoryList: [{
 					title: '我要买粮',
 					id: '0'
@@ -86,9 +102,9 @@
 				TabCur: 0,
 				current: 1,
 				location: 0,
-				locationType: ['黑龙江', '河南', '山东', '安徽', '吉林', '河北', '江苏', '内蒙古自治区', '四川', '湖南', '湖北', '辽宁',
-					'江西', '云南', '新疆维吾尔自治区', '山西', '广西壮族自治区', '陕西', '广东', '甘肃', '重庆', '贵州', '浙江', '福建',
-					'宁夏回族自治区', '天津', '海南', '青海', '西藏自治区', '上海', '北京'
+				locationType: ['全国','黑龙江', '河南', '山东', '安徽', '吉林', '河北', '江苏', '内蒙古', '四川', '湖南', '湖北', '辽宁',
+					'江西', '云南', '新疆', '山西', '广西', '陕西', '广东', '甘肃', '重庆', '贵州', '浙江', '福建',
+					'宁夏', '天津', '海南', '青海', '西藏', '上海', '北京'
 				]
 			}
 		},
@@ -96,31 +112,20 @@
 			uni.showTabBar()
 		},
 		onLoad(options) {
-			// console.log("buy onload")
-			// // #ifdef H5
-			// this.headerTop = document.getElementsByTagName('uni-page-head')[0].offsetHeight + 'px';
-			// // #endif
-			// this.cateId = options.tid ? options.tid : 0;
-			// this.keywords = options.keywords ? options.keywords : ''
-			// this.loadData();
-			this.$api.doRequest('get', '/procurementPlanInfo/selectProcurementPlanInfo',{pageSize:this.pageSize,
-			currentPage:this.currentPage,searchKeyWord:this.searchKeyWord}).then(res => {
-				console.log(res)
-							})
-							.catch(res => {
-								uni.showToast({
-									title: res.errmsg,
-									icon:'none',
-									duration: 2000
-								})
-							});
+			console.log("buy onload")
+			// #ifdef H5
+			this.headerTop = document.getElementsByTagName('uni-page-head')[0].offsetHeight + 'px';
+			// #endif
+			this.cateId = options.tid ? options.tid : 0;
+			this.keywords = options.keywords ? options.keywords : ''
+			this.loadData();
 		},
 		onPageScroll(e) {
 			this.scrollTop = e.scrollTop;
 		},
 		//下拉刷新
 		onPullDownRefresh() {
-			this.pages = 1
+			this.pageSize = 1
 			this.isLoadMore = false
 			this.loadStatus = 'loading'
 			this.loadData()
@@ -133,6 +138,22 @@
 			}
 		},
 		methods: {
+			sousuo(name){
+				var page = '/pageA/product/lookup?TabCur=' + this.TabCur+'&searchKeyWord='+name
+				uni.navigateTo({
+					url: page,
+					fail() {
+						uni.switchTab({
+							url: page
+						})
+					}
+				})
+			},
+			tabcarchange(status){
+				this.TabCur=status
+				this.pageSize = 1
+				this.loadData()
+			},
 			naviageToPage(page) {
 				page = page + this.TabCur
 				uni.navigateTo({
@@ -145,18 +166,30 @@
 				})
 			},
 			locationChange(e) {
-				this.location = e.detail.value
+				
+				this.receivePrivate = e.detail.value
+				this.pageSize = 1
+				this.loadData()
 			},
 			tabSelect(e) {
 				this.TabCur = e.currentTarget.dataset.id;
 				this.category = this.TabCur
-				this.pages = 1
+				this.pageSize = 1
 				this.loadData()
 			},
 			fabu() {
-				uni.navigateTo({
-					url: `/pageB/trust/trust`
+				uni.showActionSheet({
+					itemList: ['我要买粮', '我要卖粮'],
+					success (res) {
+						console.log(res.tapIndex)
+					},
+					fail (res) {
+						console.log(res.errMsg)
+					}
 				})
+				// uni.navigateTo({
+				// 	url: `/pageB/trust/trust`
+				// })
 			},
 			//加载商品 ,带下拉刷新和上滑加载
 			async loadData(type = 'add', loading) {
@@ -171,11 +204,11 @@
 				} else {
 					param1 = 'buy'
 				}
-				
-				console.log(11111)
-				this.$api.doRequest('get', '/procurementPlanInfo/selectProcurementPlanInfo',{pageSize:this.pageSize,
-currentPage:this.currentPage,searchKeyWord:this.searchKeyWord}).then(res => {
-	console.log(res)
+				this.$api.doRequest('get', param1,{pageSize:this.pageSize,
+				showFlag:1,
+currentPage:this.currentPage,searchKeyWord:this.searchKeyWord,receivePrivate:this.receivePrivate}).then(res => {
+					uni.hideLoading()
+					this.buyInfo=res.data.data.records
 				})
 				.catch(res => {
 					uni.showToast({
@@ -221,7 +254,7 @@ currentPage:this.currentPage,searchKeyWord:this.searchKeyWord}).then(res => {
 			//详情
 			navToDetailPage(item) {
 				let id = item.id;
-				if (item.price === 0) {
+				if (item.unitPrice === 0) {
 					this.contactUs();
 				} else {
 					if (this.TabCur == 0) {
@@ -295,55 +328,81 @@ currentPage:this.currentPage,searchKeyWord:this.searchKeyWord}).then(res => {
 <style>
 	page,
 	.content {
-		// background: $page-color-base;
+		background: #F5F6FA;
+	}
+	.line{
+		display:inline-block;
+		padding:5px;
+		position:relative;
+		font-size:17px;
+	}
+	.line.active{
+		font-size:19px;
+		font-weight: 900;
+	}
+	.line.active:after{
+		content:'';
+		display:block;
+		position:absolute;
+		width:18px;
+		left:50%;
+		transform: translateX(-50%);
+		bottom:0;
+		border-bottom:1px solid #22C572;
 	}
-
 	.cu-tag.badge {
 		right: 26rpx;
 	}
-
 	.cu-item {
 		height: 80rpx;
 		display: inline-block;
 		line-height: 80rpx;
 	}
-
 	.search-form {
-		background: #fff;
-		box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
+		background: #F5F6F9;
 	}
-
 	.title-tip {
 		color: #E63113;
 		text-align: right;
 	}
-
+	
+	.tag1 {
+		background:#F5F6F9;
+		padding: 5px;
+		color:#333333;
+		display: inline-flex;
+		font-size: 22rpx;
+		border-radius: 3px;
+		margin: 3px;
+	}
+	.tag {
+		background:#F5F6F9;
+		padding: 7px 12px;
+		color:#333333;
+		display: inline-flex;
+		font-size: 22rpx;
+		border-radius: 15px;
+		margin: 3px;
+	}
 	.tag-bule {
-		background: #CDE7FB;
-		color: #0B4572;
+		background: #EBEEFA;
+		color: #5C76DF;
 	}
-
 	.tag-green {
 		background: #C6F7BC;
 		color: #065112;
 	}
-
 	.tag-yellow {
-		background: #FBF4B1;
-		color: #5C4409;
+		background: #F9F2EA;
+		color: #BE9C69;
 	}
-
-	.tag {
-		padding: 5px;
-		display: inline-flex;
-		font-size: 22rpx;
-		margin: 3px;
+	.tag-red {
+		background: #FEECE6;
+		color: #FE6430;
 	}
-
 	.text-white {
 		color: #fff;
 	}
-
 	.text-white text {
 		position: relative;
 		z-index: 2;
@@ -586,26 +645,37 @@ currentPage:this.currentPage,searchKeyWord:this.searchKeyWord}).then(res => {
 		}
 	}
 
+.introduce-section .title{
+	font-size: 17px;
+	font-weight: bold;
+	height:40px;
+	line-height: 40px;
+	flex: 2.5;
+	border-bottom:1px solid #EEEEEE;
+}
+.introduce-section .address{
+	color:#878C9C;
+	font-size:12px;
+	padding:15px 0 10px;
+}
+.introduce-section .price{
+	padding:10px 0 10px;
+	color:#FD714F;
+	font-size:19px;
+	font-weight:700;
+}
 	/* 销售信息 */
 	.introduce-section {
 		background: #fff;
-		padding: 20upx 30upx;
-		padding-bottom: 100upx;
+		padding: 0upx 30upx 20upx;
+		margin:10px;
+		border-radius:4px;
 
 		.guess-item {
 			padding-bottom: 20upx;
 			border-bottom: 1px solid #ccc;
 		}
 
-		.title {
-			font-size: 28upx;
-			color: $font-color-dark;
-			font-weight: bold;
-			height: 50upx;
-			line-height: 50upx;
-			flex: 2.5;
-		}
-
 		.title-tip {
 			flex: 1;
 		}
@@ -652,4 +722,27 @@ currentPage:this.currentPage,searchKeyWord:this.searchKeyWord}).then(res => {
 			}
 		}
 	}
+	.side-bg{
+		position:absolute;
+		width: 64px;
+		height: 64px;
+		z-index: 1;
+	}
+	.drag {
+		position:relative;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		color: $uni-text-color-inverse;
+		width: 64px;
+		height: 64px;
+		background:transparent;
+		font-size: $uni-font-size-sm;
+		position: fixed;
+		z-index: 9;
+		
+		&.transition {
+			transition: left .3s ease,top .3s ease;
+		}
+	}
 </style>

BIN
static/img/jiaoyi/down.png


BIN
static/img/jiaoyi/ic_fabu.png


BIN
static/img/jiaoyi/ic_fabu@2x.png


BIN
static/img/jiaoyi/ic_fabu@3x.png


BIN
static/img/jiaoyi/shanchu.png


BIN
static/img/jiaoyi/shanchu@2x.png


BIN
static/img/jiaoyi/shanchu@3x.png