Commit 4ea9b279 authored by zhuwei's avatar zhuwei

1

parent 078436e7
......@@ -45,34 +45,24 @@ class CostParameter extends Basic
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
$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'])) {
$conditions["a.id"] = $params["store_id"];
}
$field = 'a.id,a.cost_id,b.setting_date,a.create_time,b.operator_name,
a.type,a.fee_item,a.purpose,b.store_id,a.assume_fee';
$field = 'a.id,a.store_name,b.office_name';
$list = $this->m_store->getStoreCostParameterList($field, $conditions, $pageNo, $pageSize);
if(!$list)
return $this->response("200", "success", []);
foreach ($list as $k => $v) {
$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']);
// $list[$k]['type_name'] = $this->getTypeName($v['type']);
}
$count = $this->m_store->getStoreCostParameterList($field, $conditions);
$count = $this->m_store->getStoreCostParameterListTotal($field, $conditions);
$result["list"] = $list;
......
......@@ -383,7 +383,7 @@ class AStore extends BaseModel
->field($field)
->alias('a')
->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')
->where($params)
->limit($pageSize)
......@@ -399,7 +399,7 @@ class AStore extends BaseModel
->field($field)
->alias('a')
->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)
->count();
return $result;
......
......@@ -545,6 +545,8 @@ Route::group('index', [
'editApplyFor' => ['index/StoreFee/addApplyFor', ['method' => 'POST']],//修改报销申请
'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