From 03cf8159b2501c9a8a1fc2a9d99886d76fcfd857 Mon Sep 17 00:00:00 2001 From: pushuo Date: Fri, 11 Nov 2022 18:02:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=90=8E=E5=8F=B0=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=AE=A2=E6=88=B7=E5=9C=B0=E5=9D=80=E8=BA=AB=E4=BB=BD?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/views/pages/customers/form.blade.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/resources/beike/admin/views/pages/customers/form.blade.php b/resources/beike/admin/views/pages/customers/form.blade.php index 9857d696..2d8f7371 100644 --- a/resources/beike/admin/views/pages/customers/form.blade.php +++ b/resources/beike/admin/views/pages/customers/form.blade.php @@ -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')}}',