|
@@ -54,6 +54,10 @@ class Zzququeu9 extends Start_Controller {
|
|
|
{
|
|
|
$this->_mcindex();
|
|
|
}
|
|
|
+ elseif($arg == 'scdel')//删除
|
|
|
+ {
|
|
|
+ $this->_del($arg_array);
|
|
|
+ }
|
|
|
else
|
|
|
{
|
|
|
$this->_index();
|
|
@@ -251,7 +255,8 @@ class Zzququeu9 extends Start_Controller {
|
|
|
//'bzsh_no'=>$bzsh_no,
|
|
|
|
|
|
'create_time'=>date("Y-m-d H:i:s",$v['create_time']),
|
|
|
- 'update_time'=>date("Y-m-d H:i:s",$v['update_time'])
|
|
|
+ 'update_time'=>date("Y-m-d H:i:s",$v['update_time']),
|
|
|
+ 'operate'=>"<span data-action='dr' data-id='".$v['id']."' onclick='doDel(this)' style='background-color:red'>删除</span>"
|
|
|
];
|
|
|
}
|
|
|
|
|
@@ -924,4 +929,21 @@ class Zzququeu9 extends Start_Controller {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ private function _del($arg_array){
|
|
|
+ $id = $arg_array[0];
|
|
|
+ $user = $this->user->get_api($_SESSION['api']);
|
|
|
+ if(!in_array($user['userid'],['ceshi','admin'])){
|
|
|
+ echo json_encode(array('msg'=>'权限不足,禁止删除!','success'=>false));
|
|
|
+ }
|
|
|
+ $info = $this->zzquque_u9->read($id);
|
|
|
+ //目前只删除小单的 在途的单子 不管对错都不处理留痕
|
|
|
+ if(($info['dc_status'] < 3) && ($info['type'] == 10)){
|
|
|
+ $this->zzquque_u9->remove($id);
|
|
|
+ echo json_encode(array('msg'=>'删除成功','success'=>true));
|
|
|
+ }else{
|
|
|
+ echo json_encode(array('msg'=>'不满足删除条件','success'=>true));
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
}
|