ZZ hai 1 mes
pai
achega
412284abf8

+ 8 - 1
mer_uniapp/pages.json

@@ -577,12 +577,19 @@
 					"enablePullDownRefresh": false
 				}
 			},{
-				"path": "components/take_fast_mail/index",
+				"path": "take_fast_mail/index",
 				"style": {
 					"navigationBarTitleText": "添加快递",
 					"navigationStyle": "custom",
 					"enablePullDownRefresh": false
 				}
+			},{
+				"path": "my_fast_mail/index",
+				"style": {
+					"navigationBarTitleText": "我的快递",
+					"navigationStyle": "custom",
+					"enablePullDownRefresh": false
+				}
 			}]
 		},
 		{

+ 6 - 1
mer_uniapp/pages/address/user_address/index.vue

@@ -13,7 +13,12 @@
 						<input type='text' placeholder="请输入姓名" placeholder-style="color:#ccc;" name='realName' :value="userAddress.realName"
 						 placeholder-class='placeholder' maxlength="20"></input>
 					</view>
-					<view class='item acea-row' v-if="!addType">
+					<view class='item acea-row' v-if="addType">
+						<view class='name'>驿站电话</view>
+						<input type='number' placeholder='请输入驿站电话' placeholder-style="color:#ccc;" name="phone" :value='userAddress.phone'
+						 placeholder-class='placeholder' maxlength="11"></input>
+					</view>
+					<view class='item acea-row' v-else="!addType">
 						<view class='name'>手机号码</view>
 						<input type='number' placeholder='请输入手机号码' placeholder-style="color:#ccc;" name="phone" :value='userAddress.phone'
 						 placeholder-class='placeholder' maxlength="11"></input>

+ 181 - 0
mer_uniapp/pages/substitute_fast_mail/components/fast_mail_express/index.vue

@@ -0,0 +1,181 @@
+<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>
+					<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>
+						<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>
+					</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>
+					<!-- </view> -->
+					<button class="sub flex-center" @tap="onSure">确定</button>
+				</view>
+			</view>
+			<!-- #endif -->
+		</view>
+	</view>
+</template>
+
+<script>
+	// +----------------------------------------------------------------------
+	// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+	// +----------------------------------------------------------------------
+	// | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+	// +----------------------------------------------------------------------
+	// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+	// +----------------------------------------------------------------------
+	// | Author: CRMEB Team <admin@crmeb.com>
+	// +----------------------------------------------------------------------
+	import {
+		mapGetters
+	} from "vuex";
+	import {
+		expressAllApi
+	} from '@/api/order.js';
+	export default {
+		data() {
+			return {
+				navH: '',
+				tipIndex: 1,
+				tipValue: 1,
+				loading: false,
+				list: [], // 原始数据列表
+				filteredList: [], // 过滤后的数据列表
+				companyName: '',
+				expressObj: {}
+			}
+		},
+		props: {
+			value: Number,
+			default: null
+		},
+		computed: mapGetters(['globalData']),
+		created() {
+			// #ifdef MP || APP-PLUS
+			// 获取导航高度;
+			this.navH = this.globalData.navHeight;
+			// #endif
+			// #ifdef H5
+			this.navH = 80;
+			// #endif
+			// this.getExpressAll()
+		},
+		methods: {
+			onSure() {
+				if (!this.expressObj.companyName) return this.$util.Tips({
+					title: '请选择快递公司'
+				});
+				if (!this.expressObj.odd) return this.$util.Tips({
+					title: '请输入快递单号'
+				});
+				this.$emit('expressObj', this.expressObj)
+			},
+			onCancel() {
+				this.$emit('onCancel', false)
+			},
+			//物流公司
+			getExpressAll() {
+				this.loading = true
+				expressAllApi().then(res => {
+					this.list = res.data;
+					this.filteredList = res.data
+					this.loading = false
+				}).catch(err => {
+					return this.$util.Tips({
+						title: err
+					});
+					this.loading = false
+				})
+			},
+			handleSearch(e) {
+				this.loading = true
+				const query = e.target.value.toLowerCase();
+				this.filteredList = this.list.filter(item => item.name.toLowerCase().includes(query));
+				this.loading = false
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	/* #ifdef MP || APP-PLUS */
+	.mp-header {
+		border-bottom-left-radius: 23rpx;
+		position: fixed;
+		z-index: 99999;
+		background: rgba(33, 33, 33, 0.8);
+		width: 100%;
+		height: 100%;
+		/* #ifdef H5 */
+		padding-bottom: 20rpx;
+		/* #endif */
+
+		.tip-box {
+			width: 27%;
+			height: 58rpx;
+			background: rgba(255, 103, 2, 0.1);
+			border-radius: 8rpx;
+			border: 2rpx solid #FF6702;
+			font-size: 23rpx;
+			color: $bg-color-primary;
+			// padding: 12rpx 60rpx;
+		}
+
+		.active-tip {
+			color: #FFFFFF;
+			background: linear-gradient(180deg, #FFAC3D 0%, #FF1E1D 100%) !important;
+			border: none !important;
+		}
+	}
+
+	.search {
+		height: 60rpx;
+		padding: 0 32rpx;
+		border-radius: 36rpx;
+		background: #F5F5F5;
+	}
+
+	.exp-item {
+		height: 50rpx;
+	}
+
+	/* #endif */
+	.cart_nav {
+		z-index: 99999;
+		width: 100%;
+		height: 100%;
+	}
+
+	.sub {
+		background-color: $bg-color-primary;
+		width: 308rpx;
+		height: 77rpx;
+		font-weight: 500;
+		font-size: 31rpx;
+		color: #FFFFFF;
+		margin: 58rpx 0 96rpx 0;
+	}
+</style>

+ 1 - 1
mer_uniapp/pages/substitute_fast_mail/components/fast_mail_specs/index.vue

@@ -79,7 +79,7 @@
 					if (this.obj && this.obj?.id) {
 						this.specsIndex = this.obj.id
 					} else {
-						this.specsIndex - res.data[0].id
+						this.specsIndex = res.data[0].id
 					}
 				})
 			}

+ 162 - 78
mer_uniapp/pages/substitute_fast_mail/home/index.vue

@@ -17,48 +17,77 @@
 					</block>
 				</scroll-view>
 			</view> -->
-		<view class="fast-top">送至:XXXXXXXXXXXXXXXXXXX <text>XXX</text> 收 19992837748<text class="iconfont icon-zhankai"></text></view>
-		<navigator url="/pages/substitute_fast_mail/take_fast_mail/index">
-			<view class="flex-center fast-top">
-				<view class="fast-jia flex-center">
-					+
+		<navigator url="/pages/address/user_address_list/index">
+			<view class="fast-top">
+				<view>
+					送至:{{addressItem.province}}{{addressItem.city}}{{addressItem.district}}{{addressItem.street}}{{addressItem.detail}}
+				</view>
+				<view style="margin-top: 10rpx;">
+					<text>{{addressItem.realName}}</text> 收 {{addressItem.phone}}<text class="iconfont icon-jiantou"></text>
 				</view>
-				<view>添加代取快递信息</view>
 			</view>
 		</navigator>
+		<!-- <navigator url="/pages/substitute_fast_mail/take_fast_mail/index"> -->
+		<view class="flex-center fast-top" @tap="onAddFastMail">
+			<view class="fast-jia">
+				+
+			</view>
+			<view>添加代取快递信息</view>
+		</view>
+		<!-- </navigator> -->
 		<scroll-view scroll-y scroll-with-animation style="flex: 1;overflow: hidden;">
-			<view class="fast-box">
+			<view class="fast-box" v-for="(item, index) in fastMailData.postOrderList || []" :key="index">
 				<view class="flex-between-center">
 					<view>
-						<view class="fast-yz">XXXXXXXXXXXXXX驿站</view>
-						<view class="fast-xx">XXXXXXXXXXXXXXXXXXXXXXXX宿舍</view>
+						<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>
 				</view>
-				<view class="flex-around-center fast-item">
-					<radio class="radio" value="" color="#FF6702" />
-					<image style="width: 135rpx; height: 135rpx;border-radius: 30rpx;" src="/static/img/ic-qu-chengse.png"></image>
-					<view>
-						<view class="fast-yz">取件码 <text>9-9-9999</text></view>
-						<view class="fast-xx">圆通快递 YT1208768435738849</view>
+				<view class="fast-item" v-for="(value, index) in item.orderInfoList">
+					<view class="flex-between-center">
+						<radio class="radios" :checked="value.radio" color="#FF6702" @tap="value.radio = !value.radio" />
+						<image style="width: 135rpx; height: 135rpx;border-radius: 30rpx;" src="/static/img/ic-qu-chengse.png"></image>
+						<view>
+							<view class="fast-yz">取件码 <text>{{value.pickUpCode}}</text></view>
+							<view class="fast-xx">{{value.expressCompany}} {{value.expressNo}}</view>
+							<view class="fast-yz">规格:{{value.spec}}</view>
+						</view>
+						<view>
+							<!-- <view class="fast-yz">134m</view> -->
+							<view class="bg-color-cash">¥<text class="fast-cash">{{value.price}}</text></view>
+						</view>
 					</view>
-					<view>
-						<view class="fast-yz">134m</view>
-						<view class="bg-color-cash">¥<text class="fast-cash">2.50</text></view>
+					<view class="fast-remark">
+						<view v-if="value.remark">备注:{{value.remark}}</view>
+						<view class="flex-y-center" v-if="value.image" @tap="lookImg(value.image)">
+							<text>附图:</text>
+							<image style="width: 38rpx; height: 38rpx;" src="/static/img/ic-figure.png"></image>
+						</view>
 					</view>
 				</view>
 			</view>
 		</scroll-view>
 		<!-- <view class='list' style="flex: 1;">
 				<template v-if="active == 1">
-					<take-fast-mail ref="takeFastMailRef" :addressObj="addressItem" :addressExpressObj="addressExpressItem"></take-fast-mail>
 				</template>
 				<template v-if="active == 2">
 					<send-fast-mail></send-fast-mail>
 				</template>
 			</view> -->
+		<view class="fast-tip flex-y-center">
+			<radio :checked="radioArr" color="#FF6702" @tap="onRadioChang()" />全选
+			<view style="margin-left: 30rpx;">删除</view>
+		</view>
+		<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>
 		<!-- 购物车栏 begin -->
 		<view class="cart-box">
 			<view class="mark-box">
@@ -71,6 +100,8 @@
 		</view>
 		<!-- </view> -->
 		<fast-mail-order v-if="isOrder" @onCancel="onCanCel"></fast-mail-order>
+		<take-fast-mail v-if="isTake" :orderNo="preOrderNo" :addressObj="addressItem" @onTakeFastOk="onTakeChang" @onCancel="onCanCel"></take-fast-mail>
+		<fast-mail-tip v-if="isTip" :value="giveTips" @tipValue="onTipValue" @onCancel="onCanCel"></fast-mail-tip>
 	</view>
 </template>
 
@@ -88,24 +119,39 @@
 	import animationType from '@/utils/animationType.js'
 	import tuiSkeleton from '@/components/base/tui-skeleton.vue';
 	import sendFastMail from '../components/send_fast_mail/index.vue'
+	import takeFastMail from '../take_fast_mail/index.vue'
 	import fastMailOrder from '../components/fast_mail_order/index.vue'
+	import fastMailTip from '../components/fast_mail_tip/index.vue'
 	import {
-		preExpressApi
+		preExpressApi,
+		loadPreExpressApi
 	} from '@/api/fastMail.js';
+	import {
+		getAddressDefault,
+		getAddressExpressDefault
+	} from '@/api/user.js';
 	let app = getApp();
 	export default {
 		components: {
 			tuiSkeleton,
 			navBar,
 			sendFastMail,
-			fastMailOrder
+			fastMailOrder,
+			takeFastMail,
+			fastMailTip
 		},
 		data() {
 			return {
 				isOrder: false, // 提交快递订单弹窗
+				isTake: false, // 新增快递弹窗
+				isTip: false, // 小费弹窗
+				giveTips: '',
 				winHeight: 0,
 				isNodes: 0, //控制什么时候开始抓取元素节点,只要数值改变就重新抓取
 				autoplay: true,
+				radioArr: false,
+				radioDel: false,
+				preOrderNo: '',
 				navList: [{
 					id: 1,
 					name: '取快递',
@@ -115,12 +161,12 @@
 					name: '寄快递',
 					preOrderType: 'send'
 				}],
+				fastMailData: {},
 				navListIndex: 0,
 				active: 0,
 				scrollLeft: 0,
 				addressItem: {},
-				orderPrice: 0,
-				addressExpressItem: {}
+				orderPrice: 0
 			};
 		},
 		onLoad() {
@@ -130,66 +176,79 @@
 					that.winHeight = res.windowHeight
 				},
 			});
+			getAddressDefault().then(res => {
+				console.log('地址', res)
+				this.addressItem = res.data || {}
+			})
+			// this.getPreExpressApi()
 		},
 		/**
 		 * 生命周期函数--监听页面显示
 		 */
 		onShow: function() {
+			uni.$on('addressItem', function(res) {
+				that.$set(this, 'addressItem', res);
+				this.preOrderNo = ''
+				this.fastMailData = {}
+				this.orderPrice = 0
+			})
 		},
 		methods: {
+			lookImg(url) {
+				uni.previewImage({
+					urls: url
+				});
+			},
+			getPreExpressApi(orderNo) {
+				loadPreExpressApi(orderNo).then(res => {
+					this.fastMailData = res.data
+					this.orderPrice = res.data.payFee
+				})
+			},
+			onAddFastMail() {
+				if (Object.keys(this.addressItem).length == 0) return this.$util.Tips({
+					title: '请选择地址'
+				});
+				this.isTake = true
+			},
 			tabSelect(active, e) {
 				this.active = active;
 				this.navListIndex = e;
 				this.scrollLeft = e * 60;
 			},
 			toPay() {
-				const refTake = this.$refs.takeFastMailRef;
-				// uni.showLoading({
-				// 	title: '保存中',
-				// 	mask: true
-				// })
-				this.orderPrice = +(refTake.fastMailObj.giveTips || 0) + +refTake.fastMailObj.sepec.fee || 0
-				let value = {
-					giveTips: refTake.fastMailObj.giveTips,
-					orderDetails: [{
-						expressInfo: refTake.fastMailObj.expressInfo || '',
-						expressNum: 1,
-						image: refTake.fastMailObj.figureArr ? refTake.fastMailObj.figureArr[0] : '',
-						orderNo: "",
-						price: this.orderPrice || 0,
-						remark: refTake.fastMailObj.remark || '',
-						sepec: +refTake.fastMailObj.sepec.fee || 0
-					}],
-					postAddressId: refTake.addressExpressObj.id,
-					preOrderType: this.navList[this.navListIndex].preOrderType,
-					userAddressId: refTake.addressObj.id
-				}
-				const tips = this.checkData(value)
-				if (tips) {
-					return this.$util.Tips({
-						title: tips
-					});
-				}
-				preExpressApi(value).then(res => {
-					this.isOrder = true;
-					console.log(res)
-					// uni.hideLoading();
-				}).catch(err => {
-					uni.showToast({
-						title: err,
-						icon: 'none'
-					})
-				})
+				console.log(this.fastMailData)
+				console.log('提交订单')
+			},
+			pay(item) {
+				uni.showLoading({
+					title: '加载中...'
+				});
+				this.getToPayment(item.secondType, item)
+			},
+			onTipValue(value) {
+				this.giveTips = value
+				this.isTip = false;
 				console.log(value)
 			},
+			onTakeChang(data) {
+				this.isTake = false
+				this.preOrderNo = data.orderNo
+				this.getPreExpressApi(data.orderNo)
+			},
 			onCanCel(val) {
 				this.isOrder = val
+				this.isTake = val
+				this.isTip = val
 			},
-			checkData(val) {
-				if (!val.postAddressId) return '请填写取件地'
-				if (!val.userAddressId) return '请填写收件人信息'
-				if (!val.orderDetails[0].sepec) return '快递规格必选'
-				if (!val.orderDetails[0].expressInfo) return '请填写快递信息'
+			onRadioChang() {
+				this.radioArr = !this.radioArr
+				if (!this.fastMailData.postOrderList) return
+				this.fastMailData.postOrderList.forEach(item => {
+					item.orderInfoList.forEach(val => {
+						val.radar = this.radioArr
+					})
+				})
 			}
 		}
 	}
