Commit f84d7e73 authored by hujun's avatar hujun

开业审核增加字段

parent 78c142c5
......@@ -172,10 +172,15 @@ class PayLogOpen extends Basic
$list = $this->m_pay_open->getListCheck($pageNo, $pageSize, 'a.id desc', $fields, $where);
//付款类型 10意向金 20定金 30保管金 40押金 50 租金 60 进场费 70转让费 80其他 90佣金 91中介费 92 案场费
$type_array = [
10=>'意向金', 20=>'定金',30=>'保管金',40=>'押金',50=>'租金',60=>'进场费',
70=>'转让费',80=>'其他',90=>'佣金',91=>'中介费',92=>'案场费'
];
$redis = new RedisCacheService();
$m_pay = new OPayLogModel();
if ($this->params['excel'] == 0) {
$m_pay = new OPayLogModel();
$m_daily = new ODaily();
$redis = new RedisCacheService();
foreach ($list as $k=>$v) {
$log_where['open_id'] = $v['id'];
$log_where['is_del'] = 0;
......@@ -191,7 +196,7 @@ class PayLogOpen extends Basic
}
$list[$k]['agent_name'] = $v['name'];
//跳转财务日报页面数据
$pay_data = $m_pay->selectPayLogByOrderNo('agent_id,create_time', ['id'=>$v['pay_log_id']]);
$pay_data = $m_pay->selectPayLogByOrderNo('agent_id,create_time,type', ['id'=>$v['pay_log_id']]);
$daily_where['daily_date'] = date('Y-m-d', strtotime($pay_data[0]['create_time']));
$num = $m_daily->getTotal($daily_where); //是否提交财务日报
if ($num) {
......@@ -199,11 +204,21 @@ class PayLogOpen extends Basic
$agent_data = $redis->getRedisCache(2, $pay_data[0]['agent_id']);
$list[$k]['store_id'] = $agent_data['store_id'];
$list[$k]['store_name'] = $agent_data['store_name'];
unset($agent_data);
} else {
$list[$k]['daily_date'] = '';
$list[$k]['store_id'] = '';
$list[$k]['store_name'] = '';
}
if (isset($pay_data[0])) {
$list[$k]['type_name'] = $type_array[$pay_data[0]['type']];
$agent_data = $redis->getRedisCache(2, $pay_data[0]['agent_id']);
$list[$k]['commit_pay_name'] = $agent_data['name'];
unset($agent_data);
} else {
$list[$k]['type_name'] = $list[$k]['commit_pay_name'] = '';
}
}
$data['list'] = $list;
$data['total'] = $this->m_pay_open->getListCheckTotal($where);
......@@ -226,11 +241,23 @@ class PayLogOpen extends Basic
$check_time = '';
}
$pay_data = $m_pay->selectPayLogByOrderNo('type,agent_id', ['id'=>$v['pay_log_id']]);
if ($pay_data[0]) {
$type_name = $type_array[$pay_data[0]['type']];
$agent_data = $redis->getRedisCache(2, $pay_data[0]['agent_id']);
$commit_pay_name = $agent_data['name'];
unset($agent_data);
} else {
$type_name = $commit_pay_name = '';
}
$excel_data[$k] = [
'id' => $v['id'],
'create_time' => $v['create_time'],
'agent_name' => $v['name'],
'pay_log_id' => $v['pay_log_id'],
'commit_pay_name' => $commit_pay_name,
'type_name' => $type_name,
'bargain_id' => $v['bargain_id'],
'order_id' => $v['order_id'],
'house_id' => $v['house_id'],
......@@ -242,7 +269,7 @@ class PayLogOpen extends Basic
}
$export = new ExportExcelUntil();
$title = [ '申请ID', '提交时间', '提交人', '收款ID', '成交报告ID', '带看订单ID', '成交商铺ID', '成交商铺地址', '状态', '总监通过时间', '开业确定时间'];
$title = [ '申请ID', '提交时间', '提交人', '收款ID', '收款提交人','收款类型','成交报告ID', '带看订单ID', '成交商铺ID', '成交商铺地址', '状态', '总监通过时间', '开业确定时间'];
$file_name = '收款开业审核-'.$status_string;
$export->exportTable($file_name, $excel_data, 11, '开业审核-'.$status_string, $title);
return true;
......@@ -419,5 +446,4 @@ class PayLogOpen extends Basic
return $this->response("101", "审核失败");
}
}
}
\ No newline at end of file
......@@ -6,8 +6,8 @@
<td>[%= it[item]['create_time'] %]</td>
<td>[%= it[item]['agent_name'] %]</td>
<td>[%= it[item]['pay_log_id'] %]</td>
<td>[%= it[item]['name'] %]</td>
<td>[%= it[item]['name'] %]</td>
<td>[%= it[item]['commit_pay_name'] %]</td>
<td>[%= it[item]['type_name'] %]</td>
<td>[%= it[item]['house_id'] %]</td>
<td>[%= it[item]['house_address'] %]</td>
[% if(it[item]['status'] == 1) { %]
......
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