Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0ee034fe
authored
Jun 04, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit 回店客户流程
1 parent
d691d89a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
141 additions
and
87 deletions
pages/boutique/components/Reception.vue
pages/boutique/detail.vue
pages/boutique/index.vue
pages/boutique/invitation.vue
pages/boutique/components/Reception.vue
View file @
0ee034f
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
>
为客户发券
</view>
>
为客户发券
</view>
</view>
</view>
</template>
</template>
<
template
v-if=
"customerType == 0 && customerInfo.
customerName
"
>
<
template
v-if=
"customerType == 0 && customerInfo.
phoneNumber
"
>
<view
class=
"customer-info-box"
>
<view
class=
"customer-info-box"
>
<view
<view
class=
"customer-info flex"
class=
"customer-info flex"
...
@@ -84,7 +84,14 @@
...
@@ -84,7 +84,14 @@
:key=
"index"
:key=
"index"
>
>
<view
class=
"label"
>
{{
i
.
label
}}
</view>
<view
class=
"label"
>
{{
i
.
label
}}
</view>
<view
class=
"value"
>
{{
customerInfo
[
i
.
key
]
}}
</view>
<view
class=
"value text-hide"
>
<template
v-if=
"i.format"
>
{{
i
.
format
(
customerInfo
)
}}
</
template
>
<
template
v-else
>
{{
customerInfo
[
i
.
key
]
}}
</
template
>
</view>
</view>
</view>
</template>
</template>
</view>
</view>
...
@@ -209,7 +216,9 @@ export default {
...
@@ -209,7 +216,9 @@ export default {
},
},
{
{
label
:
'领券时间'
,
label
:
'领券时间'
,
key
:
'customerName'
,
format
(
cell
)
{
return
dayjs
(
cell
.
receiveCouponDate
).
format
(
"YYYY年MM月DD日"
)
}
},
},
{
{
label
:
'车主电话'
,
label
:
'车主电话'
,
...
@@ -217,7 +226,9 @@ export default {
...
@@ -217,7 +226,9 @@ export default {
},
},
{
{
label
:
'接待时间'
,
label
:
'接待时间'
,
key
:
'customerName'
,
format
()
{
return
dayjs
().
format
(
"YYYY年MM月DD日"
)
}
}
}
],
],
customerInfo
:
{},
customerInfo
:
{},
...
@@ -238,7 +249,7 @@ export default {
...
@@ -238,7 +249,7 @@ export default {
watchCustomerInfo
:
{
watchCustomerInfo
:
{
immediate
:
true
,
immediate
:
true
,
handler
(
newval
)
{
handler
(
newval
)
{
if
(
newval
&&
this
.
show
)
this
.
customerInfo
=
newval
if
(
this
.
show
)
this
.
customerInfo
=
newval
}
}
},
},
show
(
n
)
{
show
(
n
)
{
...
@@ -249,6 +260,7 @@ export default {
...
@@ -249,6 +260,7 @@ export default {
handler
(
newval
)
{
handler
(
newval
)
{
this
.
pageParams
=
this
.
$options
.
data
.
call
(
this
).
pageParams
this
.
pageParams
=
this
.
$options
.
data
.
call
(
this
).
pageParams
this
.
resetFocusIndex
()
this
.
resetFocusIndex
()
this
.
customerInfo
=
{}
}
}
}
}
},
},
...
@@ -330,15 +342,12 @@ export default {
...
@@ -330,15 +342,12 @@ export default {
},
},
async
createCoupon
()
{
async
createCoupon
()
{
try
{
try
{
const
{
pageParams
:
{
couponId
,
carInfo
},
customerInfo
}
=
this
const
{
pageParams
:
{
couponId
,
carInfo
},
customerInfo
}
=
this
,
{
shopMerchantId
}
=
uni
.
$storage
.
get
(
"userInfo"
)
await
this
.
validate
()
await
this
.
validate
()
uni
.
showLoading
()
uni
.
showLoading
()
const
{
let
{
staffName
,
salesUuid
}
=
customerInfo
uuid
,
scene
=
`id=
${
couponId
}
&userId=
${
salesUuid
}
&employName=
${
staffName
}
&merchantId=
${
shopMerchantId
}
&customerName=
${
customerInfo
.
customerName
}
&customerPhone=
${
customerInfo
.
phoneNumber
}
`
,
name
,
shopMerchantId
}
=
uni
.
$storage
.
get
(
"userInfo"
)
let
scene
=
`id=
${
couponId
}
&userId=
${
uuid
}
&employName=
${
name
}
&merchantId=
${
shopMerchantId
}
&customerName=
${
customerInfo
.
customerName
}
&customerPhone=
${
customerInfo
.
phoneNumber
}
`
,
params
=
{
params
=
{
path
:
'/packageShopmall/packageMine/pages/boutique/gift/gift'
,
path
:
'/packageShopmall/packageMine/pages/boutique/gift/gift'
,
appId
:
'wxe10067a63c1856ac'
,
appId
:
'wxe10067a63c1856ac'
,
...
@@ -373,15 +382,8 @@ export default {
...
@@ -373,15 +382,8 @@ export default {
const
{
customerName
,
phoneNumber
,
carModel
,
staffName
}
=
this
.
customerInfo
,
const
{
customerName
,
phoneNumber
,
carModel
,
staffName
}
=
this
.
customerInfo
,
{
couponId
}
=
this
.
pageParams
{
couponId
}
=
this
.
pageParams
// 检查车主姓名
// 检查车主姓名
if
(
!
customerName
)
throw
'请输入车主姓名'
if
(
!
customerName
||
!
phoneNumber
||
!
carModel
||
!
staffName
)
throw
'请输入客户信息'
// 检查车主手机
if
(
!
phoneNumber
)
throw
'请输入车主手机'
if
(
phoneNumber
&&
!
phoneRex
.
test
(
phoneNumber
))
throw
'请输入正确的手机号'
if
(
phoneNumber
&&
!
phoneRex
.
test
(
phoneNumber
))
throw
'请输入正确的手机号'
// 检查车型
if
(
!
carModel
)
throw
'请选择车型'
// 检查交付专员
if
(
!
staffName
)
throw
'请选择交付专员'
// 检查礼券类型
if
(
!
couponId
)
throw
'请选择礼券类型'
if
(
!
couponId
)
throw
'请选择礼券类型'
},
},
checkCustomerReceivedStatus
(
receiveCouponStartTime
)
{
checkCustomerReceivedStatus
(
receiveCouponStartTime
)
{
...
@@ -553,9 +555,9 @@ export default {
...
@@ -553,9 +555,9 @@ export default {
width
:
50%
;
width
:
50%
;
color
:
#333333
;
color
:
#333333
;
line-height
:
36
rpx
;
line-height
:
36
rpx
;
font-size
:
28
rpx
;
.label
{
.label
{
width
:
120
rpx
;
width
:
120
rpx
;
font-size
:
28
rpx
;
color
:
#666666
;
color
:
#666666
;
flex-shrink
:
0
;
flex-shrink
:
0
;
margin-right
:
24
rpx
;
margin-right
:
24
rpx
;
...
...
pages/boutique/detail.vue
View file @
0ee034f
...
@@ -8,13 +8,22 @@
...
@@ -8,13 +8,22 @@
<
template
>
<
template
>
<view
class=
"detail-box"
>
<view
class=
"detail-box"
>
<view
class=
"nav-bar"
>
<view
class=
"nav-bar"
>
<view
class=
"back"
@
click=
"back"
>
<view
<uni-icons
type=
"left"
:size=
"24"
></uni-icons>
class=
"back"
@
click=
"back"
>
<uni-icons
type=
"left"
:size=
"24"
></uni-icons>
</view>
</view>
<view
class=
"title"
>
{{
title
}}
</view>
<view
class=
"title"
>
{{
title
}}
</view>
</view>
</view>
<template
v-for=
"(item, index) in media"
>
<template
v-for=
"(item, index) in media"
>
<view
:class=
"['view',
{ showView: id == item.id }]" :key="index">
<view
:class=
"['view',
{ showView: id == item.id }]"
:key="index"
>
<component
<component
:is=
"componentName(item.id)"
:is=
"componentName(item.id)"
:views=
"item.receptionSourceDetailList || []"
:views=
"item.receptionSourceDetailList || []"
...
@@ -24,6 +33,7 @@
...
@@ -24,6 +33,7 @@
:customerType=
"customerType"
:customerType=
"customerType"
@
jumpPage=
"jumpPage"
@
jumpPage=
"jumpPage"
:show=
"id == item.id"
:show=
"id == item.id"
@
reception=
"reception"
/>
/>
</view>
</view>
</
template
>
</
template
>
...
@@ -73,24 +83,24 @@ export default {
...
@@ -73,24 +83,24 @@ export default {
},
},
customerType
:
Number
,
customerType
:
Number
,
},
},
data
()
{
data
()
{
return
{
return
{
};
};
},
},
computed
:
{
computed
:
{
title
()
{
title
()
{
let
{
id
}
=
this
,
let
{
id
}
=
this
,
name
=
this
.
media
.
find
((
e
)
=>
e
.
id
==
id
)?.
shortTitle
||
""
;
name
=
this
.
media
.
find
((
e
)
=>
e
.
id
==
id
)?.
shortTitle
||
""
;
return
name
;
return
name
;
},
},
watchStatus
()
{
watchStatus
()
{
return
this
.
$store
.
state
.
user
.
historyStatus
;
return
this
.
$store
.
state
.
user
.
historyStatus
;
},
},
},
},
mounted
()
{
},
mounted
()
{
},
methods
:
{
methods
:
{
...
mapMutations
(
"audio"
,
[
"setReceptionStatus"
]),
...
mapMutations
(
"audio"
,
[
"setReceptionStatus"
]),
componentName
(
id
)
{
componentName
(
id
)
{
let
name
=
""
;
let
name
=
""
;
if
([
8
,
10
,
11
].
includes
(
id
))
name
=
"membranes"
;
if
([
8
,
10
,
11
].
includes
(
id
))
name
=
"membranes"
;
else
else
...
@@ -101,31 +111,39 @@ export default {
...
@@ -101,31 +111,39 @@ export default {
}[
id
];
}[
id
];
return
name
;
return
name
;
},
},
open
()
{
open
()
{
this
.
$refs
.
stepRef
.
open
();
this
.
$refs
.
stepRef
.
open
();
},
},
/**切换素材 */
/**切换素材 */
choose
(
e
)
{
choose
(
e
)
{
if
(
this
.
id
==
7
)
this
.
$refs
.
media7
[
0
].
closeAllPopup
();
if
(
this
.
id
==
7
)
this
.
$refs
.
media7
[
0
].
closeAllPopup
();
this
.
$emit
(
"update:id"
,
e
.
id
);
this
.
jumpPage
(
e
.
id
)
if
(
e
.
id
==
2
||
e
.
id
==
4
)
{
// console.log(this.$refs[`media${e.id}`][0].$refs)
// this.$refs[`media${e.id}`][0].$refs.tabs.init()
}
},
},
back
()
{
back
()
{
this
.
$refs
?.
toolRef
?.
hide
();
this
.
$refs
?.
toolRef
?.
hide
();
this
.
$emit
(
"back"
);
this
.
$emit
(
"back"
);
},
},
done
(
e
)
{
done
(
e
)
{
this
.
$refs
.
toolRef
.
hide
();
this
.
$refs
.
toolRef
.
hide
();
this
.
$refs
.
stepRef
.
close
();
this
.
$refs
.
stepRef
.
close
();
this
.
$emit
(
"done"
,
e
);
this
.
$emit
(
"done"
,
e
);
},
},
jumpPage
(
id
)
{
jumpPage
(
id
)
{
this
.
$emit
(
"update:id"
,
Number
(
id
));
this
.
$emit
(
"update:id"
,
Number
(
id
));
},
},
pageonReachBottom
()
{},
/**回店客户 */
reception
({
item
})
{
console
.
log
(
JSON
.
parse
(
JSON
.
stringify
(
item
)))
this
.
$store
.
dispatch
(
'setCustomerInfo'
,
{
customerName
:
item
.
customerName
,
carModel
:
item
.
carSeriesName
,
phoneNumber
:
item
.
customerPhone
,
salesUuid
:
item
.
userId
,
staffName
:
item
.
employeeName
,
receiveCouponDate
:
item
.
receiveCouponDate
})
this
.
$emit
(
'reception'
)
},
},
},
};
};
</
script
>
</
script
>
...
...
pages/boutique/index.vue
View file @
0ee034f
...
@@ -39,7 +39,8 @@
...
@@ -39,7 +39,8 @@
@
back=
"back"
@
back=
"back"
@
done=
"done"
@
done=
"done"
ref=
"detail"
ref=
"detail"
:customerType=
"customerType"
:customerType
.
sync=
"customerType"
@
reception=
"reception"
/>
/>
</
template
>
</
template
>
<
template
slot=
"content"
>
<
template
slot=
"content"
>
...
@@ -70,7 +71,7 @@ export default {
...
@@ -70,7 +71,7 @@ export default {
chooseItem
:
{},
chooseItem
:
{},
id
:
''
,
id
:
''
,
type
:
''
,
type
:
''
,
customerType
:
1
customerType
:
-
1
}
}
},
},
onBackPress
(
options
)
{
onBackPress
(
options
)
{
...
@@ -168,7 +169,7 @@ export default {
...
@@ -168,7 +169,7 @@ export default {
this
.
clearHistory
();
this
.
clearHistory
();
this
.
init
();
this
.
init
();
},
},
async
start
()
{
async
start
(
before
=
true
)
{
const
result
=
await
this
.
$permision
.
requestAndroidPermission
(
const
result
=
await
this
.
$permision
.
requestAndroidPermission
(
"android.permission.RECORD_AUDIO"
"android.permission.RECORD_AUDIO"
);
);
...
@@ -179,8 +180,11 @@ export default {
...
@@ -179,8 +180,11 @@ export default {
});
});
return
;
return
;
}
}
this
.
clearHistory
();
this
.
$refs
.
customerTypeRef
.
open
()
if
(
before
)
{
this
.
clearHistory
();
this
.
$refs
.
customerTypeRef
.
open
()
}
this
.
startAudio
();
this
.
startAudio
();
},
},
jumpPage
(
id
)
{
jumpPage
(
id
)
{
...
@@ -215,6 +219,14 @@ export default {
...
@@ -215,6 +219,14 @@ export default {
},
},
changeTab
(
index
)
{
changeTab
(
index
)
{
if
(
index
==
0
)
this
.
init
()
if
(
index
==
0
)
this
.
init
()
},
/**客户邀约接待 */
reception
()
{
console
.
log
(
'?'
)
let
{
customerType
}
=
this
if
(
customerType
==
-
1
)
this
.
start
(
false
)
//开始接待
this
.
customerType
=
0
this
.
jumpPage
()
}
}
}
}
...
...
pages/boutique/invitation.vue
View file @
0ee034f
...
@@ -11,36 +11,40 @@
...
@@ -11,36 +11,40 @@
@
blur=
"input($event)"
@
blur=
"input($event)"
@
focus=
"focus"
@
focus=
"focus"
/>
/>
<view
class=
"input-tips"
v-if=
"!isSearch"
<view
>
搜索客户姓名/电话
<uni-icons
class=
"input-tips"
v-if=
"!isSearch"
>
搜索客户姓名/电话
<uni-icons
type=
"search"
type=
"search"
class=
"icon"
class=
"icon"
color=
"#999"
color=
"#999"
size=
"20"
size=
"20"
></uni-icons
></uni-icons></view>
></view>
</view>
</view>
<scroll-view
<scroll-view
class=
"record-box"
class=
"record-box"
scroll-y
scroll-y
@
scrolltolower=
"pageonReachBottom"
@
scrolltolower=
"pageonReachBottom"
@
scroll=
"scroll"
>
>
<view
class=
"list"
>
<view
class=
"list"
>
<template
v-if=
"flag"
>
<template
v-if=
"flag"
>
<template
v-if=
"list.length"
>
<template
v-if=
"list.length"
>
<template
v-for=
"item in list"
>
<template
v-for=
"item in list"
>
<view
class=
"item"
:key=
"item.id"
>
<view
<view
class=
"item"
:class=
"['status flex', 'status_' + item.inviteStatus]"
:key=
"item.id"
>
{{
inviteStatus
[
item
.
inviteStatus
]
}}
</view
@
click=
"reception(item)"
>
>
<view
:class=
"['status flex', 'status_' + item.inviteStatus]"
>
{{
inviteStatus
[
item
.
inviteStatus
]
}}
</view>
<view
class=
"name"
>
<view
class=
"name"
>
{{
item
.
customerName
}}
{{
item
.
customerName
}}
</view>
</view>
<template
v-for=
"(k, ind) in itemObject"
>
<template
v-for=
"(k, ind) in itemObject"
>
<view
class=
"info flex"
:key=
"ind"
>
<view
class=
"info flex"
:key=
"ind"
>
<view
class=
"label"
>
{{
k
.
label
}}
</view>
<view
class=
"label"
>
{{
k
.
label
}}
</view>
<view
class=
"value"
>
{{
item
[
k
.
key
]
||
"-"
}}
</view>
<view
class=
"value"
>
{{
item
[
k
.
key
]
||
"-"
}}
</view>
</view>
</view>
...
@@ -64,24 +68,29 @@
...
@@ -64,24 +68,29 @@
</
template
>
</
template
>
</scroll-view>
</scroll-view>
</view>
</view>
<MessageBox
ref=
"receptionTips"
content=
"是否接待当前客户,确定接待直接进入\n「精品加装服务说明」"
cancelBtnText=
"取消"
confirmBtnText=
"确定接待"
@
confirm=
"jumpPage"
></MessageBox>
</view>
</view>
</template>
</template>
<
script
type=
"text/ecmascript-6"
>
<
script
type=
"text/ecmascript-6"
>
import
Record
from
"@/mixin/record"
;
import
Record
from
"@/mixin/record"
;
export
default
{
export
default
{
mixins
:[
Record
],
mixins
:
[
Record
],
props
:
{
customerType
:
Number
,
show
:
Boolean
},
data
()
{
data
()
{
return
{
return
{
customerNameOrPhone
:
''
,
customerNameOrPhone
:
''
,
isSearch
:
false
,
isSearch
:
false
,
list
:
[{
list
:
[],
id
:
1
,
inviteStatus
:
{
1
:
'待邀约'
,
2
:
'已邀约'
,
3
:
'取消预约'
,
4
:
'已施工'
,
5
:
'超时未到店'
},
carModel
:
1
,
customerName
:
'合适的甲方'
,
receptionStatus
:
1
}],
inviteStatus
:{
1
:
'待邀约'
,
2
:
'已邀约'
,
3
:
'取消预约'
,
4
:
'已施工'
,
5
:
'超时未到店'
},
itemObject
:
[
itemObject
:
[
{
label
:
'客户电话'
,
key
:
'customerPhone'
},
{
label
:
'客户电话'
,
key
:
'customerPhone'
},
{
label
:
'客户车型'
,
key
:
'carBrand'
},
{
label
:
'客户车型'
,
key
:
'carBrand'
},
...
@@ -89,9 +98,15 @@ export default {
...
@@ -89,9 +98,15 @@ export default {
{
label
:
'领券时间'
,
key
:
'receiveCouponDate'
},
{
label
:
'领券时间'
,
key
:
'receiveCouponDate'
},
{
label
:
'销售顾问'
,
key
:
'employeeName'
},
{
label
:
'销售顾问'
,
key
:
'employeeName'
},
],
],
chooseItem
:
{}
}
},
watch
:
{
show
(
n
)
{
if
(
n
)
this
.
getRecordList
()
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getRecordList
()
this
.
getRecordList
()
},
},
methods
:
{
methods
:
{
...
@@ -104,30 +119,37 @@ export default {
...
@@ -104,30 +119,37 @@ export default {
this
.
getRecordList
()
this
.
getRecordList
()
}
else
this
.
nothing
=
true
}
else
this
.
nothing
=
true
},
},
input
(
e
)
{
input
(
e
)
{
this
.
customerNameOrPhone
=
e
.
detail
.
value
this
.
customerNameOrPhone
=
e
.
detail
.
value
if
(
this
.
customerNameOrPhone
==
''
)
if
(
this
.
customerNameOrPhone
==
''
)
this
.
isSearch
=
false
this
.
isSearch
=
false
this
.
pageNum
=
1
this
.
pageNum
=
1
this
.
getRecordList
()
this
.
getRecordList
()
},
},
focus
()
{
focus
()
{
this
.
isSearch
=
true
this
.
isSearch
=
true
},
},
getRecordList
()
{
getRecordList
()
{
const
{
pageNum
,
pageSize
,
customerNameOrPhone
}
=
this
,
const
{
pageNum
,
pageSize
,
customerNameOrPhone
}
=
this
,
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
),
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
),
{
shopMerchantId
}
=
userInfo
;
{
shopMerchantId
}
=
userInfo
;
this
.
getList
(
'customerInviteRecordPage'
,{
this
.
getList
(
'customerInviteRecordPage'
,
{
merchantId
:
[
shopMerchantId
],
merchantId
:
[
shopMerchantId
],
pageNum
,
pageNum
,
pageSize
,
pageSize
,
customerNameOrPhone
,
customerNameOrPhone
,
})
})
},
}
reception
(
item
)
{
this
.
chooseItem
=
item
this
.
$refs
.
receptionTips
.
open
()
},
jumpPage
()
{
this
.
$emit
(
'reception'
,
{
item
:
this
.
chooseItem
})
}
},
},
}
}
</
script
>
</
script
>
...
...
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