Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
dj-scrm-wx-work-attachment-customer
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 60ed46bd
authored
May 30, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
触达统计页面开发
1 parent
a782e62f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
74 additions
and
14 deletions
src/components/CustomerFollowPopup.vue
src/components/CustomerFollowPopup.vue
View file @
60ed46b
...
...
@@ -15,13 +15,22 @@
</div>
</
template
>
</van-field>
<van-field
name=
"跟进备注"
label=
"跟进备注"
placeholder=
"输入备注"
:rules=
"[{ required: true, message: '请填写密码' }]
"
/>
<van-field
name=
"跟进备注"
label=
"跟进备注"
v-model=
"selectFollowForm.followTips"
placeholder=
"输入备注"
maxlength=
"200
"
/>
<van-field
name=
"switch"
label=
"继续跟进"
>
<
template
#
input
>
<van-switch
v-model=
"checked"
size=
"24px"
/>
</
template
>
</van-field>
<van-field
v-model=
"result"
v-show=
"selectFollowForm.followResultId == 1"
is-link
readonly
name=
"datetimePicker"
label=
"预约到店"
placeholder=
"请选择到店时间"
@
click=
"showDate"
/>
<van-field
v-show=
"selectFollowForm.followResultId == 1"
v-model=
"selectFollowForm.appointmentTime"
is-link
readonly
name=
"datetimePicker"
label=
"预约到店"
placeholder=
"请选择到店时间"
@
click=
"showDate"
/>
<div
v-show=
"showPicker"
>
<div
class=
"datetime-box"
>
<div
class=
"datetime-picker"
>
...
...
@@ -29,15 +38,15 @@
<div
@
click=
"selectDatetime(item)"
>
{{ item.date }}
</div>
</div>
</div>
<div>
确定
</div>
<div
@
click=
"confirmAppointmentTime"
>
确定
</div>
</div>
<van-calendar
v-show=
"!tabIndex"
:title=
"''"
:poppable=
"false"
:show-confirm=
"false"
:style=
"{ height: '400px' }
"
/>
<van-datetime-picker
v-show=
"tabIndex"
type=
"time"
title=
"选择时间"
:min-hour=
"9"
:max-hour=
"20
"
/>
<van-calendar
v-show=
"!tabIndex"
color=
"#3975C6"
:show-title=
"false"
:show-mark=
"false"
:poppable=
"false"
:show-confirm=
"false"
:style=
"{ height: '500px' }"
@
select=
"selectDate
"
/>
<van-datetime-picker
v-show=
"tabIndex"
type=
"time"
@
confirm=
"confirmTime"
:min-hour=
"minHour
"
/>
</div>
</van-cell-group>
<div
class=
"btn-group"
>
<van-button
block
native-type=
"cancel"
>
取消
</van-button>
<van-button
block
type=
"primary"
native-type=
"submit"
>
提交
</van-button>
<van-button
block
native-type=
"cancel"
@
click=
"cancel"
>
取消
</van-button>
<van-button
block
type=
"primary"
>
提交
</van-button>
</div>
</van-form>
</van-popup>
...
...
@@ -94,28 +103,35 @@ export default {
datePickList
:
[
{
index
:
0
,
date
:
'
2022-5-16
'
date
:
''
},
{
index
:
2
,
date
:
'
10:00
'
date
:
''
}
],
selectFollowForm
:
{
name
:
''
,
followResultId
:
''
,
appointmentDate
:
''
,
followTips
:
''
,
appointmentTime
:
''
},
// 展示预约到店时间
showPicker
:
false
,
//继续跟进按钮
checked
:
true
// 继续跟进按钮
checked
:
true
,
// 当前日期
dayNow
:
''
,
// 时间标签可选最小时间
minHour
:
''
}
},
methods
:
{
init
()
{
this
.
show
=
true
// 获取当前时间
const
date
=
new
Date
(
new
Date
().
getTime
()
+
(
parseInt
(
new
Date
().
getTimezoneOffset
()
/
60
)
+
8
)
*
3600
*
1000
)
this
.
formatterDate
(
date
)
},
// 选择跟进结果
selectFollow
(
val
)
{
...
...
@@ -124,14 +140,58 @@ export default {
},
// 展示日历表
showDate
()
{
console
.
log
(
this
.
showPicker
)
this
.
showPicker
=
!
this
.
showPicker
this
.
isShow
=
true
},
// 时间选择tab切换
selectDatetime
(
item
)
{
console
.
log
(
item
)
this
.
tabIndex
=
item
.
index
},
// 选择日期
selectDate
(
val
)
{
console
.
log
(
val
)
this
.
formatterDate
(
val
,
2
)
},
// 选择时间
confirmTime
(
val
)
{
console
.
log
(
val
)
this
.
datePickList
[
1
].
date
=
val
},
// 确定选择的日期和时间
confirmAppointmentTime
()
{
this
.
selectFollowForm
.
appointmentTime
=
this
.
datePickList
[
0
].
date
+
' '
+
this
.
datePickList
[
1
].
date
console
.
log
(
this
.
selectFollowForm
.
appointmentTime
)
},
// 取消按钮
cancel
()
{
this
.
show
=
false
},
// 提交按钮
primary
()
{
// 如果选择标签为预约到店,判断日期和时间是否填了
},
// 日期格式转化
formatterDate
(
val
,
type
)
{
let
date
=
new
Date
(
val
)
let
y
=
date
.
getFullYear
()
let
m
=
date
.
getMonth
()
+
1
m
=
m
<
10
?
'0'
+
m
:
m
let
h
=
date
.
getHours
()
h
=
h
<
10
?
'0'
+
h
:
h
let
d
=
date
.
getDate
()
d
=
d
<
10
?
'0'
+
d
:
d
const
time
=
y
+
'-'
+
m
+
'-'
+
d
if
(
!
type
)
{
this
.
dayNow
=
time
}
this
.
datePickList
[
0
].
date
=
time
if
(
this
.
dayNow
==
time
)
{
this
.
datePickList
[
1
].
date
=
h
+
1
+
':00'
this
.
minHour
=
h
+
1
return
}
this
.
datePickList
[
1
].
date
=
'09:00'
this
.
minHour
=
''
}
}
}
...
...
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