Commit e6ebb63fb2f1177a5e202a825f7c4afa28df986d
1 parent
222dee41
v2.0 优化 开票无法上传的bug
Showing
3 changed files
with
32 additions
and
26 deletions
src/components/fee/uploadInvoicePhoto.vue
| 1 | <template> | 1 | <template> |
| 2 | - <el-dialog | ||
| 3 | - :title="$t('uploadInvoicePhoto.title')" | ||
| 4 | - :visible.sync="visible" | ||
| 5 | - width="50%" | ||
| 6 | - @close="closeDialog" | ||
| 7 | - > | 2 | + <el-dialog :title="$t('uploadInvoicePhoto.title')" :visible.sync="visible" width="50%" @close="closeDialog"> |
| 8 | <el-form label-width="120px"> | 3 | <el-form label-width="120px"> |
| 9 | <el-form-item :label="$t('uploadInvoicePhoto.invoiceCode')"> | 4 | <el-form-item :label="$t('uploadInvoicePhoto.invoiceCode')"> |
| 10 | - <el-input | ||
| 11 | - v-model="form.invoiceCode" | ||
| 12 | - :placeholder="$t('uploadInvoicePhoto.codeRequired')" | ||
| 13 | - /> | 5 | + <el-input v-model="form.invoiceCode" :placeholder="$t('uploadInvoicePhoto.codeRequired')" /> |
| 14 | </el-form-item> | 6 | </el-form-item> |
| 15 | <el-form-item :label="$t('uploadInvoicePhoto.invoice')"> | 7 | <el-form-item :label="$t('uploadInvoicePhoto.invoice')"> |
| 16 | - <upload-image-url | ||
| 17 | - ref="uploadImage" | ||
| 18 | - @notifyUploadCoverImage="handleImageUpload" | ||
| 19 | - /> | 8 | + <upload-image-url ref="uploadImage" @notifyUploadCoverImage="handleImageUpload" /> |
| 20 | </el-form-item> | 9 | </el-form-item> |
| 21 | </el-form> | 10 | </el-form> |
| 22 | <div slot="footer"> | 11 | <div slot="footer"> |
| 23 | <el-button @click="closeDialog">{{ $t('common.cancel') }}</el-button> | 12 | <el-button @click="closeDialog">{{ $t('common.cancel') }}</el-button> |
| 24 | - <el-button | ||
| 25 | - type="primary" | ||
| 26 | - @click="saveUploadInvoicePhoto" | ||
| 27 | - >{{ $t('common.save') }}</el-button> | 13 | + <el-button type="primary" @click="saveUploadInvoicePhoto">{{ $t('common.save') }}</el-button> |
| 28 | </div> | 14 | </div> |
| 29 | </el-dialog> | 15 | </el-dialog> |
| 30 | </template> | 16 | </template> |
| @@ -56,7 +42,9 @@ export default { | @@ -56,7 +42,9 @@ export default { | ||
| 56 | invoiceCode: '', | 42 | invoiceCode: '', |
| 57 | photos: [] | 43 | photos: [] |
| 58 | } | 44 | } |
| 59 | - this.$refs.uploadImage.clearImages() | 45 | + if (this.$refs.uploadImage) { |
| 46 | + this.$refs.uploadImage.clearImages() | ||
| 47 | + } | ||
| 60 | this.visible = true | 48 | this.visible = true |
| 61 | }, | 49 | }, |
| 62 | closeDialog() { | 50 | closeDialog() { |
| @@ -74,7 +62,7 @@ export default { | @@ -74,7 +62,7 @@ export default { | ||
| 74 | this.$message.warning(this.$t('uploadInvoicePhoto.photoRequired')) | 62 | this.$message.warning(this.$t('uploadInvoicePhoto.photoRequired')) |
| 75 | return | 63 | return |
| 76 | } | 64 | } |
| 77 | - | 65 | + |
| 78 | try { | 66 | try { |
| 79 | const params = { | 67 | const params = { |
| 80 | ...this.form, | 68 | ...this.form, |
src/views/fee/invoiceApplyList.vue
| @@ -248,10 +248,28 @@ export default { | @@ -248,10 +248,28 @@ export default { | ||
| 248 | _openDeleteInvoiceApplyModel(row) { | 248 | _openDeleteInvoiceApplyModel(row) { |
| 249 | this.$refs.deleteDialog.open(row) | 249 | this.$refs.deleteDialog.open(row) |
| 250 | }, | 250 | }, |
| 251 | - hasPlugin(pluginName) { | ||
| 252 | - // 实际项目中需要根据业务逻辑实现 | ||
| 253 | - console.log(pluginName) | ||
| 254 | - return true | 251 | + hasPlugin(pluginType) { |
| 252 | + const sysInfoStr = window.localStorage.getItem('java110SystemInfo') | ||
| 253 | + if (!sysInfoStr) { | ||
| 254 | + return false | ||
| 255 | + } | ||
| 256 | + let sysInfo | ||
| 257 | + try { | ||
| 258 | + sysInfo = JSON.parse(sysInfoStr) | ||
| 259 | + } catch (error) { | ||
| 260 | + return false | ||
| 261 | + } | ||
| 262 | + if (!sysInfo || !Object.prototype.hasOwnProperty.call(sysInfo, 'plugins')) { | ||
| 263 | + return false | ||
| 264 | + } | ||
| 265 | + const plugins = sysInfo.plugins | ||
| 266 | + let hasPlugin = false | ||
| 267 | + plugins.forEach(p => { | ||
| 268 | + if (pluginType === p.pluginType) { | ||
| 269 | + hasPlugin = true | ||
| 270 | + } | ||
| 271 | + }) | ||
| 272 | + return hasPlugin | ||
| 255 | } | 273 | } |
| 256 | } | 274 | } |
| 257 | } | 275 | } |
src/views/user/login/Login.vue
| @@ -44,8 +44,8 @@ export default { | @@ -44,8 +44,8 @@ export default { | ||
| 44 | logo: '', | 44 | logo: '', |
| 45 | companyName:'', | 45 | companyName:'', |
| 46 | loginForm: { | 46 | loginForm: { |
| 47 | - username: 'wuxw', | ||
| 48 | - passwd: 'admin', | 47 | + username: '', |
| 48 | + passwd: '', | ||
| 49 | validateCode: '' | 49 | validateCode: '' |
| 50 | }, | 50 | }, |
| 51 | captchaUrl: '', | 51 | captchaUrl: '', |