订单列表

parent a208ef3d
Showing with 8 additions and 3 deletions
...@@ -466,9 +466,9 @@ class OrderService ...@@ -466,9 +466,9 @@ class OrderService
$temp = []; $temp = [];
$return_amount_all = 0; $return_amount_all = 0;
foreach ($returnItems as $k=>$v){ foreach ($returnItems as $k=>$v){
$orderGoodsInfo = \Arr::get($orderItemsArr,$v["rec_id"]); $recId = $v["rec_id"];
$temp[] = [ $orderGoodsInfo = \Arr::get($orderItemsArr,$recId);
"no"=>$k+1, $temp[$recId] = [
"part_no"=>$orderGoodsInfo["goods_name"], // 型号名称 "part_no"=>$orderGoodsInfo["goods_name"], // 型号名称
"manufacturer"=>$orderGoodsInfo["brand_name"], // 品牌名称 "manufacturer"=>$orderGoodsInfo["brand_name"], // 品牌名称
"price_per_unit"=>$orderGoodsInfo["goods_price"], // 单价 "price_per_unit"=>$orderGoodsInfo["goods_price"], // 单价
...@@ -481,6 +481,11 @@ class OrderService ...@@ -481,6 +481,11 @@ class OrderService
]; ];
$return_amount_all += $v["return_amount"]; $return_amount_all += $v["return_amount"];
} }
$temp = array_values($temp);
foreach ($temp as $c=>&$a){
$a["no"] = $c+1;
}
return ["return_amount_all"=>$return_amount_all,"items"=>$temp]; return ["return_amount_all"=>$return_amount_all,"items"=>$temp];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment