|
@@ -91,31 +91,43 @@
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
import { areaQueryChild, getParentArea } from "@/api/specialSetting";
|
|
import { areaQueryChild, getParentArea } from "@/api/specialSetting";
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
|
|
+ props:['form'],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
forms:{
|
|
forms:{
|
|
consigneeName:'',
|
|
consigneeName:'',
|
|
mobile:'',
|
|
mobile:'',
|
|
-
|
|
|
|
|
|
+ detailAddress:'',
|
|
|
|
+ musicGroupId:'',
|
|
|
|
+ regionProvince:'',
|
|
|
|
+ regionCity:'',
|
|
|
|
+ regionCounty:''
|
|
},
|
|
},
|
|
provinceList:[],
|
|
provinceList:[],
|
|
- cityList:[]
|
|
|
|
|
|
+ cityList:[],
|
|
|
|
+ countyList:[]
|
|
|
|
|
|
};
|
|
};
|
|
},async mounted(){
|
|
},async mounted(){
|
|
await this.getAreaList();
|
|
await this.getAreaList();
|
|
- if (this.forms.areaId) {
|
|
|
|
- await getParentArea({ id: this.forms.areaId }).then(async res => {
|
|
|
|
|
|
+ if (this.forms.regionCity) {
|
|
|
|
+ await getParentArea({ id: this.forms.regionCity }).then(async res => {
|
|
if (res.code == 200 && res.data) {
|
|
if (res.code == 200 && res.data) {
|
|
- await this.getAreaList(res.data.id, () => {
|
|
|
|
- this.$set(this.forms, "province", res.data.id);
|
|
|
|
- this.$set(this.forms, "city", this.forms.areaId);
|
|
|
|
|
|
+ await this.getAreaList(res.data.id,'regionCity', () => {
|
|
|
|
+ this.$set(this.forms, "regionProvince", res.data.id);
|
|
|
|
+ this.$set(this.forms, "regionCity", this.forms.regionCity);
|
|
|
|
+
|
|
});
|
|
});
|
|
|
|
+
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ if(this.forms.regionCity){
|
|
|
|
+ await this.getAreaList(this.forms.regionCity,'regionCounty');
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
- this.$set(this.forms, "province", null);
|
|
|
|
|
|
+ this.$set(this.forms, "regionProvince", null);
|
|
this.$set(this.forms, "city", null);
|
|
this.$set(this.forms, "city", null);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -124,7 +136,7 @@ export default {
|
|
this.forms.city = null;
|
|
this.forms.city = null;
|
|
this.getAreaList(val);
|
|
this.getAreaList(val);
|
|
},
|
|
},
|
|
- getAreaList(parentId, callback) {
|
|
|
|
|
|
+ getAreaList(parentId,type, callback) {
|
|
parentId = parentId ? parentId : 0;
|
|
parentId = parentId ? parentId : 0;
|
|
areaQueryChild({ parentId: parentId }).then(res => {
|
|
areaQueryChild({ parentId: parentId }).then(res => {
|
|
if (res.code == 200 && res.data) {
|
|
if (res.code == 200 && res.data) {
|
|
@@ -136,7 +148,11 @@ export default {
|
|
});
|
|
});
|
|
});
|
|
});
|
|
if (parentId) {
|
|
if (parentId) {
|
|
- this.cityList = tempData;
|
|
|
|
|
|
+ if(type =='regionCounty'){
|
|
|
|
+ this.countyList = tempData;
|
|
|
|
+ }else {
|
|
|
|
+ this.cityList = tempData;
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
this.provinceList = tempData;
|
|
this.provinceList = tempData;
|
|
}
|
|
}
|