|
|
|
|
@ -9,11 +9,13 @@ |
|
|
|
|
<view class="form_item"> |
|
|
|
|
<view class="form_item_label">所属单位:</view> |
|
|
|
|
<view class="form_item_input picker"> |
|
|
|
|
<picker :value="railwayNameIndex" :range="stationList" @change="changeRailway"> |
|
|
|
|
<picker v-if="pageType == 'add' && deptNameList.length > 1" :value="form.organizationNameIndex" |
|
|
|
|
:range="deptNameList" range-key="deptName" @change="bindDeptChange"> |
|
|
|
|
<text class="picker_select" |
|
|
|
|
:style="form.railwayName?'color:#333;':''">{{form.railwayName?form.railwayName:'请选择'}}</text> |
|
|
|
|
:style="form.organizationName?'color:#333;':''">{{form.organizationName?form.organizationName:'请选择'}}</text> |
|
|
|
|
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons> |
|
|
|
|
</picker> |
|
|
|
|
<text v-else>{{form.organizationName}}</text> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form_item"> |
|
|
|
|
@ -44,141 +46,140 @@ |
|
|
|
|
<view class="tab_nav" :class="tabType == 2 ? 'active' : ''" @click="tabType = 2">国际邮轮</view> |
|
|
|
|
</view> |
|
|
|
|
<!-- 客班轮 --> |
|
|
|
|
<view class="form_item_li" v-show="tabType == 1"> |
|
|
|
|
<view class="form_item_li" v-show="tabType == 1" v-for="(item,index) in form.passengerShipDTOList" :key="index"> |
|
|
|
|
<view class="form_item" |
|
|
|
|
style="display:flex; justify-content: space-between; font-size: 30rpx;color:#333;font-weight: bold;margin-top: 30rpx;"> |
|
|
|
|
运输数据 |
|
|
|
|
<uni-icons type="trash" color="red" @click="delRow(0)" size="18"></uni-icons> |
|
|
|
|
客班轮-{{ index+1 }} |
|
|
|
|
<uni-icons type="trash" color="red" @click="deleteRow(index)" size="18"></uni-icons> |
|
|
|
|
</view> |
|
|
|
|
<view class="form_item"> |
|
|
|
|
<view class="form_item_label">航线:</view> |
|
|
|
|
<view class="form_item_input picker"> |
|
|
|
|
<picker :value="railwayNameIndex" :range="stationList" @change="changeRailway"> |
|
|
|
|
<text class="picker_select" |
|
|
|
|
:style="form.railwayName?'color:#333;':''">{{form.railwayName?form.railwayName:'请选择'}}</text> |
|
|
|
|
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons> |
|
|
|
|
</picker> |
|
|
|
|
<view class="form_item_input picker"> |
|
|
|
|
<picker :value="routeIndex" :range="shipRouteList" @change="e => changeRoute(e, index)"> |
|
|
|
|
<text class="picker_select" |
|
|
|
|
:style="item.route?'color:#333;':''">{{item.route?form.route:'请选择'}}</text> |
|
|
|
|
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons> |
|
|
|
|
</picker> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form_item"> |
|
|
|
|
<view class="form_item_label">航次:</view> |
|
|
|
|
<view class="form_item_input picker"> |
|
|
|
|
<picker :value="railwayNameIndex" :range="stationList" @change="changeRailway"> |
|
|
|
|
<text class="picker_select" |
|
|
|
|
:style="form.railwayName?'color:#333;':''">{{form.railwayName?form.railwayName:'请选择'}}</text> |
|
|
|
|
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons> |
|
|
|
|
</picker> |
|
|
|
|
<view class="form_item_input picker"> |
|
|
|
|
<picker :value="voyageIndex" :range="shipVoyageList" @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> |
|
|
|
|
</picker> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form_item"> |
|
|
|
|
<view class="form_item_label">入青旅客人数:</view> |
|
|
|
|
<view class="form_item_label">{{item.direction == 1 ? '入青' : item.direction == 2 ? '出青' : ''}}旅客人数:</view> |
|
|
|
|
<view class="form_item_input form_input"> |
|
|
|
|
<uni-easyinput @blur="calcYoyMom" @clear="calcYoyMom" v-model="form.inboundPassengersDo" type="number" |
|
|
|
|
<uni-easyinput @blur="calcYoyMom" @clear="calcYoyMom" v-model="item.passengerCount" type="number" |
|
|
|
|
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20"> |
|
|
|
|
</uni-easyinput> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<!-- 同比环比 --> |
|
|
|
|
<view class="form_item_rate" |
|
|
|
|
:class="form.inboundRailwayDo === 0 ? 'danger' : '' "> |
|
|
|
|
:class="item.passengerDod === 0 ? 'danger' : '' "> |
|
|
|
|
<view class="rate_item"> |
|
|
|
|
<view class="rate_item_label" |
|
|
|
|
:style="form.inboundRailwayDo === 0 ? 'color: #EB4747' : ''"> |
|
|
|
|
入青旅客人数环比</view> |
|
|
|
|
:style="item.passengerDod === 0 ? 'color: #EB4747' : ''"> |
|
|
|
|
{{item.direction == 1 ? '入青' : item.direction == 2 ? '出青' : ''}}旅客人数环比</view> |
|
|
|
|
<view class="rate_item_input" |
|
|
|
|
:style="form.inboundRailwayDo === 0 ? 'color: #EB4747' : ''"> |
|
|
|
|
{{formatDigit(form.inRailwayYomDo)}}% |
|
|
|
|
:style="item.passengerDod === 0 ? 'color: #EB4747' : ''"> |
|
|
|
|
{{formatDigit(form.passengerDod)}}% |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="line"></view> |
|
|
|
|
<view class="rate_item"> |
|
|
|
|
<view class="rate_item_label">入青旅客人数同比</view> |
|
|
|
|
<view class="rate_item_label">{{item.direction == 1 ? '入青' : item.direction == 2 ? '出青' : ''}}旅客人数同比</view> |
|
|
|
|
<view class="rate_item_input"> |
|
|
|
|
{{formatDigit(form.inRailwayMomDo)}}% |
|
|
|
|
{{formatDigit(item.passengerYoy)}}% |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form_item_remark"> |
|
|
|
|
<view class="form_item_label">备注:</view> |
|
|
|
|
<view class="form_item_input"> |
|
|
|
|
<uni-easyinput v-model="form.inMark" |
|
|
|
|
<uni-easyinput v-model="item.remarks" |
|
|
|
|
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入备注信息" type="textarea" maxlength="200" |
|
|
|
|
autoHeight></uni-easyinput> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="line"></view> |
|
|
|
|
</view> |
|
|
|
|
<view class="line" v-if="form.passengerShipDTOList.length > 1"></view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<!-- 国际邮轮 --> |
|
|
|
|
<view class="form_item_li" v-show="tabType == 2"> |
|
|
|
|
<view class="form_item" |
|
|
|
|
style="display:flex; justify-content: space-between; font-size: 30rpx;color:#333;font-weight: bold;margin-top: 30rpx;"> |
|
|
|
|
运输数据 |
|
|
|
|
<uni-icons type="trash" color="red" @click="delRow(0)" size="18"></uni-icons> |
|
|
|
|
</view> |
|
|
|
|
<view class="form_item"> |
|
|
|
|
<view class="form_item_label">航线:</view> |
|
|
|
|
<view class="form_item_input picker"> |
|
|
|
|
<picker :value="railwayNameIndex" :range="stationList" @change="changeRailway"> |
|
|
|
|
<text class="picker_select" |
|
|
|
|
:style="form.railwayName?'color:#333;':''">{{form.railwayName?form.railwayName:'请选择'}}</text> |
|
|
|
|
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons> |
|
|
|
|
</picker> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form_item"> |
|
|
|
|
<view class="form_item_label">航次:</view> |
|
|
|
|
<view class="form_item_input picker"> |
|
|
|
|
<picker :value="railwayNameIndex" :range="stationList" @change="changeRailway"> |
|
|
|
|
<text class="picker_select" |
|
|
|
|
:style="form.railwayName?'color:#333;':''">{{form.railwayName?form.railwayName:'请选择'}}</text> |
|
|
|
|
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons> |
|
|
|
|
</picker> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form_item"> |
|
|
|
|
<view class="form_item_label">入青旅客人数:</view> |
|
|
|
|
<view class="form_item_input form_input"> |
|
|
|
|
<uni-easyinput @blur="calcYoyMom" @clear="calcYoyMom" v-model="form.inboundPassengersDo" type="number" |
|
|
|
|
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20"> |
|
|
|
|
</uni-easyinput> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<!-- 同比环比 --> |
|
|
|
|
<view class="form_item_rate" |
|
|
|
|
:class="form.inboundRailwayDo === 0 ? 'danger' : '' "> |
|
|
|
|
<view class="rate_item"> |
|
|
|
|
<view class="rate_item_label" |
|
|
|
|
:style="form.inboundRailwayDo === 0 ? 'color: #EB4747' : ''"> |
|
|
|
|
入青旅客人数环比</view> |
|
|
|
|
<view class="rate_item_input" |
|
|
|
|
:style="form.inboundRailwayDo === 0 ? 'color: #EB4747' : ''"> |
|
|
|
|
{{formatDigit(form.inRailwayYomDo)}}% |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="line"></view> |
|
|
|
|
<view class="rate_item"> |
|
|
|
|
<view class="rate_item_label">入青旅客人数同比</view> |
|
|
|
|
<view class="rate_item_input"> |
|
|
|
|
{{formatDigit(form.inRailwayMomDo)}}% |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form_item_li" v-show="tabType == 2" v-for="(item,index) in form.internationalCruiseDTOList" :key="index"> |
|
|
|
|
<view class="form_item" |
|
|
|
|
style="display:flex; justify-content: space-between; font-size: 30rpx;color:#333;font-weight: bold;margin-top: 30rpx;"> |
|
|
|
|
国际邮轮-{{ index+1 }} |
|
|
|
|
<uni-icons type="trash" color="red" @click="deleteRow(index)" size="18"></uni-icons> |
|
|
|
|
</view> |
|
|
|
|
<view class="form_item"> |
|
|
|
|
<view class="form_item_label">航线:</view> |
|
|
|
|
<view class="form_item_input picker"> |
|
|
|
|
<picker :value="routeIndex" :range="internationalRouteList" @change="e => changeRoute(e, index)"> |
|
|
|
|
<text class="picker_select" |
|
|
|
|
:style="item.route?'color:#333;':''">{{item.route?form.route:'请选择'}}</text> |
|
|
|
|
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons> |
|
|
|
|
</picker> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form_item"> |
|
|
|
|
<view class="form_item_label">航次:</view> |
|
|
|
|
<view class="form_item_input picker"> |
|
|
|
|
<picker :value="voyageIndex" :range="internationalVoyageList" @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> |
|
|
|
|
</picker> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form_item"> |
|
|
|
|
<view class="form_item_label">{{item.direction == 1 ? '入青' : item.direction == 2 ? '出青' : ''}}旅客人数:</view> |
|
|
|
|
<view class="form_item_input form_input"> |
|
|
|
|
<uni-easyinput @blur="calcYoyMom" @clear="calcYoyMom" v-model="item.passengerCount" type="number" |
|
|
|
|
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20"> |
|
|
|
|
</uni-easyinput> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<!-- 同比环比 --> |
|
|
|
|
<view class="form_item_rate" |
|
|
|
|
:class="item.passengerDod === 0 ? 'danger' : '' "> |
|
|
|
|
<view class="rate_item"> |
|
|
|
|
<view class="rate_item_label" |
|
|
|
|
:style="item.passengerDod === 0 ? 'color: #EB4747' : ''"> |
|
|
|
|
{{item.direction == 1 ? '入青' : item.direction == 2 ? '出青' : ''}}旅客人数环比</view> |
|
|
|
|
<view class="rate_item_input" |
|
|
|
|
:style="item.passengerDod === 0 ? 'color: #EB4747' : ''"> |
|
|
|
|
{{formatDigit(form.passengerDod)}}% |
|
|
|
|
</view> |
|
|
|
|
</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_input"> |
|
|
|
|
{{formatDigit(item.passengerYoy)}}% |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form_item_remark"> |
|
|
|
|
<view class="form_item_label">备注:</view> |
|
|
|
|
<view class="form_item_input"> |
|
|
|
|
<uni-easyinput v-model="form.outMark" |
|
|
|
|
<uni-easyinput v-model="item.remarks" |
|
|
|
|
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入备注信息" type="textarea" maxlength="200" |
|
|
|
|
autoHeight></uni-easyinput> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="line"></view> |
|
|
|
|
</view> |
|
|
|
|
<view class="line" v-if="form.internationalCruiseDTOList.length > 1"></view> |
|
|
|
|
</view> |
|
|
|
|
<view class="add_btn" @click="addRow()">增行</view> |
|
|
|
|
<view class="add_btn" @click="addRow">增行</view> |
|
|
|
|
</view> |
|
|
|
|
<!-- 底部按钮 --> |
|
|
|
|
<view class="foot_btn"> |
|
|
|
|
<!-- <view class="act_btn" @click="doCancel">取消</view> --> |
|
|
|
|
<view class="act_btn blue" @click="doSubmit">{{btnText}}</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
@ -192,44 +193,54 @@ |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
form: { |
|
|
|
|
"inMark": "", |
|
|
|
|
"inPepole": '', |
|
|
|
|
"inPepoleMomDo": '', |
|
|
|
|
"inPepoleYoyDo": '', |
|
|
|
|
"inRailwayMomDo": '', |
|
|
|
|
"inRailwayYomDo": '', |
|
|
|
|
"inboundPassengersDo": '', |
|
|
|
|
"inboundRailwayDo": '', |
|
|
|
|
"isHoliday": "", |
|
|
|
|
"outMark": "", |
|
|
|
|
"outPepole": '', |
|
|
|
|
"outPepoleMomDo": '', |
|
|
|
|
"outPepoleYoyDo": '', |
|
|
|
|
"outRailwayMomDo": '', |
|
|
|
|
"outRailwayYomDo": '', |
|
|
|
|
"outboundPassengersDo": '', |
|
|
|
|
"outboundRailwayDo": '', |
|
|
|
|
"railwayName": "", |
|
|
|
|
"internationalCruiseDTOList": [{ |
|
|
|
|
"route": "", |
|
|
|
|
"routeIndex": "", |
|
|
|
|
"voyage": "", |
|
|
|
|
"voyageIndex": "", |
|
|
|
|
"direction": "", |
|
|
|
|
"passengerCount": "", |
|
|
|
|
"passengerDod": "",//环比 |
|
|
|
|
"passengerYoy": "",//同比 |
|
|
|
|
}],//国际客运 |
|
|
|
|
"passengerShipDTOList":[{ |
|
|
|
|
"route": "", |
|
|
|
|
"routeIndex": "", |
|
|
|
|
"voyage": "", |
|
|
|
|
"voyageIndex": "", |
|
|
|
|
"direction": "", |
|
|
|
|
"passengerCount": "", |
|
|
|
|
"passengerDod": "",//环比 |
|
|
|
|
"passengerYoy": "",//同比 |
|
|
|
|
}],//客班轮 |
|
|
|
|
"organizationName": "", |
|
|
|
|
"statDate": "", |
|
|
|
|
"statPeriod": "" |
|
|
|
|
}, //登录form |
|
|
|
|
stationList: [], //车站列表 |
|
|
|
|
railwayNameIndex: '', |
|
|
|
|
submitPerson: [], //报送人 |
|
|
|
|
submitPersonIndex: -1, //报送人选择索引 |
|
|
|
|
shipRouteList: [], //客班轮航线 |
|
|
|
|
shipVoyageList: [],//客班轮航次 |
|
|
|
|
internationalRouteList: [], //国际邮轮航线 |
|
|
|
|
internationalVoyageList: [],//国际邮轮航次 |
|
|
|
|
array: [], //时段选择列表 |
|
|
|
|
index: 2, //时段选择,默认0-24 |
|
|
|
|
userInfo: {}, |
|
|
|
|
pageType: '', |
|
|
|
|
btnText: '保存', |
|
|
|
|
tabType: 1, |
|
|
|
|
tabType: 1, |
|
|
|
|
deptNameList: [], //当前登录人所在单位 |
|
|
|
|
mobile: getApp().globalData.mobile |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onLoad(options) { |
|
|
|
|
this.userInfo = uni.getStorageSync('userInfo'); |
|
|
|
|
this.queryStation(); //车展名称列表 |
|
|
|
|
let arr = uni.getStorageSync('deptName'); |
|
|
|
|
this.deptNameList = checkNotEmpty(arr) ? arr : []; |
|
|
|
|
if (options.type == 'add') { |
|
|
|
|
this.form.organizationName = this.deptNameList.length > 0 ? this.deptNameList[0].deptName : ''; |
|
|
|
|
this.form.organizationNameIndex = this.deptNameList.length > 0 ? 0 : ''; |
|
|
|
|
this.pageType = 'add'; |
|
|
|
|
let now = new Date(); |
|
|
|
|
this.form.statDate = getDateStr(now, -1); //默认前一天 |
|
|
|
|
@ -239,20 +250,55 @@ |
|
|
|
|
this.$request(getApp().globalData.baseUrl + '/api/biz/railwayRunData/find/' + options.id, {}, "GET").then( |
|
|
|
|
res => { |
|
|
|
|
this.form = res.data; |
|
|
|
|
if (checkNotEmpty(this.deptNameList)) { |
|
|
|
|
let idx = this.deptNameList.findIndex(item => item.deptName = this.form.organizationName); |
|
|
|
|
this.form.organizationNameIndex = idx > -1 ? idx : ''; |
|
|
|
|
} |
|
|
|
|
this.queryTime(); //统计时段 |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
call(tel) { |
|
|
|
|
uni.makePhoneCall({ |
|
|
|
|
phoneNumber: tel |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
//增行 |
|
|
|
|
addRow() {}, |
|
|
|
|
//删除 |
|
|
|
|
deleteRow(index) {}, |
|
|
|
|
methods: { |
|
|
|
|
//切换管理单位 |
|
|
|
|
bindDeptChange(e) { |
|
|
|
|
this.form.organizationNameIndex = e.detail.value; |
|
|
|
|
this.form.organizationName = this.deptNameList[e.detail.value].deptName; |
|
|
|
|
}, |
|
|
|
|
call(tel) { |
|
|
|
|
uni.makePhoneCall({ |
|
|
|
|
phoneNumber: tel |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
//增行 |
|
|
|
|
addRow() { |
|
|
|
|
let obj = { |
|
|
|
|
route: "", |
|
|
|
|
routeIndex: "", |
|
|
|
|
voyage: "", |
|
|
|
|
voyageIndex: "", |
|
|
|
|
direction: "", |
|
|
|
|
passengerCount: "", |
|
|
|
|
passengerDod: "",//环比 |
|
|
|
|
passengerYoy: "",//同比 |
|
|
|
|
}; |
|
|
|
|
if(this.tabType == 1) { |
|
|
|
|
//客班轮 |
|
|
|
|
this.form.passengerShipDTOList.push(obj); |
|
|
|
|
}else{ |
|
|
|
|
//国际邮轮 |
|
|
|
|
this.form.internationalCruiseDTOList.push(obj); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//删除 |
|
|
|
|
deleteRow(index) { |
|
|
|
|
if(this.tabType == 1) { |
|
|
|
|
//客班轮 |
|
|
|
|
this.form.passengerShipDTOList.splice(index, 1); |
|
|
|
|
}else{ |
|
|
|
|
//国际邮轮 |
|
|
|
|
this.form.internationalCruiseDTOList.splice(index, 1); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//只保留两位小数 |
|
|
|
|
formatDigit(data) { |
|
|
|
|
return !checkNotEmpty(data) ? '--' : (data+'').indexOf('.') > -1 && (data+'').substring((data+'').indexOf('.')).length > 2 ? data.toFixed(2) : data; |
|
|
|
|
@ -281,87 +327,6 @@ |
|
|
|
|
this.form.inPepoleMomDo = this.$calcYoy(this.form.inPepole,this.yoyMom.lastYearData.inPepole); |
|
|
|
|
this.form.outRailwayMomDo = this.$calcYoy(this.form.outboundRailwayDo,this.yoyMom.lastYearData.outboundRailwayDo); |
|
|
|
|
this.form.outPepoleMomDo = this.$calcYoy(this.form.outPepole,this.yoyMom.lastYearData.outPepole); |
|
|
|
|
return; |
|
|
|
|
if (this.yoyMom.yesterdayData) { |
|
|
|
|
//环比 |
|
|
|
|
if (checkNotEmpty(this.form.inboundRailwayDo)) { |
|
|
|
|
this.form.inRailwayYomDo = !checkNotEmpty(this.yoyMom.yesterdayData.inboundRailwayDo) || this |
|
|
|
|
.yoyMom.yesterdayData.inboundRailwayDo === 0 ? 100 : ( |
|
|
|
|
parseInt(this.form.inboundRailwayDo) - this.yoyMom.yesterdayData.inboundRailwayDo) / this |
|
|
|
|
.yoyMom.yesterdayData.inboundRailwayDo * 100; |
|
|
|
|
}else{ |
|
|
|
|
this.form.inRailwayYomDo = ''; |
|
|
|
|
} |
|
|
|
|
if (this.form.inPepole) { |
|
|
|
|
this.form.inPepoleYoyDo = !checkNotEmpty(this.yoyMom.yesterdayData.inPepole) || this.yoyMom |
|
|
|
|
.yesterdayData.inPepole === 0 ? 100 : (parseInt(this |
|
|
|
|
.form.inPepole) - this.yoyMom.yesterdayData.inPepole) / this.yoyMom.yesterdayData |
|
|
|
|
.inPepole * |
|
|
|
|
100; |
|
|
|
|
}else{ |
|
|
|
|
this.form.inPepoleYoyDo = ''; |
|
|
|
|
} |
|
|
|
|
if (checkNotEmpty(this.form.outboundRailwayDo)) { |
|
|
|
|
this.form.outRailwayYomDo = !checkNotEmpty(this.yoyMom.yesterdayData.outboundRailwayDo) || this |
|
|
|
|
.yoyMom.yesterdayData.outboundRailwayDo === 0 ? 100 : (parseInt(this.form.outboundRailwayDo) - |
|
|
|
|
this.yoyMom.yesterdayData |
|
|
|
|
.outboundRailwayDo) / this.yoyMom.yesterdayData.outboundRailwayDo * 100; |
|
|
|
|
}else{ |
|
|
|
|
this.form.outRailwayYomDo = ''; |
|
|
|
|
} |
|
|
|
|
if (checkNotEmpty(this.form.outPepole)) { |
|
|
|
|
this.form.outPepoleYoyDo = !checkNotEmpty(this.yoyMom.yesterdayData.outPepole) || this.yoyMom |
|
|
|
|
.yesterdayData.outPepole === 0 ? 100 : (parseInt(this |
|
|
|
|
.form.outPepole) - this.yoyMom.yesterdayData.outPepole) / this.yoyMom.yesterdayData |
|
|
|
|
.outPepole * |
|
|
|
|
100; |
|
|
|
|
}else{ |
|
|
|
|
this.form.outPepoleYoyDo = ''; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (this.yoyMom.lastYearData) { |
|
|
|
|
//同比 |
|
|
|
|
if (checkNotEmpty(this.form.inboundRailwayDo)) { |
|
|
|
|
this.form.inRailwayMomDo = !checkNotEmpty(this.yoyMom.lastYearData.inboundRailwayDo) || this.yoyMom |
|
|
|
|
.lastYearData.inboundRailwayDo === 0 ? 100 : ( |
|
|
|
|
parseInt(this.form.inboundRailwayDo) - this.yoyMom.lastYearData.inboundRailwayDo) / this |
|
|
|
|
.yoyMom |
|
|
|
|
.lastYearData.inboundRailwayDo * 100; |
|
|
|
|
}else{ |
|
|
|
|
this.form.inRailwayMomDo = ''; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (checkNotEmpty(this.form.inPepole)) { |
|
|
|
|
this.form.inPepoleMomDo = !checkNotEmpty(this.yoyMom.lastYearData.inPepole) || this.yoyMom |
|
|
|
|
.lastYearData |
|
|
|
|
.inPepole === 0 ? 100 : (parseInt(this.form |
|
|
|
|
.inPepole) - this.yoyMom.lastYearData.inPepole) / this.yoyMom.lastYearData.inPepole * 100; |
|
|
|
|
}else{ |
|
|
|
|
this.form.inPepoleMomDo = ''; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (checkNotEmpty(this.form.outboundRailwayDo)) { |
|
|
|
|
this.form.outRailwayMomDo = !checkNotEmpty(this.yoyMom.lastYearData.outboundRailwayDo) || this |
|
|
|
|
.yoyMom |
|
|
|
|
.lastYearData.outboundRailwayDo === 0 ? 100 : |
|
|
|
|
(parseInt(this.form.outboundRailwayDo) - this.yoyMom.lastYearData.outboundRailwayDo) / this |
|
|
|
|
.yoyMom |
|
|
|
|
.lastYearData.outboundRailwayDo * 100; |
|
|
|
|
}else{ |
|
|
|
|
this.form.outRailwayMomDo = ''; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (checkNotEmpty(this.form.outPepole)) { |
|
|
|
|
this.form.outPepoleMomDo = !checkNotEmpty(this.yoyMom.lastYearData.outPepole) || this.yoyMom |
|
|
|
|
.lastYearData.outPepole === 0 ? 100 : (parseInt(this |
|
|
|
|
.form.outPepole) - this.yoyMom.lastYearData.outPepole) / this.yoyMom.lastYearData |
|
|
|
|
.outPepole * |
|
|
|
|
100; |
|
|
|
|
}else{ |
|
|
|
|
this.form.outPepoleMomDo = ''; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//车站权限列表 |
|
|
|
|
queryStation() { |
|
|
|
|
@ -374,10 +339,29 @@ |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
//车站选择 |
|
|
|
|
changeRailway(e) { |
|
|
|
|
this.railwayNameIndex = e.detail.value; |
|
|
|
|
this.form.railwayName = this.stationList[e.detail.value]; |
|
|
|
|
//航线选择 |
|
|
|
|
changeRoute(e, index) { |
|
|
|
|
if(this.tabType == 1) { |
|
|
|
|
//客班轮 |
|
|
|
|
this.form.passengerShipDTOList[index].routeIndex = e.detail.value; |
|
|
|
|
this.form.passengerShipDTOList[index].route = this.shipRouteList[e.detail.value].name; |
|
|
|
|
}else{ |
|
|
|
|
//国际邮轮 |
|
|
|
|
this.form.internationalCruiseDTOList[index].routeIndex = e.detail.value; |
|
|
|
|
this.form.internationalCruiseDTOList[index].route = this.internationalRouteList[e.detail.value].name; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//航次选择 |
|
|
|
|
changeVoyage(e, index) { |
|
|
|
|
if(this.tabType == 1) { |
|
|
|
|
//客班轮 |
|
|
|
|
this.form.passengerShipDTOList[index].voyageIndex = e.detail.value; |
|
|
|
|
this.form.passengerShipDTOList[index].voyage = this.shipVoyageList[e.detail.value].name; |
|
|
|
|
}else{ |
|
|
|
|
//国际邮轮 |
|
|
|
|
this.form.internationalCruiseDTOList[index].voyageIndex = e.detail.value; |
|
|
|
|
this.form.internationalCruiseDTOList[index].voyage = this.internationalVoyageList[e.detail.value].name; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//统计时段切换选择 |
|
|
|
|
changeStatPeriod(e) { |
|
|
|
|
@ -386,10 +370,6 @@ |
|
|
|
|
console.log('change 时段', this.form); |
|
|
|
|
this.queryYoyMom(); |
|
|
|
|
}, |
|
|
|
|
//取消 |
|
|
|
|
doCancel() { |
|
|
|
|
uni.navigateBack(); |
|
|
|
|
}, |
|
|
|
|
//选择统计日期 |
|
|
|
|
bindDateChange(e) { |
|
|
|
|
this.form.statDate = e.detail.value; |
|
|
|
|
@ -409,29 +389,22 @@ |
|
|
|
|
new Date(dateStr + |
|
|
|
|
' 13:30').getTime()) { |
|
|
|
|
this.form.statPeriod = '0012'; |
|
|
|
|
let idx = this.array.findIndex(item => item.dictValue == '0012'); |
|
|
|
|
let idx = this.array.findIndex(item => item.dictValue == '0012'); |
|
|
|
|
this.index = idx > -1 ? idx : ''; |
|
|
|
|
} else { |
|
|
|
|
this.form.statPeriod = '03'; //默认0-24 |
|
|
|
|
let idx = this.array.findIndex(item => item.dictValue == '03'); |
|
|
|
|
let idx = this.array.findIndex(item => item.dictValue == '03'); |
|
|
|
|
this.index = idx > -1 ? idx : ''; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
let idx = this.array.findIndex(item => item.dictValue == this.form.statPeriod); |
|
|
|
|
let idx = this.array.findIndex(item => item.dictValue == this.form.statPeriod); |
|
|
|
|
this.index = idx > -1 ? idx : ''; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this.queryYoyMom(); //同比环比 |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
//确认提交 |
|
|
|
|
doSubmit() { |
|
|
|
|
if (!checkNotEmpty(this.form.railwayName)) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '车站名称不能为空', |
|
|
|
|
icon: 'none' |
|
|
|
|
}) |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (!checkNotEmpty(this.form.statDate) || !checkNotEmpty(this.form.statPeriod)) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '报送日期和时段不能为空', |
|
|
|
|
@ -439,36 +412,32 @@ |
|
|
|
|
}) |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (!checkNotEmpty(this.form.inboundRailwayDo) || !checkNotEmpty(this.form.inboundPassengersDo) || ! |
|
|
|
|
checkNotEmpty(this.form.inPepole)) { |
|
|
|
|
let checkList = true; |
|
|
|
|
if (this.form.passengerShipDTOList.length > 0) { |
|
|
|
|
checkList = this.form.passengerShipDTOList.every(item => { |
|
|
|
|
return checkNotEmpty(item.route) && checkNotEmpty(item.voyage) && checkNotEmpty(item.passengerCount) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
if (!checkList) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '入青终到车次、过站车次、人数不能为空', |
|
|
|
|
title: '客班轮信息请填写完整', |
|
|
|
|
icon: 'none' |
|
|
|
|
}) |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (!checkNotEmpty(this.form.outboundRailwayDo) || !checkNotEmpty(this.form.outboundPassengersDo) || ! |
|
|
|
|
checkNotEmpty(this.form.outPepole)) { |
|
|
|
|
let checkList2 = true; |
|
|
|
|
if (this.form.internationalCruiseDTOList.length > 0) { |
|
|
|
|
checkList2 = this.form.internationalCruiseDTOList.every(item => { |
|
|
|
|
return checkNotEmpty(item.route) && checkNotEmpty(item.voyage) && checkNotEmpty(item.passengerCount) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
if (!checkList2) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '出青终到车次、过站车次、人数不能为空', |
|
|
|
|
title: '国际邮轮信息请填写完整', |
|
|
|
|
icon: 'none' |
|
|
|
|
}) |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
// if (this.form.inPepole == this.yoyMom.yesterdayData.inPepole && this.form.inMark) { |
|
|
|
|
// uni.showToast({ |
|
|
|
|
// title: '入青备注不能为空', |
|
|
|
|
// icon: 'none' |
|
|
|
|
// }) |
|
|
|
|
// return; |
|
|
|
|
// } |
|
|
|
|
// if (this.form.outPepole == this.yoyMom.yesterdayData.outPepole && this.form.outRemark) { |
|
|
|
|
// uni.showToast({ |
|
|
|
|
// title: '出青备注不能为空', |
|
|
|
|
// icon: 'none' |
|
|
|
|
// }) |
|
|
|
|
// return; |
|
|
|
|
// } |
|
|
|
|
uni.showModal({ |
|
|
|
|
title: '提示', |
|
|
|
|
content: this.form.id == undefined ? '您确认提交该条报送数据?' : '您确认将该条数据进行修改?', |
|
|
|
|
@ -795,4 +764,4 @@ |
|
|
|
|
background-color: #007aff; |
|
|
|
|
color: #ffffff; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|
</style> |
|
|
|
|
|