Showing
1 changed file
with
36 additions
and
36 deletions
| ... | @@ -842,7 +842,6 @@ | ... | @@ -842,7 +842,6 @@ |
| 842 | <script> | 842 | <script> |
| 843 | import { | 843 | import { |
| 844 | addCustomerData, | 844 | addCustomerData, |
| 845 | - uploadCertificate, | ||
| 846 | uploadQingdaoCertificate, | 845 | uploadQingdaoCertificate, |
| 847 | updateCustomerData, | 846 | updateCustomerData, |
| 848 | delCertificate, | 847 | delCertificate, |
| ... | @@ -1151,7 +1150,8 @@ export default { | ... | @@ -1151,7 +1150,8 @@ export default { |
| 1151 | reader.onload = (e) => { | 1150 | reader.onload = (e) => { |
| 1152 | console.log(e); | 1151 | console.log(e); |
| 1153 | let obj = { | 1152 | let obj = { |
| 1154 | - file: e.target.result, | 1153 | + // file: e.target.result, |
| 1154 | + file: this.extractBase64(e.target.result), | ||
| 1155 | name: file.name, | 1155 | name: file.name, |
| 1156 | }; | 1156 | }; |
| 1157 | this.formData.file = obj; | 1157 | this.formData.file = obj; |
| ... | @@ -1311,15 +1311,15 @@ export default { | ... | @@ -1311,15 +1311,15 @@ export default { |
| 1311 | addCustomerData(val) | 1311 | addCustomerData(val) |
| 1312 | .then((res) => { | 1312 | .then((res) => { |
| 1313 | if (res.code === "200") { | 1313 | if (res.code === "200") { |
| 1314 | - if (this.formData.file) { | 1314 | + // if (this.formData.file) { |
| 1315 | - this.uploadCertificate( | 1315 | + // this.uploadCertificate( |
| 1316 | - val.ecomEntCode, | 1316 | + // val.ecomEntCode, |
| 1317 | - this.base64ConvertFile( | 1317 | + // this.base64ConvertFile( |
| 1318 | - this.formData.file.file, | 1318 | + // this.formData.file.file, |
| 1319 | - this.formData.file.name | 1319 | + // this.formData.file.name |
| 1320 | - ) | 1320 | + // ) |
| 1321 | - ); | 1321 | + // ); |
| 1322 | - } | 1322 | + // } |
| 1323 | if (this.formData.qingdaoFile) { | 1323 | if (this.formData.qingdaoFile) { |
| 1324 | this.uploadQingdaoCertificate( | 1324 | this.uploadQingdaoCertificate( |
| 1325 | val.ecomEntCode, | 1325 | val.ecomEntCode, |
| ... | @@ -1341,22 +1341,22 @@ export default { | ... | @@ -1341,22 +1341,22 @@ export default { |
| 1341 | this.loadings.dialogLoading = false; | 1341 | this.loadings.dialogLoading = false; |
| 1342 | }); | 1342 | }); |
| 1343 | }, | 1343 | }, |
| 1344 | - uploadCertificate(ecomEntCode, file) { | 1344 | + // uploadCertificate(ecomEntCode, file) { |
| 1345 | - uploadCertificate(ecomEntCode, file) | 1345 | + // uploadCertificate(ecomEntCode, file) |
| 1346 | - .then((uploadRes) => { | 1346 | + // .then((uploadRes) => { |
| 1347 | - if (uploadRes.code === "200") { | 1347 | + // if (uploadRes.code === "200") { |
| 1348 | - // this.msgSuccess("客户添加和证书上传成功!"); | 1348 | + // // this.msgSuccess("客户添加和证书上传成功!"); |
| 1349 | - this.close(true); | 1349 | + // this.close(true); |
| 1350 | - } else { | 1350 | + // } else { |
| 1351 | - this.alertWarningMsg(uploadRes.message); | 1351 | + // this.alertWarningMsg(uploadRes.message); |
| 1352 | - } | 1352 | + // } |
| 1353 | - this.loadings.dialogLoading = false; | 1353 | + // this.loadings.dialogLoading = false; |
| 1354 | - }) | 1354 | + // }) |
| 1355 | - .catch((err) => { | 1355 | + // .catch((err) => { |
| 1356 | - console.log(err); | 1356 | + // console.log(err); |
| 1357 | - this.loadings.dialogLoading = false; | 1357 | + // this.loadings.dialogLoading = false; |
| 1358 | - }); | 1358 | + // }); |
| 1359 | - }, | 1359 | + // }, |
| 1360 | 1360 | ||
| 1361 | uploadQingdaoCertificate(ecomEntCode, file) { | 1361 | uploadQingdaoCertificate(ecomEntCode, file) { |
| 1362 | uploadQingdaoCertificate(ecomEntCode, file) | 1362 | uploadQingdaoCertificate(ecomEntCode, file) |
| ... | @@ -1379,15 +1379,15 @@ export default { | ... | @@ -1379,15 +1379,15 @@ export default { |
| 1379 | updateCustomerData(val) | 1379 | updateCustomerData(val) |
| 1380 | .then((res) => { | 1380 | .then((res) => { |
| 1381 | if (res.code === "200") { | 1381 | if (res.code === "200") { |
| 1382 | - if (this.formData.file) { | 1382 | + // if (this.formData.file) { |
| 1383 | - this.uploadCertificate( | 1383 | + // this.uploadCertificate( |
| 1384 | - val.ecomEntCode, | 1384 | + // val.ecomEntCode, |
| 1385 | - this.base64ConvertFile( | 1385 | + // this.base64ConvertFile( |
| 1386 | - this.formData.file.file, | 1386 | + // this.formData.file.file, |
| 1387 | - this.formData.file.name | 1387 | + // this.formData.file.name |
| 1388 | - ) | 1388 | + // ) |
| 1389 | - ); | 1389 | + // ); |
| 1390 | - } | 1390 | + // } |
| 1391 | if (this.formData.qingdaoFile) { | 1391 | if (this.formData.qingdaoFile) { |
| 1392 | this.uploadQingdaoCertificate( | 1392 | this.uploadQingdaoCertificate( |
| 1393 | val.ecomEntCode, | 1393 | val.ecomEntCode, | ... | ... |
-
Please register or login to post a comment