瀏覽代碼

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-app

gjy 3 年之前
父節點
當前提交
a5c8d96545

+ 1 - 0
pageA/product/buydetails.vue

@@ -288,6 +288,7 @@
 					// 失败回调
 					fail: (res) => {
 						console.log('调用失败!')
+						that.contactUs()
 					}
 					
 				  });

+ 14 - 13
pageA/product/detail.vue

@@ -119,10 +119,10 @@
 						<text>{{goods.buyer}}</text>
 					</view>
 				</view>
-				<view class="c-row">
+				<view class="c-row" @click="contactUs">
 					<text class="tit">买方电话</text>
 					<view class="con-list">
-						<view><a :href="'tel:'+goods.buyerPhone">{{goods.buyerPhone}} <image style='width:11px;height:11px;' src='../../static/img/jiaoyi/gengduo1@3x.png'></image></a></view>
+						<view>{{goods.buyerPhone}}<image style='width:11px;height:11px;' src='../../static/img/jiaoyi/gengduo1@3x.png'></image></view>
 					</view>
 				</view>
 			</view>
@@ -132,67 +132,67 @@
 				<text>货物要求</text>
 			</view>
 			<view class="c-list">
-				<view class="c-row"  v-if="goods.waterContent!=null">
+				<view class="c-row"  v-if="goods.waterContent">
 					<text class="tit">水分(%){{'<='}} </text>
 					<view class="con-list">
 						<text>{{goods.waterContent}}</text>
 					</view>
 				</view>
-				<view class="c-row" v-if="goods.bulkDensity!=null">
+				<view class="c-row" v-if="goods.bulkDensity">
 					<text class="tit">容重(g/L){{'>='}}</text>
 					<view class="con-list">
 						<text>{{goods.bulkDensity}}</text>
 					</view>
 				</view>
-				<view class="c-row" v-if="goods.jiaorenli!=null">
+				<view class="c-row" v-if="goods.jiaorenli">
 					<text class="tit">热损伤(%){{'<='}}</text>
 					<view class="con-list">
 						<text>{{goods.jiaorenli}}</text>
 					</view>
 				</view>
-				<view class="c-row" v-if="goods.impurity!=null">
+				<view class="c-row" v-if="goods.impurity">
 					<text class="tit">杂质(%){{'<='}}</text>
 					<view class="con-list">
 						<text>{{goods.impurity}}</text>
 					</view>
 				</view>
-				<view class="c-row" v-if="goods.mildewGrain!=null">
+				<view class="c-row" v-if="goods.mildewGrain">
 					<text class="tit">霉变粒(%){{'<='}}</text>
 					<view class="con-list">
 						<text>{{goods.mildewGrain}}</text>
 					</view>
 				</view>
-				<view class="c-row" v-if="goods.imperfectGrain!=null">
+				<view class="c-row" v-if="goods.imperfectGrain">
 					<text class="tit">不完善粒(%){{'<='}}</text>
 					<view class="con-list">
 						<text>{{goods.imperfectGrain}}</text>
 					</view>
 				</view>
-				<view class="c-row" v-if="goods.protein!=null">
+				<view class="c-row" v-if="goods.protein">
 					<text class="tit">蛋白(%){{'>='}} </text>
 					<view class="con-list">
 						<text>{{goods.protein}}</text>
 					</view>
 				</view>
-				<view class="c-row" v-if="goods.grain!=null">
+				<view class="c-row" v-if="goods.grain">
 					<text class="tit">粒型</text>
 					<view class="con-list">
 						<text>{{goods.grain}}</text>
 					</view>
 				</view>
-				<view class="c-row" v-if="goods.grade!=null">
+				<view class="c-row" v-if="goods.grade">
 					<text class="tit">品级</text>
 					<view class="con-list">
 						<text>{{goods.grade}}</text>
 					</view>
 				</view>
-				<view class="c-row" v-if="goods.outputPrivate!=null">
+				<view class="c-row" v-if="goods.outputPrivate">
 					<text class="tit">产地</text>
 					<view class="con-list">
 						<text>{{goods.outputPrivate}}{{goods.outputCity}}</text>
 					</view>
 				</view>
-				<view class="c-row" v-if="goods.outputYear!=null">
+				<view class="c-row" v-if="goods.outputYear">
 					<text class="tit">产出年份</text>
 					<view class="con-list">
 						<text>{{goods.outputYear}}</text>
