Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
Y
ybf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xulili
ybf
Commits
0a7a88e8
Commit
0a7a88e8
authored
4 years ago
by
xd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后台管理系统完成
parent
e0df22c6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
509 additions
and
45 deletions
+509
-45
mail.js
ybf_admin/src/api/in/mail.js
+20
-2
addGroup.vue
ybf_admin/src/pages/in/contact/components/addGroup.vue
+84
-38
editGroup.vue
ybf_admin/src/pages/in/contact/components/editGroup.vue
+381
-0
mail.vue
ybf_admin/src/pages/in/contact/mail.vue
+23
-4
voucher.js
ybf_wx/src/api/sidebar/voucher.js
+1
-1
No files found.
ybf_admin/src/api/in/mail.js
View file @
0a7a88e8
...
...
@@ -101,11 +101,11 @@ export function getHistoryList(data) {
}
// 添加子部门
export
function
addGroup
(
data
)
{
export
function
addGroup
(
params
)
{
return
request
({
url
:
'/admin/auth/addressbook/orgnization/save'
,
method
:
'post'
,
params
:
data
params
})
}
...
...
@@ -118,6 +118,7 @@ export function getHistoryList(data) {
})
}
// 获取企业微信部门
export
function
getAllPeopleList
(
params
)
{
return
request
({
url
:
'/admin/auth/addressbook/orgnization/getClerkByWXDeptId'
,
...
...
@@ -125,10 +126,27 @@ export function getHistoryList(data) {
params
})
}
// 获取企业微信人员
export
function
getWxAllDeptList
(
params
)
{
return
request
({
url
:
'/admin/auth/addressbook/orgnization/getAllInWX'
,
method
:
'get'
,
params
})
}
// 获取部门详情
export
function
getDeptDetail
(
params
)
{
return
request
({
url
:
'/admin/auth/addressbook/orgnization/getById'
,
method
:
'get'
,
params
})
}
// 编辑部门
export
function
editDept
(
params
)
{
return
request
({
url
:
'/admin/auth/addressbook/orgnization/update'
,
method
:
'put'
,
params
})
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
ybf_admin/src/pages/in/contact/components/addGroup.vue
View file @
0a7a88e8
...
...
@@ -17,16 +17,7 @@
/>
</el-form-item>
<el-form-item
label=
"上级部门:"
prop=
"parentId"
>
<!--
<div
class=
"block"
>
<el-cascader
v-model=
"addForm.parentId"
placeholder=
"请选择上级部门"
:options=
"parentDeptList"
filterable
style=
"width: 50%;"
></el-cascader>
</div>
-->
<el-cascader
:props=
"props"
:options=
"parentDeptList"
filterable
></el-cascader>
<el-cascader
v-model=
"addForm.parentId"
:options=
"orgTree"
:props=
"deptOption"
:show-all-levels=
"false"
clearable
style=
"width: 50%;"
@
change=
"handleDpetChange"
></el-cascader>
</el-form-item>
<el-form-item
label=
"门店名称:"
prop=
"oyStallName"
>
<el-input
...
...
@@ -36,7 +27,13 @@
style=
"width: 50%;"
/>
</el-form-item>
<el-form-item
label=
"门店Id:"
prop=
"oyStallCode"
>
<el-form-item
label=
"是否设置详细信息:"
>
<el-radio-group
v-model=
"detail"
@
change=
"handleDetailChange"
>
<el-radio
:label=
"1"
>
是
</el-radio>
<el-radio
:label=
"2"
>
否
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"门店Id:"
prop=
"oyStallCode"
v-if=
"detail == 1"
>
<el-input
size=
"small"
v-model=
"addForm.oyStallCode"
...
...
@@ -44,7 +41,7 @@
style=
"width: 50%;"
/>
</el-form-item>
<el-form-item
label=
"门店会员id:"
prop=
"oyStallMemberId"
>
<el-form-item
label=
"门店会员id:"
prop=
"oyStallMemberId"
v-if=
"detail == 1"
>
<el-input
size=
"small"
v-model=
"addForm.oyStallMemberId"
...
...
@@ -52,15 +49,16 @@
style=
"width: 50%;"
/>
</el-form-item>
<el-form-item
label=
"设置主管:"
prop=
"supervisor"
>
<el-cascader
v-model=
"addForm.supervisor"
placeholder=
"请选择主管"
:options=
"options"
:props=
"
{ multiple: true }"
filterable
style="width: 50%;">
</el-cascader>
<el-form-item
label=
"设置主管:"
prop=
"clerkId"
v-if=
"detail == 1"
>
<el-cascader
:props=
"props"
v-model=
"deptId"
:options=
"parentDeptList"
:show-all-levels=
"false"
filterable
style=
"width: 30%;margin-right:15px;"
@
change=
"handleParentChange"
></el-cascader>
<el-select
v-model=
"addForm.clerkId"
filterable
multiple
placeholder=
"请选择"
style=
"width: 30%;"
clearble
>
<el-option
v-for=
"item in peopleList"
:key=
"item.id"
:label=
"item.userName"
:value=
"item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
...
...
@@ -73,7 +71,7 @@
</
template
>
<
script
>
import
{
addGroup
,
getWxAllDeptList
,
getAllMemberList
,
getGroupById
,
getAllPeopleList
}
from
"@/api/in/mail"
;
import
{
addGroup
,
getWxAllDeptList
,
getAllMemberList
,
getGroupById
,
getAllPeopleList
,
getOrgTree
}
from
"@/api/in/mail"
;
import
{
log
}
from
"util"
;
export
default
{
...
...
@@ -112,11 +110,14 @@ export default {
oyStallName
:
''
,
oyStallMemberId
:
''
,
oyStallCode
:
''
,
supervisor
:
[]
clerkId
:
[]
},
detail
:
2
,
deptId
:
''
,
// 上级部门
parentDeptList
:
[],
peopleList
:
[],
orgTree
:
[],
rules
:
{
label
:
[
{
required
:
true
,
message
:
"请输入部门名称"
,
trigger
:
"blur"
},
...
...
@@ -126,58 +127,103 @@ export default {
parentId
:
[{
required
:
true
,
message
:
"请选择上级部门"
,
trigger
:
"change"
}]
},
props
:
{
deptOption
:
{
value
:
'id'
,
children
:
'children'
,
lazy
:
true
,
emitPath
:
false
,
checkStrictly
:
true
,
lazyLoad
(
node
,
resolve
)
{
const
{
level
}
=
node
;
setTimeout
(()
=>
{
const
nodes
=
Array
.
from
(
{
length
:
level
+
1
}
)
const
nodes
=
Array
.
from
(
level
)
.
map
(
item
=>
({
value
:
level
.
id
,
label
:
level
.
label
,
leaf
:
level
>=
2
}))
;
}))
// 通过调用resolve将子节点数据返回,通知组件数据加载完成
resolve
(
nodes
);
},
1000
);
}
},
props
:
{
value
:
'id'
,
children
:
'children'
,
lazy
:
true
,
emitPath
:
false
,
checkStrictly
:
true
,
lazyLoad
(
node
,
resolve
)
{
const
{
level
}
=
node
;
setTimeout
(()
=>
{
const
nodes
=
Array
.
from
(
level
)
.
map
(
item
=>
({
value
:
level
.
id
,
label
:
level
.
label
,
leaf
:
level
>=
2
}))
// 通过调用resolve将子节点数据返回,通知组件数据加载完成
resolve
(
nodes
);
},
1000
);
}
}
}
},
created
()
{
this
.
getList
();
this
.
getGroupMember
()
this
.
getOrgTree
()
},
methods
:
{
getList
()
{
handleDpetChange
(
val
)
{
console
.
log
(
val
,
'val'
)
},
getOrgTree
()
{
getOrgTree
().
then
(
res
=>
{
this
.
orgTree
=
[
res
.
data
.
organizations
]
});
},
handleDetailChange
(
val
)
{
this
.
deptId
=
''
this
.
addForm
.
clerkId
=
[]
this
.
peopleList
=
[]
if
(
val
==
1
)
{
this
.
getDeptList
()
}
},
handleParentChange
(
val
)
{
this
.
addForm
.
clerkId
=
[]
if
(
this
.
detail
==
1
)
{
this
.
getGroupMember
(
val
)
}
},
getDeptList
()
{
getWxAllDeptList
()
.
then
(
res
=>
{
console
.
log
(
res
,
'全部部门'
)
this
.
parentDeptList
=
res
.
data
})
.
catch
(
err
=>
{
console
.
log
(
err
)
;
console
.
log
(
err
)
});
},
handleAddCancel
()
{
this
.
$emit
(
"handleAddCancel"
)
;
this
.
$emit
(
"handleAddCancel"
)
},
handleAddFinish
()
{
addGroup
(
this
.
params
).
then
(
res
=>
{
// console.log(res)
});
const
clerkIds
=
this
.
addForm
.
clerkId
+
""
let
data
=
Object
.
assign
(
this
.
addForm
,{
clerkIds
})
delete
data
.
clerkId
addGroup
(
data
).
then
(
res
=>
{
console
.
log
(
res
)
})
// console.log(addGroup)
this
.
$emit
(
"handleAddFinish"
)
;
this
.
$emit
(
"handleAddFinish"
)
},
// 获取所有人员
getGroupMember
()
{
let
id
=
''
getGroupMember
(
id
)
{
getAllPeopleList
({
id
}).
then
(
res
=>
{
console
.
log
(
res
,
'人员'
)
this
.
peopleList
=
res
.
data
})
;
})
},
/* handleNodeClick(item, node, self) {
// console.log(item,node,self)
...
...
This diff is collapsed.
Click to expand it.
ybf_admin/src/pages/in/contact/components/editGroup.vue
0 → 100644
View file @
0a7a88e8
This diff is collapsed.
Click to expand it.
ybf_admin/src/pages/in/contact/mail.vue
View file @
0a7a88e8
...
...
@@ -37,7 +37,7 @@
<div
class=
"line lines"
>
<div
>
<el-button
class=
"button button_group"
size=
"small"
@
click=
"addChild"
>
添加子部门
</el-button>
<el-button
class=
"button button_group"
size=
"small"
@
click=
"
add
Child"
>
编辑部门
</el-button>
<el-button
class=
"button button_group"
size=
"small"
@
click=
"
edit
Child"
>
编辑部门
</el-button>
<el-button
class=
"button buttondark"
:disabled=
"groupId ? false : true"
size=
"small"
@
click=
"deleteChild"
>
删除部门
</el-button
>
</div>
...
...
@@ -111,6 +111,14 @@
@
handleAddCancel=
"addDialogShow = false"
@
handleAddFinish=
"addFinish"
></add-dialog>
<edit-dialog
v-if=
"editDialogShow"
:groupId=
"groupId"
:editDialog=
"editDialogShow"
@
handleEditCancel=
"editDialogShow = false"
@
handleEditFinish=
"editFinish"
></edit-dialog>
<delete-dialog
v-if=
"deleteDialogShow"
:daleteDialog=
"deleteDialogShow"
...
...
@@ -124,6 +132,7 @@
<
script
>
import
MoveDialog
from
"./components/move"
;
import
AddDialog
from
"./components/addGroup"
;
import
EditDialog
from
"./components/editGroup"
;
import
DeleteDialog
from
"./components/deleteGroup"
;
import
{
getOrgTree
,
...
...
@@ -154,6 +163,7 @@ export default {
},
moveDialogShow
:
false
,
addDialogShow
:
false
,
editDialogShow
:
false
,
deleteDialogShow
:
false
,
counterDialog
:
false
,
storeDialog
:
false
,
...
...
@@ -179,7 +189,8 @@ export default {
components
:
{
MoveDialog
,
AddDialog
,
DeleteDialog
DeleteDialog
,
EditDialog
},
created
()
{
this
.
getOrgTree
();
...
...
@@ -250,7 +261,7 @@ export default {
getMailList
(
page
,
ctPage
)
{
this
.
groupName
=
''
this
.
formData
.
keywords
=
''
this
.
titl
e
=
"全部"
this
.
groupNam
e
=
"全部"
this
.
type
=
this
.
sType
=
1
;
this
.
page
.
currentPage
=
ctPage
this
.
groupId
=
''
...
...
@@ -267,7 +278,7 @@ export default {
this
.
groupName
=
''
this
.
formData
.
keywords
=
''
this
.
page
.
currentPage
=
ctPage
this
.
titl
e
=
"未分组"
this
.
groupNam
e
=
"未分组"
this
.
type
=
this
.
sType
=
2
;
this
.
groupId
=
''
let
params
=
{
...
...
@@ -355,11 +366,19 @@ export default {
addChild
()
{
this
.
addDialogShow
=
true
},
editChild
()
{
this
.
editDialogShow
=
true
},
addFinish
()
{
this
.
addDialogShow
=
false
this
.
getOrgTree
();
this
.
getMailList
(
1
,
1
);
},
editFinish
()
{
this
.
editDialogShow
=
false
this
.
getOrgTree
()
this
.
getMailList
(
1
,
1
)
},
deleteChild
()
{
this
.
deleteDialogShow
=
true
},
...
...
This diff is collapsed.
Click to expand it.
ybf_wx/src/api/sidebar/voucher.js
View file @
0a7a88e8
...
...
@@ -3,7 +3,7 @@ import qs from 'qs'
export
function
getUserInfoByUserId
(
params
)
{
return
requestCF
({
url
:
'/admin/auth/addressbook/clerk/get
ByUserIdOrUserName
'
,
url
:
'/admin/auth/addressbook/clerk/get
StallCodeByClerkId
'
,
method
:
'get'
,
params
})
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment