Commit 0433b41e by cwq0219

修改

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