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 @@ ...@@ -2,10 +2,10 @@
<div> <div>
<el-form ref="provinceForm" :model="provinceForm" label-width="80px" inline="true" class="province"> <el-form ref="provinceForm" :model="provinceForm" label-width="80px" inline="true" class="province">
<el-select v-model="provinceForm.provinceName" placeholder="选择省份" @change="selectProvince"> <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>
<el-select v-model="provinceForm.cityName" placeholder="选择您所在的市" style="width:250px" @change="selectCity"> <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-select>
</el-form> </el-form>
</div> </div>
...@@ -20,12 +20,12 @@ export default { ...@@ -20,12 +20,12 @@ export default {
return { return {
provinceList: provinceList(), provinceList: provinceList(),
AllData: [], AllData: [],
cityList: [{ cityId: '', cityName: '请先选择省' }], cityList: [{ cityCode: '', cityName: '请先选择省' }],
provinceForm: { provinceForm: {
provinceName: '', // 省值 provinceName: '', // 省值
cityName: '', // 市值 cityName: '', // 市值
provinceId: '', provinceCode: '',
cityId: '' cityCode: ''
} }
} }
}, },
...@@ -42,10 +42,10 @@ export default { ...@@ -42,10 +42,10 @@ export default {
this.AllData.map(item => { this.AllData.map(item => {
if (provinceName == item.provinceName) { if (provinceName == item.provinceName) {
this.cityList = item.cityInfoList this.cityList = item.cityInfoList
this.provinceForm.provinceId = item.provinceId this.provinceForm.provinceCode = item.provinceCode
this.cityList.map(itm => { this.cityList.map(itm => {
if (cityName == itm.cityName) { if (cityName == itm.cityName) {
this.provinceForm.cityId = itm.cityId this.provinceForm.cityCode = itm.cityCode
} }
}) })
} }
...@@ -62,11 +62,11 @@ export default { ...@@ -62,11 +62,11 @@ export default {
console.log(val) console.log(val)
this.provinceForm.cityName = '' this.provinceForm.cityName = ''
this.cityList = val.cityInfoList this.cityList = val.cityInfoList
this.$emit('getProvince', val.provinceName, val.provinceId) this.$emit('getProvince', val.provinceName, val.provinceCode)
}, },
// 选择市 // 选择市
selectCity(val) { selectCity(val) {
this.$emit('getCity', val.cityName, val.cityId) this.$emit('getCity', val.cityName, val.cityCode)
} }
} }
} }
......
...@@ -288,24 +288,24 @@ export default { ...@@ -288,24 +288,24 @@ export default {
this.accountAddForm.provinceName = province this.accountAddForm.provinceName = province
this.accountAddForm.cityName = city this.accountAddForm.cityName = city
this.$refs.provinceForm.init(province, city) this.$refs.provinceForm.init(province, city)
const { provinceId, cityId } = this.$refs.provinceForm.provinceForm const { provinceCode, cityCode } = this.$refs.provinceForm.provinceForm
this.accountAddForm.provinceId = provinceId this.accountAddForm.provinceCode = provinceCode
this.accountAddForm.cityId = cityId this.accountAddForm.cityCode = cityCode
}, },
// 当直接点击选择地址时,获取省市ID // 当直接点击选择地址时,获取省市ID
init(province, city) { init(province, city) {
this.$refs.provinceForm.init(province, city) this.$refs.provinceForm.init(province, city)
}, },
// 获取省 // 获取省
getProvince(provinceName, provinceId) { getProvince(provinceName, provinceCode) {
this.accountAddForm.merchantAddress = '' this.accountAddForm.merchantAddress = ''
this.accountAddForm.provinceName = provinceName this.accountAddForm.provinceName = provinceName
this.accountAddForm.provinceId = provinceId this.accountAddForm.provinceCode = provinceCode
}, },
// 获取市 // 获取市
getCity(cityName, cityId) { getCity(cityName, cityCode) {
this.accountAddForm.cityName = cityName this.accountAddForm.cityName = cityName
this.accountAddForm.cityId = cityId this.accountAddForm.cityCode = cityCode
this.accountAddForm.merchantAddress = '' this.accountAddForm.merchantAddress = ''
}, },
delImg(index) { delImg(index) {
......
...@@ -131,9 +131,9 @@ export default { ...@@ -131,9 +131,9 @@ export default {
lng: null, lng: null,
merchantAddress: null, merchantAddress: null,
provinceName: null, provinceName: null,
provinceId: null, provinceCode: null,
cityName: null, cityName: null,
cityId: null, cityCode: null,
merchantName: null, merchantName: null,
merchantAbbreviation: null, merchantAbbreviation: null,
merchantType: null, merchantType: null,
...@@ -365,7 +365,7 @@ export default { ...@@ -365,7 +365,7 @@ export default {
}) })
}, },
renderView(res) { 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.merchantLoginAccount = merchantLoginAccount
this.accountInfoForm.merchantLoginPassword = merchantLoginPassword this.accountInfoForm.merchantLoginPassword = merchantLoginPassword
this.accountTypes = accountTypes this.accountTypes = accountTypes
...@@ -413,8 +413,8 @@ export default { ...@@ -413,8 +413,8 @@ export default {
merchantAddress, merchantAddress,
provinceName, provinceName,
cityName, cityName,
provinceId, provinceCode,
cityId, cityCode,
merchantName, merchantName,
merchantAbbreviation, merchantAbbreviation,
merchantType, merchantType,
......
...@@ -73,9 +73,9 @@ export default { ...@@ -73,9 +73,9 @@ export default {
businessType: [1, 2, 3, 4, 5, 6], businessType: [1, 2, 3, 4, 5, 6],
bussinessTime: [], bussinessTime: [],
provinceName: '', provinceName: '',
provinceId: '', provinceCode: '',
cityName: '', cityName: '',
cityId: '' cityCode: ''
}, },
businessType: [], businessType: [],
brandListTree: [] brandListTree: []
...@@ -89,7 +89,7 @@ export default { ...@@ -89,7 +89,7 @@ export default {
this.$refs.brandListTree.loading = true this.$refs.brandListTree.loading = true
this.businessType = await this.$apis.store.findAllDictData({ dictType: 'business_type' }) this.businessType = await this.$apis.store.findAllDictData({ dictType: 'business_type' })
const infoForm = await this.$apis.store.findMerchantBaseInfo({ merchantId: this.$globalState.session.merchantId }) 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 = { this.infoForm = {
merchantAddress, merchantAddress,
lng, lng,
...@@ -103,8 +103,8 @@ export default { ...@@ -103,8 +103,8 @@ export default {
channelId, channelId,
provinceName, provinceName,
cityName, cityName,
provinceId, provinceCode,
cityId cityCode
} }
// 省市回显 // 省市回显
this.$refs.provinceForm.init(this.infoForm.provinceName, this.infoForm.cityName) this.$refs.provinceForm.init(this.infoForm.provinceName, this.infoForm.cityName)
...@@ -172,15 +172,15 @@ export default { ...@@ -172,15 +172,15 @@ export default {
this.$refs.provinceForm.init(province, city) this.$refs.provinceForm.init(province, city)
}, },
// 获取省 // 获取省
getProvince(provinceName, provinceId) { getProvince(provinceName, provinceCode) {
this.infoForm.merchantAddress = '' this.infoForm.merchantAddress = ''
this.infoForm.provinceName = provinceName this.infoForm.provinceName = provinceName
this.infoForm.provinceId = provinceId this.infoForm.provinceCode = provinceCode
}, },
// 获取市 // 获取市
getCity(cityName, cityId) { getCity(cityName, cityCode) {
this.infoForm.cityName = cityName this.infoForm.cityName = cityName
this.infoForm.cityId = cityId this.infoForm.cityCode = cityCode
this.infoForm.merchantAddress = '' this.infoForm.merchantAddress = ''
}, },
// 展示驻点电话弹框 // 展示驻点电话弹框
...@@ -190,12 +190,12 @@ export default { ...@@ -190,12 +190,12 @@ export default {
handleSave() { handleSave() {
const params = this.infoForm const params = this.infoForm
// 获取省市信息 // 获取省市信息
const { provinceName, provinceId, cityName, cityId } = this.$refs.provinceForm.provinceForm const { provinceName, provinceCode, cityName, cityCode } = this.$refs.provinceForm.provinceForm
if (!params.provinceId) { if (!params.provinceCode) {
params.provinceName = provinceName params.provinceName = provinceName
params.provinceId = provinceId params.provinceCode = provinceCode
params.cityName = cityName params.cityName = cityName
params.cityId = cityId params.cityCode = cityCode
} }
if (params.bussinessTime) { if (params.bussinessTime) {
params.bussinessBegintime = params.bussinessTime[0] 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!