zhaoyun 2 weeks ago
parent
commit
08da0c08dc

+ 7 - 0
mer_uniapp/api/fastMail.js

@@ -89,4 +89,11 @@ export function getExpressTip() {
  */
 export function getExpressInfo() {
 	return request.get(`express/info`);
+}
+/**
+ * 收件
+ *
+ */
+export function receiving(orderNo) {
+	return request.post(`express/order/receiving/${orderNo}`)
 }

+ 33 - 0
mer_uniapp/filters/commFilter.js

@@ -115,6 +115,39 @@ export function orderRefundTipsStatusFilter(status) {
 }
 
 /**
+ * 订单状态(0:待支付,1:待接单,2-待取件 3:已取件,4:待收件,5:已收件,6:已完成,9:已取消)
+ */
+export function expressStatusFilter(status) {
+	const statusMap = {
+		0: '待支付',
+		1: '待接单',
+		2: '待取件',
+		3: '已取件',
+		4: '待配送',
+		5: '已收件',
+		6: '已完成',
+		9: '已取消',
+	}
+	return statusMap[status]
+}
+
+/**
+ * 订单状态(0:待支付,1:待接单,2-待取件 3:已取件,4:待收件,5:已收件,6:已完成,9:已取消)
+ */
+export function orderExpressTipsStatusFilter(status) {
+	const statusMap = {
+		0: '待支付,若有异议,请联系平台处理。',
+		1: '等待快递员接单,请耐心等待',
+		2: '快递员已接单,正赶往驿站,请耐心等待',
+		3: '快递员已取件,正在为您配送!',
+		4: '快递员正在为您配送,若您已收到快递请您尽快确认!',
+		5: '配送完成,若对此订单存在疑问,请联系平台协商处理。',
+		6: '配送完成,若对此订单存在疑问,请联系平台协商处理。',
+	}
+	return statusMap[status]
+}
+
+/**
  * 订单状态
  */
 export function orderStatusFilter(status) {

+ 88 - 68
mer_uniapp/pages.json

@@ -36,35 +36,6 @@
 			}
 		},
 		{
-			"path": "pages/goods_cate/index",
-			"style": {
-				"navigationBarTitleText": "商品分类",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/discover_index/index",
-			"style": {
-				"navigationBarTitleText": "逛逛",
-				"navigationStyle": "custom",
-				"navigationBarTextStyle": "black"
-			}
-		},
-		{
-			"path": "pages/order_addcart/order_addcart",
-			"style": {
-				"navigationStyle": "custom",
-				"navigationBarTitleText": "购物车"
-				// "app-plus": {
-				// 	// #ifdef APP-PLUS
-				// 	"titleNView": {
-				// 		"type": "default"
-				// 	}
-				// 	// #endif
-				// }
-			}
-		},
-		{
 			"path": "pages/order/index",
 			"style": {
 				"navigationStyle": "custom",
@@ -88,27 +59,6 @@
 					// #endif
 				}
 			}
-		},
-		{
-			"path": "pages/rider_index/index",
-			"style": {
-				"navigationStyle": "custom",
-				"navigationBarTitleText": "骑手"
-			}
-		},
-		{
-			"path": "pages/takeout/index",
-			"style": {
-				"navigationStyle": "custom",
-				"navigationBarTitleText": "美食"
-			}
-		},
-		{
-			"path": "pages/merchant_search/index",
-			"style": {
-				"navigationStyle": "custom",
-				"navigationBarTitleText": "搜索外卖商家"
-			}
 		}
 	],
 	"subPackages": [{
@@ -830,6 +780,19 @@
 					}
 				},
 				{
+					"path": "second_refunds_details/index",
+					"style": {
+						"navigationBarTitleText": "售后详情",
+						"app-plus": {
+							// #ifdef APP-PLUS
+							"titleNView": {
+								"type": "default"
+							}
+							// #endif
+						}
+					}
+				},
+				{
 					"path": "order_pay_status/index",
 					"style": {
 						"navigationBarTitleText": "支付结果",
@@ -907,22 +870,10 @@
 						}
 					}
 				},
