Commit fe0d5d67 by 前端

Merge branch 'kuangyq_dev_2.1.0' into 'v2.1.0'

Kuangyq dev 2.1.0

See merge request !40
2 parents d8251392 317a88c5
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5", "element-ui": "^2.4.5",
"glsx-common": "^1.4.6", "glsx-common": "^1.4.6",
"glsx-components": "^1.4.1", "glsx-components": "^1.4.2",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"qrcodejs2": "^0.0.2", "qrcodejs2": "^0.0.2",
"vue": "^2.6.10", "vue": "^2.6.10",
......
...@@ -276,15 +276,15 @@ export default { ...@@ -276,15 +276,15 @@ export default {
}, 100) }, 100)
return return
} }
if (this.accountAddForm.residentPhone && !util.checkPhone(this.accountAddForm.residentPhone)) { // if (this.accountAddForm.residentPhone && !util.checkPhone(this.accountAddForm.residentPhone)) {
this.$message.error('请输入正确的驻店电话') // this.$message.error('请输入正确的驻店电话')
document.querySelector('#app').scrollTop = 0 // document.querySelector('#app').scrollTop = 0
setTimeout(() => { // setTimeout(() => {
var isError = document.getElementsByClassName('phone-input') // var isError = document.getElementsByClassName('phone-input')
isError[0].querySelector('input').focus() // isError[0].querySelector('input').focus()
}, 100) // }, 100)
return // return
} // }
let params = Object.assign({}, this.accountAddForm, this.accountInfoForm) let params = Object.assign({}, this.accountAddForm, this.accountInfoForm)
if (params.bussinessTime) { if (params.bussinessTime) {
params.bussinessBegintime = params.bussinessTime[0] params.bussinessBegintime = params.bussinessTime[0]
...@@ -401,6 +401,7 @@ export default { ...@@ -401,6 +401,7 @@ export default {
this.findMerchantDetail() this.findMerchantDetail()
this.getCarbrandTree() this.getCarbrandTree()
this.findAllDictData('business_type') this.findAllDictData('business_type')
// this.$refs.baseInfoForm.brandList()
} }
} }
</script> </script>
......
...@@ -74,8 +74,8 @@ ...@@ -74,8 +74,8 @@
</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="驻店电话" prop="residentPhone">
<el-input maxlength="11" size="small" class="phone-input" v-model="accountAddForm.residentPhone" placeholder="请输入驻店电话"></el-input> <el-input maxlength="13" size="small" class="phone-input" v-model="accountAddForm.residentPhone" placeholder="请输入驻店电话"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -179,6 +179,18 @@ export default { ...@@ -179,6 +179,18 @@ export default {
callback() callback()
} }
} }
const validatePhoneTwo = (rule, value, callback) => {
const reg = /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/
if (value == '' || value == undefined || value == null) {
callback()
} else {
if (!reg.test(value) && value != '') {
callback(new Error('请输入正确的电话号码或者固话号码'))
} else {
callback()
}
}
}
return { return {
imgIndex: '', imgIndex: '',
filterText: '', filterText: '',
...@@ -193,7 +205,8 @@ export default { ...@@ -193,7 +205,8 @@ export default {
merchantLegalPersonPhone: [ merchantLegalPersonPhone: [
{ required: true, message: '请输入联系电话', trigger: 'blur' }, { required: true, message: '请输入联系电话', trigger: 'blur' },
{ validator: validatePhone, trigger: 'blur' } { validator: validatePhone, trigger: 'blur' }
] ],
residentPhone: [{ validator: validatePhoneTwo, trigger: 'blur' }]
}, },
brandListTree: [], brandListTree: [],
provinceCode: '', provinceCode: '',
...@@ -209,12 +222,15 @@ export default { ...@@ -209,12 +222,15 @@ export default {
} }
}, },
methods: { methods: {
checkBrandList(chant) { 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 = []
} }
this.brandList()
// this.$refs.brandListTree.getCheckList(this.accountAddForm.merchantBrandMain) // this.$refs.brandListTree.getCheckList(this.accountAddForm.merchantBrandMain)
}, },
checkBusinessType(type) { checkBusinessType(type) {
...@@ -251,7 +267,7 @@ export default { ...@@ -251,7 +267,7 @@ export default {
// 点击主营品牌 // 点击主营品牌
clickBrand(val) { clickBrand(val) {
if (!this.isFirstBrand) { if (!this.isFirstBrand) {
this.brandList() // this.brandList()
this.isFirstBrand = true this.isFirstBrand = true
} }
}, },
...@@ -284,7 +300,7 @@ export default { ...@@ -284,7 +300,7 @@ export default {
// 获取省市 // 获取省市
var provincecode = this.$refs.mapForm.geocoderAddress.adcode var provincecode = this.$refs.mapForm.geocoderAddress.adcode
var province = fullAddress.province var province = fullAddress.province
var city = fullAddress.city var city = fullAddress.city ? fullAddress.city : fullAddress.district
const municipalities = ['北京市', '天津市', '上海市', '重庆市'] const municipalities = ['北京市', '天津市', '上海市', '重庆市']
var municipality = municipalities.find(item => item == province) var municipality = municipalities.find(item => item == province)
if (municipality) { if (municipality) {
......
...@@ -133,8 +133,8 @@ ...@@ -133,8 +133,8 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="14" class="flexCol"> <el-col :span="14" class="flexCol">
<span class="itemName">主营品牌:</span> <span class="itemName">营业时间:</span>
<span class="itemValue">{{ firstPageObj.merchantBrandName || '-' }}</span> <span class="itemValue">{{ firstPageObj.bussinessBegintime ? firstPageObj.bussinessBegintime + '-' + firstPageObj.bussinessEndtime : '-' }}</span>
</el-col> </el-col>
<el-col :span="10" class="flexCol"> <el-col :span="10" class="flexCol">
<span class="itemName itemNameCol2">驻店电话:</span> <span class="itemName itemNameCol2">驻店电话:</span>
...@@ -142,9 +142,9 @@ ...@@ -142,9 +142,9 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12" class="flexCol"> <el-col class="flexCol">
<span class="itemName">营业时间:</span> <span class="itemName">主营品牌:</span>
<span class="itemValue">{{ firstPageObj.bussinessBegintime ? firstPageObj.bussinessBegintime + '-' + firstPageObj.bussinessEndtime : '-' }}</span> <span class="itemValue">{{ firstPageObj.merchantBrandName || '-' }}</span>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
...@@ -873,4 +873,12 @@ export default { ...@@ -873,4 +873,12 @@ export default {
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1); box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
} }
} }
.merchant-brand {
margin-right: 10px;
width: 200px;
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
}
</style> </style>
...@@ -292,15 +292,15 @@ export default { ...@@ -292,15 +292,15 @@ export default {
}, 100) }, 100)
return return
} }
if (this.accountAddForm.residentPhone && !util.checkPhone(this.accountAddForm.residentPhone)) { // if (this.accountAddForm.residentPhone && !util.checkPhone(this.accountAddForm.residentPhone)) {
this.$message.error('请输入正确的驻店电话') // this.$message.error('请输入正确的驻店电话')
document.querySelector('#app').scrollTop = 0 // document.querySelector('#app').scrollTop = 0
setTimeout(() => { // setTimeout(() => {
var isError = document.getElementsByClassName('phone-input') // var isError = document.getElementsByClassName('phone-input')
isError[0].querySelector('input').focus() // isError[0].querySelector('input').focus()
}, 100) // }, 100)
return // return
} // }
let params = Object.assign({}, this.accountAddForm, this.accountInfoForm) let params = Object.assign({}, this.accountAddForm, this.accountInfoForm)
if (params.bussinessTime) { if (params.bussinessTime) {
params.bussinessBegintime = params.bussinessTime[0] params.bussinessBegintime = params.bussinessTime[0]
...@@ -312,6 +312,7 @@ export default { ...@@ -312,6 +312,7 @@ export default {
if (params.businessType) { if (params.businessType) {
params.businessType = params.businessType.join(',') params.businessType = params.businessType.join(',')
} }
params.merchantBrandMain = ''
// params.merchantBrand = this.$refs.baseInfoForm.$refs.brandTree.getCheckedKeys().join(',') // params.merchantBrand = this.$refs.baseInfoForm.$refs.brandTree.getCheckedKeys().join(',')
params.isloginName ? (params.isloginName = 1) : (params.isloginName = 0) params.isloginName ? (params.isloginName = 1) : (params.isloginName = 0)
let businessScopeCustomize = this.businessScopeCustomize.map(item => item.name) let businessScopeCustomize = this.businessScopeCustomize.map(item => item.name)
...@@ -432,20 +433,18 @@ export default { ...@@ -432,20 +433,18 @@ export default {
}) })
// 省市回显 // 省市回显
this.$refs.baseInfoForm.init(this.accountAddForm.provinceName, this.accountAddForm.cityName) this.$refs.baseInfoForm.init(this.accountAddForm.provinceName, this.accountAddForm.cityName)
merchantBrandMain = merchantBrandMain.replaceAll(';', ',').split(',') if (!this.accountAddForm.merchantBrandMain) {
this.$refs.baseInfoForm.checkBrandList(merchantBrandMain) this.accountAddForm.merchantBrandMain = []
} else {
this.accountAddForm.merchantBrandMain = this.accountAddForm.merchantBrandMain.replaceAll(';', ',').split(',')
}
// merchantBrandMain = merchantBrandMain.replaceAll(';', ',').split(',')
this.$refs.baseInfoForm.brandList()
this.$refs.baseInfoForm.checkBusinessType(businessType) this.$refs.baseInfoForm.checkBusinessType(businessType)
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.baseInfoForm.$refs.baseForm.validate() this.$refs.baseInfoForm.$refs.baseForm.validate()
this.editStatus = false this.editStatus = false
}) })
if (merchantBrandName) {
const brandName = merchantBrandName.split(',').map((item, index) => {
return { label: item, id: index }
})
this.$refs.baseInfoForm.$refs.brandListTree.getCheckedArr = brandName
// console.log(this.$refs.baseInfoForm.$refs.brandListTree.getCheckedArr)
}
}, },
getCarbrandTree() { getCarbrandTree() {
this.$apis.store.getCarbrandTree({}).then(res => { this.$apis.store.getCarbrandTree({}).then(res => {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div class="main-information"> <div class="main-information">
<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="120px"> <el-form ref="baseForm" :model="infoForm" class="account-body-form" label-width="120px" :rules="baseFormRules">
<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>
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
<el-form-item size="small" label="营业时间" class="time-row"> <el-form-item size="small" label="营业时间" class="time-row">
<el-time-picker size="small" value-format="HH:mm:ss" is-range v-model="infoForm.bussinessTime" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"></el-time-picker> <el-time-picker size="small" value-format="HH:mm:ss" is-range v-model="infoForm.bussinessTime" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"></el-time-picker>
</el-form-item> </el-form-item>
<el-form-item size="small" label="驻店电话" style="position: relative"> <el-form-item size="small" label="驻店电话" style="position: relative" prop="residentPhone">
<el-input v-model="infoForm.residentPhone" class="phone-input" maxlength="11" placeholder="此电话会在小程序上显示,请填写真实有效的电话或手机号"></el-input> <el-input v-model="infoForm.residentPhone" class="phone-input" maxlength="13" placeholder="此电话会在小程序上显示,请填写真实有效的电话或手机号"></el-input>
<div @click="showTelDia" class="show-address">显示位置</div> <div @click="showTelDia" class="show-address">显示位置</div>
</el-form-item> </el-form-item>
<el-form-item size="small" label="主营品牌" style="height: 500px"> <el-form-item size="small" label="主营品牌" style="height: 500px">
...@@ -63,6 +63,18 @@ export default { ...@@ -63,6 +63,18 @@ export default {
TelPosition TelPosition
}, },
data() { data() {
const validatePhoneTwo = (rule, value, callback) => {
const reg = /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/
if (value == '' || value == undefined || value == null) {
callback()
} else {
if (!reg.test(value) && value != '') {
callback(new Error('请输入正确的电话号码或者固话号码'))
} else {
callback()
}
}
}
return { return {
subdistrict: 2, subdistrict: 2,
checkedAll: false, checkedAll: false,
...@@ -80,13 +92,14 @@ export default { ...@@ -80,13 +92,14 @@ export default {
}, },
businessType: [], businessType: [],
brandListTree: [], brandListTree: [],
isFirstBrand: false isFirstBrand: false,
baseFormRules: {
residentPhone: [{ validator: validatePhoneTwo, trigger: 'blur' }]
}
} }
}, },
mounted() { mounted() {
// this.brandList()
this.getUserInfo() this.getUserInfo()
// this.$refs.provinceForm.mapInit()
}, },
methods: { methods: {
async brandList() { async brandList() {
...@@ -139,17 +152,12 @@ export default { ...@@ -139,17 +152,12 @@ export default {
} else { } else {
this.infoForm.merchantBrandMain = this.infoForm.merchantBrandMain.replaceAll(';', ',').split(',') this.infoForm.merchantBrandMain = this.infoForm.merchantBrandMain.replaceAll(';', ',').split(',')
} }
if (merchantBrandName) { this.brandList()
const brandName = merchantBrandName.split(',').map((item, index) => {
return { label: item, id: index }
})
this.$refs.brandListTree.getCheckedArr = brandName
}
}, },
// 点击主营品牌 // 点击主营品牌
clickBrand(val) { clickBrand(val) {
if (!this.isFirstBrand) { if (!this.isFirstBrand) {
this.brandList() // this.brandList()
this.isFirstBrand = true this.isFirstBrand = true
} }
}, },
...@@ -175,7 +183,7 @@ export default { ...@@ -175,7 +183,7 @@ export default {
// 获取省市 // 获取省市
var provincecode = this.$refs.mapForm.geocoderAddress.adcode var provincecode = this.$refs.mapForm.geocoderAddress.adcode
var province = fullAddress.province var province = fullAddress.province
var city = fullAddress.city var city = fullAddress.city ? fullAddress.city : fullAddress.district
const municipalities = ['北京市', '天津市', '上海市', '重庆市'] const municipalities = ['北京市', '天津市', '上海市', '重庆市']
var municipality = municipalities.find(item => item == province) var municipality = municipalities.find(item => item == province)
if (municipality) { if (municipality) {
...@@ -218,15 +226,15 @@ export default { ...@@ -218,15 +226,15 @@ export default {
}, },
handleSave() { handleSave() {
const params = this.infoForm const params = this.infoForm
if (this.infoForm.residentPhone && !util.checkPhone(this.infoForm.residentPhone)) { // if (this.infoForm.residentPhone && !util.validatePhoneTwo(this.infoForm.residentPhone)) {
this.$message.error('请输入正确的驻店电话') // this.$message.error('请输入正确的驻店电话')
document.querySelector('#app').scrollTop = 0 // document.querySelector('#app').scrollTop = 0
setTimeout(() => { // setTimeout(() => {
var isError = document.getElementsByClassName('phone-input') // var isError = document.getElementsByClassName('phone-input')
isError[0].querySelector('input').focus() // isError[0].querySelector('input').focus()
}, 100) // }, 100)
return // return
} // }
params.merchantBrandMain = '' params.merchantBrandMain = ''
// 获取省市信息 // 获取省市信息
const { provinceName, provinceCode, cityName, cityCode } = this.$refs.provinceForm.provinceForm const { provinceName, provinceCode, cityName, cityCode } = this.$refs.provinceForm.provinceForm
......
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2022-03-07 14:32:50 * @Date: 2022-03-07 14:32:50
* @LastEditTime: 2022-04-19 18:03:04 * @LastEditTime: 2022-04-21 18:43:21
* @LastEditors: huyue * @LastEditors: huyue
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\views\baseInfo\editInfo.vue * @FilePath: \scrm-micro-settings\src\views\baseInfo\editInfo.vue
...@@ -92,8 +92,15 @@ export default { ...@@ -92,8 +92,15 @@ export default {
merchantBrandId merchantBrandId
} }
}) })
getCheckedNodes = getCheckedNodes.filter(item => item.children) let checkNodes = getCheckedNodes.filter(item => item.children)
let merchantBrandList2 = getCheckedNodes.map(car => { let noCheckNodes = getCheckedNodes
.filter(item => item.children === null)
.map(i => {
return {
cars: i.id
}
})
let merchantBrandList2 = checkNodes.map(car => {
let merchantBrandId = [] let merchantBrandId = []
car.children.forEach(item => { car.children.forEach(item => {
if (getCheckedKeys.includes(item.id)) { if (getCheckedKeys.includes(item.id)) {
...@@ -105,7 +112,7 @@ export default { ...@@ -105,7 +112,7 @@ export default {
merchantBrandId merchantBrandId
} }
}) })
return merchantBrandList.concat(merchantBrandList2) return merchantBrandList.concat(merchantBrandList2).concat(noCheckNodes)
}, },
//勾选 //勾选
handleCheck() { handleCheck() {
......
...@@ -40,6 +40,10 @@ export default { ...@@ -40,6 +40,10 @@ export default {
computed: {}, computed: {},
created() {
this.id = this.$route.params.id
},
methods: { methods: {
handleClose() { handleClose() {
this.$router.push({ this.$router.push({
......
...@@ -11,9 +11,12 @@ ...@@ -11,9 +11,12 @@
</div> </div>
<div class="follow-form" :style="{ 'min-height': formHeight + 'px' }"> <div class="follow-form" :style="{ 'min-height': formHeight + 'px' }">
<GLCombiForm ref="showSearch" :formObj="searchForm" :rowNumber="1" :searchSelectObj="searchSelectObj" :formData="searchFormData" :inline="true" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="showSearch" :formObj="searchForm" :rowNumber="1" :searchSelectObj="searchSelectObj" :formData="searchFormData" :inline="true" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="follow-btn"> <div class="table-header">
<GLButton fn="新增" size="small" icon="el-icon-plus" type="primary" plain @click="openDrawer">跟进专员</GLButton> <div class="header-text">跟进专员列表</div>
<!-- <el-button size="small" icon="el-icon-plus" type="primary" plain @click="openDrawer">跟进专员</el-button> --> <div class="table-btn">
<GLButton fn="新增" size="small" type="primary" plain @click="openDrawer">跟进专员</GLButton>
<!-- <el-button size="small" type="primary" plain @click="openDrawer">跟进专员</el-button> -->
</div>
</div> </div>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch"> <GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch">
<template slot="auth-button" slot-scope="scope" :data="scope.scope"> <template slot="auth-button" slot-scope="scope" :data="scope.scope">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!