Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
iClear-Connect-Pre-Clearance
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
2025-01-07 16:23:24 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8943c68c7c96a50d0ecf7de927b98103d5835de6
8943c68c
1 parent
0ba7fea8
校验修改
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
11 deletions
web/src/api/waybillInquiry.js
web/src/views/uploadDetail/uploadFile.vue
web/src/api/waybillInquiry.js
View file @
8943c68
...
...
@@ -92,6 +92,8 @@ export function submitWaybill(data) {
data
.
fileUpload
.
forEach
((
item
)
=>
{
formData
.
append
(
"fileUpload"
,
item
);
})
}
else
{
formData
.
append
(
"fileUpload"
,
null
);
}
return
request
({
url
:
"/biz-customer/consignment/submit"
,
...
...
web/src/views/uploadDetail/uploadFile.vue
View file @
8943c68
...
...
@@ -160,11 +160,13 @@ export default {
fileList: [],
uploadType: true,
viewHistoryType: false,
errorTip: "",
};
},
methods: {
//上传
upload(type) {
this.errorTip = "";
this.fileList = [];
this.fileFormData.uploadType = type;
this.$refs.uploadBlock.$refs["upload-inner"].handleClick();
...
...
@@ -173,6 +175,7 @@ export default {
let fileSum = 0;
let fileSize = 0;
let fileNameArray = [];
let errorTip = "";
this.fileData.forEach((item) => {
fileSum = Number(fileSum) + Number(item.files.length);
item.files.forEach((file) => {
...
...
@@ -181,18 +184,28 @@ export default {
});
});
if (fileSum + 1 > 100) {
this.$message.warning("The maximum number of uploaded files is 100!");
return false;
} else if (Number(fileSize) + Number(val.fileSize) / 1024 / 1024 > 95) {
this.$message.warning(
"The maximum total size of uploaded files is 95M!"
);
return false;
} else if (fileNameArray.includes(val.fileName)) {
this.$message.warning("Duplicate file name uploaded!");
return false;
} else {
if (this.errorTip == "") {
errorTip = "The maximum number of uploaded files is 100!";
this.$message.warning(this.errorTip);
}
} else if ((Number(fileSize) + Number(val.size)) / 1024 / 1024 > 95) {
if (this.errorTip == "") {
errorTip = "The maximum total size of uploaded files is 95M!";
}
} else if (fileNameArray.includes(val.name)) {
if (this.errorTip == "") {
errorTip = "Duplicate file name uploaded!";
}
}
if (errorTip == "") {
return true;
} else {
if (errorTip != "" && this.errorTip == "") {
this.errorTip = errorTip;
this.$message.warning(errorTip);
}
return false;
}
},
uploadFile(val) {
...
...
Please
register
or
login
to post a comment