fix: avoid hidden region filter for pay commodities
This commit is contained in:
parent
ac269eb996
commit
64c69cb26d
@ -47,7 +47,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-if="selectedApp.appCode === 'ASWAT'"
|
||||
v-if="isRegionProductApp"
|
||||
v-model="listQuery.regionId"
|
||||
v-loading="loading"
|
||||
:placeholder="$t('pages.payApplication.placeholder.region')"
|
||||
@ -103,7 +103,7 @@
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
:disabled="!listQuery.regionId"
|
||||
:disabled="isRegionProductApp && !listQuery.regionId"
|
||||
@click="createCommodity"
|
||||
>
|
||||
{{ $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
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user