Commit a3f83343 authored by hujun's avatar hujun

收款列表修改

parent 81cdb40c
...@@ -2952,17 +2952,12 @@ class Finance extends Basic ...@@ -2952,17 +2952,12 @@ class Finance extends Basic
try { try {
$order = new OPayLogModel(); $order = new OPayLogModel();
if (empty($this->params['excel'])) {
$field = 'a.id,a.create_time,a.order_id,a.father_id,a.money,a.real_money,a.pay_type,a.type,a.source,a.transaction_fee,a.source,b.f_id,a.transfer_name,a.receipt_number,'; $field = 'a.id,a.create_time,a.order_id,a.father_id,a.money,a.real_money,a.pay_type,a.type,a.source,a.transaction_fee,a.source,b.f_id,a.transfer_name,a.receipt_number,';
$field .= 'e.name,a.income_time,e.store_id,b.house_id,b.order_no,a.report_id,a.house_number,a.is_dividend,a.last_transfer_time,a.industry_type,a.agent_id,d.internal_address as address,e.name as agent_name'; $field .= 'e.name,a.income_time,e.store_id,b.house_id,b.order_no,a.report_id,a.house_number,a.is_dividend,a.last_transfer_time,a.industry_type,a.agent_id,d.internal_address as address,e.name as agent_name';
$list = $order->getAddPayLogOrderListLimit($pageNo, $pageSize, $order_ = 'a.id desc', $field, $where); $list = $order->getAddPayLogOrderListLimit($pageNo, $pageSize, $order_ = 'a.id desc', $field, $where);
$data['total'] = $order->getAddPayLogOrderListLimitTotal($where); $data['total'] = $order->getAddPayLogOrderListLimitTotal($where);
$m_store = new AStore();
$m_pay_adjustment = new OPayLogAdjustment(); $m_pay_adjustment = new OPayLogAdjustment();
$m_report = new OReportModel();
$m_agent_house = new GHousesToAgents();
$m_house = new GHouses();
$m_refund = new ORefundModel(); $m_refund = new ORefundModel();
foreach ($list as $k=>$v) { foreach ($list as $k=>$v) {
$list[$k]['source_id'] = $list[$k]['is_adjustment'] = ''; $list[$k]['source_id'] = $list[$k]['is_adjustment'] = '';
...@@ -2994,33 +2989,6 @@ class Finance extends Basic ...@@ -2994,33 +2989,6 @@ class Finance extends Basic
$list[$k]['bargain_id'] = ''; $list[$k]['bargain_id'] = '';
} }
$list[$k]['current_agent_name'] = $list[$k]['store_name'] = "";
if ($v['type'] == 92) {
$is_exclusive_type = $m_house->getHouseValue('is_exclusive_type', ['id'=>$v['house_id']]);
//案场费 对应业务员:盘方
$current_where['a.is_del'] = 0;
if ($is_exclusive_type) {
$current_where['a.type'] = 3;
} else {
$current_where['a.type'] = 2;
}
$current_agent_name = $m_agent_house->getHousesAgents($v['house_id'], 'b.name,b.store_id', $current_where);
$list[$k]['current_agent_name'] = empty($current_agent_name[0]['name']) ? '':$current_agent_name[0]['name'];
$store_name = $m_store->getStoreKeyById('store_name', ['id'=>$current_agent_name[0]['store_id']]);
$list[$k]['store_name'] = empty($store_name)? '' : $store_name;
}
if ($v['type'] == 10 || $v['type'] == 30 || $v['type'] == 91) {
//意向金/保管金 10/30 对应业务员:约带看的人 即 反签方
//中介费 对应业务员:约带看的人 即 反签方
$current_agent_name = $m_report->selectReportById('report_agent_name,report_store_id', ['id'=>$v['f_id']]);
if (!empty($current_agent_name[0]['report_store_id'])) {
$store_name = $m_store->getStoreKeyById('store_name', ['id'=>$current_agent_name[0]['report_store_id']]);
$list[$k]['store_name'] = empty($store_name)? '' : $store_name;
}
$list[$k]['current_agent_name'] = empty($current_agent_name[0]['report_agent_name']) ? '' : $current_agent_name[0]['report_agent_name'];
}
if (!empty($v['income_time'])) { if (!empty($v['income_time'])) {
$income_time = date('Y-m-d H:i:s', strtotime($v['income_time'])); $income_time = date('Y-m-d H:i:s', strtotime($v['income_time']));
if ($income_time == $v['income_time']) { if ($income_time == $v['income_time']) {
...@@ -3042,26 +3010,6 @@ class Finance extends Basic ...@@ -3042,26 +3010,6 @@ class Finance extends Basic
$data['money_total'] = ''; $data['money_total'] = '';
} }
$data['list'] = $this->numberTransitionString($data['list']); $data['list'] = $this->numberTransitionString($data['list']);
} else {
$pageNo = 1;
$pageSize = 50000; //最多5万条数据
$field = 'a.id,a.create_time,c.user_name,c.user_phone,c.report_agent_name,c.report_agent_phone,
f.store_name,g.district_name,a.money,a.real_money,a.transaction_fee,a.type,a.pay_type,
d.internal_address,a.house_number,a.source';
$data = $order->getAddPayLogOrderListLimit($pageNo, $pageSize, $order_ = 'a.id desc', $field, $where);
foreach ($data as $k => $v) {
if (!empty($v['user_phone'])) {
$data[$k]['user_phone'] = substr_replace($v['user_phone'], '****', 3, 4);
}
}
$data = $this->numberTransitionString($data);
$export = new ExportExcelUntil();
$title = ['提交时间', '收款ID', '带看ID', '成交报告ID', '入账日期', '提交人', '对应业务员', '所属门店', '类型', '收款金额(元)', '实付金额', '来源', '状态'];
$export->exportTable('收款记录', $data, 14, '收款记录', $title);
}
} catch (\Exception $e) { } catch (\Exception $e) {
$msg = '内部错误:' . $e->getMessage(); $msg = '内部错误:' . $e->getMessage();
if ($this->params['excel'] == 1) { if ($this->params['excel'] == 1) {
...@@ -3189,7 +3137,7 @@ class Finance extends Basic ...@@ -3189,7 +3137,7 @@ class Finance extends Basic
if (!empty($this->params['bargain_id'])) { if (!empty($this->params['bargain_id'])) {
$where['a.bargain_id'] = $this->params['bargain_id']; $where['a.bargain_id'] = $this->params['bargain_id'];
} }
// try { try {
$order = new OPayLogModel(); $order = new OPayLogModel();
if (empty($this->params['excel'])) { if (empty($this->params['excel'])) {
$field = 'a.id,a.create_time,a.order_id,a.father_id,a.money,a.real_money,a.pay_type,a.type,a.source,a.transaction_fee,a.source,b.f_id,a.transfer_name,a.receipt_number,a.bargain_id,'; $field = 'a.id,a.create_time,a.order_id,a.father_id,a.money,a.real_money,a.pay_type,a.type,a.source,a.transaction_fee,a.source,b.f_id,a.transfer_name,a.receipt_number,a.bargain_id,';
...@@ -3252,31 +3200,6 @@ class Finance extends Basic ...@@ -3252,31 +3200,6 @@ class Finance extends Basic
$list[$k]['current_agent_name'] = empty($current_agent_name[0]['report_agent_name']) ? "" : $current_agent_name[0]['report_agent_name']; $list[$k]['current_agent_name'] = empty($current_agent_name[0]['report_agent_name']) ? "" : $current_agent_name[0]['report_agent_name'];
} }
} }
// if ($v['type'] == 92) {
// $is_exclusive_type = $m_house->getHouseValue('is_exclusive_type', ['id'=>$v['house_id']]);
// //案场费 对应业务员:盘方
// $current_where['a.is_del'] = 0;
// if ($is_exclusive_type) {
// $current_where['a.type'] = 3;
// } else {
// $current_where['a.type'] = 2;
// }
// $current_agent_name = $m_agent_house->getHousesAgents($v['house_id'], 'b.name,b.store_id', $current_where);
// $list[$k]['current_agent_name'] = empty($current_agent_name[0]['name']) ? '':$current_agent_name[0]['name'];
// $store_name = $m_store->getStoreKeyById('store_name', ['id'=>$current_agent_name[0]['store_id']]);
// $list[$k]['store_name'] = empty($store_name)? '' : $store_name;
// }
//
// if ($v['type'] == 10 || $v['type'] == 30 || $v['type'] == 91) {
// //意向金/保管金 10/30 对应业务员:约带看的人 即 反签方
// //中介费 对应业务员:约带看的人 即 反签方
// $current_agent_name = $m_report->selectReportById('report_agent_name,report_store_id', ['id'=>$v['f_id']]);
// if (!empty($current_agent_name[0]['report_store_id'])) {
// $store_name = $m_store->getStoreKeyById('store_name', ['id'=>$current_agent_name[0]['report_store_id']]);
// $list[$k]['store_name'] = empty($store_name)? '' : $store_name;
// }
// $list[$k]['current_agent_name'] = empty($current_agent_name[0]['report_agent_name']) ? '' : $current_agent_name[0]['report_agent_name'];
// }
if (!empty($v['income_time'])) { if (!empty($v['income_time'])) {
$income_time = date('Y-m-d H:i:s', strtotime($v['income_time'])); $income_time = date('Y-m-d H:i:s', strtotime($v['income_time']));
...@@ -3341,10 +3264,10 @@ class Finance extends Basic ...@@ -3341,10 +3264,10 @@ class Finance extends Basic
$export->exportTable('收款记录', $excel_data, 12, '收款记录', $title); $export->exportTable('收款记录', $excel_data, 12, '收款记录', $title);
} }
// } catch (\Exception $e) { } catch (\Exception $e) {
// $msg = '内部错误:' . $e->getMessage(); $msg = '内部错误:' . $e->getMessage();
// return $this->error($msg); return $this->error($msg);
// } }
} }
......
...@@ -422,8 +422,6 @@ ...@@ -422,8 +422,6 @@
<th class="text-center">成交报告ID</th> <th class="text-center">成交报告ID</th>
<th class="text-center">入账日期</th> <th class="text-center">入账日期</th>
<th class="text-center">提交人</th> <th class="text-center">提交人</th>
<th class="text-center">对应业务员</th>
<th class="text-center">所属门店</th>
<th class="text-center">类型</th> <th class="text-center">类型</th>
<th class="text-center">收款金额</th> <th class="text-center">收款金额</th>
<th class="text-center">实付金额</th> <th class="text-center">实付金额</th>
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
<td>[%= it[item]['bargain_id'] %]</td> <td>[%= it[item]['bargain_id'] %]</td>
<td>[%= it[item]['income_time'] %]</td> <td>[%= it[item]['income_time'] %]</td>
<td>[%= it[item]['name'] %]</td> <td>[%= it[item]['name'] %]</td>
<td>[%= it[item]['current_agent_name'] %]</td>
<td>[%= it[item]['store_name'] %]</td>
<td>[%= it[item]['type'] %]</td> <td>[%= it[item]['type'] %]</td>
<td>[%= it[item]['money'] %]</td> <td>[%= it[item]['money'] %]</td>
<td>[%= it[item]['real_money'] %]</td> <td>[%= it[item]['real_money'] %]</td>
......
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