Commit 79298eba 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 66c3477a cb4f2da0
......@@ -2,10 +2,10 @@
<div>
<el-form ref="provinceForm" :model="provinceForm" label-width="80px" inline="true" class="province">
<el-select v-model="provinceForm.provinceName" placeholder="选择省份" @change="selectProvince">
<el-option v-for="item in AllData" :key="item.provinceId" :label="item.provinceName" :value="item.provinceName" @click.native="selectProvince(item)"></el-option>
<el-option v-for="item in AllData" :key="item.provinceCode" :label="item.provinceName" :value="item.provinceName" @click.native="selectProvince(item)"></el-option>
</el-select>
<el-select v-model="provinceForm.cityName" placeholder="选择您所在的市" style="width:250px" @change="selectCity">
<el-option v-for="item in cityList" :key="item.cityId" :label="item.cityName" :value="item.cityName" @click.native="selectCity(item)"></el-option>
<el-option v-for="item in cityList" :key="item.cityCode" :label="item.cityName" :value="item.cityName" @click.native="selectCity(item)"></el-option>
</el-select>
</el-form>
</div>
......@@ -20,12 +20,12 @@ export default {
return {
provinceList: provinceList(),
AllData: [],
cityList: [{ cityId: '', cityName: '请先选择省' }],
cityList: [{ cityCode: '', cityName: '请先选择省' }],
provinceForm: {
provinceName: '', // 省值
cityName: '', // 市值
provinceId: '',
cityId: ''
provinceCode: '',
cityCode: ''
}
}
},
......@@ -42,10 +42,10 @@ export default {
this.AllData.map(item => {
if (provinceName == item.provinceName) {
this.cityList = item.cityInfoList
this.provinceForm.provinceId = item.provinceId
this.provinceForm.provinceCode = item.provinceCode
this.cityList.map(itm => {
if (cityName == itm.cityName) {
this.provinceForm.cityId = itm.cityId
this.provinceForm.cityCode = itm.cityCode
}
})
}
......@@ -62,11 +62,11 @@ export default {
console.log(val)
this.provinceForm.cityName = ''
this.cityList = val.cityInfoList
this.$emit('getProvince', val.provinceName, val.provinceId)
this.$emit('getProvince', val.provinceName, val.provinceCode)
},
// 选择市
selectCity(val) {
this.$emit('getCity', val.cityName, val.cityId)
this.$emit('getCity', val.cityName, val.cityCode)
}
}
}
......
......@@ -288,24 +288,24 @@ export default {
this.accountAddForm.provinceName = province
this.accountAddForm.cityName = city
this.$refs.provinceForm.init(province, city)
const { provinceId, cityId } = this.$refs.provinceForm.provinceForm
this.accountAddForm.provinceId = provinceId
this.accountAddForm.cityId = cityId
const { provinceCode, cityCode } = this.$refs.provinceForm.provinceForm
this.accountAddForm.provinceCode = provinceCode
this.accountAddForm.cityCode = cityCode
},
// 当直接点击选择地址时,获取省市ID
init(province, city) {
this.$refs.provinceForm.init(province, city)
},
// 获取省
getProvince(provinceName, provinceId) {
getProvince(provinceName, provinceCode) {
this.accountAddForm.merchantAddress = ''
this.accountAddForm.provinceName = provinceName
this.accountAddForm.provinceId = provinceId
this.accountAddForm.provinceCode = provinceCode
},
// 获取市
getCity(cityName, cityId) {
getCity(cityName, cityCode) {
this.accountAddForm.cityName = cityName
this.accountAddForm.cityId = cityId
this.accountAddForm.cityCode = cityCode
this.accountAddForm.merchantAddress = ''
},
delImg(index) {
......
......@@ -131,9 +131,9 @@ export default {
lng: null,
merchantAddress: null,
provinceName: null,
provinceId: null,
provinceCode: null,
cityName: null,
cityId: null,
cityCode: null,
merchantName: null,
merchantAbbreviation: null,
merchantType: null,
......@@ -365,7 +365,7 @@ export default {
})
},
renderView(res) {
let { isloginName, bussinessBegintime, bussinessEndtime, lat, merchantBrandMain, businessType, lng, merchantAddress, provinceName, cityName, provinceId, cityId, merchantName, merchantAbbreviation, merchantType, merchantOrgcode, merchantLegalPerson, merchantLegalPersonPhone, residentContact, residentPhone, merchantLoginAccount, merchantLoginPassword, merchantAccountLevel, businessScope, businessScopeCustomize, merchantBrand, merchantFileResponses, merchantModel, accountTypes, accountType, accounttypeId, channelId, status, parentId } = res
let { isloginName, bussinessBegintime, bussinessEndtime, lat, merchantBrandMain, businessType, lng, merchantAddress, provinceName, cityName, provinceCode, cityCode, merchantName, merchantAbbreviation, merchantType, merchantOrgcode, merchantLegalPerson, merchantLegalPersonPhone, residentContact, residentPhone, merchantLoginAccount, merchantLoginPassword, merchantAccountLevel, businessScope, businessScopeCustomize, merchantBrand, merchantFileResponses, merchantModel, accountTypes, accountType, accounttypeId, channelId, status, parentId } = res
this.accountInfoForm.merchantLoginAccount = merchantLoginAccount
this.accountInfoForm.merchantLoginPassword = merchantLoginPassword
this.accountTypes = accountTypes
......@@ -413,8 +413,8 @@ export default {
merchantAddress,
provinceName,
cityName,
provinceId,
cityId,
provinceCode,
cityCode,
merchantName,
merchantAbbreviation,
merchantType,
......
......@@ -73,9 +73,9 @@ export default {
businessType: [1, 2, 3, 4, 5, 6],
bussinessTime: [],
provinceName: '',
provinceId: '',
provinceCode: '',
cityName: '',
cityId: ''
cityCode: ''
},
businessType: [],
brandListTree: []
......@@ -89,7 +89,7 @@ export default {
this.$refs.brandListTree.loading = true
this.businessType = await this.$apis.store.findAllDictData({ dictType: 'business_type' })
const infoForm = await this.$apis.store.findMerchantBaseInfo({ merchantId: this.$globalState.session.merchantId })
const { merchantAddress, provinceName, cityName, provinceId, cityId, lng, lat, id, merchantName, businessType, bussinessTime, bussinessBegintime, bussinessEndtime, channelId, merchantNo, merchantBrandMain } = infoForm
const { merchantAddress, provinceName, cityName, provinceCode, cityCode, lng, lat, id, merchantName, businessType, bussinessTime, bussinessBegintime, bussinessEndtime, channelId, merchantNo, merchantBrandMain } = infoForm
this.infoForm = {
merchantAddress,
lng,
......@@ -103,8 +103,8 @@ export default {
channelId,
provinceName,
cityName,
provinceId,
cityId
provinceCode,
cityCode
}
// 省市回显
this.$refs.provinceForm.init(this.infoForm.provinceName, this.infoForm.cityName)
......@@ -172,15 +172,15 @@ export default {
this.$refs.provinceForm.init(province, city)
},
// 获取省
getProvince(provinceName, provinceId) {
getProvince(provinceName, provinceCode) {
this.infoForm.merchantAddress = ''
this.infoForm.provinceName = provinceName
this.infoForm.provinceId = provinceId
this.infoForm.provinceCode = provinceCode
},
// 获取市
getCity(cityName, cityId) {
getCity(cityName, cityCode) {
this.infoForm.cityName = cityName
this.infoForm.cityId = cityId
this.infoForm.cityCode = cityCode
this.infoForm.merchantAddress = ''
},
// 展示驻点电话弹框
......@@ -190,12 +190,12 @@ export default {
handleSave() {
const params = this.infoForm
// 获取省市信息
const { provinceName, provinceId, cityName, cityId } = this.$refs.provinceForm.provinceForm
if (!params.provinceId) {
const { provinceName, provinceCode, cityName, cityCode } = this.$refs.provinceForm.provinceForm
if (!params.provinceCode) {
params.provinceName = provinceName
params.provinceId = provinceId
params.provinceCode = provinceCode
params.cityName = cityName
params.cityId = cityId
params.cityCode = cityCode
}
if (params.bussinessTime) {
params.bussinessBegintime = params.bussinessTime[0]
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!