update code adout order

This commit is contained in:
cmxdd 2020-08-06 10:04:38 +08:00
parent 7d82d8d156
commit e67e2fe701
4 changed files with 116 additions and 62 deletions

View File

@ -10,9 +10,9 @@
<view class="status" v-if="info.view_type==1">待处理订单</view> <view class="status" v-if="info.view_type==1">待处理订单</view>
<view class="status" v-else-if="info.view_type==2">已发货订单</view> <view class="status" v-else-if="info.view_type==2">已发货订单</view>
<view class="status" v-else-if="info.view_type==3">已完成订单</view> <view class="status" v-else-if="info.view_type==3">已完成订单</view>
<view class="status" v-else-if="info.view_type==4">申请退款订单</view> <view class="status" v-else-if="info.view_type==4">申请退款</view>
<view class="status" v-else-if="info.view_type==5">已退款订单</view> <view class="status" v-else-if="info.view_type==5">已退款订单</view>
<view class="status" v-else-if="info.view_type==6">拒绝退款订单</view> <view class="status" v-else-if="info.view_type==6">拒绝退款</view>
</view> </view>
<view class="name u-line-1">{{info.extend_order_goods[0].goods_name}}</view> <view class="name u-line-1">{{info.extend_order_goods[0].goods_name}}</view>
<view class="info"> <view class="info">

View File

@ -13,20 +13,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="refunds-user" v-if="type == 2 || type == 3 || type == 4 || type == 5 || type == 6"> <!-- 待处理 -->
<view>
<image src="/static/image/home/2.png"></image>
<view>{{ info.extend_order_common.reciver_name }}</view>
</view>
<view>
<image src="/static/image/home/3.png"></image>
<view>{{ info.extend_order_common.reciver_info.mob_phone }}</view>
</view>
<view>
<image src="/static/image/home/4.png"></image>
<view class="address u-line-1">{{ info.extend_order_common.reciver_info.address }}</view>
</view>
</view>
<view class="user-info" v-if="type == 1"> <view class="user-info" v-if="type == 1">
<view class="info-title">收件人信息</view> <view class="info-title">收件人信息</view>
<view class="info-container"> <view class="info-container">
@ -44,6 +31,22 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 待处理之后的 -->
<view class="refunds-user" v-if="type == 2 || type == 3 || type == 4 || type == 5 || type == 6">
<view>
<image src="/static/image/home/2.png"></image>
<view>{{ info.extend_order_common.reciver_name }}</view>
</view>
<view>
<image src="/static/image/home/3.png"></image>
<view>{{ info.extend_order_common.reciver_info.mob_phone }}</view>
</view>
<view>
<image src="/static/image/home/4.png"></image>
<view class="address u-line-1">{{ info.extend_order_common.reciver_info.address }}</view>
</view>
</view>
<!-- 待处理 -->
<view class="delivery" v-if="type == 1"> <view class="delivery" v-if="type == 1">
<view class="title">派送方式</view> <view class="title">派送方式</view>
<view class="methods"> <view class="methods">
@ -52,6 +55,7 @@
</view> </view>
<view class="btn" @click="confirmpushstyle">确认</view> <view class="btn" @click="confirmpushstyle">确认</view>
</view> </view>
<!-- 已发货 -->
<view class="pushtimeline" v-if="type == 2"> <view class="pushtimeline" v-if="type == 2">
<view class="timelinetitle">物流信息</view> <view class="timelinetitle">物流信息</view>
<view class="timelineid">订单单号:{{ info.order_sn }}</view> <view class="timelineid">订单单号:{{ info.order_sn }}</view>
@ -60,11 +64,14 @@
<view class="timelinetime">{{list.kd_time}}</view> <view class="timelinetime">{{list.kd_time}}</view>
</view> </view>
</view> </view>
<!-- 已完成 -->
<!-- 退款处理 -->
<view class="refunds-option" v-if="type == 4"> <view class="refunds-option" v-if="type == 4">
<view :class="{ active: cur == 0 }" @click="unrefuse">不处理</view> <view :class="{ active: cur == 0 }" @click="unrefuse">不处理</view>
<view :class="{ active: cur == 1 }" @click="refuse">确定处理</view> <view :class="{ active: cur == 1 }" @click="refuse">确定处理</view>
</view> </view>
<view class="refund" v-if="type == 5 || type == 6">退款状态:{{ type == 5 ? '同意退款请注意查收' : '拒绝退款请等待客服联系' }}</view> <!-- 同意退款/拒绝退款 -->
<view class="refund" v-if="type == 5 || type == 6">退款状态:{{ type == 5 ? '同意退款请注意查收' : '拒绝退款请等待客服联系' }}</view>
<u-popup v-model="showDelivery" mode="center" border-radius="10" class="delivery-popup"> <u-popup v-model="showDelivery" mode="center" border-radius="10" class="delivery-popup">
<view class="title">骑手信息</view> <view class="title">骑手信息</view>
<view class="input-info"> <view class="input-info">
@ -181,7 +188,6 @@ export default {
this.showRefunds = false; this.showRefunds = false;
if (this.cur == 0) { if (this.cur == 0) {
// 退 // 退
return;
this.$u.api.refund({ this.$u.api.refund({
refund_id: this.orderid, refund_id: this.orderid,
seller_state:2, seller_state:2,
@ -197,12 +203,14 @@ export default {
title: res.message, title: res.message,
type: 'success' type: 'success'
}); });
uni.navigateBack({
delta: 1
});
console.log(res); console.log(res);
} }
}); });
} else { } else {
// 退 // 退
return;
this.$u.api.refund({ this.$u.api.refund({
refund_id: this.orderid, refund_id: this.orderid,
seller_state:3, seller_state:3,
@ -218,6 +226,9 @@ export default {
title: res.message, title: res.message,
type: 'success' type: 'success'
}); });
uni.navigateBack({
delta: 1
});
console.log(res); console.log(res);
} }
}); });
@ -298,6 +309,9 @@ export default {
title: res.message, title: res.message,
type: 'success' type: 'success'
}); });
uni.navigateBack({
delta: 1
});
} }
}); });
} }

