Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨建斌
/
page
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
1
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
53b71268
authored
2018-03-28 15:34:22 +0800
by
Zelig
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
贷后 还款管理 编辑
1 parent
5d4817be
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
237 additions
and
87 deletions
application/controllers/Loan.php
application/hooks/CheckLogin.php
application/libraries/Configure/Configure.php
application/libraries/Configure/drivers/Configure_enum.php
application/libraries/Enum/Enum.php
application/libraries/Enum/drivers/Enum_repaymentPlan.php
application/views/loan/还款编辑.php
application/controllers/Loan.php
View file @
53b7126
...
...
@@ -45,11 +45,20 @@ class Loan extends CI_Controller {
}
}
public
function
edit
(
$state
=
1
)
public
function
edit
(
$state
=
1
,
$id
=
null
)
{
$this
->
load
->
driver
(
'enum'
);
$this
->
load
->
driver
(
'configure'
);
switch
(
$state
)
{
case
1
:
$this
->
load
->
view
(
'/loan/还款编辑'
);
$url
=
$this
->
config
->
item
(
'apiBaseUrl'
)
.
'loanAfter/repaymentPlan/'
.
$id
;
$result
=
file_get_contents
(
$url
);
$json
=
json_decode
(
$result
);
$ret
=
$json
->
data
;
$ret
->
enumRepayStatus
=
$this
->
enum
->
repaymentPlan
->
status
();
$this
->
load
->
view
(
'/loan/还款编辑'
,
$ret
);
break
;
case
2
:
$this
->
load
->
view
(
'/loan/催收编辑'
);
...
...
application/hooks/CheckLogin.php
View file @
53b7126
...
...
@@ -348,4 +348,4 @@ class CheckLogin
}
}
}
\ No newline at end of file
}
...
...
application/libraries/Configure/Configure.php
0 → 100644
View file @
53b7126
<?php
class
Configure
extends
CI_Driver_Library
{
public
function
__construct
()
{
$this
->
valid_drivers
=
[
'enum'
];
}
}
application/libraries/Configure/drivers/Configure_enum.php
0 → 100644
View file @
53b7126
<?php
class
Configure_enum
extends
CI_Driver
{
public
$CI
;
public
function
__construct
()
{
$this
->
CI
=
&
get_instance
();
}
public
function
repayment
()
{
$url
=
$this
->
CI
->
config
->
item
(
'apiBaseUrl'
)
.
'config/enum/repayment'
;
$result
=
file_get_contents
(
$url
);
$json
=
json_decode
(
$result
);
$ret
=
$json
->
data
;
return
$ret
;
}
}
application/libraries/Enum/Enum.php
0 → 100644
View file @
53b7126
<?php
class
Enum
extends
CI_Driver_Library
{
public
function
__construct
()
{
$this
->
valid_drivers
=
[
'repaymentPlan'
];
}
}
application/libraries/Enum/drivers/Enum_repaymentPlan.php
0 → 100644
View file @
53b7126
<?php
class
Enum_repaymentPlan
extends
CI_Driver
{
public
$CI
;
public
function
__construct
()
{
$this
->
CI
=
&
get_instance
();
}
public
function
status
()
{
$url
=
$this
->
CI
->
config
->
item
(
'apiBaseUrl'
)
.
'enum/repaymentPlan/status'
;
$result
=
file_get_contents
(
$url
);
$json
=
json_decode
(
$result
);
$ret
=
$json
->
data
;
return
$ret
;
}
public
function
source
()
{
$url
=
$this
->
CI
->
config
->
item
(
'apiBaseUrl'
)
.
'enum/repaymentPlan/source'
;
$result
=
file_get_contents
(
$url
);
$json
=
json_decode
(
$result
);
$ret
=
$json
->
data
;
return
$ret
;
}
}
application/views/loan/还款编辑.php
View file @
53b7126
...
...
@@ -2,90 +2,147 @@
<body>
<div
class=
"panel panel-default mb-20"
>
<div
class=
"panel-body cl"
>
<div
class=
"row cl"
>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
申请人
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
""
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
身份证
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
""
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
手机号
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
""
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
网点
</label>
<span
class=
"form-control select-box"
>
<select
class=
"select"
size=
"1"
>
<option>
请选择
</option>
</select>
</span>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
产品名称
</label>
<span
class=
"form-control select-box"
>
<select
class=
"select"
size=
"1"
>
<option>
请选择
</option>
</select>
</span>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
借款金额
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
""
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
本期应还金额
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
""
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
已还金额
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
""
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
罚息
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
""
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
滞纳金
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
""
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
期数
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
""
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
还款方式
</label>
<span
class=
"form-control select-box"
>
<select
class=
"select"
size=
"1"
>
<option>
请选择
</option>
</select>
</span>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
本期应还款日
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
""
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
实际还款日
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
""
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
是否逾期
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
""
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
逾期天数
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
""
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
还款状态
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
""
>
<form>
<div
class=
"panel-body cl"
>
<div
class=
"row cl"
>
<input
type=
"hidden"
name=
"id"
value=
"
<?=
$id
?>
"
>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
订单号
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
"
<?=
$orderNumber
?>
"
name=
"orderNumber"
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
申请人
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
"
<?=
$proposerName
?>
"
name=
"proposerName"
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
身份证
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
"
<?=
$idNumber
?>
"
name=
"idNumber"
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
手机号
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
"
<?=
$phoneNumber
?>
"
name=
"phoneNumber"
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
客户经理
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
"
<?=
$clientManager
?>
"
name=
"clientManager"
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
网点
</label>
<span
class=
"form-control select-box"
>
<select
class=
"select"
size=
"1"
name=
"branchName"
>
<?php
foreach
(
$this
->
session
->
departments
as
$k
=>
$v
)
:?>
<
option
value
=
"<?=
$v->id
?>"
<?=
$branchName
==
$v
->
name
?
'selected'
:
''
?>
>
<?=
$v
->
name
?>
</option>
<?php
if
(
$v
->
children
&&
!
empty
(
$v
->
children
))
:?>
<?
php
foreach
(
$v
->
children
as
$kk
=>
$vv
)
:?>
<
option
value
=
"<?=
$vv->id
?>"
><?=
$vv
->
name
?>
</option>
<?php
endforeach
;
?>
<?php
endif
;
?>
<?php
endforeach
;
?>
</select>
</span>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
产品名称
</label>
<?=
$productName
?>
<span
class=
"form-control select-box"
>
<select
class=
"select"
size=
"1"
name=
"productName"
>
<?php
foreach
(
$this
->
session
->
products
as
$k
=>
$v
)
:?>
<
option
value
=
"<?=
$v->id
?>"
<?=
$productName
==
$v
->
productName
?
'selected'
:
''
?>
>
<?=
$v
->
productName
?>
</option>
<?php
endforeach
;
?>
</select>
</span>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
借款金额
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
"
<?=
$applyAmount
?>
"
name=
"applyAmount"
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
审批金额
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
"
<?=
$ratifyAmount
?>
"
name=
"ratifyAmount"
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
进件时间
</label>
<input
type=
"text"
class=
"form-control input-text Wdate"
onfocus=
"WdatePicker()"
value=
"
<?=
date
(
"Y-m-d"
,
$enterDate
/
1000
)
?>
"
name=
"enterDate"
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
当月应还金额
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
"
<?=
$currentBalance
?>
"
name=
"currentBalance"
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
已还金额
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
""
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
罚息
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
""
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
滞纳金
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
"
<?=
$overdueFine
?>
"
name=
"overdueFine"
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
放款日期
</label>
<input
type=
"text"
class=
"form-control input-text Wdate"
onfocus=
"WdatePicker()"
value=
"
<?=
date
(
"Y-m-d"
,
$loanDate
/
1000
)
?>
"
name=
"loanDate"
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
总期数
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
"
<?=
$totalPeriods
?>
"
name=
"totalPeriods"
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
当前期数
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
"
<?=
$currentPeriods
?>
"
name=
"currentPeriods"
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
还款方式
</label>
<span
class=
"form-control select-box"
>
<select
class=
"select"
size=
"1"
>
<option>
请选择
</option>
</select>
</span>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
计划还款日期
</label>
<input
type=
"text"
class=
"form-control input-text Wdate"
onfocus=
"WdatePicker()"
value=
"
<?=
date
(
"Y-m-d"
,
$planRepaymentDate
/
1000
)
?>
"
name=
"planRepaymentDate"
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
实际还款日
</label>
<input
type=
"text"
class=
"form-control input-text Wdate"
onfocus=
"WdatePicker()"
value=
"
<?=
$realRepaymentDate
?
date
(
"Y-m-d"
,
$realRepaymentDate
/
1000
)
:
''
?>
"
name=
"realRepaymentDate"
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
是否逾期
</label>
<span
class=
"form-control select-box"
>
<select
class=
"select"
size=
"1"
name=
"hasDue"
>
<option
value=
"1"
<?=
$hasDue
==
1
?
'selected'
:
''
?>
>
是
</option>
<option>
否
</option>
</select>
</span>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
逾期天数
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
"
<?=
$dueDay
?>
"
name=
"dueDay"
>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
还款状态
</label>
<span
class=
"form-control select-box"
>
<select
class=
"select"
size=
"1"
name=
"repayStatus"
>
<?php
foreach
(
$enumRepayStatus
as
$k
=>
$v
)
:
?>
<option
value=
"
<?=
$k
?>
"
<?=
$k
==
$repayStatus
?
'selected'
:
''
?>
>
<?=
$v
?>
</option>
<?php
endforeach
?>
</select>
</span>
</div>
<div
class=
"form-group col-sm-4 col-md-2"
>
<label>
是否结清
</label>
<span
class=
"form-control select-box"
>
<select
class=
"select"
size=
"1"
name=
"hasClean"
>
<option
value=
"1"
<?=
$hasClean
==
1
?
'selected'
:
''
?>
>
是
</option>
<option>
否
</option>
</select>
</span>
</div>
</div>
</div>
</
div
>
</
form
>
</div>
<div
class=
"row cl col-sm-12 pb-20"
>
...
...
@@ -101,8 +158,31 @@
<script>
function
save
()
{
window
.
parent
.
reload
();
layer_close
();
var
data
=
$
(
"form"
).
serializeJson
();
console
.
log
(
data
);
$
.
ajax
({
type
:
'put'
,
url
:
apiBaseUrl
+
'loanAfter/repaymentPlan'
,
cache
:
false
,
data
:
JSON
.
stringify
(
data
),
dataType
:
'json'
,
contentType
:
"application/json; charset=UTF-8"
,
success
:
function
(
data
)
{
if
(
data
.
msg
)
{
layer
.
alert
(
data
.
msg
);
}
else
if
(
data
.
code
!=
0
)
{
layer
.
alert
(
'操作失败'
);
}
else
{
layer
.
alert
(
'操作成功'
);
}
},
error
:
function
()
{
layer
.
alert
(
"操作失败"
)
}
})
// window.parent.reload();
// layer_close();
}
</script>
</body>
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment