|
|
@@ -171,12 +171,24 @@ class OrderClass extends BaseClass
|
|
|
}
|
|
|
$orderSn = $order['orderSn'];
|
|
|
$list = OrderItemClass::getOrderItem($orderSn);
|
|
|
+ $totalPrice = 0;
|
|
|
+ $totalBigNum = 0;
|
|
|
+ $totalSmallNum = 0;
|
|
|
+ $kind = 0;
|
|
|
if (!empty($list)) {
|
|
|
foreach ($list as $key => $val) {
|
|
|
$list[$key]['property'] = $val['rank'] . '级';
|
|
|
+ $price = $val['price'];
|
|
|
+ $totalPrice = stringUtil::calcAdd($totalPrice, $price);
|
|
|
+ $kind++;
|
|
|
+ $currentBigNum = $val['bigNum'];
|
|
|
+ $currentSmallNum = $val['smallNum'];
|
|
|
+ $totalBigNum = stringUtil::calcAdd($totalBigNum, $currentBigNum);
|
|
|
+ $totalSmallNum = stringUtil::calcAdd($totalSmallNum, $currentSmallNum);
|
|
|
}
|
|
|
}
|
|
|
- return $list;
|
|
|
+ $itemStat = ['kind' => $kind, 'bigNum' => $totalBigNum, 'smallNun' => $totalSmallNum, 'totalPrice' => $totalPrice];
|
|
|
+ return ['list' => $list, 'itemStat' => $itemStat];
|
|
|
}
|
|
|
|
|
|
//整合订单员工和供货商等信息 shish 2021.1.19
|
|
|
@@ -205,7 +217,9 @@ class OrderClass extends BaseClass
|
|
|
//显示进度条
|
|
|
$list[$key]['progress'] = self::getShowProgress($showProgress, $val);
|
|
|
//显示产品
|
|
|
- $list[$key]['product'] = self::getShowItem($showItem, $val);
|
|
|
+ $showItem = self::getShowItem($showItem, $val);
|
|
|
+ $list[$key]['product'] = $showItem['list'];
|
|
|
+ $list[$key]['productStat'] = $showItem['itemStat'];
|
|
|
}
|
|
|
return $list;
|
|
|
}
|