@@ -321,6 +321,7 @@
 					// 失败回调
 					fail: (res) => {
 						console.log('调用失败!')
+						that.contactUs()
 					}
 				  });		
 			},

+ 1 - 0
pageA/product/detail_buy.vue

@@ -220,6 +220,7 @@
 					// 失败回调
 					fail: (res) => {
 						console.log('调用失败!')
+						that.contactUs()
 					}
 					
 				  });

+ 7 - 12
pageA/product/lookup.vue

@@ -156,19 +156,14 @@
 			//详情
 			navToDetailPage(item) {
 				let id = item.id;
-				if (item.unitPrice === 0) {
-					this.contactUs();
+				if (this.TabCur == 0) {
+					uni.navigateTo({
+						url: `/pageA/product/detail?id=${id}`
+					})
 				} else {
-					if (this.TabCur == 0) {
-						uni.navigateTo({
-							url: `/pageA/product/detail?id=${id}`
-						})
-					} else {
-						uni.navigateTo({
-							url: `/pageA/product/sales_detail?id=${id}`
-						})
-					}
-			
+					uni.navigateTo({
+						url: `/pageA/product/sales_detail?id=${id}`
+					})
 				}
 			},
 			init() {

+ 1 - 0
pageA/product/saledetails.vue

@@ -288,6 +288,7 @@
 					// 失败回调
 					fail: (res) => {
 						console.log('调用失败!')
+						that.contactUs()
 					}
 					
 				  });

+ 14 - 14
pageA/product/sales_detail.vue

@@ -118,10 +118,10 @@
 						<text>{{goods.seller}}</text>
 					</view>
 				</view>
-				<view class="c-row">
+				<view class="c-row" @click="contactUs">
 					<text class="tit">卖方电话</text>
 					<view class="con-list">
-						<view>{{goods.sellerPhone}} <a :href="'tel:'+goods.sellerPhone"><image style='width:11px;height:11px;' src='../../static/img/jiaoyi/gengduo1@3x.png'></image></a></view>
+						<view>{{goods.sellerPhone}} <image style='width:11px;height:11px;' src='../../static/img/jiaoyi/gengduo1@3x.png'></image></view>
 					</view>
 				</view>
 			</view>
@@ -131,67 +131,67 @@
 				<text>货物要求</text>
 			</view>
 			<view class="c-list">
-				<view class="c-row" v-if="goods.waterContent!=null">
+				<view class="c-row" v-if="goods.waterContent">
 					<text class="tit">水分(%){{'<='}} </text>
 					<view class="con-list">
 						<text>{{goods.waterContent}}</text>
 					</view>
 				</view>
-				<view class="c-row" v-if="goods.bulkDensity!=null">
+				<view class="c-row" v-if="goods.bulkDensity">
 					<text class="tit">容重(g/L){{'>='}}</text>
 					<view class="con-list">
 						<text>{{goods.bulkDensity}}</text>
 					</view>
 				</view>
-				<view class="c-row" v-if="goods.jiaorenli!=null">
+				<view class="c-row" v-if="goods.jiaorenli">
 					<text class="tit">热损伤(%){{'<='}}</text>
 					<view class="con-list">
 						<text>{{goods.jiaorenli}}</text>
 					</view>
 				</view>
-				<view class="c-row" v-if="goods.impurity!=null">
+				<view class="c-row" v-if="goods.impurity">
 					<text class="tit">杂质(%){{'<='}}</text>
 					<view class="con-list">
 						<text>{{goods.impurity}}</text>
 					</view>
 				</view>
-				<view class="c-row" v-if="goods.mildewGrain!=null">
+				<view class="c-row" v-if="goods.mildewGrain">
 					<text class="tit">霉变粒(%){{'<='}}</text>
 					<view class="con-list">
 						<text>{{goods.mildewGrain}}</text>
 					</view>
 				</view>
-				<view class="c-row" v-if="goods.imperfectGrain!=null">
+				<view class="c-row" v-if="goods.imperfectGrain">
 					<text class="tit">不完善粒(%){{'<='}}</text>
 					<view class="con-list">
 						<text>{{goods.imperfectGrain}}</text>
 					</view>
 				</view>
-				<view class="c-row" v-if="goods.protein!=null">
+				<view class="c-row" v-if="goods.protein">
 					<text class="tit">蛋白(%){{'>='}} </text>
 					<view class="con-list">
 						<text>{{goods.protein}}</text>
 					</view>
 				</view>
