Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
million
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
viitto
million
Commits
a335ca0c
Commit
a335ca0c
authored
Mar 10, 2023
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
17f582c0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
114 additions
and
51 deletions
+114
-51
orderPreview.vue
src/components/ScenicSpotTicket/orderPreview.vue
+0
-1
orderPreview.vue
src/components/car/orderPreview.vue
+31
-10
orderForm.vue
src/pages/Pickuporder/orderForm.vue
+55
-32
details.vue
src/pages/ScenicSpotTicket/details.vue
+2
-1
orderForm.vue
src/pages/ScenicSpotTicket/orderForm.vue
+26
-7
No files found.
src/components/ScenicSpotTicket/orderPreview.vue
View file @
a335ca0c
...
...
@@ -137,7 +137,6 @@ export default {
x
.
originalB2CPrice
=
y
.
Price
}
})
x
.
Count
=
60
})
this
.
calcMoney
()
...
...
src/components/car/orderPreview.vue
View file @
a335ca0c
...
...
@@ -43,15 +43,16 @@
</div>
</div>
<div
class=
"text-grey-6 f12 q-my-md"
>
選擇車類型
</div>
<div
class=
"row wrap"
>
<div
v-for=
"(x,i) in dataList.CarTypeList"
:key=
"i"
>
<q-chip
size=
"14px"
clickable
@
click=
"handleSelect(x,2)"
:text-color=
"selectedCarObj&&selectedCarObj.Id==x.Id?'white':'dark'"
:color=
"selectedCarObj&&selectedCarObj.Id==x.Id?'primary':'grey-3'"
square
>
{{ x.CarName }}({{ x.PeopleNum }}人)
</q-chip>
<
template
v-if=
"TicketIds&&TicketIds.length>0"
>
<div
class=
"text-grey-6 f12 q-my-md"
>
選擇車類型
</div>
<div
class=
"row wrap"
>
<div
v-for=
"(x,i) in dataList.CarTypeList"
:key=
"i"
>
<q-chip
v-if=
"TicketIds.indexOf(x.Id)!=-1"
size=
"14px"
clickable
@
click=
"handleSelect(x,2)"
:text-color=
"selectedCarObj&&selectedCarObj.Id==x.Id?'white':'dark'"
:color=
"selectedCarObj&&selectedCarObj.Id==x.Id?'primary':'grey-3'"
square
>
{{
x
.
CarName
}}
(
{{
x
.
PeopleNum
}}
人)
</q-chip>
</div>
</div>
</
div
>
</
template
>
<div
class=
"text-grey-6 f12 q-my-md"
>
選擇數量
</div>
<div
class=
"row items-end"
>
<div
class=
"col"
:class=
"{'column':$q.platform.is.mobile}"
>
...
...
@@ -150,6 +151,8 @@ export default {
this
.
p
=
n
;
if
(
n
&&
n
.
startDate
){
this
.
chosenObj
.
startDate
=
n
.
startDate
;
let
arr
=
this
.
dataAll
.
filter
(
x
=>
x
.
Date
==
this
.
chosenObj
.
startDate
)
this
.
TicketIds
=
arr
[
0
].
Price
.
map
(
x
=>
{
return
x
.
TicketId
})
// this.selectedCar = this.dataList.CarTypeList[0].Id
// this.selectedCarObj = this.dataList.CarTypeList[0]
}
...
...
@@ -178,17 +181,17 @@ export default {
selectedAirportObj
:
null
,
onCarObj
:
null
,
unCarObj
:
null
,
TicketIds
:
null
};
},
created
()
{
this
.
initModel
();
console
.
log
(
this
.
p
,
'======='
)
if
(
this
.
p
.
startDate
){
this
.
chosenObj
.
startDate
=
this
.
p
.
startDate
;
this
.
calcMoney
()
this
.
getCarPriceData2
()
}
this
.
getCarPriceData
()
},
methods
:
{
goOrderHandler
(){
...
...
@@ -267,6 +270,24 @@ export default {
},
null
)
},
getCarPriceData
()
{
this
.
priceList
=
[]
this
.
apipost
(
"b2c_get_GetCarSingleProductMonthPriceAll"
,
{
ProductId
:
this
.
configId
,
Month
:
this
.
Month
,
// AirportId: '',
// CarTypeId: this.selectedCarObj.Id
},
(
r
)
=>
{
if
(
r
.
data
.
resultCode
==
1
)
{
this
.
dataAll
=
r
.
data
.
data
}
},
null
)
},
handleSelectAirport
(
item
){
this
.
selectedAirportObj
=
item
},
...
...
src/pages/Pickuporder/orderForm.vue
View file @
a335ca0c
...
...
@@ -423,6 +423,12 @@
<
q
-
input
standout
v
-
model
=
"parameters.Remark"
input
-
style
=
"height:170px;"
type
=
"textarea"
placeholder
=
"此欄位僅限資料備註。不在商品規範內的個人需求,不保證提供"
maxlength
=
"200"
counter
/>
<
/q-card
>
<
/q-form
>
<
coupon
v
-
if
=
"sumPrice>0&&productType"
:
product
-
type
=
"productType"
:
current
-
price
=
"sumPrice"
@
change
=
"changeDiscountHandler"
><
/coupon
>
<
/div
>
<
div
class
=
"relative-position"
v
-
if
=
"details"
...
...
@@ -510,15 +516,21 @@
<
div
class
=
"col"
>
{{
CarObj
.
CarName
}}
x
{{
chosenObj
.
Count
}}
<
/div
>
<
div
>
{{
details
.
CurrencyCode
}}
{{
moneyFormat
(
OrderDate
.
originalB2CPrice
,
2
)
}}
<
/div
>
<
/div
>
<!--
<
hr
style
=
"border:none;border-top:1px dashed #EEE !important;"
class
=
"bg-transparent q-mb-sm"
/>
<
div
class
=
"row q-mb-sm items-center"
v
-
if
=
"(chosenObj.Count)>0"
>
<
div
class
=
"col"
>
總金額
<
/div
>
<
div
class
=
"text-subtitle2 text-weight-bolder text-primary"
>
{{
details
.
CurrencyCode
}}
{{
moneyFormat
(
OrderDate
.
sumPrice
,
2
)
}}
<
/div
>
<
/div> --
>
<
hr
style
=
"border:none;border-top:1px dashed #EEE !important;"
class
=
"bg-transparent q-mb-sm"
/>
<
div
class
=
"row q-mb-sm items-center"
>
<
div
class
=
"col"
>
優惠金額
<
/div
>
<
div
class
=
"text-subtitle2 text-weight-bolder text-teal"
v
-
if
=
"parameters.DiscountsMoney > 0"
>
CNY
-
{{
moneyFormat
(
parameters
.
DiscountsMoney
,
2
)
}}
<
/div
>
<
div
class
=
"text-grey-5"
v
-
else
>
暫無優惠
<
/div
>
<
/div
>
<
hr
style
=
"border:none;border-top:1px dashed #EEE !important;"
class
=
"bg-transparent q-mb-sm"
/>
<
div
class
=
"row q-mb-sm items-center"
v
-
if
=
"chosenObj.Count>0"
>
<
div
class
=
"col"
>
支付金額
<
/div
>
<
div
class
=
"text-h6 text-weight-bolder text-primary product-price"
>
{{
details
.
CurrencyCode
}}
{{
moneyFormat
(
OrderDate
.
sumPrice
,
2
)
}}
<
/div
>
<
div
class
=
"text-h6 text-weight-bolder text-primary product-price"
>
{{
details
.
CurrencyCode
}}
{{
moneyFormat
(
parameters
.
Money
,
2
)
}}
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"text-right q-mt-md"
v
-
if
=
"step!=3"
>
...
...
@@ -570,6 +582,9 @@ export default {
}
,
data
()
{
return
{
CouponIds
:
[],
productType
:
null
,
sumPrice
:
0
,
//总金额
order
:
null
,
//订单信息
orderKey
:
""
,
isShowDialog
:
false
,
...
...
@@ -608,6 +623,8 @@ export default {
Unit_Price
:
''
,
//单价
Num
:
''
,
//数量
Money
:
0.0
,
DiscountsMoney
:
0
,
//优惠金额
DiscountsIds
:
''
,
//优惠券id
Sex
:
1
,
//1男2女
SurName
:
''
,
//姓
Name
:
''
,
//名
...
...
@@ -661,6 +678,19 @@ export default {
this
.
getUserInfoHandler
()
}
,
methods
:
{
changeDiscountHandler
(
coupon
)
{
if
(
coupon
)
{
this
.
parameters
.
DiscountsMoney
=
coupon
.
discountMoney
;
this
.
CouponIds
=
[
coupon
.
couponId
];
this
.
parameters
.
DiscountsIds
=
this
.
CouponIds
.
join
(
","
)
}
else
{
this
.
parameters
.
DiscountsMoney
=
0
;
this
.
CouponIds
=
[];
this
.
parameters
.
DiscountsIds
=
''
}
this
.
parameters
.
Money
=
this
.
sumPrice
-
this
.
parameters
.
DiscountsMoney
this
.
$forceUpdate
();
}
,
// 获取商品详情
getCarData
()
{
this
.
$q
.
loading
.
show
();
...
...
@@ -680,6 +710,14 @@ export default {
}
this
.
parameters
.
CarId
=
this
.
OrderDate
.
CarId
this
.
parameters
.
OrderType
=
this
.
details
.
CarType
//13接机 14送机 12包车
if
(
this
.
parameters
.
OrderType
==
1
){
this
.
productType
=
13
}
else
if
(
this
.
parameters
.
OrderType
==
2
){
this
.
productType
=
14
}
else
if
(
this
.
parameters
.
OrderType
==
3
){
this
.
productType
=
12
}
}
else
{
this
.
$q
.
notify
({
type
:
"negative"
,
...
...
@@ -711,6 +749,7 @@ export default {
this
.
parameters
.
Unit_Price
=
this
.
OrderDate
.
originalB2CPrice
this
.
parameters
.
Num
=
this
.
chosenObj
.
Count
this
.
parameters
.
Money
=
this
.
OrderDate
.
sumPrice
this
.
sumPrice
=
this
.
OrderDate
.
sumPrice
}
}
}
...
...
@@ -780,15 +819,7 @@ export default {
}
)
}
,
AddOrderInfo
(
ErpOrderId
){
let
GoodsType
=
null
//13接机 14送机 12包车
if
(
this
.
parameters
.
OrderType
==
1
){
GoodsType
=
13
}
else
if
(
this
.
parameters
.
OrderType
==
2
){
GoodsType
=
14
}
else
if
(
this
.
parameters
.
OrderType
==
3
){
GoodsType
=
12
}
this
.
apipost
(
"AddOrderInfo_post"
,
{
...
...
@@ -799,10 +830,10 @@ export default {
GoodsId
:
this
.
parameters
.
ProductId
,
//商品id
GoodsName
:
this
.
details
.
Name
,
//商品名称
GoodsPic
:
this
.
details
.
ImageList
[
0
],
//商品图片
GoodsType
:
Goods
Type
,
//商品类型(见枚举) 12包车 13 接机 14送机
GoodsType
:
this
.
product
Type
,
//商品类型(见枚举) 12包车 13 接机 14送机
OrderMake
:
this
.
parameters
.
OrderDate
,
//订单摘要(例如出行时间)
TotalPrice
:
this
.
parameters
.
Money
,
//总价格
PreferentialPrice
:
0
,
// 优惠总金额
PreferentialPrice
:
this
.
parameters
.
DiscountsMoney
,
// 优惠总金额
ErpOrderId
:
ErpOrderId
,
//erp订单id
Country
:
this
.
userInfo
.
Country
,
//国家id
PlatformTax
:
0
,
//平台税金默认0
...
...
@@ -821,22 +852,14 @@ export default {
}
)
}
,
goPayHandler
(
pay
){
let
key
=
this
.
$md5
(
JSON
.
stringify
(
pay
))
let
pays
=
localStorage
.
getItem
(
'pays'
)
pays
=
pays
?
JSON
.
parse
(
pays
):[]
pays
.
push
({
key
,
pay
}
)
localStorage
.
setItem
(
"pays"
,
JSON
.
stringify
(
pays
))
let
pickuporderCars
=
localStorage
.
getItem
(
'pickuporderCars'
)
pickuporderCars
=
pickuporderCars
?
JSON
.
parse
(
pickuporderCars
):[]
let
i
=
pickuporderCars
.
findIndex
(
x
=>
x
.
key
==
this
.
orderKey
)
if
(
i
>=
0
){
pickuporderCars
.
splice
(
i
,
1
)
localStorage
.
setItem
(
"pickuporderCars"
,
JSON
.
stringify
(
pickuporderCars
))
let
pickuporderCars
=
localStorage
.
getItem
(
"pickuporderCars"
);
pickuporderCars
=
pickuporderCars
?
JSON
.
parse
(
pickuporderCars
)
:
[];
let
i
=
pickuporderCars
.
findIndex
((
x
)
=>
x
.
key
==
this
.
orderKey
);
if
(
i
>=
0
)
{
pickuporderCars
.
splice
(
i
,
1
);
localStorage
.
setItem
(
"pickuporderCars"
,
JSON
.
stringify
(
pickuporderCars
));
}
this
.
CommonJump
(
'/pay/'
+
key
,
{
}
);
this
.
CommonJump
(
"/pay/"
+
pay
.
OrderNo
,
{
}
);
}
,
// 航班起飞抵达时间
getTime
(
type
){
...
...
src/pages/ScenicSpotTicket/details.vue
View file @
a335ca0c
...
...
@@ -920,13 +920,14 @@ export default {
let
arr
=
[]
r
.
data
.
data
.
forEach
(
x
=>
{
x
.
PriceList
=
x
.
PriceList
.
sort
((
a
,
b
)
=>
{
return
a
.
Price
-
b
.
Price
}
)
let
MailingMoneyList
=
x
.
PriceList
.
sort
((
a
,
b
)
=>
{
return
b
.
MailingMoney
-
a
.
MailingMoney
}
)
let
dataObj
=
{
startDate
:
x
.
Date
,
originalB2CPrice
:
x
.
PriceList
[
0
].
Price
,
remainNum
:
1
,
Count
:
1
,
safeMoney
:
0
,
MailingMoney
:
x
.
Price
List
[
0
].
MailingMoney
,
MailingMoney
:
MailingMoney
List
[
0
].
MailingMoney
,
PriceList
:
x
.
PriceList
,
}
if
(
date
.
formatDate
(
Date
.
now
(),
'YYYY-MM-DD'
)
!=
x
.
Date
&&
x
.
Date
>
date
.
formatDate
(
Date
.
now
(),
'YYYY-MM-DD'
)){
...
...
src/pages/ScenicSpotTicket/orderForm.vue
View file @
a335ca0c
...
...
@@ -171,6 +171,15 @@
</
template
>
</q-input>
</div>
<div
:class=
"filedGuestWidth"
>
<q-input
standout
v-model=
"parameters.MailingAddress"
label=
"郵寄地址"
:rules=
"[(val) => !!val || '請輸郵寄地址']"
ref=
"MailingAddress"
></q-input>
</div>
<div
:class=
"filedGuestWidth"
>
<div
class=
"row items-center q-mt-md"
>
<span>
選擇性別:
</span>
...
...
@@ -270,11 +279,15 @@
</
template
>
</div>
</template>
<div
class=
"row q-mb-sm"
v-if=
"parameters.MailingState==2&¶meters.MailingMoney>0"
>
<div
class=
"col text-grey-6"
>
邮寄费
</div>
<div
class=
"text-red"
>
{{ moneyFormat(parameters.MailingMoney,2) }}
</div>
</div>
<hr
style=
"border:none;border-top:1px dashed #EEE !important;"
class=
"bg-transparent q-mb-sm"
/>
<div
class=
"row q-mb-sm items-center"
v-if=
"parameters.MailingState==2&¶meters.MailingMoney>0"
>
<div
class=
"col"
>
邮寄费
</div>
<div
class=
"text-subtitle2 text-weight-bolder text-grey-6"
>
CNY {{ moneyFormat(parameters.MailingMoney,2) }}
</div>
</div>
<div
class=
"row q-mb-sm items-center"
>
<div
class=
"col"
>
優惠金額
</div>
<div
...
...
@@ -362,7 +375,7 @@
OrderId
:
0
,
Money
:
0.0
,
DiscountsMoney
:
0
,
//优惠金额
CouponAllotIds
:
''
,
DiscountsIds
:
''
,
//优惠券id
Remark
:
''
,
MailingState
:
''
,
//邮寄状态 1自取 2邮寄
MailingAddress
:
''
,
//MailingState =2 填写邮寄
...
...
@@ -409,11 +422,11 @@
if
(
coupon
)
{
this
.
parameters
.
DiscountsMoney
=
coupon
.
discountMoney
;
this
.
CouponIds
=
[
coupon
.
couponId
];
this
.
parameters
.
CouponAllot
Ids
=
this
.
CouponIds
.
join
(
","
)
this
.
parameters
.
Discounts
Ids
=
this
.
CouponIds
.
join
(
","
)
}
else
{
this
.
parameters
.
DiscountsMoney
=
0
;
this
.
CouponIds
=
[];
this
.
parameters
.
CouponAllot
Ids
=
''
this
.
parameters
.
Discounts
Ids
=
''
}
this
.
parameters
.
Money
=
this
.
sumPrice
-
this
.
parameters
.
DiscountsMoney
this
.
$forceUpdate
();
...
...
@@ -497,6 +510,12 @@
this
.
$refs
.
SurName
.
validate
()
this
.
$refs
.
Name
.
validate
()
this
.
$refs
.
Mobile
.
validate
()
if
(
this
.
parameters
.
MailingState
==
2
){
this
.
$refs
.
MailingAddress
.
validate
()
}
else
{
this
.
parameters
.
MailingAddress
=
''
}
console
.
log
(
this
.
parameters
,
'----'
)
let
flag
=
true
flag
=
await
this
.
formValidateHandler
(
'baseUserInfo'
)
...
...
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