|
@@ -1397,7 +1397,7 @@ class Beihuogl extends Start_Controller {
|
|
|
$start = ($page - 1)*$perpage;
|
|
$start = ($page - 1)*$perpage;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $list = $this->bhdcd->find_all($where,"id,bh_no,dcd_no,drd_no,status,jm,num,kw,create_time,rk_time",$order_str,$start,$perpage);
|
|
|
|
|
|
|
+ $list = $this->bhdcd->find_all($where,"id,bh_no,dcd_no,drd_no,status,jm,num,kw,create_time,rk_time,is_rk",$order_str,$start,$perpage);
|
|
|
|
|
|
|
|
if(empty($list)){
|
|
if(empty($list)){
|
|
|
$rows = array('total'=>0,'over'=>1,'pagenum'=>0,'rows'=>([]));
|
|
$rows = array('total'=>0,'over'=>1,'pagenum'=>0,'rows'=>([]));
|
|
@@ -1410,7 +1410,17 @@ class Beihuogl extends Start_Controller {
|
|
|
$list[$k]['drd_no'] = empty($v['drd_no'])?"":$v['drd_no'];
|
|
$list[$k]['drd_no'] = empty($v['drd_no'])?"":$v['drd_no'];
|
|
|
$list[$k]['kw'] = empty($v['kw'])?"":$v['kw'];
|
|
$list[$k]['kw'] = empty($v['kw'])?"":$v['kw'];
|
|
|
$list[$k]['create_time'] = empty($v['create_time'])?"":date("Y-m-d",$v['create_time']);
|
|
$list[$k]['create_time'] = empty($v['create_time'])?"":date("Y-m-d",$v['create_time']);
|
|
|
- $list[$k]['rk_time'] = empty($v['rk_time'])?"": "<a href='javascript:void(0)' style='margin-right:4px;color: #fff;background-color:#D2691E;padding:4px 10px;border-radius:5px;font-size:15px' onclick='dybq(this)' data-id='".$v['id']."' data-num='".$v['num']."'>打印标签</a>";
|
|
|
|
|
|
|
+
|
|
|
|
|
+ $str = "";
|
|
|
|
|
+ if($v['is_rk'] == 0){
|
|
|
|
|
+ $str .= "<a href='javascript:void(0)' style='margin-right:4px;color: #fff;background-color:#DC143C;padding:4px 8px;border-radius:5px;font-size:13px' onclick='dcdjzrk(this)' data-id='".$v['id']."' data-num='".$v['num']."'>禁止入库</a>";
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(!empty($v['rk_time'])){
|
|
|
|
|
+ $str .= "<a href='javascript:void(0)' style='margin-right:4px;color: #fff;background-color:#D2691E;padding:4px 8px;border-radius:5px;font-size:13px' onclick='dybq(this)' data-id='".$v['id']."' >打印标签</a>";
|
|
|
|
|
+ }
|
|
|
|
|
+ $list[$k]['rk_time'] = $str;
|
|
|
|
|
+ unset($list[$k]['is_rk']);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1482,7 +1492,7 @@ class Beihuogl extends Start_Controller {
|
|
|
$data = $this->input->post(null,true);
|
|
$data = $this->input->post(null,true);
|
|
|
$dcd_no = $data['dcd_no'];
|
|
$dcd_no = $data['dcd_no'];
|
|
|
$drd_no = $data['drd_no'];
|
|
$drd_no = $data['drd_no'];
|
|
|
- $list = $this->bhdcd->find_all("dcd_no = '".$dcd_no."' and drd_no = '".$drd_no."'");
|
|
|
|
|
|
|
+ $list = $this->bhdcd->find_all("dcd_no = '".$dcd_no."' and drd_no = '".$drd_no."' and is_rk = 0");
|
|
|
|
|
|
|
|
$whlabel_arr = [];
|
|
$whlabel_arr = [];
|
|
|
$time = time();
|
|
$time = time();
|
|
@@ -1510,7 +1520,7 @@ class Beihuogl extends Start_Controller {
|
|
|
$this->db->insert_batch('whlabel',$whlabel_arr);
|
|
$this->db->insert_batch('whlabel',$whlabel_arr);
|
|
|
$this->db->where('dcd_no',$dcd_no);
|
|
$this->db->where('dcd_no',$dcd_no);
|
|
|
$this->db->where('drd_no',$drd_no);
|
|
$this->db->where('drd_no',$drd_no);
|
|
|
- $this->db->update('bhdcd',['status'=>3,'rk_time'=>$time]);
|
|
|
|
|
|
|
+ $this->db->update('bhdcd',['status'=>3,'rk_time'=>$time,'is_rk'=>1]);
|
|
|
|
|
|
|
|
if($this->db->trans_status() === FALSE){
|
|
if($this->db->trans_status() === FALSE){
|
|
|
$this->db->trans_rollback();
|
|
$this->db->trans_rollback();
|
|
@@ -1710,4 +1720,20 @@ class Beihuogl extends Start_Controller {
|
|
|
echo json_encode(['success'=>false,'msg'=>'请求方式错误']);exit;
|
|
echo json_encode(['success'=>false,'msg'=>'请求方式错误']);exit;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ private function _dcdjzrk(){
|
|
|
|
|
+ if($this->input->method() === 'post'){
|
|
|
|
|
+ $id = $this->input->post('id',true);
|
|
|
|
|
+ $info = $this->bhdcd->read($id);
|
|
|
|
|
+ if($info['is_rk'] == 0){
|
|
|
|
|
+ $this->bhdcd->save(['is_rk'=>1],$id);
|
|
|
|
|
+ echo json_encode(['success'=>true,'msg'=>'此条信息已禁止入库']);exit;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ echo json_encode(['success'=>true,'msg'=>'此条信息已禁止入库']);exit;
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ echo json_encode(['success'=>false,'msg'=>'请求方式错误']);exit;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|