-				<view class="c-row" v-if="goods.grain!=null">
+				<view class="c-row" v-if="goods.grain">
 					<text class="tit">粒型</text>
 					<view class="con-list">
 						<text>{{goods.grain}}</text>
 					</view>
 				</view>
-				<view class="c-row" v-if="goods.grade!=null">
+				<view class="c-row" v-if="goods.grade">
 					<text class="tit">品级</text>
 					<view class="con-list">
 						<text>{{goods.grade}}</text>
 					</view>
 				</view>
-				<view class="c-row" v-if="goods.outputPrivate!=null||goods.outputCity!=null">
+				<view class="c-row" v-if="goods.outputPrivate&&goods.outputCity">
 					<text class="tit">产地</text>
 					<view class="con-list">
 						<text>{{goods.outputPrivate}}{{goods.outputCity}}</text>
 					</view>
 				</view>
-				<view class="c-row" v-if="goods.outputYear!=null">
+				<view class="c-row" v-if="goods.outputYear">
 					<text class="tit">产出年份</text>
 					<view class="con-list">
 						<text>{{goods.outputYear}}</text>
@@ -300,7 +300,7 @@
 				const that = this
 				uni.makePhoneCall({
 				 	// 手机号
-				    phoneNumber: that.goods.buyerPhone, 
+				    phoneNumber: that.goods.sellerPhone, 
 				
 					// 成功回调
 					success: (res) => {

+ 59 - 11
pages/attestation/index.vue

@@ -5,7 +5,7 @@
 			<view class="title" @click="liangShang">
 				粮商身份
 			</view>
-			<view class="arrows1" @click="liangShang">
+			<view class="arrows1" @click="addliangShang">
 				<text style="margin-right: 30px;">新增身份</text>
 				<image src="../../static/img/authentication/jiantou@3x.png" class="arrow"></image>
 			</view>
@@ -17,7 +17,7 @@
 			<view class="title" @click="siJi">
 				司机身份
 			</view>
-			<view class="arrows1" @click="siJi">
+			<view class="arrows1" @click="addsiJi">
 				<text style="margin-right: 30px;">新增身份</text>
 				<image src="../../static/img/authentication/jiantou@3x.png" class="arrow"></image>
 			</view>
@@ -162,11 +162,29 @@
 					url: `/pages/attestation/indexTwo`
 				})
 			},
+			addliangShang(){
+				uni.navigateTo({
+					url: `/pageD/identity/companyIdentity`
+				})
+			},
 			siJi(){
 				uni.navigateTo({
 					url: `/pages/attestation/indexThree`
 				})
 			},
