Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
U
uni-pdtravel
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
panyongping
uni-pdtravel
Commits
470be20f
Commit
470be20f
authored
Nov 22, 2023
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单填写页面开发
parent
3c81b50e
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
271 additions
and
164 deletions
+271
-164
detail.vue
pages/scenic/scenicComponents/detail.vue
+13
-50
scenicOrder.vue
pages/scenic/scenicOrder/scenicOrder.vue
+258
-114
No files found.
pages/scenic/scenicComponents/detail.vue
View file @
470be20f
<
template
>
<
template
>
<u-popup
:show=
"show
"
:round=
"20"
@
close=
"show
= false"
closeable
>
<u-popup
:show=
"show
Pop"
:round=
"20"
@
close=
"showPop
= false"
closeable
>
<view
class=
"son-wrap"
>
<view
class=
"son-wrap"
>
<view
class=
"detail-title"
>
<view
class=
"detail-title"
>
订单明细
订单明细
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
</view>
</view>
</view>
</view>
<!-- ---------------------------------------额外服务------------------------------------------- -->
<!-- ---------------------------------------额外服务------------------------------------------- -->
<view
class=
"content-box"
v-for=
"(item, index) of choo
oseServiceData
"
:key=
"index"
>
<view
class=
"content-box"
v-for=
"(item, index) of choo
seService
"
:key=
"index"
>
<text>
<text>
{{
item
.
name
}}
{{
item
.
name
}}
</text>
</text>
...
@@ -45,56 +45,19 @@
...
@@ -45,56 +45,19 @@
<
script
>
<
script
>
export
default
{
export
default
{
props
:
[
'merchantName'
,
'name'
,
'buyNum'
,
'sellingPrice'
,
'productDepositTotal'
,
'chooseCouponObj'
,
'choooseService'
],
props
:
[
watch
:
{
'merchantName'
,
choooseService
:
{
'name'
,
handler
(
newValue
,
oldValue
)
{
'buyNum'
,
if
(
newValue
)
{
'sellingPrice'
,
this
.
choooseServiceData
=
this
.
choooseService
'productDepositTotal'
,
}
'chooseCouponObj'
,
},
'chooseService'
,
deep
:
false
,
'sellTotal'
immediate
:
false
],
}
},
data
()
{
data
()
{
return
{
return
{
show
:
false
,
//控制弹窗显示隐藏
showPop
:
false
,
//控制弹窗显示隐藏
extraPrice
:
0
,
//额外服务价格
depositTotal
:
0
,
//额外服务总押金
choooseServiceData
:
[]
//选中的服务
}
},
computed
:
{
sellTotal
()
{
//卖价总价
let
savedMoney
=
0
if
(
this
.
chooseCouponObj
)
{
savedMoney
=
this
.
chooseCouponObj
.
savedMoney
}
if
(
this
.
choooseServiceData
.
length
>
0
)
{
//额外服务价格
let
singleMoney
=
0
//单个产品总押金,用于算出总押金
this
.
extraPrice
=
0
this
.
depositTotal
=
0
//总押金
for
(
let
i
=
0
;
i
<
this
.
choooseServiceData
.
length
;
i
++
)
{
this
.
extraPrice
+=
parseFloat
((
this
.
choooseServiceData
[
i
].
sellingPrice
*
this
.
buyNum
).
toFixed
(
2
))
if
(
this
.
choooseServiceData
[
i
].
depositType
==
1
)
{
//等于1,押金金额跟数量没关系
singleMoney
=
this
.
choooseServiceData
[
i
].
deposit
this
.
choooseServiceData
[
i
].
depositTotal
=
this
.
choooseServiceData
[
i
].
deposit
//单个产品总押金
}
else
if
(
this
.
choooseServiceData
[
i
].
depositType
==
2
)
{
//等于2,押金单价乘购买数量
singleMoney
=
parseFloat
((
this
.
choooseServiceData
[
i
].
deposit
*
this
.
buyNum
).
toFixed
(
2
))
this
.
choooseServiceData
[
i
].
depositTotal
=
parseFloat
((
this
.
choooseServiceData
[
i
].
deposit
*
this
.
buyNum
).
toFixed
(
2
))
//单个产品总押金
}
this
.
depositTotal
+=
singleMoney
}
}
else
{
this
.
extraPrice
=
0
this
.
depositTotal
=
0
}
return
parseFloat
((
this
.
sellingPrice
*
this
.
buyNum
+
this
.
extraPrice
+
this
.
depositTotal
+
this
.
productDepositTotal
-
savedMoney
).
toFixed
(
2
))
}
}
},
},
...
...
pages/scenic/scenicOrder/scenicOrder.vue
View file @
470be20f
This diff is collapsed.
Click to expand it.
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