瀏覽代碼

前端gjy

gjy 3 年之前
父節點
當前提交
7610cea039

+ 32 - 23
pages/grain_pulse/distribution/distribution.nvue

@@ -2,10 +2,12 @@
 	<view class="container">
 		<view class="header">
 			<view class="now-location">
+				<image class='location' src="/static/img/liangmai/icon_ditu.png" mode=""></image>
 				<!-- <u-icon name="map" size="36" class="icon"></u-icon> -->
 				<text class="text Medium title">{{position.name}}</text>
 			</view>
 			<view class="selectType">
+				
 				<picker @change="bindPickerChange" :value="index" :range="typeList">
 					<text class="uni-input header-type">{{typeList[index]}}</text>
 				</picker>
@@ -30,7 +32,7 @@
 				</view>
 				<scroll-view :scroll-top="scrollTop" :scroll-y="isscroll" @scrolltoupper="upper" @scrolltolower="lower"
 					@scroll="scroll" :class="{'active':isActive}" class="scroll-style">
-					<view class="bottom-list-item" v-for="(item,index) in datalist" :key="index">
+					<view class="bottom-list-item" v-for="(item,index) in datalist" @click='coordinate(item)' :key="index">
 						<view class='left'>
 							<img class="left-img" :src="item.attachmentAddress" alt="">
 							<view class="middle">
@@ -95,13 +97,18 @@
 		onLoad(e) {
 			if (Object.keys(e).length) {
 				this.position = JSON.parse(e.position)
-				// this.nowLocation.latitude = this.position.location.split(',')[1]
-				// this.nowLocation.longitude = this.position.location.split(',')[0]
+				this.nowLocation.latitude = this.position.location.split(',')[1]
+				this.nowLocation.longitude = this.position.location.split(',')[0]
 				//获取列表数据
 			}
 			this.getList()
 		},
 		methods: {
+			coordinate(item){
+				this.nowLocation.latitude = item.latitude
+				this.nowLocation.longitude = item.longitude
+				this.getList()
+			},
 			getList(val) {
 				this.metreList = []
 				let detailedAddress = ""
@@ -126,21 +133,23 @@
 						for(let i = 0;i<this.datalist.length;i++){
 							let lat2 = this.datalist[i].latitude
 							let lng2 = this.datalist[i].longitude
-							
-									
-									let maker= {
-										id: id++,
-										latitude: this.datalist[i].latitude,
-										longitude:this.datalist[i].longitude,
-										iconPath: '../../../static/img/weizhi@2x.png',
-									}
-									newmarker.push(maker)
-									
+							let maker= {
+								id: id++,
+								latitude: this.datalist[i].latitude,
+								longitude:this.datalist[i].longitude,
+								iconPath: '../../../static/img/location.png',
+								callout: {
+									content:this.datalist[i].title,
+									padding:10,
+									borderRadius:5,
+								}
+							}
+							newmarker.push(maker)
 							console.log("lat1,lng1,lat2,lng2",lat1,lng1,lat2,lng2)
 							let _metre = getApp().getDistance(lat1,lng1,lat2,lng2)
 							this.metreList.push(_metre)
 						}
-						// this.covers = newmarker
+						this.covers = newmarker
 						console.log(this.covers)
 					}
 				})
@@ -232,14 +241,6 @@
 				// 	}
 				// });
 			},
-			markertap(e) {
-				console.log(e)
-				uni.showToast({
-					title: "点击id为" + e.detail.markerId + "的坐标",
-					icon: 'none',
-					duration: 2000
-				})
-			},
 			getLst() {
 				console.log("加载数据")
 			}
@@ -248,6 +249,14 @@
 	}
 </script>
 <style scoped>
+	.now-location{
+		flex-direction: row;
+	}
+	.location{
+		width:27rpx;
+		height:31rpx;
+		margin-right:10rpx;
+	}
 	.active {
 		height: 583rpx !important;
 	}
