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
391066a7
Commit
391066a7
authored
Apr 21, 2025
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
酒店接口调整
parent
9c77d820
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1055 additions
and
986 deletions
+1055
-986
AggregateOrdersList.vue
pages/AggregateOrders/AggregateOrdersList.vue
+103
-95
AggregateOrdersSearch.vue
pages/AggregateOrders/AggregateOrdersSearch.vue
+155
-136
header.vue
pages/AggregateOrders/components/header.vue
+232
-214
orders.vue
pages/AggregateOrders/components/orders.vue
+490
-466
hotelRoom.vue
pages/hotel/components/hotelRoom.vue
+3
-3
order.vue
pages/hotel/order.vue
+7
-13
producttypeenum.js
utils/producttypeenum.js
+65
-59
No files found.
pages/AggregateOrders/AggregateOrdersList.vue
View file @
391066a7
<
style
lang=
"scss"
scoped
>
@import
url("@/asset/css/flex.css")
;
.AggOrdBox
{
.AggOrdBox
{
height
:
100vh
;
background
:
url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638772246864278108.jpg')
no-repeat
#F3F1EF
;
background-size
:
100%
240rpx
;
.AggOrdHeader
{
.AggOrdHeader
{
padding-bottom
:
20rpx
;
// background: url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638772246864278108.jpg')no-repeat;
// background-size: 100% 100%;
}
.AggOrdStatus
{
.AggOrdStatus
{
padding-top
:
20rpx
;
.AggOrdT
{
.AggOrdT
{
width
:
25%
;
padding
:
10rpx
20rpx
;
font-size
:
28rpx
;
color
:
#080A09
;
position
:
relative
;
}
.AggOrdT.active
{
.AggOrdT.active
{
color
:
#B99846
;
font-weight
:
bold
;
}
.AggOrdT
text
{
.AggOrdT
text
{
display
:
block
;
text-align
:
center
;
}
.AggOrdT
view
{
.AggOrdT
view
{
position
:
absolute
;
left
:
0
;
right
:
0
;
bottom
:
0
;
}
.AggOrdT
view
view
{
.AggOrdT
view
view
{
width
:
60rpx
;
height
:
10rpx
;
margin
:
auto
;
...
...
@@ -40,106 +48,103 @@
border-radius
:
10rpx
;
}
}
}
/
deep
/
.showModalInfo
.u-drawer-bottom
{
background-color
:
rgba
(
23
,
23
,
23
,
0
)
!
important
;
}
/
deep
/
.showModalInfo
.u-drawer-bottom
{
background-color
:
rgba
(
23
,
23
,
23
,
0
)
!
important
;
}
</
style
>
<
template
>
<view
class=
"AggOrdBox column"
>
<view
class=
"AggOrdHeader"
:style=
"[titleStyle]"
>
<AggOrdHeader
:title=
"pageTitle"
@
change=
"getOrderType"
:params=
"msg"
></AggOrdHeader>
<AggOrdHeader
:title=
"pageTitle"
@
change=
"getOrderType"
:params=
"msg"
></AggOrdHeader>
<view
class=
"AggOrdStatus row items-center"
>
<template>
<view
class=
"AggOrdT"
v-for=
"(item,index) in statusList"
:key=
"index"
:class=
"[msg.OrderStatus==item.ID?'active':'']"
@
click=
"getStatus(item.ID)"
>
<view
class=
"AggOrdT"
v-for=
"(item,index) in statusList"
:key=
"index"
:class=
"[msg.OrderStatus==item.ID?'active':'']"
@
click=
"getStatus(item.ID)"
>
<text>
{{
item
.
Name
}}
</text>
</view>
</
template
>
</view>
</view>
<view
class=
"col"
style=
"height: 1px;flex: 1;overflow: hidden;padding-top: 10rpx;"
>
<scroll-view
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
style=
"height: 100%;"
>
<orders
:orders=
"g"
@
research=
"research"
></orders>
<u-empty
v-if=
"g.length==0"
text=
"暂无数据"
mode=
"data"
padding-top=
"20"
></u-empty>
<u-loadmore
v-else
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"#F3F1EF"
/>
<view
style=
"width: 100%;height: 20rpx;"
></view>
<view
class=
"col"
style=
"height: 1px;flex: 1;overflow: hidden;padding-top: 10rpx;"
>
<scroll-view
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
style=
"height: 100%;"
>
<orders
:orders=
"g"
@
research=
"research"
></orders>
<u-empty
v-if=
"g.length==0"
text=
"暂无数据"
mode=
"data"
padding-top=
"20"
></u-empty>
<u-loadmore
v-else
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"#F3F1EF"
/>
<view
style=
"width: 100%;height: 20rpx;"
></view>
</scroll-view>
</view>
</view>
</view>
</template>
<
script
>
import
{
mappingListType
,
mappingListTypeTy
}
from
"../../utils/producttypeenum"
;
import
{
mappingListType
,
mappingListTypeTy
}
from
"../../utils/producttypeenum"
;
import
EnumHelper
from
'../../utils/enumhelper'
;
import
OrderStatusEnum
from
'../../utils/orderStautsEnum'
;
import
AggOrdHeader
from
"./components/header.vue"
;
import
orders
from
"./components/orders.vue"
;
export
default
{
components
:
{
export
default
{
components
:
{
AggOrdHeader
,
orders
,
},
data
()
{
return
{
data
()
{
return
{
pageTitle
:
'所有订单'
,
msg
:{
pageSize
:
10
,
pageIndex
:
1
,
msg
:
{
pageSize
:
10
,
pageIndex
:
1
,
OrderStatus
:
0
,
GoodsName
:
''
,
OrderTypeStr
:
''
},
loadText
:
{
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
nomore
:
"没有更多了"
,
},
status
:
"loadmore"
,
showModal
:
false
,
barshow
:
0
,
statusList
:
[],
g
:
[],
page_count
:
1
,
index
:
0
,
payindex
:
0
,
status
:
"loadmore"
,
showModal
:
false
,
barshow
:
0
,
statusList
:
[],
g
:
[],
page_count
:
1
,
index
:
0
,
payindex
:
0
,
showAuth
:
false
,
titleStyle
:{},
}
},
onLoad
(
options
)
{
if
(
options
.
OrderTypeStr
)
this
.
msg
.
OrderTypeStr
=
options
.
OrderTypeStr
if
(
options
.
OrderStatus
)
this
.
msg
.
OrderStatus
=
options
.
OrderStatus
titleStyle
:
{},
}
},
onLoad
(
options
)
{
if
(
options
.
OrderTypeStr
)
this
.
msg
.
OrderTypeStr
=
options
.
OrderTypeStr
if
(
options
.
OrderStatus
)
this
.
msg
.
OrderStatus
=
options
.
OrderStatus
this
.
research
()
},
created
()
{
},
created
()
{
const
that
=
this
uni
.
getSystemInfo
({
success
(
res
)
{
that
.
titleStyle
=
{
paddingTop
:
`
${
res
.
statusBarHeight
}
px`
};
},
});
uni
.
getSystemInfo
({
success
(
res
)
{
that
.
titleStyle
=
{
paddingTop
:
`
${
res
.
statusBarHeight
}
px`
};
},
});
this
.
getOrderEnums
()
},
methods
:{
getStatus
(
ID
){
this
.
msg
.
OrderStatus
=
ID
},
methods
:
{
getStatus
(
ID
)
{
this
.
msg
.
OrderStatus
=
ID
this
.
research
()
},
research
(
status
){
if
(
status
)
this
.
msg
.
OrderStatus
=
status
;
research
(
status
)
{
if
(
status
)
this
.
msg
.
OrderStatus
=
status
;
this
.
msg
.
pageIndex
=
1
;
this
.
msg
.
pageSize
=
10
;
this
.
status
=
"loadmore"
;
...
...
@@ -147,35 +152,36 @@
this
.
g
=
[];
this
.
init
()
},
getOrderType
(
item
){
getOrderType
(
item
)
{
this
.
msg
.
OrderTypeStr
=
item
.
Id
this
.
pageTitle
=
item
.
Name
this
.
research
()
},
init
()
{
init
()
{
uni
.
showLoading
({
title
:
'加载中...'
})
// #ifdef MP-DI
this
.
OrderPageZK
();
this
.
OrderPageZK
();
// #endif
// #ifdef MP-AG
this
.
OrderPageTY
();
this
.
OrderPageTY
();
// #endif
},
OrderPageTY
(){
this
.
apipost
(
'b2b_get_GetB2BAllOrderPageList'
,
this
.
msg
,
OrderPageTY
()
{
this
.
apipost
(
'b2b_get_GetB2BAllOrderPageList'
,
this
.
msg
,
res
=>
{
if
(
res
.
resultCode
==
1
)
{
uni
.
hideLoading
()
res
.
data
.
pageData
.
forEach
(
x
=>
{
res
.
data
.
pageData
.
forEach
(
x
=>
{
// #ifdef MP-DI
x
.
goodTypeEnum
=
mappingListType
(
x
.
goodsType
)
// #endif
// #ifdef MP-AG
x
.
goodTypeEnum
=
mappingListTypeTy
(
x
.
goodsType
)
// #endif
x
.
orderStatusInfo
=
EnumHelper
.
ParseToEnum
(
OrderStatusEnum
,
x
.
orderStatus
,
'value'
)
x
.
orderStatusInfo
=
EnumHelper
.
ParseToEnum
(
OrderStatusEnum
,
x
.
orderStatus
,
'value'
)
})
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
pageCount
;
...
...
@@ -189,14 +195,15 @@
}
);
},
OrderPageZK
(){
this
.
apipost
(
'GetMyDirectOrderPageList_post'
,
this
.
msg
,
OrderPageZK
()
{
this
.
apipost
(
'GetMyDirectOrderPageList_post'
,
this
.
msg
,
res
=>
{
if
(
res
.
resultCode
==
1
)
{
uni
.
hideLoading
()
res
.
data
.
pageData
.
forEach
(
x
=>
{
res
.
data
.
pageData
.
forEach
(
x
=>
{
x
.
goodTypeEnum
=
mappingListType
(
x
.
goodsType
)
x
.
orderStatusInfo
=
EnumHelper
.
ParseToEnum
(
OrderStatusEnum
,
x
.
orderStatus
,
'value'
)
x
.
orderStatusInfo
=
EnumHelper
.
ParseToEnum
(
OrderStatusEnum
,
x
.
orderStatus
,
'value'
)
})
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
pageCount
;
...
...
@@ -210,7 +217,7 @@
}
);
},
lower
(
e
)
{
lower
(
e
)
{
if
(
this
.
msg
.
pageIndex
<
this
.
page_count
)
{
this
.
msg
.
pageIndex
++
;
this
.
status
=
"loading"
;
...
...
@@ -219,25 +226,27 @@
this
.
status
=
"nomore"
;
}
},
getOrderEnums
()
{
getOrderEnums
()
{
this
.
apipost
(
"GetDirectOrderStatusEnum_post"
,
{},
"GetDirectOrderStatusEnum_post"
,
{},
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
// #ifdef MP-DI
this
.
statusList
=
res
.
data
.
filter
(
x
=>
x
.
ID
!=
4
);
this
.
statusList
=
res
.
data
.
filter
(
x
=>
x
.
ID
!=
4
);
// #endif
// #ifdef MP-AG
this
.
statusList
=
res
.
data
.
filter
(
x
=>
x
.
ID
!=
5
);
this
.
statusList
=
res
.
data
.
filter
(
x
=>
x
.
ID
!=
5
);
// #endif
this
.
statusList
.
splice
(
0
,
0
,{
ID
:
0
,
Name
:
'全部'
})
this
.
statusList
.
forEach
(
x
=>
{
if
(
x
.
Name
==
'已付款'
)
x
.
Name
=
'待出行'
this
.
statusList
.
splice
(
0
,
0
,
{
ID
:
0
,
Name
:
'全部'
})
this
.
statusList
.
forEach
(
x
=>
{
if
(
x
.
Name
==
'已付款'
)
x
.
Name
=
'待出行'
})
}
},
err
=>
{
err
=>
{
uni
.
showToast
({
title
:
err
.
message
,
icon
:
"none"
,
...
...
@@ -245,7 +254,6 @@
}
);
},
},
}
</
script
>
},
}
</
script
>
\ No newline at end of file
pages/AggregateOrders/AggregateOrdersSearch.vue
View file @
391066a7
This diff is collapsed.
Click to expand it.
pages/AggregateOrders/components/header.vue
View file @
391066a7
This diff is collapsed.
Click to expand it.
pages/AggregateOrders/components/orders.vue
View file @
391066a7
This diff is collapsed.
Click to expand it.
pages/hotel/components/hotelRoom.vue
View file @
391066a7
...
...
@@ -300,10 +300,10 @@
}
if
(
this
.
HotelInfo
)
{
if
(
this
.
HotelInfo
.
images
&&
this
.
HotelInfo
.
images
.
length
>
0
)
{
//pHotel.images = this.HotelInfo.images
;
pHotel
.
images
.
push
(
this
.
HotelInfo
.
images
[
0
].
url
)
;
}
if
(
this
.
HotelInfo
.
address
)
{
pHotel
.
address
=
this
.
HotelInfo
.
address
;
if
(
this
.
HotelInfo
.
location
&&
this
.
HotelInfo
.
location
.
address
)
{
pHotel
.
address
=
this
.
HotelInfo
.
location
.
address
;
}
}
console
.
log
(
"hotelRoom"
,
pHotel
);
...
...
pages/hotel/order.vue
View file @
391066a7
...
...
@@ -350,15 +350,16 @@
}
,
onLoad
(
options
)
{
this
.
customer
=
uni
.
getStorageSync
(
"b2b_user"
)
console
.
log
(
"hotel_order"
,
options
);
if
(
options
.
searchObj
)
{
this
.
searchObj
=
JSON
.
parse
(
options
.
searchObj
)
}
if
(
options
.
HotelInfo
)
{
this
.
HotelInfo
=
JSON
.
parse
(
options
.
HotelInfo
)
console
.
log
(
"hotel_order_hotelInfo"
,
this
.
HotelInfo
)
this
.
orderMsg
.
hotelId
=
this
.
HotelInfo
.
hotelid
;
this
.
orderMsg
.
HotelName
=
this
.
HotelInfo
.
name
this
.
orderMsg
.
HotelName
=
this
.
HotelInfo
.
name
;
if
(
this
.
HotelInfo
.
images
&&
this
.
HotelInfo
.
images
.
length
>
0
)
{
this
.
orderMsg
.
HotelPic
=
this
.
HotelInfo
.
images
[
0
];
}
}
if
(
options
.
RoomInfo
)
{
this
.
RoomInfo
=
JSON
.
parse
(
options
.
RoomInfo
)
...
...
@@ -370,8 +371,6 @@
this
.
CreateBy
=
options
.
CreateBy
}
this
.
orderMsg
.
ProductId
=
this
.
RoomInfo
.
RoomTypeID
;
console
.
log
(
"hotel_order_this.searchObj"
,
this
.
searchObj
)
console
.
log
(
"hotel_order_this.RoomInfo"
,
this
.
RoomInfo
)
this
.
orderMsg
.
RatePlanID
=
this
.
RoomInfo
.
RatePlanID
this
.
orderMsg
.
CheckInDate
=
this
.
dayObj
.
start
;
this
.
orderMsg
.
CheckOutDate
=
this
.
dayObj
.
end
;
...
...
@@ -428,7 +427,8 @@
Name
:
this
.
customer
.
name
,
ContactNumber
:
this
.
orderMsg
.
guestPhoneNumber
,
Mailbox
:
this
.
orderMsg
.
guestEmail
,
GoodsId
:
this
.
orderMsg
.
RatePlanID
,
//GoodsId: this.orderMsg.RatePlanID,
GoodsId
:
this
.
HotelInfo
.
hotelId
,
GoodsName
:
this
.
HotelInfo
.
name
,
GoodsPic
:
""
,
GoodsType
:
9
,
...
...
@@ -480,7 +480,6 @@
signType
:
this
.
orderInfo
.
signType
,
paySign
:
this
.
orderInfo
.
sign
,
success
:
function
(
res
)
{
console
.
log
(
"success"
,
res
);
that
.
submit
=
false
;
uni
.
showToast
({
title
:
"支付成功"
,
...
...
@@ -495,7 +494,6 @@
}
,
100
);
}
,
fail
:
function
(
err
)
{
console
.
log
(
"fail:"
,
err
);
that
.
submit
=
true
;
uni
.
showToast
({
title
:
"支付失败"
,
...
...
@@ -667,9 +665,6 @@
}
,
changeDown
(
e
)
{
let
i
=
[
e
]
// this.customer.count = this.countrys[i].ID
// this.optionsTitle[0] = this.countrys[i].Name
// this.customer.PhoneCountryStr = '+'+this.countrys[i].PhoneCode
}
,
editNum
(
type
)
{
if
(
type
==
1
)
{
...
...
@@ -783,10 +778,9 @@
icon
:
'none'
}
)
uni
.
redirectTo
({
url
:
`/pages/AggregateOrders/AggregateOrdersList?OrderTypeStr=
3
`
,
url
:
`/pages/AggregateOrders/AggregateOrdersList?OrderTypeStr=
7
`
,
}
);
// #endif
console
.
log
(
res
,
'-------酒店erp下单成功'
)
}
}
);
...
...
utils/producttypeenum.js
View file @
391066a7
import
EnumHelper
from
"./enumhelper.js"
import
ListProductTypeEnum
from
"./listProductType.js"
const
ProductTypeEnum
=
[
{
value
:
1
,
desc
:
'机票产品'
},
/**
* 线路
*/
{
value
:
2
,
desc
:
'线路产品'
},
const
ProductTypeEnum
=
[{
value
:
1
,
desc
:
'机票产品'
},
/**
* 线路
*/
{
value
:
2
,
desc
:
'线路产品'
},
/**
* 酒店
*/
{
value
:
3
,
desc
:
'酒店产品'
},
/**
* 酒店
*/
{
value
:
3
,
desc
:
'酒店产品'
},
/**
* 景点门票
*/
{
value
:
4
,
desc
:
'景点门票产品'
},
/**
* 包车
*/
{
value
:
5
,
desc
:
'包车产品'
},
{
value
:
6
,
desc
:
'签证产品'
},
/**
* 景点门票
*/
{
value
:
4
,
desc
:
'景点门票产品'
},
/**
* 包车
*/
{
value
:
5
,
desc
:
'包车产品'
},
{
value
:
6
,
desc
:
'签证产品'
},
{
value
:
7
,
desc
:
'酒店产品'
},
]
const
mappingRules
=
[
[
-
1
],
[
1
,
2
,
3
],
[
4
,
5
,
6
,
7
],
[
-
1
],
[
12
,
13
,
14
],
[
8
,
9
,
10
,
11
],
[
15
],
[
16
]
[
-
1
],
[
1
,
2
,
3
],
[
4
,
5
,
6
,
7
],
[
-
1
],
[
12
,
13
,
14
],
[
8
,
9
,
10
,
11
],
[
15
],
[
16
]
]
const
mappingListType
=
(
value
)
=>
{
let
val
=
mappingRules
.
findIndex
(
x
=>
{
return
x
.
indexOf
(
value
)
!=
-
1
})
let
val
=
mappingRules
.
findIndex
(
x
=>
{
return
x
.
indexOf
(
value
)
!=
-
1
})
if
(
val
&&
val
>
0
)
{
return
EnumHelper
.
ParseToEnum
(
ListProductTypeEnum
,
val
,
'value'
)
}
return
{}
if
(
val
&&
val
>
0
)
{
return
EnumHelper
.
ParseToEnum
(
ListProductTypeEnum
,
val
,
'value'
)
}
return
{}
}
const
mappingListTypeTy
=
(
type
)
=>
{
let
val
=
ProductTypeEnum
.
findIndex
(
x
=>
{
return
x
.
value
==
Number
(
type
)
})
return
ProductTypeEnum
[
val
]
let
val
=
ProductTypeEnum
.
findIndex
(
x
=>
{
return
x
.
value
==
Number
(
type
)
})
return
ProductTypeEnum
[
val
]
}
const
transProductEnum
=
(
value
)
=>
{
return
mappingRules
[
value
]
return
mappingRules
[
value
]
}
export
default
ProductTypeEnum
export
{
mappingListType
,
transProductEnum
,
mappingListTypeTy
}
\ No newline at end of file
export
{
mappingListType
,
transProductEnum
,
mappingListTypeTy
}
\ No newline at end of file
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