|
@@ -276,13 +276,15 @@ class FinancialManager extends Base{
|
|
|
}
|
|
|
// 删除待确认数据
|
|
|
public function delete(){
|
|
|
- $id = $this->request->param('id','0','intval');
|
|
|
- $info=$this->model->findOrEmpty($id);
|
|
|
+ $ids = $this->request->param('id',[]);
|
|
|
+ $info=$this->model->whereIn('id',$ids)->select();
|
|
|
if($info->isEmpty()) return error("数据不存在");
|
|
|
- if($info->status!=1) return error("当前数据状态不允许删除");
|
|
|
- if($info->manager_status!=3) return error("当前数据不是待确认数据");
|
|
|
- if($info->balance_num!=$info->total_num) return error("数据数量已处理过不可删除");
|
|
|
- $info->delete();
|
|
|
+ foreach ($info as $item){
|
|
|
+ if($item->status!=1) return error("当前数据[$item->id]状态不允许删除");
|
|
|
+ if($item->manager_status!=3) return error("当前数据[$item->id]不是待确认数据");
|
|
|
+ if($item->balance_num!=$item->total_num) return error("数据[$item->id]数量已处理过不可删除");
|
|
|
+ }
|
|
|
+ $this->model->whereIn('id',$ids)->delete();
|
|
|
return success("删除成功");
|
|
|
}
|
|
|
public function CheckList(){
|