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