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
9bf70ab9
Commit
9bf70ab9
authored
Jun 04, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化线路行程的库存判断
parent
b7388037
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
25 deletions
+70
-25
index.vue
pages/jiuzhai/components/sign/index.vue
+11
-2
index.vue
pages/jiuzhai/components/time/index.vue
+1
-1
jz_LineDetail.vue
pages/jiuzhai/jz_LineDetail.vue
+54
-18
api.js
plugin/api.js
+4
-4
No files found.
pages/jiuzhai/components/sign/index.vue
View file @
9bf70ab9
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
<view
class=
"select-style"
v-if=
"line == end[0] && index == end[1]"
>
最晚
</view>
-->
<view
class=
"select-style"
v-if=
"line == end[0] && index == end[1]"
>
最晚
</view>
-->
<view
style=
"font-size:12px;padding-bottom: 3px;"
v-if=
"priceStauts.length > 0"
>
<view
style=
"font-size:12px;padding-bottom: 3px;"
v-if=
"priceStauts.length > 0"
>
<view
v-if=
"priceStauts[line][index]>0"
>
¥
{{
priceStauts
[
line
][
index
]
}}
</view>
<view
v-if=
"priceStauts[line][index]>0"
>
¥
{{
priceStauts
[
line
][
index
]
}}
</view>
<view
v-if=
"priceStauts[line][index]
<0
"
>
无房
</view>
<view
v-if=
"priceStauts[line][index]
<0
"
>
售罄
</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -258,7 +258,11 @@
...
@@ -258,7 +258,11 @@
let
d
=
(
j
+
1
)
>
9
?(
j
+
1
):
"0"
+
(
j
+
1
)
let
d
=
(
j
+
1
)
>
9
?(
j
+
1
):
"0"
+
(
j
+
1
)
if
(
x
.
startDate
==
`
${
year
}
-
${
m
}
-
${
d
}
`
){
if
(
x
.
startDate
==
`
${
year
}
-
${
m
}
-
${
d
}
`
){
isexsit
=
true
isexsit
=
true
days
.
push
(
this
.
$utils
.
getretailer
()?
x
.
b2BPrice
:
x
.
b2CPrice
)
if
(
x
.
remainNum
>
0
){
days
.
push
(
this
.
$utils
.
getretailer
()?
x
.
b2BPrice
:
x
.
b2CPrice
)
}
else
{
days
.
push
(
-
1
)
}
}
}
})
})
if
(
!
isexsit
){
if
(
!
isexsit
){
...
@@ -364,6 +368,11 @@
...
@@ -364,6 +368,11 @@
title
:
'抱歉,此日期没有行程哦'
,
title
:
'抱歉,此日期没有行程哦'
,
icon
:
'none'
icon
:
'none'
});
});
}
else
if
(
this
.
priceStauts
[
line
][
index
]
==-
1
){
uni
.
showToast
({
title
:
'改团期已售罄'
,
icon
:
'none'
});
}
else
{
}
else
{
this
.
start
=
[
line
,
index
]
this
.
start
=
[
line
,
index
]
}
}
...
...
pages/jiuzhai/components/time/index.vue
View file @
9bf70ab9
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
<view
class=
"select-style"
v-if=
"line == end[0] && index == end[1]"
>
最晚
</view>
<view
class=
"select-style"
v-if=
"line == end[0] && index == end[1]"
>
最晚
</view>
<view
style=
"font-size:12px;padding-bottom: 3px;"
v-if=
"priceStauts.length > 0"
>
<view
style=
"font-size:12px;padding-bottom: 3px;"
v-if=
"priceStauts.length > 0"
>
<view
v-if=
"priceStauts[line][index]>0"
>
¥
{{
priceStauts
[
line
][
index
]
}}
</view>
<view
v-if=
"priceStauts[line][index]>0"
>
¥
{{
priceStauts
[
line
][
index
]
}}
</view>
<view
v-if=
"priceStauts[line][index]
<0
"
>
无房
</view>
<view
v-if=
"priceStauts[line][index]
<0
"
>
售罄
</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
...
pages/jiuzhai/jz_LineDetail.vue
View file @
9bf70ab9
...
@@ -77,11 +77,14 @@
...
@@ -77,11 +77,14 @@
<template
v-for=
"(item,pindex) in dataList.priceList"
>
<template
v-for=
"(item,pindex) in dataList.priceList"
>
<view
class=
"jz_StartList"
v-if=
"pindex
<3
"
:class=
"
{'active':delMsg.tcid==item.tcid}" @click="getDayInfo(item)" :key="pindex">
<view
class=
"jz_StartList"
v-if=
"pindex
<3
"
:class=
"
{'active':delMsg.tcid==item.tcid}" @click="getDayInfo(item)" :key="pindex">
<view
class=
"jz_StartTop"
>
{{
getMonth
(
item
.
startDate
)
}}
</view>
<view
class=
"jz_StartTop"
>
{{
getMonth
(
item
.
startDate
)
}}
</view>
<view
class=
"jz_StartHoubu"
>
<view
class=
"jz_StartHoubu"
v-if=
"item.remainNum>0"
>
<text>
余
</text>
<text>
余
</text>
<text
style=
"font-size: 28rpx;font-weight: 600;"
>
{{
item
.
remainNum
}}
</text>
<text
style=
"font-size: 28rpx;font-weight: 600;"
>
{{
item
.
remainNum
}}
</text>
</view>
</view>
<view
style=
"color:#FF3166;font-size:26rpx;"
>
¥
{{
$utils
.
getretailer
()
==
true
?
item
.
b2BPrice
:
item
.
b2CPrice
}}
</view>
<view
v-if=
"item.remainNum>0"
style=
"color:#FF3166;font-size:26rpx;"
>
¥
{{
$utils
.
getretailer
()
==
true
?
item
.
b2BPrice
:
item
.
b2CPrice
}}
</view>
<view
v-if=
"item.remainNum==0"
style=
"padding: 20rpx 0;"
>
<text
style=
"font-size: 32rpx;font-weight: 600;"
>
已售罄
</text>
</view>
</view>
</view>
</
template
>
</
template
>
<view
class=
"jz_StartList"
v-if=
"dataList.priceList.length>3"
:class=
"{'active':delMsg.tcid==customerDate.tcid}"
@
click=
"openDate"
>
<view
class=
"jz_StartList"
v-if=
"dataList.priceList.length>3"
:class=
"{'active':delMsg.tcid==customerDate.tcid}"
@
click=
"openDate"
>
...
@@ -311,7 +314,7 @@
...
@@ -311,7 +314,7 @@
<img
style=
"width:36rpx;height:38rpx;"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/kefu.png"
alt=
""
/>
<img
style=
"width:36rpx;height:38rpx;"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/kefu.png"
alt=
""
/>
<view
style=
"color:#111111;font-size: 22rpx;"
>
客服
</view>
<view
style=
"color:#111111;font-size: 22rpx;"
>
客服
</view>
</button>
</button>
<view
class=
"jz_OrderNow"
@
click=
"
showOrderPreviwe=true"
>
立即预定
</view>
<view
class=
"jz_OrderNow"
@
click=
"
openOrderPreview"
:class=
"{'disable':finishFirstLoad&&!canCreateOrder}"
>
{{(finishFirstLoad
&&
!canCreateOrder)?'已售罄':'立即预定'}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -327,17 +330,17 @@
...
@@ -327,17 +330,17 @@
<view
class=
"line-flex"
style=
"padding:30rpx;background: #FFF;"
>
<view
class=
"line-flex"
style=
"padding:30rpx;background: #FFF;"
>
<text
style=
"font-size: 28rpx;color:#111;font-weight: 500;"
>
成人
</text>
<text
style=
"font-size: 28rpx;color:#111;font-weight: 500;"
>
成人
</text>
<text
style=
"font-size:22rpx;color:#999;margin-left: 30rpx;flex:1;"
>
18周岁以上
</text>
<text
style=
"font-size:22rpx;color:#999;margin-left: 30rpx;flex:1;"
>
18周岁以上
</text>
<u-number-box
size=
"28"
:min=
"1"
:max=
"currentPrice.
totalSeat
-etCount-etbCount"
@
change=
"crChange"
v-model=
"crCount"
></u-number-box>
<u-number-box
size=
"28"
:min=
"1"
:max=
"currentPrice.
remainNum
-etCount-etbCount"
@
change=
"crChange"
v-model=
"crCount"
></u-number-box>
</view>
</view>
<view
class=
"line-flex"
style=
"padding:30rpx;background: #FFF;"
>
<view
class=
"line-flex"
style=
"padding:30rpx;background: #FFF;"
>
<text
style=
"font-size: 28rpx;color:#111;font-weight: 500;"
>
儿童(占床)
</text>
<text
style=
"font-size: 28rpx;color:#111;font-weight: 500;"
>
儿童(占床)
</text>
<text
style=
"font-size:22rpx;color:#999;margin-left: 30rpx;flex:1;"
>
2-18周岁(不含)
</text>
<text
style=
"font-size:22rpx;color:#999;margin-left: 30rpx;flex:1;"
>
2-18周岁(不含)
</text>
<u-number-box
size=
"28"
:min=
"0"
:max=
"currentPrice.
totalSeat
-crCount-etbCount"
@
change=
"etChange"
v-model=
"etCount"
></u-number-box>
<u-number-box
size=
"28"
:min=
"0"
:max=
"currentPrice.
remainNum
-crCount-etbCount"
@
change=
"etChange"
v-model=
"etCount"
></u-number-box>
</view>
</view>
<view
class=
"line-flex"
style=
"padding:30rpx;background: #FFF;"
>
<view
class=
"line-flex"
style=
"padding:30rpx;background: #FFF;"
>
<text
style=
"font-size: 28rpx;color:#111;font-weight: 500;"
>
儿童(不占床)
</text>
<text
style=
"font-size: 28rpx;color:#111;font-weight: 500;"
>
儿童(不占床)
</text>
<text
style=
"font-size:22rpx;color:#999;margin-left: 30rpx;flex:1;"
>
2-18周岁(不含)
</text>
<text
style=
"font-size:22rpx;color:#999;margin-left: 30rpx;flex:1;"
>
2-18周岁(不含)
</text>
<u-number-box
size=
"28"
:min=
"0"
:max=
"currentPrice.
totalSeat
-crCount-etCount"
@
change=
"etbChange"
v-model=
"etbCount"
></u-number-box>
<u-number-box
size=
"28"
:min=
"0"
:max=
"currentPrice.
remainNum
-crCount-etCount"
@
change=
"etbChange"
v-model=
"etbCount"
></u-number-box>
</view>
</view>
<view
class=
"line-flex"
style=
"padding:30rpx;background: #FFF;"
>
<view
class=
"line-flex"
style=
"padding:30rpx;background: #FFF;"
>
<text
style=
"font-size: 28rpx;color:#111;font-weight: 500;"
>
婴儿
</text>
<text
style=
"font-size: 28rpx;color:#111;font-weight: 500;"
>
婴儿
</text>
...
@@ -347,7 +350,7 @@
...
@@ -347,7 +350,7 @@
</view>
</view>
<view
class=
"jz_OrderDiv"
style=
"box-shadow: none;width: 100%;padding:20rpx;"
>
<view
class=
"jz_OrderDiv"
style=
"box-shadow: none;width: 100%;padding:20rpx;"
>
<view>
<view>
<text
style=
"font-size:24rpx;color:#111;font-weight: 500;"
>
{{currentPrice.startDate}} 出发 余位:{{currentPrice.
totalSeat
}}
</text>
<text
style=
"font-size:24rpx;color:#111;font-weight: 500;"
>
{{currentPrice.startDate}} 出发 余位:{{currentPrice.
remainNum
}}
</text>
</view>
</view>
<view
style=
"display:flex;align-items: center;"
>
<view
style=
"display:flex;align-items: center;"
>
<button
open-type=
"contact"
class=
"jz_ConButton"
>
<button
open-type=
"contact"
class=
"jz_ConButton"
>
...
@@ -397,7 +400,9 @@
...
@@ -397,7 +400,9 @@
mainColor
:
""
,
mainColor
:
""
,
detailContent
:
""
,
detailContent
:
""
,
customerDate
:{},
customerDate
:{},
currentPrice
:{}
currentPrice
:{},
canCreateOrder
:
false
,
finishFirstLoad
:
false
};
};
},
},
created
()
{
created
()
{
...
@@ -424,17 +429,24 @@
...
@@ -424,17 +429,24 @@
},
},
methods
:
{
methods
:
{
openOrderPreview
(){
if
(
this
.
canCreateOrder
&&
this
.
finishFirstLoad
){
this
.
showOrderPreviwe
=
true
}
},
chosenDateResult
(
result
){
chosenDateResult
(
result
){
let
price
=
this
.
dataList
.
priceList
[
result
.
priceObj
]
let
price
=
this
.
dataList
.
priceList
[
result
.
priceObj
]
this
.
currentPrice
=
price
this
.
currentPrice
=
price
if
(
this
.
crCount
+
this
.
etCount
+
this
.
etbCount
>=
this
.
currentPrice
.
totalSeat
){
if
(
this
.
crCount
+
this
.
etCount
+
this
.
etbCount
>=
this
.
currentPrice
.
remainNum
){
this
.
crCount
=
1
this
.
crCount
=
1
this
.
etCount
=
0
this
.
etCount
=
0
this
.
etbCount
=
0
this
.
etbCount
=
0
}
}
this
.
delMsg
.
tcid
=
price
.
tcid
this
.
delMsg
.
tcid
=
price
.
tcid
this
.
delMsg
.
configId
=
price
.
configID
;
this
.
delMsg
.
configId
=
price
.
configID
;
this
.
getDetails
();
if
(
!
showOrderPreviwe
){
this
.
getDetails
()
}
if
(
result
.
priceObj
>
2
){
if
(
result
.
priceObj
>
2
){
this
.
customerDate
=
price
this
.
customerDate
=
price
}
}
...
@@ -476,8 +488,11 @@
...
@@ -476,8 +488,11 @@
this
.
delMsg
,
this
.
delMsg
,
res
=>
{
res
=>
{
console
.
log
(
res
,
'详情'
);
console
.
log
(
res
,
'详情'
);
if
(
res
.
resultCode
==
1
)
{
if
(
res
.
resultCode
==
1
)
{
res
.
data
.
tempImgCover
=
JSON
.
parse
(
res
.
data
.
imgCover
)
res
.
data
.
tempImgCover
=
JSON
.
parse
(
res
.
data
.
imgCover
)
// let tempPrice= res.data.priceList.filter(x=>x.remainNum>0)
// res.data.priceList=tempPrice
this
.
dataList
=
res
.
data
;
this
.
dataList
=
res
.
data
;
this
.
scenicNum
=
0
;
this
.
scenicNum
=
0
;
this
.
dataList
.
dayList
.
forEach
(
x
=>
{
this
.
dataList
.
dayList
.
forEach
(
x
=>
{
...
@@ -497,11 +512,21 @@
...
@@ -497,11 +512,21 @@
})
})
})
})
this
.
currentPrice
=
this
.
dataList
.
currentPriceInfo
this
.
currentPrice
=
this
.
dataList
.
currentPriceInfo
if
(
this
.
currentPrice
.
remainNum
==
0
){
let
temp
=
this
.
dataList
.
priceList
.
find
(
x
=>
x
.
remainNum
>
0
)
if
(
temp
){
this
.
getDayInfo
(
temp
)
}
}
this
.
dataList
.
priceList
.
forEach
(
x
=>
{
this
.
dataList
.
priceList
.
forEach
(
x
=>
{
if
(
x
.
tcid
==
this
.
delMsg
.
tcid
){
if
(
x
.
tcid
==
this
.
delMsg
.
tcid
){
this
.
delMsg
.
tcnum
=
x
.
tcnum
this
.
delMsg
.
tcnum
=
x
.
tcnum
}
}
if
(
x
.
remainNum
>
0
){
this
.
canCreateOrder
=
true
}
})
})
this
.
finishFirstLoad
=
true
}
else
{
}
else
{
}
}
...
@@ -538,15 +563,22 @@
...
@@ -538,15 +563,22 @@
},
},
//点击切换
//点击切换
getDayInfo
(
item
){
getDayInfo
(
item
){
if
(
this
.
crCount
+
this
.
etCount
+
this
.
etbCount
>=
this
.
currentPrice
.
totalSeat
){
if
(
item
.
remainNum
>
0
){
this
.
crCount
=
1
if
(
this
.
crCount
+
this
.
etCount
+
this
.
etbCount
>=
this
.
currentPrice
.
remainNum
){
this
.
etCount
=
0
this
.
crCount
=
1
this
.
etbCount
=
0
this
.
etCount
=
0
this
.
etbCount
=
0
}
this
.
delMsg
.
tcid
=
item
.
tcid
;
this
.
delMsg
.
configId
=
item
.
configID
;
this
.
currentPrice
=
item
this
.
getDetails
();
}
else
{
uni
.
showToast
({
title
:
"该团期已售罄"
,
icon
:
"none"
})
}
}
this
.
delMsg
.
tcid
=
item
.
tcid
;
this
.
delMsg
.
configId
=
item
.
configID
;
this
.
currentPrice
=
item
this
.
getDetails
();
},
},
openDate
(){
openDate
(){
if
(
this
.
customerDate
.
tcid
){
if
(
this
.
customerDate
.
tcid
){
...
@@ -1108,6 +1140,10 @@
...
@@ -1108,6 +1140,10 @@
font-size
:
28
rpx
;
font-size
:
28
rpx
;
border-radius
:
16
rpx
;
border-radius
:
16
rpx
;
}
}
.jz_OrderNow.disable
{
background-color
:
#ecf1f4
;
color
:
#111
}
.jz_ConButton
{
.jz_ConButton
{
background-color
:
#fff
;
background-color
:
#fff
;
height
:
40px
;
height
:
40px
;
...
...
plugin/api.js
View file @
9bf70ab9
...
@@ -2,10 +2,10 @@ export default {
...
@@ -2,10 +2,10 @@ export default {
install
(
Vue
,
options
)
{
install
(
Vue
,
options
)
{
Vue
.
prototype
.
host
=
"https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
Vue
.
prototype
.
host
=
"https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
Vue
.
prototype
.
host2
=
"http://192.168.20.24:8400"
//
Vue.prototype.host2 = "http://192.168.20.24:8400"
//
Vue.prototype.host2 = "https://erpmallapi.oytour.com"
Vue
.
prototype
.
host2
=
"https://erpmallapi.oytour.com"
Vue
.
prototype
.
host3
=
"http://192.168.20.24"
//
Vue.prototype.host3 = "http://192.168.20.24"
//
Vue.prototype.host3 = "https://reborn.oytour.com"
Vue
.
prototype
.
host3
=
"https://reborn.oytour.com"
Vue
.
prototype
.
request
=
function
(
param
,
success
,
failed
)
{
Vue
.
prototype
.
request
=
function
(
param
,
success
,
failed
)
{
//网络请求
//网络请求
...
...
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