|
@@ -83,6 +83,8 @@ class Beihuogl extends Start_Controller {
|
|
|
$this->_ccwlskucheck();
|
|
$this->_ccwlskucheck();
|
|
|
}elseif($arg == 'printlabel'){
|
|
}elseif($arg == 'printlabel'){
|
|
|
$this->_printlabel();
|
|
$this->_printlabel();
|
|
|
|
|
+ }elseif($arg == 'deldyapply'){
|
|
|
|
|
+ $this->_deldyapply();
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
@@ -96,6 +98,7 @@ class Beihuogl extends Start_Controller {
|
|
|
//备货申请单的列表
|
|
//备货申请单的列表
|
|
|
private function _dyapply(){
|
|
private function _dyapply(){
|
|
|
if($this->input->method() === 'post'){
|
|
if($this->input->method() === 'post'){
|
|
|
|
|
+ $vip_id = $this->input->post('vip_id',true);
|
|
|
$page = $this->input->post('page',true);
|
|
$page = $this->input->post('page',true);
|
|
|
$perpage = $this->input->post('perpage',true);
|
|
$perpage = $this->input->post('perpage',true);
|
|
|
$sqr = $this->input->post('sqr',true);
|
|
$sqr = $this->input->post('sqr',true);
|
|
@@ -116,7 +119,12 @@ class Beihuogl extends Start_Controller {
|
|
|
if(!empty($shop_id)){
|
|
if(!empty($shop_id)){
|
|
|
$where .= " and shop_id = ".$shop_id." ";
|
|
$where .= " and shop_id = ".$shop_id." ";
|
|
|
}else{
|
|
}else{
|
|
|
- $where .= " and shop_id in (".$shop_ids.") ";
|
|
|
|
|
|
|
+ if($vip_id == 1){
|
|
|
|
|
+
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $where .= " and shop_id in (".$shop_ids.") ";
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
if(!empty($plat_id)){
|
|
if(!empty($plat_id)){
|
|
|
$where .= " and plat_id = ".$plat_id." ";
|
|
$where .= " and plat_id = ".$plat_id." ";
|
|
@@ -145,8 +153,8 @@ class Beihuogl extends Start_Controller {
|
|
|
$plat_list = array_column($plat_list,'title','id');
|
|
$plat_list = array_column($plat_list,'title','id');
|
|
|
$status_list = $this->bhsq->getSqStatus();
|
|
$status_list = $this->bhsq->getSqStatus();
|
|
|
foreach($list as $k=>$v){
|
|
foreach($list as $k=>$v){
|
|
|
- $list[$k]['shop_id'] = isset($shop_list[$v['shop_id']])?$shop_list[$v['shop_id']]:"";
|
|
|
|
|
- $list[$k]['plat_id'] = isset($plat_list[$v['plat_id']])?$plat_list[$v['plat_id']]:"";
|
|
|
|
|
|
|
+ $list[$k]['shop_id'] = isset($shop_list[$v['shop_id']])?$shop_list[$v['shop_id']]:"无";
|
|
|
|
|
+ $list[$k]['plat_id'] = isset($plat_list[$v['plat_id']])?$plat_list[$v['plat_id']]:"无";
|
|
|
$list[$k]['sq_status'] = isset($status_list[$v['sq_status']])?$status_list[$v['sq_status']]:"";
|
|
$list[$k]['sq_status'] = isset($status_list[$v['sq_status']])?$status_list[$v['sq_status']]:"";
|
|
|
$list[$k]['add_time'] = date("Y-m-d",$v['add_time']);
|
|
$list[$k]['add_time'] = date("Y-m-d",$v['add_time']);
|
|
|
$str = "";
|
|
$str = "";
|
|
@@ -158,6 +166,11 @@ class Beihuogl extends Start_Controller {
|
|
|
$str .= "</div>";
|
|
$str .= "</div>";
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+ if($v['sq_status'] == 0){
|
|
|
|
|
+ $str .= "<div style='text-align:center;'>";
|
|
|
|
|
+ $str .= "<a href='javascript:void(0)' style='margin-right:4px;color: #fff;background-color: #DC143C;padding:4px 10px;border-radius:5px;font-size:15px' data-id='".$v['id']."' data-type='0' onclick='del_bhsq(this)'>删除</a>";
|
|
|
|
|
+ $str .= "</div>";
|
|
|
|
|
+ }
|
|
|
$list[$k]['update_time'] = $str;
|
|
$list[$k]['update_time'] = $str;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -174,6 +187,11 @@ class Beihuogl extends Start_Controller {
|
|
|
$user = $this->user->get_api($_SESSION['api']);
|
|
$user = $this->user->get_api($_SESSION['api']);
|
|
|
$usersp = explode('|',trim($user['shop'],'|'));
|
|
$usersp = explode('|',trim($user['shop'],'|'));
|
|
|
$this->data['usersp'] = implode(",",$usersp);
|
|
$this->data['usersp'] = implode(",",$usersp);
|
|
|
|
|
+ $vip_id = 0;
|
|
|
|
|
+ if(in_array($user['id'],[10,28])){
|
|
|
|
|
+ $vip_id = 1;
|
|
|
|
|
+ }
|
|
|
|
|
+ $this->data['vip_id'] = $vip_id;
|
|
|
$this->_Template('beihuogl_dyapply',$this->data);
|
|
$this->_Template('beihuogl_dyapply',$this->data);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -268,6 +286,15 @@ class Beihuogl extends Start_Controller {
|
|
|
if($type == 2){
|
|
if($type == 2){
|
|
|
$update_arr['public_time'] = time();
|
|
$update_arr['public_time'] = time();
|
|
|
}
|
|
}
|
|
|
|
|
+ if($type == 3){
|
|
|
|
|
+ $update_arr['ccwl_status'] = 0;
|
|
|
|
|
+ $update_arr['ck_status'] = 0;
|
|
|
|
|
+ $update_arr['features'] = '';
|
|
|
|
|
+ $update_arr['jm'] = '';
|
|
|
|
|
+ $update_arr['public_time'] = 0;
|
|
|
|
|
+ $update_arr['bh_no'] = '';
|
|
|
|
|
+ $update_arr['u9sc_no'] = '';
|
|
|
|
|
+ }
|
|
|
$r = $this->bhsq->save($update_arr,$id);
|
|
$r = $this->bhsq->save($update_arr,$id);
|
|
|
if($r){
|
|
if($r){
|
|
|
echo json_encode(['msg'=>'修改成功','success'=>true]);
|
|
echo json_encode(['msg'=>'修改成功','success'=>true]);
|
|
@@ -279,6 +306,26 @@ class Beihuogl extends Start_Controller {
|
|
|
echo json_encode(['success'=>false,'msg'=>'请求失败']);
|
|
echo json_encode(['success'=>false,'msg'=>'请求失败']);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ private function _deldyapply(){
|
|
|
|
|
+ if($this->input->method() === 'post'){
|
|
|
|
|
+ $data = $this->input->post();
|
|
|
|
|
+ $id = $data['id'];
|
|
|
|
|
+ $info = $this->bhsq->read($id);
|
|
|
|
|
+ if($info['sq_status'] != 0){
|
|
|
|
|
+ echo json_encode(['msg'=>'此条记录不符合删除条件','success'=>false]);
|
|
|
|
|
+ exit;
|
|
|
|
|
+ }
|
|
|
|
|
+ $r = $this->bhsq->remove($id);
|
|
|
|
|
+ if($r){
|
|
|
|
|
+ echo json_encode(['msg'=>'删除成功','success'=>true]);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ echo json_encode(['msg'=>'删除失败','success'=>false]);
|
|
|
|
|
+ }
|
|
|
|
|
+ exit;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ echo json_encode(['success'=>false,'msg'=>'请求失败']);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
//备货申请单的
|
|
//备货申请单的
|
|
|
private function _dyapplysave(){
|
|
private function _dyapplysave(){
|
|
|
if($this->input->method() === 'post'){
|
|
if($this->input->method() === 'post'){
|