+			addsiJi(){
+				if(this.drivers.length > 0){
+					uni.navigateTo({
+						url: `/pages/attestation/indexThree`
+					})
+				}
+				else{
+					uni.navigateTo({
+						url: `/pageD/identity/driverIdentity`
+					})
+				}
+				
+			},
 			driverIdentityEdit(items) {
 				uni.navigateTo({
 					url: `/pageD/identity/driverIdentityEdit?id=${items.id}`
@@ -252,17 +270,19 @@
 				})
 			},
 			getList() {
-				this.$api.doRequest('get', '/identityAuthenticationInfo/selectCount', {
-					customerTypeFlag:3,customerType:"粮农"
+				this.identityAuthenticationInfo.commonId = this.userInfo.id
+				this.$api.doRequest('get', '/driverViewInfo/selectDriverInfoPage', {
+						pageSize: 10,
+						currentPage: 1,
+						commonId: this.userInfo.id,
+						pcFlag: 0
 					}, 'application/json;charset=UTF-8').then(res => {
-						if(res.data.data){
-							if(res.data.data.id == "" || res.data.data.id == null){
-								this.changes = "确认"
-							}else if(res.data.data.id != "" || res.data.data.id == null){
-								this.changes = "取消"
-							}	
-							this.id = res.data.data.id
+						console.log(res.data.data.records)
+						for(var i = 0 ; i < res.data.data.records.length ; i++){
+							res.data.data.records[i].logo = res.data.data.records[i].driverName.substr(0,1)
 						}
+						
+						this.drivers = res.data.data.records
 					})
 					.catch(res => {
 						if(res.errmsg){
@@ -280,6 +300,34 @@
 							})
 						}
 					});
+				// this.$api.doRequest('get', '/identityAuthenticationInfo/selectCount', {
+				// 	customerTypeFlag:3,customerType:"粮农"
+				// 	}, 'application/json;charset=UTF-8').then(res => {
+				// 		if(res.data.data){
+				// 			if(res.data.data.id == "" || res.data.data.id == null){
+				// 				this.changes = "确认"
+				// 			}else if(res.data.data.id != "" || res.data.data.id == null){
+				// 				this.changes = "取消"
+				// 			}	
+				// 			this.id = res.data.data.id
+				// 		}
+				// 	})
+				// 	.catch(res => {
+				// 		if(res.errmsg){
+				// 			uni.showToast({
+				// 				title: res.errmsg,
+				// 				icon: 'none',
+				// 				duration: 2000
+				// 			})
+				// 		}
+				// 		else{
+				// 			uni.showToast({
+				// 				title: "系统异常,请联系管理员",
+				// 				icon: 'none',
+				// 				duration: 2000
+				// 			})
+				// 		}
+				// 	});
 			},
 			adddriver(index) {
 				if (index == 1) {

+ 7 - 27
pages/business/business.vue

@@ -326,36 +326,16 @@
 			//详情
 			navToDetailPage(item) {
 				let id = item.id;
-				if (item.unitPrice === 0) {
-					this.contactUs();
+				if (this.TabCur == 0) {
+					uni.navigateTo({
+						url: `/pageA/product/detail?id=${id}&compId=${item.compId}`
+					})
 				} else {
-					if (this.TabCur == 0) {
-						uni.navigateTo({
-							url: `/pageA/product/detail?id=${id}&compId=${item.compId}`
-						})
-					} else {
-						uni.navigateTo({
-							url: `/pageA/product/sales_detail?id=${id}&compId=${item.compId}`
-						})
-					}
-
+					uni.navigateTo({
+						url: `/pageA/product/sales_detail?id=${id}&compId=${item.compId}`
+					})
 				}
 			},
-			contactUs() {
-				const that = this
-				uni.makePhoneCall({
-					// 手机号
-					phoneNumber: '15145408888',
-					// 成功回调
-					success: (res) => {
-						console.log('调用成功!')
-					},
-					// 失败回调
-					fail: (res) => {
-						console.log('调用失败!')
-					}
-				});
-			},
 			getIndexBuyData() {
 				const that = this
 				uni.showLoading({

+ 36 - 35
pages/sale/information.vue

@@ -163,41 +163,7 @@
 		onReady() {
 		},
 		onShow() {
-			uni.showTabBar()
-			this.pages = 1
-			this.isLoadMore = false
-			this.loadStatus = 'more'
-			this.loadData()
-			var userInfo = uni.getStorageSync("userInfo")
-			var that = this
-			this.$api.doRequest('get', '/salePlanInfo/getTips', {phone:userInfo.phone}).then(res => {
-				if (res.data.data) {
-					let name = 'myTip';
-					let value = res.data.data.myTip;
-					that.$store.commit('$uStore', {
-						name,
-						value
-					});
-					if(value != 0){
-						uni.setTabBarBadge({
-							index:3,
-							text:value+""
-						})
-					}
-					name = 'taskTip';
-					value = res.data.data.taskTip;
-					that.$store.commit('$uStore', {
-						name,
-						value
-					});
-					name = 'contractTip';
-					value = res.data.data.contractTip;
-					that.$store.commit('$uStore', {
-						name,
-						value
-					});
-				}
-			})
+			
 		},
 		onLoad(options) {
 			var that = this
@@ -242,6 +208,41 @@
 			        reject(e)
 			    },
 			})
+			uni.showTabBar()
+			this.pages = 1
+			this.isLoadMore = false
+			this.loadStatus = 'more'
+			this.loadData()
+			var userInfo = uni.getStorageSync("userInfo")
+			var that = this
+			this.$api.doRequest('get', '/salePlanInfo/getTips', {phone:userInfo.phone}).then(res => {
+				if (res.data.data) {
+					let name = 'myTip';
+					let value = res.data.data.myTip;
+					that.$store.commit('$uStore', {
+						name,
+						value
+					});
+					if(value != 0){
+						uni.setTabBarBadge({
+							index:3,
+							text:value+""
+						})
+					}
+					name = 'taskTip';
+					value = res.data.data.taskTip;
+					that.$store.commit('$uStore', {
+						name,
+						value
+					});
+					name = 'contractTip';
+					value = res.data.data.contractTip;
+					that.$store.commit('$uStore', {
+						name,
+						value
+					});
+				}
+			})
 		},
 		onPageScroll(e) {
 			this.scrollTop = e.scrollTop;