|
|
@@ -961,7 +961,7 @@ class Beihuogl extends Start_Controller {
|
|
|
$str .= "</div>";
|
|
|
|
|
|
}
|
|
|
- if($v['ck_status'] == 1){
|
|
|
+ if($v['ck_status'] == 1 || $v['ck_status'] == 2){
|
|
|
$str .= "<div style='text-align:center;'>";
|
|
|
$str .= "<a href='javascript:void(0)' class='window' data-h='/beihuogl/makeu9scd/".$v['id']."' data-t='修改' style='margin-right:4px;color: #fff;background-color:#0099FF;padding:4px 10px;border-radius:5px;font-size:15px' >生成u9生产单</a>";
|
|
|
$str .= "</div>";
|
|
|
@@ -1104,9 +1104,15 @@ class Beihuogl extends Start_Controller {
|
|
|
echo json_encode(['success'=>false,'msg'=>'生成u9生产单失败']);exit;
|
|
|
}
|
|
|
if(($u9sc_status < $len) && ( $flag_status< $len) ){
|
|
|
+ $this->bhccwl->save([
|
|
|
+ 'ck_status'=>2,
|
|
|
+ ],$info['id']);
|
|
|
echo json_encode(['success'=>true,'msg'=>'生成u9生产单部分成功']);exit;
|
|
|
}
|
|
|
if($u9sc_status == $len){
|
|
|
+ $this->bhccwl->save([
|
|
|
+ 'ck_status'=>3,
|
|
|
+ ],$info['id']);
|
|
|
echo json_encode(['success'=>true,'msg'=>'生成u9生产单成功']);exit;
|
|
|
}
|
|
|
echo json_encode(['success'=>false,'msg'=>'代码异常']);exit;
|
|
|
@@ -1178,7 +1184,7 @@ class Beihuogl extends Start_Controller {
|
|
|
'is_u9sc'=>1,
|
|
|
'u9sc_no'=>$res[0]['Data'][0]['m_code'],
|
|
|
],$bhsq_info['id']);
|
|
|
- $tmp_list = $this->bhsq->find_all("bh_no = '".$info['bh_no']."' and is_u9sc = 0 ");
|
|
|
+ $tmp_list = $this->bhsq->find_all("bh_no = '".$bh_no."' and is_u9sc = 0 ");
|
|
|
if(empty($tmp_list)){
|
|
|
$tmp_status = 3;
|
|
|
}else{
|
|
|
@@ -1189,8 +1195,13 @@ class Beihuogl extends Start_Controller {
|
|
|
],$bhccwl_info['id']);
|
|
|
echo json_encode(['success'=>true,'msg'=>'生成u9生产单成功']);exit;
|
|
|
}else{
|
|
|
-
|
|
|
+ $this->bhsq->save([
|
|
|
+ 'u9sc_remark'=>$res[0]['Data'][0]['m_errorMsg'],
|
|
|
+ ],$bhsq_info['id']);
|
|
|
+ echo json_encode(['success'=>false,'msg'=>$res[0]['Data'][0]["m_errorMsg"]]);exit;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
|
|
|
}else{
|
|
|
exit('No direct script access allowed');
|
|
|
@@ -1207,12 +1218,14 @@ class Beihuogl extends Start_Controller {
|
|
|
$shop_list = array_column($shop_list,'shopname','id');
|
|
|
$info = $this->bhccwl->read($id);
|
|
|
$list = $this->bhsq->find_all("bh_no = '".$info['bh_no']."' ");
|
|
|
+ $list_dcd = $this->bhdcd->find_all("bh_no = '".$info['bh_no']."' ");
|
|
|
foreach($list as $k=>$v){
|
|
|
$list[$k]['shop_id'] = isset($shop_list[$v['shop_id']])?$shop_list[$v['shop_id']]:"";
|
|
|
$list[$k]['drck_show'] = isset($drck_list[$v['drck']])?$drck_list[$v['drck']]:"";
|
|
|
}
|
|
|
$this->data['info'] = $info;
|
|
|
$this->data['list'] = $list;
|
|
|
+ $this->data['list_dcd'] = $list_dcd;
|
|
|
$this->_Template('beihuogl_showckbh',$this->data);
|
|
|
}
|
|
|
//仓库录入调出单
|