+				
 				{
 					"path": "returns_and_refunds/index",
 					"style": {
-						"navigationBarTitleText": "售后详情",
-						"app-plus": {
-							// #ifdef APP-PLUS
-							"titleNView": {
-								"type": "default"
-							}
-							// #endif
-						}
-					}
-				},
-				{
-					"path": "second_refunds_details/index",
-					"style": {
 						"navigationBarTitleText": "退货退款",
 						"app-plus": {
 							// #ifdef APP-PLUS
@@ -1633,9 +1584,7 @@
 					}
 				}
 			]
-		}
-		//#ifdef H5
-		,
+		},
 		{
 			"root": "pages/auth",
 			"name": "pages/auth/index",
@@ -1645,9 +1594,80 @@
 					"navigationBarTitleText": "CRMEB"
 				}
 			}]
+		},{
+			"root": "pages/rider_index",
+			"name": "rider_index",
+			"pages": [{
+				"path": "index",
+				"style": {
+					"navigationStyle": "custom",
+					"navigationBarTitleText": "骑手"
+				}
+			}]
+		},
+		{
+			"root": "pages/takeout",
+			"name": "takeout",
+			"pages": [{
+				"path": "index",
+				"style": {
+					"navigationStyle": "custom",
+					"navigationBarTitleText": "美食"
+				}
+			}]
+		},
+		{
+			"root": "pages/merchant_search",
+			"name": "merchant_search",
+			"pages": [{
+				"path": "index",
+				"style": {
+					"navigationStyle": "custom",
+					"navigationBarTitleText": "搜索外卖商家"
+				}
+			}]
+		},
+		{
+			"root": "pages/goods_cate",
+			"name": "goods_cate",
+			"pages": [{
+				"path": "index",
+				"style": {
+					"navigationBarTitleText": "商品分类",
+					"navigationStyle": "custom"
+				}
+			}]
+		},
+		{
+			"root": "pages/discover_index",
+			"name": "discover_index",
+			"pages": [{
+				"path": "index",
+				"style": {
+					"navigationBarTitleText": "逛逛",
+					"navigationStyle": "custom",
+					"navigationBarTextStyle": "black"
+				}
+			}]
+		},
+		{
+			"root": "pages/order_addcart",
+			"name": "order_addcart",
+			"pages": [{
+				"path": "order_addcart",
+				"style": {
+					"navigationStyle": "custom",
+					"navigationBarTitleText": "购物车"
+					// "app-plus": {
+					// 	// #ifdef APP-PLUS
+					// 	"titleNView": {
+					// 		"type": "default"
+					// 	}
+					// 	// #endif
+					// }
+				}
+			}]
 		}
-		//#endif
-
 	],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",

+ 1 - 1
mer_uniapp/pages/goods/returns_and_refunds/index.vue

@@ -1,5 +1,5 @@
 <template>
-	<view :data-theme="theme">
+	<view>
 		<form @submit="submitForm" report-submit='true'>
 			<view class='apply-return'>
 				<view class='goodsStyle borRadius14'>

+ 173 - 36
mer_uniapp/pages/substitute_fast_mail/components/fast_mail_express/index.vue

@@ -1,40 +1,50 @@
 <template>
