|
@@ -39,21 +39,21 @@
|
|
<a-col span="8">
|
|
<a-col span="8">
|
|
<a-form-model-item prop="provinceSn">
|
|
<a-form-model-item prop="provinceSn">
|
|
<a-select id="editAddress-provinceSn" allowClear @change="getCityList" v-model="form.provinceSn" placeholder="请选择省">
|
|
<a-select id="editAddress-provinceSn" allowClear @change="getCityList" v-model="form.provinceSn" placeholder="请选择省">
|
|
- <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
|
|
|
|
|
|
+ <a-select-option v-for="item in addrProvinceList" :id="item.areaSn" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col span="8">
|
|
<a-col span="8">
|
|
<a-form-model-item prop="citySn">
|
|
<a-form-model-item prop="citySn">
|
|
<a-select id="editAddress-citySn" allowClear @change="getAreaList" v-model="form.citySn" placeholder="请选择市">
|
|
<a-select id="editAddress-citySn" allowClear @change="getAreaList" v-model="form.citySn" placeholder="请选择市">
|
|
- <a-select-option v-for="item in addrCityList" :value="item.areaSn" :key="item.areaSn + 'b'">{{ item.name }}</a-select-option>
|
|
|
|
|
|
+ <a-select-option v-for="item in addrCityList" :id="item.areaSn" :value="item.areaSn" :key="item.areaSn + 'b'">{{ item.name }}</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col span="8">
|
|
<a-col span="8">
|
|
<a-form-model-item prop="countySn">
|
|
<a-form-model-item prop="countySn">
|
|
<a-select id="editAddress-countySn" allowClear @change="areaCharged" v-model="form.countySn" placeholder="请选择区/县">
|
|
<a-select id="editAddress-countySn" allowClear @change="areaCharged" v-model="form.countySn" placeholder="请选择区/县">
|
|
- <a-select-option v-for="item in addrDistrictList" :value="item.areaSn" :key="item.areaSn + 'c'">{{ item.name }}</a-select-option>
|
|
|
|
|
|
+ <a-select-option v-for="item in addrDistrictList" :id="item.areaSn" :value="item.areaSn" :key="item.areaSn + 'c'">{{ item.name }}</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
@@ -99,15 +99,15 @@ export default {
|
|
wrapperCol: { span: 18 }
|
|
wrapperCol: { span: 18 }
|
|
},
|
|
},
|
|
form: {
|
|
form: {
|
|
- consigneeName: '',
|
|
|
|
- consigneeTel: '',
|
|
|
|
- provinceSn: undefined,
|
|
|
|
|
|
+ consigneeName: '', // 收货人
|
|
|
|
+ consigneeTel: '', // 联系电话
|
|
|
|
+ provinceSn: undefined, // 省
|
|
provinceName: '',
|
|
provinceName: '',
|
|
- citySn: undefined,
|
|
|
|
|
|
+ citySn: undefined, // 市
|
|
cityName: '',
|
|
cityName: '',
|
|
- countySn: undefined,
|
|
|
|
|
|
+ countySn: undefined, // 区
|
|
countyName: '',
|
|
countyName: '',
|
|
- addr: ''
|
|
|
|
|
|
+ addr: ''// 详细地址
|
|
},
|
|
},
|
|
rules: {
|
|
rules: {
|
|
consigneeName: [
|
|
consigneeName: [
|
|
@@ -151,7 +151,6 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
- console.log('error submit!!')
|
|
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -220,7 +219,6 @@ export default {
|
|
setData (data) {
|
|
setData (data) {
|
|
this.isEdit = true
|
|
this.isEdit = true
|
|
Promise.all([getArea({ type: '2' }), getArea({ parentId: data.provinceSn, type: '3' }), getArea({ parentId: data.citySn, type: '4' })]).then(res => {
|
|
Promise.all([getArea({ type: '2' }), getArea({ parentId: data.provinceSn, type: '3' }), getArea({ parentId: data.citySn, type: '4' })]).then(res => {
|
|
- console.log(res)
|
|
|
|
this.addrProvinceList = res[0].data
|
|
this.addrProvinceList = res[0].data
|
|
const provinceName = this.addrProvinceList.find(item => item.id == data.provinceSn)
|
|
const provinceName = this.addrProvinceList.find(item => item.id == data.provinceSn)
|
|
if (provinceName && provinceName.name) {
|
|
if (provinceName && provinceName.name) {
|