Commit 43a2f1da by 胡悦

Merge branch 'kuangyq_v2.9.0' of http://192.168.3.233:8090/saas/scrm-micro-setti…

…ngs into kuangyq_v2.9.0
2 parents 701b0dfb 61639f16
...@@ -10,15 +10,15 @@ ...@@ -10,15 +10,15 @@
</div> </div>
<div class="account-body scrm-box-f"> <div class="account-body scrm-box-f">
<div class="form-title">账户信息</div> <div class="form-title">账户信息</div>
<el-form ref="accountInfoForm" :model="accountInfoForm" class="account-body-form" label-width="120px" :rules="accountInfoRules"> <el-form ref="accountInfoForm" :model="accountInfoForm" class="account-body-form" :rules="accountInfoRules">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="上级商户"> <el-form-item label="上级商户:">
{{ accountDetail.merchantName }} {{ accountDetail.merchantName }}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="上级商户模式"> <el-form-item label="上级商户模式:">
{{ accountDetail.merchantModelName }} {{ accountDetail.merchantModelName }}
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<div class="el-form-item level-row is-required"> <div class="el-form-item level-row is-required">
<label class="el-form-item__label" style="width: 120px">账户等级</label> <label class="el-form-item__label">账户等级:</label>
<div class="el-form-item__content" style="margin-left: 120px"> <div class="el-form-item__content">
<el-select size="small" :disabled="nextStatus" v-model="accountDetail.merchantAccountLevel" placeholder="请选择"> <el-select size="small" :disabled="nextStatus" v-model="accountDetail.merchantAccountLevel" placeholder="请选择">
<el-option v-for="item in accountLevel" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option> <el-option v-for="item in accountLevel" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option>
</el-select> </el-select>
...@@ -37,12 +37,12 @@ ...@@ -37,12 +37,12 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="登录账户名" prop="merchantLoginAccount"> <el-form-item label="登录账户名:" prop="merchantLoginAccount">
<el-input :disabled="nextStatus" size="small" maxlength="15" v-model="accountInfoForm.merchantLoginAccount" placeholder="请输入登录账户名"></el-input> <el-input :disabled="nextStatus" size="small" maxlength="15" v-model="accountInfoForm.merchantLoginAccount" placeholder="请输入登录账户名"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="登录密码" prop="merchantLoginPassword"> <el-form-item label="登录密码:" prop="merchantLoginPassword">
<el-input maxlength="20" :disabled="nextStatus" size="small" type="password" v-model="accountInfoForm.merchantLoginPassword" placeholder="请输入登录密码(必须包含6-20个字母+数字)" show-password></el-input> <el-input maxlength="20" :disabled="nextStatus" size="small" type="password" v-model="accountInfoForm.merchantLoginPassword" placeholder="请输入登录密码(必须包含6-20个字母+数字)" show-password></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -50,8 +50,8 @@ ...@@ -50,8 +50,8 @@
<el-row> <el-row>
<el-col :span="16"> <el-col :span="16">
<div data-v-995a4ff0="" class="el-form-item is-required"> <div data-v-995a4ff0="" class="el-form-item is-required">
<label for="merchantLoginAccount" class="el-form-item__label" style="width: 120px">账户类型</label> <label for="merchantLoginAccount" class="el-form-item__label">账户类型:</label>
<div class="el-form-item__content" style="margin-left: 120px"> <div class="el-form-item__content account-type">
<div data-v-995a4ff0="" class="el-input el-input--small"> <div data-v-995a4ff0="" class="el-input el-input--small">
<auto-button v-for="(item, index) in accountDetail.accountTypes" :key="index" :btnLabel="item.accounttypeName" :btnValue="item.accounttypeId" :stopClick="nextStatus" @getBtnStatus="getBtnStatus"></auto-button> <auto-button v-for="(item, index) in accountDetail.accountTypes" :key="index" :btnLabel="item.accounttypeName" :btnValue="item.accounttypeId" :stopClick="nextStatus" @getBtnStatus="getBtnStatus"></auto-button>
</div> </div>
...@@ -441,7 +441,6 @@ export default { ...@@ -441,7 +441,6 @@ export default {
padding-left: 20px; padding-left: 20px;
} }
&-form { &-form {
width: 80%;
margin: 20px auto; margin: 20px auto;
.form-row { .form-row {
/deep/ .el-form-item__content { /deep/ .el-form-item__content {
...@@ -574,4 +573,23 @@ export default { ...@@ -574,4 +573,23 @@ export default {
z-index: 999; z-index: 999;
// box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1); // box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
} }
/deep/ {
.el-form-item__content {
display: flex;
}
.el-form-item__label {
width: 154px !important;
}
.el-form-item__content {
width: 404px;
margin-left: 0 !important;
}
}
.account-type {
/deep/ {
.el-input {
min-width: 1000px !important;
}
}
}
</style> </style>
...@@ -3,115 +3,67 @@ ...@@ -3,115 +3,67 @@
<el-form ref="baseForm" :model="accountAddForm" class="account-body-form" label-width="120px" :rules="baseRules"> <el-form ref="baseForm" :model="accountAddForm" class="account-body-form" label-width="120px" :rules="baseRules">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="商户名称" prop="merchantName"> <el-form-item label="商户名称:" prop="merchantName">
<el-input size="small" v-model="accountAddForm.merchantName" :disabled="isEdit" placeholder="请输入商户名称"></el-input> <el-input size="small" v-model="accountAddForm.merchantName" :disabled="isEdit" placeholder="请输入商户名称"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="商户简称"> <el-form-item label="商户简称:">
<el-input size="small" v-model="accountAddForm.merchantAbbreviation" placeholder="请输入商户简称"></el-input> <el-input size="small" v-model="accountAddForm.merchantAbbreviation" placeholder="请输入商户简称"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="联系电话" prop="merchantLegalPersonPhone"> <el-form-item label="联系电话:" prop="merchantLegalPersonPhone" style="margin-bottom:5px">
<el-input maxlength="11" size="small" v-model="accountAddForm.merchantLegalPersonPhone" placeholder="请输入联系电话"></el-input> <el-input maxlength="11" size="small" v-model="accountAddForm.merchantLegalPersonPhone" placeholder="请输入联系电话"></el-input>
<el-checkbox v-model="accountAddForm.isloginName">联系电话同时作为登录账户名</el-checkbox> <!-- <el-checkbox v-model="accountAddForm.isloginName">联系电话同时作为登录账户名</el-checkbox> -->
</el-form-item> </el-form-item>
<el-checkbox v-model="accountAddForm.isloginName" style="margin-left:154px;margin-bottom:20px">联系电话同时作为登录账户名</el-checkbox>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="联系人"> <el-form-item label="联系人:">
<el-input size="small" v-model="accountAddForm.merchantLegalPerson" placeholder="请输入联系人"></el-input> <el-input size="small" v-model="accountAddForm.merchantLegalPerson" placeholder="请输入联系人"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<!-- <el-row>
<el-col :span="12">
<el-form-item size="small" label="商户类型" class="merchant-row">
<el-input v-model="accountAddForm.merchantOrgcode" placeholder="请输入组织机构号码" v-if="accountAddForm.merchantType == 2" maxlength="50">
<el-select v-model="accountAddForm.merchantType" slot="prepend" placeholder="请选择">
<el-option label="个人" :value="1"></el-option>
<el-option label="企业" :value="2"></el-option>
</el-select>
</el-input>
<el-input size="small" maxlength="18" class="card-input" v-model="accountAddForm.merchantOrgcode" placeholder="请输入正确的身份证号" v-if="accountAddForm.merchantType == 1">
<el-select v-model="accountAddForm.merchantType" slot="prepend" placeholder="请选择">
<el-option label="个人" :value="1"></el-option>
<el-option label="企业" :value="2"></el-option>
</el-select>
</el-input>
</el-form-item>
</el-col>
</el-row> -->
<el-row> <el-row>
<el-col :span="24"> <el-col :span="12">
<ProvinceCity ref="provinceForm" :subdistrict="subdistrict" @selectProvince="selectProvince" @selectCity="selectCity" :detailAddressLabel="detailAddressLabel" @selectAddressByMap="selectAddressByMap"></ProvinceCity> <ProvinceCity ref="provinceForm" :subdistrict="subdistrict" @selectProvince="selectProvince" @selectCity="selectCity" :detailAddressLabel="detailAddressLabel" @selectAddressByMap="selectAddressByMap"></ProvinceCity>
<!-- <el-form-item size="small" label="商户地址" class="form-row">
<ProvinceCity ref="provinceForm" @selectProvince="selectProvince" @selectCity="selectCity"></ProvinceCity>
<el-input readonly style="flex:1" v-model="accountAddForm.merchantAddress" placeholder="请选择商户地址"></el-input>
<el-button type="primary" class="form-btn" @click="hanleSelectMap">选择地址</el-button>
</el-form-item> -->
</el-col> </el-col>
</el-row>
<!-- <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="联系电话" prop="merchantLegalPersonPhone"> <el-form-item label="驻店联系方式:">
<el-input maxlength="11" size="small" v-model="accountAddForm.merchantLegalPersonPhone" placeholder="请输入联系电话"></el-input> <el-input maxlength="11" size="small" v-model="accountAddForm.residentContact" placeholder="请输入驻店联系人"></el-input>
<el-checkbox v-model="accountAddForm.isloginName">联系电话同时作为登录账户名</el-checkbox>
</el-form-item> </el-form-item>
</el-col> <el-form-item label=" " prop="residentPhone">
<el-col :span="12"> <el-input maxlength="13" size="small" class="phone-input" v-model="accountAddForm.residentPhone" placeholder="请输入驻店电话"></el-input>
<el-form-item label="联系人">
<el-input size="small" v-model="accountAddForm.merchantLegalPerson" placeholder="请输入联系人"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> --> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="驻店联系人"> <el-form-item label="营业时间:" class="open-time">
<el-input maxlength="11" size="small" v-model="accountAddForm.residentContact" placeholder="请输入驻店联系人"></el-input> <el-time-picker size="small" value-format="HH:mm:ss" is-range v-model="accountAddForm.bussinessTime" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"></el-time-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="驻店电话" prop="residentPhone"> <el-form-item label="主营品牌:">
<el-input maxlength="13" size="small" class="phone-input" v-model="accountAddForm.residentPhone" placeholder="请输入驻店电话"></el-input> <select-brand :brandListTree="brandListTree" @clickBrand="clickBrand" ref="brandListTree"></select-brand>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="经营业务类型"> <el-form-item label="经营业务类型:" class="bussiness-type">
<el-checkbox-group v-model="accountAddForm.businessType"> <el-checkbox-group v-model="accountAddForm.businessType">
<el-checkbox v-for="item in businessType" :label="item.dictValue" :disabled="item.dictValue <= 6" :key="item">{{ item.dictLabel }}</el-checkbox> <el-checkbox v-for="item in businessType" :label="item.dictValue" :disabled="item.dictValue <= 6" :key="item">{{ item.dictLabel }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
<!-- <div class="scrm-flex-center" v-for="(item, index) in businessScopeCustomize" :key="index">
<el-input size="small" v-model="businessScopeCustomize[index].name" placeholder="请自定义营业范围,建议不超过10个"></el-input>
<i class="el-icon-circle-plus el-icon-btn" @click="addBusinessScope" v-if="index == businessScopeCustomize.length - 1"></i>
<i class="el-icon-remove el-icon-btn" @click="removeBusinessScope" v-else></i>
</div> -->
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="营业时间" class="open-time"> <el-form-item label="门店照片:" style="margin-bottom:5px">
<el-time-picker size="small" value-format="HH:mm:ss" is-range v-model="accountAddForm.bussinessTime" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"></el-time-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="主营品牌">
<select-brand :brandListTree="brandListTree" @clickBrand="clickBrand" ref="brandListTree"></select-brand>
<!-- <el-input size="small" v-model="filterText"></el-input>
<div class="brand-tree">
<el-tree :data="brandData" show-checkbox default-expand-all node-key="id" ref="brandTree" highlight-current :props="defaultProps" :filter-node-method="filterNode" @check="clickDeal"></el-tree>
</div> -->
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="门店照片">
<div class="store-upload-list"> <div class="store-upload-list">
<template v-if="accountAddForm.merchantFiles.length && accountAddForm.merchantFiles.length > 0"> <template v-if="accountAddForm.merchantFiles.length && accountAddForm.merchantFiles.length > 0">
<div :key="index" v-for="(item, index) in accountAddForm.merchantFiles" class="store-border" @mouseenter="imgIndex = index" @mouseleave="imgIndex = ''"> <div :key="index" v-for="(item, index) in accountAddForm.merchantFiles" class="store-border" @mouseenter="imgIndex = index" @mouseleave="imgIndex = ''">
...@@ -125,32 +77,22 @@ ...@@ -125,32 +77,22 @@
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
</el-upload> </el-upload>
</div> </div>
<div class="tips">图片格式仅支持JPG,PNG格式,大小1M</div>
</el-form-item> </el-form-item>
<div class="tips">图片格式仅支持JPG,PNG格式,大小1M</div>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<!-- <GLDialog :visible.sync="dialogMapVisible" title="选择地图">
<map-view ref="mapForm" :mapHeight="450"></map-view>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogMapVisible = false">取 消</el-button>
<el-button type="primary" @click="getAddress">确 定</el-button>
</span>
</GLDialog> -->
</div> </div>
</template> </template>
<script> <script>
import util from '@/utils/util' import util from '@/utils/util'
// import mapView from '@/components/mapView/index'
import SelectBrand from '../../baseInfo/selectBrand.vue' import SelectBrand from '../../baseInfo/selectBrand.vue'
import ProvinceCity from '@/components/province-city/index.vue' import ProvinceCity from '@/components/province-city/index.vue'
export default { export default {
name: 'base', name: 'base',
components: { components: {
ProvinceCity, ProvinceCity,
// mapView,
SelectBrand SelectBrand
}, },
props: { props: {
...@@ -289,62 +231,6 @@ export default { ...@@ -289,62 +231,6 @@ export default {
if (!value) return true if (!value) return true
return data.label.indexOf(value) !== -1 return data.label.indexOf(value) !== -1
}, },
// getAddress() {
// if (!this.$refs.mapForm.address) {
// this.$message.error('请选择地址')
// return
// }
// this.accountAddForm.merchantAddress = this.$refs.mapForm.address
// let lnglat = this.$refs.mapForm.lnglat
// this.accountAddForm.lat = lnglat.lat
// this.accountAddForm.lng = lnglat.lng
// var fullAddress = ''
// var provincecode = ''
// if (this.$refs.mapForm.geocoderAddress.addressComponent) {
// fullAddress = this.$refs.mapForm.geocoderAddress.addressComponent
// provincecode = this.$refs.mapForm.geocoderAddress.adcode
// this.addressData.fullAddress = fullAddress
// this.addressData.provincecode = provincecode
// } else {
// fullAddress = this.addressData.fullAddress
// provincecode = this.addressData.provincecode
// }
// // 获取省市
// var province = ''
// var city = ''
// if (fullAddress) {
// province = fullAddress.province
// city = fullAddress.city ? fullAddress.city : fullAddress.district
// } else {
// province = this.accountAddForm.provinceName
// city = this.accountAddForm.cityName
// provincecode = this.accountAddForm.cityCode
// }
// const municipalities = ['北京市', '天津市', '上海市', '重庆市']
// var municipality = municipalities.find(item => item == province)
// if (municipality) {
// city = city.slice(0, 2) + '城区'
// if (municipality === '重庆市') {
// provincecode = provincecode.slice(0, 4)
// provincecode == 5001 ? (city = city.slice(0, 2) + '城区') : (city = city.slice(0, 2) + '郊县')
// }
// }
// // 判断省市是否匹配
// if (this.accountAddForm.provinceName) {
// if (this.accountAddForm.provinceName !== province && this.accountAddForm.cityName !== city) {
// this.$message.error('您选择的地址错误,请重新选择')
// this.accountAddForm.merchantAddress = ''
// return
// }
// }
// this.dialogMapVisible = false
// this.accountAddForm.provinceName = province
// this.accountAddForm.cityName = city
// this.$refs.provinceForm.init(province, city)
// const { provinceCode, cityCode } = this.$refs.provinceForm.provinceForm
// this.accountAddForm.provinceCode = provinceCode
// this.accountAddForm.cityCode = cityCode
// },
// 当直接点击选择地址时,获取省市ID // 当直接点击选择地址时,获取省市ID
init(province, city) { init(province, city) {
this.$refs.provinceForm.init(province, city) this.$refs.provinceForm.init(province, city)
...@@ -449,7 +335,7 @@ export default { ...@@ -449,7 +335,7 @@ export default {
} }
} }
.account-body-form { .account-body-form {
width: 80%; // width: 80%;
margin: 20px auto; margin: 20px auto;
.form-row { .form-row {
/deep/ .el-form-item__content { /deep/ .el-form-item__content {
...@@ -501,9 +387,9 @@ export default { ...@@ -501,9 +387,9 @@ export default {
} }
.image-uploader { .image-uploader {
/deep/ .el-upload { /deep/ .el-upload {
width: 120px; width: 104px;
height: 80px; height: 104px;
line-height: 80px; line-height: 104px;
} }
} }
.brand-tree { .brand-tree {
...@@ -528,6 +414,8 @@ export default { ...@@ -528,6 +414,8 @@ export default {
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
line-height: 30px; line-height: 30px;
margin-left: 154px;
margin-bottom: 20px;
} }
.btn-unselect { .btn-unselect {
display: inline-block; display: inline-block;
...@@ -577,4 +465,35 @@ export default { ...@@ -577,4 +465,35 @@ export default {
} }
} }
} }
/deep/ {
.tree-box {
border: 1px solid #e5e5e5;
}
.el-checkbox:last-of-type {
margin-right: 7px;
}
}
.account-body-form {
/deep/ {
.el-form-item {
margin-bottom: 20px;
display: flex;
}
.el-form-item__label {
width: 154px !important;
}
.el-form-item__content {
width: 404px;
margin-left: 0 !important;
}
.select-input-box {
width: 404px;
}
}
}
.bussiness-type {
/deep/ .el-form-item__content {
min-width: 1000px;
}
}
</style> </style>
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<div class="information-title">修改企业信息</div> <div class="information-title">修改企业信息</div>
<div class="information-form-box"> <div class="information-form-box">
<el-form ref="baseForm" :model="infoForm" class="account-body-form" label-width="154px" :rules="baseFormRules"> <el-form ref="baseForm" :model="infoForm" class="account-body-form" label-width="154px" :rules="baseFormRules">
<Province ref="provinceForm" :subdistrict="subdistrict" @selectProvince="selectProvince" @selectCity="selectCity" :detailAddressLabel="detailAddressLabel"></Province> <Province ref="provinceForm" :subdistrict="subdistrict" @selectProvince="selectProvince" @selectCity="selectCity" @selectAddressByMap="selectAddressByMap" :detailAddressLabel="detailAddressLabel"></Province>
<!-- <el-form-item size="small" label="商户地址:" class="map-row"> <!-- <el-form-item size="small" label="商户地址:" class="map-row">
<Province ref="provinceForm" :subdistrict="subdistrict" @selectProvince="selectProvince" @selectCity="selectCity"></Province> <Province ref="provinceForm" :subdistrict="subdistrict" @selectProvince="selectProvince" @selectCity="selectCity"></Province>
<el-input class="input-width" v-model="infoForm.merchantAddress" placeholder="请选择商户地址" readonly="readonly"></el-input> <el-input class="input-width" v-model="infoForm.merchantAddress" placeholder="请选择商户地址" readonly="readonly"></el-input>
...@@ -35,13 +35,13 @@ ...@@ -35,13 +35,13 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<GLDialog :visible.sync="dialogMapVisible" :mode="'big'" bigTitle="选择地址"> <!-- <GLDialog :visible.sync="dialogMapVisible" :mode="'big'" bigTitle="选择地址">
<map-view ref="mapForm" :mapHeight="mapHeight"></map-view> <map-view ref="mapForm" :mapHeight="mapHeight"></map-view>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogMapVisible = false">取 消</el-button> <el-button @click="dialogMapVisible = false">取 消</el-button>
<el-button type="primary" @click="getAddress">确 定</el-button> <el-button type="primary" @click="getAddress">确 定</el-button>
</span> </span>
</GLDialog> </GLDialog> -->
<!-- <GLFooter style="z-index: 2"> <!-- <GLFooter style="z-index: 2">
<el-button type="primary" @click="handleSave">提交</el-button> <el-button type="primary" @click="handleSave">提交</el-button>
<el-button @click="goback">取消</el-button> <el-button @click="goback">取消</el-button>
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<script> <script>
import util from '@/utils/util' import util from '@/utils/util'
import mapView from '@/components/mapView/index' // import mapView from '@/components/mapView/index'
import SelectBrand from './selectBrand.vue' import SelectBrand from './selectBrand.vue'
import TelPosition from './telPosition.vue' import TelPosition from './telPosition.vue'
import Province from '@/components/province-city/index.vue' import Province from '@/components/province-city/index.vue'
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
name: 'EditInfo', name: 'EditInfo',
components: { components: {
Province, Province,
mapView, // mapView,
SelectBrand, SelectBrand,
TelPosition TelPosition
}, },
...@@ -109,7 +109,7 @@ export default { ...@@ -109,7 +109,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.$refs.provinceForm.provinceList() // this.$refs.provinceForm.provinceList()
this.getUserInfo() this.getUserInfo()
}, },
methods: { methods: {
...@@ -157,7 +157,14 @@ export default { ...@@ -157,7 +157,14 @@ export default {
this.infoForm.businessType = businessType.map(item => (item = parseInt(item))) this.infoForm.businessType = businessType.map(item => (item = parseInt(item)))
} }
// 省市回显 // 省市回显
this.$refs.provinceForm.init(this.infoForm.provinceName, this.infoForm.cityName) var provinceData = {
province: this.infoForm.provinceName,
city: this.infoForm.cityName,
fullAddress: this.infoForm.merchantAddress,
lng: this.infoForm.lng,
lat: this.infoForm.lat
}
this.$refs.provinceForm.init(provinceData)
if (!this.infoForm.merchantBrandMain) { if (!this.infoForm.merchantBrandMain) {
this.infoForm.merchantBrandMain = [] this.infoForm.merchantBrandMain = []
} else { } else {
...@@ -181,80 +188,90 @@ export default { ...@@ -181,80 +188,90 @@ export default {
} }
}) })
}, },
getAddress() { // getAddress() {
if (!this.$refs.mapForm.address) { // if (!this.$refs.mapForm.address) {
this.$message.error('请选择地址') // this.$message.error('请选择地址')
return // return
} // }
this.infoForm.merchantAddress = this.$refs.mapForm.address // this.infoForm.merchantAddress = this.$refs.mapForm.address
let lnglat = this.$refs.mapForm.lnglat // let lnglat = this.$refs.mapForm.lnglat
this.infoForm.lat = lnglat.lat // this.infoForm.lat = lnglat.lat
this.infoForm.lng = lnglat.lng // this.infoForm.lng = lnglat.lng
var fullAddress = '' // var fullAddress = ''
var provincecode = '' // var provincecode = ''
if (this.$refs.mapForm.geocoderAddress.addressComponent) { // if (this.$refs.mapForm.geocoderAddress.addressComponent) {
fullAddress = this.$refs.mapForm.geocoderAddress.addressComponent // fullAddress = this.$refs.mapForm.geocoderAddress.addressComponent
provincecode = this.$refs.mapForm.geocoderAddress.adcode // provincecode = this.$refs.mapForm.geocoderAddress.adcode
this.addressData.fullAddress = fullAddress // this.addressData.fullAddress = fullAddress
this.addressData.provincecode = provincecode // this.addressData.provincecode = provincecode
// this.addressData.fullAddress = this.$refs.mapForm.geocoderAddress.addressComponent // // this.addressData.fullAddress = this.$refs.mapForm.geocoderAddress.addressComponent
// this.addressData.provincecode = this.$refs.mapForm.geocoderAddress.adcode // // this.addressData.provincecode = this.$refs.mapForm.geocoderAddress.adcode
} else { // } else {
fullAddress = this.addressData.fullAddress // fullAddress = this.addressData.fullAddress
provincecode = this.addressData.provincecode // provincecode = this.addressData.provincecode
} // }
// 获取省市 // // 获取省市
var province = '' // var province = ''
var city = '' // var city = ''
if (fullAddress) { // if (fullAddress) {
province = fullAddress.province // province = fullAddress.province
city = fullAddress.city ? fullAddress.city : fullAddress.district // city = fullAddress.city ? fullAddress.city : fullAddress.district
} else { // } else {
province = this.infoForm.provinceName // province = this.infoForm.provinceName
city = this.infoForm.cityName // city = this.infoForm.cityName
provincecode = this.infoForm.cityCode // provincecode = this.infoForm.cityCode
} // }
const municipalities = ['北京市', '天津市', '上海市', '重庆市'] // const municipalities = ['北京市', '天津市', '上海市', '重庆市']
var municipality = municipalities.find(item => item == province) // var municipality = municipalities.find(item => item == province)
if (municipality) { // if (municipality) {
city = city.slice(0, 2) + '城区' // city = city.slice(0, 2) + '城区'
if (municipality === '重庆市') { // if (municipality === '重庆市') {
provincecode = provincecode.slice(0, 4) // provincecode = provincecode.slice(0, 4)
provincecode == 5001 ? (city = city.slice(0, 2) + '城区') : (city = city.slice(0, 2) + '郊县') // provincecode == 5001 ? (city = city.slice(0, 2) + '城区') : (city = city.slice(0, 2) + '郊县')
} // }
} // }
// 判断省市是否匹配 // // 判断省市是否匹配
if (this.infoForm.provinceName) { // if (this.infoForm.provinceName) {
if (this.infoForm.provinceName !== province && this.infoForm.cityName !== city) { // if (this.infoForm.provinceName !== province && this.infoForm.cityName !== city) {
this.$message.error('您选择的地址错误,请重新选择') // this.$message.error('您选择的地址错误,请重新选择')
this.infoForm.merchantAddress = '' // this.infoForm.merchantAddress = ''
return // return
} // }
} // }
this.dialogMapVisible = false // this.dialogMapVisible = false
this.infoForm.provinceName = province // this.infoForm.provinceName = province
this.infoForm.cityName = city // this.infoForm.cityName = city
// 当直接点击选择地址时,获取省市ID // // 当直接点击选择地址时,获取省市ID
this.$refs.provinceForm.init(province, city) // this.$refs.provinceForm.init(province, city)
}, // },
// 获取省 // 获取省
selectProvince(provinceName, provinceCode) { selectProvince(val) {
this.infoForm.merchantAddress = '' this.infoForm.merchantAddress = ''
this.infoForm.cityName = '' this.infoForm.cityName = ''
this.infoForm.provinceName = provinceName this.infoForm.provinceName = val.name
this.infoForm.provinceCode = provinceCode this.infoForm.provinceCode = val.adcode
}, },
// 获取市 // 获取市
selectCity(cityName, cityCode) { selectCity(val) {
if (cityName) { if (val.name) {
this.infoForm.cityName = cityName this.infoForm.cityName = val.name
this.infoForm.cityCode = cityCode this.infoForm.cityCode = val.adcode
} else { } else {
this.infoForm.cityName = '' this.infoForm.cityName = ''
this.infoForm.cityCode = '' this.infoForm.cityCode = ''
} }
this.infoForm.merchantAddress = '' this.infoForm.merchantAddress = ''
}, },
// 通过地图选择省市和详细地址
selectAddressByMap(val) {
console.log(val)
const { provinceName, cityName, fullAddress, lat, lng } = val
this.infoForm.merchantAddress = fullAddress
this.infoForm.provinceName = provinceName
this.infoForm.cityName = cityName
this.infoForm.lat = lat
this.infoForm.lng = lng
},
// 展示驻点电话弹框 // 展示驻点电话弹框
showTelDia() { showTelDia() {
this.$refs.telDialog.init(this.infoForm.residentPhone) this.$refs.telDialog.init(this.infoForm.residentPhone)
...@@ -352,4 +369,15 @@ export default { ...@@ -352,4 +369,15 @@ export default {
// min-width: 200px; // min-width: 200px;
flex: 1; flex: 1;
} }
/deep/ {
.el-form-item__content {
width: 432px;
}
.tree-box {
border: 1px solid #e5e5e5;
}
.el-checkbox:last-of-type {
margin-right: 7px;
}
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!