瀏覽代碼

前端 小程序 sdy

zhongtianhaoyuan 3 年之前
父節點
當前提交
532dea9255

+ 17 - 16
pageA/product/business_sale.vue

@@ -2,32 +2,33 @@
 	<view class="center">
 		<view class="transaction">
 			
-		
-		<view  class="c-row b-b">
-			<view class="title">卖方</view>
-			<view class="con-list">
-				<view v-if='goods.customerTypeFlag==1' class="title" @click="liang">{{purchaseOrder.customer?purchaseOrder.customer:goods.customerName}}></view>
-				<view v-if='goods.customerTypeFlag==2' class="title" @click="liang">{{purchaseOrder.compName?purchaseOrder.compName:goods.compName}}></view>
-			</view>
-		</view>
 		<view  class="c-row">
 			<view class="title">买方</view>
 			<view class="con-list">
 			<view class="title">{{purchaseOrder.buyer}}</view>
 			</view>
 		</view>
+		<view  class="c-row b-b">
+			<view class="title">卖方</view>
+			<view class="con-list">
+				<!-- <view v-if='goods.customerTypeFlag==1' class="title" @click="liang">{{purchaseOrder.customer?purchaseOrder.customer:goods.customerName}}></view>
+				<view v-if='goods.customerTypeFlag==2' class="title" @click="liang">{{purchaseOrder.compName?purchaseOrder.compName:goods.compName}}></view> -->
+			{{purchaseOrder.seller}}
+			</view>
+		</view>
+		
 		</view>
 		<view class="transaction">
 		<view   class="c-row b-b margin-top">
-			<view class="title">收货地区</view>
+			<view class="title">出库地区</view>
 			<view class="con-list">
-				<view class="title">{{purchaseOrder.receivePrivate}}{{purchaseOrder.receiveCity}}{{purchaseOrder.receiveArea}}</view>
+				<view class="title">{{purchaseOrder.sendPrivate}}{{purchaseOrder.sendCity}}{{purchaseOrder.sendArea}}</view>
 			</view>
 		</view>
 		<view   class="c-row b-b ">
-			<view class="title">货库</view>
+			<view class="title">货库</view>
 			<view class="con-list">
-				<view class="title">{{purchaseOrder.receivePrivate}}{{purchaseOrder.receiveCity}}{{purchaseOrder.receiveArea}}{{purchaseOrder.receiveWarehouse}}</view>
+				<view class="title">{{purchaseOrder.sendPrivate}}{{purchaseOrder.sendCity}}{{purchaseOrder.sendArea}}{{purchaseOrder.sendWarehouse}}</view>
 			</view>
 		</view>
 		<view v-if='companyId!=2' class="c-row b-b">
@@ -46,16 +47,16 @@
 			<view  class="title">今日基差(元/吨)</view>
 			<view class="con-list">
 				<view class="picker">
-					<text>{{purchaseOrder.basis}}</text>
+					<text>{{purchaseOrder.basisPrice}}</text>
 				</view>
 				</view>
 		</view>
 	
 		<view v-else class="c-row ">
-			<view   class="title">采购单价(元/吨)</view>
+			<view   class="title">销售单价(元/吨)</view>
 			<view class="con-list">
 				<view class="picker">
-					<text>{{purchaseOrder.unitPrice}}</text>
+					<text>{{purchaseOrder.salePrice}}</text>
 				</view>
 				</view>
 		</view>
@@ -72,7 +73,7 @@
 			</view>
 		</view>
 		<view  class="c-row b-b">
-			<view class="title">出售数量(吨)</view>
+			<view class="title">采购数量(吨)</view>
 			<view class="con-list">
 			<input v-model='purchaseOrder.transactionsNumber' placeholder="请填写出售数量" name="input"></input>
 			</view>

+ 27 - 26
pageA/product/sales_detail.vue

@@ -51,9 +51,9 @@
 					</view>
 				</view>
 				<view class="c-row">
-					<text class="tit">采购量(吨)</text>
+					<text class="tit">销售量(吨)</text>
 					<view class="con-list">
-						<text>{{goods.plannedPurchaseVolume}}</text>
+						<text>{{goods.plannedSaleVolume}}</text>
 					</view>
 				</view>
 				<view class="c-row">
@@ -65,7 +65,7 @@
 				<view class="c-row">
 					<text class="tit">类型</text>
 					<view class="con-list">
-						<text>{{goods.procurementPlanType}}</text>
+						<text>{{goods.salePlanType}}</text>
 					</view>
 				</view>
 				<view class="c-row">
@@ -74,10 +74,22 @@
 						<text>{{goods.priceType}}</text>
 					</view>
 				</view>
+				<view class="c-row" v-if="goods.salePlanType == '期货'">
+					<text class="tit">基差(元/吨)</text>
+					<view class="con-list">
+						<text>{{goods.basisPrice}}</text>
+					</view>
+				</view>
+				<view class="c-row" v-if="goods.salePlanType == '现货'">
+					<text class="tit">销售价格(元/吨)</text>
+					<view class="con-list">
+						<text>{{goods.unitPrice}}</text>
+					</view>
+				</view>
 				<view class="c-row">
-					<text class="tit">收货地区</text>
+					<text class="tit">货地区</text>
 					<view class="con-list">
-						<text>{{goods.receivePrivate}}{{goods.receiveCity}}{{goods.receiveArea}}</text>
+						<text>{{goods.sendPrivate}}{{goods.sendCity}}{{goods.sendArea}}</text>
 					</view>
 				</view>
 				<view class="c-row">
@@ -99,15 +111,15 @@
 					</view>
 				</view>
 				<view class="c-row">
-					<text class="tit">方</text>
+					<text class="tit">方</text>
 					<view class="con-list">
-						<text>{{goods.buyer}}</text>
+						<text>{{goods.seller}}</text>
 					</view>
 				</view>
 				<view class="c-row">
-					<text class="tit">方电话</text>
+					<text class="tit">方电话</text>
 					<view class="con-list">
-						<view>{{goods.buyerPhone}} <a :href="'tel:'+goods.buyerPhone"><image style='width:11px;height:11px;' src='../../static/img/jiaoyi/gengduo1@3x.png'></image></a></view>
+						<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>
 				</view>
 			</view>
@@ -197,7 +209,7 @@
 		<view class="page-bottom1">
 			<view>
 				<button type="primary" @click="contactUs">在线客服</button>
-				<button  @click="salegrain" v-if="goods.pcFlag == 1" type="primary" class=" action-btn no-border add-cart-btn" >立即粮</button>
+				<button  @click="salegrain" v-if="goods.pcFlag == 1" type="primary" class=" action-btn no-border add-cart-btn" >立即粮</button>
 				<button v-else type="primary" class=" action-btn no-border add-cart-btn" 
 				@click="tradeNow">立即发车</button>
 			</view>
@@ -262,21 +274,10 @@
 				title: '正在加载',
 				mask:true
 			})
