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
ad90a9ee
authored
2018-03-22 22:49:11 +0800
by
yangjianbin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
init
1 parent
48392166
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
6 deletions
application/views/tool/cal.php
application/views/tool/cal.php
View file @
ad90a9e
...
...
@@ -12,14 +12,14 @@
</span>
</div>
<form>
<form
id=
"form"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-body"
>
<div
class=
"row cl"
>
<div
class=
"form-group col-sm-3 col-md-2"
>
<label>
产品名称
</label>
<span
class=
"form-control select-box"
>
<select
class=
"select"
size=
"1"
id=
"product"
>
<select
class=
"select"
size=
"1"
id=
"product
Id
"
>
<?php
foreach
(
$this
->
session
->
products
as
$k
=>
$v
)
:?>
<
option
data
-
repaymentMode
=
"<?=
$v->repaymentMode
?>"
data
-
loanDeadline
=
"<?=
$v->loanDeadline
?>"
value
=
"<?=
$v->id
?>"
><?=
$v
->
productName
?>
</option>
<?php
endforeach
;
?>
...
...
@@ -28,7 +28,7 @@
</div>
<div
class=
"form-group col-sm-3 col-md-2"
>
<label>
借款金额
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
""
>
<input
name=
"borrowAmount"
type=
"text"
class=
"form-control input-text"
value=
""
>
<span
class=
"glyphicon form-control-feedback"
>
元
</span>
</div>
<div
class=
"form-group col-sm-3 col-md-2"
>
...
...
@@ -49,12 +49,12 @@
<div
class=
"row cl"
>
<div
class=
"form-group col-sm-3 col-md-2"
>
<label>
每月应还
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
""
disabled
>
<input
type=
"text"
id=
"totalAmount"
class=
"form-control input-text"
value=
""
disabled
>
<span
class=
"glyphicon form-control-feedback"
>
元
</span>
</div>
<div
class=
"form-group col-sm-3 col-md-2"
>
<label>
总共应还
</label>
<input
type=
"text"
class=
"form-control input-text"
value=
""
disabled
>
<input
type=
"text"
id=
"totalRepay"
class=
"form-control input-text"
value=
""
disabled
>
<span
class=
"glyphicon form-control-feedback"
>
元
</span>
</div>
</div>
...
...
@@ -63,7 +63,7 @@
<div
class=
"row cl pb-20 col-sm-12"
>
<div
class=
"col-sm-offset-4 col-sm-2"
>
<input
class=
"btn btn-primary btn-block"
value=
"计算"
type=
"button"
>
<input
class=
"btn btn-primary btn-block"
value=
"计算"
onclick=
"submit()"
type=
"button"
>
</div>
<div
class=
"col-sm-2"
>
<input
class=
"btn btn-warning btn-block"
value=
"重置"
type=
"reset"
>
...
...
@@ -79,6 +79,31 @@
$
(
'#repaymentMode'
).
val
(
data
.
repaymentmode
);
$
(
'#loanDeadline'
).
val
(
data
.
loandeadline
);
})
function
submit
(){
var
borrowAmount
=
$
(
'[name=borrowAmount]'
).
val
();
var
productId
=
$
(
'[name=productId]'
).
val
();
var
str
=
'borrowAmount='
+
borrowAmount
+
'&productId='
+
productId
;
$
.
ajax
({
type
:
'get'
,
url
:
apiBaseUrl
+
'application/tool/interest?'
+
str
,
cache
:
false
,
dataType
:
'json'
,
contentType
:
"application/json; charset=UTF-8"
,
success
:
function
(
data
){
if
(
data
.
code
!=
0
){
layer
.
alert
(
'请求失败'
);
}
else
{
$
(
'#totalRepay'
).
val
(
data
.
data
.
totalRepay
);
$
(
'#totalAmount'
).
val
(
data
.
data
[
0
].
totalAmount
);
}
},
error
:
function
(){
layer
.
alert
(
"请求失败"
)
}
})
}
</script>
</body>
<html>
...
...
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