Commit 4ea9b279 authored by zhuwei's avatar zhuwei

1

parent 078436e7
...@@ -45,34 +45,24 @@ class CostParameter extends Basic ...@@ -45,34 +45,24 @@ class CostParameter extends Basic
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize']; $pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
$conditions = []; $conditions = [];
//城市
if (!empty($params["city"])) {
$conditions["a.city"] = $params["city"];
}
//部门
if (!empty($params['district_id'])) {
$conditions["a.district_id"] = $params["district_id"];
}
//门店 //门店
if (!empty($params['store_id'])) { if (!empty($params['store_id'])) {
$conditions["a.id"] = $params["store_id"]; $conditions["a.id"] = $params["store_id"];
} }
$field = 'a.id,a.cost_id,b.setting_date,a.create_time,b.operator_name, $field = 'a.id,a.store_name,b.office_name';
a.type,a.fee_item,a.purpose,b.store_id,a.assume_fee';
$list = $this->m_store->getStoreCostParameterList($field, $conditions, $pageNo, $pageSize); $list = $this->m_store->getStoreCostParameterList($field, $conditions, $pageNo, $pageSize);
if(!$list) if(!$list)
return $this->response("200", "success", []); return $this->response("200", "success", []);
foreach ($list as $k => $v) { foreach ($list as $k => $v) {
$list[$k]['type_name'] = $this->getTypeName($v['type']); // $list[$k]['type_name'] = $this->getTypeName($v['type']);
$list[$k]['fee_item_name'] = $this->getFeeItemName($v['fee_item']);
$list[$k]['store_name'] = $this->getStoreName($v['store_id']);
} }
$count = $this->m_store->getStoreCostParameterList($field, $conditions); $count = $this->m_store->getStoreCostParameterListTotal($field, $conditions);
$result["list"] = $list; $result["list"] = $list;
......
...@@ -383,7 +383,7 @@ class AStore extends BaseModel ...@@ -383,7 +383,7 @@ class AStore extends BaseModel
->field($field) ->field($field)
->alias('a') ->alias('a')
->join('f_office b', 'a.office_id = b.id', 'left') ->join('f_office b', 'a.office_id = b.id', 'left')
->join('f_store_data c', 'a.id = c.district_id', 'left') ->join('f_store_data c', 'a.id = c.store_id', 'left')
->join('a_agents d', 'a.id = d.store_id and (level = 20 or level = 40) ', 'left') ->join('a_agents d', 'a.id = d.store_id and (level = 20 or level = 40) ', 'left')
->where($params) ->where($params)
->limit($pageSize) ->limit($pageSize)
...@@ -399,7 +399,7 @@ class AStore extends BaseModel ...@@ -399,7 +399,7 @@ class AStore extends BaseModel
->field($field) ->field($field)
->alias('a') ->alias('a')
->join('f_office b', 'a.office_id = b.id', 'left') ->join('f_office b', 'a.office_id = b.id', 'left')
->join('f_store_data c', 'a.id = c.district_id', 'left') ->join('f_store_data c', 'a.id = c.store_id', 'left')
->where($params) ->where($params)
->count(); ->count();
return $result; return $result;
......
...@@ -545,6 +545,8 @@ Route::group('index', [ ...@@ -545,6 +545,8 @@ Route::group('index', [
'editApplyFor' => ['index/StoreFee/addApplyFor', ['method' => 'POST']],//修改报销申请 'editApplyFor' => ['index/StoreFee/addApplyFor', ['method' => 'POST']],//修改报销申请
'getApplyForFeeStore' => ['index/StoreFee/getApplyForFeeStore', ['method' => 'GET']],//获取费用承担办公室 'getApplyForFeeStore' => ['index/StoreFee/getApplyForFeeStore', ['method' => 'GET']],//获取费用承担办公室
'getStoreCostParameterList' => ['index/CostParameter/getStoreCostParameterList', ['method' => 'POST|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