Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
任超
/
js.portalStaticPage
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
66923ad7
authored
2020-12-16 09:15:56 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:图片上传
1 parent
5c68b3ad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
16 deletions
staticJs/onlineApply/houseFill.js
staticViews/onlineApply/houseFill.html
staticJs/onlineApply/houseFill.js
View file @
66923ad
...
...
@@ -154,15 +154,35 @@ function handleUpdate(e, index, sizeNum) {
let
name
=
e
.
files
[
0
].
name
;
let
fileul
=
$
(
"#fileULName"
+
index
);
if
(
fileul
.
find
(
"li"
).
length
>=
slsqxx
.
slclList
[
index
].
fs
)
{
layer
.
msg
(
'已经完成上传最大限度'
,
{
icon
:
5
});
return
false
}
else
{
_uploadSlcl
(
e
.
files
[
0
],
slsqxx
.
slclList
[
index
].
bsmCl
,
$
(
"#fileULName"
+
index
),
sizeNum
);
fileul
.
append
(
'<li class="fileName">'
+
'<span title="'
+
name
+
'">'
+
name
+
'</span>'
+
'<img class="operation" src="../../staticImages/chacha.png">'
+
'</li>'
);
}
}
$
(
document
).
on
(
"click"
,
".pictureUpload"
,
function
(
e
)
{
layer
.
msg
(
'已经完成上传最大限度'
,
{
icon
:
5
});
})
$
(
document
).
on
(
"click"
,
".fileListName .fileName .operation"
,
function
(
e
)
{
$
(
this
).
parent
().
remove
();
var
that
=
this
$
.
ajax
({
type
:
"post"
,
//提交方式
url
:
portal
.
api_url
+
"/portal/FillInformation/deleteSlcl"
,
//路径
dataType
:
"json"
,
data
:
{
'bsmSlclmx'
:
$
(
that
).
attr
(
'bsmSlclmx'
)
},
//数据,这里使用的是Json格式进行传输
success
:
function
(
result
)
{
//返回数据根据结果进行相应的处理
if
(
result
.
code
==
200
)
{
$
(
that
).
parent
().
remove
();
layer
.
msg
(
'删除成功!'
);
}
else
{
layer
.
msg
(
'删除失败!'
);
}
}
});
})
// // 图片上传
function
_uploadSlcl
(
flieList
,
bsmCl
,
fileul
,
sizeNum
)
{
...
...
@@ -180,10 +200,13 @@ function _uploadSlcl(flieList, bsmCl, fileul, sizeNum) {
//数据,这里使用的是Json格式进行传输
success
:
function
(
result
)
{
//返回数据根据结果进行相应的处理
if
(
result
.
code
==
200
)
{
fileul
.
parent
().
find
(
'.fileListName .fileName'
).
eq
(
fileul
.
find
(
"li"
).
length
-
1
).
find
(
'.operation'
).
attr
(
'bsmSlclmx'
,
result
.
data
[
0
].
bsmSlclmx
)
if
(
fileul
.
find
(
'.fileName'
).
length
===
sizeNum
)
{
fileul
.
parent
().
find
(
'.pictureUpload'
).
show
()
layer
.
msg
(
'上传成功,并且以上传最大限度!'
);
fileul
.
parent
().
find
(
'.file_name'
).
css
(
"z-index"
,
"15"
);
fileul
.
parent
().
find
(
'.updatetext'
).
hide
()
fileul
.
parent
().
find
(
'.update'
).
attr
(
'src'
,
'../../staticImages/Yes.png'
)
}
else
{
layer
.
msg
(
'上传成功!'
);
}
...
...
staticViews/onlineApply/houseFill.html
View file @
66923ad
...
...
@@ -113,20 +113,6 @@
<!-----------------资料上传------------------ -->
<div
class=
"data_upload"
id=
"clxx"
>
<h3>
资料上传
</h3>
<!-- <div class="img_update">
<div class="fileBox">
<div class="fileSpan vm">
<input type="file" multiple id="fileInput" numList="2" onchange="handleUpdate(this,'fileInput')"/>
<input type="file" multiple id="fileInput" numList="2" onchange="handleUpdate(this,'fileInput')"/>
<div class="file_name">
<img class="update" src="../../staticImages/update.png">
<p class="updatetext">点击文件上传</p>
</div>
<div class="fileListName"></div>
</div>
<div class="certificate">登记申请书(2份)</div>
</div>
</div> -->
</div>
<div
class=
"next_button submitButton"
>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
onclick=
"skipClick()"
>
...
...
Please
register
or
sign in
to post a comment