Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_vue
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
杨硕
template_vue
Commits
0803a94e
Commit
0803a94e
authored
Apr 14, 2024
by
高宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.导入
parent
46f96f03
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
37 deletions
+71
-37
outcomeWmsJbapplyTemp.vue
src/views/template/outcomeWmsJbapplyTemp.vue
+71
-37
No files found.
src/views/template/outcomeWmsJbapplyTemp.vue
View file @
0803a94e
...
@@ -294,46 +294,61 @@
...
@@ -294,46 +294,61 @@
</el-dialog>
</el-dialog>
<!-- 导入配置对话框 -->
<!-- 导入配置对话框 -->
<el-dialog
class=
"importDialog"
:title=
"importControls.title"
:visible=
"importControls.open"
width=
"80"
append-to-body
:close-on-click-modal=
"false"
@
close=
"cancelFileFrom"
>
<el-dialog
class=
"importDialog"
:title=
"importControls.title"
:visible=
"importControls.open"
width=
"80"
append-to-body
:close-on-click-modal=
"false"
@
close=
"cancelFileFrom"
>
<el-tabs
type=
"border-card"
>
<el-form
:model=
"typeFrom"
>
<el-tab-pane
label=
"导入一"
>
<el-form-item
v-model=
"typeFrom.type"
>
<div
class=
"importOne"
>
<el-select
<div>
v-model=
"typeFrom.type"
<!-- 下载模型按钮 -->
placeholder=
"typeFrom"
<div
class=
"downloadTemplateDiv"
>
clearable
<el-button
class=
"downloadTemplateDivButton"
type=
"primary"
:loading=
"downloadTemplateLoading"
size=
"small"
@
click=
"downloadTemplate"
>
下载模板
</el-button>
:maxlength=
"2"
size=
"small"
style=
"width: 150px"
>
<el-option
v-for=
"(dict,index) in typeList"
:key=
"index"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
</el-form>
<div
v-if=
"typeFrom.type === '1'"
class=
"importOne"
>
<div>
<!-- 下载模型按钮 -->
<div
class=
"downloadTemplateDiv"
>
<el-button
class=
"downloadTemplateDivButton"
type=
"primary"
:loading=
"downloadTemplateLoading"
size=
"small"
@
click=
"downloadTemplate"
>
下载模板
</el-button>
</div>
<div>
<el-upload
accept=
".xlsx, .xls"
:headers=
"importControls.headers"
:action=
"importControls.url + '?updateSupport=' + importControls.updateSupport"
:disabled=
"importControls.isUploading"
:on-progress=
"handleFileUploadProgress"
:on-success=
"handleFileSuccess"
:auto-upload=
"false"
:on-change=
"employeeUpload"
:on-remove=
"handleRemove"
:before-remove=
"beforeRemove"
:on-preview=
"handlePreview"
:file-list=
"files"
drag
>
<i
class=
"el-icon-upload"
/>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em>
</div>
</div>
<div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
<el-upload
<!-- <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据-->
accept=
".xlsx, .xls"
<!-- <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>-->
:headers=
"importControls.headers"
:action=
"importControls.url + '?updateSupport=' + importControls.updateSupport"
:disabled=
"importControls.isUploading"
:on-progress=
"handleFileUploadProgress"
:on-success=
"handleFileSuccess"
:auto-upload=
"false"
:on-change=
"employeeUpload"
:on-remove=
"handleRemove"
:before-remove=
"beforeRemove"
:on-preview=
"handlePreview"
:file-list=
"files"
drag
>
<i
class=
"el-icon-upload"
/>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em>
</div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
<!-- <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据-->
<!-- <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>-->
</div>
<div
slot=
"tip"
class=
"el-upload__tip"
style=
"color:red"
>
提示:仅允许导入“xls”或“xlsx”格式文件!
</div>
</el-upload>
</div>
</div>
</div>
<div
slot=
"tip"
class=
"el-upload__tip"
style=
"color:red"
>
提示:仅允许导入“xls”或“xlsx”格式文件!
</div>
</el-upload>
</div>
</div>
</
el-tab-pane
>
</
div
>
</
el-tabs
>
</
div
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancelFileFrom"
>
取 消
</el-button>
<el-button
@
click=
"cancelFileFrom"
>
取 消
</el-button>
<el-button
:loading=
"importLoading"
type=
"primary"
@
click=
"submitFileForm"
>
确 定
</el-button>
<el-button
:loading=
"importLoading"
type=
"primary"
@
click=
"submitFileForm"
>
确 定
</el-button>
...
@@ -436,6 +451,21 @@ export default {
...
@@ -436,6 +451,21 @@ export default {
name
:
'OutcomeWmsJbapplyTemp'
,
name
:
'OutcomeWmsJbapplyTemp'
,
data
()
{
data
()
{
return
{
return
{
// 类型表单
typeFrom
:
{
type
:
'1'
},
// 类型下拉框
typeList
:
[
{
label
:
'类型1'
,
value
:
'1'
},
{
label
:
'类型2'
,
value
:
'20'
}
],
// 导入列表
// 导入列表
files
:
[],
files
:
[],
// 下载模板loading
// 下载模板loading
...
@@ -670,6 +700,7 @@ export default {
...
@@ -670,6 +700,7 @@ export default {
// 导入取消
// 导入取消
cancelFileFrom
()
{
cancelFileFrom
()
{
this
.
importControls
.
open
=
false
this
.
importControls
.
open
=
false
this
.
files
=
[]
},
},
// 导入确认
// 导入确认
submitFileForm
()
{
submitFileForm
()
{
...
@@ -684,12 +715,15 @@ export default {
...
@@ -684,12 +715,15 @@ export default {
formData
.
append
(
'file'
,
this
.
files
)
formData
.
append
(
'file'
,
this
.
files
)
importJbapplyExcel
(
formData
).
then
(
res
=>
{
importJbapplyExcel
(
formData
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
this
.
$message
.
success
(
`成功导入`
+
res
.
data
.
rows
+
`条`
)
this
.
importLoading
=
false
this
.
importLoading
=
false
this
.
importControls
.
open
=
false
this
.
importControls
.
open
=
false
this
.
files
=
[]
this
.
getList
()
this
.
getList
()
}
}
}).
catch
(()
=>
{
}).
catch
(()
=>
{
this
.
importLoading
=
false
this
.
importLoading
=
false
this
.
files
=
[]
})
})
}
}
// this.importControls.open = false
// this.importControls.open = false
...
...
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