|
|
|
|
@ -73,7 +73,7 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form_item"> |
|
|
|
|
<view class="form_item_label">{{item.direction == 1 ? '入青' : item.direction == 2 ? '出青' : ''}}旅客人数:</view> |
|
|
|
|
<view class="form_item_label">{{item.direction == '1' ? '入青' : item.direction == '2' ? '出青' : ''}}旅客人数:</view> |
|
|
|
|
<view class="form_item_input form_input"> |
|
|
|
|
<uni-easyinput @blur="calcYoyMom(1,index)" @clear="calcYoyMom(1,index)" v-model="item.passengerCount" type="number" |
|
|
|
|
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20"> |
|
|
|
|
@ -86,7 +86,7 @@ |
|
|
|
|
<view class="rate_item"> |
|
|
|
|
<view class="rate_item_label" |
|
|
|
|
:style="item.passengerDod === 0 ? 'color: #EB4747' : ''"> |
|
|
|
|
{{item.direction == 1 ? '入青' : item.direction == 2 ? '出青' : ''}}旅客人数环比</view> |
|
|
|
|
{{item.direction == '1' ? '入青' : item.direction == '2' ? '出青' : ''}}旅客人数环比</view> |
|
|
|
|
<view class="rate_item_input" |
|
|
|
|
:style="item.passengerDod === 0 ? 'color: #EB4747' : ''"> |
|
|
|
|
{{formatDigit(form.passengerDod)}}% |
|
|
|
|
@ -94,7 +94,7 @@ |
|
|
|
|
</view> |
|
|
|
|
<view class="line"></view> |
|
|
|
|
<view class="rate_item"> |
|
|
|
|
<view class="rate_item_label">{{item.direction == 1 ? '入青' : item.direction == 2 ? '出青' : ''}}旅客人数同比</view> |
|
|
|
|
<view class="rate_item_label">{{item.direction == '1' ? '入青' : item.direction == '2' ? '出青' : ''}}旅客人数同比</view> |
|
|
|
|
<view class="rate_item_input"> |
|
|
|
|
{{formatDigit(item.passengerYoy)}}% |
|
|
|
|
</view> |
|
|
|
|
@ -139,7 +139,7 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form_item"> |
|
|
|
|
<view class="form_item_label">{{item.direction == 1 ? '入青' : item.direction == 2 ? '出青' : ''}}旅客人数:</view> |
|
|
|
|
<view class="form_item_label">{{item.direction == '1' ? '入青' : item.direction == '2' ? '出青' : ''}}旅客人数:</view> |
|
|
|
|
<view class="form_item_input form_input"> |
|
|
|
|
<uni-easyinput @blur="calcYoyMom(2,index)" @clear="calcYoyMom(2,index)" v-model="item.passengerCount" type="number" |
|
|
|
|
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20"> |
|
|
|
|
@ -152,7 +152,7 @@ |
|
|
|
|
<view class="rate_item"> |
|
|
|
|
<view class="rate_item_label" |
|
|
|
|
:style="item.passengerDod === 0 ? 'color: #EB4747' : ''"> |
|
|
|
|
{{item.direction == 1 ? '入青' : item.direction == 2 ? '出青' : ''}}旅客人数环比</view> |
|
|
|
|
{{item.direction == '1' ? '入青' : item.direction == '2' ? '出青' : ''}}旅客人数环比</view> |
|
|
|
|
<view class="rate_item_input" |
|
|
|
|
:style="item.passengerDod === 0 ? 'color: #EB4747' : ''"> |
|
|
|
|
{{formatDigit(form.passengerDod)}}% |
|
|
|
|
@ -160,7 +160,7 @@ |
|
|
|
|
</view> |
|
|
|
|
<view class="line"></view> |
|
|
|
|
<view class="rate_item"> |
|
|
|
|
<view class="rate_item_label">{{item.direction == 1 ? '入青' : item.direction == 2 ? '出青' : ''}}旅客人数同比</view> |
|
|
|
|
<view class="rate_item_label">{{item.direction == '1' ? '入青' : item.direction == '2' ? '出青' : ''}}旅客人数同比</view> |
|
|
|
|
<view class="rate_item_input"> |
|
|
|
|
{{formatDigit(item.passengerYoy)}}% |
|
|
|
|
</view> |
|
|
|
|
@ -193,16 +193,7 @@ |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
form: { |
|
|
|
|
"internationalCruiseDTOList": [{ |
|
|
|
|
"route": "", |
|
|
|
|
"routeIndex": "", |
|
|
|
|
"voyage": "", |
|
|
|
|
"voyageIndex": "", |
|
|
|
|
"direction": "", |
|
|
|
|
"passengerCount": "", |
|
|
|
|
"passengerDod": "",//环比 |
|
|
|
|
"passengerYoy": "",//同比 |
|
|
|
|
}],//国际客运 |
|
|
|
|
"internationalCruiseDTOList": [],//客班轮 |
|
|
|
|
"passengerShipDTOList":[{ |
|
|
|
|
"route": "", |
|
|
|
|
"routeIndex": "", |
|
|
|
|
@ -212,7 +203,7 @@ |
|
|
|
|
"passengerCount": "", |
|
|
|
|
"passengerDod": "",//环比 |
|
|
|
|
"passengerYoy": "",//同比 |
|
|
|
|
}],//客班轮 |
|
|
|
|
}],//国际邮轮 |
|
|
|
|
"organizationName": "", |
|
|
|
|
"statDate": "", |
|
|
|
|
"statPeriod": "" |
|
|
|
|
@ -247,7 +238,9 @@ |
|
|
|
|
this.btnText = '修改并保存'; |
|
|
|
|
this.$request(getApp().globalData.baseUrl + '/api/biz/internationalPassengerTransport/selectById/' + options.id, {}, "GET").then( |
|
|
|
|
res => { |
|
|
|
|
this.form = res.data; |
|
|
|
|
this.form = res.data; |
|
|
|
|
this.form.passengerShipDTOList = this.form.passengerShipVOList; |
|
|
|
|
this.form.internationalCruiseDTOList = this.form.internationalCruiseVOList; |
|
|
|
|
if (checkNotEmpty(this.deptNameList)) { |
|
|
|
|
let idx = this.deptNameList.findIndex(item => item.deptName = this.form.organizationName); |
|
|
|
|
this.form.organizationNameIndex = idx > -1 ? idx : ''; |
|
|
|
|
@ -358,14 +351,16 @@ |
|
|
|
|
this.$request(getApp().globalData.baseUrl + '/api/biz/internationalPassengerTransport/getYoYAndMoM?statDate=' + this.form |
|
|
|
|
.statDate + '&statPeriod=' + this.form.statPeriod + '&voyage=' + _voyage + '&_t=' + Date.parse(new Date()), {}, 'GET') |
|
|
|
|
.then(res => { |
|
|
|
|
let dayData = res.data.minusDays; |
|
|
|
|
let yearData = res.data.minusYears; |
|
|
|
|
if(type == 1) { |
|
|
|
|
//客班轮 |
|
|
|
|
this.form.passengerShipDTOList[index].passengerDod = this.$calcMom(this.form.passengerShipDTOList[index].passengerCount,res.data); |
|
|
|
|
this.form.passengerShipDTOList[index].passengerYoy = this.$calcYoy(this.form.passengerShipDTOList[index].passengerCount,res.data); |
|
|
|
|
this.form.passengerShipDTOList[index].passengerDod = this.$calcMom(this.form.passengerShipDTOList[index].passengerCount,dayData.passengerCount); |
|
|
|
|
this.form.passengerShipDTOList[index].passengerYoy = this.$calcYoy(this.form.passengerShipDTOList[index].passengerCount,yearData.passengerCount); |
|
|
|
|
}else{ |
|
|
|
|
//国际邮轮 |
|
|
|
|
this.form.internationalCruiseDTOList[index].passengerDod = this.$calcMom(this.form.internationalCruiseDTOList[index].passengerCount,res.data); |
|
|
|
|
this.form.internationalCruiseDTOList[index].passengerYoy = this.$calcYoy(this.form.internationalCruiseDTOList[index].passengerCount,res.data); |
|
|
|
|
this.form.internationalCruiseDTOList[index].passengerDod = this.$calcMom(this.form.internationalCruiseDTOList[index].passengerCount,dayData.passengerCount); |
|
|
|
|
this.form.internationalCruiseDTOList[index].passengerYoy = this.$calcYoy(this.form.internationalCruiseDTOList[index].passengerCount,yearData.passengerCount); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
@ -373,32 +368,12 @@ |
|
|
|
|
changeRoute(e, index) { |
|
|
|
|
if(this.tabType == 1) { |
|
|
|
|
//客班轮 |
|
|
|
|
//判断是否重复选择 |
|
|
|
|
let idx = this.form.passengerShipDTOList.findIndex(item => item.routeIndex == e.detail.value); |
|
|
|
|
if (idx > -1 && this.form.passengerShipDTOList[index].routeIndex != idx) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '客班轮航线不能重复选择', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
else{ |
|
|
|
|
this.form.passengerShipDTOList[index].routeIndex = e.detail.value; |
|
|
|
|
this.form.passengerShipDTOList[index].route = this.shipRouteList[e.detail.value].route; |
|
|
|
|
} |
|
|
|
|
this.form.passengerShipDTOList[index].routeIndex = e.detail.value; |
|
|
|
|
this.form.passengerShipDTOList[index].route = this.shipRouteList[e.detail.value].route; |
|
|
|
|
}else{ |
|
|
|
|
//国际邮轮 |
|
|
|
|
//判断是否重复选择 |
|
|
|
|
let idx = this.form.internationalCruiseDTOList.findIndex(item => item.routeIndex == e.detail.value); |
|
|
|
|
if (idx > -1 && this.form.internationalCruiseDTOList[index].routeIndex != idx) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '国际邮轮航线不能重复选择', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
this.form.internationalCruiseDTOList[index].routeIndex = e.detail.value; |
|
|
|
|
this.form.internationalCruiseDTOList[index].route = this.internationalRouteList[e.detail.value].route; |
|
|
|
|
} |
|
|
|
|
this.form.internationalCruiseDTOList[index].routeIndex = e.detail.value; |
|
|
|
|
this.form.internationalCruiseDTOList[index].route = this.internationalRouteList[e.detail.value].route; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//航次选择 |
|
|
|
|
@ -534,7 +509,7 @@ |
|
|
|
|
if (this.form.id == undefined) { |
|
|
|
|
setTimeout(() => { |
|
|
|
|
uni.redirectTo({ |
|
|
|
|
url: '/pages/railway/railwayRunData/list' |
|
|
|
|
url: '/pages/portShipping/waterInternational/list' |
|
|
|
|
}) |
|
|
|
|
}, 300) |
|
|
|
|
} else { |
|
|
|
|
|