2020-08-05 17:42:06 +08:00
|
|
|
<template>
|
|
|
|
<view class="details">
|
|
|
|
<view class="goods-info">
|
|
|
|
<image :src="info.goods_image"></image>
|
|
|
|
<view class="info-right">
|
2020-08-05 20:03:53 +08:00
|
|
|
<view class="name u-line-1">{{ info.goods_name }}</view>
|
2020-08-05 17:42:06 +08:00
|
|
|
<view class="info">
|
2020-08-05 20:03:53 +08:00
|
|
|
<view class="num">共{{ info.goods_try_num }}件商品</view>
|
|
|
|
<view class="price">
|
|
|
|
实付
|
|
|
|
<span>¥{{ info.goods_price }}</span>
|
|
|
|
</view>
|
2020-08-05 17:42:06 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
2020-08-05 20:03:53 +08:00
|
|
|
<view class="refunds-user" v-if="type == 2 || type == 3 || type == 4">
|
2020-08-05 17:42:06 +08:00
|
|
|
<view>
|
|
|
|
<image src="/static/image/home/2.png"></image>
|
2020-08-05 20:03:53 +08:00
|
|
|
<view>{{ info.goods_try_member_name }}</view>
|
2020-08-05 17:42:06 +08:00
|
|
|
</view>
|
|
|
|
<view>
|
|
|
|
<image src="/static/image/home/3.png"></image>
|
2020-08-05 20:03:53 +08:00
|
|
|
<view>{{ info.goods_try_member_mobile }}</view>
|
2020-08-05 17:42:06 +08:00
|
|
|
</view>
|
|
|
|
<view>
|
|
|
|
<image src="/static/image/home/4.png"></image>
|
2020-08-05 20:03:53 +08:00
|
|
|
<view class="address u-line-1">{{ info.goods_try_area_info }}</view>
|
2020-08-05 17:42:06 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="user-info" v-if="type == 1">
|
|
|
|
<view class="info-title">收件人信息</view>
|
|
|
|
<view class="info-container">
|
|
|
|
<view>
|
|
|
|
<view class="title">姓名</view>
|
2020-08-05 20:03:53 +08:00
|
|
|
<view class="value">{{ info.goods_try_member_name }}</view>
|
2020-08-05 17:42:06 +08:00
|
|
|
</view>
|
|
|
|
<view>
|
|
|
|
<view class="title">手机号</view>
|
2020-08-05 20:03:53 +08:00
|
|
|
<view class="value">{{ info.goods_try_member_mobile }}</view>
|
2020-08-05 17:42:06 +08:00
|
|
|
</view>
|
|
|
|
<view>
|
|
|
|
<view class="title">收货地址</view>
|
2020-08-05 20:03:53 +08:00
|
|
|
<view class="value u-line-1">{{ info.goods_try_area_info }}</view>
|
2020-08-05 17:42:06 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="delivery" v-if="type == 1">
|
|
|
|
<view class="title">派送方式</view>
|
|
|
|
<view class="methods">
|
2020-08-05 20:03:53 +08:00
|
|
|
<view :class="{ active: cur == 0 }" @click="people">人工送达</view>
|
|
|
|
<view :class="{ active: cur == 1 }" @click="carer">指派外部骑手</view>
|
2020-08-05 17:42:06 +08:00
|
|
|
</view>
|
2020-08-05 20:03:53 +08:00
|
|
|
|
2020-08-05 17:42:06 +08:00
|
|
|
<view class="btn" @click="confirmpushstyle">确认</view>
|
|
|
|
</view>
|
2020-08-05 20:03:53 +08:00
|
|
|
<!-- <view class="refunds-option" v-if="type==4">
|
2020-08-05 17:42:06 +08:00
|
|
|
<view :class="{active: cur==0}" @click="cur=0;showRefunds=true">不处理</view>
|
|
|
|
<view :class="{active: cur==1}" @click="cur=1;showRefunds=true">确定处理</view>
|
|
|
|
</view> -->
|
2020-08-05 20:03:53 +08:00
|
|
|
<!-- <u-popup v-model="showDelivery" mode="center" border-radius="10" class="delivery-popup">
|
2020-08-05 17:42:06 +08:00
|
|
|
<view class="title">骑手信息</view>
|
|
|
|
<view class="input-info">
|
|
|
|
<input type="text" placeholder="请输入您的姓名" v-model="name" />
|
|
|
|
<input type="text" placeholder="请输入您的手机号" v-model="phone" />
|
|
|
|
<input type="text" placeholder="请输入您的公司名称" v-model="company" />
|
|
|
|
</view>
|
|
|
|
<view class="btn">确认</view>
|
|
|
|
</u-popup> -->
|
2020-08-05 20:03:53 +08:00
|
|
|
<u-picker mode="selector" v-model="show" :default-selector="[0]" :range="list" range-key="content" @confirm="getselect"></u-picker>
|
|
|
|
<!-- <u-popup v-model="showExpress" mode="center" border-radius="10" class="delivery-popup">
|
2020-08-05 17:42:06 +08:00
|
|
|
<view class="title" @click="bindpushid">填写快递单号</view>
|
|
|
|
<view class="input-info">
|
|
|
|
<input type="text" placeholder="请输入快递单号" v-model="express" />
|
|
|
|
</view>
|
|
|
|
<view class="btn">确认</view>
|
|
|
|
</u-popup> -->
|
2020-08-05 20:03:53 +08:00
|
|
|
<!-- <u-popup v-model="showRefunds" mode="center" border-radius="10" class="refunds-popup">
|
2020-08-05 17:42:06 +08:00
|
|
|
<view v-if="cur==1" class="popup-tips">确定处理<br />平台将进行退款</view>
|
|
|
|
<view v-if="cur==0" class="popup-tips">确定不处理<br />平台将进行联系</view>
|
|
|
|
<view class="popup-btn">
|
|
|
|
<view class="cancel" @click="showRefunds=false">取消</view>
|
|
|
|
<view class="determine">确定</view>
|
|
|
|
</view>
|
|
|
|
</u-popup> -->
|
|
|
|
<u-toast ref="uToast" />
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
status: 1, // 订单状态
|
|
|
|
cur: Number,
|
|
|
|
showDelivery: false, // 填写骑手信息
|
|
|
|
showExpress: false, // 填写快递单号
|
|
|
|
showRefunds: false, // 平台退货处理
|
|
|
|
show: false, // 骑手列表
|
|
|
|
name: '',
|
|
|
|
phone: '',
|
|
|
|
company: '',
|
|
|
|
express: '',
|
2020-08-05 20:03:53 +08:00
|
|
|
type: '',
|
|
|
|
orderid: 0,
|
|
|
|
info: {},
|
|
|
|
list: [],
|
|
|
|
selctcar: null //选择骑手ID
|
|
|
|
};
|
2020-08-05 17:42:06 +08:00
|
|
|
},
|
|
|
|
onLoad(option) {
|
|
|
|
this.type = option.type;
|
|
|
|
this.orderid = option.id;
|
2020-08-05 20:03:53 +08:00
|
|
|
this.resetinfo();
|
2020-08-05 17:42:06 +08:00
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
// 人工配送
|
2020-08-05 20:03:53 +08:00
|
|
|
people() {
|
|
|
|
this.cur = 0;
|
2020-08-05 17:42:06 +08:00
|
|
|
},
|
2020-08-05 20:03:53 +08:00
|
|
|
carer() {
|
|
|
|
this.cur = 1;
|
|
|
|
this.show = true;
|
2020-08-05 17:42:06 +08:00
|
|
|
},
|
|
|
|
// 绑定配送方式
|
|
|
|
confirmpushstyle() {
|
2020-08-05 20:03:53 +08:00
|
|
|
if (this.cur == 0) {
|
2020-08-05 20:10:55 +08:00
|
|
|
this.$u.api.agreetest({
|
|
|
|
goods_try_id: this.orderid,
|
|
|
|
type: 1,
|
|
|
|
takeawayer_id: 0
|
|
|
|
}).then(res => {
|
|
|
|
console.log(res);
|
|
|
|
if (res.errCode != 0) {
|
|
|
|
this.$refs.uToast.show({
|
|
|
|
title: res.message,
|
|
|
|
type: 'error'
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
}
|
|
|
|
});
|
2020-08-05 20:03:53 +08:00
|
|
|
} else {
|
2020-08-05 20:10:55 +08:00
|
|
|
this.$u.api.agreetest({
|
|
|
|
goods_try_id: this.orderid,
|
|
|
|
type: 1,
|
|
|
|
takeawayer_id: this.selctcar.takeawayer_id
|
|
|
|
}).then(res => {
|
2020-08-05 20:03:53 +08:00
|
|
|
console.log(res);
|
|
|
|
if (res.errCode != 0) {
|
|
|
|
this.$refs.uToast.show({
|
|
|
|
title: res.message,
|
|
|
|
type: 'error'
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
}
|
|
|
|
});
|
2020-08-05 20:10:55 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
// 选择骑手
|
|
|
|
getselect(e) {
|
|
|
|
this.selctcar = this.list[e[0]];
|
|
|
|
},
|
|
|
|
// 获取订单信息
|
|
|
|
resetinfo() {
|
|
|
|
this.$u.api.testorderdetail({
|
|
|
|
goods_try_id: this.orderid
|
|
|
|
}).then(res => {
|
|
|
|
console.log(res);
|
|
|
|
if (res.errCode != 0) {
|
|
|
|
this.$refs.uToast.show({
|
|
|
|
title: res.message,
|
|
|
|
type: 'error'
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
this.info = res.data.info;
|
|
|
|
}
|
|
|
|
});
|
2020-08-05 17:42:06 +08:00
|
|
|
// 获取骑手列表
|
|
|
|
this.$u.api.takeawayerlist({}).then(res => {
|
|
|
|
console.log(res);
|
|
|
|
if (res.errCode != 0) {
|
2020-08-05 20:03:53 +08:00
|
|
|
this.$refs.uToast.show({
|
|
|
|
title: res.message,
|
|
|
|
type: 'error'
|
|
|
|
});
|
2020-08-05 17:42:06 +08:00
|
|
|
} else {
|
2020-08-05 20:03:53 +08:00
|
|
|
let arr = res.data;
|
|
|
|
for (let index in arr) {
|
|
|
|
arr[index].content = arr[index].company_name + '——' + arr[index].contacts + '——' + arr[index].contact_number;
|
2020-08-05 17:42:06 +08:00
|
|
|
}
|
2020-08-05 20:03:53 +08:00
|
|
|
this.list = arr;
|
2020-08-05 17:42:06 +08:00
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
2020-08-05 20:03:53 +08:00
|
|
|
}
|
2020-08-05 17:42:06 +08:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.details {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
min-height: calc(100vh - var(--window-top));
|
2020-08-05 20:03:53 +08:00
|
|
|
background-color: #ececec;
|
2020-08-05 17:42:06 +08:00
|
|
|
.goods-info {
|
2020-08-05 20:03:53 +08:00
|
|
|
background-color: #ffffff;
|
2020-08-05 17:42:06 +08:00
|
|
|
padding: 30rpx;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
margin: 2rpx 0 20rpx;
|
|
|
|
> image {
|
|
|
|
width: 160rpx;
|
|
|
|
height: 160rpx;
|
|
|
|
border-radius: 10rpx;
|
|
|
|
flex-shrink: 0;
|
|
|
|
margin-right: 26rpx;
|
|
|
|
}
|
|
|
|
.info-right {
|
|
|
|
.name {
|
|
|
|
width: 439rpx;
|
|
|
|
font-size: 28rpx;
|
2020-08-05 20:03:53 +08:00
|
|
|
color: rgba(51, 51, 51, 1);
|
2020-08-05 17:42:06 +08:00
|
|
|
margin-bottom: 30rpx;
|
|
|
|
}
|
|
|
|
.info {
|
|
|
|
width: 100%;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
font-size: 26rpx;
|
2020-08-05 20:03:53 +08:00
|
|
|
color: rgba(102, 102, 102, 1);
|
2020-08-05 17:42:06 +08:00
|
|
|
.price {
|
|
|
|
margin-left: 10rpx;
|
|
|
|
> span {
|
2020-08-05 20:03:53 +08:00
|
|
|
color: #ff780f;
|
2020-08-05 17:42:06 +08:00
|
|
|
}
|
|
|
|
}
|
2020-08-05 20:03:53 +08:00
|
|
|
}
|
2020-08-05 17:42:06 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
.refunds-user {
|
|
|
|
padding: 25rpx 30rpx;
|
2020-08-05 20:03:53 +08:00
|
|
|
background-color: #ffffff;
|
2020-08-05 17:42:06 +08:00
|
|
|
margin-bottom: 20rpx;
|
|
|
|
> view {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
margin-bottom: 30rpx;
|
|
|
|
@mixin image-class($width, $right) {
|
|
|
|
> image {
|
|
|
|
flex-shrink: 0;
|
|
|
|
width: $width;
|
|
|
|
height: 40rpx;
|
|
|
|
margin-right: $right;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&:first-child {
|
|
|
|
@include image-class($width: 40rpx, $right: 20rpx);
|
|
|
|
}
|
|
|
|
&:nth-child(2) {
|
|
|
|
margin-left: 4rpx;
|
|
|
|
@include image-class($width: 32rpx, $right: 24rpx);
|
|
|
|
}
|
|
|
|
&:last-child {
|
|
|
|
margin-left: 2rpx;
|
|
|
|
@include image-class($width: 36rpx, $right: 22rpx);
|
|
|
|
}
|
|
|
|
> view {
|
|
|
|
font-size: 26rpx;
|
2020-08-05 20:03:53 +08:00
|
|
|
color: rgba(51, 51, 51, 1);
|
2020-08-05 17:42:06 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.user-info {
|
|
|
|
.info-title {
|
|
|
|
font-size: 30rpx;
|
|
|
|
font-weight: 500;
|
2020-08-05 20:03:53 +08:00
|
|
|
color: rgba(51, 51, 51, 1);
|
2020-08-05 17:42:06 +08:00
|
|
|
height: 88rpx;
|
2020-08-05 20:03:53 +08:00
|
|
|
background-color: #ffffff;
|
2020-08-05 17:42:06 +08:00
|
|
|
margin-bottom: 2rpx;
|
|
|
|
padding: 30rpx;
|
|
|
|
}
|
|
|
|
.info-container {
|
|
|
|
padding: 0 30rpx;
|
2020-08-05 20:03:53 +08:00
|
|
|
background-color: #ffffff;
|
2020-08-05 17:42:06 +08:00
|
|
|
margin-bottom: 20rpx;
|
|
|
|
> view {
|
|
|
|
height: 88rpx;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2020-08-05 20:03:53 +08:00
|
|
|
color: rgba(51, 51, 51, 1);
|
2020-08-05 17:42:06 +08:00
|
|
|
&:not(:last-child) {
|
2020-08-05 20:03:53 +08:00
|
|
|
border-bottom: 2rpx solid #ececec;
|
2020-08-05 17:42:06 +08:00
|
|
|
}
|
|
|
|
.title {
|
|
|
|
width: 150rpx;
|
|
|
|
font-size: 30rpx;
|
|
|
|
margin-right: 10rpx;
|
|
|
|
}
|
|
|
|
.value {
|
|
|
|
font-size: 26rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.delivery {
|
|
|
|
flex: 1;
|
2020-08-05 20:03:53 +08:00
|
|
|
background-color: #ffffff;
|
2020-08-05 17:42:06 +08:00
|
|
|
padding: 30rpx;
|
|
|
|
position: relative;
|
|
|
|
.title {
|
|
|
|
font-size: 30rpx;
|
|
|
|
font-weight: 500;
|
2020-08-05 20:03:53 +08:00
|
|
|
color: rgba(51, 51, 51, 1);
|
2020-08-05 17:42:06 +08:00
|
|
|
margin-bottom: 30rpx;
|
|
|
|
}
|
|
|
|
.methods {
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
> view {
|
|
|
|
font-size: 30rpx;
|
2020-08-05 20:03:53 +08:00
|
|
|
color: rgba(0, 0, 51, 1);
|
2020-08-05 17:42:06 +08:00
|
|
|
width: 335rpx;
|
|
|
|
height: 80rpx;
|
2020-08-05 20:03:53 +08:00
|
|
|
border: 1rpx solid rgba(236, 236, 236, 1);
|
|
|
|
background: rgba(236, 236, 236, 1);
|
2020-08-05 17:42:06 +08:00
|
|
|
border-radius: 6rpx;
|
|
|
|
text-align: center;
|
|
|
|
line-height: 80rpx;
|
|
|
|
margin-bottom: 20rpx;
|
|
|
|
&:nth-child(2n-1) {
|
|
|
|
margin-right: 20rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.active {
|
2020-08-05 20:03:53 +08:00
|
|
|
border: 1rpx solid #ff780f;
|
|
|
|
color: #ff780f;
|
|
|
|
background: #fff1e6;
|
2020-08-05 17:42:06 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
.btn {
|
|
|
|
position: absolute;
|
|
|
|
bottom: 40rpx;
|
|
|
|
left: 50%;
|
|
|
|
transform: translate(-50%, 0);
|
|
|
|
width: 690rpx;
|
|
|
|
height: 98rpx;
|
2020-08-05 20:03:53 +08:00
|
|
|
background: rgba(255, 120, 15, 1);
|
2020-08-05 17:42:06 +08:00
|
|
|
border-radius: 49rpx;
|
|
|
|
font-size: 36rpx;
|
2020-08-05 20:03:53 +08:00
|
|
|
color: rgba(255, 255, 255, 1);
|
2020-08-05 17:42:06 +08:00
|
|
|
text-align: center;
|
|
|
|
line-height: 98rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.refunds-option {
|
|
|
|
flex: 1;
|
|
|
|
padding: 88rpx 30rpx;
|
2020-08-05 20:03:53 +08:00
|
|
|
background-color: #ffffff;
|
2020-08-05 17:42:06 +08:00
|
|
|
display: flex;
|
|
|
|
> view {
|
|
|
|
width: 335rpx;
|
|
|
|
height: 80rpx;
|
2020-08-05 20:03:53 +08:00
|
|
|
border: 1rpx solid rgba(236, 236, 236, 1);
|
|
|
|
background: rgba(236, 236, 236, 1);
|
2020-08-05 17:42:06 +08:00
|
|
|
border-radius: 6rpx;
|
|
|
|
font-size: 30rpx;
|
2020-08-05 20:03:53 +08:00
|
|
|
color: rgba(0, 0, 51, 1);
|
2020-08-05 17:42:06 +08:00
|
|
|
line-height: 80rpx;
|
|
|
|
text-align: center;
|
|
|
|
margin-right: 20rpx;
|
|
|
|
}
|
|
|
|
.active {
|
2020-08-05 20:03:53 +08:00
|
|
|
border: 1rpx solid #ff780f;
|
|
|
|
color: #ff780f;
|
|
|
|
background: #fff1e6;
|
2020-08-05 17:42:06 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
.delivery-popup {
|
|
|
|
.title {
|
|
|
|
width: 420rpx;
|
|
|
|
font-size: 30rpx;
|
|
|
|
font-weight: 500;
|
2020-08-05 20:03:53 +08:00
|
|
|
color: rgba(51, 51, 51, 1);
|
2020-08-05 17:42:06 +08:00
|
|
|
text-align: center;
|
|
|
|
line-height: 88rpx;
|
2020-08-05 20:03:53 +08:00
|
|
|
border-bottom: 2rpx solid #ececec;
|
2020-08-05 17:42:06 +08:00
|
|
|
}
|
|
|
|
.input-info {
|
|
|
|
> input {
|
|
|
|
font-size: 26rpx;
|
|
|
|
line-height: 88rpx;
|
|
|
|
padding: 30rpx;
|
2020-08-05 20:03:53 +08:00
|
|
|
border-bottom: 2rpx solid #ececec;
|
2020-08-05 17:42:06 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
.btn {
|
|
|
|
margin: 20rpx auto;
|
|
|
|
width: 200rpx;
|
|
|
|
height: 60rpx;
|
2020-08-05 20:03:53 +08:00
|
|
|
background: rgba(255, 120, 15, 1);
|
2020-08-05 17:42:06 +08:00
|
|
|
border-radius: 30rpx;
|
|
|
|
font-size: 28rpx;
|
2020-08-05 20:03:53 +08:00
|
|
|
color: rgba(255, 255, 255, 1);
|
2020-08-05 17:42:06 +08:00
|
|
|
line-height: 60rpx;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.refunds-popup {
|
|
|
|
.popup-tips {
|
|
|
|
width: 420rpx;
|
|
|
|
text-align: center;
|
|
|
|
font-size: 28rpx;
|
2020-08-05 20:03:53 +08:00
|
|
|
color: rgba(102, 102, 102, 1);
|
2020-08-05 17:42:06 +08:00
|
|
|
line-height: 42rpx;
|
|
|
|
padding: 30rpx 0;
|
|
|
|
}
|
|
|
|
.popup-btn {
|
|
|
|
width: 420rpx;
|
|
|
|
display: flex;
|
2020-08-05 20:03:53 +08:00
|
|
|
border-top: 2rpx solid #ececec;
|
2020-08-05 17:42:06 +08:00
|
|
|
> view {
|
|
|
|
flex: 1;
|
|
|
|
height: 98rpx;
|
|
|
|
text-align: center;
|
|
|
|
line-height: 98rpx;
|
|
|
|
&:first-child {
|
2020-08-05 20:03:53 +08:00
|
|
|
border-right: 2rpx solid #ececec;
|
2020-08-05 17:42:06 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
.determine {
|
2020-08-05 20:03:53 +08:00
|
|
|
color: #ff780f;
|
2020-08-05 17:42:06 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-08-05 20:03:53 +08:00
|
|
|
</style>
|