|
|
@@ -220,6 +220,8 @@ export default {
|
|
|
},
|
|
|
uploadAgain(id) {
|
|
|
this.viewVoucher = false
|
|
|
+ this.auditId = id
|
|
|
+ this.uploadUrl = `${process.env.VUE_APP_BASE_API}/v1/finance/prove-add?id=${this.auditId}`
|
|
|
this.uploadVoucher = true
|
|
|
},
|
|
|
handleUpload(id) {
|
|
|
@@ -227,29 +229,27 @@ export default {
|
|
|
this.auditId = id
|
|
|
this.uploadUrl = `${process.env.VUE_APP_BASE_API}/v1/finance/prove-add?id=${this.auditId}`
|
|
|
this.uploadVoucher = true
|
|
|
-
|
|
|
- this.listLoading = false
|
|
|
}, 0.5 * 1000)
|
|
|
},
|
|
|
- uploaderHandleBefore() {
|
|
|
+ async uploaderHandleBefore() {
|
|
|
this.$message({
|
|
|
message: this.$t('common.uploadHints'),
|
|
|
type: 'warning',
|
|
|
duration: 500,
|
|
|
})
|
|
|
- this.uploaderLoading = true
|
|
|
|
|
|
- fetchToken().then(response => {
|
|
|
+ await fetchToken().then(response => {
|
|
|
this.uploaderHeaders.Authorization = process.env.VUE_APP_ACCESS_TOKEN_PREFIX + response.data
|
|
|
this.uploaderData.uploadToken = response.data
|
|
|
-
|
|
|
- setTimeout(() => {
|
|
|
- this.listLoading = false
|
|
|
- }, 3 * 1000)
|
|
|
})
|
|
|
},
|
|
|
handleSuccess(res, file) {
|
|
|
- this.imageUrl = URL.createObjectURL(file.raw);
|
|
|
+ this.imageUrl = URL.createObjectURL(file.raw)
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ this.uploadVoucher = false
|
|
|
+ this.getList()
|
|
|
+ }, 2 * 1000)
|
|
|
},
|
|
|
beforeUpload(file) {
|
|
|
const typeAllowed = ['image/jpeg', 'image/jpg', 'image/png']
|