Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-custom
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 8ef73502
authored
Nov 30, 2021
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交一客一群
1 parent
f9a02d95
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
96 deletions
src/views/guestGroup/add.vue
src/views/guestGroup/components/selectEmp.vue
src/views/guestGroup/components/selectMembers.vue
src/views/guestGroup/add.vue
View file @
8ef7350
...
@@ -37,18 +37,18 @@
...
@@ -37,18 +37,18 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<!-- 编辑入群欢迎语 -->
<!-- 编辑入群欢迎语 -->
<
div
class=
"title"
>
编辑入群欢迎语
</div
>
<
!--
<div
class=
"title"
>
编辑入群欢迎语
</div>
--
>
<div>
<
!--
<
div>
<el-form
:model=
"basicForm"
label-width=
"120px"
>
<el-form
:model=
"basicForm"
label-width=
"120px"
>
<el-form-item
label=
"入群欢迎语"
>
<el-form-item
label=
"入群欢迎语"
>
<WelcomeWords
ref=
"welcome"
:eventBus=
"eventBus"
></WelcomeWords>
<WelcomeWords
ref=
"welcome"
:eventBus=
"eventBus"
></WelcomeWords>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
-->
</div>
</div>
<div
class=
"preview"
>
<
!--
<
div
class=
"preview"
>
<Preview
:eventBus=
"eventBus"
></Preview>
<Preview
:eventBus=
"eventBus"
></Preview>
</div>
</div>
-->
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -70,14 +70,14 @@
...
@@ -70,14 +70,14 @@
<
script
>
<
script
>
import
Vue
from
'vue'
import
Vue
from
'vue'
import
WelcomeWords
from
'./components/welcomeWords.vue'
//
import WelcomeWords from './components/welcomeWords.vue'
import
SelectMembers
from
'./components/selectMembers.vue'
import
SelectMembers
from
'./components/selectMembers.vue'
import
Preview
from
'./components/preview.vue'
//
import Preview from './components/preview.vue'
export
default
{
export
default
{
components
:
{
components
:
{
WelcomeWords
,
//
WelcomeWords,
SelectMembers
,
SelectMembers
Preview
//
Preview
},
},
data
()
{
data
()
{
const
validatorUser
=
(
rule
,
value
,
callback
)
=>
{
const
validatorUser
=
(
rule
,
value
,
callback
)
=>
{
...
@@ -158,9 +158,6 @@ export default {
...
@@ -158,9 +158,6 @@ export default {
if
(
this
.
basicForm
.
userList
&&
this
.
basicForm
.
userList
.
length
!=
0
)
{
if
(
this
.
basicForm
.
userList
&&
this
.
basicForm
.
userList
.
length
!=
0
)
{
this
.
basicForm
.
userList
.
map
(
item
=>
{
this
.
basicForm
.
userList
.
map
(
item
=>
{
if
(
item
.
masterStatus
==
1
)
{
if
(
item
.
masterStatus
==
1
)
{
this
.
basicForm
.
group
=
item
this
.
$refs
.
membersForm
.
handlGroup
(
item
,
true
)
// this.$refs.membersForm.group = item
this
.
selectData
=
this
.
basicForm
.
userList
this
.
selectData
=
this
.
basicForm
.
userList
}
}
})
})
...
@@ -179,17 +176,10 @@ export default {
...
@@ -179,17 +176,10 @@ export default {
orgName
:
this
.
basicForm
.
orgName
,
orgName
:
this
.
basicForm
.
orgName
,
groupName
:
this
.
basicForm
.
groupName
groupName
:
this
.
basicForm
.
groupName
}
}
if
(
this
.
$refs
.
welcome
.
previewList
)
params
.
attachmentList
=
this
.
$refs
.
welcome
.
previewList
//
if (this.$refs.welcome.previewList) params.attachmentList = this.$refs.welcome.previewList
params
.
userList
=
this
.
basicForm
.
userList
.
map
(
item
=>
{
params
.
userList
=
this
.
basicForm
.
userList
.
map
(
item
=>
{
if
(
this
.
basicForm
.
group
.
staffId
==
item
.
staffId
)
{
return
{
return
{
staffId
:
item
.
staffId
staffId
:
item
.
staffId
,
masterStatus
:
1
}
}
else
{
return
{
staffId
:
item
.
staffId
}
}
}
})
})
console
.
log
(
params
)
console
.
log
(
params
)
...
@@ -226,13 +216,12 @@ export default {
...
@@ -226,13 +216,12 @@ export default {
groupName
:
res
.
groupName
,
groupName
:
res
.
groupName
,
id
:
res
.
id
,
id
:
res
.
id
,
merchantId
:
1
,
merchantId
:
1
,
userList
:
res
.
userList
,
userList
:
res
.
userList
attachmentList
:
res
.
attachmentList
//
attachmentList: res.attachmentList
}
}
this
.
$refs
.
welcome
.
updateList
(
res
.
attachmentList
)
//
this.$refs.welcome.updateList(res.attachmentList)
this
.
selectData
=
res
.
userList
this
.
selectData
=
res
.
userList
console
.
log
(
res
.
userList
.
find
(
i
=>
i
.
masterStatus
==
1
))
console
.
log
(
res
.
userList
.
find
(
i
=>
i
.
masterStatus
==
1
))
if
(
res
.
userList
.
find
(
i
=>
i
.
masterStatus
==
1
))
this
.
basicForm
.
group
=
this
.
$common
.
utils
.
deepClone
(
res
.
userList
.
find
(
i
=>
i
.
masterStatus
==
1
))
}
}
})
})
},
},
...
@@ -240,7 +229,7 @@ export default {
...
@@ -240,7 +229,7 @@ export default {
// this.$router.go(-1)
// this.$router.go(-1)
this
.
$router
.
push
({
path
:
'/guestGroup/index'
})
this
.
$router
.
push
({
path
:
'/guestGroup/index'
})
this
.
basicForm
=
{}
this
.
basicForm
=
{}
this
.
$refs
.
welcome
.
updateList
([])
//
this.$refs.welcome.updateList([])
this
.
selectData
=
[]
this
.
selectData
=
[]
},
},
remove
(
val
,
idx
)
{
remove
(
val
,
idx
)
{
...
@@ -268,14 +257,7 @@ export default {
...
@@ -268,14 +257,7 @@ export default {
})
})
}
else
{
}
else
{
this
.
$refs
.
membersForm
.
resetSearch
()
this
.
$refs
.
membersForm
.
resetSearch
()
console
.
log
(
this
.
$refs
.
membersForm
.
group
)
this
.
basicForm
.
userList
=
this
.
$refs
.
membersForm
.
innerTags
this
.
basicForm
.
userList
=
this
.
$refs
.
membersForm
.
innerTags
if
(
!
this
.
$refs
.
membersForm
.
group
.
id
)
{
this
.
basicForm
.
group
=
this
.
basicForm
.
userList
[
0
]
this
.
$refs
.
membersForm
.
handlGroup
(
this
.
basicForm
.
userList
[
0
],
true
)
}
else
{
this
.
basicForm
.
group
=
this
.
$refs
.
membersForm
.
group
}
this
.
openMembers
()
this
.
openMembers
()
}
}
},
},
...
@@ -323,7 +305,8 @@ export default {
...
@@ -323,7 +305,8 @@ export default {
display
:
inline-flex
;
display
:
inline-flex
;
width
:
100%
;
width
:
100%
;
padding-bottom
:
30px
;
padding-bottom
:
30px
;
align-items
:
flex-end
;
//
align-items
:
flex-end
;
height
:
calc
(
100vh
-
250px
);
justify-content
:
space-between
;
justify-content
:
space-between
;
.info-content
{
.info-content
{
width
:
calc
(
100%
-
360px
);
width
:
calc
(
100%
-
360px
);
...
...
src/views/guestGroup/components/selectEmp.vue
View file @
8ef7350
...
@@ -18,12 +18,7 @@
...
@@ -18,12 +18,7 @@
height: treeHeight + 20 + 'px'
height: treeHeight + 20 + 'px'
}"
}"
>
>
<GLTable
:key=
"key"
ref=
"saleTable"
v-loading=
"loading"
:tableData=
"tableEmpData"
:tableParams=
"tableParams"
:hasNum=
"false"
:hasPage=
"false"
@
selectionTable=
"selectionTable"
>
<GLTable
:key=
"key"
ref=
"saleTable"
v-loading=
"loading"
:tableData=
"tableEmpData"
:tableParams=
"tableParams"
:hasNum=
"false"
:hasPage=
"false"
@
selectionTable=
"selectionTable"
></GLTable>
<div
class=
"table-btns"
slot=
"optionBtns"
slot-scope=
"scope"
>
<el-button
type=
"text"
v-show=
"!group.staffName"
@
click=
"selectGroup(scope.scope)"
>
设为群主
</el-button>
<el-button
type=
"text"
v-show=
"group.staffName && scope.scope.staffName == group.staffName"
@
click=
"cancelGroup"
>
取消群主
</el-button>
</div>
</GLTable>
</el-col>
</el-col>
</div>
</div>
</
template
>
</
template
>
...
@@ -59,11 +54,6 @@ export default {
...
@@ -59,11 +54,6 @@ export default {
{
{
label
:
'职务'
,
label
:
'职务'
,
prop
:
'staffTitle'
prop
:
'staffTitle'
},
{
label
:
''
,
prop
:
'optionBtns'
,
addHtml
:
'optionBtns'
}
}
]
]
},
},
...
@@ -78,7 +68,6 @@ export default {
...
@@ -78,7 +68,6 @@ export default {
watch
:
{
watch
:
{
selectData
:
{
selectData
:
{
handler
(
val
)
{
handler
(
val
)
{
console
.
log
(
this
.
group
)
console
.
log
(
val
)
console
.
log
(
val
)
if
(
val
.
length
==
0
)
{
if
(
val
.
length
==
0
)
{
this
.
clearSelection
()
this
.
clearSelection
()
...
@@ -90,7 +79,6 @@ export default {
...
@@ -90,7 +79,6 @@ export default {
this
.
clearSelect
(
row
)
this
.
clearSelect
(
row
)
})
})
})
})
this
.
group
=
val
.
find
(
i
=>
i
.
masterStatus
==
1
)
}
}
},
},
immediate
:
true
immediate
:
true
...
@@ -98,20 +86,8 @@ export default {
...
@@ -98,20 +86,8 @@ export default {
},
},
methods
:
{
methods
:
{
selectionTable
(
val
)
{
selectionTable
(
val
)
{
console
.
log
(
val
,
this
.
group
,
this
.
isFirst
)
this
.
$emit
(
'selectTable'
,
val
)
this
.
$emit
(
'selectTable'
,
val
)
this
.
allGroup
=
val
this
.
allGroup
=
val
const
hasGroup
=
val
.
find
(
item
=>
item
.
staffId
==
this
.
group
.
staffId
)
if
(
!
hasGroup
)
{
this
.
cancelGroup
()
}
// if (val && !this.isFirst) {
// val.forEach(i => {
// const row = this.getEmployee(this.listTree).find(j => j.staffId == i.staffId)
// console.log(row)
// this.clearSelect(row)
// })
// }
},
},
listDepartmentTree
()
{
listDepartmentTree
()
{
this
.
$apis
.
groupGuest
.
listDepartmentTree
({
merchantId
:
10001001
,
addChildrensFlag
:
true
}).
then
(
res
=>
{
this
.
$apis
.
groupGuest
.
listDepartmentTree
({
merchantId
:
10001001
,
addChildrensFlag
:
true
}).
then
(
res
=>
{
...
@@ -130,10 +106,6 @@ export default {
...
@@ -130,10 +106,6 @@ export default {
})
})
document
.
getElementsByClassName
(
'el-tree-node__expand-icon'
)[
0
].
click
()
document
.
getElementsByClassName
(
'el-tree-node__expand-icon'
)[
0
].
click
()
document
.
getElementsByClassName
(
'el-tree-node__content'
)[
0
].
click
()
document
.
getElementsByClassName
(
'el-tree-node__content'
)[
0
].
click
()
if
(
this
.
selectData
.
find
(
i
=>
i
.
masterStatus
==
1
))
{
this
.
group
=
this
.
selectData
.
find
(
i
=>
i
.
masterStatus
==
1
)
this
.
$emit
(
'group'
,
this
.
group
)
}
})
})
})
})
},
},
...
@@ -149,20 +121,6 @@ export default {
...
@@ -149,20 +121,6 @@ export default {
this
.
currentArr
=
this
.
$common
.
utils
.
deepClone
(
data
.
entmicroStaffResponses
)
this
.
currentArr
=
this
.
$common
.
utils
.
deepClone
(
data
.
entmicroStaffResponses
)
// this.listEntmicroStaff()
// this.listEntmicroStaff()
},
},
selectGroup
(
data
,
flag
=
false
)
{
console
.
log
(
data
)
this
.
group
=
data
// 标识是否从父组件修改
if
(
!
flag
)
{
const
obj
=
this
.
allGroup
.
find
(
item
=>
item
.
staffId
==
data
.
staffId
)
if
(
!
obj
)
this
.
$refs
.
saleTable
.
$refs
.
salelistMutiTable
.
toggleRowSelection
(
data
)
this
.
$emit
(
'group'
,
this
.
group
)
}
},
cancelGroup
()
{
this
.
group
=
{}
this
.
$emit
(
'group'
,
this
.
group
)
},
getEmployee
(
d
,
arr
=
[])
{
getEmployee
(
d
,
arr
=
[])
{
d
.
forEach
(
i
=>
{
d
.
forEach
(
i
=>
{
if
(
i
.
entmicroStaffResponses
)
{
if
(
i
.
entmicroStaffResponses
)
{
...
...
src/views/guestGroup/components/selectMembers.vue
View file @
8ef7350
...
@@ -13,14 +13,11 @@
...
@@ -13,14 +13,11 @@
</div>
</div>
<div>
<div>
<div
class=
"select-sale-panel"
>
<div
class=
"select-sale-panel"
>
<select-emp
:key=
"key"
:selectData
.
sync=
"selectData"
@
group=
"handlGroup"
@
selectTable=
"selectTable"
ref=
"selectEmpTabel"
></select-emp>
<select-emp
:key=
"key"
:selectData
.
sync=
"selectData"
@
selectTable=
"selectTable"
ref=
"selectEmpTabel"
></select-emp>
<div
class=
"popper__arrow"
></div>
<div
class=
"popper__arrow"
></div>
</div>
</div>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"群主"
>
<el-tag
v-show=
"group.staffName"
closable
@
close=
"cancelGroup"
>
{{
group
.
staffName
}}
</el-tag>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
</
template
>
</
template
>
...
@@ -40,8 +37,7 @@ export default {
...
@@ -40,8 +37,7 @@ export default {
// empTypeValue: '',
// empTypeValue: '',
newTag
:
''
,
newTag
:
''
,
innerTags
:
[],
innerTags
:
[],
dialog_temp
:
{},
dialog_temp
:
{}
group
:
{}
}
}
},
},
watch
:
{
watch
:
{
...
@@ -82,17 +78,6 @@ export default {
...
@@ -82,17 +78,6 @@ export default {
resetSearch
()
{
resetSearch
()
{
this
.
newTag
=
''
this
.
newTag
=
''
this
.
$refs
.
selectEmpTabel
.
searchTable
()
this
.
$refs
.
selectEmpTabel
.
searchTable
()
},
handlGroup
(
val
,
flag
=
false
)
{
console
.
log
(
val
,
'=-=-=-=-='
)
this
.
group
=
val
// 标识从父组件修改
if
(
flag
)
{
this
.
$refs
.
selectEmpTabel
.
selectGroup
(
val
,
true
)
}
},
cancelGroup
()
{
this
.
$refs
.
selectEmpTabel
.
cancelGroup
()
}
}
}
}
}
}
...
...
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