diff --git a/src/views/cnf/pay/application/commodity-v2/index.vue b/src/views/cnf/pay/application/commodity-v2/index.vue index 48d73c3..c7813b1 100644 --- a/src/views/cnf/pay/application/commodity-v2/index.vue +++ b/src/views/cnf/pay/application/commodity-v2/index.vue @@ -47,7 +47,7 @@ {{ $t('pages.payApplication.action.add') }} @@ -214,6 +214,9 @@ export default { } }, computed: { + isRegionProductApp() { + return this.selectedApp && this.selectedApp.appCode === 'ASWAT' + }, shelfStatusOptions() { return this.shelfStatus.map(item => ({ ...item, @@ -307,11 +310,14 @@ export default { that.loading = true regionConfigTable({ 'sysOrigin': that.selectedApp.appCode }).then(res => { that.regions = res.body || [] - that.selectedRegion = that.regions[0] + that.selectedRegion = that.isRegionProductApp ? that.regions[0] : null that.listQuery.regionId = that.selectedRegion ? that.selectedRegion.id : '' that.loading = false that.loadOpenCountry(that.listQuery.regionId) }).catch(er => { + that.regions = [] + that.selectedRegion = null + that.listQuery.regionId = '' that.loading = false that.loadOpenCountry() }) @@ -363,7 +369,7 @@ export default { 'selectApp': this.selectedApp, 'payCountryIds': this.listQuery.payCountryId ? [this.listQuery.payCountryId] : [] } - if (this.selectedApp.appCode === 'ASWAT') { + if (this.isRegionProductApp && this.selectedRegion) { this.selectedEditFrom.regionId = this.selectedRegion.id this.selectedEditFrom.regionName = this.selectedRegion.regionName } @@ -375,7 +381,7 @@ export default { that.selectedEditFrom = Object.assign({}, row) that.selectedEditFrom.selectApp = this.selectedApp that.selectedEditFrom.country = that.getEditFromCountry(row) - if (this.selectedApp.appCode === 'ASWAT') { + if (this.isRegionProductApp && this.selectedRegion) { this.selectedEditFrom.regionId = this.selectedRegion.id this.selectedEditFrom.regionName = this.selectedRegion.regionName }