Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jz_Travel
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
zhengke
jz_Travel
Commits
8d8ca1f8
Commit
8d8ca1f8
authored
Oct 14, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
4d892ef8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
203 additions
and
182 deletions
+203
-182
jz_Reserve.vue
pages/jiuzhai/jz_Reserve.vue
+203
-182
No files found.
pages/jiuzhai/jz_Reserve.vue
View file @
8d8ca1f8
...
...
@@ -114,7 +114,6 @@
.jz_form
{
margin-top
:
60
rpx
;
padding
:
0
45
rpx
;
}
.jz_form
.form-items
{
margin-bottom
:
20
rpx
;
...
...
@@ -133,7 +132,7 @@
font-weight
:
600
;
margin-right
:
60
rpx
;
flex-shrink
:
0
;
width
:
56px
;
width
:
56px
;
}
.jz_form
.form-items
.val
{
flex
:
1
;
...
...
@@ -242,24 +241,24 @@
line-height
:
40
rpx
;
margin-right
:
24
rpx
;
}
.jz_GuestList
{
box-shadow
:
0px
2px
15px
0px
rgba
(
76
,
76
,
76
,
0.13
);
padding
:
20
rpx
;
margin
:
25
rpx
;
border-radius
:
25
rpx
;
}
.jz_GuestList
.form-items
:last-child
{
margin-bottom
:
0
;
padding-bottom
:
6
rpx
;
}
.jz_TextArea
{
height
:
50px
;
margin-bottom
:
10px
;
width
:
auto
;
border
:
1px
solid
#DFDDD
8
;
border-radius
:
4px
;
margin
:
25
rpx
;
padding
:
20
rpx
;
.jz_GuestList
{
box-shadow
:
0px
2px
15px
0px
rgba
(
76
,
76
,
76
,
0.13
);
padding
:
20
rpx
;
margin
:
25
rpx
;
border-radius
:
25
rpx
;
}
.jz_GuestList
.form-items
:last-child
{
margin-bottom
:
0
;
padding-bottom
:
6
rpx
;
}
.jz_TextArea
{
height
:
50px
;
margin-bottom
:
10px
;
width
:
auto
;
border
:
1px
solid
#dfddd
8
;
border-radius
:
4px
;
margin
:
25
rpx
;
padding
:
20
rpx
;
}
</
style
>
<
template
>
...
...
@@ -304,16 +303,18 @@
/>
即时确认:本产品付款后可快速确认,放心期待您的旅行
</view>
</view>
<view
class=
"jz_form jz_GuestList"
v-for=
"(subItem,subIndex) in GuestList"
:key=
"subIndex"
>
<view
style=
"margin:10rpx 0 15rpx 0;"
>
游客:
{{
subIndex
+
1
}}
</view>
<view
class=
"jz_form jz_GuestList"
v-for=
"(subItem, subIndex) in GuestList"
:key=
"subIndex"
>
<view
style=
"margin: 10rpx 0 15rpx 0"
>
游客:
{{
subIndex
+
1
}}
</view>
<view
class=
"form-items"
>
<view
class=
"label"
>
游客姓名
</view>
<view
class=
"val"
>
<input
type=
"text"
:key=
"subIndex"
:key=
"subIndex"
v-model=
"subItem.SurName"
placeholder=
"请输入游客姓名"
/>
...
...
@@ -329,29 +330,39 @@
/>
</view>
</view>
<view
class=
"form-items"
>
<view
class=
"label"
>
身份证
</view>
<view
class=
"val"
>
<input
type=
"number"
v-model=
"subItem.IdCard"
placeholder=
"请输入身份证号"
/>
</view>
</view>
<view
class=
"form-items"
>
<view
class=
"label"
>
学生
</view>
<view
class=
"val"
style=
"margin-top: -20rpx;"
>
<u-checkbox-group>
<u-checkbox
v-model=
"subItem.IsHightSchool"
></u-checkbox>
</u-checkbox-group>
</view>
</view>
<view
class=
"form-items"
>
<view
class=
"label"
>
身份证
</view>
<view
class=
"val"
>
<input
type=
"number"
v-model=
"subItem.IdCard"
placeholder=
"请输入身份证号"
/>
</view>
</view>
<view
class=
"form-items"
>
<view
class=
"label"
>
学生
{{
subItem
.
IsHightSchool
}}
</view>
<view
class=
"val"
style=
"margin-top: -20rpx"
>
<!--
<u-checkbox-group>
<u-checkbox
v-model=
"subItem.IsHightSchool"
></u-checkbox>
</u-checkbox-group>
-->
<checkbox-group
@
change=
"changecheckbox($event, subIndex, subItem)"
>
<checkbox
:value=
"subItem.IsHightSchool"
:checked=
"subItem.IsHightSchool"
/>
</checkbox-group>
</view>
</view>
</view>
<view>
<textarea
class=
"jz_TextArea"
placeholder=
"请输入备注信息"
v-model=
"Remarks"
/>
</view>
<view>
<textarea
class=
"jz_TextArea"
placeholder=
"请输入备注信息"
v-model=
"Remarks"
/>
</view>
<view
class=
"empty-block"
></view>
<!--
<view
class=
"jz_ReseOrder"
>
<view
class=
"jz_ReDix"
>
...
...
@@ -535,8 +546,8 @@ export default {
contactName
:
""
,
orderInfo
:
{},
orderData
:
""
,
Remarks
:
""
,
//备注
GuestList
:[]
Remarks
:
""
,
//备注
GuestList
:
[],
};
},
created
()
{
...
...
@@ -561,6 +572,17 @@ export default {
}
},
methods
:
{
changecheckbox
(
e
,
index
,
item
)
{
if
(
item
.
IsHightSchool
)
{
let
newObj
=
JSON
.
parse
(
JSON
.
stringify
(
item
));
newObj
.
IsHightSchool
=
false
;
this
.
$set
(
this
.
GuestList
,
index
,
newObj
);
}
else
{
let
newObj
=
JSON
.
parse
(
JSON
.
stringify
(
item
));
newObj
.
IsHightSchool
=
true
;
this
.
$set
(
this
.
GuestList
,
index
,
newObj
);
}
},
//获取详情
getDetails
(
id
)
{
this
.
apipost
(
...
...
@@ -650,143 +672,142 @@ export default {
:
0
)
*
this
.
orderMsg
.
ChirdNoBedNum
;
}
this
.
price
=
money
;
//根据总人数 生成旅客信息
for
(
var
i
=
0
;
i
<
this
.
total
;
i
++
)
{
let
obj
=
{
Id
:
0
,
SurName
:
""
,
//姓
Name
:
""
,
//名
IdCard
:
""
,
//身份证
MobilePhone
:
""
,
//联系电话
IsHightSchool
:
false
,
//是否高校学生1 是 2否
}
this
.
GuestList
.
push
(
obj
);
}
//根据总人数 生成旅客信息
for
(
var
i
=
0
;
i
<
this
.
total
;
i
++
)
{
let
obj
=
{
Id
:
0
,
SurName
:
""
,
//姓
Name
:
""
,
//名
IdCard
:
""
,
//身份证
MobilePhone
:
""
,
//联系电话
IsHightSchool
:
false
,
//是否高校学生1 是 2否
};
this
.
GuestList
.
push
(
obj
);
}
},
//去支付
goPay
()
{
for
(
var
i
=
0
;
i
<
this
.
GuestList
.
length
;
i
++
){
if
(
this
.
GuestList
[
i
].
SurName
==
''
){
uni
.
showToast
({
title
:
`请输入游客
${
i
+
1
}
的姓名`
,
icon
:
"none"
,
});
return
}
if
(
this
.
GuestList
[
i
].
IdCard
==
''
){
uni
.
showToast
({
title
:
`请输入游客
${
i
+
1
}
的身份证`
,
icon
:
"none"
,
});
return
}
if
(
this
.
GuestList
[
i
].
MobilePhone
==
''
){
uni
.
showToast
({
title
:
`请输入游客
${
i
+
1
}
的联系电话`
,
icon
:
"none"
,
});
return
}
}
this
.
submit
=
true
;
this
.
userInfo
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
this
.
basedataObj
=
uni
.
getStorageSync
(
"basedata"
).
mall
;
var
CustomerId
=
this
.
basedataObj
.
virtualB2BCustomerId
;
this
.
GuestList
.
forEach
(
x
=>
{
if
(
x
.
IsHightSchool
){
x
.
IsHightSchool
=
1
}
else
{
x
.
IsHightSchool
=
2
}
})
var
ContactName
=
this
.
contactName
;
var
ContactMobile
=
this
.
contactMobile
;
var
CustomerType
=
4
;
var
price
=
this
.
currentPriceInfo
.
b2CPrice
;
let
msg
=
{
OrderId
:
0
,
TCID
:
this
.
currentPriceInfo
.
tcid
,
CustomerType
:
CustomerType
,
GroupType
:
1
,
ContactName
:
ContactName
,
ContactMobile
:
ContactMobile
,
CustomerId
:
CustomerId
,
DepartureCityId
:
262
,
IsIntermodal
:
2
,
Unit_Price
:
price
,
TC_Price
:
price
,
ManNum
:
this
.
orderMsg
.
ManNum
,
ChirdNum
:
this
.
orderMsg
.
ChirdNum
,
ChirdNeedBedNum
:
this
.
orderMsg
.
ChirdNeedBedNum
,
BabyNum
:
this
.
orderMsg
.
BabyNum
,
OldPeopleNum
:
0
,
SingleRoomNum
:
0
,
PreferPrice
:
this
.
price
,
YSeatNum
:
this
.
total
,
ESeatNum
:
0
,
FSeatNum
:
0
,
Commission
:
0
,
//todo 提成
ClientSource
:
2
,
BrandId
:
0
,
TradeWay
:
0
,
PlatformOrder
:
""
,
GuestNum
:
this
.
orderMsg
.
ManNum
+
this
.
orderMsg
.
ChirdNum
+
this
.
orderMsg
.
BabyNum
,
IsChildrenTour
:
this
.
currentPriceInfo
.
isSupportChildren
,
IsBirdDiscount
:
this
.
zaoniao
>
0
?
1
:
2
,
PredictRoomNum
:
1
,
BigRoomNum
:
0
,
TripleRoomNum
:
0
,
TradeDate
:
this
.
currentPriceInfo
.
startDate
,
CostType
:
0
,
MinOrderPrice
:
0
,
Remarks
:
""
,
VisaNum
:
this
.
orderMsg
.
ManNum
+
this
.
orderMsg
.
ChirdNum
,
SafeNum
:
this
.
orderMsg
.
ManNum
+
this
.
orderMsg
.
ChirdNum
,
AirticketNum
:
0
,
ReturnArriveCityId
:
262
,
IsReturnIntermodal
:
2
,
GoCityTime
:
""
,
BackCityTime
:
""
,
ScenicRefundArr
:
[],
CommissionSharePeople
:
0
,
CommissionShareMoney
:
0
,
// #ifdef MP-WEIXIN
OrderSource
:
5
,
// #endif
// #ifdef MP-ALIPAY
OrderSource
:
6
,
// #endif
MiniAppUserId
:
this
.
userInfo
.
UserId
,
Remarks
:
this
.
Remarks
,
//备注
GuestList
:
this
.
GuestList
};
this
.
apipost
(
"sellorder_post_SetOrderInfoForB2B"
,
msg
,
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
let
data
=
res
.
data
;
data
.
CoverImg
=
this
.
currentPriceInfo
.
CoverImg
;
let
myData
=
JSON
.
stringify
(
data
);
this
.
orderData
=
encodeURIComponent
(
myData
);
// #ifdef MP-WEIXIN
this
.
queren
(
data
.
OrderId
);
// #endif
// #ifdef MP-ALIPAY
this
.
querenAli
(
data
);
// #endif
}
else
{
}
this
.
submit
=
false
;
},
(
e
)
=>
{
this
.
submit
=
false
;
for
(
var
i
=
0
;
i
<
this
.
GuestList
.
length
;
i
++
)
{
if
(
this
.
GuestList
[
i
].
SurName
==
""
)
{
uni
.
showToast
({
title
:
`请输入游客
${
i
+
1
}
的姓名`
,
icon
:
"none"
,
});
return
;
}
if
(
this
.
GuestList
[
i
].
IdCard
==
""
)
{
uni
.
showToast
({
title
:
`请输入游客
${
i
+
1
}
的身份证`
,
icon
:
"none"
,
});
return
;
}
if
(
this
.
GuestList
[
i
].
MobilePhone
==
""
)
{
uni
.
showToast
({
title
:
`请输入游客
${
i
+
1
}
的联系电话`
,
icon
:
"none"
,
});
return
;
}
}
this
.
submit
=
true
;
this
.
userInfo
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
this
.
basedataObj
=
uni
.
getStorageSync
(
"basedata"
).
mall
;
var
CustomerId
=
this
.
basedataObj
.
virtualB2BCustomerId
;
let
newobj
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
GuestList
));
newobj
.
forEach
((
x
)
=>
{
if
(
x
.
IsHightSchool
)
{
x
.
IsHightSchool
=
1
;
}
else
{
x
.
IsHightSchool
=
2
;
}
});
var
ContactName
=
this
.
contactName
;
var
ContactMobile
=
this
.
contactMobile
;
var
CustomerType
=
4
;
var
price
=
this
.
currentPriceInfo
.
b2CPrice
;
let
msg
=
{
OrderId
:
0
,
TCID
:
this
.
currentPriceInfo
.
tcid
,
CustomerType
:
CustomerType
,
GroupType
:
1
,
ContactName
:
ContactName
,
ContactMobile
:
ContactMobile
,
CustomerId
:
CustomerId
,
DepartureCityId
:
262
,
IsIntermodal
:
2
,
Unit_Price
:
price
,
TC_Price
:
price
,
ManNum
:
this
.
orderMsg
.
ManNum
,
ChirdNum
:
this
.
orderMsg
.
ChirdNum
,
ChirdNeedBedNum
:
this
.
orderMsg
.
ChirdNeedBedNum
,
BabyNum
:
this
.
orderMsg
.
BabyNum
,
OldPeopleNum
:
0
,
SingleRoomNum
:
0
,
PreferPrice
:
this
.
price
,
YSeatNum
:
this
.
total
,
ESeatNum
:
0
,
FSeatNum
:
0
,
Commission
:
0
,
//todo 提成
ClientSource
:
2
,
BrandId
:
0
,
TradeWay
:
0
,
PlatformOrder
:
""
,
GuestNum
:
this
.
orderMsg
.
ManNum
+
this
.
orderMsg
.
ChirdNum
+
this
.
orderMsg
.
BabyNum
,
IsChildrenTour
:
this
.
currentPriceInfo
.
isSupportChildren
,
IsBirdDiscount
:
this
.
zaoniao
>
0
?
1
:
2
,
PredictRoomNum
:
1
,
BigRoomNum
:
0
,
TripleRoomNum
:
0
,
TradeDate
:
this
.
currentPriceInfo
.
startDate
,
CostType
:
0
,
MinOrderPrice
:
0
,
Remarks
:
""
,
VisaNum
:
this
.
orderMsg
.
ManNum
+
this
.
orderMsg
.
ChirdNum
,
SafeNum
:
this
.
orderMsg
.
ManNum
+
this
.
orderMsg
.
ChirdNum
,
AirticketNum
:
0
,
ReturnArriveCityId
:
262
,
IsReturnIntermodal
:
2
,
GoCityTime
:
""
,
BackCityTime
:
""
,
ScenicRefundArr
:
[],
CommissionSharePeople
:
0
,
CommissionShareMoney
:
0
,
// #ifdef MP-WEIXIN
OrderSource
:
5
,
// #endif
// #ifdef MP-ALIPAY
OrderSource
:
6
,
// #endif
MiniAppUserId
:
this
.
userInfo
.
UserId
,
Remarks
:
this
.
Remarks
,
//备注
GuestList
:
newobj
,
};
this
.
apipost
(
"sellorder_post_SetOrderInfoForB2B"
,
msg
,
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
let
data
=
res
.
data
;
data
.
CoverImg
=
this
.
currentPriceInfo
.
CoverImg
;
let
myData
=
JSON
.
stringify
(
data
);
this
.
orderData
=
encodeURIComponent
(
myData
);
// #ifdef MP-WEIXIN
this
.
queren
(
data
.
OrderId
);
// #endif
// #ifdef MP-ALIPAY
this
.
querenAli
(
data
);
// #endif
}
else
{
}
);
this
.
submit
=
false
;
},
(
e
)
=>
{
this
.
submit
=
false
;
}
);
},
// #ifdef MP-WEIXIN
//微信支付
...
...
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