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