mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-10 20:39:48 +08:00
fix: Field number with out country and currency definition. (#521)
This commit is contained in:
parent
4bbbd3cfaa
commit
ed083ba3d5
@ -31,8 +31,7 @@
|
||||
v-model="displayedValue"
|
||||
:placeholder="metadata.help"
|
||||
:disabled="isDisabled"
|
||||
:precision="precision"
|
||||
:class="'display-type-amount ' + metadata.cssClassName"
|
||||
:class="cssClassStyle"
|
||||
readonly
|
||||
@blur="customFocusLost"
|
||||
@focus="customFocusGained"
|
||||
|
@ -204,10 +204,14 @@ const actions = {
|
||||
responseGetInfo.defaultContextMap.get('#C_Country_ID'),
|
||||
10
|
||||
)
|
||||
// get country and currency
|
||||
dispatch('getCountryFormServer', {
|
||||
countryId
|
||||
})
|
||||
if (isEmptyValue(countryId)) {
|
||||
console.info('context session without Country ID')
|
||||
} else {
|
||||
// get country and currency
|
||||
dispatch('getCountryFormServer', {
|
||||
countryId
|
||||
})
|
||||
}
|
||||
|
||||
dispatch('getUserInfoFromSession', sessionUuid)
|
||||
.catch(error => {
|
||||
@ -448,7 +452,14 @@ const getters = {
|
||||
return state.country
|
||||
},
|
||||
getCurrency: (state) => {
|
||||
return state.country.currency
|
||||
const currency = state.country.currency
|
||||
if (isEmptyValue(currency)) {
|
||||
return {
|
||||
stdPrecision: 2,
|
||||
iSOCode: 'USD'
|
||||
}
|
||||
}
|
||||
return currency
|
||||
},
|
||||
getCountryLanguage(state) {
|
||||
return state.country.language.replace('_', '-')
|
||||
|
Loading…
x
Reference in New Issue
Block a user