|
@@ -118,6 +118,8 @@ class OrderController extends Controller
|
118
|
118
|
foreach($result as $k=>&$v){
|
119
|
119
|
//毛利 40%下
|
120
|
120
|
$v['pre_cost_flag'] = 0;
|
|
121
|
+ //是否需要转仓
|
|
122
|
+ $v['is_not_fx'] = 0;
|
121
|
123
|
//获取商品信息
|
122
|
124
|
$v['goods'] = '';
|
123
|
125
|
$goods = DB::table('order_goods_skus')->where('order_id', $v['id'])->where('is_del', 0)->get();
|
|
@@ -125,12 +127,16 @@ class OrderController extends Controller
|
125
|
127
|
$v['pre_cost'] = 0;
|
126
|
128
|
foreach($goods as $item){
|
127
|
129
|
$goods_name = Goods::where('id', $item->goods_id)->pluck('name');
|
128
|
|
- $goods_sku_info = GoodsSkus::select('propsName', 'is_weigh', 'referenceCost')->where('id', $item->sku_id)->first();
|
|
130
|
+ $goods_sku_info = GoodsSkus::select('propsName', 'is_weigh', 'referenceCost', 'is_not_fx')->where('id', $item->sku_id)->first();
|
129
|
131
|
if(!empty($goods_sku_info)){
|
130
|
132
|
$props_name = $goods_sku_info->propsName;
|
131
|
133
|
$is_weigh = $goods_sku_info->is_weigh;
|
132
|
134
|
$weigh_note = $is_weigh==1 ? '重量(斤)':'数量';
|
133
|
135
|
if(!$item->gift_id) $v['pre_cost'] += $goods_sku_info->referenceCost * $item->num;
|
|
136
|
+
|
|
137
|
+ if( $goods_sku_info->is_not_fx == 1 && $v['warehouse']==3 && $v['is_not_fx'] == 0 ){
|
|
138
|
+ $v['is_not_fx'] = 1;
|
|
139
|
+ }
|
134
|
140
|
}else{
|
135
|
141
|
$props_name = '';
|
136
|
142
|
$weigh_note = '数量';
|