Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
EcomWeb
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
zhanbo.xu
2025-04-08 17:09:16 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cb5de63ea2fb312b16d1288f559d6ff918afdcd2
cb5de63e
1 parent
e449833a
feat: 修改file逻辑
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
36 deletions
src/views/customerConfig/dialog.vue
src/views/customerConfig/dialog.vue
View file @
cb5de63
...
...
@@ -847,7 +847,6 @@
<script>
import {
addCustomerData,
uploadCertificate,
uploadQingdaoCertificate,
updateCustomerData,
delCertificate,
...
...
@@ -1156,7 +1155,8 @@ export default {
reader.onload = (e) => {
console.log(e);
let obj = {
file: e.target.result,
// file: e.target.result,
file: this.extractBase64(e.target.result),
name: file.name,
};
this.formData.file = obj;
...
...
@@ -1319,15 +1319,15 @@ export default {
addCustomerData(val)
.then((res) => {
if (res.code === "200") {
if (this.formData.file) {
this.uploadCertificate(
val.ecomEntCode,
this.base64ConvertFile(
this.formData.file.file,
this.formData.file.name
)
);
}
//
if (this.formData.file) {
//
this.uploadCertificate(
//
val.ecomEntCode,
//
this.base64ConvertFile(
//
this.formData.file.file,
//
this.formData.file.name
//
)
//
);
//
}
if (this.formData.qingdaoFile) {
this.uploadQingdaoCertificate(
val.ecomEntCode,
...
...
@@ -1349,22 +1349,22 @@ export default {
this.loadings.dialogLoading = false;
});
},
uploadCertificate(ecomEntCode, file) {
uploadCertificate(ecomEntCode, file)
.then((uploadRes) => {
if (uploadRes.code === "200") {
// this.msgSuccess("客户添加和证书上传成功!");
this.close(true);
} else {
this.alertWarningMsg(uploadRes.message);
}
this.loadings.dialogLoading = false;
})
.catch((err) => {
console.log(err);
this.loadings.dialogLoading = false;
});
},
//
uploadCertificate(ecomEntCode, file) {
//
uploadCertificate(ecomEntCode, file)
//
.then((uploadRes) => {
//
if (uploadRes.code === "200") {
//
// this.msgSuccess("客户添加和证书上传成功!");
//
this.close(true);
//
} else {
//
this.alertWarningMsg(uploadRes.message);
//
}
//
this.loadings.dialogLoading = false;
//
})
//
.catch((err) => {
//
console.log(err);
//
this.loadings.dialogLoading = false;
//
});
//
},
uploadQingdaoCertificate(ecomEntCode, file) {
uploadQingdaoCertificate(ecomEntCode, file)
...
...
@@ -1387,15 +1387,15 @@ export default {
updateCustomerData(val)
.then((res) => {
if (res.code === "200") {
if (this.formData.file) {
this.uploadCertificate(
val.ecomEntCode,
this.base64ConvertFile(
this.formData.file.file,
this.formData.file.name
)
);
}
//
if (this.formData.file) {
//
this.uploadCertificate(
//
val.ecomEntCode,
//
this.base64ConvertFile(
//
this.formData.file.file,
//
this.formData.file.name
//
)
//
);
//
}
if (this.formData.qingdaoFile) {
this.uploadQingdaoCertificate(
val.ecomEntCode,
...
...
Please
register
or
login
to post a comment