|
@@ -1436,241 +1436,241 @@ class Warehouse extends Start_Controller {
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
- if(stripos($cp,'-73-') !== false) //200% 250%
|
|
|
|
|
|
|
+ if(stripos($cp,'-73-') !== false) //200% 250%
|
|
|
|
|
+ {
|
|
|
|
|
+ $gpp2 = str_replace('-73-','-74-',$features);
|
|
|
|
|
+ $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp2' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
+ if($ccxh >= $num[1])
|
|
|
{
|
|
{
|
|
|
- $gpp2 = str_replace('-73-','-74-',$features);
|
|
|
|
|
- $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp2' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
- if($ccxh >= $num[1])
|
|
|
|
|
- {
|
|
|
|
|
- $goods_list[$num[0]][] = $v['title']."- 250%密度有货";
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ $goods_list[$num[0]][] = $v['title']."- 250%密度有货";
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- //HD相互提醒
|
|
|
|
|
- if(stripos($cp,'-146-') !== false || stripos($cp,'-331-') !== false) //13*4 HD13*4
|
|
|
|
|
|
|
+ //HD相互提醒
|
|
|
|
|
+ if(stripos($cp,'-146-') !== false || stripos($cp,'-331-') !== false) //13*4 HD13*4
|
|
|
|
|
+ {
|
|
|
|
|
+ if(stripos($cp,'-146-') !== false)
|
|
|
{
|
|
{
|
|
|
- if(stripos($cp,'-146-') !== false)
|
|
|
|
|
|
|
+ $gpp = str_replace('-146-','-331-',$features);
|
|
|
|
|
+ $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
+ if($ccxh >= $num[1])
|
|
|
{
|
|
{
|
|
|
- $gpp = str_replace('-146-','-331-',$features);
|
|
|
|
|
- $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
- if($ccxh >= $num[1])
|
|
|
|
|
- {
|
|
|
|
|
- $goods_list[$num[0]][] = $v['title']."- HD13*4有货";
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ $goods_list[$num[0]][] = $v['title']."- HD13*4有货";
|
|
|
}
|
|
}
|
|
|
- else if(stripos($cp,'-331-') !== false)
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ else if(stripos($cp,'-331-') !== false)
|
|
|
|
|
+ {
|
|
|
|
|
+ $gpp = str_replace('-331-','-146-',$features);
|
|
|
|
|
+ $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
+ if($ccxh >= $num[1])
|
|
|
{
|
|
{
|
|
|
- $gpp = str_replace('-331-','-146-',$features);
|
|
|
|
|
- $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
- if($ccxh >= $num[1])
|
|
|
|
|
- {
|
|
|
|
|
- $goods_list[$num[0]][] = $v['title']."- 13*4有货";
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ $goods_list[$num[0]][] = $v['title']."- 13*4有货";
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if(stripos($cp,'-322-') !== false || stripos($cp,'-341-') !== false)//13*6 HD13*6
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ if(stripos($cp,'-322-') !== false || stripos($cp,'-341-') !== false)//13*6 HD13*6
|
|
|
|
|
+ {
|
|
|
|
|
+ if(stripos($cp,'-322-') !== false)
|
|
|
{
|
|
{
|
|
|
- if(stripos($cp,'-322-') !== false)
|
|
|
|
|
|
|
+ $gpp = str_replace('-322-','-341-',$features);
|
|
|
|
|
+ $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
+ if($ccxh >= $num[1])
|
|
|
{
|
|
{
|
|
|
- $gpp = str_replace('-322-','-341-',$features);
|
|
|
|
|
- $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
- if($ccxh >= $num[1])
|
|
|
|
|
- {
|
|
|
|
|
- $goods_list[$num[0]][] = $v['title']."- HD13*6有货";
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ $goods_list[$num[0]][] = $v['title']."- HD13*6有货";
|
|
|
}
|
|
}
|
|
|
- else if(stripos($cp,'-341-') !== false)
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ else if(stripos($cp,'-341-') !== false)
|
|
|
|
|
+ {
|
|
|
|
|
+ $gpp = str_replace('-341-','-322-',$features);
|
|
|
|
|
+ $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
+ if($ccxh >= $num[1])
|
|
|
{
|
|
{
|
|
|
- $gpp = str_replace('-341-','-322-',$features);
|
|
|
|
|
- $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
- if($ccxh >= $num[1])
|
|
|
|
|
- {
|
|
|
|
|
- $goods_list[$num[0]][] = $v['title']."- 13*6有货";
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ $goods_list[$num[0]][] = $v['title']."- 13*6有货";
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if(stripos($cp,'-147-') !== false || stripos($cp,'-781-') !== false)//4*4 HD4*4
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ if(stripos($cp,'-147-') !== false || stripos($cp,'-781-') !== false)//4*4 HD4*4
|
|
|
|
|
+ {
|
|
|
|
|
+ if(stripos($cp,'-147-') !== false)
|
|
|
{
|
|
{
|
|
|
- if(stripos($cp,'-147-') !== false)
|
|
|
|
|
|
|
+ $gpp = str_replace('-147-','-781-',$features);
|
|
|
|
|
+ $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
+ if($ccxh >= $num[1])
|
|
|
{
|
|
{
|
|
|
- $gpp = str_replace('-147-','-781-',$features);
|
|
|
|
|
- $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
- if($ccxh >= $num[1])
|
|
|
|
|
- {
|
|
|
|
|
- $goods_list[$num[0]][] = $v['title']."- HD4*4有货";
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ $goods_list[$num[0]][] = $v['title']."- HD4*4有货";
|
|
|
}
|
|
}
|
|
|
- else if(stripos($cp,'-781-') !== false)
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ else if(stripos($cp,'-781-') !== false)
|
|
|
|
|
+ {
|
|
|
|
|
+ $gpp = str_replace('-781-','-147-',$features);
|
|
|
|
|
+ $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
+ if($ccxh >= $num[1])
|
|
|
{
|
|
{
|
|
|
- $gpp = str_replace('-781-','-147-',$features);
|
|
|
|
|
- $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
- if($ccxh >= $num[1])
|
|
|
|
|
- {
|
|
|
|
|
- $goods_list[$num[0]][] = $v['title']."- 4*4有货";
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ $goods_list[$num[0]][] = $v['title']."- 4*4有货";
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if(stripos($cp,'-297-') !== false || stripos($cp,'-540-') !== false)//5*5 HD5*5
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ if(stripos($cp,'-297-') !== false || stripos($cp,'-540-') !== false)//5*5 HD5*5
|
|
|
|
|
+ {
|
|
|
|
|
+ if(stripos($cp,'-297-') !== false)
|
|
|
{
|
|
{
|
|
|
- if(stripos($cp,'-297-') !== false)
|
|
|
|
|
|
|
+ $gpp = str_replace('-297-','-540-',$features);
|
|
|
|
|
+ $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
+ if($ccxh >= $num[1])
|
|
|
{
|
|
{
|
|
|
- $gpp = str_replace('-297-','-540-',$features);
|
|
|
|
|
- $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
- if($ccxh >= $num[1])
|
|
|
|
|
- {
|
|
|
|
|
- $goods_list[$num[0]][] = $v['title']."- HD5*5有货";
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ $goods_list[$num[0]][] = $v['title']."- HD5*5有货";
|
|
|
}
|
|
}
|
|
|
- else if(stripos($cp,'-540-') !== false)
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ else if(stripos($cp,'-540-') !== false)
|
|
|
|
|
+ {
|
|
|
|
|
+ $gpp = str_replace('-540-','-297-',$features);
|
|
|
|
|
+ $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
+ if($ccxh >= $num[1])
|
|
|
{
|
|
{
|
|
|
- $gpp = str_replace('-540-','-297-',$features);
|
|
|
|
|
- $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
- if($ccxh >= $num[1])
|
|
|
|
|
- {
|
|
|
|
|
- $goods_list[$num[0]][] = $v['title']."- 5*5有货";
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ $goods_list[$num[0]][] = $v['title']."- 5*5有货";
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- if(stripos($cp,'-298-') !== false || stripos($cp,'-370-') !== false)//6*6 HD6*6
|
|
|
|
|
|
|
+ if(stripos($cp,'-298-') !== false || stripos($cp,'-370-') !== false)//6*6 HD6*6
|
|
|
|
|
+ {
|
|
|
|
|
+ if(stripos($cp,'-298-') !== false)
|
|
|
{
|
|
{
|
|
|
- if(stripos($cp,'-298-') !== false)
|
|
|
|
|
|
|
+ $gpp = str_replace('-298-','-370-',$features);
|
|
|
|
|
+ $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
+ if($ccxh >= $num[1])
|
|
|
{
|
|
{
|
|
|
- $gpp = str_replace('-298-','-370-',$features);
|
|
|
|
|
- $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
- if($ccxh >= $num[1])
|
|
|
|
|
- {
|
|
|
|
|
- $goods_list[$num[0]][] = $v['title']."- HD6*6有货";
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ $goods_list[$num[0]][] = $v['title']."- HD6*6有货";
|
|
|
}
|
|
}
|
|
|
- else if(stripos($cp,'-370-') !== false)
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ else if(stripos($cp,'-370-') !== false)
|
|
|
|
|
+ {
|
|
|
|
|
+ $gpp = str_replace('-370-','-298-',$features);
|
|
|
|
|
+ $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
+ if($ccxh >= $num[1])
|
|
|
{
|
|
{
|
|
|
- $gpp = str_replace('-370-','-298-',$features);
|
|
|
|
|
- $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
- if($ccxh >= $num[1])
|
|
|
|
|
- {
|
|
|
|
|
- $goods_list[$num[0]][] = $v['title']."- 6*6有货";
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ $goods_list[$num[0]][] = $v['title']."- 6*6有货";
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- //抽绳款 和非抽绳款的相互提醒 针对头套
|
|
|
|
|
- if(stripos($cp,'-128-') !== false){
|
|
|
|
|
- //如果是抽绳款 可以找下非抽绳的库存
|
|
|
|
|
- if(stripos($cp,'-2661-') !== false){
|
|
|
|
|
- $gpp = str_replace('-2661-','-',$features);
|
|
|
|
|
- $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
- if($ccxh >= $num[1])
|
|
|
|
|
- {
|
|
|
|
|
- $goods_list[$num[0]][] = $v['title']."- 非抽绳款有库存";
|
|
|
|
|
- }
|
|
|
|
|
- }else{
|
|
|
|
|
- $gpp = $features."2661-";
|
|
|
|
|
- $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
- if($ccxh >= $num[1])
|
|
|
|
|
- {
|
|
|
|
|
- $goods_list[$num[0]][] = $v['title']."- 抽绳款有库存";
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ //抽绳款 和非抽绳款的相互提醒 针对头套
|
|
|
|
|
+ if(stripos($cp,'-128-') !== false){
|
|
|
|
|
+ //如果是抽绳款 可以找下非抽绳的库存
|
|
|
|
|
+ if(stripos($cp,'-2661-') !== false){
|
|
|
|
|
+ $gpp = str_replace('-2661-','-',$features);
|
|
|
|
|
+ $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
+ if($ccxh >= $num[1])
|
|
|
|
|
+ {
|
|
|
|
|
+ $goods_list[$num[0]][] = $v['title']."- 非抽绳款有库存";
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 常规品 带MShaped字眼 带Upgraded MShaped(Lagos Hairline)字眼(M发际线升级版)
|
|
|
|
|
- // 2468 2608 这个是头套的 判断的
|
|
|
|
|
- if(stripos($cp,'-128-') !== false){
|
|
|
|
|
- $sku = trim($cp,'-');
|
|
|
|
|
- $sku = str_replace(',','-',$sku);
|
|
|
|
|
- $sku = str_replace('--','-',$sku);
|
|
|
|
|
- $tmp_arr = explode('-',$sku);
|
|
|
|
|
- $tmp_arr = $this->logic_zhlp->transferSku($tmp_arr);
|
|
|
|
|
- //判断是否 有50
|
|
|
|
|
- if(isset($tmp_arr[50])){
|
|
|
|
|
- $arr_no = $arr_2468 = $arr_2608 =$tmp_arr;
|
|
|
|
|
- unset($arr_no[50]);
|
|
|
|
|
- $arr_2468[50] = 2468;
|
|
|
|
|
- $arr_2608[50] = 2608;
|
|
|
|
|
- }else{
|
|
|
|
|
- $arr_no = $arr_2468 = $arr_2608 =$tmp_arr;
|
|
|
|
|
- $arr_2468[50] = 2468;
|
|
|
|
|
- $arr_2608[50] = 2608;
|
|
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $gpp = $features."2661-";
|
|
|
|
|
+ $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
+ if($ccxh >= $num[1])
|
|
|
|
|
+ {
|
|
|
|
|
+ $goods_list[$num[0]][] = $v['title']."- 抽绳款有库存";
|
|
|
}
|
|
}
|
|
|
- $res = $this->logic_zhlp->sortByClass($arr_no);
|
|
|
|
|
- $fianal_arr_no = $res['data'];
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- $res = $this->logic_zhlp->sortByClass($arr_2468);
|
|
|
|
|
- $fianal_arr_2468 = $res['data'];
|
|
|
|
|
- $res = $this->logic_zhlp->sortByClass($arr_2608);
|
|
|
|
|
- $fianal_arr_2608 = $res['data'];
|
|
|
|
|
- $final_size = $fianal_arr_no[14];
|
|
|
|
|
- unset($fianal_arr_no[14]);
|
|
|
|
|
- unset($fianal_arr_2468[14]);
|
|
|
|
|
- unset($fianal_arr_2608[14]);
|
|
|
|
|
- $final_str_no = $final_size.",-".implode("-",$fianal_arr_no)."-";
|
|
|
|
|
- $final_str_2468 = $final_size.",-".implode("-",$fianal_arr_2468)."-";
|
|
|
|
|
- $final_str_2608 = $final_size.",-".implode("-",$fianal_arr_2608)."-";
|
|
|
|
|
-
|
|
|
|
|
- $do_str_no = $this->logic_u9tools->getGoodFeatureAlone($final_str_no);
|
|
|
|
|
- $do_str_2468 = $this->logic_u9tools->getGoodFeatureAlone($final_str_2468);
|
|
|
|
|
- $do_str_2608 = $this->logic_u9tools->getGoodFeatureAlone($final_str_2608);
|
|
|
|
|
- //非M发际线/2468 M发际线/2608 M发际线升级版有货
|
|
|
|
|
- if(stripos($cp,'-2468-') !== false){
|
|
|
|
|
- $num_no = $this->whlabel->find_count("state = '0' and features = '$do_str_no' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");
|
|
|
|
|
- $num_2608 = $this->whlabel->find_count("state = '0' and features = '$do_str_2608' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");
|
|
|
|
|
- if($num_no > 0){
|
|
|
|
|
- $goods_list[$num[0]][] = $v['title']."- 非M发际线有货";
|
|
|
|
|
- }
|
|
|
|
|
- if($num_2608 > 0){
|
|
|
|
|
- $goods_list[$num[0]][] = $v['title']."- M发际线升级版有货";
|
|
|
|
|
- }
|
|
|
|
|
- }elseif(stripos($cp,'-2608-') !== false){
|
|
|
|
|
- $num_no = $this->whlabel->find_count("state = '0' and features = '$do_str_no' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");
|
|
|
|
|
- $num_2468 = $this->whlabel->find_count("state = '0' and features = '$do_str_2468' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");
|
|
|
|
|
- if($num_no > 0){
|
|
|
|
|
- $goods_list[$num[0]][] = $v['title']."- 非M发际线有货";
|
|
|
|
|
- }
|
|
|
|
|
- if($num_2468 > 0){
|
|
|
|
|
- $goods_list[$num[0]][] = $v['title']."- M发际线有货";
|
|
|
|
|
- }
|
|
|
|
|
- }else{
|
|
|
|
|
- $num_2608 = $this->whlabel->find_count("state = '0' and features = '$do_str_2608' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");
|
|
|
|
|
- $num_2468 = $this->whlabel->find_count("state = '0' and features = '$do_str_2468' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");
|
|
|
|
|
- if($num_2608 > 0){
|
|
|
|
|
- $goods_list[$num[0]][] = $v['title']."- M发际线升级版有货";
|
|
|
|
|
- }
|
|
|
|
|
- if($num_2468 > 0){
|
|
|
|
|
- $goods_list[$num[0]][] = $v['title']."- M发际线有货";
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 常规品 带MShaped字眼 带Upgraded MShaped(Lagos Hairline)字眼(M发际线升级版)
|
|
|
|
|
+ // 2468 2608 这个是头套的 判断的
|
|
|
|
|
+ if(stripos($cp,'-128-') !== false){
|
|
|
|
|
+ $sku = trim($cp,'-');
|
|
|
|
|
+ $sku = str_replace(',','-',$sku);
|
|
|
|
|
+ $sku = str_replace('--','-',$sku);
|
|
|
|
|
+ $tmp_arr = explode('-',$sku);
|
|
|
|
|
+ $tmp_arr = $this->logic_zhlp->transferSku($tmp_arr);
|
|
|
|
|
+ //判断是否 有50
|
|
|
|
|
+ if(isset($tmp_arr[50])){
|
|
|
|
|
+ $arr_no = $arr_2468 = $arr_2608 =$tmp_arr;
|
|
|
|
|
+ unset($arr_no[50]);
|
|
|
|
|
+ $arr_2468[50] = 2468;
|
|
|
|
|
+ $arr_2608[50] = 2608;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $arr_no = $arr_2468 = $arr_2608 =$tmp_arr;
|
|
|
|
|
+ $arr_2468[50] = 2468;
|
|
|
|
|
+ $arr_2608[50] = 2608;
|
|
|
}
|
|
}
|
|
|
|
|
+ $res = $this->logic_zhlp->sortByClass($arr_no);
|
|
|
|
|
+ $fianal_arr_no = $res['data'];
|
|
|
|
|
|
|
|
- if(stripos($cp,'-935-') !== false || stripos($cp,'-854-') !== false)//#P4/27/613 #P4/613
|
|
|
|
|
|
|
+ $res = $this->logic_zhlp->sortByClass($arr_2468);
|
|
|
|
|
+ $fianal_arr_2468 = $res['data'];
|
|
|
|
|
+ $res = $this->logic_zhlp->sortByClass($arr_2608);
|
|
|
|
|
+ $fianal_arr_2608 = $res['data'];
|
|
|
|
|
+ $final_size = $fianal_arr_no[14];
|
|
|
|
|
+ unset($fianal_arr_no[14]);
|
|
|
|
|
+ unset($fianal_arr_2468[14]);
|
|
|
|
|
+ unset($fianal_arr_2608[14]);
|
|
|
|
|
+ $final_str_no = $final_size.",-".implode("-",$fianal_arr_no)."-";
|
|
|
|
|
+ $final_str_2468 = $final_size.",-".implode("-",$fianal_arr_2468)."-";
|
|
|
|
|
+ $final_str_2608 = $final_size.",-".implode("-",$fianal_arr_2608)."-";
|
|
|
|
|
+
|
|
|
|
|
+ $do_str_no = $this->logic_u9tools->getGoodFeatureAlone($final_str_no);
|
|
|
|
|
+ $do_str_2468 = $this->logic_u9tools->getGoodFeatureAlone($final_str_2468);
|
|
|
|
|
+ $do_str_2608 = $this->logic_u9tools->getGoodFeatureAlone($final_str_2608);
|
|
|
|
|
+ //非M发际线/2468 M发际线/2608 M发际线升级版有货
|
|
|
|
|
+ if(stripos($cp,'-2468-') !== false){
|
|
|
|
|
+ $num_no = $this->whlabel->find_count("state = '0' and features = '$do_str_no' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");
|
|
|
|
|
+ $num_2608 = $this->whlabel->find_count("state = '0' and features = '$do_str_2608' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");
|
|
|
|
|
+ if($num_no > 0){
|
|
|
|
|
+ $goods_list[$num[0]][] = $v['title']."- 非M发际线有货";
|
|
|
|
|
+ }
|
|
|
|
|
+ if($num_2608 > 0){
|
|
|
|
|
+ $goods_list[$num[0]][] = $v['title']."- M发际线升级版有货";
|
|
|
|
|
+ }
|
|
|
|
|
+ }elseif(stripos($cp,'-2608-') !== false){
|
|
|
|
|
+ $num_no = $this->whlabel->find_count("state = '0' and features = '$do_str_no' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");
|
|
|
|
|
+ $num_2468 = $this->whlabel->find_count("state = '0' and features = '$do_str_2468' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");
|
|
|
|
|
+ if($num_no > 0){
|
|
|
|
|
+ $goods_list[$num[0]][] = $v['title']."- 非M发际线有货";
|
|
|
|
|
+ }
|
|
|
|
|
+ if($num_2468 > 0){
|
|
|
|
|
+ $goods_list[$num[0]][] = $v['title']."- M发际线有货";
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $num_2608 = $this->whlabel->find_count("state = '0' and features = '$do_str_2608' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");
|
|
|
|
|
+ $num_2468 = $this->whlabel->find_count("state = '0' and features = '$do_str_2468' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");
|
|
|
|
|
+ if($num_2608 > 0){
|
|
|
|
|
+ $goods_list[$num[0]][] = $v['title']."- M发际线升级版有货";
|
|
|
|
|
+ }
|
|
|
|
|
+ if($num_2468 > 0){
|
|
|
|
|
+ $goods_list[$num[0]][] = $v['title']."- M发际线有货";
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(stripos($cp,'-935-') !== false || stripos($cp,'-854-') !== false)//#P4/27/613 #P4/613
|
|
|
|
|
+ {
|
|
|
|
|
+ if(stripos($cp,'-935-') !== false)
|
|
|
{
|
|
{
|
|
|
- if(stripos($cp,'-935-') !== false)
|
|
|
|
|
|
|
+ $gpp = str_replace('-935-','-854-',$features);
|
|
|
|
|
+ $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
+ if($ccxh >= $num[1])
|
|
|
{
|
|
{
|
|
|
- $gpp = str_replace('-935-','-854-',$features);
|
|
|
|
|
- $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
- if($ccxh >= $num[1])
|
|
|
|
|
- {
|
|
|
|
|
- $goods_list[$num[0]][] = $v['title']."- #P4/613";
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ $goods_list[$num[0]][] = $v['title']."- #P4/613";
|
|
|
}
|
|
}
|
|
|
- else if(stripos($cp,'-854-') !== false)
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ else if(stripos($cp,'-854-') !== false)
|
|
|
|
|
+ {
|
|
|
|
|
+ $gpp = str_replace('-854-','-935-',$features);
|
|
|
|
|
+ $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
+ if($ccxh >= $num[1])
|
|
|
{
|
|
{
|
|
|
- $gpp = str_replace('-854-','-935-',$features);
|
|
|
|
|
- $ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
|
|
|
|
|
- if($ccxh >= $num[1])
|
|
|
|
|
- {
|
|
|
|
|
- $goods_list[$num[0]][] = $v['title']."- #P4/27/613";
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ $goods_list[$num[0]][] = $v['title']."- #P4/27/613";
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- $transportlist = $this->whlabeltransport->find_all("features = '".$features."' and cz = 0 and warehouse = '".$v['id']."'");
|
|
|
|
|
- if(count($transportlist) > 0)
|
|
|
|
|
- {
|
|
|
|
|
- $transportItem = $transportlist[0];
|
|
|
|
|
- $goods_list[$num[0]][] = $transportItem['sku'] ." 在途库存: <b>" . $transportItem['num'] . " </b> 预达时间: ".date("Y-m-d",$transportItem['stime']). " <br/> 备注 : " . $transportItem['text'];
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ $transportlist = $this->whlabeltransport->find_all("features = '".$features."' and cz = 0 and warehouse = '".$v['id']."'");
|
|
|
|
|
+ if(count($transportlist) > 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ $transportItem = $transportlist[0];
|
|
|
|
|
+ $goods_list[$num[0]][] = $transportItem['sku'] ." 在途库存: <b>" . $transportItem['num'] . " </b> 预达时间: ".date("Y-m-d",$transportItem['stime']). " <br/> 备注 : " . $transportItem['text'];
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
$str = implode(',',$goods_list[$num[0]]);
|
|
$str = implode(',',$goods_list[$num[0]]);
|
|
|
$kxw .= $str.';';
|
|
$kxw .= $str.';';
|