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
2b73a757
Commit
2b73a757
authored
Mar 11, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
退款审核明细表
parent
1e7c0800
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
25 deletions
+71
-25
Finance.php
application/index/controller/Finance.php
+54
-11
ORefundModel.php
application/model/ORefundModel.php
+13
-0
UpdateActivityTask.php
application/task/controller/UpdateActivityTask.php
+4
-14
No files found.
application/index/controller/Finance.php
View file @
2b73a757
...
...
@@ -961,35 +961,78 @@ class Finance extends Basic
}
}
$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
,'
;
$fields
.=
'd.income_time,a.
type,c.stor
e_id'
;
$list
=
$refund
->
getCheckRefundList
(
$pageNo
,
$pageSize
,
'a.id DESC'
,
$fields
,
$where
);
$fields
=
'a.create_time,a.id,a.
type,a.order_id,a.pay_log_id,a.refund_money
,'
;
$fields
.=
'd.income_time,a.
status,c.store_id,a.agent_name,b.hous
e_id'
;
$list
=
$refund
->
getCheckRefundList
ForExcel
(
'a.id DESC'
,
$fields
,
$where
);
foreach
(
$list
as
$k
=>
$v
)
{
if
((
$v
[
'status'
]
==
0
)
or
(
$v
[
'status'
]
==
1
)
)
{
$v
[
'status'
]
=
'审核中'
;
}
elseif
(
$v
[
'status'
]
==
2
)
{
$v
[
'status'
]
=
'退款成功'
;
}
elseif
(
$v
[
'status'
]
==
3
)
{
$v
[
'status'
]
=
'已审核'
;
}
elseif
(
$v
[
'status'
]
==
4
)
{
$v
[
'status'
]
=
'驳回'
;
}
else
{
$v
[
'status'
]
=
''
;
}
if
(
$v
[
'type'
]
==
1
)
{
$v
[
'type'
]
=
'意向金转定'
;
}
elseif
(
$v
[
'type'
]
==
2
)
{
$v
[
'type'
]
=
'退保管金'
;
}
elseif
(
$v
[
'type'
]
==
3
)
{
$v
[
'type'
]
=
'保管金转定'
;
}
elseif
(
$v
[
'type'
]
==
4
)
{
$v
[
'type'
]
=
'退中介费'
;
}
elseif
(
$v
[
'type'
]
==
5
)
{
$v
[
'type'
]
=
'退案场费'
;
}
elseif
(
$v
[
'type'
]
==
0
)
{
$v
[
'type'
]
=
'退意向金'
;
}
else
{
$v
[
'type'
]
=
''
;
}
if
(
empty
(
$v
[
'house_id'
]))
{
$
list
[
$k
]
[
'address'
]
=
''
;
$
v
[
'address'
]
=
''
;
}
else
{
$
list
[
$k
]
[
'address'
]
=
$m_house
->
getHouseValue
(
'internal_address'
,
[
'id'
=>
$v
[
'house_id'
]]);
$
v
[
'address'
]
=
$m_house
->
getHouseValue
(
'internal_address'
,
[
'id'
=>
$v
[
'house_id'
]]);
}
if
(
empty
(
$v
[
'store_id'
]))
{
$
list
[
$k
]
[
'store_name'
]
=
''
;
$
v
[
'store_name'
]
=
''
;
}
else
{
$
list
[
$k
]
[
'store_name'
]
=
$m_store
->
getStoreKeyById
(
'store_name'
,
[
'id'
=>
$v
[
'store_id'
]]);
$
v
[
'store_name'
]
=
$m_store
->
getStoreKeyById
(
'store_name'
,
[
'id'
=>
$v
[
'store_id'
]]);
}
$excel_data_
=
[];
$excel_data_
[]
=
$v
[
'create_time'
];
$excel_data_
[]
=
$v
[
'id'
];
$excel_data_
[]
=
$v
[
'status'
];
$excel_data_
[]
=
$v
[
'order_id'
];
$excel_data_
[]
=
$v
[
'pay_log_id'
];
$excel_data_
[]
=
$v
[
'refund_money'
];
$excel_data_
[]
=
$v
[
'income_time'
];
$excel_data_
[]
=
$v
[
'type'
];
$excel_data_
[]
=
$v
[
'agent_name'
];
$excel_data_
[]
=
$v
[
'store_name'
];
$excel_data_
[]
=
$v
[
'house_id'
];
$excel_data_
[]
=
$v
[
'address'
];
$excel_data
[]
=
$excel_data_
;
}
$total_money
=
$refund
->
getSumMoney
(
$where
);
dump
(
$list
);
exit
;
if
(
!
$list
){
return
'<script>alert("
退款审核表
失败");window.close();</script>'
;
return
'<script>alert("
导出
失败");window.close();</script>'
;
}
$export
=
new
ExportExcelUntil
();
$title
=
[
'提交时间'
,
'退款ID'
,
'状态'
,
'订单ID'
,
'收款ID'
,
'退款金额'
,
'入账日期'
,
'退款类型'
,
'提交人'
,
'所属门店'
,
'商铺ID'
,
'商铺地址'
];
$export
->
exportTable
(
'退款审核
退款总计:'
.
$total_money
,
$list
,
11
,
'实收明细表
'
,
$title
);
$export
->
exportTable
(
'退款审核
明细表'
,
$excel_data
,
11
,
'退款审核明细表 (退款总计:'
.
$total_money
.
')
'
,
$title
);
return
''
;
}
...
...
application/model/ORefundModel.php
View file @
2b73a757
...
...
@@ -237,6 +237,19 @@ class ORefundModel extends Model{
->
select
();
}
public
function
getCheckRefundListForExcel
(
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
{
return
$this
->
db_
->
alias
(
'a'
)
->
field
(
$field
)
->
join
(
'o_order b'
,
'a.order_id = b.id'
,
'left'
)
->
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'
)
->
where
(
$params
)
->
order
(
$order_
)
->
group
(
'a.id'
)
->
select
();
}
/**
* 退款列表
*
...
...
application/task/controller/UpdateActivityTask.php
View file @
2b73a757
...
...
@@ -55,25 +55,15 @@ class UpdateActivityTask
continue
;
}
#开始时间大于当时前时间
if
(
$v
[
'activity_start_time'
]
>
date
(
"Y-m-d H:i:s"
,
time
())){
//开始时间大于当时前时间
// dump('开始时间大于当时前时间');exit;
$res
=
$this
->
m_active
->
updateStatus
(
$v
[
'id'
],
5
);
// dump($res);exit;
$this
->
m_active
->
updateStatus
(
$v
[
'id'
],
5
);
continue
;
}
#结束时间小于当时前时间
if
(
$v
[
'activity_end_time'
]
<
date
(
"Y-m-d H:i:s"
,
time
())){
//结束时间小于当时前时间
// dump('结束时间小于当时前时间');exit;
$res
=
$this
->
m_active
->
updateStatus
(
$v
[
'id'
],
3
);
continue
;
}
if
(
(
$v
[
'get_number'
]
>=
$v
[
'available'
])
&&
(
$v
[
'available'
]
>
0
)
){
//已领取数量大于可领数
// dump('已领取数量大于可领数');exit;
$res
=
$this
->
m_active
->
updateStatus
(
$v
[
'id'
],
2
);
$this
->
m_active
->
updateStatus
(
$v
[
'id'
],
3
);
continue
;
}
}
...
...
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