|
|
|
|
@ -55,7 +55,7 @@ |
|
|
|
|
<view class="form_item"> |
|
|
|
|
<view class="form_item_label">航线:</view> |
|
|
|
|
<view class="form_item_input picker"> |
|
|
|
|
<picker :value="routeIndex" :range="shipRouteList" range-key="route" @change="e => changeRoute(e, index)"> |
|
|
|
|
<picker :value="item.routeIndex" :range="shipRouteList" range-key="route" @change="e => changeRoute(e, index)"> |
|
|
|
|
<text class="picker_select" |
|
|
|
|
:style="item.route?'color:#333;':''">{{item.route?item.route:'请选择'}}</text> |
|
|
|
|
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons> |
|
|
|
|
@ -65,7 +65,7 @@ |
|
|
|
|
<view class="form_item"> |
|
|
|
|
<view class="form_item_label">航次:</view> |
|
|
|
|
<view class="form_item_input picker"> |
|
|
|
|
<picker :value="voyageIndex" :range="item.routeIndex ? shipRouteList[item.routeIndex].voyageInfoVOList : []" range-key="voyageCode" @change="e => changeVoyage(e, index)"> |
|
|
|
|
<picker :value="item.voyageIndex" :range="item.routeIndex > -1 ? shipRouteList[item.routeIndex].voyageInfoVOList : []" range-key="voyageCode" @change="e => changeVoyage(e, index)"> |
|
|
|
|
<text class="picker_select" |
|
|
|
|
:style="item.voyage?'color:#333;':''">{{item.voyage?item.voyage:'请选择'}}</text> |
|
|
|
|
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons> |
|
|
|
|
@ -121,7 +121,7 @@ |
|
|
|
|
<view class="form_item"> |
|
|
|
|
<view class="form_item_label">航线:</view> |
|
|
|
|
<view class="form_item_input picker"> |
|
|
|
|
<picker :value="routeIndex" :range="internationalRouteList" range-key="route" @change="e => changeRoute(e, index)"> |
|
|
|
|
<picker :value="item.routeIndex" :range="internationalRouteList" range-key="route" @change="e => changeRoute(e, index)"> |
|
|
|
|
<text class="picker_select" |
|
|
|
|
:style="item.route?'color:#333;':''">{{item.route?item.route:'请选择'}}</text> |
|
|
|
|
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons> |
|
|
|
|
@ -131,7 +131,7 @@ |
|
|
|
|
<view class="form_item"> |
|
|
|
|
<view class="form_item_label">航次:</view> |
|
|
|
|
<view class="form_item_input picker"> |
|
|
|
|
<picker :value="voyageIndex" :range="item.routeIndex ? internationalRouteList[item.routeIndex].voyageInfoVOList : []" range-key="voyageCode" @change="e => changeVoyage(e, index)"> |
|
|
|
|
<picker :value="item.voyageIndex" :range="item.routeIndex > -1 ? internationalRouteList[item.routeIndex].voyageInfoVOList : []" range-key="voyageCode" @change="e => changeVoyage(e, index)"> |
|
|
|
|
<text class="picker_select" |
|
|
|
|
:style="item.voyage?'color:#333;':''">{{item.voyage?item.voyage:'请选择'}}</text> |
|
|
|
|
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons> |
|
|
|
|
@ -256,7 +256,6 @@ |
|
|
|
|
this.$request(getApp().globalData.baseUrl + '/api/biz/internationalPassengerTransportPermissions/findList', {}, "GET").then(res => { |
|
|
|
|
this.shipRouteList = res.data['客班轮']; |
|
|
|
|
this.internationalRouteList = res.data['国际邮轮']; |
|
|
|
|
console.log(this.shipRouteList) |
|
|
|
|
this.form.passengerShipDTOList.map(item => { |
|
|
|
|
let idx = this.shipRouteList.findIndex(item2 => item2.route == item.route); |
|
|
|
|
item.routeIndex = idx > -1 ? idx : ''; |
|
|
|
|
@ -266,13 +265,14 @@ |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
this.form.internationalCruiseDTOList.map(item => { |
|
|
|
|
let idx = this.shipRouteList.findIndex(item2 => item2.route == item.route); |
|
|
|
|
let idx = this.internationalRouteList.findIndex(item2 => item2.route == item.route); |
|
|
|
|
item.routeIndex = idx > -1 ? idx : ''; |
|
|
|
|
if(idx > -1) { |
|
|
|
|
let _idx = this.shipRouteList[idx].voyageInfoVOList.findIndex(item2 => item2.voyageCode == item.voyage); |
|
|
|
|
let _idx = this.internationalRouteList[idx].voyageInfoVOList.findIndex(item2 => item2.voyageCode == item.voyage); |
|
|
|
|
item.voyageIndex = _idx > -1 ? _idx : ''; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
console.log(this.form) |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
//切换管理单位 |
|
|
|
|
@ -367,13 +367,19 @@ |
|
|
|
|
//航线选择 |
|
|
|
|
changeRoute(e, index) { |
|
|
|
|
if(this.tabType == 1) { |
|
|
|
|
//客班轮 |
|
|
|
|
//客班轮 |
|
|
|
|
this.form.passengerShipDTOList[index].voyageIndex = this.form.passengerShipDTOList[index].routeIndex != e.detail.value ? '' : this.form.passengerShipDTOList[index].voyageIndex; |
|
|
|
|
this.form.passengerShipDTOList[index].voyage = this.form.passengerShipDTOList[index].routeIndex != e.detail.value ? '' : this.form.passengerShipDTOList[index].voyage; |
|
|
|
|
this.form.passengerShipDTOList[index].routeIndex = e.detail.value; |
|
|
|
|
this.form.passengerShipDTOList[index].route = this.shipRouteList[e.detail.value].route; |
|
|
|
|
this.form.passengerShipDTOList[index].route = this.shipRouteList[e.detail.value].route; |
|
|
|
|
this.form.passengerShipDTOList[index].direction = this.shipRouteList[e.detail.value].direction; |
|
|
|
|
}else{ |
|
|
|
|
//国际邮轮 |
|
|
|
|
//国际邮轮 |
|
|
|
|
this.form.internationalCruiseDTOList[index].voyageIndex = this.form.internationalCruiseDTOList[index].routeIndex != e.detail.value ? '' : this.form.internationalCruiseDTOList[index].voyageIndex; |
|
|
|
|
this.form.internationalCruiseDTOList[index].voyage = this.form.internationalCruiseDTOList[index].routeIndex != e.detail.value ? '' : this.form.internationalCruiseDTOList[index].voyage; |
|
|
|
|
this.form.internationalCruiseDTOList[index].routeIndex = e.detail.value; |
|
|
|
|
this.form.internationalCruiseDTOList[index].route = this.internationalRouteList[e.detail.value].route; |
|
|
|
|
this.form.internationalCruiseDTOList[index].route = this.internationalRouteList[e.detail.value].route; |
|
|
|
|
this.form.internationalCruiseDTOList[index].direction = this.internationalRouteList[e.detail.value].direction; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//航次选择 |
|
|
|
|
@ -383,7 +389,7 @@ |
|
|
|
|
//判断是否重复选择 |
|
|
|
|
let routeIndex = this.form.passengerShipDTOList[index].routeIndex; |
|
|
|
|
let idx = this.form.passengerShipDTOList.findIndex(item => item.voyageIndex == e.detail.value); |
|
|
|
|
if (idx > -1 && this.form.passengerShipDTOList[index].voyageIndex != idx) { |
|
|
|
|
if (idx > -1 && this.form.passengerShipDTOList[index].voyageIndex != idx+'') { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '客班轮航次不能重复选择', |
|
|
|
|
icon: 'none' |
|
|
|
|
@ -398,15 +404,18 @@ |
|
|
|
|
//判断是否重复选择 |
|
|
|
|
let routeIndex = this.form.internationalCruiseDTOList[index].routeIndex; |
|
|
|
|
let idx = this.form.internationalCruiseDTOList.findIndex(item => item.voyageIndex == e.detail.value); |
|
|
|
|
if (idx > -1 && this.form.internationalCruiseDTOList[index].voyageIndex != idx) { |
|
|
|
|
if (idx > -1 && this.form.internationalCruiseDTOList[index].voyageIndex != idx+'') { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '国际邮轮航次不能重复选择', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
this.form.internationalCruiseDTOList[index].voyageIndex = e.detail.value; |
|
|
|
|
this.form.internationalCruiseDTOList[index].voyage = this.internationalRouteList[routeIndex].voyageInfoVOList[e.detail.value].voyageCode; |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
this.form.internationalCruiseDTOList[index].voyageIndex = e.detail.value; |
|
|
|
|
this.form.internationalCruiseDTOList[index].voyage = this.internationalRouteList[routeIndex].voyageInfoVOList[e.detail.value].voyageCode; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
console.log('航次选择',this.form) |
|
|
|
|
}, |
|
|
|
|
//统计时段切换选择 |
|
|
|
|
changeStatPeriod(e) { |
|
|
|
|
@ -429,7 +438,7 @@ |
|
|
|
|
if (this.pageType == 'add') { |
|
|
|
|
let now = new Date(); |
|
|
|
|
//11:00-13:30 默认选择0-12 |
|
|
|
|
let dateStr = getDateStr(now, 0); |
|
|
|
|
let dateStr = getDateStr(now, 0).replaceAll('-','/'); |
|
|
|
|
if (new Date(dateStr + ' 11:00').getTime() < new Date().getTime() && new Date().getTime() < |
|
|
|
|
new Date(dateStr + |
|
|
|
|
' 13:30').getTime()) { |
|
|
|
|
|