修复后台编辑客户地址身份错误问题
This commit is contained in:
parent
50c33fd9d2
commit
03cf8159b2
|
|
@ -228,11 +228,27 @@
|
|||
if (typeof index == 'number') {
|
||||
this.dialogAddress.index = index;
|
||||
this.dialogAddress.form = JSON.parse(JSON.stringify(this.addresses[index]))
|
||||
this.countryChange(this.dialogAddress.form.country_id);
|
||||
}
|
||||
|
||||
this.countryChange(this.dialogAddress.form.country_id);
|
||||
this.dialogAddress.show = true
|
||||
},
|
||||
|
||||
countryChange(e) {
|
||||
const self = this;
|
||||
|
||||
$http.get(`countries/${e}/zones`, null, {
|
||||
hload: true
|
||||
}).then((res) => {
|
||||
this.source.zones = res.data.zones;
|
||||
|
||||
if (!res.data.zones.some(e => e.id == this.form.zone_id)) {
|
||||
this.form.zone_id = '';
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
deleteAddress(id, index) {
|
||||
this.$confirm('{{ __('admin/customer.confirm_delete_address') }}', '{{__('common.text_hint')}}', {
|
||||
confirmButtonText: '{{__('common.confirm')}}',
|
||||
|
|
|
|||
Loading…
Reference in New Issue