|
|
@@ -888,7 +888,7 @@ class Beihuogl extends Start_Controller {
|
|
|
$start = ($page - 1)*$perpage;
|
|
|
}
|
|
|
|
|
|
- $list = $this->bhccwl->find_all($where,"id,bh_no,status,create_time,public_time,update_time",$order_str,$start,$perpage);
|
|
|
+ $list = $this->bhccwl->find_all($where,"id,bh_no,status,create_time,public_time,update_time,ck_status",$order_str,$start,$perpage);
|
|
|
|
|
|
if(empty($list)){
|
|
|
$rows = array('total'=>0,'over'=>1,'pagenum'=>0,'rows'=>([]));
|
|
|
@@ -909,7 +909,20 @@ class Beihuogl extends Start_Controller {
|
|
|
$str .= "</div>";
|
|
|
|
|
|
}
|
|
|
+ if($v['status'] == 1 && $v['ck_status'] == 0){
|
|
|
+ $str .= "<div style='text-align:center;'>";
|
|
|
+ $str .= "<a href='javascript:void(0)' style='margin-right:4px;color: #fff;background-color:#4169E1;padding:4px 10px;border-radius:5px;font-size:15px' data-id='".$v['id']."' data-type='2' onclick='update_status(this)'>撤回</a>";
|
|
|
+ $str .= "</div>";
|
|
|
+ }
|
|
|
+
|
|
|
+ if($v['status'] == 2 && $v['ck_status'] == 0){
|
|
|
+ $str .= "<div style='text-align:center;'>";
|
|
|
+ $str .= "<a href='javascript:void(0)'class='window' data-h='/beihuogl/ccwlbhedit/".$v['id']."' data-t='修改' style='margin-right:4px;color: #fff;background-color:#228B22;padding:4px 10px;border-radius:5px;font-size:15px'>编辑</a>";
|
|
|
+ $str .= "<a href='javascript:void(0)' style='margin-right:4px;color: #fff;background-color:#4169E1;padding:4px 10px;border-radius:5px;font-size:15px' data-id='".$v['id']."' data-type='1' onclick='update_status(this)'>发布</a>";
|
|
|
+ $str .= "</div>";
|
|
|
+ }
|
|
|
$list[$k]['update_time'] = $str;
|
|
|
+ unset($list[$k]['ck_status']);
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -1158,6 +1171,14 @@ class Beihuogl extends Start_Controller {
|
|
|
'update_time'=>time(),
|
|
|
'public_time'=>time(),
|
|
|
];
|
|
|
+ if($val == 2){
|
|
|
+ $info = $this->bhccwl->read($id);
|
|
|
+ if($info['status'] == 1 && $info['ck_status'] == 0){
|
|
|
+
|
|
|
+ }else{
|
|
|
+ echo json_encode(['success'=>false,'msg'=>'状态不对,不可撤回']);exit;
|
|
|
+ }
|
|
|
+ }
|
|
|
}else{
|
|
|
echo json_encode(['success'=>false,'msg'=>'请求参数未设置']);exit;
|
|
|
}
|