Commit df74c067 by 徐忆琳

Merge branch 'xuyl_dev_v3.12.0' into 'v3.12.0'

更新六月份版本代码

See merge request !93
2 parents 66bed187 f34b9b91
<template>
<div v-if="provinceView">
<el-form ref="provinceForm" :model="provinceForm" :inline="inline" class="province" label-width="154px">
<el-form-item :label="provinceLabel">
<el-form ref="provinceForm" :model="provinceForm" :inline="inline" class="province" label-width="154px" >
<el-form-item :label="provinceLabel" >
<el-select size="small" v-model="provinceForm.provinceName" clearable placeholder="选择省份" @clear="selectProvince" class="select-padding" :style="{ width: subdistrict == 2 ? '52%' : '33.33%' }">
<el-option v-for="(item, index) in AllData" :key="'province' + index" :label="item.name" :value="item.name" @click.native="selectProvince(item)"></el-option>
</el-select>
......@@ -12,7 +12,7 @@
<el-option v-for="(item, index) in townList" :key="'town' + index" :label="item.name" :value="item.name" @click.native="selectTown(item)"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="detailAddressLabel">
<el-form-item :label="detailAddressLabel" >
<el-input size="small" v-if="mapView" readonly placeholder="请选择详细地址" v-model="provinceForm.fullAddress" class="map-input">
<el-button size="small" slot="append" @click="hanleSelectMap" icon="gl-icon-location">
<!-- <img src="@/assets/map.png" alt="" class="map-icon" /> -->
......@@ -111,7 +111,7 @@ export default {
mapHeight: 380,
dialogMapVisible: false,
// 暂存地址表单
addressData: {}
addressData: {},
}
},
mounted() {
......@@ -201,7 +201,6 @@ export default {
}
},
selectProvince(val) {
console.log(val)
this.provinceForm.provinceName = val ? val.name : ''
this.provinceForm.fullAddress = ''
this.provinceForm.cityName = ''
......@@ -303,7 +302,6 @@ export default {
}
// 判断省市是否匹配
// 如果只展示省市
console.log(this.provinceForm.provinceName, provincename, '12121212')
if (this.provinceForm.provinceName && !this.provinceForm.townName) {
if (this.provinceForm.provinceName !== provincename || this.provinceForm.cityName !== cityname) {
this.$message.error('您选择的地址错误,请重新选择')
......
......@@ -6,7 +6,7 @@
</div>
<div class="account-body scrm-box-f">
<div class="form-title">企业基本信息</div>
<base-info ref="baseInfoForm" :brandData="brandData" :accountAddForm="accountAddForm" :businessScopeCustomize="businessScopeCustomize" :businessOption="businessOption"></base-info>
<base-info ref="baseInfoForm" :provinceErr="provinceErr" :brandData="brandData" :accountAddForm="accountAddForm" :businessScopeCustomize="businessScopeCustomize" :businessOption="businessOption"></base-info>
</div>
<div class="account-body scrm-box-f">
<div class="form-title">账户信息</div>
......@@ -102,7 +102,6 @@ export default {
}
}
const validateAccountInfo = (rule, value, callback) => {
console.log(value)
if (value.length == 11 && !isNaN(value)) {
callback(new Error('登录账户名不可为 11 位纯数字'))
} else {
......@@ -233,9 +232,9 @@ export default {
},
//下一步
handleNext() {
console.log(2222)
this.loading = true
const pm1 = new Promise((resolve, reject) => {
this.$refs.baseInfoForm.$refs.baseForm.validate(valid => {
if (valid) resolve()
else {
......@@ -246,6 +245,10 @@ export default {
}, 100)
reject()
}
}).then(res =>{
console.log(res)
}).catch(err=>{
console.log(err)
})
})
const pm2 = new Promise((resolve, reject) => {
......@@ -262,6 +265,10 @@ export default {
}, 100)
}
})
}).then(res =>{
console.log(res)
}).catch(err=>{
console.log(err)
})
if (this.accounttypeId.length == 0) {
this.loading = false
......@@ -307,8 +314,28 @@ export default {
if (params.businessType) {
params.businessType = params.businessType.join(',')
}
// const merchantBrandList = this.$refs.baseInfoForm.$refs.brandListTree.getMerchantBrandList()
// 判断主营品牌
const merchantBrandList = this.$refs.baseInfoForm.$refs.brandListTree.getMerchantBrandList()
if (!merchantBrandList?.length){
this.loading = false
this.$message({
message: '请选择主营品牌',
type: 'error'
})
return
}
// params.merchantBrandListJson = JSON.stringify(merchantBrandList)
// 判断省市地址填写
if (!params.provinceName || !params.cityName || !params.merchantAddress){
this.loading = false
this.$message({
message: '请选择省市地址',
type: 'error'
})
return
}
params.isloginName ? (params.isloginName = 1) : (params.isloginName = 0)
params.merchantAccountLevel = this.accountDetail.merchantAccountLevel
params.status = 1
......
......@@ -30,8 +30,12 @@
<div class="bottom-spe">
<el-row>
<el-col :span="12">
<ProvinceCity ref="provinceForm" :subdistrict="subdistrict" @selectProvince="selectProvince" @selectCity="selectCity" :detailAddressLabel="detailAddressLabel" @selectAddressByMap="selectAddressByMap"></ProvinceCity>
</el-col>
<div class="province-sty">
<span class="province-icon">*</span>
<ProvinceCity ref="provinceForm" :subdistrict="subdistrict" @selectProvince="selectProvince" @selectCity="selectCity" :detailAddressLabel="detailAddressLabel" @selectAddressByMap="selectAddressByMap"></ProvinceCity>
</div>
<!-- <div class="province-txt">请选择省市地址</div>-->
</el-col>
<el-col :span="12">
<el-form-item label="驻店联系方式:">
<el-input maxlength="11" size="small" v-model="accountAddForm.residentContact" placeholder="请输入驻店联系人"></el-input>
......@@ -49,9 +53,12 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="主营品牌:">
<select-brand :brandListTree="brandListTree" @clickBrand="clickBrand" ref="brandListTree"></select-brand>
</el-form-item>
<div class="province-sty">
<span class="province-icon">*</span>
<el-form-item label="主营品牌:">
<select-brand :brandListTree="brandListTree" @clickBrand="clickBrand" ref="brandListTree"></select-brand>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row>
......@@ -98,6 +105,7 @@ export default {
SelectBrand
},
props: {
// provinceErr:{},
accountAddForm: {
type: Object
},
......@@ -151,7 +159,7 @@ export default {
{ required: true, message: '请输入联系电话', trigger: 'blur' },
{ validator: validatePhone, trigger: 'blur' }
],
residentPhone: [{ validator: validatePhoneTwo, trigger: 'blur' }]
residentPhone: [{ validator: validatePhoneTwo, trigger: 'blur' }],
},
brandListTree: [],
provinceCode: '',
......@@ -171,8 +179,6 @@ export default {
checkBrandList() {
// let merchantBrandMain = chant.filter(item => item)
// this.$set(this.accountAddForm, 'merchantBrandMain', merchantBrandMain)
console.log(this.accountAddForm.merchantBrandMain)
console.log(222222222)
if (!this.accountAddForm.merchantBrandMain) {
this.accountAddForm.merchantBrandMain = []
}
......@@ -505,4 +511,25 @@ export default {
}
}
}
.province-sty{
display: flex;
//position: relative;
.province-icon{
color: #f56c6c;
position: absolute;
margin-left: 72px;
margin-top: 8px;
}
//div{
// margin-left: -154px;
//}
}
.province-txt{
color: #f56c6c;
font-size: 12px;
line-height: 1;
padding-top: 4px;
margin-left: 154px;
margin-top: -20px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!