View File

@ -153,6 +153,7 @@ export default {
// 0: 1 2 3 4退/退 5退/退 6退/退 // 0: 1 2 3 4退/退 5退/退 6退/退
}, },
onShow() { onShow() {
this.num=1
this.current=0 this.current=0
// //
this.resetarr() this.resetarr()

View File

@ -13,21 +13,9 @@
</view> </view>
</view> </view>
</view> </view>
<view class="refunds-user" v-if="type == 2 || type == 3 || type == 4">
<view> <!-- 待处理订单/已发货订单收货人信息 -->
<image src="/static/image/home/2.png"></image> <view class="user-info">
<view>{{ info.goods_try_member_name }}</view>
</view>
<view>
<image src="/static/image/home/3.png"></image>
<view>{{ info.goods_try_member_mobile }}</view>
</view>
<view>
<image src="/static/image/home/4.png"></image>
<view class="address u-line-1">{{ info.goods_try_area_info }}</view>
</view>
</view>
<view class="user-info" v-if="type == 1">
<view class="info-title">收件人信息</view> <view class="info-title">收件人信息</view>
<view class="info-container"> <view class="info-container">
<view> <view>
@ -42,8 +30,29 @@
<view class="title">收货地址</view> <view class="title">收货地址</view>
<view class="value u-line-1">{{ info.goods_try_area_info }}</view> <view class="value u-line-1">{{ info.goods_try_area_info }}</view>
</view> </view>
<view v-if="type==2">
<view class="title">派送方式</view>
<view class="value u-line-1">{{ info.goods_try_deliver_goods_type==1?"人工送达":"骑手" }}</view>
</view>
</view> </view>
</view> </view>
<!-- 已拒绝/已完成订单收货人信息 -->
<!-- <view class="refunds-user" v-if="type == 3 || type == 4">
<view>
<image src="/static/image/home/2.png"></image>
<view>{{ info.goods_try_member_name }}</view>
</view>
<view>
<image src="/static/image/home/3.png"></image>
<view>{{ info.goods_try_member_mobile }}</view>
</view>
<view>
<image src="/static/image/home/4.png"></image>
<view class="address u-line-1">{{ info.goods_try_area_info }}</view>
</view>
</view> -->
<!-- 待处理订单 -->
<view class="delivery" v-if="type == 1"> <view class="delivery" v-if="type == 1">
<view class="title">派送方式</view> <view class="title">派送方式</view>
<view class="methods"> <view class="methods">
@ -53,35 +62,44 @@
<view class="btn" @click="confirmpushstyle">确认</view> <view class="btn" @click="confirmpushstyle">确认</view>
</view> </view>
<!-- <view class="refunds-option" v-if="type==4"> <!-- 已发货 -->
<view :class="{active: cur==0}" @click="cur=0;showRefunds=true">不处理</view> <!-- 人工送达 -->
<view :class="{active: cur==1}" @click="cur=1;showRefunds=true">确定处理</view> <view class="refunds-user" v-if="info.goods_try_deliver_goods_type==1&&type==2">
<view>
<view>人工送达请等待货物正在飞速与你接近</view>
</view>
</view>
<!-- 骑手 -->
<view class="refunds-title" v-if="type==2">配送信息</view>
<view class="refunds-title" v-if="type==3||type==4">提示信息</view>
<view class="refunds-user" v-if="info.goods_try_deliver_goods_type==2&&type==2">
<view>
<image src="/static/image/home/2.png"></image>
<view>{{ info.takeawayer_name }}</view>
</view>
<view>
<image src="/static/image/home/3.png"></image>
<view>{{ info.takeawayer_mobile }}</view>
</view>
<!-- 骑手公司 -->
<!-- <view>
<image src="/static/image/home/4.png"></image>
<view class="address u-line-1">{{ info.goods_try_area_info }}</view>
</view> --> </view> -->
<!-- <u-popup v-model="showDelivery" mode="center" border-radius="10" class="delivery-popup">
<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>
<view class="btn">确认</view> <!-- 已经拒绝 -->
</u-popup> --> <view class="refunds-user" v-if="type==3">
<view>
<view>抱歉商家正忙无法接单期待下次为您服务</view>
</view>
</view>
<!-- 已完成订单 -->
<view class="refunds-user" v-if="type==4">
<view>
<view>订单配送完成期待下次为您服务</view>
</view>
</view>
<u-picker mode="selector" v-model="show" :default-selector="[0]" :range="list" range-key="content" @confirm="getselect"></u-picker> <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">
<view class="title" @click="bindpushid">填写快递单号</view>
<view class="input-info">
<input type="text" placeholder="请输入快递单号" v-model="express" />
</view>
<view class="btn">确认</view>
</u-popup> -->
<!-- <u-popup v-model="showRefunds" mode="center" border-radius="10" class="refunds-popup">
<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" /> <u-toast ref="uToast" />
</view> </view>
</template> </template>
@ -135,6 +153,13 @@ export default {
type: 'error' type: 'error'
}); });
} else { } else {
this.$refs.uToast.show({
title: res.message,
type: 'success'
});
uni.navigateBack({
delta: 1
});
} }
}); });
} else { } else {
@ -150,6 +175,13 @@ export default {
type: 'error' type: 'error'
}); });
} else { } else {
this.$refs.uToast.show({
title: res.message,
type: 'success'
});
uni.navigateBack({
delta: 1
});
} }
}); });
} }
@ -234,6 +266,13 @@ export default {
} }
} }
} }
.refunds-title{
padding: 25rpx 30rpx;
font-weight: 500;
color: #333333;
background-color: #ffffff;
border-bottom: 2rpx solid #ececec;
}
.refunds-user { .refunds-user {
padding: 25rpx 30rpx; padding: 25rpx 30rpx;
background-color: #ffffff; background-color: #ffffff;
@ -290,7 +329,7 @@ export default {
border-bottom: 2rpx solid #ececec; border-bottom: 2rpx solid #ececec;
} }
.title { .title {
width: 150rpx; width: 170rpx;
font-size: 30rpx; font-size: 30rpx;
margin-right: 10rpx; margin-right: 10rpx;
} }