Compare commits

...

2 Commits

Author SHA1 Message Date
wuxw
60586e7941 v1.9 优化 开票无法上传的bug 2025-11-19 11:37:31 +08:00
wuxw
e6ebb63fb2 v2.0 优化 开票无法上传的bug 2025-11-19 11:37:04 +08:00
2 changed files with 30 additions and 24 deletions

View File

@ -1,30 +1,16 @@
<template> <template>
<el-dialog <el-dialog :title="$t('uploadInvoicePhoto.title')" :visible.sync="visible" width="50%" @close="closeDialog">
:title="$t('uploadInvoicePhoto.title')"
:visible.sync="visible"
width="50%"
@close="closeDialog"
>
<el-form label-width="120px"> <el-form label-width="120px">
<el-form-item :label="$t('uploadInvoicePhoto.invoiceCode')"> <el-form-item :label="$t('uploadInvoicePhoto.invoiceCode')">
<el-input <el-input v-model="form.invoiceCode" :placeholder="$t('uploadInvoicePhoto.codeRequired')" />
v-model="form.invoiceCode"
:placeholder="$t('uploadInvoicePhoto.codeRequired')"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('uploadInvoicePhoto.invoice')"> <el-form-item :label="$t('uploadInvoicePhoto.invoice')">
<upload-image-url <upload-image-url ref="uploadImage" @notifyUploadCoverImage="handleImageUpload" />
ref="uploadImage"
@notifyUploadCoverImage="handleImageUpload"
/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer"> <div slot="footer">
<el-button @click="closeDialog">{{ $t('common.cancel') }}</el-button> <el-button @click="closeDialog">{{ $t('common.cancel') }}</el-button>
<el-button <el-button type="primary" @click="saveUploadInvoicePhoto">{{ $t('common.save') }}</el-button>
type="primary"
@click="saveUploadInvoicePhoto"
>{{ $t('common.save') }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
@ -56,7 +42,9 @@ export default {
invoiceCode: '', invoiceCode: '',
photos: [] photos: []
} }
this.$refs.uploadImage.clearImages() if (this.$refs.uploadImage) {
this.$refs.uploadImage.clearImages()
}
this.visible = true this.visible = true
}, },
closeDialog() { closeDialog() {
@ -74,7 +62,7 @@ export default {
this.$message.warning(this.$t('uploadInvoicePhoto.photoRequired')) this.$message.warning(this.$t('uploadInvoicePhoto.photoRequired'))
return return
} }
try { try {
const params = { const params = {
...this.form, ...this.form,

View File

@ -248,10 +248,28 @@ export default {
_openDeleteInvoiceApplyModel(row) { _openDeleteInvoiceApplyModel(row) {
this.$refs.deleteDialog.open(row) this.$refs.deleteDialog.open(row)
}, },
hasPlugin(pluginName) { hasPlugin(pluginType) {
// const sysInfoStr = window.localStorage.getItem('java110SystemInfo')
console.log(pluginName) if (!sysInfoStr) {
return true return false
}
let sysInfo
try {
sysInfo = JSON.parse(sysInfoStr)
} catch (error) {
return false
}
if (!sysInfo || !Object.prototype.hasOwnProperty.call(sysInfo, 'plugins')) {
return false
}
const plugins = sysInfo.plugins
let hasPlugin = false
plugins.forEach(p => {
if (pluginType === p.pluginType) {
hasPlugin = true
}
})
return hasPlugin
} }
} }
} }