|
@@ -125,6 +125,10 @@ class Boss extends Start_Controller {
|
|
|
$this->data['excelusernum'] = $setting['excelusernum'];
|
|
|
$this->data['exceljmnum'] = $setting['exceljmnum'];
|
|
|
$this->data['sctime'] = $setting['sctime'];
|
|
|
+
|
|
|
+ $wh = $this->warehouse->find_all('1=1','id,title');
|
|
|
+
|
|
|
+ $this->data['wh'] = $wh;
|
|
|
$this->_Template('boss_qt',$this->data);
|
|
|
}
|
|
|
public function _out($arg_array)
|
|
@@ -1064,10 +1068,14 @@ class Boss extends Start_Controller {
|
|
|
$category = $this->input->get('category',true);
|
|
|
$shop = $this->input->get('shop',true);
|
|
|
$density = $this->input->get('density',true);
|
|
|
+ $warehouse = $this->input->get('warehouse',true);
|
|
|
$time = $this->input->get('time',true);
|
|
|
$timetk = strtotime($timetk);
|
|
|
$timetj = strtotime($timetj);
|
|
|
$where = "";
|
|
|
+ if($warehouse){
|
|
|
+ $where .= " type = ".$warehouse." ";
|
|
|
+ }
|
|
|
if($category)
|
|
|
{
|
|
|
$where .= "fpdata like '%-".$category."-%' and ";
|
|
@@ -1104,11 +1112,13 @@ class Boss extends Start_Controller {
|
|
|
{
|
|
|
$where .= "fpdata like '%-".$lacetype."-%' and ";
|
|
|
}
|
|
|
- $dataa = $this->fullorder->find_all($where.$time." > '$timetk' and ".$time." < '$timetj'",'fpdata,number,whlabel','id desc');
|
|
|
- $datab = $this->fullordersmt->find_all($where.$time." > '$timetk' and ".$time." < '$timetj' and shop != '9'",'fpdata,number,whlabel','id desc');
|
|
|
- $datac = $this->fullordertt->find_all($where.$time." > '$timetk' and ".$time." < '$timetj'",'fpdata,number,whlabel','id desc');
|
|
|
+ $dataa = $this->fullorder->find_all($where.$time." > '$timetk' and ".$time." < '$timetj'",'fpdata,number,whlabel,type','id desc');
|
|
|
+ $datab = $this->fullordersmt->find_all($where.$time." > '$timetk' and ".$time." < '$timetj' and shop != '9'",'fpdata,number,whlabel,type','id desc');
|
|
|
+ $datac = $this->fullordertt->find_all($where.$time." > '$timetk' and ".$time." < '$timetj'",'fpdata,number,whlabel,type','id desc');
|
|
|
$data = array_merge($dataa,$datab,$datac);
|
|
|
$sp = array();$cs = array();
|
|
|
+ $warehouses = $this->warehouse->find_all('1=1','id,title');
|
|
|
+ $warehouses = array_column($warehouses,'title','id');
|
|
|
foreach ($data as $val)
|
|
|
{
|
|
|
$f = explode(';',trim($val['fpdata'],';'));
|
|
@@ -1228,6 +1238,7 @@ class Boss extends Start_Controller {
|
|
|
$whs = (isset($wsku[0]['sku']))?$wsku[0]['sku']:'';
|
|
|
$sp[$title[1]] = array('t'=>$title[1],'z'=>$zh,'w'=>$whs,'j'=>$jm,'n'=>$title[2]);
|
|
|
}
|
|
|
+ $sp[$title[1]]['warehouse'] = isset($warehouses[$val['type']])?$warehouses[$val['type']]:'仓库异常';
|
|
|
}
|
|
|
}
|
|
|
$sp = array_values($sp);
|
|
@@ -1239,6 +1250,7 @@ class Boss extends Start_Controller {
|
|
|
<td>SKU</td>
|
|
|
<td>用友料号</td>
|
|
|
<td>数量</td>
|
|
|
+ <td>仓库</td>
|
|
|
</tr>
|
|
|
</table>";
|
|
|
$filename = $title.".xls";
|