mym пре 1 година
родитељ
комит
f134d078a3
3 измењених фајлова са 189 додато и 90 уклоњено
  1. 1 1
      pages/index/index.vue
  2. 184 85
      pages/market/one/merchant/order/list.vue
  3. 4 4
      pages/personal/personal.vue

+ 1 - 1
pages/index/index.vue

@@ -105,7 +105,7 @@ export default {
 					});
 				}
 			});
-			console.log(this.menuList);
+			// console.log(this.menuList);
 		},
 		getNewsList() {
 			this.http.request({

+ 184 - 85
pages/market/one/merchant/order/list.vue

@@ -31,106 +31,205 @@
 				<view class="op">
 					<view class="date">2022-12-12:12:12</view>
 					<template v-if="item.enterpriseConfirm == 0">
-						<view class="an" style="color: #f44336" @click.stop="confirm(item.id, 2, '确认拒绝?')">取消订单</view>
-						<view class="an" style="color: #4581fb" @click.stop="confirm(item.goodsId, 1, '确认接单?')">确认订单</view>
+						<view class="an" style="color: #f44336" @click.stop="confirm(item.id, 2, '确认拒绝?')">拒绝订单</view>
+						<view class="an" style="color: #4581fb" @click.stop="confirm(item.goodsId, 1, '确认接单?')">确认订单
+						</view>
+					</template>
+					<template v-if="item.enterpriseConfirm == 1">
+						<view class="an" style="color: #13ce66"
+							 @click.stop="showPop">物流车辆</view>
 					</template>
 				</view>
 			</view>
 			<view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
 			<u-empty v-if="!loadMore && list.length == 0"></u-empty>
+			<view>
+				<u-popup :show="show" @close="close" @open="open">
+					<view class="pop">
+			            <view class="search">
+			            	<u-search placeholder="输入车辆名称" v-model="param.vehiclePlate" bgColor="white" @search="getByVehiclePlate()" :showAction="true" @clear="getByVehiclePlate()"></u-search>
+			            	<view class="clear"></view>
+			            </view>
+						<scroll-view class="goodsList" scroll-y="true" style="height: 450rpx; width: 97%;" :show-scrollbar="true">
+							<view class="item" v-for="(item, index) in vehiceList" :key="index" style="height: 80rpx;">
+								<view class="con">
+									<view class="productName omit">{{ item.vehiclePlate }}</view>
+									<view class="desc omit">{{item.vehicleModel}}</view>
+								</view>
+								<view><button class="btn" @click="vehicleClick(item.id)">确认绑定</button> </view>
+								<view class="clear"></view>
+							</view>
+							<view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
+							<u-empty v-if="!loadMore && vehiceList.length == 0"></u-empty>
+						</scroll-view>
+						<!-- <view><button>确定</button></view> -->
+			        </view>
+				</u-popup>
+			</view>
 		</view>
 	</view>
 </template>
 
 <script>
-export default {
-	data() {
-		return {
-			tab: [
-				{ name: '全部', enterpriseConfirm: '', isOrders: ''},
-				{ name: '待确认', enterpriseConfirm: 0, isOrders: 1},
-				{ name: '已确认', enterpriseConfirm: 1, isOrders: 1},
-				{ name: '已拒绝', enterpriseConfirm: 2 ,isOrders: 0}
-			],
-			param: { pageNo: 1, pageSize: 10},
-			list: [],
-			loadMore: true
-		};
-	},
-	onLoad() {
-		this.getData();
-	},
-	methods: {
-		getData() {
-			this.http.request({
-				url: '/level-one-server/app/TbOrder/getList',
-				loading: 'false',
-				data: this.param,
-				success: res => {
-					this.loadMore = parseInt(res.data.pageCount) > this.param.pageNo;
-					if(res.data.data){
-						this.list.push(...res.data.data);
+	export default {
+		data() {
+			return {
+				tab: [{
+						name: '全部',
+						enterpriseConfirm: '',
+						isOrders: ''
+					},
+					{
+						name: '待确认',
+						enterpriseConfirm: 0,
+						isOrders: 1
+					},
+					{
+						name: '已确认',
+						enterpriseConfirm: 1,
+						isOrders: 1
+					},
+					{
+						name: '已拒绝',
+						enterpriseConfirm: 2,
+						isOrders: 0
 					}
-				}
-			});
-		},
-		//点击tab切换
-		click(e) {
-			this.param.enterpriseConfirm = e.enterpriseConfirm;
-			this.param.isOrders = e.isOrders;
-			this.refresh();
-		},
-		detail(item) {
-			uni.navigateTo({ url: '/pages/market/one/merchant/order/detail?id=' + item.id });
+				],
+				param: {
+					pageNo: 1,
+					pageSize: 10
+				},
+				list: [],
+				loadMore: true,
+				show: false,
+				vehiceList: [],
+			};
 		},
-		//刷新数据
-		refresh() {
-			this.loadMore = true;
-			this.param.pageNo = 1;
-			this.list = [];
+		onLoad() {
 			this.getData();
-		}, 
-		// 商家确认
-		confirm(id, status, content) {
-			//enterprise_confirm:'商铺确认情况[0=待确认,1=已确认,2=拒绝]'
-			uni.showModal({
-				title: '提示',
-				content: content,
-				success: res => {
-					if (res.confirm) {
-						this.http.request({
-							url: '/level-one-server/app/TbGoodsTransit/updateEnterpriseConfirm',
-							data: { id: id, enterpriseConfirm: status },
-							method: 'POST',
-							success: resp => {
-								uni.showToast({ title: '操作成功' });
-								this.refresh();
-							}
-						});
+		},
+		methods: {
+			getData() {
+				this.http.request({
+					url: '/level-one-server/app/TbOrder/getList',
+					loading: 'false',
+					data: this.param,
+					success: res => {
+						this.loadMore = parseInt(res.data.pageCount) > this.param.pageNo;
+						if (res.data.data) {
+							this.list.push(...res.data.data);
+						}
 					}
-				}
-			});
-		}
-	},
-	//下拉刷新
-	onPullDownRefresh() {
-		setTimeout(() => {
-			this.refresh();
-			uni.stopPullDownRefresh();
-		}, 1000);
-	},
-	//上拉加载
-	onReachBottom() {
-		if (this.loadMore) {
-			this.param.pageNo++;
-			this.getData();
+				});
+			},
+			//点击tab切换
+			click(e) {
+				this.param.enterpriseConfirm = e.enterpriseConfirm;
+				this.param.isOrders = e.isOrders;
+				this.refresh();
+			},
+			detail(item) {
+				uni.navigateTo({
+					url: '/pages/market/one/merchant/order/detail?id=' + item.id
+				});
+			},
+			//刷新数据
+			refresh() {
+				this.loadMore = true;
+				this.param.pageNo = 1;
+				this.list = [];
+				this.getData();
+			},
+			// 商家确认
+			confirm(id, status, content) {
+				//enterprise_confirm:'商铺确认情况[0=待确认,1=已确认,2=拒绝]'
+				uni.showModal({
+					title: '提示',
+					content: content,
+					success: res => {
+						if (res.confirm) {
+							this.http.request({
+								url: '/level-one-server/app/TbGoodsTransit/updateEnterpriseConfirm',
+								data: {
+									id: id,
+									enterpriseConfirm: status
+								},
+								method: 'POST',
+								success: resp => {
+									uni.showToast({
+										title: '操作成功'
+									});
+									this.refresh();
+								}
+							});
+						}
+					}
+				});
+			},
+			go(url) {
+				uni.navigateTo({
+					url: url
+				});
+			},
+			// 车牌查询 
+			getByVehiclePlate() {
+				this.vehiceList = []
+				this.param.vehiclePlate = ''
+				this.http.request({
+					url: '/transport-server/app/TbVehicle/getByVehiclePlate',
+					loading: 'false',
+					data: this.param,
+					success: res => {
+						if (res.data.data) {
+							this.vehiceList.push(...res.data.data);
+						}
+					}
+				});
+			},
+			// 弹窗显示司机信息
+			showPop() {
+				this.getByVehiclePlate()
+				this.show=!this.show
+			},
+			// 车辆绑定
+			vehicleClick(id){
+				uni.showToast({ title: '绑定成功' })
+				this.show = false
+			}
+		},
+		//下拉刷新
+		onPullDownRefresh() {
+			setTimeout(() => {
+				this.refresh();
+				uni.stopPullDownRefresh();
+			}, 1000);
+		},
+		//上拉加载
+		onReachBottom() {
+			if (this.loadMore) {
+				this.param.pageNo++;
+				this.getData();
+			}
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss">
-page {
-	background-color: $pg;
-}
-</style>
+	page {
+		background-color: $pg;
+	}
+	
+	.pop{
+		padding: 30px;
+		height: 300px;
+		background-color: $pg;
+	}
+	
+	.btn{
+		height: 30px;
+		margin: 8px 0px;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
+</style>

+ 4 - 4
pages/personal/personal.vue

@@ -99,12 +99,12 @@
 					<text class="title">常见问题</text>
 					<text class="icon arrow">&#xe8f2;</text>
 				</view>
-				<view class="s_item" @click="show = true">
+				<view class="s_item" @click="go('/pages/login/userAgreement?id=1')">
 					<text class="icon ic">&#xe662;</text>
 					<text class="title">用户协议</text>
 					<text class="icon arrow">&#xe8f2;</text>
 				</view>
-				<view class="s_item" @click="show = true">
+				<view class="s_item" @click="go('/pages/login/userAgreement?id=2')">
 					<text class="icon ic">&#xe643;</text>
 					<text class="title">隐私协议</text>
 					<text class="icon arrow">&#xe8f2;</text>
@@ -141,11 +141,11 @@ export default {
 				uni.navigateTo({ url: 'user' });
 			}
 			//外籍商户
-			if (this.user.userType == 3) {
+			if (this.user.userType == 5) {
 				uni.navigateTo({ url: '/pages/market/one/merchant/order/list' });
 			}
 			//收购商
-			if (this.user.userType == 5) {
+			if (this.user.userType == 3) {
 				uni.navigateTo({ url: '/pages/market/two/purchaser/order/list' });
 			}
 		},