-	<view>
-		<view class="cart_nav acea-row">
-			<!-- #ifdef MP-->
-			<view class="mp-header" :style="{top: navH + 'rpx'}">
-				<view class="flex-col flex-center" style="background-color: #fff;">
-					<view class="flex-y-center" style="justify-content: space-between;padding: 20rpx 19rpx 38rpx 19rpx;width: 100%;">
-						<view style="opacity: 0;">1</view>
-						<view style="font-weight: 600;font-size: 27rpx;color: #141414;">快递单号</view>
-						<image style="width: 39rpx;height: 39rpx;" src="/static/img/chacha.png" @tap="onCancel"></image>
-					</view>
-					<!-- <view class="search acea-row row-middle">
-						<text class="iconfont icon-ic_search" style="margin-right: 10rpx;"></text>
-						<input class="inputs" placeholder='搜索快递公司' placeholder-class='placeholder' placeholder-style="font-size:28rpx"
-						 @confirm="handleSearch"></input>
+	<view :data-theme="theme">
+	   <view class="cart_nav acea-row">
+		   <view class="mp-header" :style="{top: navH + 'rpx'}">
+			<view class="flex-col flex-center" style="background-color: #fff;">
+				<view class="flex-y-center" style="justify-content: space-between;padding: 20rpx 19rpx 38rpx 19rpx;width: 100%;">
+					<view style="opacity: 0;">1</view>
+					<image style="width: 39rpx;height: 39rpx;" src="/static/img/chacha.png" @tap="onCancel"></image>
+				</view>
+		  <form @submit="submitForm" report-submit='true'>
+			<view class='apply-return'>
+				<view class='list borRadius14'>
+					<view v-if="expressAll.length" class='item acea-row row-between-wrapper'>
+						<view>物流公司</view>
+						<view class="picker">
+							<picker @change="bindExpressChange" :value="expressIndex" :range="expressAll"
+								range-key="name">
+								<view class="picker-box">
+									{{expressAll[expressIndex].name}}
+									<text class="iconfont icon-jiantou"></text>
+								</view>
+							</picker>
+						</view>
 					</view>
-					<scroll-view scroll-y="true" style="height: 300rpx;margin: 20rpx 0;">
-						<view class='loadingicon flex-center' v-if='loading'>
-							<text class='loading iconfont icon-jiazai' style="width: auto;"></text>
+					<view  class='item acea-row row-between-wrapper'>
+						<view>物流单号</view>
+						<view class="text-right">
+							<input type='text' placeholder='请输入物流单号' placeholder-style="color:#ccc;"
+								name='trackingNumber' :value="trackingNumber" placeholder-class='placeholder'
+								maxlength="30"></input>
 						</view>
-						<view v-else class="exp-item flex-center" v-for="(item, index) in filteredList" :key="index" 
-							@tap="companyName = item.name,expressObj.companyObj = item">
-							{{ item.name }}
+					</view>
+					<view class='item acea-row row-between-wrapper no-border'>
+						<view>联系电话</view>
+						<view class="text-right">
+							<input type='text' placeholder='请输入联系电话' placeholder-style="color:#ccc;" name='telephone'
+								:value="telephone" placeholder-class='placeholder' maxlength="11"></input>
 						</view>
-					</scroll-view> -->
-					<!-- <view class="flex-y-center" style="padding: 0 28rpx;"> -->
-					<view class="flex-y-center" style="margin-bottom: 20rpx;">
-						快递公司:<input class="search" type="text" v-model="expressObj.companyName" placeholder="请输入快递公司" />
 					</view>
-					<view class="flex-y-center">
-						快递单号:<input class="search" type="text" v-model="expressObj.odd" placeholder="请输入快递单号" />
+					<view class="">
+						<button class='returnBnt bg_color sub' form-type="submit">确定</button>
 					</view>
-					<!-- </view> -->
-					<button class="sub flex-center" @tap="onSure">确定</button>
 				</view>
-			</view>
-			<!-- #endif -->
+			  </view>
+		</form>
+		</view>
+		 </view>
 		</view>
 	</view>
 </template>
@@ -55,17 +65,22 @@
 	import {
 		expressAllApi
 	} from '@/api/order.js';
