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