Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
horse
Project
Project
Details
Activity
Releases
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
向伟
horse
Commits
92d641f6
Commit
92d641f6
authored
Nov 12, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
39b87432
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
21 deletions
+42
-21
index.ts
src/@types/index.ts
+3
-0
request-group.vue
src/components/customer/request-group.vue
+38
-20
customerField.vue
src/pages/customer/components/customerField.vue
+1
-1
No files found.
src/@types/index.ts
View file @
92d641f6
...
...
@@ -136,6 +136,9 @@ export interface AddTeamGroupParams {
name
:
string
tenantId
?:
number
}
export
interface
Student
{
ID
:
number
,
}
export
interface
AddTeamGroupMemberParams
{
groupId
:
number
...
...
src/components/customer/request-group.vue
View file @
92d641f6
<
template
>
<div
class=
"requestgroup"
>
123
<div>
收快递费老师
{{
a
}}
<div
class=
"row"
v-for=
"(x,y) in addMsg"
style=
"margin-bottom: 8px;"
>
<q-select
outlined
v-model=
"x.Name"
:options=
"filedList"
label=
"客户字段"
/>
</div>
</div>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
defineComponent
,
ref
,
onMounted
}
from
'vue'
import
{
defineComponent
,
ref
,
reactive
,
onMounted
}
from
'vue'
import
{
Student
}
from
'@/@types/index'
import
customerService
from
'@/api/customer'
export
default
defineComponent
({
setup
()
{
const
filedList
=
ref
([])
const
addMsg
=
ref
([])
let
filedList
:
Array
<
Student
>
=
reactive
([])
const
addMsg
=
ref
([])
onMounted
(()
=>
{
//进入页面就调用
getCustomerFiledList
();
//获取客户字段
})
const
getCustomerFiledList
=
()
=>
{
customerService
.
getCustomerFiledList
({
Enable
:
1
}).
then
((
res
)
=>
{
let
data
=
res
.
data
.
Data
filedList
.
value
=
data
;
filedList
.
value
.
forEach
(
x
=>
{
// IsCustom 是否自定义字段 1是 2标签 3阶段
x
.
IsCustom
=
1
})
let
obj
=
{
Id
:
'客户阶段'
,
Name
:
'客户阶段'
,
Type
:
4
,
IsCustom
:
3
}
filedList
.
value
.
unshift
(
obj
)
let
obj2
=
{
Id
:
'标签'
,
Name
:
'标签'
,
Type
:
3
,
IsCustom
:
2
}
filedList
.
value
.
unshift
(
obj2
)
addMsg
.
value
.
push
({
Name
:
filedList
.
value
[
0
].
Id
,
Type
:
filedList
.
value
,
Direction
:
1
,
StartValue
:
''
,
EndValue
:
''
,
IsCustom
:
2
,
console
.
log
(
data
)
filedList
=
data
;
filedList
.
forEach
((
x
:
Student
)
=>
{
// IsCustom 是否自定义字段 1是 2标签 3阶段
x
.
ID
=
0
})
// let obj = { Id: '客户阶段', Name: '客户阶段', Type: 3, IsCustom: 3 }
// filedList.value.unshift(obj)
// let obj2 = { Id: '标签', Name: '标签', Type: 4, IsCustom: 2 }
// filedList.value.unshift(obj2)
// let type = 1;
// if (filedList.value[0].Type == 4) {//多选
// type = 1;
// }
// addMsg.value.push({
// Name: filedList.value[0].Id,
// Type: type,
// Direction: '',
// StartValue: '',
// EndValue: '',
// IsCustom: filedList.value[0].IsCustom,
// StageId: '',
// LableIds:'',
// })
})
}
...
...
@@ -41,7 +58,8 @@
return
{
getCustomerFiledList
getCustomerFiledList
,
}
}
...
...
src/pages/customer/components/customerField.vue
View file @
92d641f6
...
...
@@ -17,7 +17,7 @@
<tr
v-if=
"data && data.length==0"
>
<td
:colspan=
"8"
align=
"center"
>
暂无数据
</td>
</tr>
<draggable
v-model=
"data"
tag=
"tbody"
item-key=
"Id"
:move=
"getdata"
@
update=
"datadragEnd"
:clone=
"cloneFun"
>
<draggable
v-model=
"data"
tag=
"tbody"
item-key=
"Id"
:move=
"getdata"
@
update=
"datadragEnd"
>
<template
#
item=
"
{ element }">
<tr>
<td><span>
{{
element
.
Name
}}
</span></td>
...
...
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