@@ -212,9 +271,7 @@
 
 	.fast-top {
 		width: 100%;
-		height: 80rpx;
-		padding: 0 30rpx;
-		line-height: 80rpx;
+		padding: 28rpx 30rpx;
 		font-weight: 600;
 		font-size: 27rpx;
 		color: #141414;
@@ -223,6 +280,18 @@
 		border-radius: 20rpx;
 	}
 
+	.remark-name {
+		font-weight: 600;
+		font-size: 27rpx;
+		color: #141414;
+	}
+
+	.fast-tip {
+		background-color: #fff;
+		margin-top: 20rpx;
+		padding: 20rpx;
+	}
+
 	.image2 {
 		width: 42rpx;
 		height: 42rpx;
@@ -232,6 +301,8 @@
 	.fast-jia {
 		width: 44rpx;
 		height: 44rpx;
+		line-height: 44rpx;
+		text-align: center;
 		color: #fff;
 		font-size: 40rpx;
 		border-radius: 50%;
@@ -244,39 +315,52 @@
 		background-color: #fff;
 
 		.fast-item {
-			padding: 20rpx 0;
+			padding: 20rpx 20rpx 20rpx 84rpx;
 			background-color: #F8F9FB;
 			margin-bottom: 10rpx;
 		}
 
+		.radios {
+			position: absolute;
+			left: 38rpx;
+		}
+
+		.fast-remark {
+			font-weight: 400;
+			font-size: 21rpx;
+			color: #999999;
+		}
+
 		.flex-between-center {
 			margin-bottom: 20rpx;
 		}
 
 		.fast-yz {
-			font-weight: 600;
-			font-size: 27rpx;
+			font-weight: 500;
+			font-size: 21rpx;
 			color: #141414;
 
 			text {
-				color: #FF0000;
+				color: #FF0202;
+				margin-left: 20rpx;
 			}
 		}
 
 		.fast-xx {
-			font-weight: 500;
-			font-size: 23rpx;
+			font-weight: 400;
+			font-size: 21rpx;
 			color: #646464;
-			margin-top: 10rpx;
+			margin: 10rpx 0;
 		}
 
 		.bg-color-cash {
 			margin-top: 30rpx;
 			color: $bg-color-primary;
 
-			text {
-				font-weight: 500;
-				font-size: 25rpx;
+			.fast-cash {
+				font-weight: 600;
+				font-size: 27rpx;
+				color: #FF6702;
 			}
 		}
 	}

+ 145 - 0
mer_uniapp/pages/substitute_fast_mail/my_fast_mail/index.vue

@@ -0,0 +1,145 @@
+<template>
+	<view class="flex-col" :style="{height: winHeight + 'px'}">
+		<!-- #ifdef MP -->
+		<view class="cart_nav">
+			<nav-bar iconColor='#fff' ref="navBarRef" navTitle="我的快递" backgroundColor="#FF6702" :isBackgroundColor="false">
+			</nav-bar>
+		</view>
+		<!-- #endif -->
+		<view class='newsList tui-skeleton flex-col' style="background-color: #fff;flex: 1;">
+			<view class='nav flex-center'>
+				<view class='item flex-center' v-for="(item,index) in navList" :key="index" @click='tabSelect(item.id, index)'>
+					<text class="line1" :class='active==item.id?"on":""'>{{item.name}}</text>
+				</view>
+			</view>
+			<view class='list' style="flex: 1;">
+				<template v-if="active == 1">
+				</template>
+				<template v-if="active == 2">
+				</template>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	// +----------------------------------------------------------------------
+	// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+	// +----------------------------------------------------------------------
+	// | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+	// +----------------------------------------------------------------------
+	// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+	// +----------------------------------------------------------------------
+	// | Author: CRMEB Team <admin@crmeb.com>
+	// +----------------------------------------------------------------------
+	import navBar from '@/components/navBar';
+	import animationType from '@/utils/animationType.js'
+	import tuiSkeleton from '@/components/base/tui-skeleton.vue';
+	import {
+		getAddressList
+	} from '@/api/user.js';
+	let app = getApp();
+	export default {
+		components: {
+			tuiSkeleton,
+			navBar
+		},
+		data() {
+			return {
+				winHeight: 0,
+				isNodes: 0, //控制什么时候开始抓取元素节点,只要数值改变就重新抓取
+				autoplay: true,
+				navList: [{
+					id: 1,
+					name: '进行中'
+				}, {
+					id: 2,
+					name: '历史快递'
+				}],
+				active: 1,
+				scrollLeft: 0,
+				addressItem: {}
+			};
+		},
+		onLoad() {
+			let that = this;
+			uni.getSystemInfo({
+				success: function(res) {
+					that.winHeight = res.windowHeight
+				},
+			});
+			this.getaddressInfo()
+		},
+		/**
+		 * 生命周期函数--监听页面显示
+		 */
+		onShow: function() {
+			let that = this;
+			uni.$on('addressItem', function(res) {
+				that.$set(that, 'addressItem', res);
+			})
+		},
+		methods: {
+			tabSelect(active, e) {
+				this.active = active;
+			},
+			/*
+			 * 获取默认收货地址或者获取某条地址信息
+			 */
+			getaddressInfo: function() {
+				getAddressList().then(res => {
+					console.log('地址', res)
+					if (res.code = 200) {
+						if (res.data.length !== 0) {
+							this.addressItem = res.data.find(item => item.isDefault === true) || {} // this.addressItem = res.data[0];
+						} else {
+							this.addressItem = {}
+						}
+						console.log('默认地址', this.addressItem)
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+
+	// #endif
+	.newsList .nav {
+		width: 100%;
+		height: 96rpx;
+		white-space: nowrap;
+		box-sizing: border-box;
+		padding-top: 43rpx;
+		border-top-right-radius: 23rpx;
+		background-color: #fff;
+	}
+
+	.newsList .nav .item {
+		// max-width: 156rpx;
+		display: inline-block;
+		font-size: 32rpx;
+		color: #999;
+		margin-left: 75rpx;
+	}
+
+	.on {
+		font-weight: 600;
+		font-size: 35rpx;
+		color: #141414;
+		border-bottom: 10rpx solid $bg-color-primary;
+		border-radius: 6rpx;
+	}
+
+	.newsList .nav .item~.item {
+		margin-left: 46rpx;
+	}
+	
+	.newsList .nav .item .line1 {
+		padding-bottom: 10rpx;
+		font-weight: 500;
+		font-size: 31rpx;
+		color: $bg-color-primary;
+	}
+</style>

+ 137 - 46
mer_uniapp/pages/substitute_fast_mail/take_fast_mail/index.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="flex-col container" :style="{height: winHeight + 'px'}">
+	<view class="flex-col container" :style="{top: navH + 'rpx'}">
 		<view class='newsList tui-skeleton' style="background-color: #fff;flex: 1;">
 			<!-- <view class='nav'>
 				<scroll-view class="scroll-view_x" scroll-x scroll-with-animation :scroll-left="scrollLeft" style="width:auto;overflow:hidden;">
@@ -13,26 +13,7 @@
 			</view> -->
 			<view class='list flex-col' style="background-color: #F5F5F5;">
 				<view style="padding: 40rpx 24rpx;background-color: #fff;border-bottom-left-radius: 23rpx;">
-					<view class="flex-y-center flex-between-center" style="margin-bottom: 20rpx;">
-						<view class="flex-y-center" style="flex: 1">
-							<image style="width: 135rpx; height: 135rpx;border-radius: 50%;" src="/static/img/ic-shou.png"></image>
-							<view style="margin-left: 29rpx;flex: 1;">
-								<template v-if="Object.keys(addressObj).length == 0">
-									<view class="send-name">送到哪里</view>
-									<view class="send-tips">请输入收件人信息</view>
-								</template>
-								<view class="send-info" v-else>
-									<view class='consignee'>收货人:{{addressObj.realName}}<text class='phone'>{{addressObj.phone}}</text></view>
-									<view>收货地址:{{addressObj.province}}{{addressObj.city}}{{addressObj.district}}{{ addressObj.street}}{{addressObj.detail}}</view>
-								</view>
-								<!-- <view style="font-weight: 500;font-size: 23rpx;color: #FF6702;">可送单时间段00:00——23:59</view> -->
-							</view>
-						</view>
-						<navigator url="/pages/address/user_address_list/index">
-							<view class='iconfont icon-jiantou' style="font-size: 55rpx;margin-left: 29rpx;"></view>
-						</navigator>
-					</view>
-					<view class="flex-y-center flex-between-center" style="margin-bottom: 20rpx">
+					<view class="flex-y-center flex-between-center" style="margin-bottom: 20rpx;border: none;">
 						<view class="flex-y-center" style="flex: 1">
 							<image style="width: 135rpx; height: 135rpx;border-radius: 50%;" src="/static/img/ic-qu-chengse.png"></image>
 							<view style="margin-left: 29rpx;flex: 1;">
@@ -62,9 +43,18 @@
 						</view>
 					</view>
 					<view class="flex-between-center">
-						<view class="remark-name">取件信息</view>
+						<view class="remark-name">取件</view>
 						<view class="flex-y-center">
-							<input v-model="fastMailObj.expressInfo" class="uni-input" focus placeholder="请输入内容" />
+							<input v-model="fastMailObj.expressInfo" class="uni-input" placeholder="请输入取件码" />
+							<view class='iconfont icon-jiantou' style="opacity: 0;"></view>
+						</view>
+					</view>
+					<view class="flex-between-center">
+						<view class="remark-name">快递单号</view>
+						<view class="flex-y-center" @tap="isExpress = true">
+							<text style="font-weight: 400;font-size: 27rpx;color: #646464;" v-if="fastMailObj.expressObj">{{fastMailObj.expressObj.companyName}}
+								{{fastMailObj.expressObj.odd}}</text>
+							<view class='iconfont icon-jiantou' style="font-size: 30rpx;margin: 0 19rpx;"></view>
 						</view>
 					</view>
 					<view class="flex-between-center">
@@ -91,20 +81,25 @@
 						<view class="remark-name">备注</view>
 						<view class="flex-y-center">
 							<input v-model="fastMailObj.remark" class="uni-input" />
+							<view class='iconfont icon-jiantou' style="opacity: 0;"></view>
 						</view>
 					</view>
-					<view class="flex-between-center">
+					<!-- <view class="flex-between-center">
 						<view class="remark-name">小费</view>
 						<view class="flex-y-center" @tap="isTip = true">
 							<text style="font-weight: 400;font-size: 27rpx;color: #646464;">{{fastMailObj.giveTips ? '¥' + fastMailObj.giveTips : ''}}</text>
 							<view class='iconfont icon-jiantou' style="font-size: 30rpx;margin: 0 19rpx;"></view>
 						</view>
-					</view>
+					</view> -->
 				</view>
 				<!-- <view class="courie flex-y-center">
 					<image src="/static/img/ic-courie.png" mode=""></image><text>当前1名快递员接单</text>
 				</view> -->
 			</view>
+			<view class="flex-center" style="margin-top: 58rpx;">
+				<button class="sub-default flex-center" @tap="onDefault">取消</button>
+				<button class="sub flex-center" @tap="onSure">确定</button>
+			</view>
 		</view>
 		<view v-if="visible" class="picker-box">
 			<picker-view :indicator-style="indicatorStyle" :value="timeValue" class="picker-view" @change="bindChange">
@@ -121,10 +116,11 @@
 				</picker-view-column>
 			</picker-view>
 		</view>
-		<fast-mail-tip v-if="isTip" :value="fastMailObj.giveTips" @tipValue="onTipValue" @onCancel="onCanCel"></fast-mail-tip>
+		<!-- <fast-mail-tip v-if="isTip" :value="fastMailObj.giveTips" @tipValue="onTipValue" @onCancel="onCanCel"></fast-mail-tip> -->
 		<fast-mail-specs v-if="isSpecs" :obj="fastMailObj.sepec" @specsValue="onSpecsValue" @onCancel="onCanCel"></fast-mail-specs>
 		<fast-mail-figure v-if="isFigure" :picDefault="fastMailObj.figureArr" @figureValue="onFigureValue" @onCancel="onFigureCanCel"></fast-mail-figure>
 		<fast-mail-point v-if="isPoint" @pointValue="onPointValue" @onCancel="onCanCel"></fast-mail-point>
+		<fast-mail-express v-if="isExpress" @expressObj="onExpressObj" @onCancel="onCanCel"></fast-mail-express>
 	</view>
 </template>
 
@@ -143,17 +139,35 @@
 	import fastMailSpecs from '../components/fast_mail_specs/index.vue'
 	import fastMailFigure from '../components/fast_mail_figure/index.vue'
 	import fastMailPoint from '../components/fast_mail_point/index.vue'
+	import fastMailExpress from '../components/fast_mail_express/index.vue'
 	import {
-		getAddressDefault,
 		getAddressExpressDefault
 	} from '@/api/user.js';
+	import {
+		mapGetters
+	} from "vuex";
+	import {
+		preExpressApi
+	} from '@/api/fastMail.js';
 	let app = getApp();
 	export default {
 		components: {
 			fastMailTip,
 			fastMailSpecs,
 			fastMailFigure,
-			fastMailPoint
+			fastMailPoint,
+			fastMailExpress
+		},
+		computed: mapGetters(['globalData']),
+		props: {
+			addressObj: {
+				type: Object,
+				default: {}
+			},
+			orderNo: {
+				type: String,
+				default: ''
+			},
 		},
 		data() {
 			return {
@@ -162,8 +176,9 @@
 				isFigure: false, // 附图弹窗
 				isPoint: false, // 选择快递点弹窗
 				visible: false, // 送达时间弹窗
+				isExpress: false, // 快递公司弹窗
+				navH: 0,
 				timeValue: [0, 0],
-				addressObj: {},
 				addressExpressObj: {},
 				fastMailObj: {},
 				hours: 0,
@@ -196,20 +211,17 @@
 				indicatorStyle: `height: 50px;background-color: #F8F8F8;z-index: -1;`
 			};
 		},
-		onLoad(options) {
-			let that = this;
-			uni.getSystemInfo({
-				success: function(res) {
-					that.winHeight = res.windowHeight
-				},
-			});
-		},
+		onLoad(options) {},
 		mounted() {
+			// #ifdef MP || APP-PLUS
+			// 获取导航高度;
+			this.navH = this.globalData.navHeight;
+			// #endif
+			// #ifdef H5
+			this.navH = 80;
+			// #endif
 			this.initTime()
 			this.getaddressInfo()
-			uni.$on('addressItem', function(res) {
-				that.$set(this, 'addressObj', res);
-			})
 			uni.$on('addressExpressItem', function(res) {
 				that.$set(this, 'addressExpressObj', res);
 			})
@@ -219,10 +231,6 @@
 			 * 获取默认收货地址或者获取某条地址信息
 			 */
 			getaddressInfo: function() {
-				getAddressDefault().then(res => {
-					console.log('地址', res)
-					this.addressObj = res.data || {}
-				})
 				getAddressExpressDefault().then(res => {
 					console.log('驿站地址', res)
 					this.addressExpressObj = res.data || {}
@@ -281,6 +289,7 @@
 				this.isTip = val
 				this.isSpecs = val
 				this.isPoint = val
+				this.isExpress = false
 			},
 			onFigureCanCel(arr) {
 				this.isFigure = false
@@ -301,6 +310,14 @@
 				this.isPoint = false
 				console.log(obj)
 			},
+			onExpressObj(obj) {
+				this.fastMailObj.expressObj = obj
+				this.isExpress = false
+				console.log(obj)
+			},
+			onDefault() {
+				this.$emit('onCancel', false)
+			},
 			bindChange: function(e) {
 				console.log(e)
 				this.timeValue = e.detail.value
@@ -324,6 +341,55 @@
 				this.fastMailObj.dayTimeName = timeStr
 				this.visible = false
 				console.log(this.fastMailObj)
+			},
+			onSure() {
+				uni.showLoading({
+					title: '保存中',
+					mask: true
+				})
+				let value = {
+					orderDetails: [{
+						expressNo: this.fastMailObj.expressObj?.odd || '',
+						expressCompany: this.fastMailObj.expressObj?.companyName || '',
+						pickUpCode: this.fastMailObj.expressInfo || '',
+						expressNum: 1,
+						postAddressId: this.addressExpressObj.id || null,
+						postName: this.addressExpressObj.expressName || '',
+						postPhone: this.addressExpressObj.phone || '',
+						image: this.fastMailObj.figureArr ? this.fastMailObj.figureArr[0] : '',
+						spec: this.fastMailObj.sepec?.spceName || '',
+						price: +this.fastMailObj.sepec?.fee || 0,
+						remark: this.fastMailObj.remark || ''
+					}],
+					preOrderType: 'take',
+					preOrderNo: this.orderNo,
+					userAddressId: this.addressObj.id
+				}
+				const tips = this.checkData(value)
+				if (tips) {
+					uni.hideLoading();
+					return this.$util.Tips({
+						title: tips
+					});
+				}
+				preExpressApi(value).then(res => {
+					this.isOrder = true;
+					console.log(res)
+					uni.hideLoading();
+					this.$emit('onTakeFastOk', res.data)
+				}).catch(err => {
+					uni.showToast({
+						title: err,
+						icon: 'none'
+					})
+					uni.hideLoading();
+				})
+			},
+			checkData(val) {
+				if (!val.orderDetails[0].postAddressId) return '请填写取件地'
+				if (!val.orderDetails[0].spec) return '快递规格必选'
+				if (!val.orderDetails[0].pickUpCode) return '请填写取件码'
+				if (!val.orderDetails[0].expressCompany) return '请填写快递单号'
 			}
 		}
 	}
@@ -332,9 +398,30 @@
 <style lang="scss" scoped>
 	.container {
 		width: 100%;
+		height: 100%;
+		z-index: 99999;
 		position: fixed;
 	}
 
+	.sub {
+		background-color: $bg-color-primary;
+		font-weight: 500;
+		font-size: 31rpx;
+		color: #FFFFFF;
+		width: 154rpx;
+		height: 77rpx
+	}
+
+	.sub-default {
+		background: #C2C2C2;
+		font-weight: 400;
+		font-size: 31rpx;
+		color: #FFFFFF;
+		width: 154rpx;
+		height: 77rpx;
+		margin-right: 39rpx;
+	}
+
 	.send-name {
 		font-weight: 500;
 		font-size: 23rpx;
@@ -413,9 +500,13 @@
 			z-index: 99999;
 		}
 	}
-
-
+	
 	.item-picker {
 		text-align: center;
 	}
+	
+	.uni-input {
+		text-align: right;
+		margin: 0 10rpx;
+	}
 </style>

+ 1 - 1
mer_uniapp/pages/user/index.vue

@@ -174,7 +174,7 @@
 						id: 1,
 						icon: '/static/img/ic-express.png',
 						text: '我的快递',
-						url: ''
+						url: '/pages/substitute_fast_mail/my_fast_mail/index'
 					},
 					{
 						id: 2,