From 098357885c9c7124ddad0d14a7fecb5e987d20a7 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期三, 24 七月 2024 15:22:56 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/zbomyoujia
---
admin/src/components/business/OperaShopWindow.vue | 27 ++++++++++++++++++---------
1 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/admin/src/components/business/OperaShopWindow.vue b/admin/src/components/business/OperaShopWindow.vue
index aacc499..547c708 100644
--- a/admin/src/components/business/OperaShopWindow.vue
+++ b/admin/src/components/business/OperaShopWindow.vue
@@ -167,9 +167,12 @@
.then(res => {
this.provinces = res
})
+ if(this.form.provinceCode){
+ this.selectProvince(this.form.provinceCode,true)
+ }
},
// 閫夋嫨鐪佷唤
- selectProvince (val) {
+ selectProvince (val,isInit) {
this.provinces.forEach(item => {
if (item.id == val) {
this.form.provinceName = item.name
@@ -177,29 +180,35 @@
})
this.cities = []
this.areas = []
- this.form.cityName = ''
- this.form.areaCode = ''
- this.form.cityCode = ''
- this.form.areaName = ''
+ if(!isInit){
+ this.form.cityName = ''
+ this.form.areaCode = ''
+ this.form.cityCode = ''
+ this.form.areaName = ''
+ }
if(!val || val ==''){
return
}
this.api.areaList({ pid: val })
.then(res => {
this.cities = res
- this.selectCity(this.form.cityId)
+ if(isInit){
+ this.selectCity(this.form.cityCode,isInit)
+ }
})
},
// 閫夋嫨鍩庡競
- selectCity (val) {
+ selectCity (val,isInit) {
this.cities.forEach(item => {
if (item.id == val) {
this.form.cityName = item.name
}
})
this.areas = []
- this.form.areaCode = ''
- this.form.areaName = ''
+ if(!isInit){
+ this.form.areaCode = ''
+ this.form.areaName = ''
+ }
if(!val || val ==''){
return
}
--
Gitblit v1.9.3