Commit 61639f16 by 匡雅琴

创建商户样式调整

1 parent 16889dcc
...@@ -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>
...@@ -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!