+	import {
+		Debounce
+	} from '@/utils/validate.js';
 	export default {
 		data() {
 			return {
 				navH: '',
+				expressIndex: 0,
 				tipIndex: 1,
 				tipValue: 1,
 				loading: false,
 				list: [], // 原始数据列表
 				filteredList: [], // 过滤后的数据列表
 				companyName: '',
-				expressObj: {}
+				expressObj: {},
+				expressAll: [],
 			}
 		},
 		props: {
@@ -81,6 +96,11 @@
 			// #ifdef H5
 			this.navH = 80;
 			// #endif
+			if (!this.$Cache.get('expressListAll')) {
+				this.getExpressAll();
+			} else {
+				this.expressAll = JSON.parse(this.$Cache.get('expressListAll'))
+			}
 			// this.getExpressAll()
 		},
 		methods: {
@@ -96,20 +116,50 @@
 			onCancel() {
 				this.$emit('onCancel', false)
 			},
+			
+			//提交
+				submitForm: Debounce(function(e) {
+					let that = this,
+						data = {},
+						value = e.detail.value;
+					if (!value.trackingNumber) return that.$util.Tips({
+						title: '请填写物流单号'
+					});
+					// if (!value.telephone) return that.$util.Tips({
+					// 	title: '请填写联系电话'
+					// });
+					// if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(value.telephone)) return that.$util.Tips({
+					// 	title: '请输入正确的手机号码'
+					// });
+					uni.showLoading({
+						title: '处理中',
+						mask: true
+					})
+					this.expressObj={
+						companyName: that.expressAll[that.expressIndex].name,
+						odd: value.trackingNumber,
+						telephone: value.telephone,
+					}
+					this.$emit('expressObj', this.expressObj)
+					uni.hideLoading();
+				}),
+			
+			
 			//物流公司
 			getExpressAll() {
-				this.loading = true
 				expressAllApi().then(res => {
-					this.list = res.data;
-					this.filteredList = res.data
-					this.loading = false
+					this.$set(this, 'expressAll', res.data);
+					this.$Cache.set('expressListAll', res.data)
 				}).catch(err => {
 					return this.$util.Tips({
 						title: err
 					});
-					this.loading = false
 				})
 			},
+			//选择物流公司
+			bindExpressChange(e) {
+				this.expressIndex = e.target.value;
+			},
 			handleSearch(e) {
 				this.loading = true
 				const query = e.target.value.toLowerCase();
@@ -178,4 +228,91 @@
 		color: #FFFFFF;
 		margin: 58rpx 0 96rpx 0;
 	}
+	.addressDetail {
+		line-height: 36rpx;
+	}
+	
+	.text-right {
+		width: 480rpx;
+	}
+	
+	.button {
+		width: 76rpx;
+		height: 34rpx;
+		border-radius: 34rpx;
+		font-size: 20rpx;
+		line-height: 34rpx;
+		color: #666666;
+		border-radius: 17rpx;
+		border: 1px solid #999999;
+		text-align: center;
+	
+		&.copy {
+			color: #666666;
+		}
+	}
+	
+	.goodsStyle {
+		.text {
+			.name {
+				font-size: 28rpx;
+			}
+		}
+	
+	}
+	
+	.icon-jiantou {
+		margin-left: 10rpx;
+		font-size: 28rpx;
+		color: #BBBBBB;
+	}
+	
+	.apply-return {
+		padding: 20rpx 24rpx 30rpx 24rpx;
+	}
+	
+	.apply-return .list {
+		background-color: #fff;
+		margin-top: 20rpx;
+		padding: 0 24rpx;
+	}
+	
+	.apply-return .list .item {
+		min-height: 90rpx;
+		border-bottom: 1rpx solid #eee;
+		font-size: 30rpx;
+		color: #282828;
+	}
+	
+	.apply-return .list .item .num {
+		color: #282828;
+		width: 427rpx;
+		text-align: right;
+	}
+	
+	.apply-return .list .item .num .picker .iconfont {
+		color: #666;
+		font-size: 30rpx;
+		margin-top: 2rpx;
+	}
+	.returnBntBox{
+		width: 100%;
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		margin: 30rpx auto;
+	}
+	.apply-return .returnBnt {
+		font-size: 32rpx;
+		color: #fff;
+		width: 100%;
+		height: 86rpx;
+		border-radius: 50rpx;
+		text-align: center;
+		line-height: 86rpx;
+	}
+	
+	.bg_color {
+		@include main_bg_color(theme);
+	}
 </style>

+ 12 - 4
mer_uniapp/pages/substitute_fast_mail/home/index.vue

@@ -58,8 +58,8 @@
 						<view class="fast-yz">{{item.postName}}</view>
 						<view class="fast-xx">{{item.addressDetail}}</view>
 					</view>
-					<view class="flex-y-center">
-						<image src="/static/img/phone.png" class="image2" /><text>联系驿站</text>
+					<view class="flex-y-center"  @tap="makePhone(item.phone)">
+						<image src="/static/img/phone.png" class="image2"/><text>联系驿站</text>
 					</view>
 				</view>
 				<view class="fast-item" v-for="(value, key) in item.orderInfoList" :key="key">
@@ -99,13 +99,13 @@
 			<!-- <radio :checked="radioArr" color="#FF6702" @tap="onRadioChang()" />全选 -->
 			<view @tap="onRadioDel()"><text class="iconfont icon-shanchu mr-14"></text>删除</view>
 		</view>
-		<view class="flex-between-center fast-tip" @tap="isTip = true">
+		<!--view class="flex-between-center fast-tip" @tap="isTip = true">
 			<view class="remark-name">小费</view>
 			<view class="flex-y-center">
 				<text style="font-weight: 400;font-size: 27rpx;color: #646464;">{{giveTips}}</text>
 				<view class='iconfont icon-jiantou' style="font-size: 30rpx;margin: 0 19rpx;"></view>
 			</view>
-		</view>
+		</view-->
 		<!-- 购物车栏 begin -->
 		<view class="cart-box">
 			<view class="mark-box">
@@ -306,6 +306,14 @@
 				})
 				// this.orderPrice = price
 			},
