|
@@ -856,8 +856,8 @@ class DwyController extends BaseController
|
|
|
$v['use_qty'] = $v['qty'];
|
|
|
if (!isset($v['send_qty'])) $v['send_qty'] = 0;
|
|
|
foreach ($list as $kk => $vv) {
|
|
|
-
|
|
|
- if ($vv['num'] == 0) continue;
|
|
|
+ if(!isset($vv['restock_qty'])) $vv['restock_qty'] = 0;
|
|
|
+ if ($vv['num'] == 0 && $vv['restock_qty'] == 0) continue;
|
|
|
if ($v['material_code_show'] === $vv['title']) {
|
|
|
$v['restore_qty'] = isset($vv['restock_qty']) && $vv['restock_qty'] > 0 ? $vv['restock_qty'] : 0;
|
|
|
if (($v['qty'] - $v['send_qty']) > $vv['num']) {
|
|
@@ -886,7 +886,7 @@ class DwyController extends BaseController
|
|
|
//"process_title_two": "",
|
|
|
////花色2
|
|
|
//"color_two": "",
|
|
|
- if($p_total == 0) continue;
|
|
|
+ if($p_total == 0 && $vv['restock_qty'] <= 0) continue;
|
|
|
$key_arr = [
|
|
|
'product_code' => $vv['product_code'] ?? '',
|
|
|
'product_code_show' => $vv['product_code_show'] ?? '',
|
|
@@ -912,14 +912,16 @@ class DwyController extends BaseController
|
|
|
|
|
|
}
|
|
|
}
|
|
|
+// dd($data);die;
|
|
|
foreach ($data as $k=>$d){
|
|
|
- if($d['send_qty'] <= 0) unset($data[$k]);
|
|
|
+ if(empty($d['product_list'])) unset($data[$k]);
|
|
|
}
|
|
|
usort($data, function ($a,$b){
|
|
|
return str_replace('CK','',$a['box_code']) - str_replace('CK','',$b['box_code']);
|
|
|
});
|
|
|
// list($status,$msg) = DwyService::getInstance()->setLimitForBoxOut($param);
|
|
|
// if(! $status) return ['status' => '201', 'data' => [],'msg'=> $msg];
|
|
|
+ if(empty($data)) return ['status' => '201', 'data' => $data,'msg'=>'无商标需要申领'];
|
|
|
return ['status' => '200', 'data' => $data];
|
|
|
}
|
|
|
|