Commit 72592d68 authored by hujun's avatar hujun

开业审核修改

parent a6e14eb2
...@@ -78,47 +78,50 @@ class PayLogOpen extends Basic ...@@ -78,47 +78,50 @@ class PayLogOpen extends Basic
} }
if ($this->params['create_start_time']) { if ($this->params['create_start_time']) {
$where['a.create_time'] = ['>', $this->params['create_start_time']]; $where['a.create_time'] = ['>', $this->params['create_start_time'].' 00:00:00'];
} }
if ($this->params['create_end_time']) { if ($this->params['create_end_time']) {
$where['a.create_time'] = ['>', $this->params['create_end_time']]; $where['a.create_time'] = ['>', $this->params['create_end_time'].' 23:59:59'];
} }
//提交时间区间 //提交时间区间
if ($this->params['create_start_time'] && $this->params['create_end_time']) { if ($this->params['create_start_time'] && $this->params['create_end_time']) {
$where['a.create_time'] = ['between', [$this->params['create_start_time'], $this->params['create_end_time']]]; $where['a.create_time'] =
['between', [$this->params['create_start_time'].' 00:00:00', $this->params['create_end_time'].' 23:59:59']];
} }
if ($this->params['pass_start_time']) { if ($this->params['pass_start_time']) {
$where['b.create_time'] = ['>', $this->params['pass_start_time']]; $where['b.create_time'] = ['>', $this->params['pass_start_time'].' 00:00:00'];
$where['b.status'] = 1; $where['b.status'] = 1;
} }
if ($this->params['pass_end_time']) { if ($this->params['pass_end_time']) {
$where['b.create_time'] = ['>', $this->params['pass_end_time']]; $where['b.create_time'] = ['>', $this->params['pass_end_time'].' 23:59:59'];
$where['b.status'] = 1; $where['b.status'] = 1;
} }
//总监通过时间区间 //总监通过时间区间
if ($this->params['pass_start_time'] && $this->params['pass_end_time']) { if ($this->params['pass_start_time'] && $this->params['pass_end_time']) {
$where['b.create_time'] = ['between', [$this->params['pass_start_time'], $this->params['pass_end_time']]]; $where['b.create_time'] =
['between', [$this->params['pass_start_time'].' 00:00:00', $this->params['pass_end_time'].' 23:59:59']];
$where['b.status'] = 1; $where['b.status'] = 1;
} }
if ($this->params['check_start_time']) { if ($this->params['check_start_time']) {
$where['b.create_time'] = ['>', $this->params['check_start_time']]; $where['b.create_time'] = ['>', $this->params['check_start_time'].' 00:00:00'];
$where['b.status'] = 3; $where['b.status'] = 3;
} }
if ($this->params['check_end_time']) { if ($this->params['check_end_time']) {
$where['b.create_time'] = ['>', $this->params['check_end_time']]; $where['b.create_time'] = ['>', $this->params['check_end_time'].' 23:59:59'];
$where['b.status'] = 3; $where['b.status'] = 3;
} }
//财务审核时间区间 //财务审核时间区间
if ($this->params['check_start_time'] && $this->params['check_end_time']) { if ($this->params['check_start_time'] && $this->params['check_end_time']) {
$where['b.create_time'] = ['between', [$this->params['check_start_time'], $this->params['check_end_time']]]; $where['b.create_time']
= ['between', [$this->params['check_start_time'].' 00:00:00', $this->params['check_end_time'].' 23:59:59']];
$where['b.status'] = 3; $where['b.status'] = 3;
} }
...@@ -161,12 +164,12 @@ class PayLogOpen extends Basic ...@@ -161,12 +164,12 @@ class PayLogOpen extends Basic
if (isset($this->params['district_id'])) { if (isset($this->params['district_id'])) {
$where['c.district_id'] = $this->params['district_id']; $where['c.district_id'] = $this->params['district_id'];
} }
//var_dump($where);die;
$where['a.is_del'] = 0; $where['a.is_del'] = 0;
$fields = 'a.id,a.create_time,a.agent_id,a.pay_log_id,a.bargain_id,a.order_id,a.house_id,a.status,a.house_address,c.name'; $fields = 'a.id,a.create_time,a.agent_id,a.pay_log_id,a.bargain_id,a.order_id,a.house_id,a.status,a.house_address,c.name';
$redis_service = new RedisCacheService();
$m_pay_log = new OPayLogModel(); $m_pay_log = new OPayLogModel();
$m_house = new GHouses();
$list = $this->m_pay_open->getListCheck($pageNo, $pageSize, 'a.id desc', $fields, $where); $list = $this->m_pay_open->getListCheck($pageNo, $pageSize, 'a.id desc', $fields, $where);
if ($this->params['excel'] == 0) { if ($this->params['excel'] == 0) {
...@@ -184,7 +187,8 @@ class PayLogOpen extends Basic ...@@ -184,7 +187,8 @@ class PayLogOpen extends Basic
$list[$k]['check_time'] = ''; $list[$k]['check_time'] = '';
} }
$list[$k]['agent_name'] = $v['name']; $list[$k]['agent_name'] = $v['name'];
unset($list[$k]['two_id']);
$list[$k]['house_address'] = $m_house->getFieldOneValue('internal_address', ['id'=>$v['house_id']]);
} }
$data['list'] = $list; $data['list'] = $list;
$data['total'] = $this->m_pay_open->getListCheckTotal($where); $data['total'] = $this->m_pay_open->getListCheckTotal($where);
...@@ -192,6 +196,8 @@ class PayLogOpen extends Basic ...@@ -192,6 +196,8 @@ class PayLogOpen extends Basic
} }
$excel_data = []; $excel_data = [];
// 审核状态 0未审核1总监审核 2财务一审 3财务二审
$status_array = ['未审核','总监审核','财务一审','财务二审'];
foreach ($list as $k=>$v) { foreach ($list as $k=>$v) {
$log_where['open_id'] = $v['id']; $log_where['open_id'] = $v['id'];
$log_where['is_del'] = 0; $log_where['is_del'] = 0;
...@@ -205,18 +211,17 @@ class PayLogOpen extends Basic ...@@ -205,18 +211,17 @@ class PayLogOpen extends Basic
$check_time = ''; $check_time = '';
} }
$agent_name = $redis_service->getRedisCache(2, $v['agent_id']); $house_address = $m_house->getFieldOneValue('internal_address', ['id'=>$v['house_id']]);
$list[$k]['agent_name'] = $agent_name['name'];
$excel_data[$k] = [ $excel_data[$k] = [
'id' => $v['id'], 'id' => $v['id'],
'create_time' => $v['create_time'], 'create_time' => $v['create_time'],
'agent_name' => $agent_name, 'agent_name' => $v['name'],
'pay_log_id' => $v['pay_log_id'], 'pay_log_id' => $v['pay_log_id'],
'bargain_id' => $v['bargain_id'], 'bargain_id' => $v['bargain_id'],
'order_id' => $v['order_id'], 'order_id' => $v['order_id'],
'house_id' => $v['house_id'], 'house_id' => $v['house_id'],
'house_address' => $v['house_address'], 'house_address' => $house_address,
'status_string' => $status_string, 'status_string' => $status_array[$v['status']],
'disc_time' => $disc_time, 'disc_time' => $disc_time,
'check_time' => $check_time 'check_time' => $check_time
]; ];
......
...@@ -635,11 +635,11 @@ define(['doT', 'text!temp/open_check_template_tpl.html', 'css!style/home.css', ' ...@@ -635,11 +635,11 @@ define(['doT', 'text!temp/open_check_template_tpl.html', 'css!style/home.css', '
params.house_address = house_address; params.house_address = house_address;
paramsStr += "house_address=" + house_address +'&'; paramsStr += "house_address=" + house_address +'&';
} }
if ( commit_home ) { if ( commit_home > 0) {
params.district_id = commit_home; params.district_id = commit_home;
paramsStr += "district_id=" + commit_home +'&'; paramsStr += "district_id=" + commit_home +'&';
} }
if ( commit_shop ) { if ( commit_shop > 0) {
params.store_id = commit_shop; params.store_id = commit_shop;
paramsStr += "store_id=" + commit_shop +'&'; paramsStr += "store_id=" + commit_shop +'&';
} }
......
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