Commit f34b9b91 by 前端

更新六月份版本代码

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