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
060d0437
Commit
060d0437
authored
Jun 21, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加访客新增
parent
7d07803a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
197 additions
and
3 deletions
+197
-3
visitor-form.vue
src/components/schedul/visitor-form.vue
+159
-0
visitorRegistrat.vue
src/pages/sale/visitorRegistrat.vue
+38
-3
No files found.
src/components/schedul/visitor-form.vue
0 → 100644
View file @
060d0437
<
template
>
<q-dialog
v-model=
"persistent"
persistent
content-class=
"bg-grey-1"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width: 600px;max-width:600px;"
>
<q-card-section>
<div
class=
"text-h6"
>
{{
objOption
.
Id
>
0
?
"修改访客信息"
:
"新增访客信息"
}}
</div>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<div
class=
"row wrap"
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"objOption.Name"
ref=
"Name"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"姓名"
:rules=
"[val => !!val || '请输入姓名']"
/>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"objOption.Tel"
ref=
"Tel"
class=
"col-6 q-pb-lg"
label=
"电话"
:rules=
"[val => !!val || '请输入电话']"
/>
</div>
<div
class=
"row wrap"
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"objOption.WeChatNum"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"微信号"
/>
<q-input
filled
stack-label
:dense=
"false"
maxlength=
"50"
v-model=
"objOption.CourseName"
ref=
"CourseName"
class=
"col-6 q-pb-lg"
label=
"兴趣课程"
:rules=
"[val => !!val || '请输入兴趣课程']"
/>
</div>
<div
class=
"row wrap"
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"objOption.StudyTime"
ref=
"StudyTime"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"学习时间"
:rules=
"[val => !!val || '请输入学习时间']"
/>
<q-select
filled
class=
"col-6"
option-value=
"Name"
option-label=
"Name"
ref=
"LevelType"
v-model=
"objOption.LevelType"
:options=
"GBList"
:rules=
"[val => !!val || '请选择当前水平']"
emit-value
map-options
label=
"当前水平"
/>
</div>
<div
class=
"row wrap"
>
<q-select
filled
class=
"col-6 q-pr-lg"
option-value=
"Id"
option-label=
"Name"
ref=
"VisitorStatus"
v-model=
"objOption.VisitorStatus"
:options=
"statusList"
:rules=
"[val => !!val || '请选择状态']"
emit-value
map-options
label=
"状态"
/>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"objOption.Evaluate"
ref=
"Evaluate"
class=
"col-6 q-pb-lg"
label=
"兴趣课程"
:rules=
"[val => !!val || '请输入兴趣课程']"
/>
</div>
<div
class=
"row wrap"
>
<q-input
filled
stack-label
type=
"textarea"
maxlength=
"500"
:dense=
"false"
v-model=
"objOption.Remark"
ref=
"Remark"
class=
"col-12 q-pb-lg"
label=
"备注"
/>
</div>
</q-card-section>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"closeVisitForm"
/>
<q-btn
label=
"保存"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
:loading=
"saveCourseLoading"
@
click=
"saveCourse"
/>
</q-card-actions>
</q-card>
</q-dialog>
</
template
>
<
script
>
import
{
getGuestBasicsEnumList
}
from
'../../api/sale/sale'
import
{
setVisitor
}
from
'../../api/scheduling/schedu'
export
default
{
components
:
{},
props
:
{
saveObj
:
{
type
:
Object
,
default
:
null
}
},
data
()
{
return
{
persistent
:
true
,
objOption
:
{
Id
:
0
,
//编号
Name
:
""
,
//姓名
Tel
:
""
,
//电话
WeChatNum
:
""
,
//微信号
CourseName
:
""
,
//兴趣课程
StudyTime
:
""
,
//学习时间
LevelType
:
""
,
//当前水平
PlanId
:
0
,
//值班编号
VisitorStatus
:
''
,
//状态
Evaluate
:
''
,
//意向评估
Remark
:
''
//备注
},
GBList
:
[],
statusList
:
[{
Id
:
1
,
Name
:
'正常'
},
{
Id
:
2
,
Name
:
'贵宾'
},
{
Id
:
3
,
Name
:
'黑名单'
}],
saveCourseLoading
:
false
};
},
created
()
{
this
.
getGuestBasics
();
},
mounted
()
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
Id
>
0
)
{
this
.
objOption
.
Id
=
this
.
saveObj
.
Id
;
this
.
objOption
.
Name
=
this
.
saveObj
.
Name
;
this
.
objOption
.
Tel
=
this
.
saveObj
.
Tel
;
this
.
objOption
.
WeChatNum
=
this
.
saveObj
.
WeChatNum
;
this
.
objOption
.
CourseName
=
this
.
saveObj
.
CourseName
;
this
.
objOption
.
StudyTime
=
this
.
saveObj
.
StudyTime
;
this
.
objOption
.
LevelType
=
this
.
saveObj
.
LevelType
;
this
.
objOption
.
PlanId
=
this
.
saveObj
.
PlanId
;
this
.
objOption
.
VisitorStatus
=
this
.
saveObj
.
VisitorStatus
;
this
.
objOption
.
Evaluate
=
this
.
saveObj
.
Evaluate
;
this
.
objOption
.
Remark
=
this
.
saveObj
.
Remark
;
}
},
methods
:
{
//关闭弹窗
closeVisitForm
()
{
this
.
$emit
(
"close"
);
this
.
persistent
=
false
;
},
//保存菜单
saveCourse
()
{
this
.
$refs
.
Name
.
validate
();
this
.
$refs
.
Tel
.
validate
();
this
.
$refs
.
CourseName
.
validate
();
this
.
$refs
.
StudyTime
.
validate
();
this
.
$refs
.
LevelType
.
validate
();
this
.
$refs
.
VisitorStatus
.
validate
();
this
.
$refs
.
Evaluate
.
validate
();
if
(
!
this
.
$refs
.
Name
.
hasError
&&
!
this
.
$refs
.
Tel
.
hasError
&&
!
this
.
$refs
.
CourseName
.
hasError
&&
!
this
.
$refs
.
StudyTime
.
hasError
&&
!
this
.
$refs
.
LevelType
.
hasError
&&
!
this
.
$refs
.
VisitorStatus
.
hasError
&&
!
this
.
$refs
.
Evaluate
.
hasError
)
{
this
.
saveCourseLoading
=
true
;
setVisitor
(
this
.
objOption
).
then
(
res
=>
{
this
.
saveCourseLoading
=
false
;
this
.
closeVisitForm
();
this
.
$emit
(
'success'
);
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据保存成功!'
,
position
:
'top'
})
})
}
},
//日语基础枚举
getGuestBasics
()
{
getGuestBasicsEnumList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
GBList
=
res
.
Data
;
}
});
},
}
};
</
script
>
src/pages/sale/visitorRegistrat.vue
View file @
060d0437
...
...
@@ -15,6 +15,9 @@
<template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
访客登记
</div>
<q-space
/>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"添加访客"
@
click=
"editVisitor(null)"
/>
</div>
</
template
>
<
template
v-slot:body-cell-VisitorStatus=
"props"
>
<q-td
:props=
"props"
>
...
...
@@ -35,6 +38,7 @@
</
template
>
<
template
v-slot:body-cell-Id=
"props"
>
<q-td
:props=
"props"
>
<q-btn
flat
size=
"xs"
@
click=
"editVisitor(props.row)"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
/>
<q-btn
flat
size=
"xs"
@
click=
"getDetail(props.row)"
icon=
"iconfont icon-View"
color=
"accent"
style=
"font-weight:400"
label=
"详情"
/>
</q-td>
</
template
>
...
...
@@ -45,6 +49,10 @@
</q-table>
</div>
<schedulFanke
v-if=
"isShowDetail"
@
close=
"closeDetail"
:save-obj=
"sendObj"
></schedulFanke>
<visitor-form
v-if=
"isShowVisitor"
:save-obj=
"visitObjOption"
@
close=
"closeVisitorForm"
@
success=
"refreshPage"
>
</visitor-form>
</div>
</template>
...
...
@@ -53,12 +61,14 @@
queryVisitorPage
,
}
from
'../../api/scheduling/schedu'
import
schedulFanke
from
'../../components/schedul/schedul-fanke'
import
visitorForm
from
'../../components/schedul/visitor-form'
export
default
{
meta
:
{
title
:
"访客登记"
},
components
:
{
schedulFanke
schedulFanke
,
visitorForm
},
data
()
{
return
{
...
...
@@ -150,7 +160,9 @@
}
],
sendObj
:{},
isShowDetail
:
false
isShowDetail
:
false
,
isShowVisitor
:
false
,
visitObjOption
:
null
}
},
mounted
()
{
...
...
@@ -160,6 +172,17 @@
},
methods
:
{
//新增访客
editVisitor
(
obj
){
console
.
log
(
obj
);
if
(
obj
)
{
this
.
visitObjOption
=
obj
;
}
else
{
this
.
visitObjOption
=
null
;
}
this
.
isShowVisitor
=
true
;
},
getList
()
{
this
.
loading
=
true
;
queryVisitorPage
(
this
.
msg
).
then
(
res
=>
{
...
...
@@ -194,7 +217,19 @@
//关闭
closeDetail
(){
this
.
isShowDetail
=
false
;
}
},
//关闭访客弹窗
closeVisitorForm
(){
this
.
isShowVisitor
=
false
;
this
.
isShowDetail
=
false
;
},
//刷新页面
refreshPage
()
{
this
.
isShowVisitor
=
false
;
this
.
isShowDetail
=
false
;
this
.
getList
();
},
}
}
...
...
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