Commit d64487d5 authored by hujun's avatar hujun

全部状态

parent 6808e24c
...@@ -2997,6 +2997,12 @@ class Finance extends Basic ...@@ -2997,6 +2997,12 @@ class Finance extends Basic
$is_show = 1; $is_show = 1;
} }
if (isset($this->params['is_normality']) && $this->params['is_normality'] == 1) {
$where[] = ['EXP', '(select id from o_refund where pay_log_id=a.id and is_del = 0 group by pay_log_id) is null'];
$where[] = ['EXP', '(select id from o_paylog_adjustment where paylog_id=a.id and is_del = 0 group by paylog_id) is null '];
$is_show = 1;
}
try { try {
$order = new OPayLogModel(); $order = new OPayLogModel();
$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,';
...@@ -3091,25 +3097,21 @@ class Finance extends Basic ...@@ -3091,25 +3097,21 @@ class Finance extends Basic
/*提交时间 start*/ /*提交时间 start*/
if (!empty($this->params['start_time']) && empty($this->params['end_time'])) { if (!empty($this->params['start_time']) && empty($this->params['end_time'])) {
$where['a.create_time'] = ['> time', $this->params['start_time'] . ' 00:00:00']; $where['a.create_time'] = ['> time', $this->params['start_time'] . ' 00:00:00'];
$is_show = 1;
} }
if (!empty($this->params['end_time']) && empty($this->params['start_time'])) { if (!empty($this->params['end_time']) && empty($this->params['start_time'])) {
$where['a.create_time'] = ['< time', $this->params['end_time'] . ' 23:59:59']; $where['a.create_time'] = ['< time', $this->params['end_time'] . ' 23:59:59'];
$is_show = 1;
} }
if (!empty($this->params['end_time']) && !empty($this->params['start_time'])) { if (!empty($this->params['end_time']) && !empty($this->params['start_time'])) {
$where['a.create_time'] = ['between time', [ $where['a.create_time'] = ['between time', [
$this->params['start_time'] . ' 00:00:00', $this->params['end_time'] . ' 23:59:59' $this->params['start_time'] . ' 00:00:00', $this->params['end_time'] . ' 23:59:59'
]]; ]];
$is_show = 1;
} }
/*提交时间 end*/ /*提交时间 end*/
/*入账日期 start*/ /*入账日期 start*/
if (!empty($this->params['income_start_time']) && empty($this->params['income_end_time'])) { if (!empty($this->params['income_start_time']) && empty($this->params['income_end_time'])) {
$where['a.income_time'] = ['> time', $this->params['income_start_time'] . ' 00:00:00']; $where['a.income_time'] = ['> time', $this->params['income_start_time'] . ' 00:00:00'];
$is_show = 1;
} }
if (!empty($this->params['income_end_time']) && empty($this->params['income_start_time'])) { if (!empty($this->params['income_end_time']) && empty($this->params['income_start_time'])) {
...@@ -3121,56 +3123,47 @@ class Finance extends Basic ...@@ -3121,56 +3123,47 @@ class Finance extends Basic
$where['a.income_time'] = ['between time', [ $where['a.income_time'] = ['between time', [
$this->params['income_start_time'] . ' 00:00:00', $this->params['income_end_time'] . ' 23:59:59' $this->params['income_start_time'] . ' 00:00:00', $this->params['income_end_time'] . ' 23:59:59'
]]; ]];
$is_show = 1;
} }
/*入账日期 end*/ /*入账日期 end*/
//商铺地址 //商铺地址
if (!empty($this->params['internal_address'])) { if (!empty($this->params['internal_address'])) {
$where['d.internal_address'] = ['like', '%' . $this->params['internal_address'] . '%']; $where['d.internal_address'] = ['like', '%' . $this->params['internal_address'] . '%'];
$is_show = 1;
} }
//商铺ID //商铺ID
if (!empty($this->params['house_id'])) { if (!empty($this->params['house_id'])) {
$where['b.house_id'] = $this->params['house_id']; $where['b.house_id'] = $this->params['house_id'];
$is_show = 1;
} }
//提交人所在门店 //提交人所在门店
if (!empty($this->params['store_id'])) { if (!empty($this->params['store_id'])) {
$where['e.store_id'] = $this->params['store_id']; $where['e.store_id'] = $this->params['store_id'];
$is_show = 1;
} }
//提交人所在部门 //提交人所在部门
if (!empty($this->params['district_id'])) { if (!empty($this->params['district_id'])) {
$where['e.district_id'] = $this->params['district_id']; $where['e.district_id'] = $this->params['district_id'];
$is_show = 1;
} }
//提交人姓名 //提交人姓名
if (!empty($this->params['agent_id'])) { if (!empty($this->params['agent_id'])) {
$where['a.agent_id'] = $this->params['agent_id']; $where['a.agent_id'] = $this->params['agent_id'];
$is_show = 1;
} }
//入账方式 //入账方式
if (!empty($this->params['pay_type'])) { if (!empty($this->params['pay_type'])) {
$where['a.pay_type'] = $this->params['pay_type']; $where['a.pay_type'] = $this->params['pay_type'];
$is_show = 1;
} }
//入账类型 //入账类型
if (!empty($this->params['type'])) { if (!empty($this->params['type'])) {
$where['a.type'] = $this->params['type']; $where['a.type'] = $this->params['type'];
$is_show = 1;
} }
//来源 //来源
if ($this->params['source'] > -1) { if ($this->params['source'] > -1) {
$where['a.source'] = $this->params['source']; $where['a.source'] = $this->params['source'];
$is_show = 1;
} }
if (!empty($this->params['bargain_id'])) { if (!empty($this->params['bargain_id'])) {
...@@ -3178,7 +3171,6 @@ class Finance extends Basic ...@@ -3178,7 +3171,6 @@ class Finance extends Basic
if (!empty($order_id)) { if (!empty($order_id)) {
$where[] = ['EXP', 'a.order_id='.$order_id]; $where[] = ['EXP', 'a.order_id='.$order_id];
} }
$is_show = 1;
} }
if (!empty($this->params['pay_id'])) { if (!empty($this->params['pay_id'])) {
...@@ -3201,7 +3193,11 @@ class Finance extends Basic ...@@ -3201,7 +3193,11 @@ class Finance extends Basic
$where['f.is_open'] = 0; $where['f.is_open'] = 0;
} }
$where['a.type'] = ['in', '91,92']; $where['a.type'] = ['in', '91,92'];
$is_show = 1; }
if (isset($this->params['is_normality']) && $this->params['is_normality'] == 1) {
$where[] = ['EXP', '(select id from o_refund where pay_log_id=a.id and is_del = 0 group by pay_log_id) is null'];
$where[] = ['EXP', '(select id from o_paylog_adjustment where paylog_id=a.id and is_del = 0 group by paylog_id) is null '];
} }
try { try {
$order = new OPayLogModel(); $order = new OPayLogModel();
......
...@@ -369,6 +369,11 @@ ...@@ -369,6 +369,11 @@
<option value="91">中介费</option> <option value="91">中介费</option>
<option value="92">案场费</option> <option value="92">案场费</option>
</select> </select>
<select class="form-control btn2 ld-Marheight" id="is_open">
<option value="-1">是否开业</option>
<option value="0"></option>
<option value="1"></option>
</select>
<select class="form-control btn2 ld-Marheight" id="maintable_pay_type"> <select class="form-control btn2 ld-Marheight" id="maintable_pay_type">
<option value="">入账方式</option> <option value="">入账方式</option>
<option value="10">施总支付宝</option> <option value="10">施总支付宝</option>
...@@ -407,10 +412,9 @@ ...@@ -407,10 +412,9 @@
</select> </select>
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="comit_name" placeholder="提交人姓名" type="text" value=""> <input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="comit_name" placeholder="提交人姓名" type="text" value="">
<ul class="user-ul" style="display:none"></ul> <ul class="user-ul" style="display:none"></ul>
<select class="form-control btn2 ld-Marheight" id="is_open"> <select class="form-control btn2 ld-Marheight" id="is_normality">
<option value="-1">是否开业</option> <option value="0">全部状态</option>
<option value="0"></option> <option value="1">正常</option>
<option value="1"></option>
</select> </select>
<span class="btn btn-info btn3 ld-Marheight" id="search" style="float:left">搜索</span> <span class="btn btn-info btn3 ld-Marheight" id="search" style="float:left">搜索</span>
<span class="btn btn-info btn3 ld-Marheight" id="reset" style="float:left">重置</span> <span class="btn btn-info btn3 ld-Marheight" id="reset" style="float:left">重置</span>
......
...@@ -1310,6 +1310,7 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css', ...@@ -1310,6 +1310,7 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
var params = {}; var params = {};
var paramsStr = "" ; var paramsStr = "" ;
var is_open = $('#is_open').val(); var is_open = $('#is_open').val();
var is_normality = $('#is_normality').val();
if ( commite_time_start ) { if ( commite_time_start ) {
params.start_time = commite_time_start; params.start_time = commite_time_start;
paramsStr += "start_time=" + commite_time_start + "&" paramsStr += "start_time=" + commite_time_start + "&"
...@@ -1375,6 +1376,10 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css', ...@@ -1375,6 +1376,10 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
params.is_open = is_open; params.is_open = is_open;
paramsStr += "is_open=" + is_open + "&"; paramsStr += "is_open=" + is_open + "&";
} }
if (is_normality > 0) {
params.is_normality = is_normality;
paramsStr += "is_normality=" + is_normality + "&";
}
receiv.buildSearchParamsLiu = paramsStr.substr(0,paramsStr.length-1); receiv.buildSearchParamsLiu = paramsStr.substr(0,paramsStr.length-1);
if (excel) { if (excel) {
return paramsStr.substr(0,paramsStr.length-1) return paramsStr.substr(0,paramsStr.length-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