|
@@ -43,6 +43,7 @@ class Whlabel extends Start_Controller
|
|
|
$this->load->_model("Model_logic_order","logic_order");
|
|
$this->load->_model("Model_logic_order","logic_order");
|
|
|
$this->load->_model("Model_logic_ding","logic_ding");
|
|
$this->load->_model("Model_logic_ding","logic_ding");
|
|
|
$this->load->_model("Model_logic_u9tools","logic_u9tools");
|
|
$this->load->_model("Model_logic_u9tools","logic_u9tools");
|
|
|
|
|
+ $this->load->_model("Model_whlabelscanlog","whlabelscanlog");
|
|
|
}
|
|
}
|
|
|
//定义方法的调用规则 获取URI第二段值
|
|
//定义方法的调用规则 获取URI第二段值
|
|
|
public function _remap($arg, $arg_array)
|
|
public function _remap($arg, $arg_array)
|
|
@@ -6334,7 +6335,7 @@ class Whlabel extends Start_Controller
|
|
|
$post['details'] = $rk['details'];
|
|
$post['details'] = $rk['details'];
|
|
|
$post['cpid'] = $rk['cpid'];
|
|
$post['cpid'] = $rk['cpid'];
|
|
|
$post['cpbz'] = $rk['cpbz'];
|
|
$post['cpbz'] = $rk['cpbz'];
|
|
|
- //$post['rktype'] = $rktype;
|
|
|
|
|
|
|
+ $post['rktype'] = $rktype;
|
|
|
$warehouse = $this->warehouse->read($rk['warehouse']);
|
|
$warehouse = $this->warehouse->read($rk['warehouse']);
|
|
|
if ($warehouse['bdck'] == '') {
|
|
if ($warehouse['bdck'] == '') {
|
|
|
echo json_encode(array('msg' => '此仓库没有设置现货,无法入库!', 'c' => 0, 'success' => false));
|
|
echo json_encode(array('msg' => '此仓库没有设置现货,无法入库!', 'c' => 0, 'success' => false));
|
|
@@ -6379,6 +6380,19 @@ class Whlabel extends Start_Controller
|
|
|
echo json_encode(array('msg'=>'目前非特殊仓不能入库!','success'=>true));exit;
|
|
echo json_encode(array('msg'=>'目前非特殊仓不能入库!','success'=>true));exit;
|
|
|
}
|
|
}
|
|
|
**/
|
|
**/
|
|
|
|
|
+ $this->whlabelscanlog->insert([
|
|
|
|
|
+ 'shop'=>$rk['shop'],
|
|
|
|
|
+ 'type'=>1,
|
|
|
|
|
+ 'purchase'=>$rk['purchase'],
|
|
|
|
|
+ 'sku'=>$rk['sku'],
|
|
|
|
|
+ 'features'=>$rk['features'],
|
|
|
|
|
+ 'title'=>$rk['title'],
|
|
|
|
|
+ 'label'=>$rk['label'],
|
|
|
|
|
+ 'warehouse'=>$rk['warehouse'],
|
|
|
|
|
+ 'wlid'=>$rk['id'],
|
|
|
|
|
+ 'num'=>$num,
|
|
|
|
|
+ 'addtime'=>time()
|
|
|
|
|
+ ]);
|
|
|
if ($j == $num) {
|
|
if ($j == $num) {
|
|
|
echo json_encode(array('msg' => '入库成功!', 'success' => true));
|
|
echo json_encode(array('msg' => '入库成功!', 'success' => true));
|
|
|
exit;
|
|
exit;
|
|
@@ -6587,9 +6601,9 @@ class Whlabel extends Start_Controller
|
|
|
}
|
|
}
|
|
|
$xzck = ($label['warehouse'] == '12') ? 'specialstock' : 'whlabel';
|
|
$xzck = ($label['warehouse'] == '12') ? 'specialstock' : 'whlabel';
|
|
|
if (stripos($label['features'], '-126-') !== false) {
|
|
if (stripos($label['features'], '-126-') !== false) {
|
|
|
- $ck = $this->$xzck->find_all("state = '0' and shop = '" . $label['shop'] . "' and number = '" . $label['number'] . "' and warehouse = '" . $label['warehouse'] . "' and zd = ''");
|
|
|
|
|
|
|
+ $ck = $this->$xzck->find_all("state = '0' and shop = '" . $label['shop'] . "' and number = '" . $label['number'] . "' and warehouse = '" . $label['warehouse'] . "' and ( zd = '' or zd is null )");
|
|
|
} else {
|
|
} else {
|
|
|
- $ck = $this->$xzck->find_all("state = '0' and shop = '" . $label['shop'] . "' and number = '" . $label['number'] . "' and warehouse = '" . $label['warehouse'] . "' and purchase = '" . $label['purchase'] . "' and zd = ''");
|
|
|
|
|
|
|
+ $ck = $this->$xzck->find_all("state = '0' and shop = '" . $label['shop'] . "' and number = '" . $label['number'] . "' and warehouse = '" . $label['warehouse'] . "' and purchase = '" . $label['purchase'] . "' and ( zd = '' or zd is null ) ");
|
|
|
}
|
|
}
|
|
|
$j = 0;
|
|
$j = 0;
|
|
|
if (count($ck) >= $num) {
|
|
if (count($ck) >= $num) {
|
|
@@ -6599,6 +6613,20 @@ class Whlabel extends Start_Controller
|
|
|
$j++;
|
|
$j++;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ $this->whlabelscanlog->insert([
|
|
|
|
|
+ 'shop'=>$label['shop'],
|
|
|
|
|
+ 'type'=>2,
|
|
|
|
|
+ 'purchase'=>$label['purchase'],
|
|
|
|
|
+ 'sku'=>$label['sku'],
|
|
|
|
|
+ 'features'=>$label['features'],
|
|
|
|
|
+ 'title'=>$label['title'],
|
|
|
|
|
+ 'label'=>$label['label'],
|
|
|
|
|
+ 'warehouse'=>$label['warehouse'],
|
|
|
|
|
+ 'wlid'=>$label['id'],
|
|
|
|
|
+ 'num'=>$num,
|
|
|
|
|
+ 'addtime'=>time()
|
|
|
|
|
+ ]);
|
|
|
if ($j == $num) {
|
|
if ($j == $num) {
|
|
|
echo json_encode(array('msg' => '出库成功!', 'success' => true));
|
|
echo json_encode(array('msg' => '出库成功!', 'success' => true));
|
|
|
exit;
|
|
exit;
|