+			/**
+			 * 拨打电话
+			 */
+			makePhone: function(e) {
+				uni.makePhoneCall({
+					phoneNumber: e
+				})
+			},
 			onRadioDel() {
 				if (this.fastMailData.length === 0) return
 				const arr = []

+ 73 - 13
mer_uniapp/pages/substitute_fast_mail/my_fast_mail/index.vue

@@ -45,9 +45,10 @@
 							<view>
 								<view class="fast-yz">{{post.postName}}</view>
 								<view class="fast-xx">{{item.userAddress}}</view>
+								<view class="fast-xx" v-if="item.status==6">收件时间:{{item.receivingTime}}</view>
 							</view>
-							<view class="flex-y-center">
-								<image src="/static/img/phone.png" class="image2" /><text>联系驿站</text>
+							<view class="flex-y-center" @tap="makePhone(post.phone)"> 
+								<image src="/static/img/phone.png" class="image2"/><text class='phone'>联系驿站</text>
 							</view>
 						</view>
 						<view class="fast-item" v-for="(value, key) in post.orderInfoList" :key="key">
@@ -74,28 +75,37 @@
 							</view>
 						</view>
 					</view>
-					<view class="fast-item" v-if="active !== 0">
+					<view class="fast-item" v-if="item.courier!=null">
 						<view class="flex-between-center">
 							<view>
 								快递员姓名:{{item.courier || ''}}
 							</view>
-							<view class="flex-y-center lx-ly">
+							<view class="flex-y-center lx-ly" @tap="makePhone(item.courierPhone)">
 								<image src="/static/img/ic-iphone1.png" class="image2" />联系
 								<!-- <view style="display: inline-block; width: 2rpx; height: 42rpx;border: 2rpx solid #D5D6DC;margin: 0 18rpx;"></view>
 								<image src="/static/img/ic-message1.png" class="image2" />留言 -->
 							</view>
 						</view>
 					</view>
+					<view v-if="item.status>0 && item.status!=9">
+						<view class="refundTypeStatus line1">
+							{{ item.status| expressStatusFilter}}
+							<span class="tips ml20">{{item.status| orderExpressTipsStatusFilter}}</span>
+						</view>
+					</view>
 					<view class="fast-btn flex-y-center">
-						<view class='bnt cancelBnt' v-if="active === 0" @click='cancelOrder(index,item.orderNo)'>
+						<view class='bnt cancelBnt' v-if="item.status === 0" @click='cancelOrder(index,item.orderNo)'>
 							取消订单
 						</view>
-						<view class='bnt bg_color' v-if="active === 0" @click='goPay(item)'>
+						<view class='bnt bg_color' v-if="item.status === 0" @click='goPay(item)'>
 							立即付款
 						</view>
-						<view class='bnt cancelBnt' v-if="active==5 || active==9" @click='delOrder(item.orderNo,index)'>
+						<view class='bnt cancelBnt' v-if="item.status==6 || item.status==9" @click='delOrder(item.orderNo,index)'>
 							删除订单
 						</view>
+						<view class='bnt bg_color' v-if="item.status==3||item.status==4 || item.status==5 " @click='expressReceiving(item.orderNo)'>
+							确认收件
+						</view>
 					</view>
 				</view>
 				<view class='loadingicon flex-center' :hidden='!loading'>
@@ -117,6 +127,8 @@
 	// +----------------------------------------------------------------------
 	// | Author: CRMEB Team <admin@crmeb.com>
 	// +----------------------------------------------------------------------
+	
+	///订单状态(0:待支付,1:待接单,2-待取件 3:已取件,4:待收件,5:已收件,6:已完成,9:已取消)
 	import navBar from '@/components/navBar';
 	import animationType from '@/utils/animationType.js'
 	import tuiSkeleton from '@/components/base/tui-skeleton.vue';
@@ -126,7 +138,8 @@
 	import {
 		getExpressOrderList,
 		preExpressDeleteApi,
-		preExpressCancelApi
+		preExpressCancelApi,
+		receiving
 	} from '@/api/fastMail.js';
 	import orderPay from "@/mixins/OrderPay.js";
 	import {
@@ -151,18 +164,24 @@
 				}, {
 					id: 0,
 					name: '代付款'
-				}, {
+				}, 
+				{
 					id: 1,
+					name: '代接单'
+				}, 
+				{
+					id: 4,
 					name: '代收件'
-				}, {
-					id: 5,
+				}, 
+				{
+					id: 6,
 					name: '已完成'
 				}, {
 					id: 9,
 					name: '已取消'
 				}],
