Commit 078436e7 authored by hujun's avatar hujun

type

parent f52cdd12
......@@ -36,19 +36,17 @@ class ApplyForCost extends Basic
$agent_data = $redis->getRedisCache(2, $this->agentId);
$check_rule = new VipService();
$check_url = ltrim($this->request->baseUrl(), '/');
$is_check = 0;
switch ($check_url) {
case 'broker/costListStore' :
$is_ok = $check_rule->checkRule($this->agentId, $check_url);
switch ($this->params['type']) {
case 1 :
$is_ok = $check_rule->checkRule($this->agentId, 'broker/costListStore');
if ($is_ok) {
$is_check = 1;
}
$where['a.status'] = 0;
$where['a.agent_id'] = $this->agentId;break;//店长查看提交
case 'broker/costListDistrict' :
$is_ok = $check_rule->checkRule($this->agentId, $check_url);
case 2 :
$is_ok = $check_rule->checkRule($this->agentId, 'broker/costListDistrict');
if ($is_ok) {
$is_check = 1;
}
......@@ -56,12 +54,12 @@ class ApplyForCost extends Basic
//总监权限查看
$where['a.status'] = 1;
$where[] = ['EXP', 'b.store_id = '.$agent_data['store_id']. ' or b.district_id ='.$agent_data['district_id']];break;
case 'broker/costListOne' :
$where['a.status'] = 2;break;
case 'broker/costListTwo' :
$where['a.status'] = 3;break;
case 'broker/costListThree' :
$where['a.status'] = 4;break;
case 3 :
$where['a.status'] = 2;break; //财务一审
case 4 :
$where['a.status'] = 3;break; //财务二审
case 5 :
$where['a.status'] = 4;break; //财务三审
default :
return $this->response(101, '请求错误');
}
......
......@@ -139,4 +139,32 @@ class StoreFeeService
}
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', [
'getAgentDistrictId' => ['api_broker/Broker/getAgentDistrictId', ['method' => 'GET|POST']],
'getOpenList' => ['api_broker/PayLogOpen/getOpenList', ['method' => 'GET|POST']],
'openCheck' => ['api_broker/PayLogOpen/openCheck', ['method' => 'GET|POST']],
'costListStore' => ['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']], //费用申请列表-财务三审
'costList' => ['api_broker/ApplyForCost/costList', ['method' => 'GET']], //费用申请列表
'moveHouseAgent' => ['api_broker/User/moveHouseAgent', ['method' => 'GET|POST']],//客方同步到新表
'moveHouseSiteId' => ['api_broker/User/moveHouseSiteId', ['method' => 'GET|POST']],//站点同步到新表
'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