|
@@ -38,7 +38,7 @@ class OrderDetailService extends CrudService {
|
|
|
const { customer, address, goods: shopGoods, no, status, buy_time, pay, total_detail: otd } = order;
|
|
|
if (status === '0') throw new BusinessError(ErrorCode.DATA_INVALID, '订单未支付');
|
|
|
const orderDetailData = { customer, address, order: order_id, buy_time, pay_time: _.get(pay, 'pay_time'), status };
|
|
|
- const shopTotals = this.ctx.service.util.order.shopMoneyDetail(order);
|
|
|
+ const shopMoneyDetail = this.ctx.service.util.order.shopMoneyDetail(order);
|
|
|
// 分订单计数器
|
|
|
let noTimes = 1;
|
|
|
for (const s of shopGoods) {
|
|
@@ -46,7 +46,7 @@ class OrderDetailService extends CrudService {
|
|
|
const remarks = _.get(s, 'remarks');
|
|
|
const goodsList = _.get(s, 'goods', []);
|
|
|
const detailNo = `${no}-${noTimes}`;
|
|
|
- const total_detail = _.get(shopTotals, shop, 0);
|
|
|
+ const total_detail = shopMoneyDetail;
|
|
|
// 优惠部分分割
|
|
|
if (_.get(otd, 'discount_detail')) {
|
|
|
// 如果有优惠部分,那就得找,优惠里面有没有对应的商品规格
|