@@ -354,7 +363,7 @@
 	}
 	.line{
 		border-right:1px solid #EEEEEE;
-		height:80rpx;
+		height:100rpx;
 	}
 	.left {
 		flex-direction: row;

+ 11 - 7
pages/grain_pulse/dynamic.vue

@@ -4,9 +4,9 @@
 			@custom="getrelease"></u-search>
 		<view class="bottom flex">
 			<view class="bottonCss" @click="release">
-				<image src="../../static/img/liangmai/fabu-2@3x.png" mode="" style="width: 40rpx; height: 40rpx;">
+				<image src="../../static/img/liangmai/fabu-2-check@3x.png" mode="" style="width: 40rpx; height: 40rpx;">
 				</image>
-				<view style="color: #22C572;">发布</view>
+				<view>发布</view>
 			</view>
 			<view class="bottonCss" @click="record">
 				<image src="../../static/img/liangmai/jilu-2@3x.png" mode="" style="width: 40rpx; height: 40rpx;">
@@ -174,6 +174,9 @@
 </script>
 
 <style lang="scss" scoped>
+	page{
+		background:#F5F6FA;
+	}
 	.center {
 		padding: 10rpx 4rpx;
 	}
@@ -192,13 +195,14 @@
 		height: 40rpx;
 		margin-top: 40rpx;
 		text-align: center;
+		font-size:20rpx;
 	}
 
 	.modular {
-		width: 94%;
-		margin: 40rpx auto;
+		width: 96%;
+		margin: 20rpx auto;
 		background-color: #FFFFFF;
-		border-radius: 40rpx;
+		border-radius: 30rpx;
 		// margin-top: 40rpx;
 	}
 
@@ -227,13 +231,13 @@
 	}
 
 	.address {
-		width: 60%;
 		height: 48rpx;
 		background-color: #F5F6FA;
-		border-radius: 24rpx;
+		border-radius: 20rpx;
 		margin-left: 30rpx;
 		text-align: center;
 		line-height: 48rpx;
+		padding:0px 13px 0 5px;
 	}
 	/deep/.u-content {
 		text-indent:0 !important;	

+ 1 - 1
pages/grain_pulse/editcompany.vue

@@ -317,7 +317,7 @@
 						if(this.deptList.label.indexOf(',')!=-1){
 							this.label=this.deptList.label.split(',')
 						}else{
-							this.label=this.deptList.label
+							this.label=[this.deptList.label]
 						}
 						if(this.deptList.sitePhotoAddress.indexOf(',')!=-1){
 							this.imgList=this.deptList.sitePhotoAddress.split(',')

+ 6 - 0
pages/grain_pulse/home.vue

@@ -119,6 +119,12 @@
 				datalist: []
 			}
 		},
