mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-23 21:36:37 +08:00
Compare commits
2 Commits
222dee41d3
...
60586e7941
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60586e7941 | ||
|
|
e6ebb63fb2 |
@ -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,
|
||||||
|
|||||||
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user