Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sensorConsult
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
zhanglw
sensorConsult
Commits
ab931088
Commit
ab931088
authored
Jun 03, 2023
by
zhanglw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
照片上传
parent
70316fa7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
18 deletions
+53
-18
add.vue
src/views/backstage/customMgt/customTabulate/add.vue
+53
-18
No files found.
src/views/backstage/customMgt/customTabulate/add.vue
View file @
ab931088
...
@@ -38,12 +38,24 @@
...
@@ -38,12 +38,24 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"营业执照:"
class=
"form-cell"
>
<el-form-item
label=
"营业执照:"
class=
"form-cell"
>
<div
class=
"cell-box"
>
<div
class=
"cell-box"
>
<el-input
v-model=
"formData.picFileName"
style=
"width:160px;"
placeholder=
"请上传图片"
disabled
/>
<el-upload
<input
type=
"file"
name=
"image"
@
change=
"excelImport($event)"
>
action=
"/api/bsw/users/updateBusinessLicense"
name=
"businessLicense"
list-type=
"picture-card"
:headers=
"uploadHeaders"
:limit=
"2"
:on-exceed=
"handleExceed"
:on-success=
"excelImported"
:on-preview=
"handlePictureCardPreview"
:on-remove=
"handleRemove"
>
<i
class=
"el-icon-plus"
/>
</el-upload>
<el-dialog
append-to-body
:visible.sync=
"dialogImageVisible"
>
<img
width=
"100%"
:src=
"dialogImageUrl"
>
</el-dialog>
</div>
</div>
<el-image
v-show=
"formData.picFileName"
:src=
"formData.picFileName?imgSrcStart+'/businessLicense/'+formData.picFileName:''"
:preview-src-list=
"[imgSrcStart+'/businessLicense/'+formData.picFileName]"
style=
"width: 300px;"
>
{{
formData
.
picFileName
}}
<div
slot=
"placeholder"
class=
"image-slot"
>
加载中
<span
class=
"dot"
>
...
</span></div>
</el-image>
</el-form-item>
</el-form-item>
<el-form-item
label=
"统一社会信用代码:"
class=
"form-cell"
prop=
"xxxxx"
>
<el-form-item
label=
"统一社会信用代码:"
class=
"form-cell"
prop=
"xxxxx"
>
<div
class=
"cell-box"
>
<div
class=
"cell-box"
>
...
@@ -150,13 +162,17 @@
...
@@ -150,13 +162,17 @@
</el-dialog>
</el-dialog>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getToken
}
from
'
@/utils/auth
'
import
{
HttpReq
}
from
'
@/api/common.js
'
import
{
HttpReq
}
from
'
@/api/common.js
'
export
default
{
export
default
{
dicts
:
[
'
industry_type
'
,
'
supplier_rank
'
,
'
company_type
'
,
'
business_status
'
],
dicts
:
[
'
industry_type
'
,
'
supplier_rank
'
,
'
company_type
'
,
'
business_status
'
],
data
()
{
data
()
{
return
{
return
{
uploadHeaders
:
{
'
Authorization
'
:
getToken
()
},
imgSrcStart
:
process
.
env
.
VUE_APP_BASE_API
,
imgSrcStart
:
process
.
env
.
VUE_APP_BASE_API
,
dialogImageUrl
:
''
,
dialogImageVisible
:
false
,
visible
:
false
,
visible
:
false
,
title
:
'
客户信息
'
,
title
:
'
客户信息
'
,
provinceOpts
:
[],
provinceOpts
:
[],
...
@@ -195,26 +211,45 @@ export default {
...
@@ -195,26 +211,45 @@ export default {
this
.
hideView
()
this
.
hideView
()
},
},
submitForm
()
{
submitForm
()
{
this
.
$refs
.
formViewRef
.
validate
(
valid
=>
{
this
.
$refs
.
formViewRef
.
validate
(
(
valid
,
obj
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
console
.
log
(
this
.
formData
)
console
.
log
(
this
.
formData
)
}
else
{
this
.
$message
({
message
:
'
表单信息有误,请核对无误后提交!
'
,
type
:
'
error
'
})
}
}
})
})
},
},
excelImport
(
event
)
{
handleExceed
()
{
const
file
=
event
.
target
.
files
[
0
]
this
.
$message
({
const
formData
=
new
FormData
()
message
:
'
超出最大上传数量限制
'
,
formData
.
append
(
'
businessLicense
'
,
file
)
type
:
'
info
'
HttpReq
.
backstageApi
.
uploadBusinessLicense
(
formData
).
then
((
res
)
=>
{
})
},
handleRemove
(
file
,
fileList
)
{
const
arr
=
[]
fileList
.
forEach
(
item
=>
{
arr
.
push
(
item
.
response
.
businessLicense
)
})
this
.
formData
.
picFileName
=
arr
.
join
(
'
;
'
)
},
handlePictureCardPreview
(
file
)
{
this
.
dialogImageUrl
=
file
.
url
this
.
dialogImageVisible
=
true
},
excelImported
(
response
,
file
,
fileList
)
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
formData
.
picFileName
=
res
.
businessLicense
const
arr
=
this
.
formData
.
picFileName
?
this
.
formData
.
picFileName
.
split
(
'
;
'
)
:
[]
arr
.
push
(
response
.
businessLicense
)
this
.
formData
.
picFileName
=
arr
.
join
(
'
;
'
)
this
.
$notify
({
this
.
$notify
({
title
:
'
上传成功!
'
,
title
:
'
上传成功!
'
,
type
:
'
success
'
,
type
:
'
success
'
,
duration
:
2500
duration
:
2500
})
})
})
})
})
},
},
findAreaByCodeAndType
(
code
,
type
,
optsName
)
{
findAreaByCodeAndType
(
code
,
type
,
optsName
)
{
switch
(
optsName
)
{
switch
(
optsName
)
{
...
...
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