Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
63878cd4
Commit
63878cd4
authored
Apr 28, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
退款是否开业
parent
2f008916
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
94 additions
and
35 deletions
+94
-35
Finance.php
application/index/controller/Finance.php
+16
-7
refundList.html
application/index/view/finance/refundList.html
+5
-0
ORefundModel.php
application/model/ORefundModel.php
+4
-0
getCollection.js
public/resource/js/getCollection.js
+2
-2
refundList.js
public/resource/js/refundList.js
+67
-26
No files found.
application/index/controller/Finance.php
View file @
63878cd4
...
...
@@ -987,6 +987,15 @@ class Finance extends Basic
$where
[]
=
[
'EXP'
,
'a.id NOT IN (SELECT refund_id FROM o_refund_log WHERE operation_id ='
.
$this
->
userId
.
')'
];
}
}
//案场费和中介费是否开业
if
(
isset
(
$this
->
params
[
'is_open'
]))
{
if
(
$this
->
params
[
'is_open'
]
==
1
)
{
$where
[
'f.is_open'
]
=
1
;
}
else
{
$where
[
'f.is_open'
]
=
0
;
}
$where
[
'a.type'
]
=
[
'in'
,
'4,5'
];
}
$fields
=
'a.create_time,a.id,a.order_id,a.pay_log_id,a.refund_money,a.type,a.agent_id,a.agent_name,b.house_id,a.status,'
;
...
...
@@ -3272,14 +3281,14 @@ class Finance extends Basic
}
$data
[
'list'
]
=
$list
;
//加时间条件
if
(
$is_show
)
{
$data
[
'money_total'
]
=
$order
->
getMoneyTotal
(
$where
,
'a.real_money'
);
//总额
}
else
{
$data
[
'money_total'
]
=
''
;
}
//
//加时间条件
//
if ($is_show) {
//
$data['money_total'] = $order->getMoneyTotal($where, 'a.real_money'); //总额
//
} else {
//
$data['money_total'] = '';
//
}
$data
[
'list'
]
=
$this
->
numberTransitionString
(
$data
[
'list'
]);
$excel_data
=
[];
foreach
(
$data
[
'list'
]
as
$k
=>
$v
)
{
$excel_data_
=
[];
$excel_data_
[]
=
$v
[
'create_time'
];
//提交时间
...
...
application/index/view/finance/refundList.html
View file @
63878cd4
...
...
@@ -355,6 +355,11 @@
<option
value=
"1"
>
是
</option>
<option
value=
"0"
>
否
</option>
</select>
<select
class=
"form-control btn2 ld-Marheight"
id=
"is_open"
>
<option
value=
"-1"
>
是否开业
</option>
<option
value=
"0"
>
否
</option>
<option
value=
"1"
>
是
</option>
</select>
<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=
"export"
style=
"float: left;"
>
导出报表
</span>
...
...
application/model/ORefundModel.php
View file @
63878cd4
...
...
@@ -232,6 +232,7 @@ class ORefundModel extends Model{
->
join
(
'a_agents c'
,
'a.agent_id = c.id'
,
'left'
)
->
join
(
'o_paylog d'
,
'a.pay_log_id = d.id'
,
'left'
)
->
join
(
'o_refund_log e'
,
'a.id = e.refund_id'
,
'left'
)
->
join
(
'o_bargain f'
,
'd.bargain_id = f.id'
,
'left'
)
->
where
(
$params
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
...
...
@@ -247,6 +248,7 @@ class ORefundModel extends Model{
->
join
(
'a_agents c'
,
'a.agent_id = c.id'
,
'left'
)
->
join
(
'o_paylog d'
,
'a.pay_log_id = d.id'
,
'left'
)
->
join
(
'o_refund_log e'
,
'a.id = e.refund_id'
,
'left'
)
->
join
(
'o_bargain f'
,
'd.bargain_id = f.id'
,
'left'
)
->
where
(
$params
)
->
order
(
$order_
)
->
group
(
'a.id'
)
...
...
@@ -265,6 +267,7 @@ class ORefundModel extends Model{
->
join
(
'a_agents c'
,
'a.agent_id = c.id'
,
'left'
)
->
join
(
'o_paylog d'
,
'a.pay_log_id = d.id'
,
'left'
)
->
join
(
'o_refund_log e'
,
'a.id = e.refund_id'
,
'left'
)
->
join
(
'o_bargain f'
,
'd.bargain_id = f.id'
,
'left'
)
->
where
(
$params
)
->
group
(
'a.id'
)
->
count
();
...
...
@@ -306,6 +309,7 @@ class ORefundModel extends Model{
->
join
(
'a_agents c'
,
'a.agent_id = c.id'
,
'left'
)
->
join
(
'o_paylog d'
,
'a.pay_log_id = d.id'
,
'left'
)
->
join
(
'o_refund_log e'
,
'a.id = e.refund_id'
,
'left'
)
->
join
(
'o_bargain f'
,
'd.bargain_id = f.id'
,
'left'
)
->
where
(
$params
)
->
group
(
'a.id'
)
->
select
();
...
...
public/resource/js/getCollection.js
View file @
63878cd4
...
...
@@ -1281,8 +1281,8 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
// var is_selt = $('#is_type').val();
// var get_id = $('#get_id').val();
// var status = refund.check_status;
receiv
.
buildSearchParams
();
var
_url
=
'/index/getCollectionExcel
'
+
'
?'
;
//
receiv.buildSearchParams();
var
_url
=
'/index/getCollectionExcel?'
;
window
.
open
(
_url
+
receiv
.
buildSearchParamsLiu
);
},
...
...
public/resource/js/refundList.js
View file @
63878cd4
...
...
@@ -213,6 +213,15 @@ define(['doT', 'text!temp/refund_template_tpl.html', 'css!style/home.css', 'ckfi
refund
.
getList
(
1
);
}
})
$
(
"#changed_type"
).
click
(
function
()
{
var
type
=
$
(
this
).
val
();
if
(
type
==
4
||
type
==
5
)
{
$
(
"#is_open"
).
removeAttr
(
"disabled"
);
}
else
{
$
(
"#is_open"
).
attr
(
"disabled"
,
"disabled"
);
$
(
"#is_open"
).
val
(
-
1
);
}
});
},
...
...
@@ -520,7 +529,7 @@ define(['doT', 'text!temp/refund_template_tpl.html', 'css!style/home.css', 'ckfi
getList
:
function
(
no
){
var
that
=
refund
;
that
.
pageNo
=
no
;
var
params
=
that
.
buildSearchParams
();
var
params
=
that
.
buildSearchParams
(
0
);
params
.
pageNo
=
that
.
pageNo
;
params
.
pageSize
=
that
.
pageSize
;
$
.
get
(
'/index/refundList'
,
params
,
function
(
data
){
...
...
@@ -571,31 +580,33 @@ define(['doT', 'text!temp/refund_template_tpl.html', 'css!style/home.css', 'ckfi
//退款 审核
exportExcel
:
function
()
{
var
start_time
=
$
(
'#comit_time_start'
).
val
();
var
end_time
=
$
(
'#comit_time_end'
).
val
();
var
income_start_time
=
$
(
'#into_time_start'
).
val
();
var
income_end_time
=
$
(
'#into_time_end'
).
val
();
var
type
=
$
(
'#changed_type'
).
val
();
var
order_id
=
$
(
'#changed_id'
).
val
();
var
id
=
$
(
'#back_id_money'
).
val
();
var
house_id
=
$
(
'#shoped_id'
).
val
();
var
address
=
$
(
'#shoped_addr'
).
val
();
var
district_id
=
$
(
'#commit_home'
).
val
();
var
store_id
=
$
(
'#commit_shop'
).
val
();
var
agent_id
=
refund
.
agent_id_phone
;
var
phone
=
$
(
'#comit_phone'
).
val
();
var
choose_type
=
$
(
'.btn-group'
).
find
(
'.btn-info'
).
html
();
var
is_self
=
$
(
'#is_type'
).
val
();
var
pay_log_id
=
$
(
'#get_id'
).
val
();
var
status
=
refund
.
check_status
;
// var start_time = $('#comit_time_start').val();
// var end_time = $('#comit_time_end').val();
// var income_start_time = $('#into_time_start').val();
// var income_end_time = $('#into_time_end').val();
// var type = $('#changed_type').val();
// var order_id = $('#changed_id').val();
// var id = $('#back_id_money').val();
// var house_id = $('#shoped_id').val();
// var address = $('#shoped_addr').val();
// var district_id = $('#commit_home').val();
// var store_id = $('#commit_shop').val();
// var agent_id = refund.agent_id_phone;
// var phone = $('#comit_phone').val();
// var choose_type = $('.btn-group').find('.btn-info').html();
// var is_self = $('#is_type').val();
// var pay_log_id = $('#get_id').val();
// var status = refund.check_status;
var
_url
=
'/index/refundListExcel'
+
'?'
;
window
.
open
(
_url
+
'start_time='
+
start_time
+
'&end_time='
+
end_time
+
'&income_start_time='
+
income_start_time
+
'&income_end_time='
+
income_end_time
+
'&type='
+
type
+
'&order_id='
+
order_id
+
'&id='
+
id
+
'&house_id='
+
house_id
+
'&address='
+
address
+
'&district_id='
+
district_id
+
'&store_id='
+
store_id
+
'&agent_id='
+
agent_id
+
'&phone='
+
phone
+
'&choose_type='
+
choose_type
+
'&is_self='
+
is_self
+
'&pay_log_id='
+
pay_log_id
+
'&status='
+
status
);
var
_url
=
'/index/refundListExcel?'
;
// window.open(_url + 'start_time=' + start_time + '&end_time=' + end_time + '&income_start_time=' + income_start_time + '&income_end_time=' + income_end_time + '&type=' + type + '&order_id=' + order_id + '&id=' + id + '&house_id=' + house_id + '&address=' + address + '&district_id=' + district_id+ '&store_id=' + store_id+ '&agent_id=' + agent_id+ '&phone=' + phone+ '&choose_type=' + choose_type +'&is_self=' + is_self+'&pay_log_id=' + pay_log_id+'&status=' + status);
window
.
open
(
_url
+
refund
.
buildSearchParams
(
1
));
},
/**
* 获取查询参数
*/
buildSearchParams
:
function
(){
buildSearchParams
:
function
(
is_excel
){
var
that
=
refund
;
var
commite_time_start
=
$
(
'#comit_time_start'
).
val
();
var
commite_time_end
=
$
(
'#comit_time_end'
).
val
();
...
...
@@ -610,64 +621,94 @@ define(['doT', 'text!temp/refund_template_tpl.html', 'css!style/home.css', 'ckfi
var
commit_shop
=
$
(
'#commit_shop'
).
val
();
var
comit_name
=
that
.
agent_id_phone
;
//$('#comit_name').val();
var
comit_phone
=
$
(
'#comit_phone'
).
val
();
var
choose_type
=
$
(
'.btn-group'
).
find
(
'.btn-info'
).
html
();
//
var choose_type = $('.btn-group').find('.btn-info').html();
var
is_selt
=
$
(
'#is_type'
).
val
();
var
get_id
=
$
(
'#get_id'
).
val
();
var
is_open
=
$
(
'#is_open'
).
val
();
var
params
=
{};
var
paramsStr
=
""
;
if
(
get_id
)
{
params
.
pay_log_id
=
get_id
;
paramsStr
+=
"pay_log_id="
+
get_id
+
'&'
;
}
if
(
choose_type
)
{
params
.
choose_type
=
choose_type
;
}
// if ( choose_type ) {
// params.choose_type = choose_type;
// paramsStr += "choose_type=" + choose_type +'&';
// }
if
(
commite_time_start
)
{
params
.
start_time
=
commite_time_start
;
paramsStr
+=
"start_time="
+
commite_time_start
+
'&'
;
}
if
(
commite_time_end
)
{
params
.
end_time
=
commite_time_end
;
paramsStr
+=
"end_time="
+
commite_time_end
+
'&'
;
}
if
(
into_time_start
)
{
params
.
income_start_time
=
into_time_start
;
paramsStr
+=
"income_start_time="
+
into_time_start
+
'&'
;
}
if
(
into_time_end
)
{
params
.
income_end_time
=
into_time_end
;
paramsStr
+=
"income_end_time="
+
into_time_end
+
'&'
;
}
if
(
changed_type
)
{
params
.
type
=
changed_type
;
paramsStr
+=
"type="
+
changed_type
+
'&'
;
}
if
(
changed_id
)
{
params
.
order_id
=
changed_id
;
paramsStr
+=
"order_id="
+
changed_id
+
'&'
;
}
if
(
back_id_money
)
{
params
.
id
=
back_id_money
;
paramsStr
+=
"id="
+
back_id_money
+
'&'
;
}
if
(
shoped_id
)
{
params
.
house_id
=
shoped_id
;
paramsStr
+=
"house_id="
+
shoped_id
+
'&'
;
}
if
(
shoped_addr
)
{
params
.
address
=
shoped_addr
;
paramsStr
+=
"address="
+
shoped_addr
+
'&'
;
}
if
(
commit_home
)
{
params
.
district_id
=
commit_home
;
paramsStr
+=
"district_id="
+
commit_home
+
'&'
;
}
if
(
commit_shop
)
{
params
.
store_id
=
commit_shop
;
paramsStr
+=
"store_id="
+
commit_shop
+
'&'
;
}
if
(
comit_name
)
{
params
.
agent_id
=
comit_name
;
paramsStr
+=
"agent_id="
+
comit_name
+
'&'
;
}
if
(
comit_phone
)
{
if
(
comit_phone
[
0
]
==
"1"
&&
comit_phone
.
length
==
11
)
{
params
.
phone
=
comit_phone
;
paramsStr
+=
"phone="
+
comit_phone
+
'&'
;
}
else
{
alert
(
"请输入正确的手机号码"
)
}
}
if
(
is_selt
){
params
.
is_self
=
is_selt
;
paramsStr
+=
"is_self="
+
is_selt
+
'&'
;
}
if
(
is_open
>
-
1
)
{
params
.
is_open
=
is_open
;
paramsStr
+=
"is_open="
+
is_open
+
'&'
;
}
params
.
status
=
that
.
check_status
;
return
params
;
paramsStr
+=
"status="
+
that
.
check_status
;
if
(
is_excel
)
{
return
paramsStr
;
}
else
{
return
params
;
}
},
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment