Commit 0433b41e by cwq0219

修改

1 parent fa0b71a4
......@@ -14,7 +14,7 @@
>
<gl-form-item label="商户名称:">
<gl-input
v-model="merchantForm.name"
v-model="merchantForm.merchantName"
placeholder="请输入商户名称"
name="name"
data-vv-as="商户名称"
......@@ -155,10 +155,13 @@ export default {
})
},
getCityArea(params) {
console.log(params)
// console.log(params)
this.areaInfo.provinceId = params[0]
this.areaInfo.cityId = params[1]
this.areaInfo.areaId = params[2]
this.areaInfo.provinceName = params[3]
this.areaInfo.cityName = params[4]
this.areaInfo.areaName = params[5]
}
}
}
......
......@@ -161,8 +161,9 @@ export default {
this.totalCount = res.pagination.totalCount
this.reset(this.merchantSearch)
}).catch(err => {
console.log(err)
notice.errorTips()
// console.log(err)
notice.errorTips(err)
console.log('失败-------------')
this.reset(this.merchantSearch)
})
},
......
......@@ -79,7 +79,9 @@ export default {
city: '', // 市值
area: '', // 区值
mutIndex: [], // 存储下标
mutArray: [] // 传值给父组件的数组
// 传值给父组件的数组,id
mutArray: [],
namesArr: []
}
},
props: {
......@@ -144,6 +146,7 @@ export default {
this.AllData.forEach((element, index) => {
if (element.provinceId === val) {
this.mutIndex[0] = index
this.namesArr = [element.provinceName, null, null]
}
})
this.mutIndex[1] = ''
......@@ -153,7 +156,7 @@ export default {
// 选择省清空已选的市区value
this.city = ''
this.area = ''
this.$emit('cityArea', this.mutArray)
this.$emit('cityArea', this.mutArray.concat(this.namesArr))
},
// 选择市
selectCity(val) {
......@@ -164,18 +167,24 @@ export default {
this.AllData[i].cityInfoList.forEach((element, index) => {
if (element.cityId === val) {
this.mutIndex[1] = index
this.namesArr[1] = element.cityName
}
})
}
val ? this.getArea(this.mutIndex[0], this.mutIndex[1]) : false
this.area = ''
this.mutIndex[2] = ''
val ? this.$emit('cityArea', this.mutArray) : false
val ? this.$emit('cityArea', this.mutArray.concat(this.namesArr)) : false
},
// 选择区
selectArea(val) {
this.mutArray[2] = val
val ? this.$emit('cityArea', this.mutArray) : false
this.areaList.forEach((element, index) => {
if (element.areaId === val) {
this.namesArr[2] = element.areaName
}
})
val ? this.$emit('cityArea', this.mutArray.concat(this.namesArr)) : false
},
// 获取市
getCity(index) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!