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
6dfe3907
authored
2018-04-04 20:14:32 +0800
by
Zelig
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
图片上传修改
1 parent
cd43e20e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
34 deletions
application/views/work/资料/资料补录.php
resource/upload.js
application/views/work/资料/资料补录.php
View file @
6dfe390
...
...
@@ -379,14 +379,8 @@
</div>
<div
class=
"form-group col-sm-3 col-md-2"
>
<label
id=
"deadline"
>
贷款期限
</label>
<span
class=
"form-control select-box"
>
<select
class=
"select"
size=
"1"
name=
"applyOrderVO.deadline"
>
<?php
for
(
$i
=
1
;
$i
<=
12
;
$i
++
)
:
?>
<option
<?=
$applyOrderVO
&&
$applyOrderVO
->
deadline
?
'selected'
:
''
?>
value=
"
<?=
$i
?>
"
>
<?=
$i
?>
</option>
<?php
endfor
;
?>
</select>
</span>
<input
type=
"number"
class=
"form-control input-text"
name=
"applyOrderVO.deadline"
value=
"
<?=
$applyOrderVO
?
$applyOrderVO
->
deadline
:
''
?>
"
>
<span
class=
"glyphicon form-control-feedback"
aria-hidden=
"true"
>
期
</span>
</div>
<div
class=
"form-group col-sm-3 col-md-2"
>
<label>
还款方式
</label>
...
...
@@ -481,30 +475,35 @@
var
loc
=
beva
.
locationutil
.
attach
(
'province'
,
'city'
,
'county'
,
'address'
);
$
(
'input[name="applyOrderVO.products"]'
).
on
(
'change'
,
function
()
{
const
limit
=
$
(
this
).
data
(
'limit'
);
const
deadline
=
$
(
this
).
data
(
'deadline'
);
$
(
'#applyMoney'
).
html
(
'申请金额(max: '
+
limit
+
')'
);
$
(
'#deadline'
).
html
(
'贷款期限(max: '
+
deadline
+
')'
);
})
$
(
'input[name="applyOrderVO.applyMoney"]'
).
on
(
'keyup'
,
function
()
{
var
product
=
$
(
'input[name="applyOrderVO.products"]:checked'
);
var
limit
=
product
.
data
(
'limit'
)
if
(
$
(
this
).
val
()
>
limit
)
{
$
(
this
).
val
(
limit
)
// $('input[name="applyOrderVO.products"]').on('change', function () {
// const limit = $(this).data('limit');
// const deadline = $(this).data('deadline');
//
// $('#applyMoney').html('申请金额(max: '+limit+')');
// $('#deadline').html('贷款期限(max: '+deadline+')');
// })
//
// $('input[name="applyOrderVO.applyMoney"]').on('keyup', function () {
// var product = $('input[name="applyOrderVO.products"]:checked');
// var limit = product.data('limit')
//
// if($(this).val() > limit) {
// $(this).val(limit)
// }
// });
$
(
'input[name="applyOrderVO.deadline"]'
).
on
(
'change'
,
function
()
{
// var product = $('input[name="applyOrderVO.products"]:checked');
// var deadline = product.data('deadline')
if
(
$
(
this
).
val
()
%
6
)
{
layer
.
alert
(
'期数只能是6的倍数'
);
$
(
this
).
val
(
''
);
}
});
$
(
'select[name="applyOrderVO.deadline"]'
).
on
(
'change'
,
function
()
{
var
product
=
$
(
'input[name="applyOrderVO.products"]:checked'
);
var
deadline
=
product
.
data
(
'deadline'
)
if
(
$
(
this
).
val
()
>
deadline
)
{
$
(
this
).
val
(
deadline
)
}
// if($(this).val() > deadline) {
// $(this).val(deadline)
// }
});
$
(
"form"
).
validate
({
...
...
resource/upload.js
View file @
6dfe390
...
...
@@ -16,14 +16,19 @@ jQuery(function() {
// 选择文件的按钮。可选。
// 内部根据当前运行是创建,可能是input元素,也可能是flash.
pick
:
'.filePicker'
,
pick
:
{
id
:
'.filePicker'
,
multiple
:
true
},
// 只允许选择文件,可选。
accept
:
{
title
:
'Images'
,
extensions
:
'gif,jpg,jpeg,bmp,png'
,
mimeTypes
:
'image/*'
}
},
fileVal
:
'files'
,
});
// 当有文件添加进来的时候
...
...
@@ -104,8 +109,7 @@ jQuery(function() {
// 文件上传成功,给item添加成功class, 用样式标记上传成功。
uploader
.
on
(
'uploadSuccess'
,
function
(
file
,
response
)
{
var
img
=
$
(
'#'
+
file
.
id
);
img
.
data
(
'id'
,
response
.
data
.
id
);
img
.
addClass
(
'upload-state-done'
);
img
.
data
(
'id'
,
response
.
data
[
0
].
id
);
});
// 文件上传失败,现实上传出错。
...
...
@@ -183,6 +187,7 @@ window.uploadList = function () {
function
removeFile
(
file
)
{
var
$li
=
$
(
'#'
+
file
.
id
);
var
id
=
$
(
'#'
+
file
.
id
).
data
(
'id'
);
console
.
log
();
var
targetUrl
=
'order/ordersource/delete/'
+
id
;
...
...
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