cmy 2 лет назад
Родитель
Сommit
3025725e39

+ 0 - 18
api/user.js

@@ -124,21 +124,3 @@ export function spreadPeople(data) {
 		data
 	});
 }
-
-//获取会员列表
-export function getUserList(data) {
-	return request({
-		url: '/api/store/member',
-		method: 'get',
-		data
-	})
-}
-
-//配送员订单
-export function GetAdminOrderList(data) {
-	return request({
-		url: '/api/admin/order/list',
-		method: 'get',
-		data
-	});
-}

+ 19 - 2
api/water.js

@@ -82,8 +82,15 @@ export function adminStatistics(data) {
 		data
 	});
 }
-
-// 会员管理
+// 获取送货人员
+export function adminkf(data) {
+	return request({
+		url: '/api/admin/kf',
+		method: 'get',
+		data
+	});
+}
+// 会员列表
 export function storeMember(data) {
 	return request({
 		url: '/api/store/member',
@@ -93,6 +100,16 @@ export function storeMember(data) {
 }
 
 
+//配送员订单
+export function GetAdminOrderList(data) {
+	return request({
+		url: '/api/admin/order/list',
+		method: 'get',
+		data
+	});
+}
+
+
 
 
 

+ 11 - 2
pages/order/createOrder.vue

@@ -350,7 +350,6 @@
 			payAllMoney() {
 				return +this.moneyAll.totalPrice + +this.moneyAll.vipPrice;
 			},
-			...mapState('shop', ['shopDetail'])
 		},
 		methods: {
 			// 是否使用卡券切换
@@ -637,9 +636,19 @@
 						}
 						// 保存订单号
 						obj.orderId = data.result.orderId;
+						
+						if(obj.certificate_info.checked&&obj.payPrice==0){
+							if (status == 200 && data.status == 'SUCCESS') {
+								obj.paySuccessTo();
+							} else {
+								obj.$api.msg(msg);
+							}
+							return
+						}
+						
+						
 						// 判断是否为余额支付
 						if (obj.payType == 'yue' || obj.payType == 'offline') {
-							console.log('余额支付', status == 200 && data.status == 'SUCCESS');
 							if (status == 200 && data.status == 'SUCCESS') {
 								obj.paySuccessTo();
 							} else {

+ 2 - 2
pages/order/orderDetail.vue

@@ -247,8 +247,8 @@
 					data.longitude = +this.item.system_store.longitude
 				}
 				if(this.type==2){
-					data.latitude = +this.item.latitude
-					data.longitude = +this.item.longitude
+					data.latitude = +this.item.user_address_info.latitude
+					data.longitude = +this.item.user_address_info.longitude
 				}
 				// 打开地图导航
 				uni.openLocation({

+ 38 - 35
pages/user/admin/ktadmin.vue

@@ -1,36 +1,46 @@
 <template>
-	<view class="content">
-		<view class="user-item flex">
-			<image src="" mode="" class="item-logo"></image>
-			<view class="item-info flex">
-				<view class="info-name">
-					李丹丹 13523025369
+	<view class="content padding-t-30">
+		<!-- 空白页 -->
+		<!-- #ifdef H5 -->
+		<empty src="../../../static/error/emptyOrder.png"
+			v-if="searchData.loaded === true && searchData.list.length === 0"></empty>
+		<!-- #endif -->
+		<!-- #ifndef H5 -->
+		<empty src="../../static/error/emptyOrder.png"
+			v-if="searchData.loaded === true && searchData.list.length === 0"></empty>
+		<!-- #endif -->
+		<view class="user-item flex" v-for="(item,index) in searchData.list">
+			<image :src="item.avatar" mode="scaleToFill" class="item-logo"></image>
+			<view class="item-info">
+				<view class="info-name clamp padding-b-10">
+					{{item.nickname}} {{item.phone}}
 				</view>
-				<view class="info-address">
+				<view class="info padding-b-10">
 					椒江区东海大道400号
 				</view>
-				<view class="info-t">
+				<view class="info padding-b-10">
 					空桶型号:小瓶330ML
 				</view>
 				<view class="info-info flex">
-					<view class="">
+					<view>
 						押桶:<text>0</text>
 					</view>
-					<view class="">
+					<view>
 						押金:<text>0</text>元
 					</view>
-					<view class="">
+					<view>
 						借桶:<text>0</text>
 					</view>
 				</view>
 			</view>
 		</view>
+		<uni-load-more :status="searchData.loadingType"></uni-load-more>
 	</view>
 </template>
 <script>
 	import {
-		getUserList
-	} from "@/api/user.js"
+		certificate,
+	} from '@/api/water.js';
 	export default {
 		data() {
 			return {
@@ -40,7 +50,7 @@
 					limit: 10,
 					list: [],
 					loadingType: 'more',
-					loaded:false,
+					loaded: false,
 				}
 			};
 		},
@@ -76,12 +86,12 @@
 		methods: {
 			// 搜索
 			reLoadSearch() {
-				this.searchData={
+				this.searchData = {
 					page: 1,
 					limit: 10,
 					list: [],
 					loadingType: 'more',
-					loaded:false
+					loaded: false
 				};
 				this.getlist()
 			},
@@ -100,7 +110,7 @@
 				// 修改当前对象状态为加载中
 				navItem.loadingType = 'loading';
 
-				GetAdminOrderList({
+				certificate({
 						page: navItem.page,
 						limit: navItem.limit,
 						keyword: this.keyword
@@ -134,14 +144,14 @@
 </script>
 <style lang="scss" scoped>
 	.user-item {
-		width: 750rpx;
-		height: 277rpx;
-		align-items: flex-start;
-		padding: 42rpx 35rpx;
+		padding: 30rpx;
 		background-color: #fff;
+		margin: 0 30rpx;
 		margin-bottom: 15rpx;
+		border-radius: 30rpx;
 
 		.item-logo {
+			align-self: flex-start;
 			width: 115rpx;
 			height: 115rpx;
 			border-radius: 50%;
@@ -156,33 +166,26 @@
 			flex-direction: column;
 			align-items: flex-start;
 			justify-content: space-between;
+			color: $font-color-base;
 
 			.info-name {
-				font-size: 34rpx;
+				font-size: $font-lg;
 				font-weight: bold;
-				color: #333333;
 			}
 
-			.info-address {
-				font-size: 28rpx;
+			.info {
+				font-size: $font-base;
 				font-weight: 500;
-				color: #333333;
-			}
-
-			.info-t {
-				font-size: 26rpx;
-				font-weight: 500;
-				color: #333333;
+				color: $font-color-light;
 			}
 
 			.info-info {
 				width: 100%;
-				font-size: 30rpx;
+				font-size: $font-base;
 				font-weight: bold;
-				color: #333333;
 
 				text {
-					color: #FF4C4C;
+					color: $color-red;
 				}
 			}
 

+ 66 - 5
pages/user/admin/orderAdmin.vue

@@ -57,10 +57,10 @@
 								下单时间:{{item.add_time.split(' ')[0].replace(/-/g,'/')}}
 							</view>
 							<view class="btm-right flex">
-								<view class="btm-btn" @click="toCall(item)">
+								<view class="btm-btn" @click.stop="toCall(item)">
 									联系客户
 								</view>
-								<view class="btm-btn ksps" v-if=" item.status_name=='未发货'">
+								<view class="btm-btn ksps" @click.stop="openSend(item)" v-if=" item.status_name=='未发货'">
 									开始配送
 								</view>
 								<view class="btm-btn ksps" v-if=" item.status_name=='待收货'">
@@ -74,19 +74,37 @@
 				</scroll-view>
 			</swiper-item>
 		</swiper>
+		<uni-popup ref="popup" type="bottom">
+			<view class="buttomBox">
+				<picker mode="selector" :range="kflist" @change="changeKf">
+					<view>{{}}</view>
+				</picker>
+			</view>
+			<view class="buttomBox" @click="$refs.popup.close()">
+				<view class="item qx">
+					取消
+				</view>
+			</view>
+		</uni-popup>
+		
+		
 	</view>
 </template>
 
 <script>
 	import {
-		orderList,
-	} from '@/api/order.js';
-	import {
+		adminkf,
 		GetAdminOrderList
+	} from '@/api/water.js';
+	import {
+		
 	} from '@/api/user.js'
 	export default {
 		data() {
 			return {
+				kflist:[],//客服列表
+				actionKf:{},//选中的客服
+				actionItem:{},//保存当前配送对象
 				tabCurrentIndex: 0,
 				navList: [{
 						state: 0,
@@ -138,6 +156,8 @@
 				this.loadData();
 			}
 			// #endif
+			// 获取客服
+			this.getadminkf()
 		},
 		// #ifdef APP-PLUS || H5
 		onBackPress(e) {
@@ -148,6 +168,23 @@
 		},
 		// #endif
 		methods: {
+			// 客服变更
+			changeKf(){
+				
+			},
+			// 开始配送
+			openSend(item){
+				this.$refs.popup.open();
+				this.actionItem = item;
+			},
+			// 获取客服列表
+			getadminkf(){
+				adminkf({}).then((res)=>{
+					console.log(res,'kf');
+				}).catch((res)=>{
+					console.log(res);
+				})
+			},
 			// 前往商家
 			shopNext() {
 				// 打开地图导航
@@ -468,4 +505,28 @@
 			}
 		}
 	}
+	.buttomBox {
+		border-radius: 20rpx;
+		margin: 0 $page-row-spacing;
+		margin-bottom: 30rpx;
+		color: $font-color-dark;
+		background-color: #FFFFFF;
+		overflow: hidden;
+	
+		.item {
+			line-height: 100rpx;
+			height: 100rpx;
+			text-align: center;
+			font-size: 32rpx;
+			color: $base-color;
+	
+			&.qx {
+				color: $color-red;
+			}
+		}
+	
+		.border_b {
+			border-bottom: 1px solid $page-color-light;
+		}
+	}
 </style>

+ 51 - 51
pages/user/admin/useradmin.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="content">
+	<view class="content padding-t-30">
 		<!-- 空白页 -->
 		<!-- #ifdef H5 -->
 		<empty src="../../../static/error/emptyOrder.png"
@@ -10,30 +10,36 @@
 			v-if="searchData.loaded === true && searchData.list.length === 0"></empty>
 		<!-- #endif -->
 		<view class="user-item " v-for="(item,index) in searchData.list">
-			<view class="user-info">
-				<image :src="item.avatar" mode="scaleToFill"></image>
-				<view class="">
-					{{item.nickname}}
+			<view class="user-info flex">
+				<view class="flex-start flex-grow-true">
+					<image class="image" :src="item.avatar" mode="scaleToFill"></image>
+					<view class="clamp flex-grow-true padding-r-10">
+						{{item.nickname}}
+					</view>
 				</view>
+				<image @click="phone(item.phone)" class="phone" src="../../../static/icon/adminUserPhone.png"
+					mode="scaleToFill"></image>
 			</view>
-			<view class="user-base">
-				<view class="">
+			<view class="user-base font-size-sm padding-b-10">
+				<view class="padding-b-10 padding-t-20">
 					电话:{{item.phone}}
 				</view>
-				<view class="">
-					地址:椒江区东海大道400号
+				<view class="padding-b-10">
+					地址:{{item.address.locate_address}}
 				</view>
-				<view class="">
-					进店时间:2023-12-20 14:20:12
+				<view class="padding-b-10">
+					详细:{{item.address.detail}}
 				</view>
 			</view>
-			<view class="jg"></view>
-			<view class="btn-list flex">
-				<view class="btn">
-					水票:<text>30</text>
+			<view class="btn-list flex font-size-sm clamp">
+				<view class="btn flex-shrink-false">
+					水票:{{item.certificate_num}}
 				</view>
-				<view class="btn">
-					押桶:<text>5</text>
+				<view class="btn flex-shrink-false clamp">
+					押桶:{{item.pledge_num}}
+				</view>
+				<view class="btn clamp">
+					押金:5
 				</view>
 			</view>
 		</view>
@@ -53,7 +59,7 @@
 					limit: 10,
 					list: [],
 					loadingType: 'more',
-					loaded:false
+					loaded: false
 				}
 			};
 		},
@@ -87,14 +93,20 @@
 			this.getlist();
 		},
 		methods: {
+			// 拨打电话
+			phone(phone) {
+				uni.makePhoneCall({
+					phoneNumber: phone
+				})
+			},
 			// 搜索
 			reLoadSearch() {
-				this.searchData={
+				this.searchData = {
 					page: 1,
 					limit: 10,
 					list: [],
 					loadingType: 'more',
-					loaded:false
+					loaded: false
 				};
 				this.getlist()
 			},
@@ -144,60 +156,48 @@
 </script>
 <style lang="scss" scoped>
 	.user-item {
-		width: 750rpx;
 		align-items: flex-start;
-		padding: 25rpx 45rpx;
+		padding: 30rpx;
 		background-color: #fff;
+		margin: 0 30rpx;
+		border-radius: 30rpx;
 		margin-bottom: 15rpx;
-
+		color: $font-color-light;
+		.user-base{
+			border-bottom: 1px solid $uni-border-color;
+			margin-bottom: 20rpx;
+		}
 		.user-info {
 			height: 72rpx;
 			font-size: 36rpx;
 			font-weight: bold;
-			color: #333333;
-			display: flex;
-			justify-content: flex-start;
-			align-items: center;
+			color: $font-color-base;
 
-			image {
+			.image {
 				height: 72rpx;
 				width: 72rpx;
 				margin-right: 20rpx;
 				background-color: #eee;
 				border-radius: 50%;
 			}
-		}
 
-		.jg {
-			width: 681rpx;
-			height: 2rpx;
-			background: #E6E6E6;
-			margin: 25rpx auto;
-		}
-
-		.user-base {
-			view {
-				margin: 15rpx 0;
+			.phone {
+				width: 40rpx;
+				height: 40rpx;
 			}
 		}
 
 		.btn-list {
-			justify-content: flex-start;
+			color: $font-color-white;
+			text-align: center;
+			line-height: 1;
 
 			.btn {
-				padding: 15rpx 30rpx;
-				margin-right: 32rpx;
-
-				border: 2px solid #333333;
+				width: 32%;
+				padding: 20rpx 0;
+				background: $bg-gradual;
 				border-radius: 10rpx;
-				font-size: 31rpx;
 				font-weight: 500;
-				color: #333333;
-
-				text {
-					color: #FF4C4C;
-
-				}
 			}
 		}
 	}

BIN
static/icon/adminUserPhone.png


+ 1 - 2
uni.scss

@@ -44,5 +44,4 @@ $box-shadow: 0rpx 0rpx 10rpx 10rpx #f3f3f3;
 // 圆角
 $border-radius-sm: 15rpx;
 // 渐变背景颜色
-$bg-gradual: linear-gradient(90deg, #3C82E6, #5395F5);
-$base-url:'https://api.myjie.cn';
+$bg-gradual: linear-gradient(90deg, #3C82E6, #5395F5);