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 8bdcbea1
authored
Jun 05, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit 提交
1 parent
b840b741
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
8 deletions
pages/boutique/components/Reception.vue
pages/boutique/components/Reception.vue
View file @
8bdcbea
...
...
@@ -353,8 +353,9 @@ export default {
async
createCoupon
()
{
try
{
const
{
pageParams
:
{
couponId
,
carInfo
},
customerInfo
}
=
this
,
{
shopMerchantId
}
=
uni
.
$storage
.
get
(
"userInfo"
)
await
this
.
validate
()
shopMerchantId
}
=
uni
.
$storage
.
get
(
"userInfo"
),
validateStatus
=
await
this
.
validate
()
if
(
!
validateStatus
)
return
uni
.
showLoading
()
let
{
staffName
,
salesUuid
}
=
customerInfo
,
scene
=
`id=
${
couponId
}
&userId=
${
salesUuid
}
&employName=
${
staffName
}
&merchantId=
${
shopMerchantId
}
&customerName=
${
customerInfo
.
customerName
}
&customerPhone=
${
customerInfo
.
phoneNumber
}
`
,
...
...
@@ -388,12 +389,22 @@ export default {
}
},
async
validate
()
{
const
{
customerName
,
phoneNumber
,
carModel
,
staffName
}
=
this
.
customerInfo
,
{
couponId
}
=
this
.
pageParams
// 检查车主姓名
if
(
!
customerName
||
!
phoneNumber
||
!
carModel
||
!
staffName
)
throw
'请输入客户信息'
if
(
phoneNumber
&&
!
phoneRex
.
test
(
phoneNumber
))
throw
'请输入正确的手机号'
if
(
!
couponId
)
throw
'请选择礼券类型'
let
flag
=
true
try
{
const
{
customerName
,
phoneNumber
,
carModel
,
staffName
}
=
this
.
customerInfo
,
{
couponId
}
=
this
.
pageParams
// 检查车主姓名
if
(
!
customerName
||
!
phoneNumber
||
!
carModel
||
!
staffName
)
throw
'请输入客户信息'
if
(
phoneNumber
&&
!
phoneRex
.
test
(
phoneNumber
))
throw
'请输入正确的手机号'
if
(
!
couponId
)
throw
'请选择礼券类型'
}
catch
(
error
)
{
uni
.
showToast
({
title
:
error
,
icon
:
'none'
,
})
flag
=
false
}
return
flag
},
checkCustomerReceivedStatus
(
receiveCouponStartTime
)
{
try
{
...
...
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