Commit 99058dda authored by hujun's avatar hujun

费用申请删除处理

parent 0707d8ea
...@@ -92,6 +92,7 @@ class Cost extends Basic ...@@ -92,6 +92,7 @@ class Cost extends Basic
if (isset($param['check_status'])) { if (isset($param['check_status'])) {
switch($param['check_status']) { switch($param['check_status']) {
case 0 : case 0 :
$where['type'] = 5; //店长账号提交的 需要总监和财务的三级审核
$where['a.status'] = 0;break; $where['a.status'] = 0;break;
case 1 : case 1 :
$where['a.status'] = 1;break; $where['a.status'] = 1;break;
...@@ -202,6 +203,16 @@ class Cost extends Basic ...@@ -202,6 +203,16 @@ class Cost extends Basic
return $this->response($code, '参数错误'); return $this->response($code, '参数错误');
} }
$fee_model = new FApplyForFee(); $fee_model = new FApplyForFee();
$data = $fee_model->findByOne('id,type,status', ['id'=>$this->params['id'], 'is_del'=>0]);
if (empty($data)) {
return $this->response(101, '没有该数据或已删除');
}
if ($data['status'] == 4 && $data['type'] == 5) {
return $this->response(101, '已经财务三审,无法删除!');
}
$is_ok = $fee_model->editData(['is_del'=>1], $this->params['id']); $is_ok = $fee_model->editData(['is_del'=>1], $this->params['id']);
if ($is_ok) { if ($is_ok) {
...@@ -313,8 +324,14 @@ class Cost extends Basic ...@@ -313,8 +324,14 @@ class Cost extends Basic
break; break;
} }
//店长账号提交的 需要总监和财务的三级审核
if ($data['type'] == 5) {
$check_field = 'b.name,a.create_time,a.remark'; $check_field = 'b.name,a.create_time,a.remark';
$data['check_log'] = $m_check->findByAll($check_field, ['apply_for_id' => $data['id']]); $data['check_log'] = $m_check->findByAll($check_field, ['apply_for_id' => $data['id']]);
} else {
$data['check_log'] = [];
}
$data['images_data'] = $m_img->findByAll('id,img_name,img_type', ['img_id' => $data['id']]); $data['images_data'] = $m_img->findByAll('id,img_name,img_type', ['img_id' => $data['id']]);
$data['image_base_url'] = 'static/chat_image/'; $data['image_base_url'] = 'static/chat_image/';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment