Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
jijin
/
dance-pc
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
a5eb27ff
authored
2024-05-10 17:01:51 +0800
by
zhangmeng
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
订单灵界值处理
1 parent
c37e07b7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
49 deletions
src/viewsPc/booking/makeUpOrder.vue
src/viewsPc/booking/photographyOrder.vue
src/viewsPc/booking/makeUpOrder.vue
View file @
a5eb27f
...
...
@@ -40,14 +40,14 @@
</div>
<el-row
style=
"flex: 1"
>
<div
style=
"flex: 1"
>
<div
style=
"margin-bottom: 20px;"
>
{ language==0?'预约日期':"Appointment date" }}
<span
class=
"span"
>
{{
route
.
query
.
date
}}
</span></div>
<div
style=
"margin-bottom: 20px;"
>
{
{
language
==
0
?
'预约日期'
:
"Appointment date"
}}
<span
class=
"span"
>
{{
route
.
query
.
date
}}
</span></div>
<div>
{{
language
==
0
?
'套餐名称'
:
"Package name"
}}
<span
class=
"span"
>
{{
formDatas
.
name
}}
</span></div>
</div>
<div
style=
"flex: 1"
>
<!--
<div
style=
"margin-bottom: 20px"
>
预约时间
<span
class=
"span"
>
09:00~12:00
</span>
</div>
-->
<div
style=
"margin-bottom: 20px"
>
{{
language
==
0
?
'上门化妆'
:
'Home makeup'
}}
<span
class=
"span"
>
{{
formDatas
.
goHome
==
1
?
'是'
:
'否'
}}
</span></div>
<div
>
{{
language
==
0
?
'价格'
:
"Price"
}}
<span
class=
"sign"
>
{{
language
==
0
?
'¥'
+
formDatas
.
mealPrice
:
'€'
+
formDatas
.
mealPriceEn
}}
</span></div>
<div
>
{{
language
==
0
?
'
价格'
:
"Price"
}}
<span
class=
"sign"
>
{{
language
==
0
?
'¥'
+
formDatas
.
mealPrice
:
'€'
+
formDatas
.
mealPriceEn
}}
</span></div>
</div>
<div
style=
"flex: 1"
>
...
...
@@ -88,7 +88,6 @@
</el-form>
</div>
</el-card>
</el-card>
<el-card
class=
"mt30"
>
...
...
@@ -129,7 +128,6 @@ const language = useStorage('language', 0)
const
router
=
useRouter
()
const
route
=
useRoute
()
const
room
=
ref
({})
const
lform
=
ref
({})
const
form
=
ref
({
num
:
'1'
,
roomNum
:
0
,
...
...
@@ -182,7 +180,7 @@ function getScheduleList() {
}
function
getRadioList
(){
booking
.
getMealConfList
({
lasmId
:
route
.
params
.
lasId
}).
then
(
res
=>
{
booking
.
getMealConfList
({
lasmId
:
route
.
params
.
lasId
,
currentDate
:
route
.
query
.
date
}).
then
(
res
=>
{
radioList
.
value
=
res
.
data
radioList
.
value
.
forEach
(
item
=>
{
item
.
flag
=
false
...
...
@@ -191,37 +189,7 @@ function getRadioList(){
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
}
function
initDays
()
{
booking
.
getMealConfList
({
lasmId
:
route
.
params
.
lasId
}).
then
(
res
=>
{
lform
.
value
=
res
.
data
// if(lform.value.hqStart){
// const today = dayjs()
// if(lform.value.hqStart.slice(0,10)<today.format('YYYY-MM-DD')){
// lform.value.hqStart = today.format('YYYY-MM-DD')
// }
// rzRange.value = [lform.value.hqStart.slice(0,10),lform.value.hqEnd.slice(0,10)]
// getDaysBetween(rzRange.value)
// }
// console.log(rzRange.value,lform.value.hqStart)
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
}
function
disabledDateRZ
(
date
)
{
//判读今天大与form.value.hqStart
if
(
lform
.
value
.
hqStart
)
{
const
today
=
dayjs
().
format
(
'YYYY-MM-DD'
)
if
(
lform
.
value
.
hqStart
<
today
)
{
return
!
((
date
.
getTime
()
>=
dayjs
(
today
).
valueOf
())
&&
(
date
.
getTime
()
<=
dayjs
(
lform
.
value
.
hqEnd
).
valueOf
()))
}
else
{
return
!
((
date
.
getTime
()
>=
dayjs
(
lform
.
value
.
hqStart
).
valueOf
())
&&
(
date
.
getTime
()
<=
dayjs
(
lform
.
value
.
hqEnd
).
valueOf
()))
}
}
return
true
timeVal
.
value
=
{}
}
function
submit
()
{
...
...
@@ -230,8 +198,7 @@ function submit() {
return
}
if
(
!
timeVal
.
value
)
return
proxy
.
$modal
.
msgError
(
'请选择预约时间!'
,
)
if
(
!
timeVal
.
value
.
id
)
return
proxy
.
$modal
.
msgError
(
'请选择预约时间!'
,
)
proxy
.
$refs
[
'formRef'
].
validate
(
valid
=>
{
if
(
valid
){
form
.
value
.
total
=
money
.
value
...
...
@@ -252,8 +219,8 @@ function submit() {
}).
then
(()
=>
{
booking
.
submitOrderMeal
(
form
.
value
).
then
(
res
=>
{
if
(
res
.
data
)
{
if
(
res
.
data
.
roomNum
==
-
10
0
)
{
ElMessage
.
warning
(
language
.
value
==
0
?
'
预定时间不足'
:
'The remaining number of rooms is insufficient
'
)
if
(
res
.
data
.
orderId
<
0
||
res
.
data
.
total
<
0
)
{
ElMessage
.
warning
(
language
.
value
==
0
?
'
订单库存数量不足!'
:
'The order stock quantity is insufficient!
'
)
getRadioList
()
}
else
{
//去付钱
...
...
@@ -267,10 +234,10 @@ function submit() {
})
}
}
else
{
ElMessage
.
warning
(
language
.
value
==
0
?
'无可预订的时间'
:
'No
rooms available to book
'
)
ElMessage
.
warning
(
language
.
value
==
0
?
'无可预订的时间'
:
'No
booking time available
'
)
}
}).
catch
(
err
=>
{
ElMessage
.
warning
(
language
.
value
==
0
?
'无可预订的时间'
:
'No
rooms available to book
'
)
ElMessage
.
warning
(
language
.
value
==
0
?
'无可预订的时间'
:
'No
booking time available
'
)
})
})
...
...
@@ -280,7 +247,6 @@ function submit() {
})
}
function
handleRadio
(
v
){
timeVal
.
value
=
null
radioList
.
value
.
forEach
(
t
=>
{
...
...
src/viewsPc/booking/photographyOrder.vue
View file @
a5eb27f
...
...
@@ -179,7 +179,7 @@ function getScheduleList() {
}
function
getRadioList
(){
booking
.
getPhotoConfList
({
laspId
:
route
.
params
.
lasId
}).
then
(
res
=>
{
booking
.
getPhotoConfList
({
laspId
:
route
.
params
.
lasId
,
currentDate
:
route
.
query
.
date
}).
then
(
res
=>
{
radioList
.
value
=
res
.
data
radioList
.
value
.
forEach
(
item
=>
{
item
.
flag
=
false
...
...
@@ -188,6 +188,7 @@ function getRadioList(){
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
timeVal
.
value
=
{}
}
function
submit
()
{
...
...
@@ -196,7 +197,7 @@ function submit() {
return
}
if
(
!
timeVal
.
value
)
return
proxy
.
$modal
.
msgError
(
'请选择预约时间!'
,
)
if
(
!
timeVal
.
value
.
id
)
return
proxy
.
$modal
.
msgError
(
'请选择预约时间!'
,
)
proxy
.
$refs
[
'formRef'
].
validate
(
valid
=>
{
if
(
valid
){
...
...
@@ -218,8 +219,8 @@ function submit() {
}).
then
(()
=>
{
booking
.
submitOrderPhoto
(
form
.
value
).
then
(
res
=>
{
if
(
res
.
data
)
{
if
(
res
.
data
.
roomNum
==
-
10
0
)
{
ElMessage
.
warning
(
language
.
value
==
0
?
'
预定时间不足'
:
'The remaining number of rooms is insufficient
'
)
if
(
res
.
data
.
orderId
<
0
||
res
.
data
.
total
<
0
)
{
ElMessage
.
warning
(
language
.
value
==
0
?
'
订单库存数量不足!'
:
'The order stock quantity is insufficient!
'
)
getRadioList
()
}
else
{
//去付钱
...
...
@@ -233,10 +234,10 @@ function submit() {
})
}
}
else
{
ElMessage
.
warning
(
language
.
value
==
0
?
'无可预订的时间'
:
'No
rooms available to book
'
)
ElMessage
.
warning
(
language
.
value
==
0
?
'无可预订的时间'
:
'No
booking time available
'
)
}
}).
catch
(
err
=>
{
ElMessage
.
warning
(
language
.
value
==
0
?
'无可预订的时间'
:
'No
rooms available to book
'
)
ElMessage
.
warning
(
language
.
value
==
0
?
'无可预订的时间'
:
'No
booking time available
'
)
})
})
...
...
Write
Preview
Styling with
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