...
|
...
|
@@ -175,8 +175,7 @@ const getOrderRefund = (orderCode, uid) => { |
|
|
if (result.data) {
|
|
|
let goods = [];
|
|
|
let returnReason = result.data.return_reason,
|
|
|
remarks = _.split(_.get(result, 'data.special_notice.remark', ''), ' ', 2), // 使用3个空格拆分
|
|
|
amount = 0;
|
|
|
remarks = _.split(_.get(result, 'data.special_notice.remark', ''), ' ', 2); // 使用3个空格拆分
|
|
|
|
|
|
|
|
|
_.forEach(_.get(result, 'data.goods_list', []), value => {
|
...
|
...
|
@@ -187,7 +186,8 @@ const getOrderRefund = (orderCode, uid) => { |
|
|
name: value.product_name,
|
|
|
color: value.factory_color_name,
|
|
|
size: value.size_name,
|
|
|
price: value.last_price,
|
|
|
lastPrice: value.last_price,
|
|
|
price: value.real_pay_price,
|
|
|
skn: value.product_skn,
|
|
|
skc: value.product_skc,
|
|
|
sku: value.product_sku,
|
...
|
...
|
@@ -196,8 +196,6 @@ const getOrderRefund = (orderCode, uid) => { |
|
|
reason: returnReason
|
|
|
};
|
|
|
|
|
|
amount += parseInt(value.last_price, 10);
|
|
|
|
|
|
// tar note 为每个特殊商品都添加标识
|
|
|
if (value.is_limit_skn === 'Y') {
|
|
|
item.specialNoticeBo = {
|
...
|
...
|
@@ -228,14 +226,7 @@ const getOrderRefund = (orderCode, uid) => { |
|
|
|
|
|
Object.assign(resData, {
|
|
|
goods: goods,
|
|
|
orderCode: orderCode,
|
|
|
|
|
|
// 计算相关支付细节
|
|
|
amount: amount - _.get(result, 'data.yoho_coin_num', 0) -
|
|
|
_.get(result, 'data.coupon_amount', 0),
|
|
|
yohoCoin: result.data.yoho_coin_num,
|
|
|
coupon: result.data.coupon_amount,
|
|
|
cash: amount
|
|
|
orderCode: orderCode
|
|
|
});
|
|
|
|
|
|
_.forEach(result.data.return_amount_mode, (val, key) => {
|
...
|
...
|
@@ -528,7 +519,8 @@ const getOrderExchange = (orderCode, uid) => { |
|
|
name: value.product_name,
|
|
|
color: value.color_name,
|
|
|
size: value.size_name,
|
|
|
price: value.last_price,
|
|
|
lastPrice: value.last_price,
|
|
|
price: value.real_pay_price,
|
|
|
skn: value.product_skn,
|
|
|
skc: value.product_skc,
|
|
|
sku: value.product_sku,
|
...
|
...
|
@@ -647,6 +639,10 @@ const setExpressNumber = (id, expressId, expressNumber, uid, expressCompany, isC |
|
|
});
|
|
|
};
|
|
|
|
|
|
const refundCompute = (uid, orderCode, goods) => {
|
|
|
return returnAPI.refundComputeAsync(uid, orderCode, goods);
|
|
|
};
|
|
|
|
|
|
module.exports = {
|
|
|
getReturnsList, // 我的订单,退换货列表
|
|
|
getOrderRefund, // 我的订单,申请退货
|
...
|
...
|
@@ -658,5 +654,6 @@ module.exports = { |
|
|
getDelivery, // 获取换货方式
|
|
|
getCancelRefund, // 取消退货申请
|
|
|
getCancelChange, // 取消换货申请
|
|
|
setExpressNumber // 设置快递
|
|
|
setExpressNumber, // 设置快递
|
|
|
refundCompute, // 退货结算
|
|
|
}; |
...
|
...
|
|