Commit 4c09229b by 前端

Merge branch 'develop' into 'master'

Develop

See merge request !20
2 parents 791aa609 743bf545
/*
* @Author: your name
* @Date: 2022-03-12 11:08:25
* @LastEditTime: 2022-03-12 11:11:32
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\api\modules\approvalConfig.js
*/
import { http_config } from '@/main'
/**
* 根据 门店ID获取门店审批模板
*/
const getApproveDetail = params => {
params.method = 'scrm.api.coupon.directional.gift.approve.template.detail'
return http_config({
url: '/rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
})
}
/**
* 保存门店审批模板
*/
const saveApprove = params => {
params.method = 'scrm.api.coupon.directional.gift.approve.template.save'
return http_config({
url: '/rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getApproveDetail,
saveApprove
}
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* @param {*} params * @param {*} params
* @returns * @returns
*/ */
import { http_config } 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({
...@@ -43,9 +43,20 @@ const merchantInfo = params => { ...@@ -43,9 +43,20 @@ const merchantInfo = params => {
sign: true sign: true
}) })
} }
const brandList = params => {
params.method = 'merchants.api.merchantCommon.getCarbrandTree'
return http({
url: '/rop-merchants/router',
method: 'POST',
data: params,
sign: true
})
}
export default { export default {
getMerchantTree, getMerchantTree,
getDepartment, getDepartment,
toGL, toGL,
merchantInfo merchantInfo,
brandList
} }
\ No newline at end of file \ No newline at end of file
...@@ -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
...@@ -24,8 +24,8 @@ const findAllDictData = params => { ...@@ -24,8 +24,8 @@ const findAllDictData = params => {
data: params, data: params,
sign: true sign: true
}) })
} }
//主营品牌 //主营品牌
const getCarbrandTree = params => { const getCarbrandTree = params => {
params.method = 'merchants.api.merchantCommon.getCarbrandTree' params.method = 'merchants.api.merchantCommon.getCarbrandTree'
return http({ return http({
...@@ -34,8 +34,8 @@ const getCarbrandTree = params => { ...@@ -34,8 +34,8 @@ const getCarbrandTree = params => {
data: params, data: params,
sign: true sign: true
}) })
} }
//详情 //详情
const findMerchantDetail = params => { const findMerchantDetail = params => {
params.method = 'merchants.api.merchant.findMerchantDetail' params.method = 'merchants.api.merchant.findMerchantDetail'
return http({ return http({
...@@ -44,8 +44,18 @@ const findMerchantDetail = params => { ...@@ -44,8 +44,18 @@ const findMerchantDetail = params => {
data: params, data: params,
sign: true sign: true
}) })
} }
//下一步 const findMerchantBaseInfo = params => {
params.method = 'merchants.api.merchant.findMerchantBaseInfo'
return http({
url: '/rop-merchants/router',
method: 'POST',
data: params,
sign: true
})
}
//下一步
const saveMerchant = params => { const saveMerchant = params => {
params.method = 'merchants.api.merchant.saveMerchant' params.method = 'merchants.api.merchant.saveMerchant'
return http({ return http({
...@@ -72,8 +82,8 @@ const accountTypeSearchRequest = params => { ...@@ -72,8 +82,8 @@ const accountTypeSearchRequest = params => {
data: params, data: params,
sign: true sign: true
}) })
} }
//功能权限 //功能权限
const findPermissionsByMerId = params => { const findPermissionsByMerId = params => {
params.method = 'merchants.api.merchant.findPermissionsByMerId' params.method = 'merchants.api.merchant.findPermissionsByMerId'
return http({ return http({
...@@ -82,8 +92,8 @@ const findPermissionsByMerId = params => { ...@@ -82,8 +92,8 @@ const findPermissionsByMerId = params => {
data: params, data: params,
sign: true sign: true
}) })
} }
//功能权限 //功能权限
const findMenuFunTreeByMerId = params => { const findMenuFunTreeByMerId = params => {
params.method = 'merchants.api.merchant.findMenuFunTreeByMerId' params.method = 'merchants.api.merchant.findMenuFunTreeByMerId'
return http({ return http({
...@@ -92,8 +102,8 @@ const findMenuFunTreeByMerId = params => { ...@@ -92,8 +102,8 @@ const findMenuFunTreeByMerId = params => {
data: params, data: params,
sign: true sign: true
}) })
} }
//草稿保存 //草稿保存
const updatePermissions = params => { const updatePermissions = params => {
params.method = 'merchants.api.merchant.updatePermissions' params.method = 'merchants.api.merchant.updatePermissions'
return http({ return http({
...@@ -108,6 +118,7 @@ export default { ...@@ -108,6 +118,7 @@ export default {
findAllDictData, findAllDictData,
getCarbrandTree, getCarbrandTree,
findMerchantDetail, findMerchantDetail,
findMerchantBaseInfo,
saveMerchant, saveMerchant,
updateMerchant, updateMerchant,
findPermissionsByMerId, findPermissionsByMerId,
......
...@@ -155,3 +155,15 @@ img { ...@@ -155,3 +155,15 @@ img {
.el-cascader-menu { .el-cascader-menu {
max-height:500px; max-height:500px;
} }
.footer-panel {
display: flex;
align-items: center;
justify-content: center;
position: fixed;
width: 100%;
bottom: 0px;
height: 64px;
background: #ffffff;
z-index: 999;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
}
\ No newline at end of file \ No newline at end of file
...@@ -3,21 +3,22 @@ ...@@ -3,21 +3,22 @@
* @version: * @version:
* @Author: limin * @Author: limin
* @Date: 2021-06-07 14:12:32 * @Date: 2021-06-07 14:12:32
* @LastEditors: limin * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-09-07 14:38:52 * @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')
let cfg = require('./conf.js') let cfg = require('./conf.js')
import { Http } from 'glsx-common' import { Http } from 'glsx-common'
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
export const fetchConfig = function(isEnv = true) { export const fetchConfig = function (isEnv = true) {
// if (isEnv) { // if (isEnv) {
// let { request } = cfg // let { request } = cfg
// Object.assign(request, { timeout }) // Object.assign(request, { timeout })
// 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://oss-config.dev.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config')
} }
export const config = { export const config = {
install(vue, cfg) { install(vue, cfg) {
......
...@@ -30,6 +30,7 @@ export { bootstrap, mount, unmount } ...@@ -30,6 +30,7 @@ export { bootstrap, mount, unmount }
export const http = params => Vue.prototype.$http(params) export const http = params => Vue.prototype.$http(params)
export const http_common = params => Vue.prototype.$http_common(params) export const http_common = params => Vue.prototype.$http_common(params)
export const http_config = params => Vue.prototype.$http_config(params) export const http_config = params => Vue.prototype.$http_config(params)
export const http_car = params => Vue.prototype.$http_car(params)
console.log(http_config) console.log(http_config)
Object.keys(filters).forEach(key => { Object.keys(filters).forEach(key => {
Vue.filter(key, filters[key]); Vue.filter(key, filters[key]);
......
/*
* @Author: your name
* @Date: 2022-03-02 15:56:07
* @LastEditTime: 2022-03-07 14:34:37
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\router\routes.js
*/
const staticRoutes = Object.freeze([{ const staticRoutes = Object.freeze([{
name: 'account', name: 'account',
path: '/account/index', path: '/account/index',
meta: {}, meta: {},
component: resolve => require([`@/views/account/index.vue`], resolve) component: resolve => require([`@/views/account/index.vue`], resolve)
}, },
{ {
name: 'addAccount', name: 'addAccount',
path: '/account/addAccount/:id', path: '/account/addAccount/:id',
meta: {}, meta: {},
component: resolve => require([`@/views/account/addAccount.vue`], resolve) component: resolve => require([`@/views/account/addAccount.vue`], resolve)
}, },
{ {
name: 'editAccount', name: 'editAccount',
path: '/account/editAccount/:id', path: '/account/editAccount/:id',
meta: {}, meta: {},
component: resolve => require([`@/views/account/editAccount.vue`], resolve) component: resolve => require([`@/views/account/editAccount.vue`], resolve)
}, },
{ {
name: 'detailAccount', name: 'detailAccount',
path: '/account/detailAccount/:id', path: '/account/detailAccount/:id',
meta: {}, meta: {},
component: resolve => require([`@/views/account/detailAccount.vue`], resolve) component: resolve => require([`@/views/account/detailAccount.vue`], resolve)
}, },
{ {
name: 'role', name: 'role',
path: '/role/index', path: '/role/index',
component: resolve => require([`@/views/role/index.vue`], resolve), component: resolve => require([`@/views/role/index.vue`], resolve),
meta: {} meta: {}
}, },
{ {
name: 'role', name: 'role',
path: '/role/create/:id', path: '/role/create/:id',
component: resolve => require([`@/views/role/create.vue`], resolve), component: resolve => require([`@/views/role/create.vue`], resolve),
meta: {} meta: {}
}, },
{ {
name: 'role', name: 'role',
path: '/role/look:id', path: '/role/look:id',
component: resolve => require([`@/views/role/look.vue`], resolve), component: resolve => require([`@/views/role/look.vue`], resolve),
meta: {} meta: {}
}, },
{ {
name: 'Account2EmployeeIndex', name: 'Account2EmployeeIndex',
path: '/employee/index', path: '/employee/index',
meta: {}, meta: {},
component: resolve => require([`@/views/employee/index.vue`], resolve) component: resolve => require([`@/views/employee/index.vue`], resolve)
}, },
{ {
name: 'Account2EmployeeEditEmployee', name: 'Account2EmployeeEditEmployee',
path: '/employee/editEmployee/:addOrEdit/:id', path: '/employee/editEmployee/:addOrEdit/:id',
meta: {}, meta: {},
component: resolve => require([`@/views/employee/editEmployee.vue`], resolve) component: resolve => require([`@/views/employee/editEmployee.vue`], resolve)
}, },
{ {
name: 'Account2EmployeeDetailEmployee', name: 'Account2EmployeeDetailEmployee',
path: '/employee/detailEmployee/:id', path: '/employee/detailEmployee/:id',
meta: {}, meta: {},
component: resolve => require([`@/views/employee/detailEmployee.vue`], resolve) component: resolve => require([`@/views/employee/detailEmployee.vue`], resolve)
}, },
{ {
name: 'baseInfo', name: 'baseInfo',
path: '/baseInfo/index', path: '/baseInfo/index',
meta: {}, meta: {},
component: resolve => require([`@/views/baseInfo/index.vue`], resolve) component: resolve => require([`@/views/baseInfo/index.vue`], resolve)
}, },
{ {
name: 'EditInfo',
path: '/baseInfo/editInfo',
meta: {},
component: resolve => require([`@/views/baseInfo/editInfo.vue`], resolve)
},
{
name: 'relevance', name: 'relevance',
path: '/baseInfo/relevance', path: '/baseInfo/relevance',
meta: {}, meta: {},
component: resolve => require([`@/views/baseInfo/relevance.vue`], resolve) component: resolve => require([`@/views/baseInfo/relevance.vue`], resolve)
}, },
{ {
name: 'EnterpriseWechat', name: 'EnterpriseWechat',
path: '/enterpriseWechat/index', path: '/enterpriseWechat/index',
component: resolve => require([`@/views/enterpriseWechat/index.vue`], resolve), component: resolve => require([`@/views/enterpriseWechat/index.vue`], resolve),
meta: {} meta: {}
}, },
{ {
name: 'FollowUp', name: 'FollowUp',
path: '/followUp/index', path: '/followUp/index',
component: resolve => require([`@/views/followUp/index.vue`], resolve), component: resolve => require([`@/views/followUp/index.vue`], resolve),
meta: {} meta: {}
} },
{
name: 'ApprovalConfig',
path: '/approvalConfig/index',
component: resolve => require([`@/views/approvalConfig/index.vue`], resolve),
meta: {}
},
{
name: 'ApprovalConfig',
path: '/approvalConfig/createGuide',
component: resolve => require([`@/views/approvalConfig/createGuide.vue`], resolve),
meta: {}
}
]) ])
export default staticRoutes export default staticRoutes
\ No newline at end of file \ No newline at end of file
...@@ -2,11 +2,12 @@ import Vue from 'vue' ...@@ -2,11 +2,12 @@ import Vue from 'vue'
// import { message } from '@/plugins/element.js' // import { message } from '@/plugins/element.js'
import { fetchConfig } from '@/config' import { fetchConfig } from '@/config'
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建) import { GLButton, GLTable,GLFooter } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router' import { getRoutes } from '@/router'
import render from './render' import render from './render'
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
Vue.use(GLFooter)
// import GLTable from '@/components/glsx-table/index' // import GLTable from '@/components/glsx-table/index'
// Vue.component('GLTable', GLTable) // Vue.component('GLTable', GLTable)
import 'glsx-components/dist/glsx-components.css' import 'glsx-components/dist/glsx-components.css'
...@@ -15,7 +16,7 @@ let routes = [] ...@@ -15,7 +16,7 @@ let routes = []
let router = null let router = null
let instance = null let instance = null
export async function bootstrap({ name, id, history, common, messenger, globalState, routerBase }) { export async function bootstrap({ name, id, history, common, messenger, globalState, routerBase }) {
const { response, request, sign, secret, request_common, request_config, sign_common } = await fetchConfig() const { response, request, sign, secret, request_common, request_config,request_car, sign_common } = await fetchConfig()
console.log(request) console.log(request)
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
...@@ -25,6 +26,7 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt ...@@ -25,6 +26,7 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } }) Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } }) Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
Vue.prototype.$http_config = new common.Http({ response, request: request_config, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http_config = new common.Http({ response, request: request_config, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_car = new common.Http({ response, request: request_car, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState // Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
// Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) // Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* @version: 1.0.0 * @version: 1.0.0
* @Author: limin * @Author: limin
* @Date: 2021-09-23 19:02:23 * @Date: 2021-09-23 19:02:23
* @LastEditors: limin * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-09-24 10:41:17 * @LastEditTime: 2022-03-12 14:14:09
* @FilePath: \scrm\scrm-sub-blog\src\setup\single.js * @FilePath: \scrm\scrm-sub-blog\src\setup\single.js
*/ */
import Vue from 'vue' import Vue from 'vue'
...@@ -16,8 +16,9 @@ import render from './render' ...@@ -16,8 +16,9 @@ import render from './render'
import { routes } from '@/router' import { routes } from '@/router'
export async function start() { export async function start() {
if (window.__POWERED_BY_QIANKUN__) return if (window.__POWERED_BY_QIANKUN__) return
const { response, request, sign, secret } = await fetchConfig() const { response, request, sign, secret, request_config } = await fetchConfig()
Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { TGT: 'scrm-base-61a28f77-294f-4510-aa1c-6a35cff86f25-rop' } }) Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { TGT: 'scrm-base-61a28f77-294f-4510-aa1c-6a35cff86f25-rop' } })
Vue.prototype.$http_config = new Http({ response, request: request_config, sign, secret, alert: message.error, headers: { token: 'scrm-base-b336fe5b-0f08-4075-88af-283f6ec6c915-rop' } })
Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
render('/', routes) render('/', routes)
} }
\ No newline at end of file \ No newline at end of file
...@@ -137,7 +137,7 @@ export default { ...@@ -137,7 +137,7 @@ export default {
status: '', status: '',
merchantFiles: [], merchantFiles: [],
merchantType: 1, merchantType: 1,
businessScope: [], businessType: [],
parentId: '', parentId: '',
isloginName: false isloginName: false
}, },
...@@ -296,16 +296,17 @@ export default { ...@@ -296,16 +296,17 @@ export default {
params.bussinessBegintime = params.bussinessTime[0] params.bussinessBegintime = params.bussinessTime[0]
params.bussinessEndtime = params.bussinessTime[1] params.bussinessEndtime = params.bussinessTime[1]
} }
if (params.businessScope) { if (params.businessType) {
params.businessScope = params.businessScope.join(',') params.businessType = params.businessType.join(',')
} }
params.merchantBrand = this.$refs.baseInfoForm.$refs.brandTree.getCheckedKeys().join(',') // const merchantBrandList = this.$refs.baseInfoForm.$refs.brandListTree.getMerchantBrandList()
// params.merchantBrandListJson = JSON.stringify(merchantBrandList)
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
params.channelId = this.accountDetail.channelId params.channelId = this.accountDetail.channelId
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.accounttypeId = this.accounttypeId.join(',') params.accounttypeId = this.accounttypeId.join(',')
params.merchantFiles = JSON.stringify(params.merchantFiles) params.merchantFiles = JSON.stringify(params.merchantFiles)
params.merchantModel = this.accountDetail.merchantModel params.merchantModel = this.accountDetail.merchantModel
...@@ -317,6 +318,7 @@ export default { ...@@ -317,6 +318,7 @@ export default {
merchant = 'saveMerchant' merchant = 'saveMerchant'
} }
document.querySelector('#app').scrollTop = 0 document.querySelector('#app').scrollTop = 0
console.log(params)
Promise.all([pm1, pm2]).then(() => { Promise.all([pm1, pm2]).then(() => {
this.$apis.store[merchant](params).then(res => { this.$apis.store[merchant](params).then(res => {
if (res) { if (res) {
...@@ -342,7 +344,7 @@ export default { ...@@ -342,7 +344,7 @@ export default {
} }
this.$apis.store.findAllDictData(params).then(res => { this.$apis.store.findAllDictData(params).then(res => {
if (res) { if (res) {
if (dictType == 'business_scope') { if (dictType == 'business_type') {
this.businessOption = res this.businessOption = res
} }
} }
...@@ -390,6 +392,9 @@ export default { ...@@ -390,6 +392,9 @@ export default {
}) })
}, },
getCarbrandTree() { getCarbrandTree() {
// this.$apis.baseInfo.brandList({ needCarSeries: true }).then(res => {
// this.brandData = res
// })
this.$apis.store.getCarbrandTree({}).then(res => { this.$apis.store.getCarbrandTree({}).then(res => {
this.brandData = res this.brandData = res
}) })
...@@ -401,9 +406,10 @@ export default { ...@@ -401,9 +406,10 @@ export default {
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.accountAddForm.parentId = this.$route.params.id this.accountAddForm.parentId = this.$route.params.id
this.$refs.baseInfoForm.checkBusinessType()
this.findMerchantDetail() this.findMerchantDetail()
this.getCarbrandTree() this.getCarbrandTree()
this.findAllDictData('business_scope') this.findAllDictData('business_type')
} }
} }
</script> </script>
......
...@@ -78,18 +78,13 @@ ...@@ -78,18 +78,13 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <!-- <el-col :span="24">
<el-form-item label="营业范围"> <el-form-item label="经营业务类型">
<el-checkbox-group v-model="accountAddForm.businessScope"> <el-checkbox-group v-model="accountAddForm.businessType">
<el-checkbox v-for="item in businessOption" :label="item.dictValue" :key="item">{{ item.dictLabel }}</el-checkbox> <el-checkbox v-for="item in businessType" :label="item.dictValue" :disabled="item.dictValue <= 6" :key="item">{{ item.dictLabel }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
<div class="scrm-flex-center" v-for="(item, index) in businessScopeCustomize" :key="index">
<el-input size="small" v-model="businessScopeCustomize[index].name" placeholder="请自定义营业范围,建议不超过10个"></el-input>
<i class="el-icon-circle-plus el-icon-btn" @click="addBusinessScope" v-if="index == businessScopeCustomize.length - 1"></i>
<i class="el-icon-remove el-icon-btn" @click="removeBusinessScope" v-else></i>
</div>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
...@@ -99,14 +94,11 @@ ...@@ -99,14 +94,11 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <!-- <el-col :span="12">
<el-form-item label="主营品牌"> <el-form-item label="主营品牌">
<el-input size="small" v-model="filterText"></el-input> <select-brand :brandListTree="brandListTree" ref="brandListTree"></select-brand>
<div class="brand-tree">
<el-tree :data="brandData" show-checkbox default-expand-all node-key="id" ref="brandTree" highlight-current :props="defaultProps" :filter-node-method="filterNode" @check="clickDeal"></el-tree>
</div>
</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="门店照片">
<div class="store-upload-list"> <div class="store-upload-list">
...@@ -141,10 +133,12 @@ ...@@ -141,10 +133,12 @@
<script> <script>
import util from '@/utils/util' import util from '@/utils/util'
import mapView from '@/components/mapView/index' import mapView from '@/components/mapView/index'
// import SelectBrand from '../../baseInfo/selectBrand.vue'
export default { export default {
name: 'base', name: 'base',
components: { components: {
mapView mapView
// SelectBrand
}, },
props: { props: {
accountAddForm: { accountAddForm: {
...@@ -187,7 +181,8 @@ export default { ...@@ -187,7 +181,8 @@ export default {
{ required: true, message: '请输入联系电话', trigger: 'blur' }, { required: true, message: '请输入联系电话', trigger: 'blur' },
{ validator: validatePhone, trigger: 'blur' } { validator: validatePhone, trigger: 'blur' }
] ]
} },
brandListTree: []
} }
}, },
watch: { watch: {
...@@ -196,6 +191,44 @@ export default { ...@@ -196,6 +191,44 @@ export default {
} }
}, },
methods: { methods: {
checkBrandList(chant) {
let merchantBrandMain = chant.filter(item => item)
this.$set(this.accountAddForm, 'merchantBrandMain', merchantBrandMain)
console.log(this.accountAddForm.merchantBrandMain)
if (!this.accountAddForm.merchantBrandMain) {
this.accountAddForm.merchantBrandMain = []
}
console.log(this.accountAddForm.merchantBrandMain)
this.$refs.brandListTree.getCheckList(this.accountAddForm.merchantBrandMain)
},
checkBusinessType(type) {
if (!type) {
this.accountAddForm.businessType = [1, 2, 3, 4, 5, 6]
} else {
const businessType = type.split(',')
this.$set(
this.accountAddForm,
'businessType',
businessType.map(item => (item = parseInt(item)))
)
}
},
async brandList() {
this.$refs.brandListTree.loading = true
this.businessType = await this.$apis.store.findAllDictData({ dictType: 'business_type' })
const brandListTree = await this.$apis.baseInfo.brandList({})
brandListTree.forEach(item => {
let child = item.children
if (!child) return
child.forEach(k => {
delete k.children
})
})
this.brandListTree = brandListTree
this.$nextTick(() => {
this.$refs.brandListTree.loading = false
})
},
hanleSelectMap() { hanleSelectMap() {
this.dialogMapVisible = true this.dialogMapVisible = true
this.$nextTick(() => { this.$nextTick(() => {
...@@ -275,7 +308,9 @@ export default { ...@@ -275,7 +308,9 @@ export default {
} }
}, },
mounted() {} mounted() {
// this.brandList()
}
} }
</script> </script>
......
...@@ -181,7 +181,7 @@ export default { ...@@ -181,7 +181,7 @@ export default {
}) })
this.loading = false this.loading = false
this.tabName = this.tabMenu[0].accounttypeId this.tabName = this.tabMenu[0].accounttypeId
this.productTab = this.tabMenu[0].productsArr[0].productId this.productTab = this.tabMenu[0].productsArr[0] ? this.tabMenu[0].productsArr[0].productId : ''
// const arr = res.map(i => i.accounttypeId) // const arr = res.map(i => i.accounttypeId)
// this.tabMenu.map(i => arr.includes(i.accounttypeId)) // this.tabMenu.map(i => arr.includes(i.accounttypeId))
// console.log(this.tabMenu, arr) // console.log(this.tabMenu, arr)
......
...@@ -125,18 +125,17 @@ ...@@ -125,18 +125,17 @@
{{ firstPageObj.merchantAddress || '-' }} {{ firstPageObj.merchantAddress || '-' }}
</span> </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>
<!-- roleData.businessScopName = roleData.businessScopName ? roleData.businessScopName + ',' + roleData.businessScopeCustomize : roleData.businessScopeCustomize --> <span class="itemValue">{{ firstPageObj.businessTypeName ? firstPageObj.businessTypeName : '-' }}</span>
<span class="itemValue">{{ firstPageObj.businessScopName ? firstPageObj.businessScopName + ',' + firstPageObj.businessScopeCustomize : firstPageObj.businessScopeCustomize ? firstPageObj.businessScopeCustomize : '-' }}</span> </el-col> -->
</el-col>
</el-row> </el-row>
<el-row> <!-- <el-row>
<el-col :span="12" class="flexCol"> <el-col :span="12" class="flexCol">
<span class="itemName">主营品牌:</span> <span class="itemName">主营品牌:</span>
<span class="itemValue">{{ firstPageObj.merchantBrandName || '-' }}</span> <span class="itemValue">{{ firstPageObj.merchantBrandName || '-' }}</span>
</el-col> </el-col>
</el-row> </el-row> -->
</div> </div>
</div> </div>
</div> </div>
......
...@@ -267,7 +267,9 @@ export default { ...@@ -267,7 +267,9 @@ export default {
if (valid) resolve() if (valid) resolve()
setTimeout(() => { setTimeout(() => {
var isError = document.getElementsByClassName('is-error') var isError = document.getElementsByClassName('is-error')
if (isError[0]) {
isError[0].querySelector('input').focus() isError[0].querySelector('input').focus()
}
}, 100) }, 100)
}) })
}) })
...@@ -276,7 +278,9 @@ export default { ...@@ -276,7 +278,9 @@ export default {
if (valid) resolve() if (valid) resolve()
setTimeout(() => { setTimeout(() => {
var isError = document.getElementsByClassName('is-error') var isError = document.getElementsByClassName('is-error')
if (isError[0]) {
isError[0].querySelector('input').focus() isError[0].querySelector('input').focus()
}
}, 100) }, 100)
}) })
}) })
...@@ -306,14 +310,16 @@ export default { ...@@ -306,14 +310,16 @@ export default {
params.bussinessBegintime = '' params.bussinessBegintime = ''
params.bussinessEndtime = '' params.bussinessEndtime = ''
} }
if (params.businessScope) { if (params.businessType) {
params.businessScope = params.businessScope.join(',') params.businessType = params.businessType.join(',')
} }
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)
params.businessScopeCustomize = businessScopeCustomize.join(',') params.businessScopeCustomize = businessScopeCustomize.join(',')
params.merchantFiles = JSON.stringify(params.merchantFiles) params.merchantFiles = JSON.stringify(params.merchantFiles)
// const merchantBrandList = this.$refs.baseInfoForm.$refs.brandListTree.getMerchantBrandList()
// params.merchantBrandListJson = JSON.stringify(merchantBrandList)
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) {
...@@ -359,7 +365,7 @@ export default { ...@@ -359,7 +365,7 @@ export default {
}) })
}, },
renderView(res) { renderView(res) {
let { isloginName, bussinessBegintime, bussinessEndtime, lat, lng, merchantAddress, merchantName, merchantAbbreviation, merchantType, merchantOrgcode, merchantLegalPerson, merchantLegalPersonPhone, residentContact, residentPhone, merchantLoginAccount, merchantLoginPassword, merchantAccountLevel, businessScope, businessScopeCustomize, merchantBrand, merchantFileResponses, merchantModel, accountTypes, accountType, accounttypeId, channelId, status, parentId } = res let { isloginName, bussinessBegintime, bussinessEndtime, lat, merchantBrandMain, businessType, lng, merchantAddress, merchantName, merchantAbbreviation, merchantType, merchantOrgcode, merchantLegalPerson, merchantLegalPersonPhone, residentContact, residentPhone, merchantLoginAccount, merchantLoginPassword, merchantAccountLevel, businessScope, businessScopeCustomize, merchantBrand, merchantFileResponses, merchantModel, accountTypes, accountType, accounttypeId, channelId, status, parentId } = res
this.accountInfoForm.merchantLoginAccount = merchantLoginAccount this.accountInfoForm.merchantLoginAccount = merchantLoginAccount
this.accountInfoForm.merchantLoginPassword = merchantLoginPassword this.accountInfoForm.merchantLoginPassword = merchantLoginPassword
this.accountTypes = accountTypes this.accountTypes = accountTypes
...@@ -399,7 +405,7 @@ export default { ...@@ -399,7 +405,7 @@ export default {
for (let i in merchantBrand) { for (let i in merchantBrand) {
merchantBrand[i] = parseInt(merchantBrand[i]) merchantBrand[i] = parseInt(merchantBrand[i])
} }
this.$refs.baseInfoForm.$refs.brandTree.setCheckedKeys(merchantBrand) // this.$refs.baseInfoForm.$refs.brandTree.setCheckedKeys(merchantBrand)
this.accountAddForm = Object.assign(this.accountAddForm, { this.accountAddForm = Object.assign(this.accountAddForm, {
isloginName: isloginName ? true : false, isloginName: isloginName ? true : false,
lat, lat,
...@@ -418,8 +424,12 @@ export default { ...@@ -418,8 +424,12 @@ export default {
parentId, parentId,
channelId, channelId,
status, status,
accounttypeId: accountType accounttypeId: accountType,
merchantBrandMain
}) })
merchantBrandMain = merchantBrandMain.replaceAll(';', ',').split(',')
// this.$refs.baseInfoForm.checkBrandList(merchantBrandMain)
// 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
......
<!--
* @Author: your name
* @Date: 2022-03-03 17:45:22
* @LastEditTime: 2022-03-04 16:53:04
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\views\approvalConfig\createGuide.vue
-->
<template>
<div class="guide-page">
<div class="guide-title">操作手册</div>
<div class="guide-content">
<div class="step-line"></div>
<div class="step">
<div class="step-icon">
<span class="icon-shell"><span class="icon-number">1</span></span>
</div>
<div class="step-content">
打开企微后台登录地址:
<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 class="step">
<div class="step-icon">
<span class="icon-shell"><span class="icon-number">2</span></span>
</div>
<div class="step-content">
<div class="step-title">登录后,在【应用管理-应用】下,找到【嘀加企微管家】,点击进入</div>
<img class="step2-img" src="../../../src/assets/guide/01@3x.png" alt="" />
</div>
</div>
<div class="step">
<div class="step-icon">
<span class="icon-shell"><span class="icon-number">3</span></span>
</div>
<div class="step-content">
<div class="step-title" style="margin-bottom: 16px">在【嘀加企微管家】应用页下方,根据接入方式,找到对应功能(自建应用模式和应用代开发模式为2存1,不会同时出现,企微管理员只需关注“审批设置”在企微后台那里 展示,点进去配置即可)</div>
<div class="half-step">
<div class="half-title">自建应用模式:</div>
<div class="half-content third-content" :style="{ height: thirdHeight + 'px' }">在【开发者接口】模块,找到“审批接口”,点击【设置】,进入设置页</div>
<img class="step3-img" src="../../../src/assets/guide/02@3x.png" alt="" />
</div>
<div class="half-step m-l-md">
<div class="half-title">应用代开发模式:</div>
<div class="half-content" :style="{ height: thirdHeight + 'px' }">在【功能】模块,找到“审批流程”,点击【前往设置】,进入设置页</div>
<img class="step3-img" src="../../../src/assets/guide/03@3x.png" alt="" />
</div>
</div>
</div>
<div class="step">
<div class="step-icon">
<span class="icon-shell"><span class="icon-number">4</span></span>
</div>
<div class="step-content">
<div class="step-title">配置审批人及审批流</div>
<div class="half-title">自建应用模式:</div>
<div class="half-content">点击【+添加模板】,进入审批模板配置页,按自店需要,配置好审批人信息后,点击【保存】</div>
<div class="half-step">
<img class="step4-img m-b-md" src="../../../src/assets/guide/04@3x.png" alt="" />
</div>
<div class="half-step m-b-md m-l-md">
<img class="step4-img" src="../../../src/assets/guide/05@3x.png" alt="" />
</div>
<div class="half-title">应用代开发模式:</div>
<div class="half-content">点击出现的对应模板(若为空或缺少需要审批的模板,请联系我们:18928408808进行配置),进入审批模板配置页,按自店需要,配置好审批人信息后,点击【保存】</div>
<div class="half-step">
<img class="step4-img" src="../../../src/assets/guide/06@3x.png" alt="" />
</div>
<div class="half-step m-l-md">
<img class="step4-img" src="../../../src/assets/guide/07@3x.png" alt="" />
</div>
</div>
</div>
<div class="step">
<div class="step-icon">
<span class="icon-shell"><span class="icon-number">5</span></span>
</div>
<div class="step-content">
<div class="step-title">复制审批模板的ID</div>
<div class="half-step">
<div class="half-title">自建应用模式:</div>
<div class="half-content" :style="{ height: fiveHeight + 'px' }">点击【复制ID】,即可获取审批模板的ID</div>
<img class="step5-img" src="../../../src/assets/guide/08@3x.png" alt="" />
</div>
<div class="half-step m-l-md">
<div class="half-title">应用代开发模式:</div>
<div class="half-content five-content" :style="{ height: fiveHeight + 'px' }">需进入模板的配置页,在浏览器链接中,复制如图位置的字符,即可获取审批 模板的ID</div>
<img class="step5-img" src="../../../src/assets/guide/09@3x.png" alt="" />
</div>
</div>
</div>
</div>
<div class="footer-panel" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"><el-button type="primary" @click="handleCancel">返回</el-button></div>
</div>
</template>
<script>
export default {
name: 'CreateGuide',
data() {
return {
lineHeight: 2200,
footerLeft: 0,
// footerWidth: 800,
// 当屏幕太小导致换行,出现对不齐问题
fiveHeight: 40,
thirdHeight: 40
}
},
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
},
methods: {
handleCancel() {
this.$router.push({ path: '/approvalConfig/index' })
}
}
}
</script>
<style lang="scss">
.guide-page {
background-color: #fff;
margin-bottom: 64px;
.guide-title {
padding: 15px 20px;
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 28px;
border-bottom: 1px solid #d8d8d8;
}
.guide-content {
position: relative;
padding: 32px 20px 20px;
z-index: 1;
.step-line {
position: absolute;
background-color: #5850ff;
width: 1px;
height: calc(100% - 92px);
left: 35px;
top: 63px;
z-index: -1;
}
.step {
display: flex;
margin-bottom: 10px;
z-index: 1;
.step-icon {
display: inline-flex;
// position: relative;
width: 32px;
height: 63px;
align-items: center;
// justify-content: center;
color: #fff;
.icon-shell {
width: 100%;
background-color: #fff;
padding: 8px 0;
}
.icon-number {
display: inline-flex;
width: 100%;
height: 32px;
background-color: #5850ff;
border-radius: 50%;
align-items: center;
justify-content: center;
}
}
.step-content {
position: relative;
width: 100%;
padding: 20px;
margin-left: 20px;
line-height: 20px;
border: 1px solid #d8d8d8;
height: 100%;
.step-title {
margin-bottom: 10px;
}
.step2-img {
// width: 800px;
// height: 725px;
width: 100%;
height: 100%;
}
.half-step {
display: inline-flex;
width: calc(50% - 10px);
flex-direction: column;
.step3-img {
// width: 500px;
// height: 430px;
width: 100%;
height: 100%;
margin-top: 10px;
}
.step4-img,
.step5-img {
// width: 500px;
// height: 345px;
width: 100%;
height: 100%;
margin-top: 10px;
}
}
.half-title {
position: relative;
font-size: 14px;
color: #333;
font-weight: 600;
padding-left: 10px;
&::after {
content: '';
display: inline-block;
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 5px;
height: 5px;
background-color: #5850ff;
border-radius: 50%;
}
}
.half-content {
font-size: 14px;
margin-left: 10px;
}
}
}
}
}
.el-link.el-link--primary {
color: #5850ff;
&:hover {
color: #5850ff;
}
}
.m-b-md {
margin-bottom: 20px;
}
.m-l-md {
margin-left: 20px;
}
</style>
\ No newline at end of file \ No newline at end of file
<!--
* @Author: your name
* @Date: 2022-03-02 18:28:20
* @LastEditTime: 2022-03-14 18:24:08
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\views\approvalConfig\index.vue
-->
<template>
<div>
<div class="page-tips">
<img src="../../../src/assets/img/Shape.png" alt="" />
<span>企微管理员通过在企微后台创建审批模板,设置好审批人员后,将对应审批模板的ID复制到下方需要调用该审批的模块,该模块即可调用审批。</span>
</div>
<div class="config-page" :style="{ 'min-height': clientHeight + 'px' }">
<div class="page-title">
审批配置
<GLButton type="text" class="guide-btn" @click="jumpGuide" fn="审批模板创建指引">查看创建审批模板指引</GLButton>
<!-- <el-button type="text" class="guide-btn" @click="jumpGuide">查看创建审批模板指引></el-button> -->
</div>
<div class="config-list">
<div class="config-item" v-for="(item, index) in configList" :key="item.id">
<div class="config-title">
<span>{{ item.title }}</span>
</div>
<div class="config-content">
<span class="config-label">{{ item.name }}</span>
<el-input class="config-input" :placeholder="item.placeholder" :disabled="item.disabled" :size="size" v-model="config[item.model]" clearable></el-input>
<el-button-group class="config-btn" v-if="!item.disabled">
<el-button type="text" @click="cancel(item.model, index)">取消</el-button>
<el-button type="text" @click="submit(item.model, index)">确定</el-button>
</el-button-group>
<el-button-group v-else class="config-btn">
<el-button type="text" @click="edit(index)">编辑</el-button>
</el-button-group>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import util from '@/utils/util'
export default {
name: 'ApprovalConfig',
data() {
return {
input: '',
config: {
approveTemplateId: ''
// input1: '3'
},
oldConfig: {},
configList: [
{
id: 1,
title: '定向礼包',
name: '审批模板ID:',
model: 'approveTemplateId',
placeholder: '请将模板ID粘贴到此处,不填写则不调用审批',
disabled: true
// },
// {
// id: 2,
// title: '定向礼包',
// name: '审批模板ID:',
// model: 'input1',
// placeholder: '请将模板ID粘贴到此处,不填写则不调用审批',
// disabled: true
}
],
clientHeight: 500
}
},
created() {
this.getApprove()
},
mounted() {
this.clientHeight = document.documentElement.scrollHeight - 140
},
methods: {
// 编辑
edit(index) {
this.configList[index].disabled = false
},
// 提交
submit(model, index) {
this.oldConfig[model] = this.config[model]
this.configList[index].disabled = true
const params = {
merchantId: this.$globalState.session.merchantId,
approveTemplateId: this.config.approveTemplateId
}
this.$apis.approvalConfig.saveApprove(params).then(res => {
if (res) {
this.$message({
type: 'success',
message: '操作成功'
})
} else {
this.$message({
type: 'error',
message: '操作失败'
})
}
})
},
// 取消
cancel(model, index) {
console.log(this.oldConfig[model])
this.config[model] = this.oldConfig[model]
this.configList[index].disabled = true
},
// 调整环审批模板指引
jumpGuide() {
this.$router.push({ path: '/approvalConfig/createGuide' })
},
getApprove() {
const merchantId = this.$globalState.session.merchantId
// const merchantId = 44209572
this.$apis.approvalConfig.getApproveDetail({ merchantId }).then(res => {
this.config.approveTemplateId = res
this.oldConfig = util.deepClone(this.config)
})
}
}
}
</script>
<style scoped lang="scss">
.page-tips {
display: flex;
align-items: center;
font-size: 14px;
font-weight: 400;
line-height: 20px;
padding: 10px 16px;
border: 1px solid #5850ff;
border-radius: 4px;
background-color: #e6e9ff;
margin-bottom: 10px;
img {
width: 14px;
height: 14px;
margin-right: 8px;
}
}
.config-page {
background-color: #fff;
.page-title {
font-size: 16px;
font-weight: 500;
color: #333;
padding: 15px 20px;
border-bottom: 1px solid #d8d8d8;
.guide-btn {
text-decoration: underline;
margin-left: 16px;
}
}
.config-list {
padding: 32px 20px;
.config-item {
margin-bottom: 20px;
}
.config-title {
font-size: 14px;
font-weight: 500;
color: #333;
margin-bottom: 16px;
span {
position: relative;
display: inline-block;
width: 76px;
text-align: center;
z-index: 0;
&::after {
content: '';
display: inline-block;
position: absolute;
width: 100%;
height: 9px;
background-color: #e6e5ff;
left: 0;
bottom: 0;
z-index: -1;
}
}
}
.config-content {
.config-label {
display: inline-block;
width: 118px;
font-size: 14px;
font-weight: 400;
color: #333333;
text-align: right;
}
.config-input {
width: 415px;
}
.config-btn {
.el-button {
margin-left: 12px;
}
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<!--
* @Author: your name
* @Date: 2022-03-07 14:32:50
* @LastEditTime: 2022-03-28 15:53:38
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\views\baseInfo\editInfo.vue
-->
<template>
<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-item size="small" label="商户地址" class="map-row">
<el-input v-model="infoForm.merchantAddress" placeholder="请选择商户地址" readonly="readonly"></el-input>
<el-button @click="hanleSelectMap" type="primary">选择地址</el-button>
</el-form-item>
<el-form-item size="small" label="经营业务类型">
<el-checkbox-group v-model="infoForm.businessType">
<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-form-item>
<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="主营品牌">
<select-brand :brandListTree="brandListTree" ref="brandListTree"></select-brand>
</el-form-item>
</el-form>
</div>
<el-dialog :visible.sync="dialogMapVisible" width="60%">
<map-view ref="mapForm" :mapHeight="mapHeight"></map-view>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogMapVisible = false">取 消</el-button>
<el-button type="primary" @click="getAddress">确 定</el-button>
</span>
</el-dialog>
<GLFooter>
<el-button type="primary" @click="handleSave">提交</el-button>
<el-button @click="goback">取消</el-button>
</GLFooter>
</div>
</template>
<script>
import mapView from '@/components/mapView/index'
import SelectBrand from './selectBrand.vue'
export default {
name: 'EditInfo',
components: {
mapView,
SelectBrand
},
data() {
return {
checkedAll: false,
filterText: '',
dialogMapVisible: false,
mapHeight: 450,
infoForm: {
businessType: [1, 2, 3, 4, 5, 6],
bussinessTime: []
},
businessType: [],
brandListTree: []
}
},
mounted() {
// this.brandList()
},
methods: {
async brandList() {
this.$refs.brandListTree.loading = true
this.businessType = await this.$apis.store.findAllDictData({ dictType: 'business_type' })
console.log(this.businessType)
const infoForm = await this.$apis.store.findMerchantBaseInfo({ merchantId: this.$globalState.session.merchantId })
const { merchantAddress, lng, lat, id, merchantName, businessType, bussinessTime, bussinessBegintime, bussinessEndtime, channelId, merchantNo, merchantBrandMain } = infoForm
this.infoForm = {
merchantAddress,
lng,
lat,
id,
merchantName,
businessType,
bussinessTime: [bussinessBegintime, bussinessEndtime],
merchantBrandMain,
merchantNo,
channelId
}
if (!businessType) {
this.infoForm.businessType = [1, 2, 3, 4, 5, 6]
} else {
const businessType = this.infoForm.businessType.split(',')
this.infoForm.businessType = businessType.map(item => (item = parseInt(item)))
console.log(this.infoForm.businessType)
}
console.log(this.infoForm.businessType)
const brandListTree = await this.$apis.baseInfo.brandList({})
brandListTree.forEach(item => {
let child = item.children
if (!child) return
child.forEach(k => {
delete k.children
})
})
this.brandListTree = brandListTree
if (!this.infoForm.merchantBrandMain) {
this.infoForm.merchantBrandMain = []
} else {
this.infoForm.merchantBrandMain = this.infoForm.merchantBrandMain.replaceAll(';', ',').split(',')
}
this.$refs.brandListTree.getCheckList(this.infoForm.merchantBrandMain)
this.$nextTick(() => {
this.$refs.brandListTree.loading = false
})
},
hanleSelectMap() {
this.dialogMapVisible = true
this.$nextTick(() => {
if (this.infoForm.merchantAddress && !this.$refs.mapForm.address) {
this.$refs.mapForm.address = this.infoForm.merchantAddress
this.$refs.mapForm.addMarker([this.infoForm.lng, this.infoForm.lat])
}
})
},
getAddress() {
if (!this.$refs.mapForm.address) {
this.$message.error('请选择地址')
return
}
this.dialogMapVisible = false
this.infoForm.merchantAddress = this.$refs.mapForm.address
let lnglat = this.$refs.mapForm.lnglat
this.infoForm.lat = lnglat.lat
this.infoForm.lng = lnglat.lng
},
handleSave() {
const params = this.infoForm
console.log(this.infoForm)
if (params.bussinessTime) {
params.bussinessBegintime = params.bussinessTime[0]
params.bussinessEndtime = params.bussinessTime[1]
} else {
params.bussinessBegintime = ''
params.bussinessEndtime = ''
}
delete params.stores
params.businessType = params.businessType.join(',')
//merchantBrandMain 品牌id
const merchantBrandList = this.$refs.brandListTree.getMerchantBrandList()
params.merchantBrandListJson = JSON.stringify(merchantBrandList)
this.$apis.store.updateMerchant(params).then(res => {
if (res) {
this.$router.push({ path: '/baseInfo/index' })
}
})
},
goback() {
this.$router.go(-1)
}
}
}
</script>
<style lang="scss" scoped>
.main-information {
background: #ffffff;
border-radius: 2px;
height: calc(100% - 80px);
.information-title {
height: 58px;
line-height: 58px;
font-size: 16px;
font-weight: 500;
color: rgba(0, 0, 0, 0.85);
padding-left: 20px;
border-bottom: 1px solid #dcdfe6;
}
.information-form-box {
width: 50%;
padding-top: 30px;
.map-row {
/deep/ .el-form-item__content {
display: flex;
}
.el-input {
margin-right: 10px;
}
}
.time-row {
/deep/ .el-input__inner {
width: 100%;
}
}
}
}
</style>
...@@ -4,25 +4,23 @@ ...@@ -4,25 +4,23 @@
<div class="top_widget"> <div class="top_widget">
<img class="sign_icon" src="../../assets/scrm_base_info_icon_one.png" /> <img class="sign_icon" src="../../assets/scrm_base_info_icon_one.png" />
<div class="info_widget"> <div class="info_widget">
<div style="display: flex">
<div class="title_text"> <div class="title_text">
{{ blocInfo.merchantName }} {{ blocInfo.merchantName }}
<span class="min_text">(商户号:{{ blocInfo.merchantNo }})</span> <span class="min_text">(商户号:{{ blocInfo.merchantNo }})</span>
</div> </div>
<!-- <GLButton type="primary" :size="size" @click="editInfo" fn="修改企业信息">修改企业信息</GLButton> -->
<!-- <el-button type="primary" :size="size" @click="editInfo">修改企业信息</el-button> -->
</div>
<div class="sec_title_text dr_top_1"> <div class="sec_title_text dr_top_1">
<span>关联企微:{{ blocInfo.entmicroName || '--' }}</span> <span>关联企微:{{ blocInfo.entmicroName || '--' }}</span>
<div <div v-if="blocInfo.entmicroName" class="auth_btn" :class="accountLevel != 4 ? 'auth_btn_cp' : ''">已授权</div>
v-if="blocInfo.entmicroName"
class="auth_btn"
:class="accountLevel != 4 ? 'auth_btn_cp' : ''"
>已授权</div>
</div> </div>
<div v-if="accountLevel==1" class="min_text dr_top_1">所属企业:--</div> <div v-if="accountLevel == 1" class="min_text dr_top_1">所属企业:--</div>
<div v-if="accountLevel!=1" class="min_text dr_top_1">所属企业:{{ blocInfo.parentName }}</div> <div v-if="accountLevel != 1" class="min_text dr_top_1">所属企业:{{ blocInfo.parentName }}</div>
<div <div v-if="blocInfo.channelId == 2" class="min_text">商户SAP编码:{{ blocInfo.sapCode ? blocInfo.sapCode : '--' }}</div>
v-if="blocInfo.channelId == 2" <div v-if="accountLevel == 4" class="min_text">企微员工:{{ blocInfo.entMicroEmployeeCount }}人</div>
class="min_text"
>商户SAP编码:{{blocInfo.sapCode ? blocInfo.sapCode : '--'}}</div>
<div v-if="accountLevel==4" class="min_text">企微员工:{{ blocInfo.entMicroEmployeeCount }}人</div>
</div> </div>
</div> </div>
<blocModule :bloc="blocInfo" :list.sync="storesList" v-if="accountLevel != 4"></blocModule> <blocModule :bloc="blocInfo" :list.sync="storesList" v-if="accountLevel != 4"></blocModule>
...@@ -72,7 +70,7 @@ export default { ...@@ -72,7 +70,7 @@ export default {
}) })
}) })
}, },
dateFormat: function(dateTime, format = 'yyyy-MM-dd') { dateFormat: function (dateTime, format = 'yyyy-MM-dd') {
const date = new Date(dateTime) const date = new Date(dateTime)
const config = { const config = {
YYYY: date.getFullYear(), YYYY: date.getFullYear(),
...@@ -86,6 +84,9 @@ export default { ...@@ -86,6 +84,9 @@ export default {
format = format.replace(key, config[key]) format = format.replace(key, config[key])
} }
return format return format
},
editInfo() {
this.$router.push({ path: '/baseInfo/editInfo' })
} }
} }
} }
...@@ -118,7 +119,7 @@ export default { ...@@ -118,7 +119,7 @@ export default {
.top_widget { .top_widget {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 40px 0 0 40px; padding: 40px 40px 0 40px;
display: flex; display: flex;
.sign_icon { .sign_icon {
width: 64px; width: 64px;
...@@ -127,10 +128,12 @@ export default { ...@@ -127,10 +128,12 @@ export default {
} }
.info_widget { .info_widget {
margin-left: 15px; margin-left: 15px;
width: 100%;
.title_text { .title_text {
color: #333333; color: #333333;
font-size: 16px; font-size: 16px;
font-weight: 500; font-weight: 500;
width: 100%;
} }
.min_text { .min_text {
color: #999999; color: #999999;
......
<!--
* @Author: your name
* @Date: 2022-03-07 14:32:50
* @LastEditTime: 2022-03-07 14:43:18
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\views\baseInfo\editInfo.vue
-->
<template>
<div v-loading="loading">
<div class="select-input-box">
<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">
{{ item.label }}
</el-tag>
</template>
<el-popover placement="top" width="600" trigger="hover" class="select-popover">
<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)">
{{ item.label }}
</el-tag>
</div>
<el-tag effect="plain" slot="reference" type="info" v-show="getCheckedArr.length > 3">+ {{ getCheckedArr.length - 3 }}</el-tag>
</el-popover>
</div>
<div class="tree-box">
<el-input class="tree-input" prefix-icon="el-icon-search" placeholder="输入关键字进行过滤" v-model="filterText"></el-input>
<el-tree class="filter-tree" @check="handleCheck" :data="brandListTree" :props="defaultProps" node-key="id" default-expand-all show-checkbox :filter-node-method="filterNode" ref="tree"></el-tree>
<div class="tree-footer">
<div class="tree-footer-checkbox">
<el-checkbox v-model="checkedAll" @change="selectAll">全部</el-checkbox>
</div>
<div class="tree-footer-reset" @click="selectClear">重置</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'selectBrand',
data() {
return {
loading: false,
checkedAll: false,
filterText: '',
treeArr: [],
getCheckedArr: [],
defaultProps: {
children: 'children',
label: 'label'
}
}
},
props: {
brandListTree: {
type: Array
}
},
watch: {
filterText(val) {
this.$refs.tree.filter(val)
},
treeArr: {
handler() {
const getCheckedNodes = this.$refs.tree.getCheckedNodes()
this.getCheckedArr = getCheckedNodes.reduce((prev, cur) => {
if (Object.keys(cur).includes('children') && cur.children.length > 0) {
return prev
}
return prev.concat(cur)
}, [])
},
deep: true
}
},
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() {
this.treeArr = this.getTreeArray()
if (this.$refs.tree.getCheckedKeys().length == 0) {
this.checkedAll = false
}
if (this.$refs.tree.getCheckedKeys().length == this.treeArr.length) {
this.checkedAll = true
}
},
getCheckList(checkArr = []) {
checkArr.forEach(item=>item = parseInt(item));
console.log(checkArr)
this.$refs.tree.setCheckedKeys(checkArr)
this.$nextTick(() => {
this.handleCheck()
})
},
//获取选择项
getTreeArray() {
let tree_arr = []
this.brandListTree.forEach(k => {
let child = k.children
if (child && child.length > 0) {
child.forEach(j => {
tree_arr.push(j.id)
})
} else {
tree_arr.push(k.id)
}
})
return tree_arr
},
//全选
selectAll() {
this.loading = true
this.treeArr = this.getTreeArray()
if (this.getCheckedArr.length == this.treeArr.length) {
this.checkedAll = false
this.$refs.tree.setCheckedKeys([])
} else {
this.checkedAll = true
this.$refs.tree.setCheckedKeys(this.treeArr)
}
setTimeout(() => {
this.loading = false
}, 1000)
},
//重置
selectClear() {
this.treeArr = []
this.checkedAll = false
this.$refs.tree.setCheckedKeys([])
},
//删除
removeItem(checkItem, index) {
this.loading = true
this.getCheckedArr.splice(index, 1)
const getCheckedNodes = this.$refs.tree.getCheckedNodes()
let getCheckedArr = getCheckedNodes.reduce((prev, cur) => {
if (Object.keys(cur).includes('children')) {
return prev
}
return prev.concat(cur)
}, [])
getCheckedArr = getCheckedArr.filter(item => {
return item.id != checkItem.id
})
this.$refs.tree.setCheckedNodes(getCheckedArr)
if (getCheckedArr.length == 0) {
this.checkedAll = false
}
this.$nextTick(() => {
this.loading = false
})
},
//过滤
filterNode(value, data) {
if (!value) return true
return data.name.indexOf(value) !== -1
}
}
}
</script>
<style lang="scss" scoped>
.select-input-box {
width: 100%;
height: 38px;
background: #ffffff;
border-radius: 4px;
border: 1px solid #e5e5e5;
box-sizing: border-box;
padding: 4px;
display: flex;
align-items: center;
/deep/ .el-tag {
margin-right: 5px;
height: 26px;
line-height: 26px;
box-sizing: border-box;
}
}
.select-popover {
&-box {
display: flex;
flex-wrap: wrap;
max-height: 500px;
overflow-y: auto;
.popover-item {
margin-right: 5px;
margin-bottom: 5px;
height: 26px;
line-height: 26px;
box-sizing: border-box;
}
}
}
.tree-box {
margin-top: 10px;
padding: 15px 15px 0px;
background: #ffffff;
box-shadow: 0px 6px 20px 0px rgba(122, 122, 122, 0.2);
border-radius: 4px;
.tree-input {
margin-bottom: 10px;
}
.filter-tree {
height: 300px;
overflow-y: auto;
}
.tree-footer {
border-top: 1px solid #e5e5e5;
height: 48px;
padding: 0px 15px;
display: flex;
justify-content: space-between;
align-items: center;
}
}
</style>
...@@ -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="负责的业务类型" v-if="typeIndex != 2 && typeIndex != 4">
<el-checkbox-group v-model="selectBusiness" @change="selectType">
<el-checkbox :disabled="(typeIndex == 0 && item.id != 1) || (typeIndex == 1 && item.id == 1)" 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,18 @@ export default { ...@@ -64,7 +69,18 @@ export default {
empTypeValue: '', empTypeValue: '',
newTag: '', newTag: '',
innerTags: [], innerTags: [],
dialog_temp: {} dialog_temp: {},
businessType: [],
selectBusiness: []
}
},
watch: {
typeIndex(val) {
if (val == 0) {
this.selectBusiness = [1]
} else {
this.selectBusiness = []
}
} }
}, },
methods: { methods: {
...@@ -72,16 +88,31 @@ export default { ...@@ -72,16 +88,31 @@ 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
this.selectBusiness = [1]
})
},
// 选取业务类型
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 +189,7 @@ export default { ...@@ -158,7 +189,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 +207,7 @@ export default { ...@@ -176,7 +207,7 @@ 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!