-			this.$api.doRequest('get', '/procurementPlanInfo/getProcurementPlan',{id:options.id}).then(res => {
+			this.$api.doRequest('get', '/salePlanInfo/getSalePlanInfo',{id:options.id}).then(res => {
 				uni.hideLoading()
 				this.goods=res.data.data
 			})
-			
-			// .then(res => {
-			// 	console.log(res.data)
-			// 	that.goods = res.data
-			// 	that.swiperLength = 3
-			// 	if(that.goods.soldCount >= that.goods.total){
-			// 		that.goods.status = 1
-			// 	}
-			// 	that.share.title = that.goods.title
-			// 	uni.hideLoading()
-			// })
 		},
 		computed: {
 			...mapState(['hasLogin','userInfo'])
@@ -396,10 +397,10 @@
 					this.$api.doRequest('get', '/identityAuthenticationInfo/getInfo',{commonId:this.userInfo.id}).then(res => {
 						if(res.data.code==200){
 							uni.navigateTo({
-								url: `/pageA/product/business_buy?id=${this.goods.id}&receiveArea=${this.goods.receiveArea}&minimumVolume=${this.goods.minimumVolume}
-										&goodsName=${this.goods.goodsName}&receiveCity=${this.goods.receiveCity}&receivePrivate=${this.goods.receivePrivate}&buyer=${this.goods.buyer}
-										&basisPrice=${this.goods.basisPrice}&unitPrice=${this.goods.unitPrice}&receiveWarehouse=${this.goods.receiveWarehouse}
-										&procurementPlanType=${this.goods.procurementPlanType}&procurementPlan=${this.goods.procurementPlanNo}`
+								url: `/pageA/product/business_sale?id=${this.goods.id}&sendArea=${this.goods.sendArea}&minimumVolume=${this.goods.minimumVolume}
+										&goodsName=${this.goods.goodsName}&sendCity=${this.goods.sendCity}&sendPrivate=${this.goods.sendPrivate}&seller=${this.goods.seller}
+										&basisPrice=${this.goods.basisPrice}&salePrice=${this.goods.salePrice}&sendWarehouse=${this.goods.sendWarehouse}
+										&salePlanType=${this.goods.salePlanType}&salePlanNo=${this.goods.salePlanNo}`
 							// 	url: `/pageA/product/business_buy?id=${this.goods.id}&packing=${this.goods.packing}}&province=${this.goods.province}
 							// 	&city=${this.goods.city}&area=${this.goods.area}&storeName=${this.goods.storeName}&seller=${this.goods.seller}
 							// 	&companyId=${this.goods.companyId}&sellerPhone=${this.goods.sellerPhone}&minSale=${this.goods.minSale}

File diff suppressed because it is too large
+ 749 - 0
pageB/contract/collectLook.vue


+ 7 - 9
pageB/contract/contract.vue

@@ -27,13 +27,7 @@
 				<text class="anniu" @click="commit"> 附件</text>
 				<text class="anniu" @click="someprice(item)"> 点价</text>
 				<text class="anniu1" @click="commit1(item)"> 发货</text>
-				<!-- <text><button class="cu-btn commit margin-tb-sm lg"
-						style=" width: 75px;height: 25px; margin-left: 15px;" @click="commit">附件</button></text>
-				<text><button class="cu-btn commit margin-tb-sm lg"
-						style=" margin-left: 15px; width: 75px;height: 25px;"
-						@click="someprice(item)">点价</button></text>
-				<text><button class="cu-btn commit margin-tb-sm lg"
-						style=" margin-left: 15px; width: 75px;height: 25px;" @click="commit1(item)">发货</button></text>-->
+				<text class="anniu1" @click="commit2(item)"> 收货</text>
 			</view>
 
 		</view>
@@ -46,7 +40,6 @@
 					<button style='width:50%;display:inline-block;' @click='pricestatus=false'>取消</button>
 					<button style='width:50%;display:inline-block;' @click='amendprice'>确定</button>
 				</view>
-
 			</view>
 		</view>
 		<view v-if='shadestatus' class='shade'>
@@ -226,10 +219,15 @@
 					url: `/pageB/contract/look?id=${item.id}&contractNo=${item.contractNo}&customer=${item.customer}&goodsName=${item.goodsName}`
 				})
 			},
+			commit2(item) {
+				uni.navigateTo({
+					url: `/pageB/contract/collectLook?id=${item.id}&contractNo=${item.contractNo}&customer=${item.customer}&goodsName=${item.goodsName}`
+				})
+			},
 			getList() {
 				this.goods.commonId = this.userInfo.id
 
-				this.$api.doRequest('get', '/purchaseOrder/selectPurchaseOrder', this.goods).then(res => {
+				this.$api.doRequest('get', '/purchaseOrder/selectPurchaseOrderApp', this.goods).then(res => {
 						if (res.data.code == 200) {
 							this.lists = res.data.data.records
 						} else {

+ 1 - 1
pageD/identity/companyIdentityEdit.vue

@@ -87,7 +87,7 @@
 						<input placeholder="请填写手机号" @input='phoneinput' v-model="deptList.customerPhone"></input>
 				</view>
 			</view>
-			<view class="c-row b-b">
+			<view class="c-row ">
 				<text class="tit">公司地址</text>
 				<view class="con-list">
 					<input placeholder="请填写公司地址" name="input" v-model="deptList.compAddress"></input>

+ 0 - 2
pageD/identity/driverIdentity.vue

@@ -86,7 +86,6 @@
 				operates: "",
 				sendText: '获取验证码',
 				sendDisabled: false,
-				sendText: '获取验证码',
 				ModelIndex: '高栏',
 				Model: '',
 				ModelType: ["高栏", "集装箱", "自卸车"],
@@ -256,7 +255,6 @@
 				this.DriverViewInfo.cardAddressUrl = this.id.toString()
 				this.DriverViewInfo.pcFlag = 0
 				this.DriverViewInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
-				console.log(this.DriverViewInfo, "司机对象")
 				this.$api.doRequest('post', '/driverViewInfo/api/addInfo', this.DriverViewInfo).then(res => {}).catch(
 					res => {
 						uni.showToast({

+ 0 - 3
pageD/myRelease/buyDetails.vue

@@ -165,7 +165,6 @@
 		onLoad(options){
 				
 			this.getList(options.id)
-			console.log(options.id,"idwei1")
 		},
 		methods: {
 			typeChange(e){
@@ -174,9 +173,7 @@
 			},
 			getList(id1){
 				this.$api.doRequest('get','/procurementPlanInfo/getProcurementPlan',{id:id1}).then(res => {
-					console.log(res)
 					this.procurementPlanInfos = res.data.data
-					console.log(this.procurementPlanInfos,"对象")
 					
 				})
 				.catch(res => {

+ 0 - 1
pageD/myRelease/buyEdit.vue

@@ -365,7 +365,6 @@
 			},
 			checkedbox(e){
 				this.checked = !this.checked
-				console.log( this.checked)
 			},
 			typeChange(e) {
 				this.typesIndex = e.detail.value

+ 8 - 1
pages.json

@@ -482,7 +482,7 @@
 				}, {
 					"path": "product/sales_detail",
 					"style": {
-						"navigationBarTitleText": ""
+						"navigationStyle": "custom"
 					}
 
 				}, {
@@ -648,6 +648,13 @@
 						"enablePullDownRefresh": true
 					}
 				},
+				{
+					"path": "contract/collectLook",
+					"style": {
+						"navigationBarTitleText": "收货",
+						"enablePullDownRefresh": true
+					}
+				},
 				{
 					"path": "video/look",
 					"style": {

+ 133 - 89
pages/attestation/index.vue

@@ -1,15 +1,5 @@
 <template>
 	<view class="center">
-		<!-- <view class="homePage">
-			<view class="title">
-				粮商身份
-			</view>
-			<view class="arrows">
-				<text style="margin-right: 30px;">新增身份</text>
-					<image src="../../static/img/authentication/jiantou@3x.png" class="arrow"></image>
-			</view>	
-			<image src="../../static/img/authentication/liangshang@3x.png" class="portrait"></image>
-		</view> -->
 		<view class="homePage">
 			<image src="../../static/img/authentication/bg@2x.png" class="background"></image>
 			<view class="title">
@@ -33,53 +23,17 @@
 			</view>
 			<image src="../../static/img/authentication/siji@3x.png" class="portrait1"></image>
 		</view>
-		<!-- <view>
-			<view class="title">粮商身份</view>
-			<view class='cu-tag radius line-pink' @click="adddriver(1)">新增</view>
-			<view v-for="(item , index) in businessman" :Key="index">
-
-
-				<view class="company">{{item.compName}}</view>
-				<view class="guess-item">
-					<view class="infos" @click="navToDetailPage(1,item)">
-
-						<view class="info">{{item.customerName}}
-							<view class='cu-tag radius line-pink but'>{{item.authenticationStatus}}</view>
-						</view>
-						<view class="info">{{item.customerPhone}}</view>
-					</view>
-					<label>
-						<checkbox :value="1" /><text>设置默认</text>
-					</label>
-					<view class='cu-tag radius line-pink ' @click="deleteLS(item)">删除</view>
-					<view class='cu-tag radius line-pink ' @click="companyEdit(item)">修改</view>
-					<view class='cu-tag radius line-pink but'>更换手机号</view>
-
-				</view>
-				<hr>
+		
+		<view class="homePage2">
+			<image src="../../static/img/authentication/bg@2x.png" class="background"></image>
+			<view class="title">
+				粮农身份
 			</view>
-		</view> -->
-
-		<!-- <view class="margin-top">
-			<view class="title">司机身份</view>
-			<view class='cu-tag radius line-pink' @click="adddriver(2)">新增</view>
-			<view v-for="(items , index) in drivers" :Key="index">
-
-
-				<view class="guess-item" @click="navToDetailPage(2,items)">
-					<view class="infos">
-						<view class="info">{{items.driverName}}
-							<view class='cu-tag radius line-pink but'>{{items.authenticationStatus}}</view>
-						</view>
-						<view class="info">{{items.driverPhone}}</view>
-					</view>
-				</view>
-				<view class='cu-tag radius line-pink ' @click="deleteSJ(items)">删除</view>
-				<view class='cu-tag radius line-pink ' @click="driverIdentityEdit(items)">修改</view>
-				<view class='cu-tag radius line-pink but'>更换手机号</view>
-				<hr>
+			<view class="arrows1"  @click="identityChange">
+				<view style="margin-right: 30px;">{{changes}}</view>
 			</view>
-		</view> -->
+			<image src="../../static/img/authentication/farmer@2x.png" class="portrait1"></image>
+		</view>
 
 	</view>
 </template>
@@ -102,6 +56,7 @@
 				scrollTop: 0,
 				TabCur: 0,
 				current: 1,
+				changes:"确认",
 				identityAuthenticationInfo: {
 					pageSize: 10,
 					currentPage: 1,
@@ -112,6 +67,7 @@
 				deletes: {
 					id: "",
 				},
+				id:"",
 			};
 		},
 		computed: {
@@ -122,8 +78,74 @@
 		},
 		
 		methods: {
+			identityChange(){
+				if(this.changes == '确认'){
+					this.identityAuthenticationInfo.commonId = this.userInfo.id
+					this.identityAuthenticationInfo.customerTypeFlag = 3
+					this.identityAuthenticationInfo.customerType = "粮农"
+					uni.showModal({
+						content: '确认后您将获得粮农身份,是否确认该身份?',
+						showCancel: true,
+						confirmText: '确定',
+						success: (e) => {
+							this.$api.doRequest('post', '/identityAuthenticationInfo/api/addIdentityAuthenticationInfo', this.identityAuthenticationInfo,
+									'application/json;charset=UTF-8').then(res => {
+									// this.procurementPlanInfos = res.data.data.records
+									console.log("成功!")
+									if (res.data.message == "Success") {
+										this.$api.msg('确认成功!')
+										this.changes = "取消"
+										this.getList()
+										return
+									}
+								})
+								.catch(res => {
+									uni.showToast({
+										title: res.errmsg,
+										icon: 'none',
+										duration: 2000
+									})
+								});
+						},
+						fail: () => {},
+						complete: () => {}
+					})
+				}else if(this.changes == "取消"){
+					this.identityAuthenticationInfo.commonId = this.userInfo.id
+					this.identityAuthenticationInfo.customerTypeFlag = 3
+					this.identityAuthenticationInfo.customerType = "粮农"
+					this.identityAuthenticationInfo.id = this.id
+					uni.showModal({
+						content: '确定取消粮农身份?',
+						showCancel: true,
+						confirmText: '确定',
+						success: (e) => {
+							this.$api.doRequest('post', '/identityAuthenticationInfo/api/deleteIdentityAuthenticationInfo', this.identityAuthenticationInfo,
+									'application/json;charset=UTF-8').then(res => {
+										console.log(res.data.message,"判断")
+										console.log(res)
+									if (res.data.message == "Success") {
+										this.$api.msg('取消成功!')
+										this.changes = "确认"
+										this.getList()
+										return
+									}
+								})
+								.catch(res => {
+									uni.showToast({
+										title: res.errmsg,
+										icon: 'none',
+										duration: 2000
+									})
+								});
+						},
+						fail: () => {},
+						complete: () => {}
+					})
+					}
+				},	
+				
 			liangShang(){
-			
 				uni.navigateTo({
 					url: `/pages/attestation/indexTwo`
 				})
@@ -207,36 +229,49 @@
 				})
 			},
 			getList() {
-				this.identityAuthenticationInfo.commonId = this.userInfo.id
-				this.$api.doRequest('get', '/identityAuthenticationInfo/selectIdentityAuthenticationInfo', {
-						pageSize: 10,
-						currentPage: 1,
-						commonId: this.userInfo.id
-					}, 'application/json;charset=UTF-8').then(res => {
-						console.log("成功连接")
-
-
-						this.businessman = res.data.data.records
-					})
-					.catch(res => {
-						uni.showToast({
-							title: res.errmsg,
-							icon: 'none',
-							duration: 2000
-						})
-					});
-
-				this.$api.doRequest('get', '/driverViewInfo/selectDriverInfoPage', {
-						pageSize: 10,
-						currentPage: 1,
-						commonId: this.userInfo.id,
-						flag: 0
+				// this.identityAuthenticationInfo.commonId = this.userInfo.id
+				// this.$api.doRequest('get', '/identityAuthenticationInfo/selectIdentityAuthenticationInfo', {
+				// 		pageSize: 10,
+				// 		currentPage: 1,
+				// 		commonId: this.userInfo.id
+				// 	}, 'application/json;charset=UTF-8').then(res => {
+				// 		console.log("成功连接")
+				// 		this.businessman = res.data.data.records
+				// 	})
+				// 	.catch(res => {
+				// 		uni.showToast({
+				// 			title: res.errmsg,
+				// 			icon: 'none',
+				// 			duration: 2000
+				// 		})
+				// 	});
+
+				// this.$api.doRequest('get', '/driverViewInfo/selectDriverInfoPage', {
+				// 		pageSize: 10,
+				// 		currentPage: 1,
+				// 		commonId: this.userInfo.id,
+				// 		flag: 0
+				// 	}, 'application/json;charset=UTF-8').then(res => {
+				// 		console.log("成功连接")
+				// 		this.drivers = res.data.data.records
+				// 		console.log(this.drivers, "skalkdkk")
+				// 	})
+				// 	.catch(res => {
+				// 		uni.showToast({
+				// 			title: res.errmsg,
+				// 			icon: 'none',
+				// 			duration: 2000
+				// 		})
+				// 	});
+				this.$api.doRequest('get', '/identityAuthenticationInfo/selectCount', {
+					customerTypeFlag:3,customerType:"粮农"
 					}, 'application/json;charset=UTF-8').then(res => {
-						console.log("成功连接")
-
-						this.drivers = res.data.data.records
-
-						console.log(this.drivers, "skalkdkk")
+						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 => {
 						uni.showToast({
@@ -309,10 +344,10 @@
 	}
 
 	.homePage {
-		width: 101%;
+		width: 100%;
 		height: 200px;
 
-		margin: 20px auto;
+		margin-top: 20px;
 
 	}
 
@@ -338,12 +373,20 @@
 	}
 
 	.homePage1 {
-		width: 101%;
+		width: 100%;
+		height: 200px;
+		margin-top: 20px;
+	}
+	.homePage2 {
+		width: 100%;
+		height: 200px;
+		margin-top: 20px;
 	}
 
 	.background {
-		width: 100%;
+		width: 90%;
 		height: 200px;
+		margin: 0 auto;
 		position: fixed;
 	}
 
@@ -356,6 +399,7 @@
 	.portrait1 {
 		width: 75px;
 		height: 75px;
+		margin-right: 20px;
 		float: right;
 
 	}

+ 311 - 51
pages/attestation/indexThree.vue

@@ -5,38 +5,83 @@
 				<view class="logo">
 					粮商
 				</view>
-				<view class = "company" >{{item.driverName}}</view>
-				<view class = "geren" >{{item.driverPhone}}</view>
+				<view class="company">{{item.driverName}}</view>
+				<view class="geren">{{item.driverPhone}}</view>
 				<!-- <view class = "company" v-if="item.customerTypeFlag == 1">{{item.customerName}}</view>
 				<view class = "geren" v-if="item.customerTypeFlag == 1">  {{item.customerPhone}}</view>
 				<view class = "geren" v-if="item.customerTypeFlag == 2">{{item.customerName}}    {{item.customerPhone}}</view> -->
-				
-				<view class="status"  v-if="item.authenticationStatus == '已认证'" >
-					<image src="../../static/img/authentication/cert-personal@3x.png" style="width: 16px;height: 16px;top:3px;"></image>
+
+				<view class="status" v-if="item.authenticationStatus == '已认证'">
+					<image src="../../static/img/authentication/cert-personal@3x.png"
+						style="width: 16px;height: 16px;top:3px;"></image>
 					{{item.authenticationStatus}}
 				</view>
-				<view class="status1" v-if="item.authenticationStatus == '审核中'" >
+				<view class="status1" v-if="item.authenticationStatus == '审核中'">
 					{{item.authenticationStatus}}
 				</view>
-				<view class="status2" v-if="item.authenticationStatus == '未通过'" >
+				<view class="status2" v-if="item.authenticationStatus == '未通过'">
 					{{item.authenticationStatus}}
 				</view>
-				<view class="status3" v-if="item.authenticationStatus == '已覆盖'" >
+				<view class="status3" v-if="item.authenticationStatus == '已覆盖'">
 					{{item.authenticationStatus}}
 				</view>
 			</view>
 			<hr style="margin: 10px 0;">
-			<view class="cu-tag yuan">
-				<image src="../../static/img/authentication/selected(2).png" style="width: 16px;height: 16px;">设置默认</image>
+			<view class="flex">
+				<view class="yuan">
+					<image src="../../static/img/authentication/selected(2).png"
+						style="width: 16px;height: 16px;top: 3px;">设置默认</image>
+				</view>
+				<view class='but' @click="open(item)">更换手机号</view>
+				<view class='but' @click="companyEdit(item)">修改</view>
+				<view class='but' @click="deleteSJ(item)">删除</view>
+			</view>
+			<view v-if='pricestatus' class='shade'>
+				<view class='shade-content'>
+					<view class="titel">
+						更换手机号
+					</view>
+					<view class="cancel" @click='pricestatus=false'>×</view>
+					<view class='shade-content-item'>
+						<input v-model='price' placeholder="请输入手机号" type="number" class="tainput">
+					</view>
+					<view>
+						<!-- 	<view style='width:50%;display:inline-block;' @click='pricestatus=false'>取消</view>
+						<view style='width:50%;display:inline-block;' @click='amendprice'>确定</view> -->
+						<view class="determine" @click="getcode">
+							获取验证码
+						</view>
+					</view>
+				</view>
+			</view>
+			<!-- 	//填写验证码 -->
+			<view v-if='pricestatusTwo' class='shade'>
+				<view class='shade-content'>
+					<view class="titel">
+						填写验证码
+					</view>
+					<text style="color:#AFB3BF;font-size: 14px;">验证码已发送至+86 {{price}}</text>
+					<view class="cancel" @click='pricestatusTwo=false,pricestatus=false'>×</view>
+					<view class='shade-content-item flex'>
+						<input v-model='verifyCode' placeholder="填写验证码" type="number" class="tainput1">
+						<text style="color:#AFB3BF;font-size: 14px;">{{sendText}}</text>
+					</view>
+					<view>
+						<view class="flex">
+							<text class="btns1 btn1" @click='pricestatusTwo=false'>取消</text>
+							<view class="btns1 btn2" @click='amendprice(item)'>确定</view>
+						</view>
+						<!-- <view class="determine">
+							获取验证码
+						</view> -->
+					</view>
+				</view>
 			</view>
-			<view class='cu-tag but'>更换手机号</view>
-			<view class='cu-tag but' @click="companyEdit(item)">修改</view>
-			<view class='cu-tag but' @click="deleteSJ(item)">删除</view>
-			
+
 
 
 		</view>
-		<button class="btn btns"  @click="Add">新增</button>
+		<button class="btn btns" @click="Add">新增</button>
 	</view>
 </template>
 
@@ -50,7 +95,12 @@
 			return {
 				businessman: {},
 				identityAuthenticationInfo: {},
-				drivers:{},
+				drivers: {},
+				pricestatus: false,
+				pricestatusTwo: false,
+				price: "",
+				verifyCode: "",
+				sendText: "60s后重发",
 			}
 		},
 		computed: {
@@ -60,7 +110,11 @@
 			this.getList()
 		},
 		methods: {
-			Add(){
+			open() {
+				this.pricestatus = !this.pricestatus
+			},
+
+			Add() {
 				uni.navigateTo({
 					url: `/pageD/identity/driverIdentity`
 				})
@@ -74,9 +128,9 @@
 						flag: 0
 					}, 'application/json;charset=UTF-8').then(res => {
 						console.log("成功连接")
-				
+
 						this.drivers = res.data.data.records
-				
+
 						console.log(this.drivers, "skalkdkk")
 					})
 					.catch(res => {
@@ -87,7 +141,96 @@
 						})
 					});
 			},
-			navToDetailPage(item){
+			amendprice(item) {
+				console.log(item.id, "判断id是否正确")
+				this.$api.doRequest('get', '/commonUser/loginVerifyCode', {
+						phone: this.price,
+						verifyCode: this.verifyCode
+					}).then(res => {
+						if (res.data.code == 200) {
+							console.log(item.id, "判断id")
+							this.$api.doRequest('post', '/driverViewInfo/api/editInfo', {
+									driverPhone: this.price,
+									id: item.id,
+									commonId: this.userInfo.id
+								}, 'application/json;charset=UTF-8').then(res => {
+									console.log("手机号修改成功")
+									if (res.data.code == 200) {
+										uni.switchTab({
+											url: '/pages/attestation/indexThree'
+										});
+										this.$api.msg('修改成功!')
+									}
+									console.log("执行完毕")
+								})
+								.catch(res => {
+									uni.showToast({
+										title: res.errmsg,
+										icon: 'none',
+										duration: 2000
+									})
+								});
+						} else {
+							uni.showToast({
+								title: res.data.message,
+								icon: 'none',
+								duration: 2000
+							})
+						}
+					})
+					.catch(res => {
+						console.log(res.data.message),
+							uni.showToast({
+
+								title: res.data.message,
+								icon: 'none',
+								duration: 2000
+							})
+					});
+			},
+			getcode() {
+				this.pricestatusTwo = !this.pricestatusTwo
+				var that = this
+				if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.price)) {
+					this.$api.doRequest('get', '/commonUser/sendVerifyCode', {
+							phone: this.price
+						}).then(res => {
+							if (res.data.code == 200) {
+								that.sendDisabled = true
+								let sec = 60
+								let interval = setInterval(() => {
+									sec--;
+									that.sendText = sec + 's后重发'
+									if (sec <= 0) {
+										that.sendDisabled = false
+										that.sendText = "获取验证码"
+										clearInterval(interval)
+									}
+								}, 1000)
+							} else {
+								uni.showToast({
+									title: res.data.message,
+									icon: 'none',
+									duration: 2000
+								})
+							}
+						})
+						.catch(res => {
+							uni.showToast({
+								title: res.data.message,
+								icon: 'none',
+								duration: 2000
+							})
+						});
+				} else {
+					uni.showToast({
+						title: '请输入正确的手机号',
+						icon: 'none',
+						duration: 2000
+					})
+				}
+			},
+			navToDetailPage(item) {
 				uni.navigateTo({
 					url: `/pageD/identity/driverIdentityLook?id=${item.id}`
 				})
@@ -96,7 +239,6 @@
 				this.deletes = {}
 				this.deletes.id = item.id
 				uni.showModal({
-					// title: '登录提示',
 					content: '身份信息删除后不可恢复,是否确定删除?',
 					showCancel: true,
 					confirmText: '确定',
@@ -109,7 +251,7 @@
 									this.getList()
 									return
 								}
-				
+
 							})
 							.catch(res => {
 								uni.showToast({
@@ -150,12 +292,13 @@
 
 	.company {
 		font-size: 16px;
-	    font-weight: 600;
+		font-weight: 600;
 		margin-top: 10px;
 		display: inline-block;
 		margin-left: 10px;
 	}
-	.geren{
+
+	.geren {
 		color: #AFB3BF;
 		font-size: 14px;
 		margin-top: 34px;
@@ -171,11 +314,11 @@
 		line-height: 20px;
 	}
 
-	.but {
+	/* 	.but {
 		border: 1px solid #CDCDCD;
 		border-radius: 10px;
 		
-	}
+	} */
 
 	.homePage {
 		width: 101%;
@@ -203,38 +346,155 @@
 		border-radius: 16px;
 
 	}
-	.status{
-	position: absolute;
-	margin-top: 10px;
-	right: 36px;
-		color:#22C572;
-	}
-	.status1{
-	position: absolute;
-	margin-top: 10px;
-	right: 36px;
-	color:#FE6430;
-	}
-	.status2{
-	position: absolute;
-	margin-top: 10px;
-	right: 36px;
-	color: #FB1E1E;
-	}
-	.status3{
-	position: absolute;
-	margin-top: 10px;
-	right: 36px;
-	color: #AFB3BF;
-	}	
+
+	.status {
+		position: absolute;
+		margin-top: 10px;
+		right: 36px;
+		color: #22C572;
+	}
+
+	.status1 {
+		position: absolute;
+		margin-top: 10px;
+		right: 36px;
+		color: #FE6430;
+	}
+
+	.status2 {
+		position: absolute;
+		margin-top: 10px;
+		right: 36px;
+		color: #FB1E1E;
+	}
+
+	.status3 {
+		position: absolute;
+		margin-top: 10px;
+		right: 36px;
+		color: #AFB3BF;
+	}
+
 	.btn {
 		margin-top: 10px;
 		background-color: #FFFFFF;
 		border-radius: 25px;
 		border: none;
 	}
-	
+
 	.btns {
 		background-color: #22C572;
 	}
+
+	.but {
+		height: 33px;
+		border: 1px solid #CDCDCD;
+		border-radius: 20px;
+		line-height: 30px;
+		padding: 0 8px;
+		text-align: center;
+		margin-left: 20px;
+		font-size: 14px;
+		font-weight: 500;
+	}
+
+	.yuan {
+		margin-top: 6px;
+		font-size: 14px;
+		font-weight: 500;
+	}
+
+	.shade-content {
+		background: #fff;
+		position: absolute;
+		top: 50%;
+		left: 50%;
+		transform: translateX(-50%) translateY(-50%);
+		z-index: 999999;
+		text-align: center;
+		border-radius: 20px;
+	}
+
+	.shade-content-item {
+		width: 277px;
+		text-align: center;
+		height: 121px;
+		padding: 35px 10px;
+
+	}
+
+	.shade {
+		position: fixed;
+		top: 0;
+		left: 0;
+		width: 100%;
+		background: rgba(0, 0, 0, 0.5);
+		height: 100%;
+		z-index: 999999;
+	}
+
+	.titel {
+		font-size: 18px;
+		font-weight: 600;
+		margin-top: 20px;
+	}
+
+	.determine {
+		width: 95px;
+		height: 36px;
+		background-color: #22C572;
+		color: #FFFFFF;
+		border-radius: 10px;
+		margin: 0 auto;
+		line-height: 36px;
+		margin-top: -30px;
+		margin-bottom: 20px;
+	}
+
+	.tainput {
+		width: 70%;
+		padding-left: 10px;
+		margin: 0 auto;
+		text-align: left;
+		border-bottom: 1px solid #AFB3BF;
+		border-radius: 3px;
+
+	}
+
+	.cancel {
+		width: 20px;
+		height: 20px;
+		font-size: 20px;
+		color: #8890B1;
+		float: right;
+		margin-right: 20px;
+		margin-top: -25px;
+	}
+
+	.btns1 {
+		width: 50%;
+		font-size: 18px;
+		line-height: 50px;
+		text-align: center;
+		border-top: 1px solid #EEEEEE;
+		margin-top: -26px;
+	}
+
+	.btn1 {
+		border-right: 1px solid #EEEEEE;
+		color: #AFB3BF;
+	}
+
+	.btn2 {
+		color: #22C572;
+	}
+
+	.tainput1 {
+		width: 70%;
+		padding-left: 10px;
+		margin: 0 auto;
+		text-align: left;
+		/* 	border-bottom: 1px solid #AFB3BF; */
+		border-radius: 3px;
+	}
 </style>

+ 316 - 49
pages/attestation/indexTwo.vue

@@ -5,36 +5,82 @@
 				<view class="logo">
 					粮商
 				</view>
-				<view class = "company" >{{item.compName}}</view>
-				<view class = "company" v-if="item.customerTypeFlag == 1">{{item.customerName}}</view>
-				<view class = "geren" v-if="item.customerTypeFlag == 1">  {{item.customerPhone}}</view>
-				<view class = "geren" v-if="item.customerTypeFlag == 2">{{item.customerName}}    {{item.customerPhone}}</view>
-				<view class="status"  v-if="item.authenticationStatus == '已认证'" >
-					<image src="../../static/img/authentication/cert-personal@3x.png" style="width: 16px;height: 16px;top:3px;"></image>
+				<view class="company">{{item.compName}}</view>
+				<view class="company" v-if="item.customerTypeFlag == 1">{{item.customerName}}</view>
+				<view class="geren" v-if="item.customerTypeFlag == 1"> {{item.customerPhone}}</view>
+				<view class="geren" v-if="item.customerTypeFlag == 2">{{item.customerName}} {{item.customerPhone}}
+				</view>
+				<view class="status" v-if="item.authenticationStatus == '已认证'">
+					<image src="../../static/img/authentication/cert-personal@3x.png"
+						style="width: 16px;height: 16px;top:3px;"></image>
 					{{item.authenticationStatus}}
 				</view>
-				<view class="status1" v-if="item.authenticationStatus == '审核中'" >
+				<view class="status1" v-if="item.authenticationStatus == '审核中'">
 					{{item.authenticationStatus}}
 				</view>
-				<view class="status2" v-if="item.authenticationStatus == '未通过'" >
+				<view class="status2" v-if="item.authenticationStatus == '未通过'">
 					{{item.authenticationStatus}}
 				</view>
-				<view class="status3" v-if="item.authenticationStatus == '已覆盖'" >
+				<view class="status3" v-if="item.authenticationStatus == '已覆盖'">
 					{{item.authenticationStatus}}
 				</view>
 			</view>
 			<hr style="margin: 10px 0;">
-			<view class="cu-tag yuan">
-				<image src="../../static/img/authentication/selected(2).png" style="width: 16px;height: 16px;">设置默认</image>
+			<view class="flex">
+				<view class=" yuan">
+					<image src="../../static/img/authentication/selected(2).png"
+						style="width: 16px;height: 16px;top: 3px;">设置默认</image>
+				</view>
+				<view class=' but' @click="open(item)">更换手机号</view>
+				<view class=' but' @click="companyEdit(item)">修改</view>
+				<view class=' but' @click="deleteLS(item)">删除</view>
+			</view>
+
+			<view v-if='pricestatus' class='shade'>
+				<view class='shade-content'>
+					<view class="titel">
+						更换手机号
+					</view>
+					<view class="cancel" @click='pricestatus=false'>×</view>
+					<view class='shade-content-item'>
+						<input v-model='price' placeholder="请输入手机号" type="number" class="tainput">
+					</view>
+					<view>
+						<!-- 	<view style='width:50%;display:inline-block;' @click='pricestatus=false'>取消</view>
+						<view style='width:50%;display:inline-block;' @click='amendprice'>确定</view> -->
+						<view class="determine" @click="getcode">
+							获取验证码
+						</view>
+					</view>
+				</view>
+			</view>
+			<!-- 	//填写验证码 -->
+			<view v-if='pricestatusTwo' class='shade'>
+				<view class='shade-content'>
+					<view class="titel">
+						填写验证码
+					</view>
+					<text style="color:#AFB3BF;font-size: 14px;">验证码已发送至+86 {{price}}</text>
+					<view class="cancel" @click='pricestatusTwo=false,pricestatus=false'>×</view>
+					<view class='shade-content-item flex'>
+						<input v-model='verifyCode' placeholder="填写验证码" type="number" class="tainput1">
+						<text style="color:#AFB3BF;font-size: 14px;">{{sendText}}</text>
+					</view>
+					<view>
+						<view class="flex">
+							<text class="btns1 btn1" @click='pricestatusTwo=false'>取消</text>
+							<view class="btns1 btn2" @click='amendprice(item)'>确定</view>
+						</view>
+						<!-- <view class="determine">
+							获取验证码
+						</view> -->
+					</view>
+				</view>
 			</view>
-			<view class='cu-tag but'>更换手机号</view>
-			<view class='cu-tag but' @click="companyEdit(item)">修改</view>
-			<view class='cu-tag but' @click="deleteLS(item)">删除</view>
-			
 
 
 		</view>
-		<button class="btn btns"  @click="Add">新增</button>
+		<button class="btn btns" @click="Add">新增</button>
 	</view>
 </template>
 
@@ -48,7 +94,12 @@
 			return {
 				businessman: {},
 				identityAuthenticationInfo: {},
-				judge:"geren",
+				judge: "geren",
+				pricestatus: false,
+				pricestatusTwo: false,
+				price: "",
+				sendText: "60s后重发",
+				verifyCode: "",
 			}
 		},
 		computed: {
@@ -58,7 +109,22 @@
 			this.getList()
 		},
 		methods: {
-			Add(){
+			nextstep() {
+				// if (!this.price) {
+				// 	this.$api.msg('请填写手机号')
+				// 	return
+				// }
+				// if (this.price.length != 11 ) {
+				// 	this.$api.msg('请正确填写手机号')
+				// 	return
+				// }
+				this.pricestatusTwo = !this.pricestatusTwo
+			},
+			open() {
+				this.pricestatus = !this.pricestatus
+			},
+
+			Add() {
 				uni.navigateTo({
 					url: `/pageD/identity/companyIdentity`
 				})
@@ -81,7 +147,96 @@
 						})
 					});
 			},
-			navToDetailPage(item){
+			amendprice(item) {
+				this.$api.doRequest('get', '/commonUser/loginVerifyCode', {
+						phone: this.price,
+						verifyCode: this.verifyCode
+					}).then(res => {
+						if (res.data.code == 200) {
+							this.$api.doRequest('post', '/identityAuthenticationInfo/api/modifyIdentityPhone', {
+									customerPhone: this.price,
+									id: item.id,
+									commonId: this.userInfo.id
+								}, 'application/json;charset=UTF-8').then(res => {
+									if (res.data.code == 200) {
+										uni.switchTab({
+											url: '/pages/attestation/indexTwo'
+										});
+										this.$api.msg('修改成功!')
+									}
+									
+								})
+								.catch(res => {
+									uni.showToast({
+										title: res.errmsg,
+										icon: 'none',
+										duration: 2000
+									})
+								});
+
+							// uni.hideLoading()
+						} else {
+							// uni.hideLoading()
+							uni.showToast({
+								title: res.data.message,
+								icon: 'none',
+								duration: 2000
+							})
+						}
+					})
+					.catch(res => {
+						console.log(res.data.message),
+							uni.showToast({
+
+								title: res.data.message,
+								icon: 'none',
+								duration: 2000
+							})
+					});
+			},
+			getcode() {
+				this.pricestatusTwo = !this.pricestatusTwo
+				var that = this
+				if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.price)) {
+					this.$api.doRequest('get', '/commonUser/sendVerifyCode', {
+							phone: this.price
+						}).then(res => {
+							if (res.data.code == 200) {
+								that.sendDisabled = true
+								let sec = 60
+								let interval = setInterval(() => {
+									sec--;
+									that.sendText = sec + 's后重发'
+									if (sec <= 0) {
+										that.sendDisabled = false
+										that.sendText = "获取验证码"
+										clearInterval(interval)
+									}
+								}, 1000)
+							} else {
+								uni.showToast({
+									title: res.data.message,
+									icon: 'none',
+									duration: 2000
+								})
+							}
+						})
+						.catch(res => {
+							uni.showToast({
+								title: res.data.message,
+								icon: 'none',
+								duration: 2000
+							})
+						});
+				} else {
+					uni.showToast({
+						title: '请输入正确的手机号',
+						icon: 'none',
+						duration: 2000
+					})
+				}
+			},
+			navToDetailPage(item) {
 				uni.navigateTo({
 					url: `/pageD/identity/companyIdentityLook?id=${item.id}`
 				})
@@ -103,7 +258,7 @@
 									this.getList()
 									return
 								}
-			
+
 							})
 							.catch(res => {
 								uni.showToast({
@@ -144,12 +299,13 @@
 
 	.company {
 		font-size: 16px;
-	    font-weight: 600;
+		font-weight: 600;
 		margin-top: 10px;
 		display: inline-block;
 		margin-left: 10px;
 	}
-	.geren{
+
+	.geren {
 		color: #AFB3BF;
 		font-size: 14px;
 		margin-top: 34px;
@@ -166,9 +322,21 @@
 	}
 
 	.but {
+		height: 33px;
 		border: 1px solid #CDCDCD;
-		border-radius: 10px;
-		
+		border-radius: 20px;
+		line-height: 30px;
+		padding: 0 8px;
+		text-align: center;
+		margin-left: 20px;
+		font-size: 14px;
+		font-weight: 500;
+	}
+
+	.yuan {
+		margin-top: 6px;
+		font-size: 14px;
+		font-weight: 500;
 	}
 
 	.homePage {
@@ -197,38 +365,137 @@
 		border-radius: 16px;
 
 	}
-	.status{
-	position: absolute;
-	margin-top: 10px;
-	right: 36px;
-		color:#22C572;
-	}
-	.status1{
-	position: absolute;
-	margin-top: 10px;
-	right: 36px;
-	color:#FE6430;
-	}
-	.status2{
-	position: absolute;
-	margin-top: 10px;
-	right: 36px;
-	color: #FB1E1E;
-	}
-	.status3{
-	position: absolute;
-	margin-top: 10px;
-	right: 36px;
-	color: #AFB3BF;
-	}	
+
+	.status {
+		position: absolute;
+		margin-top: 10px;
+		right: 36px;
+		color: #22C572;
+	}
+
+	.status1 {
+		position: absolute;
+		margin-top: 10px;
+		right: 36px;
+		color: #FE6430;
+	}
+
+	.status2 {
+		position: absolute;
+		margin-top: 10px;
+		right: 36px;
+		color: #FB1E1E;
+	}
+
+	.status3 {
+		position: absolute;
+		margin-top: 10px;
+		right: 36px;
+		color: #AFB3BF;
+	}
+
 	.btn {
 		margin-top: 10px;
 		background-color: #FFFFFF;
 		border-radius: 25px;
 		border: none;
 	}
-	
+
 	.btns {
 		background-color: #22C572;
 	}
+
+	.shade-content {
+		background: #fff;
+		position: absolute;
+		top: 50%;
+		left: 50%;
+		transform: translateX(-50%) translateY(-50%);
+		z-index: 999999;
+		text-align: center;
+		border-radius: 20px;
+	}
+
+	.shade-content-item {
+		width: 277px;
+		text-align: center;
+		height: 121px;
+		padding: 35px 10px;
+
+	}
+
+	.shade {
+		position: fixed;
+		top: 0;
+		left: 0;
+		width: 100%;
+		background: rgba(0, 0, 0, 0.5);
+		height: 100%;
+		z-index: 999999;
+	}
+
+	.titel {
+		font-size: 18px;
+		font-weight: 600;
+		margin-top: 20px;
+	}
+
+	.determine {
+		width: 95px;
+		height: 36px;
+		background-color: #22C572;
+		color: #FFFFFF;
+		border-radius: 10px;
+		margin: 0 auto;
+		line-height: 36px;
+		margin-top: -30px;
+		margin-bottom: 20px;
+	}
+
+	.tainput {
+		width: 70%;
+		padding-left: 10px;
+		margin: 0 auto;
+		text-align: left;
+		border-bottom: 1px solid #AFB3BF;
+		border-radius: 3px;
+
+	}
+
+	.tainput1 {
+		width: 70%;
+		padding-left: 10px;
+		margin: 0 auto;
+		text-align: left;
+		/* 	border-bottom: 1px solid #AFB3BF; */
+		border-radius: 3px;
+	}
+
+	.cancel {
+		width: 20px;
+		height: 20px;
+		font-size: 20px;
+		color: #AFB3BF;
+		float: right;
+		margin-right: 20px;
+		margin-top: -25px;
+	}
+
+	.btns1 {
+		width: 50%;
+		font-size: 18px;
+		line-height: 50px;
+		text-align: center;
+		border-top: 1px solid #EEEEEE;
+		margin-top: -26px;
+	}
+
+	.btn1 {
+		border-right: 1px solid #EEEEEE;
+		color: #AFB3BF;
+	}
+
+	.btn2 {
+		color: #22C572;
+	}
 </style>

+ 134 - 113
pages/business/business.vue

@@ -2,30 +2,32 @@
 	<view>
 		<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 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="search-form round" @click="naviageToPage('/pageA/product/lookup?TabCur=')">
+					<text style='color: #ccc;text-indent:56px;' class="cuIcon-search"></text>
+					<input type="text" placeholder="请输入货名或标题" confirm-type="search"></input>
 				</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="search-form round" @click="naviageToPage('/pageA/product/lookup?TabCur=')">
-				<text style='color: #ccc;text-indent:56px;' class="cuIcon-search"></text>
-				<input type="text" placeholder="请输入货名或标题" confirm-type="search"></input>
 			</view>
-		</view>
-		<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 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 @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)">
@@ -36,8 +38,10 @@
 					<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 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 class='flex justify-between'>
 					<view>
@@ -54,24 +58,17 @@
 				<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 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>
-			<view>
-				<view
-					id="_drag_button"
-					class="drag"
-					style="right:0;bottom:60px;"
-					@touchstart="touchstart"
-					@touchmove.stop.prevent="touchmove"
-					@touchend="touchend"
-					@click.stop.prevent="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>
+		</view>
 		<!-- <drag-button :isDock="true" :existTabBar="true" :isIcon="true" text="发布" location="20" @btnClick="fabu" /> -->
 	</view>
 </template>
@@ -88,10 +85,10 @@
 				isLoadMore: false, //是否加载中
 				showTran: true,
 				scrollTop: 0,
-				pageSize:10,
-				searchKeyWord:'',
-				receivePrivate:'',
-				currentPage:1,
+				pageSize: 10,
+				searchKeyWord: '',
+				receivePrivate: '',
+				currentPage: 1,
 				categoryList: [{
 					title: '我要买粮',
 					id: '0'
@@ -102,7 +99,7 @@
 				TabCur: 0,
 				current: 1,
 				location: 0,
-				locationType: ['全国','黑龙江', '河南', '山东', '安徽', '吉林', '河北', '江苏', '内蒙古', '四川', '湖南', '湖北', '辽宁',
+				locationType: ['全国', '黑龙江', '河南', '山东', '安徽', '吉林', '河北', '江苏', '内蒙古', '四川', '湖南', '湖北', '辽宁',
 					'江西', '云南', '新疆', '山西', '广西', '陕西', '广东', '甘肃', '重庆', '贵州', '浙江', '福建',
 					'宁夏', '天津', '海南', '青海', '西藏', '上海', '北京'
 				]
@@ -138,8 +135,8 @@
 			}
 		},
 		methods: {
-			sousuo(name){
-				var page = '/pageA/product/lookup?TabCur=' + this.TabCur+'&searchKeyWord='+name
+			sousuo(name) {
+				var page = '/pageA/product/lookup?TabCur=' + this.TabCur + '&searchKeyWord=' + name
 				uni.navigateTo({
 					url: page,
 					fail() {
@@ -149,8 +146,8 @@
 					}
 				})
 			},
-			tabcarchange(status){
-				this.TabCur=status
+			tabcarchange(status) {
+				this.TabCur = status
 				this.pageSize = 1
 				this.loadData()
 			},
@@ -166,7 +163,7 @@
 				})
 			},
 			locationChange(e) {
-				
+
 				this.receivePrivate = e.detail.value
 				this.pageSize = 1
 				this.loadData()
@@ -180,10 +177,10 @@
 			fabu() {
 				uni.showActionSheet({
 					itemList: ['我要买粮', '我要卖粮'],
-					success (res) {
+					success(res) {
 						console.log(res.tapIndex)
 					},
-					fail (res) {
+					fail(res) {
 						console.log(res.errMsg)
 					}
 				})
@@ -202,21 +199,25 @@
 				if (that.TabCur == 0) {
 					param1 = '/procurementPlanInfo/selectProcurementPlanInfo'
 				} else {
-					param1 = 'buy'
+					param1 = '/salePlanInfo/selectSalePlanInfo'
 				}
-				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({
-						title: res.errmsg,
-						icon:'none',
-						duration: 2000
+				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({
+							title: res.errmsg,
+							icon: 'none',
+							duration: 2000
+						})
+					});
 				// that.$api.request(param1, param2, {
 				// 	page: 1,
 				// 	limit: 10
@@ -263,7 +264,7 @@ currentPage:this.currentPage,searchKeyWord:this.searchKeyWord,receivePrivate:thi
 						})
 					} else {
 						uni.navigateTo({
-							url: `/pageA/product/detail_buy?id=${id}`
+							url: `/pageA/product/sales_detail?id=${id}`
 						})
 					}
 
@@ -330,79 +331,93 @@ currentPage:this.currentPage,searchKeyWord:this.searchKeyWord,receivePrivate:thi
 	.content {
 		background: #F5F6FA;
 	}
-	.line{
-		display:inline-block;
-		padding:5px;
-		position:relative;
-		font-size:17px;
+
+	.line {
+		display: inline-block;
+		padding: 5px;
+		position: relative;
+		font-size: 17px;
 	}
-	.line.active{
-		font-size:19px;
+
+	.line.active {
+		font-size: 19px;
 		font-weight: 900;
 	}
-	.line.active:after{
-		content:'';
-		display:block;
-		position:absolute;
-		width:18px;
-		left:50%;
+
+	.line.active:after {
+		content: '';
+		display: block;
+		position: absolute;
+		width: 18px;
+		left: 50%;
 		transform: translateX(-50%);
-		bottom:0;
-		border-bottom:1px solid #22C572;
+		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: #F5F6F9;
 	}
+
 	.title-tip {
 		color: #E63113;
 		text-align: right;
 	}
-	
+
 	.tag1 {
-		background:#F5F6F9;
+		background: #F5F6F9;
 		padding: 5px;
-		color:#333333;
+		color: #333333;
 		display: inline-flex;
 		font-size: 22rpx;
 		border-radius: 3px;
 		margin: 3px;
 	}
+
 	.tag {
-		background:#F5F6F9;
+		background: #F5F6F9;
 		padding: 7px 12px;
-		color:#333333;
+		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;
 	}
+
 	.text-white {
 		color: #fff;
 	}
+
 	.text-white text {
 		position: relative;
 		z-index: 2;
@@ -645,35 +660,39 @@ currentPage:this.currentPage,searchKeyWord:this.searchKeyWord,receivePrivate:thi
 		}
 	}
 
-.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 .guess-item{
-			border-radius:4px;
-			background: #fff;
-			padding: 0upx 30upx 20upx;
-			margin:10px;
-			padding-bottom: 20upx;
-			border-bottom: 1px solid #ccc;
-		}
+	.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 .guess-item {
+		border-radius: 4px;
+		background: #fff;
+		padding: 0upx 30upx 20upx;
+		margin: 10px;
+		padding-bottom: 20upx;
+		border-bottom: 1px solid #ccc;
+	}
+
 	/* 销售信息 */
-	.introduce-section{
+	.introduce-section {
 		.title-tip {
 			flex: 1;
 		}
@@ -718,27 +737,29 @@ currentPage:this.currentPage,searchKeyWord:this.searchKeyWord,receivePrivate:thi
 			}
 		}
 	}
-	.side-bg{
-		position:absolute;
+
+	.side-bg {
+		position: absolute;
 		width: 64px;
 		height: 64px;
 		z-index: 1;
 	}
+
 	.drag {
-		position:relative;
+		position: relative;
 		display: flex;
 		justify-content: center;
 		align-items: center;
 		color: $uni-text-color-inverse;
 		width: 64px;
 		height: 64px;
-		background:transparent;
+		background: transparent;
 		font-size: $uni-font-size-sm;
 		position: fixed;
 		z-index: 9;
-		
+
 		&.transition {
-			transition: left .3s ease,top .3s ease;
+			transition: left .3s ease, top .3s ease;
 		}
 	}
 </style>

+ 1 - 1
pages/task/my_task.vue

@@ -28,7 +28,7 @@
 					<view class="title-tip-b">{{item.inOutDate}}</view>
 					<!-- <view class="title-tip-b">2021-07-30</view> -->
 				</view>
-				<u-tag :text="item.taskType" type="success" />
+				<u-tag :text="item.taskType" type="success"/>
 				<!-- <u-tag text="入库任务" type="primary" /> -->
 			</view>
 			<view v-show="isLoadMore">

二進制
static/img/authentication/farmer @3x.png


二進制
static/img/authentication/farmer.png


二進制
static/img/authentication/farmer@2x.png


Some files were not shown because too many files changed in this diff