Commit f138061c authored by hujun's avatar hujun

name

parent e6cf4947
......@@ -256,7 +256,7 @@ class Cost extends Basic
if (empty($this->params['id'])) {
return $this->response($code, '参数错误!');
}
$cost_service = new CostService();
$fee_model = new FApplyForFee();
$m_store = new AStore();
$m_store_cost = new FStoreCost();
......@@ -268,15 +268,15 @@ class Cost extends Basic
$where['id'] = $this->params['id'];
$data = $fee_model->findByOne($field, $where);
$office_id = $m_store->getFieldOneValue('office_id', ['id'=>$data['store_id']]);
$office_id = $m_store->getFieldOneValue('office_id', ['id' => $data['store_id']]);
if ($office_id) {
$store_field = 'a.id,a.store_name';
$office_store = $m_store->getStoreCostAll($store_field, ['a.office_id'=>$office_id, 'a.status'=>0]);
$office_store = $m_store->getStoreCostAll($store_field, ['a.office_id' => $office_id, 'a.status' => 0]);
$list = [];
$cost_ext_field = 'a.id,b.store_attendance_num,b.assume_fee';
$cost_ext_where['setting_date'] = $data['count_time'];
foreach($office_store as $k=>$v) {
foreach ($office_store as $k => $v) {
$cost_ext_where['store_id'] = $v['id'];
$store_cost_data = $m_store_cost->getCostExt($cost_ext_field, $cost_ext_where);
if (empty($store_cost_data)) {
......@@ -297,11 +297,28 @@ class Cost extends Basic
}
$check_field = 'b.name,a.create_time,a.remark';
$data['check_log'] = $m_check->findByAll($check_field, ['apply_for_id'=> $data['id']]);
$data['check_log'] = $m_check->findByAll($check_field, ['apply_for_id' => $data['id']]);
$data['images_data'] = $m_img->findByAll('id,img_name,img_type', ['img_id'=>$data['id']]);
$data['images_data'] = $m_img->findByAll('id,img_name,img_type', ['img_id' => $data['id']]);
$data['store_cost_data'] = $list;
$data['image_base_url'] = 'static/chat_image/';
$data['image_base_url'] = 'static/chat_image/';
$source = [
0 => 'app申请',
1 => 'excel导入'
];
$status = [
0 => '申请中',
1 => '总监通过',
2 => '一审通过',
3 => '二审通过',
4 => '三审通过',
];
$data['source_name'] = $source[$data['source']];
$data['status_name'] = $status[$data['status']];
$data['type_name'] = $cost_service->getFeeType($data['type']);
$data['fee_item_name'] = $cost_service->getFeeItem($data['fee_item']);
}
return $this->response(200, '', $data);
}
......
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