|
@@ -62,6 +62,7 @@
|
|
|
:rowKey="(record) => record.id"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
+ :defaultLoadData="false"
|
|
|
bordered>
|
|
|
</s-table>
|
|
|
<!-- 按钮 -->
|
|
@@ -139,11 +140,17 @@ export default {
|
|
|
methods: {
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
|
+ this.resetData()
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ },
|
|
|
+ resetData () {
|
|
|
+ console.log('重置艾迪康')
|
|
|
this.queryParam.dealerName = ''
|
|
|
this.queryParam.provinceSn = undefined
|
|
|
this.queryParam.citySn = undefined
|
|
|
this.queryParam.districtSn = undefined
|
|
|
- this.$refs.table.refresh(true)
|
|
|
+ this.addrCityList = []
|
|
|
+ this.addrDistrictList = []
|
|
|
},
|
|
|
// 确定
|
|
|
handleSubmit () {
|
|
@@ -160,36 +167,18 @@ export default {
|
|
|
},
|
|
|
// 获取城市列表
|
|
|
getCityList (val) {
|
|
|
- // const index = this.addrProvinceList.findIndex(item => item.areaSn == val)
|
|
|
- // if (index >= 0) {
|
|
|
- // this.form.provinceName = this.addrProvinceList[index].name
|
|
|
- // }
|
|
|
this.addrCityList = []
|
|
|
this.addrDistrictList = []
|
|
|
this.queryParam.citySn = undefined
|
|
|
this.queryParam.districtSn = undefined
|
|
|
- // this.queryParam.address = ''
|
|
|
this.getArea('city', val)
|
|
|
},
|
|
|
// 获取区县列表
|
|
|
getAreaList (val) {
|
|
|
- // const index = this.addrCityList.findIndex(item => item.areaSn == val)
|
|
|
- // if (index >= 0) {
|
|
|
- // this.form.cityName = this.addrCityList[index].name
|
|
|
- // }
|
|
|
this.addrDistrictList = []
|
|
|
this.queryParam.districtSn = undefined
|
|
|
- // this.queryParam.address = ''
|
|
|
this.getArea('district', val)
|
|
|
},
|
|
|
- // 区县变更
|
|
|
- areaCharged (val) {
|
|
|
- // const index = this.addrDistrictList.findIndex(item => item.areaSn == val)
|
|
|
- // if (index >= 0) {
|
|
|
- // this.form.districtName = this.addrDistrictList[index].name
|
|
|
- // }
|
|
|
- // this.queryParam.address = ''
|
|
|
- },
|
|
|
// 省/市/区
|
|
|
getArea (leve, sn) {
|
|
|
let params
|
|
@@ -228,11 +217,16 @@ export default {
|
|
|
isShow (newValue, oldValue) {
|
|
|
if (!newValue) {
|
|
|
this.$emit('close')
|
|
|
+ this.resetData()
|
|
|
} else {
|
|
|
this.selectedRowKeys = this.chooseCust
|
|
|
if (this.addrProvinceList.length == 0) {
|
|
|
this.getArea('province')
|
|
|
}
|
|
|
+ const _this = this
|
|
|
+ setTimeout(() => {
|
|
|
+ _this.$refs.table.refresh(true)
|
|
|
+ }, 200)
|
|
|
}
|
|
|
}
|
|
|
}
|