Commit 078436e7 authored by hujun's avatar hujun

type

parent f52cdd12
...@@ -36,19 +36,17 @@ class ApplyForCost extends Basic ...@@ -36,19 +36,17 @@ class ApplyForCost extends Basic
$agent_data = $redis->getRedisCache(2, $this->agentId); $agent_data = $redis->getRedisCache(2, $this->agentId);
$check_rule = new VipService(); $check_rule = new VipService();
$check_url = ltrim($this->request->baseUrl(), '/');
$is_check = 0; $is_check = 0;
switch ($check_url) { switch ($this->params['type']) {
case 'broker/costListStore' : case 1 :
$is_ok = $check_rule->checkRule($this->agentId, $check_url); $is_ok = $check_rule->checkRule($this->agentId, 'broker/costListStore');
if ($is_ok) { if ($is_ok) {
$is_check = 1; $is_check = 1;
} }
$where['a.status'] = 0; $where['a.status'] = 0;
$where['a.agent_id'] = $this->agentId;break;//店长查看提交 $where['a.agent_id'] = $this->agentId;break;//店长查看提交
case 'broker/costListDistrict' : case 2 :
$is_ok = $check_rule->checkRule($this->agentId, $check_url); $is_ok = $check_rule->checkRule($this->agentId, 'broker/costListDistrict');
if ($is_ok) { if ($is_ok) {
$is_check = 1; $is_check = 1;
} }
...@@ -56,12 +54,12 @@ class ApplyForCost extends Basic ...@@ -56,12 +54,12 @@ class ApplyForCost extends Basic
//总监权限查看 //总监权限查看
$where['a.status'] = 1; $where['a.status'] = 1;
$where[] = ['EXP', 'b.store_id = '.$agent_data['store_id']. ' or b.district_id ='.$agent_data['district_id']];break; $where[] = ['EXP', 'b.store_id = '.$agent_data['store_id']. ' or b.district_id ='.$agent_data['district_id']];break;
case 'broker/costListOne' : case 3 :
$where['a.status'] = 2;break; $where['a.status'] = 2;break; //财务一审
case 'broker/costListTwo' : case 4 :
$where['a.status'] = 3;break; $where['a.status'] = 3;break; //财务二审
case 'broker/costListThree' : case 5 :
$where['a.status'] = 4;break; $where['a.status'] = 4;break; //财务三审
default : default :
return $this->response(101, '请求错误'); return $this->response(101, '请求错误');
} }
......
...@@ -139,4 +139,32 @@ class StoreFeeService ...@@ -139,4 +139,32 @@ class StoreFeeService
} }
return $arr; return $arr;
} }
/**
* @param $id_string
* @return mixed
*/
public function delImg($id_string)
{
$image_array = explode(',', $id_string);
$result['status'] = 'fail';
$result['msg'] = '';
if (!is_array($image_array)) {
$result['msg'] = '参数错误';
return $result;
}
$img_data = $this->imgModel->findByAll('id,img_name', ['id'=>['in', $id_string]]);
$num = 0;
foreach($img_data as $v) {
$num += $this->imgModel->editData(['is_del'=>1], $v['id']);
unlink($v['img_name']);
}
if ($num) {
$result['status'] = 'successful';
}
return $result;
}
} }
\ No newline at end of file
...@@ -991,11 +991,7 @@ Route::group('broker', [ ...@@ -991,11 +991,7 @@ Route::group('broker', [
'getAgentDistrictId' => ['api_broker/Broker/getAgentDistrictId', ['method' => 'GET|POST']], 'getAgentDistrictId' => ['api_broker/Broker/getAgentDistrictId', ['method' => 'GET|POST']],
'getOpenList' => ['api_broker/PayLogOpen/getOpenList', ['method' => 'GET|POST']], 'getOpenList' => ['api_broker/PayLogOpen/getOpenList', ['method' => 'GET|POST']],
'openCheck' => ['api_broker/PayLogOpen/openCheck', ['method' => 'GET|POST']], 'openCheck' => ['api_broker/PayLogOpen/openCheck', ['method' => 'GET|POST']],
'costListStore' => ['api_broker/ApplyForCost/costList', ['method' => 'GET']], //费用申请列表-门店列表-未审核 'costList' => ['api_broker/ApplyForCost/costList', ['method' => 'GET']], //费用申请列表
'costListDistrict' => ['api_broker/ApplyForCost/costList', ['method' => 'GET']], //费用申请列表-部门列表
'costListOne' => ['api_broker/ApplyForCost/costList', ['method' => 'GET']], //费用申请列表-财务一审
'costListTwo' => ['api_broker/ApplyForCost/costList', ['method' => 'GET']], //费用申请列表-财务二审
'costListThree' => ['api_broker/ApplyForCost/costList', ['method' => 'GET']], //费用申请列表-财务三审
'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']],//委托找铺
......
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