|
@@ -99,6 +99,8 @@ class AfterSaleService extends CrudService {
|
|
|
await this.toReturnCoupons(entity, update, this.tran);
|
|
|
// 3.修改订单状态
|
|
|
await this.refundOrder(entity, this.tran);
|
|
|
+ // 结束时间
|
|
|
+ update.end_time = moment().format('YYYY-MM-DD HH:mm:ss');
|
|
|
}
|
|
|
} else if (type === '3') {
|
|
|
// 换货,不需要退款
|
|
@@ -118,11 +120,13 @@ class AfterSaleService extends CrudService {
|
|
|
// 没有商品,只有拆分的订单号,用这个去退
|
|
|
refundInfo = await this.returnOrder(entity, this.tran);
|
|
|
update.status = '-4';
|
|
|
+ update.end_time = moment().format('YYYY-MM-DD HH:mm:ss');
|
|
|
} else if (type === '5') {
|
|
|
// 拒收: 退钱, 退货
|
|
|
// 如果状态不是完成,那就不退,只是数据修改
|
|
|
if (uStatus === '-5') {
|
|
|
refundInfo = await this.returnOrder(entity, this.tran);
|
|
|
+ update.end_time = moment().format('YYYY-MM-DD HH:mm:ss');
|
|
|
}
|
|
|
} else throw new BusinessError(ErrorCode.DATA_INVALID, '未知的售后类型,无法处理');
|
|
|
// 售后处理人的添加
|