|
|
@@ -301,20 +301,9 @@
|
|
|
this.$refs.editForm.resetFields()
|
|
|
},
|
|
|
showLocation() {
|
|
|
- const arr = this.editForm.custLocation.split('/')
|
|
|
- if (!arr.length) return
|
|
|
- this.editForm.province = this.provinceOptions.find((item) => item.distName == arr[0])
|
|
|
- if (arr[1]) {
|
|
|
- this.editForm.city = this.editForm.province.children.find((item) => item.distName == arr[1])
|
|
|
- } else {
|
|
|
- this.editForm.city = {}
|
|
|
- }
|
|
|
-
|
|
|
- if (arr[2]) {
|
|
|
- this.editForm.region = this.editForm.city.children.find((item) => item.distName == arr[2])
|
|
|
- } else {
|
|
|
- this.editForm.region = {}
|
|
|
- }
|
|
|
+ this.editForm.province = this.provinceOptions.find((item) => item.distName == this.editForm.custProvince)
|
|
|
+ this.editForm.city = this.editForm.province.children.find((item) => item.distName == this.editForm.custCity)
|
|
|
+ this.editForm.region = this.editForm.city.children.find((item) => item.distName == this.editForm.custRegion)
|
|
|
},
|
|
|
provinceChange(val) {
|
|
|
this.editForm.city = {}
|