Commit 3a11b89f by 匡雅琴

fixed

2 parents c83ef419 ec219301
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* @param {*} params * @param {*} params
* @returns * @returns
*/ */
import { http_config,http_car } from '@/main' import { http_config,http } from '@/main'
const getMerchantTree = params => { const getMerchantTree = params => {
params.method = 'entmicro.api.common.findMerchantTreeByMerchantNo.list' params.method = 'entmicro.api.common.findMerchantTreeByMerchantNo.list'
return http_config({ return http_config({
...@@ -44,9 +44,9 @@ const merchantInfo = params => { ...@@ -44,9 +44,9 @@ const merchantInfo = params => {
}) })
} }
const brandList = params => { const brandList = params => {
params.method = 'dj.api.get.car.brandList' params.method = 'merchants.api.merchantCommon.getCarbrandTree'
return http_car({ return http({
url: '/rop-dj-car-boutique/router', url: '/rop-merchants/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
......
...@@ -6,11 +6,9 @@ ...@@ -6,11 +6,9 @@
* @param {*} params * @param {*} params
* @returns * @returns
*/ */
import { http_config } from '@/main' import { http_config, http } from '@/main'
const sessionId = 'mini-a8d84762-da6a-4ff7-b009-eb7fa0c80dfb-rop';
const listFollowerStaffByPage = params => { const listFollowerStaffByPage = params => {
params.method = 'entmicro.api.staff.listFollowerStaffByPage' params.method = 'entmicro.api.staff.listFollowerStaffByPage'
params.sessionId = sessionId
return http_config({ return http_config({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
...@@ -21,7 +19,6 @@ const listFollowerStaffByPage = params => { ...@@ -21,7 +19,6 @@ const listFollowerStaffByPage = params => {
// 获取跟进类型列表 // 获取跟进类型列表
const listEntFollowerType = params => { const listEntFollowerType = params => {
params.method = 'entmicro.api.staff.listEntFollowerType' params.method = 'entmicro.api.staff.listEntFollowerType'
params.sessionId = sessionId
return http_config({ return http_config({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
...@@ -32,7 +29,6 @@ const listEntFollowerType = params => { ...@@ -32,7 +29,6 @@ const listEntFollowerType = params => {
// 删除根据员工 // 删除根据员工
const deleteFollowerStaff = params => { const deleteFollowerStaff = params => {
params.method = 'entmicro.api.staff.deleteFollowerStaff' params.method = 'entmicro.api.staff.deleteFollowerStaff'
params.sessionId = sessionId
return http_config({ return http_config({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
...@@ -42,7 +38,6 @@ const deleteFollowerStaff = params => { ...@@ -42,7 +38,6 @@ const deleteFollowerStaff = params => {
} }
// 删除跟进类型 // 删除跟进类型
const deleteFollowerType = params => { const deleteFollowerType = params => {
params.sessionId = sessionId
params.method = 'entmicro.api.staff.deleteFollowerType' params.method = 'entmicro.api.staff.deleteFollowerType'
return http_config({ return http_config({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
...@@ -53,7 +48,6 @@ const deleteFollowerType = params => { ...@@ -53,7 +48,6 @@ const deleteFollowerType = params => {
} }
// 查询外部联系人员工 // 查询外部联系人员工
const listEntmicroStaff = params => { const listEntmicroStaff = params => {
params.sessionId = sessionId
params.method = 'entmicro.api.staff.listEntmicroStaff' params.method = 'entmicro.api.staff.listEntmicroStaff'
return http_config({ return http_config({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
...@@ -64,7 +58,6 @@ const listEntmicroStaff = params => { ...@@ -64,7 +58,6 @@ const listEntmicroStaff = params => {
} }
// 添加跟进员工 // 添加跟进员工
const saveFollowerStaff = params => { const saveFollowerStaff = params => {
params.sessionId = sessionId
params.method = 'entmicro.api.staff.saveFollowerStaff' params.method = 'entmicro.api.staff.saveFollowerStaff'
return http_config({ return http_config({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
...@@ -75,7 +68,6 @@ const saveFollowerStaff = params => { ...@@ -75,7 +68,6 @@ const saveFollowerStaff = params => {
} }
// 新增跟进类型 // 新增跟进类型
const saveFollowerType = params => { const saveFollowerType = params => {
params.sessionId = sessionId
params.method = 'entmicro.api.staff.saveFollowerType' params.method = 'entmicro.api.staff.saveFollowerType'
return http_config({ return http_config({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
...@@ -86,7 +78,6 @@ const saveFollowerType = params => { ...@@ -86,7 +78,6 @@ const saveFollowerType = params => {
} }
// 同步企微外部联系人 // 同步企微外部联系人
const syncEntmicroIsOutsiderStaff = params => { const syncEntmicroIsOutsiderStaff = params => {
params.sessionId = sessionId
params.method = 'entmicro.api.staff.syncEntmicroIsOutsiderStaff' params.method = 'entmicro.api.staff.syncEntmicroIsOutsiderStaff'
return http_config({ return http_config({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
...@@ -97,7 +88,6 @@ const syncEntmicroIsOutsiderStaff = params => { ...@@ -97,7 +88,6 @@ const syncEntmicroIsOutsiderStaff = params => {
} }
// 查询组织树 // 查询组织树
const listDepartmentTree = params => { const listDepartmentTree = params => {
params.sessionId = sessionId
params.method = 'entmicro.api.department.listDepartmentTree' params.method = 'entmicro.api.department.listDepartmentTree'
return http_config({ return http_config({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
...@@ -106,6 +96,16 @@ const listDepartmentTree = params => { ...@@ -106,6 +96,16 @@ const listDepartmentTree = params => {
sign: true sign: true
}) })
} }
// 获取业务类型
const getListEntBusinessType = (params = {}) => {
params.method = 'entmicro.api.staff.listEntBusinessType'
return http_config({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default { export default {
listFollowerStaffByPage, listFollowerStaffByPage,
listEntFollowerType, listEntFollowerType,
...@@ -115,6 +115,6 @@ export default { ...@@ -115,6 +115,6 @@ export default {
saveFollowerType, saveFollowerType,
saveFollowerStaff, saveFollowerStaff,
syncEntmicroIsOutsiderStaff, syncEntmicroIsOutsiderStaff,
listDepartmentTree listDepartmentTree,
getListEntBusinessType
} }
\ No newline at end of file \ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: limin * @Author: limin
* @Date: 2021-06-07 14:12:32 * @Date: 2021-06-07 14:12:32
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @LastEditTime: 2022-03-12 14:01:09 * @LastEditTime: 2022-03-15 10:07:01
*/ */
// 根据环境引入不同配置 process.env.VUE_APP_ENV // 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js') // let request = require('@/http/request.js')
...@@ -18,7 +18,7 @@ export const fetchConfig = function (isEnv = true) { ...@@ -18,7 +18,7 @@ export const fetchConfig = function (isEnv = true) {
// return Promise.resolve(cfg) // return Promise.resolve(cfg)
// } // }
// return new Http().get('https://oss-config.test.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config') // return new Http().get('https://oss-config.test.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config')
return new Http().get(' http://192.168.3.171:7300/mock/617ba1df1072f92988f05a14/account/config') return new Http().get('http://oss-config.dev.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config')
} }
export const config = { export const config = {
install(vue, cfg) { install(vue, cfg) {
......
...@@ -299,9 +299,8 @@ export default { ...@@ -299,9 +299,8 @@ export default {
if (params.businessType) { if (params.businessType) {
params.businessType = params.businessType.join(',') params.businessType = params.businessType.join(',')
} }
const getCheckedArr = this.$refs.baseInfoForm.$refs.brandListTree.getCheckedArr const merchantBrandList = this.$refs.baseInfoForm.$refs.brandListTree.getMerchantBrandList()
const merchantBrandMain = getCheckedArr.map(item => item.id) params.merchantBrandListJson = JSON.stringify(merchantBrandList)
params.merchantBrandMain = merchantBrandMain.join(',')
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
......
...@@ -200,13 +200,14 @@ export default { ...@@ -200,13 +200,14 @@ export default {
} }
}, },
methods: { methods: {
checkBrandList(merchantBrandMain) { checkBrandList(chant) {
let merchantBrandMain = chant.filter(item=>item)
this.$set(this.accountAddForm, 'merchantBrandMain', merchantBrandMain) this.$set(this.accountAddForm, 'merchantBrandMain', merchantBrandMain)
console.log(this.accountAddForm.merchantBrandMain)
if (!this.accountAddForm.merchantBrandMain) { if (!this.accountAddForm.merchantBrandMain) {
this.accountAddForm.merchantBrandMain = [] this.accountAddForm.merchantBrandMain = []
} else {
this.accountAddForm.merchantBrandMain = this.accountAddForm.merchantBrandMain.split(',')
} }
console.log(this.accountAddForm.merchantBrandMain)
this.$refs.brandListTree.getCheckList(this.accountAddForm.merchantBrandMain) this.$refs.brandListTree.getCheckList(this.accountAddForm.merchantBrandMain)
}, },
checkBusinessType(type) { checkBusinessType(type) {
...@@ -224,11 +225,12 @@ export default { ...@@ -224,11 +225,12 @@ export default {
async brandList() { async brandList() {
this.$refs.brandListTree.loading = true this.$refs.brandListTree.loading = true
this.businessType = await this.$apis.store.findAllDictData({ dictType: 'business_type' }) this.businessType = await this.$apis.store.findAllDictData({ dictType: 'business_type' })
const brandListTree = await this.$apis.baseInfo.brandList({ needCarSeries: true }) const brandListTree = await this.$apis.baseInfo.brandList({})
brandListTree.forEach(item => { brandListTree.forEach(item => {
let child = item.childs let child = item.children
if(!child) return
child.forEach(k => { child.forEach(k => {
delete k.childs delete k.children
}) })
}) })
this.brandListTree = brandListTree this.brandListTree = brandListTree
......
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
</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>
<!-- roleData.businessScopName = roleData.businessScopName ? roleData.businessScopName + ',' + roleData.businessScopeCustomize : roleData.businessScopeCustomize --> <!-- <span class="itemValue">{{ firstPageObj.businessScopName ? firstPageObj.businessScopName + ',' + firstPageObj.businessScopeCustomize : firstPageObj.businessScopeCustomize ? firstPageObj.businessScopeCustomize : '-' }}</span> -->
<span class="itemValue">{{ firstPageObj.businessTypeName ? firstPageObj.businessTypeName : '-' }}</span> <span class="itemValue">{{ firstPageObj.businessTypeName ? firstPageObj.businessTypeName : '-' }}</span>
</el-col> </el-col>
</el-row> </el-row>
......
...@@ -314,9 +314,8 @@ export default { ...@@ -314,9 +314,8 @@ export default {
let businessScopeCustomize = this.businessScopeCustomize.map(item => item.name) let businessScopeCustomize = this.businessScopeCustomize.map(item => item.name)
params.businessScopeCustomize = businessScopeCustomize.join(',') params.businessScopeCustomize = businessScopeCustomize.join(',')
params.merchantFiles = JSON.stringify(params.merchantFiles) params.merchantFiles = JSON.stringify(params.merchantFiles)
const getCheckedArr = this.$refs.baseInfoForm.$refs.brandListTree.getCheckedArr const merchantBrandList = this.$refs.baseInfoForm.$refs.brandListTree.getMerchantBrandList()
const merchantBrandMain = getCheckedArr.map(item => item.id) params.merchantBrandListJson = JSON.stringify(merchantBrandList)
params.merchantBrandMain = merchantBrandMain.join(',')
Promise.all([pm1, pm2]).then(() => { Promise.all([pm1, pm2]).then(() => {
this.$apis.store.updateMerchant(params).then(res => { this.$apis.store.updateMerchant(params).then(res => {
if (res) { if (res) {
...@@ -424,6 +423,7 @@ export default { ...@@ -424,6 +423,7 @@ export default {
accounttypeId: accountType, accounttypeId: accountType,
merchantBrandMain merchantBrandMain
}) })
merchantBrandMain = merchantBrandMain.replaceAll(';', ',').split(',')
this.$refs.baseInfoForm.checkBrandList(merchantBrandMain) this.$refs.baseInfoForm.checkBrandList(merchantBrandMain)
this.$refs.baseInfoForm.checkBusinessType(businessType) this.$refs.baseInfoForm.checkBusinessType(businessType)
this.$nextTick(() => { this.$nextTick(() => {
......
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2022-03-03 17:45:22 * @Date: 2022-03-03 17:45:22
* @LastEditTime: 2022-03-14 21:52:43 * @LastEditTime: 2022-03-04 16:53:04
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @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\approvalConfig\createGuide.vue * @FilePath: \scrm-micro-settings\src\views\approvalConfig\createGuide.vue
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</div> </div>
<div class="step-content"> <div class="step-content">
打开企微后台登录地址: 打开企微后台登录地址:
<el-link type="primary" target="_blank" :underline="false" href="https://work.weixin.qq.com/login">https://work.weixin.qq.com/login</el-link> <el-link type="primary" target="_blank" :underline="false" href="https://work.weixin.qq.com/wework_admin/loginpage_wx?from=myhome">https://work.weixin.qq.com/wework_admin/loginpage_wx?from=myhome</el-link>
企微管理员用企微或者微信扫码进行登录 企微管理员用企微或者微信扫码进行登录
</div> </div>
</div> </div>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<div class="step-title" style="margin-bottom: 16px">在【嘀加企微管家】应用页下方,根据接入方式,找到对应功能(自建应用模式和应用代开发模式为2存1,不会同时出现,企微管理员只需关注“审批设置”在企微后台那里 展示,点进去配置即可)</div> <div class="step-title" style="margin-bottom: 16px">在【嘀加企微管家】应用页下方,根据接入方式,找到对应功能(自建应用模式和应用代开发模式为2存1,不会同时出现,企微管理员只需关注“审批设置”在企微后台那里 展示,点进去配置即可)</div>
<div class="half-step"> <div class="half-step">
<div class="half-title">自建应用模式:</div> <div class="half-title">自建应用模式:</div>
<div class="half-content third-content" :style="{ height: thirdHeight + 'px' }">在【开发者接口】模块,找到“审批接口”,点击【设置】,进入设置页</div> <div class="half-content third-content">在【开发者接口】模块,找到“审批接口”,点击【设置】,进入设置页</div>
<img class="step3-img" src="../../../src/assets/guide/02@3x.png" alt="" /> <img class="step3-img" src="../../../src/assets/guide/02@3x.png" alt="" />
</div> </div>
<div class="half-step m-l-md"> <div class="half-step m-l-md">
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
</div> </div>
<div class="half-step m-l-md"> <div class="half-step m-l-md">
<div class="half-title">应用代开发模式:</div> <div class="half-title">应用代开发模式:</div>
<div class="half-content five-content" :style="{ height: fiveHeight + 'px' }">需进入模板的配置页,在浏览器链接中,复制如图位置的字符,即可获取审批 模板的ID</div> <div class="half-content five-content">需进入模板的配置页,在浏览器链接中,复制如图位置的字符,即可获取审批 模板的ID</div>
<img class="step5-img" src="../../../src/assets/guide/09@3x.png" alt="" /> <img class="step5-img" src="../../../src/assets/guide/09@3x.png" alt="" />
</div> </div>
</div> </div>
...@@ -104,15 +104,23 @@ export default { ...@@ -104,15 +104,23 @@ export default {
footerLeft: 0, footerLeft: 0,
footerWidth: 0, footerWidth: 0,
// 当屏幕太小导致换行,出现对不齐问题 // 当屏幕太小导致换行,出现对不齐问题
fiveHeight: 40, fiveHeight: 20,
thirdHeight: 40 thirdHeight: 20
} }
}, },
mounted() { mounted() {
// setTimeout(() => {
// this.lineHeight = document.querySelector('.guide-content').clientHeight - 92
// this.resize()
window.onresize = () => { window.onresize = () => {
// this.resize()
this.footerLeft = document.querySelector('.base-container-right').offsetLeft this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.thirdHeight = document.querySelector('.third-content').clientHeight
this.fiveHeight = document.querySelector('.five-content').clientHeight
} }
// window.addEventListener('resize', this.resize())
// }, 1000 / 60)
}, },
beforeDestroy() { beforeDestroy() {
// 事件注销 // 事件注销
...@@ -121,6 +129,20 @@ export default { ...@@ -121,6 +129,20 @@ export default {
methods: { methods: {
handleCancel() { handleCancel() {
this.$router.push({ path: '/approvalConfig/index' }) this.$router.push({ path: '/approvalConfig/index' })
},
resize() {
// this.resetData()
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.thirdHeight = document.querySelector('.third-content').clientHeight
this.fiveHeight = document.querySelector('.five-content').clientHeight
},
resetData() {
this.lineHeight = 2200
this.footerLeft = 0
this.footerWidth = 0
this.fiveHeight = 20
this.thirdHeight = 20
} }
} }
} }
......
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2022-03-02 18:28:20 * @Date: 2022-03-02 18:28:20
* @LastEditTime: 2022-03-14 21:58:48 * @LastEditTime: 2022-03-14 18:24:08
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @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\approvalConfig\index.vue * @FilePath: \scrm-micro-settings\src\views\approvalConfig\index.vue
...@@ -84,7 +84,7 @@ export default { ...@@ -84,7 +84,7 @@ export default {
edit(index) { edit(index) {
this.configList[index].disabled = false this.configList[index].disabled = false
}, },
// 编辑 // 提交
submit(model, index) { submit(model, index) {
this.oldConfig[model] = this.config[model] this.oldConfig[model] = this.config[model]
this.configList[index].disabled = true this.configList[index].disabled = true
...@@ -108,6 +108,7 @@ export default { ...@@ -108,6 +108,7 @@ export default {
}, },
// 取消 // 取消
cancel(model, index) { cancel(model, index) {
console.log(this.oldConfig[model])
this.config[model] = this.oldConfig[model] this.config[model] = this.oldConfig[model]
this.configList[index].disabled = true this.configList[index].disabled = true
}, },
......
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2022-03-07 14:32:50 * @Date: 2022-03-07 14:32:50
* @LastEditTime: 2022-03-14 21:32:45 * @LastEditTime: 2022-03-14 21:04:10
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @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
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</el-form-item> </el-form-item>
<el-form-item size="small" label="经营业务类型"> <el-form-item size="small" label="经营业务类型">
<el-checkbox-group v-model="infoForm.businessType"> <el-checkbox-group v-model="infoForm.businessType">
<el-checkbox :label="item.dictValue" v-for="item in businessType" :disabled="item.dictValue <= 6" :key="item.dictValue">{{ item.dictLabel }}</el-checkbox> <el-checkbox :label="item.dictValue" v-for="item in businessType" :key="item.dictValue" :disabled="item.dictValue <= 6">{{ item.dictLabel }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
<el-form-item size="small" label="营业时间" class="time-row"> <el-form-item size="small" label="营业时间" class="time-row">
...@@ -58,7 +58,7 @@ export default { ...@@ -58,7 +58,7 @@ export default {
dialogMapVisible: false, dialogMapVisible: false,
mapHeight: 450, mapHeight: 450,
infoForm: { infoForm: {
businessType: [], businessType: [1, 2, 3, 4, 5, 6],
bussinessTime: [] bussinessTime: []
}, },
businessType: [], businessType: [],
...@@ -92,13 +92,16 @@ export default { ...@@ -92,13 +92,16 @@ export default {
} else { } else {
const businessType = this.infoForm.businessType.split(',') const businessType = this.infoForm.businessType.split(',')
this.infoForm.businessType = businessType.map(item => (item = parseInt(item))) this.infoForm.businessType = businessType.map(item => (item = parseInt(item)))
console.log(this.infoForm.businessType)
} }
console.log(this.infoForm.businessType) console.log(this.infoForm.businessType)
const brandListTree = await this.$apis.baseInfo.brandList({ needCarSeries: true }) const brandListTree = await this.$apis.baseInfo.brandList({})
console.log(brandListTree)
brandListTree.forEach(item => { brandListTree.forEach(item => {
let child = item.childs let child = item.children
if(!child) return
child.forEach(k => { child.forEach(k => {
delete k.childs delete k.children
}) })
}) })
this.brandListTree = brandListTree this.brandListTree = brandListTree
...@@ -106,7 +109,7 @@ export default { ...@@ -106,7 +109,7 @@ export default {
if (!this.infoForm.merchantBrandMain) { if (!this.infoForm.merchantBrandMain) {
this.infoForm.merchantBrandMain = [] this.infoForm.merchantBrandMain = []
} else { } else {
this.infoForm.merchantBrandMain = this.infoForm.merchantBrandMain.split(',') this.infoForm.merchantBrandMain = this.infoForm.merchantBrandMain.replaceAll(';',',').split(',')
} }
this.$refs.brandListTree.getCheckList(this.infoForm.merchantBrandMain) this.$refs.brandListTree.getCheckList(this.infoForm.merchantBrandMain)
this.$nextTick(() => { this.$nextTick(() => {
...@@ -146,9 +149,8 @@ export default { ...@@ -146,9 +149,8 @@ export default {
delete params.stores delete params.stores
params.businessType = params.businessType.join(',') params.businessType = params.businessType.join(',')
//merchantBrandMain 品牌id //merchantBrandMain 品牌id
const getCheckedArr = this.$refs.brandListTree.getCheckedArr const merchantBrandList = this.$refs.brandListTree.getMerchantBrandList()
const merchantBrandMain = getCheckedArr.map(item => item.id) params.merchantBrandListJson = JSON.stringify(merchantBrandList)
params.merchantBrandMain = merchantBrandMain.join(',')
this.$apis.store.updateMerchant(params).then(res => { this.$apis.store.updateMerchant(params).then(res => {
if (res) { if (res) {
this.$router.push({ path: '/baseInfo/index' }) this.$router.push({ path: '/baseInfo/index' })
......
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
<div class="select-input-box"> <div class="select-input-box">
<template v-for="(item, idx) in getCheckedArr"> <template v-for="(item, idx) in getCheckedArr">
<el-tag effect="plain" type="info" :key="idx" closable :disable-transitions="false" @close="removeItem(item, idx)" v-if="idx < 3"> <el-tag effect="plain" type="info" :key="idx" closable :disable-transitions="false" @close="removeItem(item, idx)" v-if="idx < 3">
{{ item.name }} {{ item.label }}
</el-tag> </el-tag>
</template> </template>
<el-popover placement="top" width="600" trigger="hover" class="select-popover"> <el-popover placement="top" width="600" trigger="hover" class="select-popover">
<div class="select-popover-box"> <div class="select-popover-box">
<el-tag effect="plain" class="popover-item" v-for="(item, idx) in getCheckedArr" type="info" :key="idx" closable :disable-transitions="false" @close="removeItem(item, idx)"> <el-tag effect="plain" class="popover-item" v-for="(item, idx) in getCheckedArr" type="info" :key="idx" closable :disable-transitions="false" @close="removeItem(item, idx)">
{{ item.name }} {{ item.label }}
</el-tag> </el-tag>
</div> </div>
<el-tag effect="plain" slot="reference" type="info" v-show="getCheckedArr.length > 3">+ {{ getCheckedArr.length - 3 }}</el-tag> <el-tag effect="plain" slot="reference" type="info" v-show="getCheckedArr.length > 3">+ {{ getCheckedArr.length - 3 }}</el-tag>
...@@ -47,8 +47,8 @@ export default { ...@@ -47,8 +47,8 @@ export default {
treeArr: [], treeArr: [],
getCheckedArr: [], getCheckedArr: [],
defaultProps: { defaultProps: {
children: 'childs', children: 'children',
label: 'name' label: 'label'
} }
} }
}, },
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
handler() { handler() {
const getCheckedNodes = this.$refs.tree.getCheckedNodes() const getCheckedNodes = this.$refs.tree.getCheckedNodes()
this.getCheckedArr = getCheckedNodes.reduce((prev, cur) => { this.getCheckedArr = getCheckedNodes.reduce((prev, cur) => {
if (Object.keys(cur).includes('childs') && cur.childs.length > 0) { if (Object.keys(cur).includes('children') && cur.children.length > 0) {
return prev return prev
} }
return prev.concat(cur) return prev.concat(cur)
...@@ -75,6 +75,37 @@ export default { ...@@ -75,6 +75,37 @@ export default {
} }
}, },
methods: { methods: {
getMerchantBrandList() {
let getCheckedNodes = this.$refs.tree.getCheckedNodes()
const getCheckedKeys = this.$refs.tree.getCheckedKeys()
const getHalfCheckedNodes = this.$refs.tree.getHalfCheckedNodes()
let merchantBrandList = getHalfCheckedNodes.map(car => {
let merchantBrandId = []
car.children.forEach(item => {
if (getCheckedKeys.includes(item.id)) {
merchantBrandId.push(item.id)
}
})
return {
cars: car.id,
merchantBrandId
}
})
getCheckedNodes = getCheckedNodes.filter(item=>item.children)
let merchantBrandList2 = getCheckedNodes.map(car => {
let merchantBrandId = []
car.children.forEach(item => {
if (getCheckedKeys.includes(item.id)) {
merchantBrandId.push(item.id)
}
})
return {
cars: car.id,
merchantBrandId
}
})
return merchantBrandList.concat(merchantBrandList2)
},
//勾选 //勾选
handleCheck() { handleCheck() {
this.treeArr = this.getTreeArray() this.treeArr = this.getTreeArray()
...@@ -86,6 +117,8 @@ export default { ...@@ -86,6 +117,8 @@ export default {
} }
}, },
getCheckList(checkArr = []) { getCheckList(checkArr = []) {
checkArr.forEach(item=>item = parseInt(item));
console.log(checkArr)
this.$refs.tree.setCheckedKeys(checkArr) this.$refs.tree.setCheckedKeys(checkArr)
this.$nextTick(() => { this.$nextTick(() => {
this.handleCheck() this.handleCheck()
...@@ -95,7 +128,7 @@ export default { ...@@ -95,7 +128,7 @@ export default {
getTreeArray() { getTreeArray() {
let tree_arr = [] let tree_arr = []
this.brandListTree.forEach(k => { this.brandListTree.forEach(k => {
let child = k.childs let child = k.children
if (child && child.length > 0) { if (child && child.length > 0) {
child.forEach(j => { child.forEach(j => {
tree_arr.push(j.id) tree_arr.push(j.id)
...@@ -133,7 +166,7 @@ export default { ...@@ -133,7 +166,7 @@ export default {
this.getCheckedArr.splice(index, 1) this.getCheckedArr.splice(index, 1)
const getCheckedNodes = this.$refs.tree.getCheckedNodes() const getCheckedNodes = this.$refs.tree.getCheckedNodes()
let getCheckedArr = getCheckedNodes.reduce((prev, cur) => { let getCheckedArr = getCheckedNodes.reduce((prev, cur) => {
if (Object.keys(cur).includes('childs')) { if (Object.keys(cur).includes('children')) {
return prev return prev
} }
return prev.concat(cur) return prev.concat(cur)
......
...@@ -36,6 +36,11 @@ ...@@ -36,6 +36,11 @@
</div> </div>
<div class="sale-type-desc">跟进员工类型最多新增30个,已新增{{ empType.length - empTypeF.length }}个</div> <div class="sale-type-desc">跟进员工类型最多新增30个,已新增{{ empType.length - empTypeF.length }}个</div>
</el-form-item> </el-form-item>
<el-form-item label="负责的业务类型">
<el-checkbox-group v-model="selectBusiness" @change="selectType">
<el-checkbox v-for="item in businessType" :key="item" :label="item.id">{{ item.businessName }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item style="text-align: center"> <el-form-item style="text-align: center">
<el-button @click="onCancel" size="small">取消</el-button> <el-button @click="onCancel" size="small">取消</el-button>
<el-button type="primary" @click="onSubmit" size="small">确定</el-button> <el-button type="primary" @click="onSubmit" size="small">确定</el-button>
...@@ -64,7 +69,9 @@ export default { ...@@ -64,7 +69,9 @@ export default {
empTypeValue: '', empTypeValue: '',
newTag: '', newTag: '',
innerTags: [], innerTags: [],
dialog_temp: {} dialog_temp: {},
businessType: [],
selectBusiness: []
} }
}, },
methods: { methods: {
...@@ -72,16 +79,30 @@ export default { ...@@ -72,16 +79,30 @@ export default {
this.newTag = '' this.newTag = ''
this.innerTags = [] this.innerTags = []
this.empTypeValue = '' this.empTypeValue = ''
this.selectBusiness = []
if (this.$refs.selectEmpTabel.listTree.length != 0) { if (this.$refs.selectEmpTabel.listTree.length != 0) {
this.$refs.selectEmpTabel.listEntmicroStaff() this.$refs.selectEmpTabel.listEntmicroStaff()
this.$refs.selectEmpTabel.clearSelection() this.$refs.selectEmpTabel.clearSelection()
} }
}, },
// 获取业务类型
getBusinessType() {
this.$apis.emp.getListEntBusinessType().then(res => {
console.log(res,'111');
this.businessType = res
})
},
// 选取业务类型
selectType(data) {
console.log(data, 'businessType');
this.selectBusiness = data
},
selectTable(val) { selectTable(val) {
this.innerTags = val this.innerTags = val
}, },
listEntFollowerType() { listEntFollowerType() {
this.$apis.emp.listEntFollowerType({ merchantId: this.$globalState.session.merchantId }).then(res => { const merchantId = this.$globalState.session.merchantId
this.$apis.emp.listEntFollowerType({ merchantId }).then(res => {
this.empType = res this.empType = res
this.empTypeF = res.filter(item => item.commonFlag) this.empTypeF = res.filter(item => item.commonFlag)
}) })
...@@ -158,7 +179,7 @@ export default { ...@@ -158,7 +179,7 @@ export default {
this.innerTags.forEach(item => { this.innerTags.forEach(item => {
userIds.push(item.userId) userIds.push(item.userId)
}) })
this.$emit('handSelectdEmp', this.empType[this.typeIndex].id, userIds) this.$emit('handSelectdEmp', this.empType[this.typeIndex].id, userIds, this.selectBusiness)
}, },
onCancel() { onCancel() {
if (this.innerTags.length != 0) { if (this.innerTags.length != 0) {
...@@ -176,7 +197,8 @@ export default { ...@@ -176,7 +197,8 @@ export default {
}, },
mounted() { mounted() {
this.listEntFollowerType() this.listEntFollowerType(),
this.getBusinessType()
} }
} }
</script> </script>
......
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
<el-button type="primary" @click="handleSearch" size="small">查询</el-button> <el-button type="primary" @click="handleSearch" size="small">查询</el-button>
</el-form-item> </el-form-item>
<el-form-item class="follow-form-jump"> <el-form-item class="follow-form-jump">
<GLButton fn="新增" size="small" icon="el-icon-plus" type="primary" @click="openDrawer">跟进专员</GLButton> <!-- <GLButton fn="新增" size="small" icon="el-icon-plus" type="primary" @click="openDrawer">跟进专员</GLButton> -->
<el-button size="small" icon="el-icon-plus" type="primary" @click="openDrawer">跟进专员</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<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">
...@@ -151,11 +152,13 @@ export default { ...@@ -151,11 +152,13 @@ export default {
closeDrawer() { closeDrawer() {
this.handleClose() this.handleClose()
}, },
handSelectdEmp(followerTypeId, userIds) { handSelectdEmp(followerTypeId, userIds, businessTypeId) {
var params = { var params = {
followerTypeId, followerTypeId,
userIds userIds,
businessTypeId
} }
console.log(params, '1253715427');
this.$apis.emp.saveFollowerStaff(params).then(res => { this.$apis.emp.saveFollowerStaff(params).then(res => {
if (res) { if (res) {
this.handleClose() this.handleClose()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!