mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-11 06:07:24 +08:00
v2.0 优化 开票无法上传的bug
This commit is contained in:
parent
222dee41d3
commit
e6ebb63fb2
@ -1,30 +1,16 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="$t('uploadInvoicePhoto.title')"
|
||||
:visible.sync="visible"
|
||||
width="50%"
|
||||
@close="closeDialog"
|
||||
>
|
||||
<el-dialog :title="$t('uploadInvoicePhoto.title')" :visible.sync="visible" width="50%" @close="closeDialog">
|
||||
<el-form label-width="120px">
|
||||
<el-form-item :label="$t('uploadInvoicePhoto.invoiceCode')">
|
||||
<el-input
|
||||
v-model="form.invoiceCode"
|
||||
:placeholder="$t('uploadInvoicePhoto.codeRequired')"
|
||||
/>
|
||||
<el-input v-model="form.invoiceCode" :placeholder="$t('uploadInvoicePhoto.codeRequired')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('uploadInvoicePhoto.invoice')">
|
||||
<upload-image-url
|
||||
ref="uploadImage"
|
||||
@notifyUploadCoverImage="handleImageUpload"
|
||||
/>
|
||||
<upload-image-url ref="uploadImage" @notifyUploadCoverImage="handleImageUpload" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer">
|
||||
<el-button @click="closeDialog">{{ $t('common.cancel') }}</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="saveUploadInvoicePhoto"
|
||||
>{{ $t('common.save') }}</el-button>
|
||||
<el-button type="primary" @click="saveUploadInvoicePhoto">{{ $t('common.save') }}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@ -56,7 +42,9 @@ export default {
|
||||
invoiceCode: '',
|
||||
photos: []
|
||||
}
|
||||
this.$refs.uploadImage.clearImages()
|
||||
if (this.$refs.uploadImage) {
|
||||
this.$refs.uploadImage.clearImages()
|
||||
}
|
||||
this.visible = true
|
||||
},
|
||||
closeDialog() {
|
||||
@ -74,7 +62,7 @@ export default {
|
||||
this.$message.warning(this.$t('uploadInvoicePhoto.photoRequired'))
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
const params = {
|
||||
...this.form,
|
||||
|
||||
@ -248,10 +248,28 @@ export default {
|
||||
_openDeleteInvoiceApplyModel(row) {
|
||||
this.$refs.deleteDialog.open(row)
|
||||
},
|
||||
hasPlugin(pluginName) {
|
||||
// 实际项目中需要根据业务逻辑实现
|
||||
console.log(pluginName)
|
||||
return true
|
||||
hasPlugin(pluginType) {
|
||||
const sysInfoStr = window.localStorage.getItem('java110SystemInfo')
|
||||
if (!sysInfoStr) {
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -44,8 +44,8 @@ export default {
|
||||
logo: '',
|
||||
companyName:'',
|
||||
loginForm: {
|
||||
username: 'wuxw',
|
||||
passwd: 'admin',
|
||||
username: '',
|
||||
passwd: '',
|
||||
validateCode: ''
|
||||
},
|
||||
captchaUrl: '',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user