Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-settings
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 8d94b757
authored
Dec 22, 2021
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
功能按钮添加
1 parent
14e67f5a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
92 additions
and
61 deletions
package.json
src/main.js
src/setup/qiankun.js
src/views/account/components/baseInfo.vue
src/views/account/index.vue
src/views/employee/index.vue
src/views/role/index.vue
package.json
View file @
8d94b75
...
...
@@ -13,7 +13,7 @@
"el-tree-transfer"
:
"^2.2.6"
,
"element-ui"
:
"^2.4.5"
,
"glsx-common"
:
"^1.4.6"
,
"glsx-components"
:
"^1.2.
2
"
,
"glsx-components"
:
"^1.2.
7
"
,
"lodash"
:
"^4.17.21"
,
"vue"
:
"^2.6.10"
,
"vue-amap"
:
"^0.5.10"
,
...
...
src/main.js
View file @
8d94b75
...
...
@@ -29,6 +29,7 @@ from '@/setup'
export
const
http
=
params
=>
Vue
.
prototype
.
$http
(
params
)
export
const
http_common
=
params
=>
Vue
.
prototype
.
$http_common
(
params
)
export
const
http_config
=
params
=>
Vue
.
prototype
.
$http_config
(
params
)
console
.
log
(
http_config
)
Object
.
keys
(
filters
).
forEach
(
key
=>
{
Vue
.
filter
(
key
,
filters
[
key
]);
});
\ No newline at end of file
src/setup/qiankun.js
View file @
8d94b75
...
...
@@ -14,7 +14,7 @@ import '@/assets/css/common.scss'
let
routes
=
[]
let
router
=
null
let
instance
=
null
export
async
function
bootstrap
({
name
,
id
,
history
,
common
,
messenger
,
globalState
})
{
export
async
function
bootstrap
({
name
,
id
,
history
,
common
,
messenger
,
globalState
,
routerBase
})
{
const
{
response
,
request
,
sign
,
secret
,
request_common
,
request_config
,
sign_common
}
=
await
fetchConfig
()
console
.
log
(
request
)
Vue
.
prototype
.
$history
=
history
...
...
@@ -26,13 +26,17 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt
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.$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'] })
const
routesData
=
common
.
utils
.
deepClone
(
globalState
.
routers
)
routes
=
getRoutes
(
routesData
)
subscribe
({
messenger
})
Vue
.
use
(
GLButton
,
{
routes
,
routerBase
})
}
export
async
function
mount
(
props
)
{
console
.
log
(
'11111'
,
props
)
console
.
log
(
'22222'
,
props
)
console
.
log
(
routes
)
const
insts
=
render
(
props
.
routerBase
,
routes
)
router
=
insts
.
router
instance
=
insts
.
vm
...
...
src/views/account/components/baseInfo.vue
View file @
8d94b75
...
...
@@ -15,6 +15,19 @@
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"联系电话"
prop=
"merchantLegalPersonPhone"
>
<el-input
maxlength=
"11"
size=
"small"
v-model=
"accountAddForm.merchantLegalPersonPhone"
placeholder=
"请输入联系电话"
></el-input>
<el-checkbox
v-model=
"accountAddForm.isloginName"
>
联系电话同时作为登录账户名
</el-checkbox>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"联系人"
>
<el-input
size=
"small"
v-model=
"accountAddForm.merchantLegalPerson"
placeholder=
"请输入联系人"
></el-input>
</el-form-item>
</el-col>
</el-row>
<!--
<el-row>
<el-col
:span=
"12"
>
<el-form-item
size=
"small"
label=
"商户类型"
class=
"merchant-row"
>
<el-input
v-model=
"accountAddForm.merchantOrgcode"
placeholder=
"请输入组织机构号码"
v-if=
"accountAddForm.merchantType == 2"
maxlength=
"50"
>
<el-select
v-model=
"accountAddForm.merchantType"
slot=
"prepend"
placeholder=
"请选择"
>
...
...
@@ -30,7 +43,7 @@
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-row>
-->
<el-row>
<el-col
:span=
"24"
>
<el-form-item
size=
"small"
label=
"商户地址"
class=
"form-row"
>
...
...
@@ -39,7 +52,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<
!--
<
el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"联系电话"
prop=
"merchantLegalPersonPhone"
>
<el-input
maxlength=
"11"
size=
"small"
v-model=
"accountAddForm.merchantLegalPersonPhone"
placeholder=
"请输入联系电话"
></el-input>
...
...
@@ -51,7 +64,7 @@
<el-input
size=
"small"
v-model=
"accountAddForm.merchantLegalPerson"
placeholder=
"请输入联系人"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-row>
-->
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"驻店联系人"
>
...
...
src/views/account/index.vue
View file @
8d94b75
<
template
>
<div
class=
"scrm-main"
>
<div
class=
"form-header"
v-if=
"$globalState.session.accountLevel == 1 && $globalState.session.merchantModel == 1"
>
<el-button
type=
"primary"
@
click=
"handleContact"
size=
"small"
icon=
"el-icon-link"
<GLButton
@
click=
"handleContact"
icon=
"el-icon-link"
fn=
"门店账户关联企微"
type=
"primary"
size=
"small"
display=
"disabled"
mode=
"el-button"
>
门店账户关联企微
</GLButton>
<!--
<el-button
type=
"primary"
@
click=
"handleContact"
size=
"small"
icon=
"el-icon-link"
>
门店账户关联企微
</el-button
>
>
-->
</div>
<div
class=
"follow-form"
>
<el-form
:inline=
"true"
:model=
"searchForm"
class=
"follow-form-item"
label-width=
"80px"
>
...
...
@@ -14,16 +15,14 @@
</el-select>
</el-form-item>
<el-form-item
class=
"merchant-row"
size=
"small"
>
<el-input
size=
"small"
v-model=
"searchForm.merchantLoginAccount"
placeholder=
"请输入"
v-if=
"searchForm.accountOrPhone == 1"
>
<el-input
size=
"small"
v-model=
"searchForm.merchantLoginAccount"
placeholder=
"请输入"
v-if=
"searchForm.accountOrPhone == 1"
>
<el-select
size=
"small"
v-model=
"searchForm.accountOrPhone"
@
change=
"searchForm.merchantLoginAccount = '';searchForm.merchantLegalPersonPhone = ''"
@
change=
"
searchForm.merchantLoginAccount = ''
searchForm.merchantLegalPersonPhone = ''
"
slot=
"prepend"
placeholder=
"请选择"
>
...
...
@@ -31,17 +30,15 @@
<el-option
label=
"手机号"
:value=
"2"
></el-option>
</el-select>
</el-input>
<el-input
size=
"small"
v-model=
"searchForm.merchantLegalPersonPhone"
placeholder=
"请输入"
v-if=
"searchForm.accountOrPhone == 2"
>
<el-input
size=
"small"
v-model=
"searchForm.merchantLegalPersonPhone"
placeholder=
"请输入"
v-if=
"searchForm.accountOrPhone == 2"
>
<el-select
size=
"small"
v-model=
"searchForm.accountOrPhone"
slot=
"prepend"
@
change=
"searchForm.merchantLoginAccount = '';searchForm.merchantLegalPersonPhone = ''"
@
change=
"
searchForm.merchantLoginAccount = ''
searchForm.merchantLegalPersonPhone = ''
"
placeholder=
"请选择"
>
<el-option
label=
"登录账户名"
:value=
"1"
></el-option>
...
...
@@ -77,8 +74,10 @@
</div>
<template
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<el-button
type=
"text"
@
click=
"handleLook(scope.scope)"
>
查看
</el-button>
<el-button
type=
"text"
@
click=
"handleEdit(scope.scope)"
v-if=
"$globalState.session.merchantId != scope.scope.merchantNo"
>
修改
</el-button>
<el-button
type=
"text"
@
click=
"handleAdd(scope.scope)"
v-if=
"scope.scope.status == 2 && scope.scope.merchantAccountLevel != 4"
>
创建子商户/门店
</el-button>
<GLButton
type=
"text"
@
click=
"handleEdit(scope.scope)"
v-if=
"$globalState.session.merchantId != scope.scope.merchantNo"
fn=
"修改"
display=
"disabled"
mode=
"el-button"
>
修改
</GLButton>
<GLButton
type=
"text"
@
click=
"handleAdd(scope.scope)"
v-if=
"scope.scope.status == 2 && scope.scope.merchantAccountLevel != 4"
fn=
"创建子商户/门店"
display=
"disabled"
mode=
"el-button"
>
创建子商户/门店
</GLButton>
<!--
<el-button
type=
"text"
@
click=
"handleEdit(scope.scope)"
v-if=
"$globalState.session.merchantId != scope.scope.merchantNo"
>
修改
</el-button>
<el-button
type=
"text"
@
click=
"handleAdd(scope.scope)"
v-if=
"scope.scope.status == 2 && scope.scope.merchantAccountLevel != 4"
>
创建子商户/门店
</el-button>
-->
</
template
>
</GLTable>
</div>
...
...
@@ -132,11 +131,11 @@ export default {
prop
:
'merchantName'
},
{
label
:
"关联的企业微信"
,
prop
:
"entmicroName"
,
formatter
:
(
cellValue
)
=>
{
return
cellValue
.
entmicroName
?
cellValue
.
entmicroName
:
"-"
;
}
,
label
:
'关联的企业微信'
,
prop
:
'entmicroName'
,
formatter
:
cellValue
=>
{
return
cellValue
.
entmicroName
?
cellValue
.
entmicroName
:
'-'
}
},
{
label
:
'账户类型'
,
...
...
@@ -153,11 +152,11 @@ export default {
width
:
'80px'
},
{
label
:
"上级商户"
,
prop
:
"parentMerchant"
,
formatter
:
(
cellValue
)
=>
{
return
cellValue
.
parentMerchant
?
cellValue
.
parentMerchant
:
"-"
;
}
,
label
:
'上级商户'
,
prop
:
'parentMerchant'
,
formatter
:
cellValue
=>
{
return
cellValue
.
parentMerchant
?
cellValue
.
parentMerchant
:
'-'
}
},
{
label
:
'账户状态'
,
...
...
@@ -165,11 +164,11 @@ export default {
width
:
'80px'
},
{
label
:
"联系人"
,
prop
:
"merchantLegalPerson"
,
formatter
:
(
cellValue
)
=>
{
return
cellValue
.
merchantLegalPerson
?
cellValue
.
merchantLegalPerson
:
"-"
;
}
,
label
:
'联系人'
,
prop
:
'merchantLegalPerson'
,
formatter
:
cellValue
=>
{
return
cellValue
.
merchantLegalPerson
?
cellValue
.
merchantLegalPerson
:
'-'
}
},
{
label
:
'手机号'
,
...
...
@@ -177,10 +176,10 @@ export default {
width
:
'120px'
},
{
label
:
"更新时间"
,
prop
:
"updatedTime"
,
}
,
]
,
label
:
'更新时间'
,
prop
:
'updatedTime'
}
]
},
layout
:
'sizes, prev, pager, next, jumper, ->, total'
,
tableData
:
[],
...
...
@@ -206,14 +205,14 @@ export default {
}
this
.
$apis
.
store
.
findAllDictData
(
params
).
then
(
res
=>
{
if
(
res
)
{
if
(
dictType
==
"account_level"
)
{
this
.
accountLevel
=
[{
dictValue
:
""
,
dictLabel
:
"全部"
}].
concat
(
res
);
if
(
dictType
==
'account_level'
)
{
this
.
accountLevel
=
[{
dictValue
:
''
,
dictLabel
:
'全部'
}].
concat
(
res
)
}
if
(
dictType
==
'account_type'
)
{
this
.
accountType
=
res
}
if
(
dictType
==
"merchant_status"
)
{
this
.
merchantStatus
=
[{
dictValue
:
""
,
dictLabel
:
"全部"
}].
concat
(
res
);
if
(
dictType
==
'merchant_status'
)
{
this
.
merchantStatus
=
[{
dictValue
:
''
,
dictLabel
:
'全部'
}].
concat
(
res
)
}
}
})
...
...
src/views/employee/index.vue
View file @
8d94b75
<!-- 员工管理 -->
<
template
>
<div
class=
"config-employee employee-list"
>
<div
style=
"margin-bottom: 20px;"
>
<el-button
:size=
"size"
type=
"primary"
class=
"el-icon-plus"
@
click=
"handleEdit(1)"
>
创建员工
</el-button>
<div
style=
"margin-bottom: 20px"
>
<GLButton
@
click=
"handleEdit(1)"
:size=
"size"
class=
"el-icon-plus"
fn=
"创建员工"
type=
"primary"
display=
"disabled"
mode=
"el-button"
>
创建员工
</GLButton>
<!--
<el-button
:size=
"size"
type=
"primary"
class=
"el-icon-plus"
>
创建员工
</el-button>
-->
</div>
<div
class=
"container"
>
<div>
<glsx-combi-form
ref=
"showSearch"
:formObj=
"searchForm"
:searchSelectObj=
"searchSelectObj"
:formData=
"searchFormData"
>
</glsx-combi-form>
<glsx-combi-form
ref=
"showSearch"
:formObj=
"searchForm"
:searchSelectObj=
"searchSelectObj"
:formData=
"searchFormData"
></glsx-combi-form>
<glsx-combi-form
ref=
"showSearch"
:formObj=
"searchForm"
:searchSelectObj=
"searchSelectObj"
:formData=
"searchFormData2"
>
<span
slot=
"footer"
class=
"footer-btns"
>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleExport"
>
导出
</el-button>
<GLButton
@
click=
"handleExport"
fn=
"导出"
:size=
"size"
type=
"primary"
display=
"disabled"
mode=
"el-button"
>
导出
</GLButton>
<!--
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleExport"
>
导出
</el-button>
-->
</span>
</glsx-combi-form>
</div>
...
...
@@ -20,17 +21,27 @@
<GLTable
ref=
"employeeRef"
:getListApi=
"getListApi"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<div
class=
"table-btns"
slot=
"optionBtns"
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"handleDetail(scope.scope)"
>
查看
</el-button>
<el-button
type=
"text"
@
click=
"handleEdit(2, scope.scope)"
>
修改
</el-button>
<GLButton
type=
"text"
@
click=
"handleEdit(2, scope.scope)"
fn=
"修改"
display=
"disabled"
mode=
"el-button"
>
修改
</GLButton>
<!--
<el-button
type=
"text"
@
click=
"handleEdit(2, scope.scope)"
>
修改
</el-button>
-->
<el-button
type=
"text"
@
click=
"handleDelete(scope.scope)"
>
删除
</el-button>
</div>
<template
slot=
"otherOptions"
slot-scope=
"scope"
>
<el-popover
v-if=
"scope.scope.statusName == '禁用'"
placement=
"top"
width=
"180"
trigger=
"hover"
>
<
!--
<
el-popover
v-if=
"scope.scope.statusName == '禁用'"
placement=
"top"
width=
"180"
trigger=
"hover"
>
<p>
启用前,你可先为该员工创建角色,配置其所需的功能权限。如下所示:
</p>
<p>
1. 角色管理-创建角色
</p>
<p>
2. 选择员工账户-修改角色
</p>
<el-switch
:size=
"size"
slot=
"reference"
v-model=
"scope.scope.statusName"
active-value=
"启用"
inactive-value=
"禁用"
@
change=
"e => handleSwitchChange(e, scope.scope)"
></el-switch>
</el-popover>
<el-switch
v-else
:size=
"size"
slot=
"reference"
v-model=
"scope.scope.statusName"
active-value=
"启用"
inactive-value=
"禁用"
@
change=
"e => handleSwitchChange(e, scope.scope)"
></el-switch>
<GLButton
mode=
"el-switch"
fn=
"开关"
display=
"disabled"
:size=
"size"
slot=
"reference"
v-model=
"scope.scope.statusName"
active-value=
"启用"
inactive-value=
"禁用"
@
change=
"e => handleSwitchChange(e, scope.scope)"
></GLButton>
</el-popover>
-->
<GLButton
mode=
"div"
fn=
"开关"
display=
"disabled"
>
<el-popover
v-if=
"scope.scope.statusName == '禁用'"
placement=
"top"
width=
"180"
trigger=
"hover"
>
<p>
启用前,你可先为该员工创建角色,配置其所需的功能权限。如下所示:
</p>
<p>
1. 角色管理-创建角色
</p>
<p>
2. 选择员工账户-修改角色
</p>
<GLButton
mode=
"el-switch"
fn=
"开关"
display=
"disabled"
:size=
"size"
slot=
"reference"
v-model=
"scope.scope.statusName"
active-value=
"启用"
inactive-value=
"禁用"
@
change=
"e => handleSwitchChange(e, scope.scope)"
></GLButton>
</el-popover>
<GLButton
mode=
"el-switch"
fn=
"开关"
display=
"disabled"
v-else
:size=
"size"
slot=
"reference"
v-model=
"scope.scope.statusName"
active-value=
"启用"
inactive-value=
"禁用"
@
change=
"e => handleSwitchChange(e, scope.scope)"
></GLButton>
</GLButton>
</
template
>
</GLTable>
<!-- 表格区域 end -->
...
...
src/views/role/index.vue
View file @
8d94b75
<
template
>
<div
class=
"role-home-page"
>
<div
class=
"top_widget"
>
<el-button
size=
"small"
icon=
"el-icon-plus"
type=
"primary"
@
click=
"toCreatePage"
>
创建角色
</el-button>
<GLButton
size=
"small"
fn=
"创建角色"
icon=
"el-icon-plus"
type=
"primary"
display=
"disabled"
@
click=
"toCreatePage"
>
创建角色
</GLButton>
<!--
<el-button
size=
"small"
icon=
"el-icon-plus"
type=
"primary"
@
click=
"toCreatePage"
>
创建角色
</el-button>
-->
</div>
<div
class=
"table_widget"
>
<div
class=
"search_widget"
>
...
...
@@ -31,7 +32,8 @@
<GLTable
v-if=
"distoryTable"
ref=
"table"
:layout=
"layout"
:tableData=
"tableData"
:tableTotal=
"tableTotal"
:pageConf=
"pageConf"
:tableParams=
"tableParams"
@
refreshTable=
"getTableData"
>
<template
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<el-button
type=
"text"
@
click=
"toLookPage(scope.scope)"
>
查看
</el-button>
<el-button
v-if=
"scope.scope.roleName!='超级管理员'"
type=
"text"
@
click=
"toEditPage(scope.scope)"
>
修改
</el-button>
<GLButton
v-if=
"scope.scope.roleName != '超级管理员'"
fn=
"修改"
type=
"text"
display=
"disabled"
@
click=
"toEditPage(scope.scope)"
>
修改
</GLButton>
<!--
<el-button
v-if=
"scope.scope.roleName!='超级管理员'"
type=
"text"
@
click=
"toEditPage(scope.scope)"
>
修改
</el-button>
-->
<el-button
v-if=
"scope.scope.delFlag"
type=
"text"
@
click=
"todelete(scope.scope)"
>
删除
</el-button>
</
template
>
</GLTable>
...
...
@@ -118,7 +120,8 @@ export default {
let
{
delFlag
,
roleName
,
merchantId
}
=
this
.
searchForm
let
para
=
{}
console
.
log
(
merchantId
)
if
(
!
this
.
distoryTable
)
{
//代表重置
if
(
!
this
.
distoryTable
)
{
//代表重置
para
=
{
pageNum
:
1
,
pageSize
:
10
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment