Commit ae31c006 authored by hujun's avatar hujun

app总监审核

parent 7b2cc458
...@@ -108,4 +108,24 @@ class ApplyForCost extends Basic ...@@ -108,4 +108,24 @@ class ApplyForCost extends Basic
return $this->response(200, '', $list); return $this->response(200, '', $list);
} }
/**
* 审核
*
* @return \think\Response
*/
public function check()
{
if (empty($this->params['id'])) {
return $this->response(101, '参数错误');
}
$service = new CostService();
$this->params['status'] = 1; //总监审核
$result = $service->check($this->params, $this->agentId);
$code = 200;
if ($result['status'] == 'fail') {
$code = 101;
}
return $this->response($code, $result['msg']);
}
} }
\ No newline at end of file
...@@ -32,7 +32,7 @@ class CostService ...@@ -32,7 +32,7 @@ class CostService
public function check($params, $agent_id) public function check($params, $agent_id)
{ {
$result['status'] = 'fail'; $result['status'] = 'fail';
$result['msg'] = '';
$where['id'] = $params['id']; $where['id'] = $params['id'];
$where['is_del'] = $id = 0; $where['is_del'] = $id = 0;
$cost_data = $this->apply_model->findByOne('id,status', $where); $cost_data = $this->apply_model->findByOne('id,status', $where);
......
...@@ -36,7 +36,7 @@ class FApplyForFee extends BaseModel ...@@ -36,7 +36,7 @@ class FApplyForFee extends BaseModel
public function updateData($data, $where) public function updateData($data, $where)
{ {
$data['update_time'] = date("Y-m-d H:i:s", time()); $data['update_time'] = date("Y-m-d H:i:s", time());
return $this->db_->update($data); return $this->db_->where($where)->update($data);
} }
/** /**
......
...@@ -996,7 +996,7 @@ Route::group('broker', [ ...@@ -996,7 +996,7 @@ Route::group('broker', [
'moveHouseAgent' => ['api_broker/User/moveHouseAgent', ['method' => 'GET|POST']],//客方同步到新表 'moveHouseAgent' => ['api_broker/User/moveHouseAgent', ['method' => 'GET|POST']],//客方同步到新表
'moveHouseSiteId' => ['api_broker/User/moveHouseSiteId', ['method' => 'GET|POST']],//站点同步到新表 'moveHouseSiteId' => ['api_broker/User/moveHouseSiteId', ['method' => 'GET|POST']],//站点同步到新表
'getFindShopListIsMy' => ['api_broker/FindShop/getFindShopList', ['method' => 'GET']],//委托找铺 'getFindShopListIsMy' => ['api_broker/FindShop/getFindShopList', ['method' => 'GET']],//委托找铺
'checkCost' => ['api_broker/ApplyForCost/check', ['method' => 'POST']], //费用报销审核总监
'addApplyFor' => ['api_broker/StoreFee/addApplyFor', ['method' => 'GET']],//新增报销申请 'addApplyFor' => ['api_broker/StoreFee/addApplyFor', ['method' => 'GET']],//新增报销申请
]); ]);
......
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