+		onPullDownRefresh() {
+		    this.getList()
+		     setTimeout(function () {
+		         uni.stopPullDownRefresh();  //关闭下拉刷新
+		     }, 1000);
+		 },
 		onShow(val) {
 			this.getList()
 			uni.getStorage({

+ 4 - 1
pages/grain_pulse/localtion/coordinate.nvue

@@ -1,7 +1,7 @@
 <template>
 	<view class="container">
 		<view class="content">
-			<view @click='naviageToPage("/pages/grain_pulse/position/position")'>
+			<view class='address' @click='naviageToPage("/pages/grain_pulse/position/position")'>
 				<image class='location' src="@/static/img/liangmai/icon_ditu.png" mode=""></image>
 				<text class="title-style">{{position.name}}</text>
 			</view>
@@ -211,4 +211,7 @@
 		width: 27rpx;
 		height: 31rpx;
 	}
+	.address{
+		flex-direction: row;
+	}
 </style>

+ 30 - 6
pages/grain_pulse/my_grain_pulse.vue

@@ -15,7 +15,7 @@
 					</view>
 					<view class='companylocation flex align-item-center Regular'>
 						<image class='location' src="../../static/img/liangmai/icon_ditu.png" mode=""></image>
-						辽宁省营口市鲅鱼圈区xx路108号
+						{{item.province}}{{item.city}}{{item.area}}{{item.detailedAddress}}
 					</view>
 					<view>
 						<view v-if='item.showFlag==2' @click.stop='showHidden(item)' class="button Regular">显示</view>
@@ -30,18 +30,18 @@
 					<image class='listitem-left' :src="item.attachmentAddress" mode=""></image>
 					<view class="listitem-right">
 						<view class="flex justify-between">
-							<view class="companyname Medium">中天昊元粮库中天昊元粮库</view>
+							<view class="companyname Medium">{{item.compName}}</view>
 							<image style='width:12px;height:12px;' :src="status1?'../../static/img/liangmai/my_shoucang1.png':'../../static/img/liangmai/my_shoucang.png'" mode=""></image>
 						</view>
-						<view class='Regular introduce'>我是企业介绍我是企业介绍我是企业介绍我是</view>
+						<view class='Regular introduce'>{{item.companyProfile}}</view>
 					</view>
 				</view>
 				<view class="flex  align-item-center justify-between">
 					<view class='companylocation flex align-item-center Regular'>
 						<image class='location' src="../../static/img/liangmai/icon_ditu.png" mode=""></image>
-						辽宁省营口市鲅鱼圈区xx路108号
+						{{item.province}}{{item.city}}{{item.area}}{{item.detailedAddress}}
 					</view>
-					<view class='distance Regular'>50m</view>
+					<view class='distance Regular'>{{item._metre}}</view>
 				</view>
 			</view>
 		</view>
@@ -71,14 +71,31 @@
 				datalist:[],
 				status1:true,
 				isLoadMore:false,
+				position:{},
 				searchTypes:[
 				{name:'我的企业',value:'1'},{name:'我的收藏',value:'1'}
 				],
 			}
 		},
+		onPullDownRefresh() {
+		    this.getList()
+		     setTimeout(function () {
+		         uni.stopPullDownRefresh();  //关闭下拉刷新
+		     }, 1000);
+		 },
 		onShow(){
 			this.getList()
-			
+			uni.getStorage({
+			key: 'setLocaltion',
+			success: (res) => {
+				console.log(res.data)
+				this.position = res.data
+				// uni.removeStorage({
+				// 	key: 'setLocaltion'
+				// })
+			},
+		
+		})
 		},
 		onLoad(){
 			
@@ -92,6 +109,7 @@
 		computed: {
 			...mapState(['hasLogin', 'userInfo'])
 		},
+		
 		methods: {
 			getList(){
 				this.isLoadMore=true
@@ -101,6 +119,7 @@
 					if(res.data.code==200){
 						this.isLoadMore=false
 						this.datalist=res.data.data.records
+						
 					}
 				})
 				}else{
@@ -108,6 +127,11 @@
 							currentPage: this.currentPage,pcFlag:2}).then(res => {
 					if(res.data.code==200){
 						this.datalist=res.data.data.records
+						let lat2 =this.position.location.split(',')[1];
+						let lng2 = this.position.location.split(',')[0];
+						for(var i=0;i<this.datalist.length;i++){
+							this.datalist[i]._metre=this.utils.getDistance(this.datalist[i].latitude,this.datalist[i].longitude,lat2,lng2)
+						}
 					}
 					})
 				}

+ 62 - 2
pages/grain_pulse/record.vue

@@ -1,5 +1,17 @@
 <template>
 	<view class="center">
+		<view class="bottom flex">
+			<view class="bottonCss" @click="releaseclick">
+				<image src="../../static/img/liangmai/fabu-2@3x.png" mode="" style="width: 40rpx; height: 40rpx;">
+				</image>
+				<view style="color: #656765;">发布</view>
+			</view>
+			<view class="bottonCss" @click="record">
+				<image src="../../static/img/liangmai/jilu-2-check@3x.png" mode="" style="width: 40rpx; height: 40rpx;">
+				</image>
+				<view>记录</view>
+			</view>
+		</view>
 		<view class="topCss">
 			<view class="back-btn cuIcon-back" @click="navBack"></view>
 			<view class="introduce">
