cmy 2 år sedan
förälder
incheckning
99d841b099
4 ändrade filer med 59 tillägg och 35 borttagningar
  1. 10 0
      api/water.js
  2. 5 5
      pages/home/user.vue
  3. 44 13
      pages/order/orderDetail.vue
  4. 0 17
      pages/user/admin/orderAdmin.vue

+ 10 - 0
api/water.js

@@ -119,6 +119,16 @@ export function deliveryKeep(data) {
 	});
 }
 
+//确认送达
+export function take_delivery(data) {
+	return request({
+		url: '/api/admin/order/take_delivery/'+data.id,
+		method: 'get',
+		data
+	});
+}
+
+
 
 
 

+ 5 - 5
pages/home/user.vue

@@ -71,7 +71,7 @@
 				</view>
 				<view class="listBox">
 					<view class="list">
-						<view  v-if="userInfo.adminid" class="flex listItem" @click="navTo('/pages/user_home/shareQrCode')">
+						<view  v-if="userInfo.adminid" class="flex listItem" @click="smsh">
 							<view class="flex titleBox">
 								<image class="listIconImg" src="../../static/icon/usersm.png" mode="widthFix"></image>
 								<text class="title">扫码核销</text>
@@ -101,7 +101,7 @@
 								<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
 							</view>
 						</view>
-						<view class="flex listItem" @click="navTo('/pages/user_home/shareQrCode')">
+						<view class="flex listItem" @click="navTo('/pages/user/shareQrCode')">
 							<view class="flex titleBox">
 								<image class="listIconImg" src="../../static/icon/userdz.png" mode="widthFix"></image>
 								<text class="title">收货地址</text>
@@ -111,7 +111,7 @@
 								<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
 							</view>
 						</view>
-						<view class="flex listItem" @click="navTo('/pages/user_home/shareQrCode')">
+						<view class="flex listItem" @click="navTo('/pages/user/shareQrCode')">
 							<view class="flex titleBox">
 								<image class="listIconImg" src="../../static/icon/usergg.png" mode="widthFix"></image>
 								<text class="title">邀请好友</text>
@@ -131,7 +131,7 @@
 								<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
 							</view>
 						</button>
-						<view class="flex listItem" @click="navTo('/pages/set/set')">
+						<!-- <view class="flex listItem" @click="navTo('/pages/set/set')">
 							<view class="flex titleBox">
 								<image class="listIconImg" src="../../static/icon/userabout.png" mode="widthFix">
 								</image>
@@ -141,7 +141,7 @@
 								<text></text>
 								<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
 							</view>
-						</view>
+						</view> -->
 						<view class="flex listItem" @click="navTo('/pages/set/set')">
 							<view class="flex titleBox">
 								<image class="listIconImg" src="../../static/icon/userset.png" mode="widthFix"></image>

+ 44 - 13
pages/order/orderDetail.vue

@@ -150,23 +150,23 @@
 				</view>
 			</view>
 		</view>
-		<view class="flex bottomBox">
+		<view class="flex bottomBox" v-if="type==1">
 			<view class="buttomBottom" @click="shopLi" >
-				<template v-if="type==1">
 				联系商家
-				</template>
-				
-				<template v-if="type==2">
-				联系客户
-				</template>
 			</view>
 			<view class="buttomBottom bgYellow" @click="shopNext">
-				<template v-if="type==1">
 				前往商家
-				</template>
-				<template v-if="type==2">
-				客户导航
-				</template>
+			</view>
+		</view>
+		<view class="flex bottomBox" v-if="type==2">
+			<view class="buttomBottom" @click="shopLi" >
+				联系客户
+			</view>
+			<view class="buttomBottom" @click="shopNext" >
+				导航
+			</view>
+			<view v-if="item._status._title=='待发货'" class="buttomBottom bgYellow flex-grow-true" @click="send">
+				确认送达
 			</view>
 		</view>
 	</view>
@@ -176,6 +176,9 @@
 	import {
 		orderDetail
 	} from '@/api/order.js';
+	import {
+		take_delivery
+	} from '@/api/water.js';
 	export default {
 		filters: {
 			orderType: function(item) {
@@ -217,6 +220,32 @@
 			}
 		},
 		methods: {
+			// 送达
+			send(){
+				const that= this;
+				uni.showModal({
+					title: '送货',
+					content: '是否确认送达到用户',
+					success: res => {
+						if(res.confirm){
+							take_delivery({
+								id:that.item.id
+							}).then((res)=>{
+								uni.showToast({
+									title:res.msg
+								})
+								that.loadOrder();
+							}).catch((res)=>{
+								
+							})
+						}
+					},
+					fail: () => {},
+					complete: () => {}
+				});
+				
+			},
+			// 导航
 			navTo(url) {
 				console.log(url);
 				uni.navigateTo({
@@ -614,11 +643,13 @@
 		.buttomBottom {
 			width: 50%;
 			text-align: center;
-			padding: 30rpx 80rpx;
+			padding: 30rpx 0;
 			line-height: 1;
 			color: $base-color;
 			font-size: $font-base;
 			background-color: #FFF;
+			border-right: 1px solid $base-color;
+			border-top: 1px solid $base-color;
 			&.bgYellow {
 				color: #FFFFFF;
 				background: $bg-gradual;

+ 0 - 17
pages/user/admin/orderAdmin.vue

@@ -83,18 +83,6 @@
 				</scroll-view>
 			</swiper-item>
 		</swiper>
-		<uni-popup ref="popup" type="bottom">
-			<view class="buttomBox">
-				<view class="item">
-					取消
-				</view>
-			</view>
-			<view class="buttomBox" @click="$refs.popup.close()">
-				<view class="item qx">
-					取消
-				</view>
-			</view>
-		</uni-popup>
 	</view>
 </template>
 
@@ -232,11 +220,6 @@
 					complete: () => {}
 				});
 			},
-			// 开始配送
-			openSend(item) {
-				this.$refs.popup.open();
-				this.actionItem = item;
-			},
 			// 获取客服列表
 			getadminkf() {
 				adminkf({}).then((res) => {