-				active: 0,
-				page: 1,
+				active: -1,
+				page: 1, 
 				limit: 10,
 				scrollLeft: 0,
 				fastMailData: [],
@@ -209,6 +228,7 @@
 					page: this.page,
 					status: this.active
 				}
+				this.fastMailData=[];
 				getExpressOrderList(params).then(res => {
 					let list = res.data.list || [];
 					this.fastMailData = this.$util.SplitArray(list, this.fastMailData);
@@ -227,6 +247,14 @@
 					console.log(err)
 				});
 			},
+			/**
+			 * 拨打电话
+			 */
+			makePhone: function(e) {
+				uni.makePhoneCall({
+					phoneNumber: e
+				})
+			},
 			onScrollBottom() {
 				if (!this.loadTitle) {
 					this.getPreExpressApi()
@@ -273,6 +301,21 @@
 					},
 				})
 			},
+			expressReceiving: function(orderNo){
+				receiving(orderNo).then(res=>{
+					if(res.code==200){
+						this.$util.Tips({
+							title: '操作成功'
+						})
+						that.getAllOrder();
+						this.change = false
+					}else{
+						this.$util.Tips({
+							title:res.message
+						})
+					}
+				})
+			},
 			/**
 			 * 删除订单
 			 */
@@ -523,4 +566,21 @@
 			margin-left: 17rpx;
 		}
 	}
+	.refundTypeStatus {
+		width: 100%;
+		height: 71rpx;
+		line-height: 71rpx;
+		background: #F6F6F6;
+		border-radius: 10rpx;
+		font-size: 26rpx;
+		font-weight: 400;
+		color: #282828;
+		padding: 0 18rpx;
+	
+		.tips {
+			font-size: 26rpx;
+			font-weight: 400;
+			color: #999999;
+		}
+	}
 </style>

File diff suppressed because it is too large
+ 0 - 382
mer_uniapp/replay_pid2468.log


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