feat:售后
This commit is contained in:
@@ -64,7 +64,14 @@
|
||||
{{ getValue(ORDER_STATUS, item.status) }}
|
||||
</view>
|
||||
<!-- 待付款 -->
|
||||
<view v-else class="order_item_header_right order_right_due">
|
||||
|
||||
<view
|
||||
v-if="
|
||||
form.type !== MINE_ORDER_TYPE.AFTER_SALE &&
|
||||
item.status === ORDER_TYPE.UNPAID
|
||||
"
|
||||
class="order_item_header_right order_right_due"
|
||||
>
|
||||
<view class="order_right_due_msg">等待付款</view>
|
||||
<view class="order_right_due_time"
|
||||
>{{ formatDate1(item.expireTime) }}前</view
|
||||
@@ -137,7 +144,10 @@
|
||||
<!-- <view class="operate_comm operate_but_1" v-if="item.status === ORDER_TYPE.UNSHIPPED" @click="checkCancel(true)">取消订单</view> -->
|
||||
<view
|
||||
class="operate_comm operate_but_2"
|
||||
v-if="item.status === ORDER_TYPE.UNPAID"
|
||||
v-if="
|
||||
item.status === ORDER_TYPE.UNPAID &&
|
||||
form.type !== MINE_ORDER_TYPE.AFTER_SALE
|
||||
"
|
||||
@click="jumpOrderInfo(item)"
|
||||
>去付款</view
|
||||
>
|
||||
@@ -160,17 +170,30 @@
|
||||
>去签署</view
|
||||
>
|
||||
<!-- <view class="operate_comm operate_but_3" v-if="item.status === ORDER_TYPE.UNSHIPPED">提醒发货</view> -->
|
||||
|
||||
<view
|
||||
class="operate_comm operate_but_1"
|
||||
v-if="
|
||||
[ORDER_TYPE.NOT_RECEIVE, ORDER_TYPE.UNSHIPPED].includes(
|
||||
item.status
|
||||
)
|
||||
"
|
||||
v-if="item.isAfter && form.type !== MINE_ORDER_TYPE.AFTER_SALE"
|
||||
@click="onSaleAfterTab"
|
||||
>
|
||||
查看售后
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="operate_comm operate_but_1"
|
||||
v-if="!item.isAfter && form.type !== MINE_ORDER_TYPE.AFTER_SALE"
|
||||
@click="onSaleAfter(item)"
|
||||
>
|
||||
售后
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="operate_comm operate_but_1"
|
||||
v-if="form.type === MINE_ORDER_TYPE.AFTER_SALE"
|
||||
@click="onAfterSaleDetail(item)"
|
||||
>
|
||||
售后详情
|
||||
</view>
|
||||
<!-- <view class="operate_comm operate_but_1" v-if="item.status === ORDER_TYPE.AFTER_SALE">查看售后</view> -->
|
||||
<!-- <view class="operate_comm operate_but_1" v-if="[ORDER_TYPE.COMPLETED].includes(item.status)">删除记录</view> -->
|
||||
<!-- <view class="operate_comm operate_but_3" v-if="[ORDER_TYPE.COMPLETED,ORDER_TYPE.CANCELED].includes(item.status)">再次购买</view> -->
|
||||
@@ -432,10 +455,10 @@ export default {
|
||||
id: MINE_ORDER_TYPE.SUCCEED,
|
||||
title: "已完成",
|
||||
},
|
||||
// {
|
||||
// id:MINE_ORDER_TYPE.AFTER_SALE,
|
||||
// title:"售后",
|
||||
// },
|
||||
{
|
||||
id: MINE_ORDER_TYPE.AFTER_SALE,
|
||||
title: "售后",
|
||||
},
|
||||
],
|
||||
form: {
|
||||
page: 1,
|
||||
@@ -482,33 +505,40 @@ export default {
|
||||
getValue,
|
||||
formatDate1,
|
||||
copyData,
|
||||
|
||||
onNextRefund() {
|
||||
this.salesServer = 2;
|
||||
if (this.aftterSalesProduct.afterType == 0) {
|
||||
|
||||
this.aftterSalesProduct = {
|
||||
...this.aftterSalesProduct,
|
||||
...{ afterReason: this.cancelForm.afterReason },
|
||||
};
|
||||
|
||||
}
|
||||
},
|
||||
onSaleAfterTab() {
|
||||
this.checkType({ id: MINE_ORDER_TYPE.AFTER_SALE, title: "售后" });
|
||||
},
|
||||
// 售后
|
||||
onSaleAfter(item) {
|
||||
console.log("售后---1", item);
|
||||
console.log("售后---1", item, this.form.type);
|
||||
// 未售后
|
||||
if (item.afterType == 0) {
|
||||
this.cancelForm.afterReason = "";
|
||||
this.salesServer = 1;
|
||||
this.activeIndex = 0;
|
||||
this.aftterSalesProduct = item;
|
||||
this.afterShow = true;
|
||||
}
|
||||
// 已开始售后
|
||||
if (item.afterType > 0) {
|
||||
this.onAfterSaleDetail(item);
|
||||
}
|
||||
this.cancelForm.afterReason = "";
|
||||
this.salesServer = 1;
|
||||
this.activeIndex = 0;
|
||||
this.aftterSalesProduct = item;
|
||||
this.afterShow = true;
|
||||
this.aftterSalesProduct.status = 9;
|
||||
this.aftterSalesProduct.afterType = this.form.type - 1;
|
||||
},
|
||||
// 售后订单详情
|
||||
async onAfterSaleDetail(item) {
|
||||
if(item.status === 8){
|
||||
this.$refs.uToastRef.show({
|
||||
type: "success",
|
||||
message: "订单已作废",
|
||||
});
|
||||
return;
|
||||
}
|
||||
const { bizcode, data } = await afterSaleDetail({ id: item.afterId });
|
||||
if (bizcode == 100) {
|
||||
this.aftterSalesProduct = { ...data, ...{ afterId: item.afterId } };
|
||||
@@ -579,11 +609,12 @@ export default {
|
||||
) {
|
||||
this.checkSigned();
|
||||
}
|
||||
if (item.id !== MINE_ORDER_TYPE.AFTER_SALE) {
|
||||
this.loadData();
|
||||
} else {
|
||||
this.openShow = true; // 未开发的弹框
|
||||
}
|
||||
// if (item.id !== MINE_ORDER_TYPE.AFTER_SALE) {
|
||||
// this.loadData();
|
||||
// } else {
|
||||
// this.openShow = true; // 未开发的弹框
|
||||
// }
|
||||
this.loadData();
|
||||
},
|
||||
jumpOrderInfo(item) {
|
||||
uni.navigateTo({
|
||||
@@ -800,6 +831,7 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.after-sales-popup {
|
||||
height: 400px !important;
|
||||
|
||||
.after-sales-title {
|
||||
font-size: 28rpx;
|
||||
color: #71737c;
|
||||
@@ -1034,6 +1066,7 @@ export default {
|
||||
background: transparent;
|
||||
z-index: 100;
|
||||
box-shadow: 0rpx -4rpx 12rpx 0rpx rgba(0, 0, 0, 0.06);
|
||||
|
||||
.cancel_show_button {
|
||||
position: initial;
|
||||
width: 94%;
|
||||
|
||||
Reference in New Issue
Block a user