Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
imac-vue
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
jinhui.wang
2022-11-22 14:37:30 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
478cd1aabfb75cb6c4f6dfdb10f46ef54b14f88e
478cd1aa
1 parent
d8bac154
白名单导入校验修改
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
35 deletions
src/views/basicInformation/goodsStation/dialog.vue
src/views/basicInformation/goodsStation/dialog.vue
View file @
478cd1a
...
...
@@ -100,13 +100,13 @@ export default {
trigger: "change",
},
],
file: [
{
required: true,
message: "文件不能为空",
trigger: "change",
},
]
//
file: [
//
{
//
required: true,
//
message: "文件不能为空",
//
trigger: "change",
//
},
//
]
},
fileList: [],
errorData: [],
...
...
@@ -176,37 +176,41 @@ export default {
},
//导入Excel
upload() {
this.$refs['addForm'].validate(val => {
if (val) {
const file = this.formData.file;
let goodsStation = this.formData.uploadGoodsStation
this.loading = true;
uploadGoodsExcel(file, goodsStation).then((res) => {
this.loading = false;
if (res.code != 200) {
if (res.code == 603) {
this.$alert(res.msg, "提示", {
confirmButtonText: "确定",
type: "warning",
});
} else if (res.code === 201) {
this.$message.warning(res.msg);
if (res.data) {
this.errorData = res.data;
this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightInformationImport' } })
if (this.formData.file != null && this.formData.file != '') {
this.$refs['addForm'].validate(val => {
if (val) {
const file = this.formData.file;
let goodsStation = this.formData.uploadGoodsStation
this.loading = true;
uploadGoodsExcel(file, goodsStation).then((res) => {
this.loading = false;
if (res.code != 200) {
if (res.code == 603) {
this.$alert(res.msg, "提示", {
confirmButtonText: "确定",
type: "warning",
});
} else if (res.code === 201) {
this.$message.warning(res.msg);
if (res.data) {
this.errorData = res.data;
this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightInformationImport' } })
}
} else {
this.$message.warning(res.msg);
}
} else {
this.$message.
warning
(res.msg);
this.$message.
success
(res.msg);
}
} else
{
this.$message.success(res.msg);
}
setTimeout(() => {
this.close()
}, 1000);
});
}
}
)
setTimeout(() =>
{
this.close()
}, 1000);
});
}
})
} else {
this.msgWarning('请选择文件后再导入!')
}
},
//导出Excel
download() {
...
...
Please
register
or
login
to post a comment