@@ -24,7 +36,8 @@
 			<view class="modular">
 				<view class="flex">
 					<view class="touxiang">
-						<image :src="portraits" mode="" style="height: 76rpx;border-radius: 8rpx;"></image>
+						<image v-if='item.avatarUrl' :src="item.avatarUrl" mode="" style="height: 76rpx;border-radius: 8rpx;"></image>
+						<image v-else src="../../static/img/myimg/YongHu@3x.png" mode="" style="height: 76rpx;border-radius: 8rpx;"></image>
 					</view>
 					<view style="margin: 20rpx 0 0 30rpx;width: 72%;">
 						<view style="color: #333333;font-weight: 600;font-size: 34rpx;">{{item.compName}}</view>
@@ -125,8 +138,9 @@
 			...mapState(['hasLogin', 'userInfo'])
 		},
 		onShow() {
+			console.log(this.userInfo.avatarUrl)
 			this.userName = this.userInfo.userName
-			this.portraits = this.userInfo.avatarUrl
+			this.portraits = this.userInfo.avatarUrl?this.userInfo.avatarUrl:'../../static/img/myimg/YongHu@3x.png'
 			this.getRelease()
 		},
 		//下拉刷新
@@ -153,6 +167,37 @@
 			navBack() {
 				uni.navigateBack(1)
 			},
+			releaseclick() {
+				this.$api.doRequest('get', '/settledCompanyInfo/companyList', {loginPhone:this.userInfo.phone})
+					.then(res => {
+						if (res.data.code == 200) {
+							if(res.data.data.length > 0){
+								uni.navigateTo({
+									url: `/pages/grain_pulse/release`
+								})
+							}else{
+								uni.showModal({
+									content: "您还没有入驻粮脉,不能发布,是否前去完善入驻信息!",
+									showCancel: true,
+									confirmText: '前往',
+									success: function(res) {
+										if (res.confirm) {
+											uni.navigateTo({
+												url: `/pages/grain_pulse/enter`
+											})
+										}
+									}
+								})
+							}
+						}
+					})
+				
+			},
+			record() {
+				uni.navigateTo({
+					url: `/pages/grain_pulse/record`
+				})
+			},
 			querys(item) {
 				for (var i = 0; i < this.choices.length; i++) {
 					if (this.choices[i].name == item.name) {
@@ -408,4 +453,19 @@
 		line-height: 48rpx;
 		margin: 30rpx;
 	}
+	.bottom {
+		width: 100%;
+		height: 160rpx;
+		background-color: #FFFFFF;
+		position: fixed;
+		bottom: 0rpx;
+		z-index: 9999;
+	}
+	.bottonCss {
+		width: 50%;
+		height: 40rpx;
+		margin-top: 40rpx;
+		text-align: center;
+		font-size:20rpx;
+	}
 </style>

+ 2 - 1
pages/task/my_task.vue

@@ -70,6 +70,7 @@
 			...mapState(['hasLogin', 'userInfo'])
 		},
 		onShow() {
+			this.taskInfo=[]
 			this.getIndexBuyData()
 			// this.userInfo =  uni.getStorageSync("userInfo")
 			this.warehouseInOutInfo.phone = this.userInfo.phone
@@ -277,7 +278,7 @@
 				}else if(item.businessCode=='INOUTTASK-TASK-APPROVE'){
 					if(this.statusFlag==3){
 						uni.navigateTo({
-							url: `/pageD/warehousings/warehousingDetails?id=${item.id}`
+							url: '/pageD/warehousings/warehousingDetails?id='+item.businessId+'&compId='+item.compId
 						})
 					}else{
 						uni.navigateTo({

二進制
static/img/liangmai/fabu-2-check@3x.png


二進制
static/img/liangmai/fabu-2@3x.png


二進制
static/img/liangmai/jilu-2-check@3x.png