|
@@ -409,7 +409,7 @@ class OrderOutChild extends Base
|
|
|
|
|
|
$order_out = Db::name('order_out')
|
|
|
->where(['is_del' => 0, 'outCode' => array_unique(array_column($child, 'outCode'))])
|
|
|
- ->column('id,send_num,send_status,0 already_send_num,status,apply_id', 'outCode');
|
|
|
+ ->column('id,send_num,send_status,0 already_send_num,post_name,post_code,post_fee,status,apply_id', 'outCode');
|
|
|
|
|
|
$sale = Db::name('sale')
|
|
|
->where(['is_del' => 0, 'orderCode' => array_unique(array_column($child, 'orderCode'))])
|
|
@@ -516,12 +516,25 @@ class OrderOutChild extends Base
|
|
|
]);
|
|
|
|
|
|
$order_out[$child[$value['outChildCode']]['outCode']]['already_send_num'] += $child[$value['outChildCode']]['num'];
|
|
|
-
|
|
|
+ $order_out[$child[$value['outChildCode']]['outCode']]['already_send_num'] += $child[$value['outChildCode']]['num'];
|
|
|
+ $order_out[$child[$value['outChildCode']]['outCode']]['already_send_num'] += $child[$value['outChildCode']]['num'];
|
|
|
+ if($order_out[$child[$value['outChildCode']]['outCode']]['post_name']==''||$order_out[$child[$value['outChildCode']]['outCode']]['post_code']=='' ){
|
|
|
+ $order_out[$child[$value['outChildCode']]['outCode']]['post_name']= $value['post_name'];
|
|
|
+ $order_out[$child[$value['outChildCode']]['outCode']]['post_code']= $value['post_code'];
|
|
|
+ $order_out[$child[$value['outChildCode']]['outCode']]['post_fee']= $value['post_fee'];
|
|
|
+ }
|
|
|
//发货单
|
|
|
//send_status 3部分发货,4全部发货
|
|
|
Db::name('order_out')
|
|
|
->where(['id' => $order_out[$child[$value['outChildCode']]['outCode']]['id']])
|
|
|
- ->update(['send_status' => $order_out[$child[$value['outChildCode']]['outCode']]['already_send_num'] >= $order_out[$child[$value['outChildCode']]['outCode']]['send_num'] ? 4 : 3, 'status' => 2, 'updatetime' => $date]);
|
|
|
+ ->update([
|
|
|
+ 'send_status' => $order_out[$child[$value['outChildCode']]['outCode']]['already_send_num'] >= $order_out[$child[$value['outChildCode']]['outCode']]['send_num'] ? 4 : 3,
|
|
|
+ 'status' => 2,
|
|
|
+ 'post_name' => $order_out[$child[$value['outChildCode']]['outCode']]['post_name'],
|
|
|
+ 'post_code' => $order_out[$child[$value['outChildCode']]['outCode']]['post_code'],
|
|
|
+ 'post_fee' => $order_out[$child[$value['outChildCode']]['outCode']]['post_fee'],
|
|
|
+ 'updatetime' => $date
|
|
|
+ ]);
|
|
|
|
|
|
$sale[$child[$value['outChildCode']]['orderCode']]['send_num'] += $child[$value['outChildCode']]['num'];
|
|
|
$sale[$child[$value['outChildCode']]['orderCode']]['wsend_num'] -= $child[$value['outChildCode']]['num'];
|