Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
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
罗超
confucius
Commits
4574f91a
Commit
4574f91a
authored
Sep 18, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
10764642
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
848 additions
and
866 deletions
+848
-866
addPhase.vue
src/pages/enterprise/customer/CSChild/addPhase.vue
+110
-131
addfield.vue
...pages/enterprise/customer/CSChild/components/addfield.vue
+290
-290
choiceapprovalorbranch.vue
...se/customer/CSChild/components/choiceapprovalorbranch.vue
+193
-204
stageManagement.vue
src/pages/enterprise/customer/CSChild/stageManagement.vue
+255
-241
No files found.
src/pages/enterprise/customer/CSChild/addPhase.vue
View file @
4574f91a
...
...
@@ -13,7 +13,8 @@
padding
:
20px
;
margin-bottom
:
25px
;
}
.addPhase
.bold
{
.addPhase
.bold
{
font-weight
:
760
;
font-size
:
16px
;
color
:
#333
;
...
...
@@ -31,51 +32,39 @@
<div
class=
"bold"
>
名称
</div>
<q-input
clearable
debounce
filled
maxlength=
"20"
counter
v-model=
"addMsg.FlowName"
style=
"width:600px"
@
input=
"$forceUpdate()"
placeholder=
"名称"
:rules=
"[val => !!val || '不能为空']"
/>
</div>
<div
class=
"box"
>
<div
class=
"bold"
>
阶段适用范围
</div>
<q-btn
class=
"q-mr-md"
label=
"选择部门/成员"
@
click=
"outerVisible = true"
/>
</div>
<div
class=
"box"
>
<div
class=
"bold"
>
选择使用阶段
</div>
<div
style=
"display:flex;align-items: center;"
>
</div>
</div>
<div
v-if=
"StageList"
>
<div
class=
"box"
v-for=
"(x,y) in StageList"
v-if=
"x.Type==2"
>
<div
class=
"bold"
v-if=
"x.Name=='已输单'"
>
选择输单原因
</div>
<div
class=
"bold"
v-if=
"x.Name=='无效'"
>
选择无效原因
</div>
<div
style=
"display:flex;align-items: center;flex-wrap: wrap;"
>
<q-checkbox
v-model=
"addMsg.LoseCause"
v-if=
"x.Name=='已输单'"
v-for=
"(item,index) in x.OptionsList"
:key=
'index'
:val=
"item.Id"
:label=
"item.Name"
/>
<q-checkbox
v-model=
"addMsg.InvalidCause"
v-if=
"x.Name=='无效'"
v-for=
"(item,index) in x.OptionsList"
:key=
'index'
:val=
"item.Id"
:label=
"item.Name"
/>
<q-checkbox
v-model=
"addMsg.LoseCause"
v-if=
"x.Name=='已输单'"
v-for=
"(item,index) in x.OptionsList"
:key=
'index'
:val=
"item.Id"
:label=
"item.Name"
/>
<q-checkbox
v-model=
"addMsg.InvalidCause"
v-if=
"x.Name=='无效'"
v-for=
"(item,index) in x.OptionsList"
:key=
'index'
:val=
"item.Id"
:label=
"item.Name"
/>
</div>
</div>
</div>
<div
class=
"box"
>
<el-form
label-width=
"120px"
>
</el-form>
<q-card-actions
align=
"left"
class=
"bg-white"
>
<q-btn
color=
"accent"
class=
"q-mr-md"
label=
"保存"
@
click=
"savemove()"
style=
"width: 100px;"
:loading=
"loading"
/>
<q-card-actions
align=
"left"
class=
"bg-white"
>
<q-btn
color=
"accent"
class=
"q-mr-md"
label=
"保存"
@
click=
"savemove()"
style=
"width: 100px;"
:loading=
"loading"
/>
<q-btn
class=
"q-mr-md"
label=
"返回"
@
click=
"goblck()"
style=
"width: 60px;"
/>
</q-card-actions>
</div>
<!-- 人员/部门选择 -->
<choiceapprovalorbranch
v-if=
"outerVisible"
@
close=
"outerVisible = false"
@
success=
"getsuccess2"
:byval=
'showMember'
cptype=
"1"
></choiceapprovalorbranch>
<choiceapprovalorbranch
v-if=
"outerVisible"
@
close=
"outerVisible = false"
@
success=
"getsuccess2"
:byval=
'showMember'
cptype=
"1"
></choiceapprovalorbranch>
</div>
</
template
>
...
...
@@ -97,48 +86,38 @@
data
()
{
return
{
loading
:
false
,
outerVisible
:
false
,
addMsg
:
{
FlowName
:
''
,
DeptEmpList
:
[],
UseStage
:
''
,
LoseCause
:
[],
InvalidCause
:
[],
outerVisible
:
false
,
addMsg
:
{
FlowName
:
''
,
DeptEmpList
:
[],
UseStage
:
''
,
LoseCause
:
[],
InvalidCause
:
[],
},
showMember
:
[],
StageList
:
[],
showMember
:
[],
StageList
:
[],
}
},
created
()
{
this
.
getCustomerStageList
()
},
methods
:
{
goblck
()
{
//返回上一个页面
this
.
$router
.
go
(
-
1
);
//返回上一层
},
savemove
(){
goblck
()
{
//返回上一个页面
this
.
$router
.
go
(
-
1
);
//返回上一层
},
getCustomerStageList
(){
savemove
()
{},
getCustomerStageList
()
{
getCustomerStageList
({}).
then
(
res
=>
{
this
.
loading
=
false
if
(
res
.
Code
==
1
)
{
this
.
StageList
=
res
.
Data
}
})
},
getsuccess2
(
list
,
type
){
console
.
log
(
list
)
getsuccess2
(
list
,
type
)
{
this
.
showMember
=
list
this
.
outerVisible
=
false
},
}
}
</
script
>
\ No newline at end of file
src/pages/enterprise/customer/CSChild/components/addfield.vue
View file @
4574f91a
<
template
>
<div
class=
"addfield"
style=
"padding: 0;margin: 0;"
>
<q-dialog
v-model=
"Isadd"
persistent
>
<q-card
style=
"width: 700px; max-width: 80vw;"
>
<q-card-section>
...
...
@@ -9,72 +8,61 @@
<q-separator
/>
<q-card-section
class=
"q-pt-none"
style=
"margin-top: 15px;"
>
<q-splitter
v-model=
"splitterModel"
>
<template
v-slot:before
>
<q-tabs
v-model=
"tab"
vertical
@
input=
"getdefault"
>
<q-tab
v-for=
"(x,y) in tabsList"
:key=
'y'
:name=
"x.Id"
:label=
"x.Name"
:disable=
"x.disable"
/>
<q-tab
v-for=
"(x,y) in tabsList"
:key=
'y'
:name=
"x.Id"
:label=
"x.Name"
:disable=
"x.disable"
/>
</q-tabs>
</
template
>
<
template
v-slot:after
>
<div
style=
"height: 100%; width: 100%;padding: 16px"
>
<el-form
label-width=
"120px"
>
<el-form-item
label=
"字段名称:"
>
<q-input
clearable
filled
maxlength=
"8"
counter
v-model=
"addMsg.Name
"
@
input=
"$forceUpdate()"
label=
"字段名称"
:rules=
"[val => !!val || '请输入字段名称']"
/>
<q-input
clearable
filled
maxlength=
"8"
counter
v-model=
"addMsg.Name"
@
input=
"$forceUpdate()
"
label=
"字段名称"
:rules=
"[val => !!val || '请输入字段名称']"
/>
</el-form-item>
<el-form-item
label=
"部门选择:"
>
<q-radio
v-model=
"departmentType"
val=
"1"
label=
"公司字段"
@
input=
'addMsg.DeptId=0'
/>
<q-radio
v-model=
"departmentType"
val=
"2"
label=
"部门字段"
@
input=
'addMsg.DeptId=0'
/>
<q-radio
v-model=
"departmentType"
val=
"1"
label=
"公司字段"
@
input=
'addMsg.DeptId=0'
/>
<q-radio
v-model=
"departmentType"
val=
"2"
label=
"部门字段"
@
input=
'addMsg.DeptId=0'
/>
<div
v-if=
"departmentType==2"
>
<selectTree
:treeData=
'deptl'
:defaultArray=
"returnString"
nodeKey=
"DeptId"
:multiple=
"false"
labelKey=
"DeptName"
childrenKey=
"ChildList"
tipText=
"选择部门"
@
getChild=
"getChild"
<selectTree
:treeData=
'deptl'
:defaultArray=
"returnString"
nodeKey=
"DeptId"
:multiple=
"false"
labelKey=
"DeptName"
childrenKey=
"ChildList"
tipText=
"选择部门"
@
getChild=
"getChild"
classStr=
"col-6 q-pb-lg"
>
</selectTree>
</div>
</el-form-item>
<el-form-item
label=
"字数限制:"
v-if=
'tab==1'
>
<q-input
v-model
.
number=
"addMsg.WordNum"
:rules=
"[val => !!val || '不能为空']"
type=
"number"
filled
:max=
'50'
:min=
'0'
style=
"max-width: 200px"
/>
<q-input
v-model
.
number=
"addMsg.WordNum"
:rules=
"[val => !!val || '不能为空']"
type=
"number"
filled
:max=
'50'
:min=
'0'
style=
"max-width: 200px"
/>
</el-form-item>
<el-form-item
label=
"输入类型:"
v-if=
'tab==1'
>
<div
class=
"q-gutter-sm"
>
<q-checkbox
v-model=
"addMsg.InputType"
v-for=
"(x,y) in checkboxList"
:key=
'y'
:val=
"x.Id"
<q-checkbox
v-model=
"addMsg.InputType"
v-for=
"(x,y) in checkboxList"
:key=
'y'
:val=
"x.Id"
:label=
"x.Name"
/>
</div>
</el-form-item>
<el-form-item
label=
"文字字数:"
v-if=
'tab==2'
>
<el-input-number
v-model=
"addMsg.WordNum"
@
change=
"handleChange"
:min=
"1"
:max=
"2000"
></el-input-number>
<el-input-number
v-model=
"addMsg.WordNum"
@
change=
"handleChange"
:min=
"1"
:max=
"2000"
>
</el-input-number>
</el-form-item>
<el-form-item
label=
"列表选项:"
v-if=
'tab==3|| tab==4'
>
<draggable
v-model=
"addMsg.OptionsList"
>
<div
v-for=
"(x,y) in addMsg.OptionsList"
:key=
'y'
style=
"display: flex;align-items: center;margin-bottom: 10px;"
>
<div
v-for=
"(x,y) in addMsg.OptionsList"
:key=
'y'
style=
"display: flex;align-items: center;margin-bottom: 10px;"
>
<i
class=
"iconfont icon-weiyi"
style=
"font-size: 14px;color: #777;margin-right: 10px;"
></i>
<q-input
clearable
filled
maxlength=
"16"
v-model=
"x.Name"
style=
"width: 280px;"
@
input=
"$forceUpdate()"
label=
"列表项值"
/>
<q-btn
round
size=
"xs"
color=
"deep-orange"
icon=
"delete"
v-if=
"addMsg.OptionsList.length>1"
@
click=
"addMsg.OptionsList.splice(y,1)"
style=
'margin-left: 10px;'
/>
<q-btn
round
size=
"xs"
color=
"primary"
icon=
"add"
v-if=
"addMsg.OptionsList.length==y+1"
@
click=
"addMsg.OptionsList.push(
{Id:0,Name:''})" style='margin-left: 10px;'/>
<q-input
clearable
filled
maxlength=
"16"
v-model=
"x.Name"
style=
"width: 280px;"
@
input=
"$forceUpdate()"
label=
"列表项值"
/>
<q-btn
round
size=
"xs"
color=
"deep-orange"
icon=
"delete"
v-if=
"addMsg.OptionsList.length>1"
@
click=
"addMsg.OptionsList.splice(y,1)"
style=
'margin-left: 10px;'
/>
<q-btn
round
size=
"xs"
color=
"primary"
icon=
"add"
v-if=
"addMsg.OptionsList.length==y+1"
@
click=
"addMsg.OptionsList.push(
{Id:0,Name:''})" style='margin-left: 10px;' />
</div>
</draggable>
</el-form-item>
<el-form-item
label=
"小数位数:"
v-if=
'tab==7'
>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Id"
v-model=
"addMsg.Digits"
ref=
"Id"
:options=
"decimalslist"
label=
"小数位数"
:dense=
"false"
emit-value
map-options
/>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Id"
v-model=
"addMsg.Digits"
ref=
"Id"
:options=
"decimalslist"
label=
"小数位数"
:dense=
"false"
emit-value
map-options
/>
</el-form-item>
<el-form-item
label=
"属性设置:"
>
<div
class=
"q-gutter-sm"
>
<q-toggle
v-model=
"addMsg.Required"
label=
"必填项"
:true-value=
"1"
:false-value=
"2"
/>
...
...
@@ -89,35 +77,33 @@
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
class=
"q-mr-md"
label=
"取消"
@
click=
"getcancel()"
/>
<q-btn
color=
"accent"
class=
"q-mr-md"
label=
"确定"
@
click=
"savewb()"
:loading=
"loading"
/>
<q-btn
color=
"accent"
class=
"q-mr-md"
label=
"确定"
@
click=
"savewb()"
:loading=
"loading"
/>
</q-card-actions>
</q-card>
</q-dialog>
</div>
</template>
<
script
>
import
draggable
from
"vuedraggable"
import
selectTree
from
'../../../../../components/common/select-tree'
import
{
setCustomerFiledInfo
}
from
'../../../../../api/system/wechat'
const
defaultObj
=
{
Id
:
0
,
Type
:
1
,
Name
:
''
,
Required
:
2
,
DeptId
:
0
,
WordNum
:
1
,
InputType
:[],
OptionsList
:[{
Id
:
1
,
Name
:
''
}],
Digits
:
0
,
Enable
:
1
,
Id
:
0
,
Type
:
1
,
Name
:
''
,
Required
:
2
,
DeptId
:
0
,
WordNum
:
1
,
InputType
:
[],
OptionsList
:
[{
Id
:
1
,
Name
:
''
}],
Digits
:
0
,
Enable
:
1
,
}
export
default
{
...
...
@@ -131,80 +117,98 @@
type
:
Object
,
default
:
{},
},
deptl
:
{
deptl
:
{
type
:
Array
,
default
:
[],
},
tabsList
:
{
tabsList
:
{
type
:
Array
,
default
:
[],
},
checkboxList
:
{
checkboxList
:
{
type
:
Array
,
default
:
[],
},
},
data
()
{
return
{
loading
:
false
,
loading
:
false
,
Isadd
:
true
,
splitterModel
:
13
,
tab
:
1
,
departmentType
:
'1'
,
decimalslist
:
[{
Id
:
0
},
{
Id
:
1
},
{
Id
:
2
},
{
Id
:
3
},
{
Id
:
4
},
{
Id
:
5
},
{
Id
:
6
},
{
Id
:
7
},
{
Id
:
8
},
{
Id
:
9
},
{
Id
:
10
},
{
Id
:
11
},],
addMsg
:
Object
.
assign
({},
defaultObj
),
departmentType
:
'1'
,
decimalslist
:
[{
Id
:
0
},
{
Id
:
1
},
{
Id
:
2
},
{
Id
:
3
},
{
Id
:
4
},
{
Id
:
5
},
{
Id
:
6
},
{
Id
:
7
},
{
Id
:
8
},
{
Id
:
9
},
{
Id
:
10
},
{
Id
:
11
},
],
addMsg
:
Object
.
assign
({},
defaultObj
),
returnString
:
[],
//默认岗位
}
},
created
()
{
this
.
Isadd
=
true
if
(
this
.
obj
!=
null
)
{
//编辑的时候数据处理
let
data
=
{
Id
:
this
.
obj
.
Id
,
Type
:
this
.
obj
.
Type
,
Name
:
this
.
obj
.
Name
,
Required
:
this
.
obj
.
Required
,
DeptId
:
this
.
obj
.
DeptId
,
WordNum
:
this
.
obj
.
WordNum
,
InputType
:
this
.
obj
.
InputType
.
split
(
','
).
map
(
Number
),
OptionsList
:
this
.
obj
.
OptionsList
,
Digits
:
this
.
obj
.
Digits
,
Enable
:
this
.
obj
.
Enable
,
if
(
this
.
obj
!=
null
)
{
//编辑的时候数据处理
let
data
=
{
Id
:
this
.
obj
.
Id
,
Type
:
this
.
obj
.
Type
,
Name
:
this
.
obj
.
Name
,
Required
:
this
.
obj
.
Required
,
DeptId
:
this
.
obj
.
DeptId
,
WordNum
:
this
.
obj
.
WordNum
,
InputType
:
this
.
obj
.
InputType
.
split
(
','
).
map
(
Number
),
OptionsList
:
this
.
obj
.
OptionsList
,
Digits
:
this
.
obj
.
Digits
,
Enable
:
this
.
obj
.
Enable
,
}
this
.
tab
=
this
.
obj
.
Type
if
(
this
.
obj
.
DeptId
>
0
)
{
this
.
departmentType
=
'2'
this
.
returnString
=
[]
setTimeout
(()
=>
{
if
(
this
.
obj
.
DeptId
>
0
)
{
this
.
departmentType
=
'2'
this
.
returnString
=
[]
setTimeout
(()
=>
{
this
.
returnString
.
push
(
this
.
obj
.
DeptId
)
this
.
$forceUpdate
();
},
500
)
},
500
)
}
this
.
addMsg
=
data
this
.
tabsList
.
forEach
(
x
=>
{
if
(
x
.
Id
!=
data
.
Type
)
{
x
.
disable
=
true
this
.
tabsList
.
forEach
(
x
=>
{
if
(
x
.
Id
!=
data
.
Type
)
{
x
.
disable
=
true
}
})
}
else
{
this
.
addMsg
.
InputType
=
[]
this
.
checkboxList
.
forEach
(
x
=>
{
}
else
{
this
.
addMsg
.
InputType
=
[]
this
.
checkboxList
.
forEach
(
x
=>
{
this
.
addMsg
.
InputType
.
push
(
x
.
Id
)
})
}
},
methods
:
{
savewb
()
{
let
addMsg
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
addMsg
))
addMsg
.
Type
=
this
.
tab
//先类型赋值
if
(
addMsg
.
Name
==
''
)
{
addMsg
.
Type
=
this
.
tab
//先类型赋值
if
(
addMsg
.
Name
==
''
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
`请填写字段名称`
,
...
...
@@ -212,7 +216,7 @@
})
return
}
if
((
addMsg
.
Type
==
1
||
addMsg
.
Type
==
2
)
&&
addMsg
.
WordNum
==
''
)
{
if
((
addMsg
.
Type
==
1
||
addMsg
.
Type
==
2
)
&&
addMsg
.
WordNum
==
''
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
`字数不能为空`
,
...
...
@@ -220,7 +224,7 @@
})
return
}
if
(
this
.
departmentType
==
2
&&
(
addMsg
.
DeptId
==
0
||
addMsg
.
DeptId
==
''
))
{
if
(
this
.
departmentType
==
2
&&
(
addMsg
.
DeptId
==
0
||
addMsg
.
DeptId
==
''
))
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
`请选择部门`
,
...
...
@@ -228,10 +232,10 @@
})
return
}
if
(
addMsg
.
Type
==
3
||
addMsg
.
Type
==
4
)
{
for
(
let
i
=
0
;
i
<
addMsg
.
OptionsList
.
length
;
i
++
)
{
if
(
addMsg
.
Type
==
3
||
addMsg
.
Type
==
4
)
{
for
(
let
i
=
0
;
i
<
addMsg
.
OptionsList
.
length
;
i
++
)
{
let
x
=
addMsg
.
OptionsList
[
i
]
if
(
x
.
Name
==
''
)
{
if
(
x
.
Name
==
''
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
`请填写列表选项值`
,
...
...
@@ -239,25 +243,24 @@
})
break
}
addMsg
.
OptionsList
[
i
].
Id
=
i
+
1
addMsg
.
OptionsList
[
i
].
Id
=
i
+
1
}
}
if
(
addMsg
.
Type
==
1
)
{
if
(
addMsg
.
InputType
.
length
==
0
)
{
if
(
addMsg
.
Type
==
1
)
{
if
(
addMsg
.
InputType
.
length
==
0
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
`至少选择一种输入类型`
,
position
:
'top'
})
return
}
else
{
addMsg
.
InputType
=
addMsg
.
InputType
.
join
(
','
)
}
else
{
addMsg
.
InputType
=
addMsg
.
InputType
.
join
(
','
)
}
}
else
{
addMsg
.
InputType
=
'1'
}
else
{
addMsg
.
InputType
=
'1'
}
console
.
log
(
addMsg
)
this
.
loading
=
true
setCustomerFiledInfo
(
addMsg
).
then
(
res
=>
{
this
.
loading
=
false
...
...
@@ -268,19 +271,14 @@
message
:
res
.
Message
,
position
:
'top'
})
this
.
$emit
(
'getcancel'
,
2
)
this
.
$emit
(
'getcancel'
,
2
)
}).
catch
((
e
)
=>
{
this
.
loading
=
false
})
},
getcancel
()
{
this
.
$emit
(
'getcancel'
,
1
)
this
.
$emit
(
'getcancel'
,
1
)
},
getChild
(
deptArray
)
{
var
tempStr
=
""
;
if
(
deptArray
&&
deptArray
!=
''
)
{
...
...
@@ -288,13 +286,15 @@
}
this
.
addMsg
.
DeptId
=
tempStr
},
handleChange
(
value
)
{
},
getdefault
(){
//新增的时候初始默认值
this
.
addMsg
=
Object
.
assign
({},
defaultObj
)
this
.
addMsg
.
OptionsList
=
[{
Id
:
0
,
Name
:
''
,}]
//多选和单选的值
getdefault
()
{
//新增的时候初始默认值
this
.
addMsg
=
Object
.
assign
({},
defaultObj
)
this
.
addMsg
.
OptionsList
=
[{
Id
:
0
,
Name
:
''
,
}]
//多选和单选的值
}
}
}
...
...
src/pages/enterprise/customer/CSChild/components/choiceapprovalorbranch.vue
View file @
4574f91a
...
...
@@ -20,6 +20,7 @@
text-indent
:
15px
;
border-bottom
:
1px
dotted
#eee
;
}
</
style
>
<
template
>
...
...
@@ -35,28 +36,25 @@
<q-card-section
class=
"q-pt-none"
style=
"padding: 20px 0;"
>
<div
style=
"display: flex;align-items: flex-start;justify-content: space-between;"
>
<div
style=
"width: 300px; margin: 0 20px;"
>
<p
style=
"margin: 0 0 10px 0;display: flex;align-items: center;"
>
选择:
<el-input
style=
"width: 200px;"
placeholder=
"输入关键字进行过滤"
v-model=
"filterText"
>
<p
style=
"margin: 0 0 10px 0;display: flex;align-items: center;"
>
选择:
<el-input
style=
"width: 200px;"
placeholder=
"输入关键字进行过滤"
v-model=
"filterText"
>
</el-input>
</p>
<el-tree
class=
'ApprovalProcessBg'
:filter-node-method=
"filterNode"
:data=
"memberList"
show-checkbox
ref=
"treeUser"
:props=
"defaultProps"
:render-after-expand=
"false
"
node-key=
"DeptId"
@
check-change=
"handleNodeChange"
@
check=
'btncheck'
>
<el-tree
class=
'ApprovalProcessBg'
:filter-node-method=
"filterNode"
:data=
"memberList"
show-checkbox
ref=
"treeUser"
:props=
"defaultProps"
:render-after-expand=
"false"
node-key=
"DeptId
"
@
check-change=
"handleNodeChange"
@
check=
'btncheck'
>
</el-tree>
</div>
<div
style=
"width: 300px; margin: 0 20px;"
>
<p
style=
"margin: 0 0 20px 0;"
>
已选:
</p>
<div
class=
"Approval_yxList"
>
<li
v-for=
"item in showMember"
>
{{
item
.
DeptName
}}
<i
@
click=
"mySetCheckedKeys(item.DeptId)"
class=
"el-icon-circle-close showMemberIcon"
></i>
<i
@
click=
"mySetCheckedKeys(item.DeptId)"
class=
"el-icon-circle-close showMemberIcon"
></i>
</li>
</div>
</div>
</div>
</q-card-section>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
class=
"q-mr-md"
label=
"取消"
@
click=
"closeEditOrder"
/>
...
...
@@ -64,7 +62,6 @@
</q-card-actions>
</q-card>
</q-dialog>
</div>
</
template
>
...
...
@@ -74,23 +71,20 @@
}
from
'../../../../../api/users/user'
export
default
{
props
:
{
outerindex
:
{
type
:
String
,
default
:
''
,
},
byval
:
{
byval
:
{
type
:
Array
,
default
:
[],
},
cptype
:{
//1是列表上使用2 新增使用
type
:
String
,
cptype
:
{
//1是列表上使用2 新增使用
type
:
String
,
default
:
'1'
,
}
},
data
()
{
return
{
IsShow
:
true
,
...
...
@@ -104,21 +98,20 @@
showMember
:
[],
memberSetCheckedKeys
:
[],
sysUserKeys
:
[],
newList
:
[]
newList
:
[]
}
},
created
()
{
if
(
this
.
byval
.
length
>
0
)
{
if
(
this
.
byval
.
length
>
0
)
{
this
.
memberSetCheckedKeys
=
[];
this
.
showMember
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
byval
))
this
.
byval
.
forEach
(
x
=>
{
this
.
byval
.
forEach
(
x
=>
{
this
.
memberSetCheckedKeys
.
push
(
x
.
DeptId
)
})
}
this
.
getMember
()
//部门下面选择员工
this
.
getMember
()
//部门下面选择员工
},
mounted
()
{
},
watch
:
{
filterText
(
val
)
{
...
...
@@ -135,17 +128,13 @@
_this
.
$refs
.
treeUser
.
setCheckedKeys
(
_arr
);
}
}).
catch
(()
=>
{
})
},
filterNode
(
value
,
data
)
{
if
(
!
value
)
return
true
;
return
data
.
DeptName
.
indexOf
(
value
)
!==
-
1
;
},
handleNodeChange
(
data
,
checked
)
{
console
.
log
(
data
,
checked
)
data
.
IsCheck
=
checked
;
if
(
data
.
DataType
==
2
&&
data
.
IsCheck
)
{
//是员工且选中
let
isExsit
=
false
...
...
@@ -159,7 +148,7 @@
this
.
showMember
.
push
({
DeptName
:
data
.
DeptName
,
DeptId
:
data
.
DeptId
,
DataType
:
data
.
DataType
DataType
:
data
.
DataType
})
this
.
memberSetCheckedKeys
.
push
(
data
.
DeptId
)
}
...
...
@@ -185,15 +174,15 @@
}
}
},
btncheck
(){
//对数据的处理
btncheck
()
{
//对数据的处理
this
.
getdataprocess
()
},
getdataprocess
()
{
getdataprocess
()
{
},
getChildList
(
x
,
list
)
{
getChildList
(
x
,
list
)
{
},
mySetCheckedKeys
(
id
)
{
...
...
@@ -212,7 +201,7 @@
this
.
$emit
(
'close'
)
},
saveOrderInfo
()
{
this
.
$emit
(
'success'
,
this
.
showMember
,
this
.
cptype
)
this
.
$emit
(
'success'
,
this
.
showMember
,
this
.
cptype
)
}
...
...
src/pages/enterprise/customer/CSChild/stageManagement.vue
View file @
4574f91a
...
...
@@ -7,7 +7,6 @@
.stageManagement
.box
{
width
:
100%
;
border-radius
:
6px
;
background
:
#fff
;
padding
:
20px
;
...
...
@@ -29,61 +28,51 @@
display
:
flex
;
align-items
:
center
;
margin-top
:
24px
;
margin-left
:
56px
;
;
margin-bottom
:
30px
;
margin-left
:
56px
;
;
margin-bottom
:
30px
;
}
</
style
>
<
template
>
<div
class=
"stageManagement"
style=
"background: transparent;"
>
<div
class=
"box"
>
<div
class=
"box"
>
<div
class=
"bold"
style=
"margin-bottom: 30px;"
>
跟进阶段
</div>
<ul
v-for=
"(x,y) in addMsg"
:key=
"y"
v-if=
"x.Type==1"
>
<div
v-if=
"x.IsDefault==0"
>
<draggable
v-model=
"x.OptionsList"
>
<li
v-for=
"(item,index) in x.OptionsList"
:key=
"index"
>
<li
v-for=
"(item,index) in x.OptionsList"
:key=
"index"
>
<div
style=
"width: 57px;"
>
<i
class=
"iconfont icon-weiyi"
style=
"font-size: 14px;color: #777;margin: 0 10px;"
></i>
</div>
<q-input
clearable
debounce
filled
maxlength=
"10"
counter
v-model=
"item.Name"
style=
"width:500px"
@
input=
"$forceUpdate()"
placeholder=
"名称"
:rules=
"[val => !!val || '不能为空']"
/>
<q-btn
flat
size=
"sm"
icon=
"delete"
color=
"negative"
class=
"q-mr-xs"
style=
"margin-left: 10px;"
label=
""
@
click=
"addMsg[y].OptionsList.splice(index,1)"
/>
<q-input
clearable
debounce
filled
maxlength=
"10"
counter
v-model=
"item.Name"
style=
"width:500px"
@
input=
"$forceUpdate()"
placeholder=
"名称"
:rules=
"[val => !!val || '不能为空']"
/>
<q-btn
flat
size=
"sm"
icon=
"delete"
color=
"negative"
class=
"q-mr-xs"
style=
"margin-left: 10px;"
label=
""
@
click=
"addMsg[y].OptionsList.splice(index,1)"
/>
</li>
</draggable>
<div
class=
"btn"
>
<q-btn
v-if=
"x.OptionsList.length
<30
"
color=
"accent"
class=
"q-mr-md"
label=
"添加"
icon=
'add'
@
click=
"addMsg[y].OptionsList.push(
{Id:0,Name:'',disable:false}),$forceUpdate()"
style="width: 100px;" />
@
click=
"addMsg[y].OptionsList.push(
{Id:0,Name:'',disable:false}),$forceUpdate()" style="width: 100px;" />
<span
style=
"color:#858598"
>
已设/可设上限:
{{
x
.
OptionsList
.
length
}}
/30
</span>
</div>
</div>
<div
v-if=
"x.IsDefault==1"
>
<li
v-for=
"(item,index) in x.OptionsList"
:key=
"index"
>
<li
v-for=
"(item,index) in x.OptionsList"
:key=
"index"
>
<div
style=
"width: 57px;"
>
</div>
<q-input
clearable
debounce
filled
v-model=
"item.Name"
style=
"width:500px"
disable
@
input=
"$forceUpdate()"
<q-input
clearable
debounce
filled
v-model=
"item.Name"
style=
"width:500px"
disable
@
input=
"$forceUpdate()"
placeholder=
"名称"
:rules=
"[val => !!val || '不能为空']"
/>
</li>
</div>
</ul>
</div>
<div
class=
"box"
>
<div
class=
"bold"
>
结束跟进
</div>
<div
v-for=
"(x,y) in addMsg"
:key=
"y"
v-if=
"x.Type==2"
>
<ul
style=
"margin-left: 30px;margin-top: 10px;"
>
<li>
<q-input
clearable
filled
debounce
placeholder=
"名称"
v-model=
"x.Name"
style=
"width:500px"
disable
/>
<q-input
clearable
filled
debounce
placeholder=
"名称"
v-model=
"x.Name"
style=
"width:500px"
disable
/>
</li>
<li
class=
"bold"
style=
"margin: 10px 0 30px;"
v-if=
"x.Name=='已输单'"
>
输单原因
</li>
<li
class=
"bold"
style=
"margin: 10px 0 30px;"
v-if=
"x.Name=='无效'"
>
无效原因
</li>
...
...
@@ -92,38 +81,28 @@
<div
style=
"width: 31px;"
>
<i
class=
"iconfont icon-weiyi"
style=
"font-size: 14px;color: #777;margin: 0 10px;"
></i>
</div>
<q-input
clearable
debounce
filled
maxlength=
"10"
counter
v-model=
"item.Name"
style=
"width:500px"
@
input=
"$forceUpdate()"
placeholder=
"名称"
:rules=
"[val => !!val || '不能为空']"
/>
<q-btn
flat
size=
"sm"
icon=
"delete"
color=
"negative"
class=
"q-mr-xs"
style=
"margin-left: 10px;"
label=
""
@
click=
"addMsg[y].OptionsList.splice(index,1)"
/>
<q-input
clearable
debounce
filled
maxlength=
"10"
counter
v-model=
"item.Name"
style=
"width:500px"
@
input=
"$forceUpdate()"
placeholder=
"名称"
:rules=
"[val => !!val || '不能为空']"
/>
<q-btn
flat
size=
"sm"
icon=
"delete"
color=
"negative"
class=
"q-mr-xs"
style=
"margin-left: 10px;"
label=
""
@
click=
"addMsg[y].OptionsList.splice(index,1)"
/>
</li>
</draggable>
</ul>
<div
class=
"btn"
style=
"margin-left: 61px"
>
<q-btn
v-if=
"x.OptionsList.length
<30
"
color=
"accent"
class=
"q-mr-md"
label=
"添加"
icon=
'add'
@
click=
"addMsg[y].OptionsList.push(
{Id:0,Name:'',disable:false}),$forceUpdate()"
style="width: 100px;" />
@
click=
"addMsg[y].OptionsList.push(
{Id:0,Name:'',disable:false}),$forceUpdate()" style="width: 100px;" />
<span
style=
"color:#858598"
>
已设/可设上限:
{{
x
.
OptionsList
.
length
}}
/30
</span>
</div>
</div>
</div>
<div
class=
"box"
>
<el-form
label-width=
"120px"
>
</el-form>
<q-card-actions
align=
"left"
class=
"bg-white"
>
<q-btn
color=
"accent"
class=
"q-mr-md"
label=
"保存"
@
click=
"savemove()"
style=
"width: 100px;"
:loading=
"loading"
/>
<q-btn
color=
"accent"
class=
"q-mr-md"
label=
"保存"
@
click=
"savemove()"
style=
"width: 100px;"
:loading=
"loading"
/>
<q-btn
class=
"q-mr-md"
label=
"返回"
@
click=
"goblck()"
style=
"width: 60px;"
/>
</q-card-actions>
</div>
</div>
</
template
>
...
...
@@ -140,7 +119,6 @@
components
:
{
draggable
,
},
name
:
"stageManagement"
,
data
()
{
return
{
...
...
@@ -150,8 +128,6 @@
},
created
()
{
this
.
getList
()
},
methods
:
{
getList
()
{
...
...
@@ -161,60 +137,103 @@
this
.
addMsg
=
res
.
Data
let
num
=
0
let
isexistence
=
false
let
orderEntered
=
false
//判读是否有已输单
let
invalid
=
false
//无效
let
orderEntered
=
false
//判读是否有已输单
let
invalid
=
false
//无效
this
.
addMsg
.
forEach
(
x
=>
{
if
(
x
.
Type
==
1
)
{
num
++
if
(
x
.
OptionsList
&&
x
.
OptionsList
.
length
>
0
)
{
for
(
let
j
=
0
;
j
<
x
.
OptionsList
.
length
;
j
++
)
{
let
z
=
x
.
OptionsList
[
j
]
if
(
z
.
Name
==
'成交'
){
//判断是否有默认值
isexistence
=
true
if
(
z
.
Name
==
'成交'
)
{
//判断是否有默认值
isexistence
=
true
break
}
}
}
}
if
(
x
.
Type
==
2
)
{
if
(
x
.
Name
==
'已输单'
)
{
if
(
x
.
Type
==
2
)
{
if
(
x
.
Name
==
'已输单'
)
{
orderEntered
=
true
}
if
(
x
.
Name
==
'无效'
)
{
if
(
x
.
Name
==
'无效'
)
{
invalid
=
true
}
}
})
if
(
num
==
0
){
//判断没有type==1的时候加2条数据
let
obj
=
[
{
Id
:
0
,
IsDefault
:
0
,
Name
:
'跟进阶段'
,
OptionsList
:[],
Sort
:
0
,
Type
:
1
},
{
Id
:
0
,
IsDefault
:
1
,
Name
:
'跟进阶段'
,
OptionsList
:[{
Id
:
0
,
Name
:
'成交'
},{
Id
:
0
,
Name
:
'多次成交'
},],
Sort
:
0
,
Type
:
1
},
if
(
num
==
0
)
{
//判断没有type==1的时候加2条数据
let
obj
=
[{
Id
:
0
,
IsDefault
:
0
,
Name
:
'跟进阶段'
,
OptionsList
:
[],
Sort
:
0
,
Type
:
1
},
{
Id
:
0
,
IsDefault
:
1
,
Name
:
'跟进阶段'
,
OptionsList
:
[{
Id
:
0
,
Name
:
'成交'
},
{
Id
:
0
,
Name
:
'多次成交'
},
],
Sort
:
0
,
Type
:
1
},
]
this
.
addMsg
=
this
.
addMsg
.
concat
(
obj
)
}
if
(
num
>
0
&&
isexistence
==
false
){
//判断type==1有 但是没有默认值
let
obj
=
{
Id
:
0
,
IsDefault
:
1
,
Name
:
'跟进阶段'
,
OptionsList
:[{
Id
:
0
,
Name
:
'成交'
},{
Id
:
0
,
Name
:
'多次成交'
},],
Sort
:
0
,
Type
:
1
};
if
(
num
>
0
&&
isexistence
==
false
)
{
//判断type==1有 但是没有默认值
let
obj
=
{
Id
:
0
,
IsDefault
:
1
,
Name
:
'跟进阶段'
,
OptionsList
:
[{
Id
:
0
,
Name
:
'成交'
},
{
Id
:
0
,
Name
:
'多次成交'
},
],
Sort
:
0
,
Type
:
1
};
this
.
addMsg
.
unshift
(
obj
)
}
if
(
orderEntered
==
false
){
//没有的话 加一个已输单
let
obj
=
{
Id
:
0
,
IsDefault
:
0
,
Name
:
'已输单'
,
OptionsList
:[],
Sort
:
0
,
Type
:
2
};
if
(
orderEntered
==
false
)
{
//没有的话 加一个已输单
let
obj
=
{
Id
:
0
,
IsDefault
:
0
,
Name
:
'已输单'
,
OptionsList
:
[],
Sort
:
0
,
Type
:
2
};
this
.
addMsg
.
push
(
obj
)
}
if
(
invalid
==
false
){
//没有的话 加一个无效
let
obj
=
{
Id
:
0
,
IsDefault
:
0
,
Name
:
'无效'
,
OptionsList
:[],
Sort
:
0
,
Type
:
2
};
if
(
invalid
==
false
)
{
//没有的话 加一个无效
let
obj
=
{
Id
:
0
,
IsDefault
:
0
,
Name
:
'无效'
,
OptionsList
:
[],
Sort
:
0
,
Type
:
2
};
this
.
addMsg
.
push
(
obj
)
}
}
})
},
goblck
()
{
//返回上一个页面
this
.
$router
.
go
(
-
1
);
//返回上一层
goblck
()
{
//返回上一个页面
this
.
$router
.
go
(
-
1
);
//返回上一层
},
savemove
()
{
console
.
log
(
this
.
addMsg
)
let
show
=
false
for
(
let
i
=
0
;
i
<
this
.
addMsg
.
length
;
i
++
)
{
let
x
=
this
.
addMsg
[
i
]
...
...
@@ -251,15 +270,10 @@
position
:
'top'
})
this
.
goblck
()
}).
catch
((
e
)
=>
{
this
.
loading
=
false
})
},
}
}
</
script
>
\ No newline at end of file
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