Commit 7e16ead8 by 胡悦

Merge branch 'kuangyq_dev_2.1.0' of http://192.168.3.233:8090/saas/scrm-micro-se…

…ttings into kuangyq_dev_2.1.0
2 parents 1956e363 7a9676f1
......@@ -29,32 +29,32 @@ export default {
}
}
},
inject: ['provinceEditAccount'],
// inject: ['provinceEditAccount'],
mounted() {
// 初始化
// this.getProvinceList()
console.log(this.provinceEditAccount, '====')
// if (this.province.provinceName) {
// console.log('++++')
// this.init(this.province.provinceName, this.province.cityName)
// console.log(this.provinceEditAccount, '====')
// console.log(JSON.stringify(this.provinceEditAccount.cityName))
// if (this.provinceEditAccount) {
// this.init(this.provinceEditAccount.provinceName, this.provinceEditAccount.cityName)
// console.log(this.provinceEditAccount.provinceName, this.provinceEditAccount.cityName)
// }
},
methods: {
init(provinceName, cityName) {
console.log(provinceName, cityName)
init(province, city) {
this.provinceForm = {
provinceName: provinceName,
cityName: cityName
provinceName: province,
cityName: city
}
this.getProvinceList(provinceName, cityName)
this.getProvinceList(province, city)
},
async getProvinceList(provinceName, cityName) {
const { provinceInfoList: provinceList } = await this.provinceList
this.AllData = provinceList
// this.$set(this, 'AllData', provinceList)
if (this.provinceEditAccount) {
this.init(this.provinceEditAccount.provinceName, this.provinceEditAccount.cityName)
}
// if (this.provinceEditAccount) {
// this.init(this.provinceEditAccount.provinceName, this.provinceEditAccount.cityName)
// }
if (provinceName) {
this.AllData.map(item => {
if (item.provinceName.indexOf(provinceName) != -1) {
......@@ -71,7 +71,6 @@ export default {
},
// 选择省
selectProvince(val) {
console.log(val)
this.provinceForm.cityName = ''
this.cityList = val.cityInfoList
this.$emit('getProvince', val.provinceName, val.provinceCode)
......
......@@ -132,12 +132,12 @@
</el-col>
</el-row>
<el-row>
<el-col :span="12" class="flexCol">
<el-col :span="14" class="flexCol">
<span class="itemName">主营品牌:</span>
<span class="itemValue">{{ firstPageObj.merchantBrandName || '-' }}</span>
</el-col>
<el-col :span="12" class="flexCol">
<span class="itemName">驻店电话:</span>
<el-col :span="10" class="flexCol">
<span class="itemName itemNameCol2">驻店电话:</span>
<span class="itemValue">{{ firstPageObj.residentPhone || '-' }}</span>
</el-col>
</el-row>
......@@ -350,7 +350,7 @@ export default {
},
//将后台返回数据中数值为空的字段全部替换为“-”
formateNullFieldData(initialData) {
const isEmpty = function (val) {
const isEmpty = function(val) {
if (!String(val) || String(val) === 'null') {
return '-'
}
......@@ -358,7 +358,7 @@ export default {
}
var that = this
if (initialData instanceof Array) {
initialData.forEach(function (val, key, array) {
initialData.forEach(function(val, key, array) {
array[key] = that.formateNullFieldData(val)
})
} else if (initialData instanceof Object) {
......
......@@ -167,11 +167,11 @@ export default {
}
}
},
provide() {
return {
provinceEditAccount: this.accountAddForm
}
},
// provide() {
// return {
// provinceEditAccount: this.accountAddForm
// }
// },
watch: {
filterText(val) {
this.$refs.brandTree.filter(val)
......@@ -431,6 +431,7 @@ export default {
merchantBrandMain
})
// 省市回显
this.$refs.baseInfoForm.init(this.accountAddForm.provinceName, this.accountAddForm.cityName)
merchantBrandMain = merchantBrandMain.replaceAll(';', ',').split(',')
this.$refs.baseInfoForm.checkBrandList(merchantBrandMain)
this.$refs.baseInfoForm.checkBusinessType(businessType)
......
......@@ -13,7 +13,7 @@
<el-form ref="baseForm" :model="infoForm" class="account-body-form" label-width="120px">
<el-form-item size="small" label="商户地址" class="map-row">
<Province ref="provinceForm" @getProvince="getProvince" @getCity="getCity"></Province>
<el-input v-model="infoForm.merchantAddress" placeholder="请选择商户地址" readonly="readonly"></el-input>
<el-input class="input-width" v-model="infoForm.merchantAddress" placeholder="请选择商户地址" readonly="readonly"></el-input>
<el-button @click="hanleSelectMap" type="primary">选择地址</el-button>
</el-form-item>
<el-form-item size="small" label="经营业务类型">
......@@ -88,7 +88,6 @@ export default {
methods: {
async brandList() {
this.$refs.brandListTree.loading = true
const brandListTree = await this.$apis.baseInfo.brandList({})
brandListTree.forEach(item => {
let child = item.children
......@@ -98,7 +97,6 @@ export default {
})
})
this.brandListTree = brandListTree
this.$refs.brandListTree.getCheckList(this.infoForm.merchantBrandMain)
this.$nextTick(() => {
this.$refs.brandListTree.loading = false
......@@ -279,4 +277,7 @@ export default {
color: #5850ff;
cursor: pointer;
}
.input-width {
min-width: 200px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!