You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
838 lines
27 KiB
838 lines
27 KiB
|
2 years ago
|
<template>
|
||
|
|
<view class="form_warp">
|
||
|
|
<view class="form_intro">
|
||
|
|
<view>如有填报问题,请咨询公共服务中心</view>
|
||
|
2 years ago
|
<view>中心值班电话:<text @click="call(mobile)" class="tel">{{mobile}}</text></view>
|
||
|
2 years ago
|
</view>
|
||
|
|
<view class="form_item_box">
|
||
|
|
<view class="form_item_title">基本信息</view>
|
||
|
|
<view class="form_item">
|
||
|
|
<view class="form_item_label">所属单位:</view>
|
||
|
|
<view class="form_item_input picker">
|
||
|
2 years ago
|
<picker v-if="pageType == 'add' && deptNameList.length > 1" :value="form.organizationNameIndex"
|
||
|
|
:range="deptNameList" range-key="deptName" @change="bindDeptChange">
|
||
|
2 years ago
|
<text class="picker_select"
|
||
|
2 years ago
|
:style="form.organizationName?'color:#333;':''">{{form.organizationName?form.organizationName:'请选择'}}</text>
|
||
|
2 years ago
|
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
|
||
|
|
</picker>
|
||
|
2 years ago
|
<text v-else>{{form.organizationName}}</text>
|
||
|
2 years ago
|
</view>
|
||
|
|
</view>
|
||
|
|
<view class="form_item">
|
||
|
|
<view class="form_item_label">统计日期:</view>
|
||
|
|
<view class="form_item_input picker">
|
||
|
|
<picker mode="date" :value="form.statDate" @change="bindDateChange">
|
||
|
|
<text class="picker_select"
|
||
|
|
:style="form.statDate?'color:#333;':''">{{form.statDate?form.statDate:'请选择'}}</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="index" :range="array" range-key="dictLabel" @change="changeStatPeriod">
|
||
|
|
<text class="picker_select"
|
||
|
|
:style="index>-1?'color:#333;':''">{{index>-1?array[index].dictLabel:'请选择'}}</text>
|
||
|
|
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
|
||
|
|
</picker>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
<view class="form_item_box" style="margin-top: 30rpx;">
|
||
|
|
<!-- tab 切换 -->
|
||
|
|
<view class="tab_box">
|
||
|
|
<view class="tab_nav" :class="tabType == 1 ? 'active' : ''" @click="tabType = 1">客班轮</view>
|
||
|
|
<view class="tab_nav" :class="tabType == 2 ? 'active' : ''" @click="tabType = 2">国际邮轮</view>
|
||
|
|
</view>
|
||
|
|
<!-- 客班轮 -->
|
||
|
2 years ago
|
<view class="form_item_li" v-show="tabType == 1" v-for="(item,index) in form.passengerShipDTOList" :key="index">
|
||
|
2 years ago
|
<view class="form_item"
|
||
|
|
style="display:flex; justify-content: space-between; font-size: 30rpx;color:#333;font-weight: bold;margin-top: 30rpx;">
|
||
|
2 years ago
|
客班轮-{{ index+1 }}
|
||
|
|
<uni-icons type="trash" color="red" @click="deleteRow(index)" size="18"></uni-icons>
|
||
|
2 years ago
|
</view>
|
||
|
|
<view class="form_item">
|
||
|
|
<view class="form_item_label">航线:</view>
|
||
|
2 years ago
|
<view class="form_item_input picker">
|
||
|
2 years ago
|
<picker :value="routeIndex" :range="shipRouteList" range-key="route" @change="e => changeRoute(e, index)">
|
||
|
2 years ago
|
<text class="picker_select"
|
||
|
2 years ago
|
:style="item.route?'color:#333;':''">{{item.route?item.route:'请选择'}}</text>
|
||
|
2 years ago
|
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
|
||
|
|
</picker>
|
||
|
2 years ago
|
</view>
|
||
|
|
</view>
|
||
|
|
<view class="form_item">
|
||
|
|
<view class="form_item_label">航次:</view>
|
||
|
2 years ago
|
<view class="form_item_input picker">
|
||
|
2 years ago
|
<picker :value="voyageIndex" :range="item.routeIndex ? shipRouteList[item.routeIndex].voyageInfoVOList : []" range-key="voyageCode" @change="e => changeVoyage(e, index)">
|
||
|
2 years ago
|
<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>
|
||
|
2 years ago
|
</view>
|
||
|
|
</view>
|
||
|
|
<view class="form_item">
|
||
|
2 years ago
|
<view class="form_item_label">{{item.direction == 1 ? '入青' : item.direction == 2 ? '出青' : ''}}旅客人数:</view>
|
||
|
2 years ago
|
<view class="form_item_input form_input">
|
||
|
2 years ago
|
<uni-easyinput @blur="calcYoyMom(1,index)" @clear="calcYoyMom(1,index)" v-model="item.passengerCount" type="number"
|
||
|
2 years ago
|
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
|
||
|
|
</uni-easyinput>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
<!-- 同比环比 -->
|
||
|
|
<view class="form_item_rate"
|
||
|
2 years ago
|
:class="item.passengerDod === 0 ? 'danger' : '' ">
|
||
|
2 years ago
|
<view class="rate_item">
|
||
|
|
<view class="rate_item_label"
|
||
|
2 years ago
|
:style="item.passengerDod === 0 ? 'color: #EB4747' : ''">
|
||
|
|
{{item.direction == 1 ? '入青' : item.direction == 2 ? '出青' : ''}}旅客人数环比</view>
|
||
|
2 years ago
|
<view class="rate_item_input"
|
||
|
2 years ago
|
:style="item.passengerDod === 0 ? 'color: #EB4747' : ''">
|
||
|
|
{{formatDigit(form.passengerDod)}}%
|
||
|
2 years ago
|
</view>
|
||
|
|
</view>
|
||
|
|
<view class="line"></view>
|
||
|
|
<view class="rate_item">
|
||
|
2 years ago
|
<view class="rate_item_label">{{item.direction == 1 ? '入青' : item.direction == 2 ? '出青' : ''}}旅客人数同比</view>
|
||
|
2 years ago
|
<view class="rate_item_input">
|
||
|
2 years ago
|
{{formatDigit(item.passengerYoy)}}%
|
||
|
2 years ago
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
<view class="form_item_remark">
|
||
|
|
<view class="form_item_label">备注:</view>
|
||
|
|
<view class="form_item_input">
|
||
|
2 years ago
|
<uni-easyinput v-model="item.remarks"
|
||
|
2 years ago
|
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入备注信息" type="textarea" maxlength="200"
|
||
|
|
autoHeight></uni-easyinput>
|
||
|
|
</view>
|
||
|
2 years ago
|
</view>
|
||
|
|
<view class="line" v-if="form.passengerShipDTOList.length > 1"></view>
|
||
|
2 years ago
|
</view>
|
||
|
|
|
||
|
|
<!-- 国际邮轮 -->
|
||
|
2 years ago
|
<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">
|
||
|
2 years ago
|
<picker :value="routeIndex" :range="internationalRouteList" range-key="route" @change="e => changeRoute(e, index)">
|
||
|
2 years ago
|
<text class="picker_select"
|
||
|
2 years ago
|
:style="item.route?'color:#333;':''">{{item.route?item.route:'请选择'}}</text>
|
||
|
2 years ago
|
<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">
|
||
|
2 years ago
|
<picker :value="voyageIndex" :range="item.routeIndex ? internationalRouteList[item.routeIndex].voyageInfoVOList : []" range-key="voyageCode" @change="e => changeVoyage(e, index)">
|
||
|
2 years ago
|
<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">
|
||
|
2 years ago
|
<uni-easyinput @blur="calcYoyMom(2,index)" @clear="calcYoyMom(2,index)" v-model="item.passengerCount" type="number"
|
||
|
2 years ago
|
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>
|
||
|
2 years ago
|
</view>
|
||
|
|
<view class="form_item_remark">
|
||
|
|
<view class="form_item_label">备注:</view>
|
||
|
|
<view class="form_item_input">
|
||
|
2 years ago
|
<uni-easyinput v-model="item.remarks"
|
||
|
2 years ago
|
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入备注信息" type="textarea" maxlength="200"
|
||
|
|
autoHeight></uni-easyinput>
|
||
|
|
</view>
|
||
|
2 years ago
|
</view>
|
||
|
|
<view class="line" v-if="form.internationalCruiseDTOList.length > 1"></view>
|
||
|
2 years ago
|
</view>
|
||
|
2 years ago
|
<view class="add_btn" @click="addRow">增行</view>
|
||
|
2 years ago
|
</view>
|
||
|
|
<!-- 底部按钮 -->
|
||
|
|
<view class="foot_btn">
|
||
|
|
<view class="act_btn blue" @click="doSubmit">{{btnText}}</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</template>
|
||
|
|
<script>
|
||
|
|
import {
|
||
|
|
getDateStr,
|
||
|
|
checkNotEmpty
|
||
|
|
} from "../../../common/util.js"
|
||
|
|
export default {
|
||
|
|
data() {
|
||
|
|
return {
|
||
|
|
form: {
|
||
|
2 years ago
|
"internationalCruiseDTOList": [{
|
||
|
|
"route": "",
|
||
|
|
"routeIndex": "",
|
||
|
|
"voyage": "",
|
||
|
|
"voyageIndex": "",
|
||
|
|
"direction": "",
|
||
|
|
"passengerCount": "",
|
||
|
|
"passengerDod": "",//环比
|
||
|
|
"passengerYoy": "",//同比
|
||
|
|
}],//国际客运
|
||
|
|
"passengerShipDTOList":[{
|
||
|
|
"route": "",
|
||
|
|
"routeIndex": "",
|
||
|
|
"voyage": "",
|
||
|
|
"voyageIndex": "",
|
||
|
|
"direction": "",
|
||
|
|
"passengerCount": "",
|
||
|
|
"passengerDod": "",//环比
|
||
|
|
"passengerYoy": "",//同比
|
||
|
|
}],//客班轮
|
||
|
|
"organizationName": "",
|
||
|
2 years ago
|
"statDate": "",
|
||
|
|
"statPeriod": ""
|
||
|
|
}, //登录form
|
||
|
|
stationList: [], //车站列表
|
||
|
|
railwayNameIndex: '',
|
||
|
2 years ago
|
shipRouteList: [], //客班轮航线
|
||
|
|
internationalRouteList: [], //国际邮轮航线
|
||
|
2 years ago
|
array: [], //时段选择列表
|
||
|
|
index: 2, //时段选择,默认0-24
|
||
|
|
userInfo: {},
|
||
|
|
pageType: '',
|
||
|
|
btnText: '保存',
|
||
|
2 years ago
|
tabType: 1,
|
||
|
|
deptNameList: [], //当前登录人所在单位
|
||
|
2 years ago
|
mobile: getApp().globalData.mobile
|
||
|
2 years ago
|
}
|
||
|
|
},
|
||
|
|
onLoad(options) {
|
||
|
|
this.userInfo = uni.getStorageSync('userInfo');
|
||
|
2 years ago
|
let arr = uni.getStorageSync('deptName');
|
||
|
|
this.deptNameList = checkNotEmpty(arr) ? arr : [];
|
||
|
2 years ago
|
if (options.type == 'add') {
|
||
|
2 years ago
|
this.form.organizationName = this.deptNameList.length > 0 ? this.deptNameList[0].deptName : '';
|
||
|
|
this.form.organizationNameIndex = this.deptNameList.length > 0 ? 0 : '';
|
||
|
2 years ago
|
this.pageType = 'add';
|
||
|
|
let now = new Date();
|
||
|
|
this.form.statDate = getDateStr(now, -1); //默认前一天
|
||
|
2 years ago
|
this.queryTime(); //统计时段
|
||
|
|
this.queryRoute();
|
||
|
2 years ago
|
} else if (options.id) {
|
||
|
|
this.btnText = '修改并保存';
|
||
|
2 years ago
|
this.$request(getApp().globalData.baseUrl + '/api/biz/internationalPassengerTransport/selectById/' + options.id, {}, "GET").then(
|
||
|
2 years ago
|
res => {
|
||
|
|
this.form = res.data;
|
||
|
2 years ago
|
if (checkNotEmpty(this.deptNameList)) {
|
||
|
|
let idx = this.deptNameList.findIndex(item => item.deptName = this.form.organizationName);
|
||
|
|
this.form.organizationNameIndex = idx > -1 ? idx : '';
|
||
|
|
}
|
||
|
2 years ago
|
this.queryTime(); //统计时段
|
||
|
|
this.queryRoute();
|
||
|
2 years ago
|
});
|
||
|
|
}
|
||
|
|
},
|
||
|
2 years ago
|
methods: {
|
||
|
|
//航线查询
|
||
|
|
queryRoute() {
|
||
|
|
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 : '';
|
||
|
|
if(idx > -1) {
|
||
|
|
let _idx = this.shipRouteList[idx].voyageInfoVOList.findIndex(item2 => item2.voyageCode == item.voyage);
|
||
|
|
item.voyageIndex = _idx > -1 ? _idx : '';
|
||
|
|
}
|
||
|
|
})
|
||
|
|
this.form.internationalCruiseDTOList.map(item => {
|
||
|
|
let idx = this.shipRouteList.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);
|
||
|
|
item.voyageIndex = _idx > -1 ? _idx : '';
|
||
|
|
}
|
||
|
|
})
|
||
|
|
})
|
||
|
|
},
|
||
|
2 years ago
|
//切换管理单位
|
||
|
|
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);
|
||
|
|
}
|
||
|
|
},
|
||
|
2 years ago
|
//只保留两位小数
|
||
|
|
formatDigit(data) {
|
||
|
|
return !checkNotEmpty(data) ? '--' : (data+'').indexOf('.') > -1 && (data+'').substring((data+'').indexOf('.')).length > 2 ? data.toFixed(2) : data;
|
||
|
|
},
|
||
|
|
//环比同比
|
||
|
|
queryYoyMom() {
|
||
|
|
if (this.form.statDate == '' || this.form.statPeriod == '') {
|
||
|
|
return;
|
||
|
2 years ago
|
}
|
||
|
|
//客班轮
|
||
|
|
this.form.passengerShipDTOList.map((item,index) => {
|
||
|
|
if(checkNotEmpty(item.voyage)) {
|
||
|
|
this.calcYoyMom(1,index);
|
||
|
|
}
|
||
|
|
})
|
||
|
|
//国际邮轮
|
||
|
|
this.form.internationalCruiseDTOList.map((item,index) => {
|
||
|
|
if(checkNotEmpty(item.voyage)) {
|
||
|
|
this.calcYoyMom(2,index);
|
||
|
|
}
|
||
|
|
})
|
||
|
2 years ago
|
// let _date = getDateStr(new Date(this.form.statDate), -1);
|
||
|
2 years ago
|
// this.$request(getApp().globalData.baseUrl + '/api/biz/internationalPassengerTransport/getYoYAndMoM?statDate=' + this.form
|
||
|
|
// .statDate + '&statPeriod=' + this.form.statPeriod + '&voyage=' + '&_t=' + Date.parse(new Date()), {}, 'GET')
|
||
|
|
// .then(res => {
|
||
|
|
// this.yoyMom = res.data;
|
||
|
|
// this.calcYoyMom(); //同步更新环比同比
|
||
|
|
// })
|
||
|
2 years ago
|
},
|
||
|
|
//环比同比计算
|
||
|
2 years ago
|
calcYoyMom(type, index) {
|
||
|
|
console.log('同比环比计算')
|
||
|
|
let _voyage = type==1?this.form.passengerShipDTOList[index].voyage : this.form.internationalCruiseDTOList[index].voyage;
|
||
|
|
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 => {
|
||
|
|
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);
|
||
|
|
}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);
|
||
|
|
}
|
||
|
|
})
|
||
|
2 years ago
|
},
|
||
|
2 years ago
|
//航线选择
|
||
|
|
changeRoute(e, index) {
|
||
|
|
if(this.tabType == 1) {
|
||
|
|
//客班轮
|
||
|
2 years ago
|
//判断是否重复选择
|
||
|
|
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;
|
||
|
|
}
|
||
|
2 years ago
|
}else{
|
||
|
|
//国际邮轮
|
||
|
2 years ago
|
//判断是否重复选择
|
||
|
|
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;
|
||
|
|
}
|
||
|
2 years ago
|
}
|
||
|
|
},
|
||
|
|
//航次选择
|
||
|
|
changeVoyage(e, index) {
|
||
|
|
if(this.tabType == 1) {
|
||
|
|
//客班轮
|
||
|
2 years ago
|
//判断是否重复选择
|
||
|
|
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) {
|
||
|
|
uni.showToast({
|
||
|
|
title: '客班轮航次不能重复选择',
|
||
|
|
icon: 'none'
|
||
|
|
});
|
||
|
|
}
|
||
|
|
else{
|
||
|
|
this.form.passengerShipDTOList[index].voyageIndex = e.detail.value;
|
||
|
|
this.form.passengerShipDTOList[index].voyage = this.shipRouteList[routeIndex].voyageInfoVOList[e.detail.value].voyageCode;
|
||
|
|
}
|
||
|
2 years ago
|
}else{
|
||
|
|
//国际邮轮
|
||
|
2 years ago
|
//判断是否重复选择
|
||
|
|
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) {
|
||
|
|
uni.showToast({
|
||
|
|
title: '国际邮轮航次不能重复选择',
|
||
|
|
icon: 'none'
|
||
|
|
});
|
||
|
|
}
|
||
|
2 years ago
|
this.form.internationalCruiseDTOList[index].voyageIndex = e.detail.value;
|
||
|
2 years ago
|
this.form.internationalCruiseDTOList[index].voyage = this.internationalRouteList[routeIndex].voyageInfoVOList[e.detail.value].voyageCode;
|
||
|
2 years ago
|
}
|
||
|
2 years ago
|
},
|
||
|
|
//统计时段切换选择
|
||
|
|
changeStatPeriod(e) {
|
||
|
|
this.index = e.detail.value;
|
||
|
|
this.form.statPeriod = this.array[e.detail.value].dictValue;
|
||
|
|
console.log('change 时段', this.form);
|
||
|
|
this.queryYoyMom();
|
||
|
|
},
|
||
|
|
//选择统计日期
|
||
|
|
bindDateChange(e) {
|
||
|
|
this.form.statDate = e.detail.value;
|
||
|
|
this.queryYoyMom();
|
||
|
|
},
|
||
|
|
//时段
|
||
|
|
queryTime() {
|
||
|
|
this.$request(getApp().globalData.baseUrl + '/api/dict/dictList?dictType=airport_time' + '&_t=' + Date
|
||
|
|
.parse(
|
||
|
|
new Date()), {}, 'GET').then(res => {
|
||
|
|
this.array = res.data;
|
||
|
|
if (this.pageType == 'add') {
|
||
|
|
let now = new Date();
|
||
|
|
//11:00-13:30 默认选择0-12
|
||
|
|
let dateStr = getDateStr(now, 0);
|
||
|
|
if (new Date(dateStr + ' 11:00').getTime() < new Date().getTime() && new Date().getTime() <
|
||
|
|
new Date(dateStr +
|
||
|
|
' 13:30').getTime()) {
|
||
|
|
this.form.statPeriod = '0012';
|
||
|
2 years ago
|
let idx = this.array.findIndex(item => item.dictValue == '0012');
|
||
|
2 years ago
|
this.index = idx > -1 ? idx : '';
|
||
|
|
} else {
|
||
|
|
this.form.statPeriod = '03'; //默认0-24
|
||
|
2 years ago
|
let idx = this.array.findIndex(item => item.dictValue == '03');
|
||
|
2 years ago
|
this.index = idx > -1 ? idx : '';
|
||
|
|
}
|
||
|
|
} else {
|
||
|
2 years ago
|
let idx = this.array.findIndex(item => item.dictValue == this.form.statPeriod);
|
||
|
2 years ago
|
this.index = idx > -1 ? idx : '';
|
||
|
2 years ago
|
}
|
||
|
2 years ago
|
this.queryYoyMom(); //同比环比
|
||
|
|
})
|
||
|
|
},
|
||
|
|
//确认提交
|
||
|
|
doSubmit() {
|
||
|
|
if (!checkNotEmpty(this.form.statDate) || !checkNotEmpty(this.form.statPeriod)) {
|
||
|
|
uni.showToast({
|
||
|
|
title: '报送日期和时段不能为空',
|
||
|
|
icon: 'none'
|
||
|
|
})
|
||
|
|
return;
|
||
|
|
}
|
||
|
2 years ago
|
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) {
|
||
|
2 years ago
|
uni.showToast({
|
||
|
2 years ago
|
title: '客班轮信息请填写完整',
|
||
|
2 years ago
|
icon: 'none'
|
||
|
|
})
|
||
|
|
return;
|
||
|
|
}
|
||
|
2 years ago
|
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) {
|
||
|
2 years ago
|
uni.showToast({
|
||
|
2 years ago
|
title: '国际邮轮信息请填写完整',
|
||
|
2 years ago
|
icon: 'none'
|
||
|
|
})
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
uni.showModal({
|
||
|
|
title: '提示',
|
||
|
|
content: this.form.id == undefined ? '您确认提交该条报送数据?' : '您确认将该条数据进行修改?',
|
||
|
|
success: (res) => {
|
||
|
|
if (res.confirm) {
|
||
|
|
this.submitForm();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
})
|
||
|
|
},
|
||
|
|
submitForm() {
|
||
|
|
uni.showLoading({
|
||
|
|
title: '提交中...',
|
||
|
|
mask: true
|
||
|
|
})
|
||
|
2 years ago
|
this.$request(getApp().globalData.baseUrl + '/api/biz/internationalPassengerTransport/saveOrUpdate', this.form,
|
||
|
2 years ago
|
'POST').then(res => {
|
||
|
|
uni.hideLoading();
|
||
|
|
if (res.code == 200) {
|
||
|
|
uni.showToast({
|
||
|
|
title: '报送提交成功',
|
||
|
|
icon: 'none',
|
||
|
|
success: () => {
|
||
|
|
if (this.form.id == undefined) {
|
||
|
|
setTimeout(() => {
|
||
|
|
uni.redirectTo({
|
||
|
|
url: '/pages/railway/railwayRunData/list'
|
||
|
|
})
|
||
|
|
}, 300)
|
||
|
|
} else {
|
||
|
|
uni.navigateBack();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
})
|
||
|
|
}
|
||
|
|
}).catch(() => {
|
||
|
|
uni.hideLoading();
|
||
|
|
})
|
||
|
|
},
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style lang="scss" scoped>
|
||
|
|
.form_warp {
|
||
|
|
padding: 30rpx 30rpx 195rpx;
|
||
|
|
|
||
|
|
.form_intro {
|
||
|
|
color: #666;
|
||
|
|
font-size: 26rpx;
|
||
|
|
font-family: PingFang SC-Bold, PingFang SC;
|
||
|
|
line-height: 48rpx;
|
||
|
|
text-align: center;
|
||
|
|
margin-bottom: 20rpx;
|
||
|
|
|
||
|
|
.tel {
|
||
|
|
color: #2D8CF0;
|
||
|
|
font-weight: bold;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
.form_item_box {
|
||
|
|
padding: 30rpx 20rpx 30rpx 30rpx;
|
||
|
|
background-color: #fff;
|
||
|
|
border-radius: 30rpx;
|
||
|
|
|
||
|
|
//环比同比
|
||
|
|
.form_item_rate {
|
||
|
|
background: #F6F6F6;
|
||
|
|
border: 1px solid #F6F6F6;
|
||
|
|
padding: 30rpx;
|
||
|
|
margin-bottom: 30rpx;
|
||
|
|
border-radius: 30rpx;
|
||
|
|
|
||
|
|
.line {
|
||
|
|
height: 1px;
|
||
|
|
background-color: #dfdfdf;
|
||
|
|
margin: 30rpx 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
.rate_item {
|
||
|
|
display: flex;
|
||
|
|
justify-content: space-between;
|
||
|
|
font-size: 24rpx;
|
||
|
|
font-family: PingFang SC-Regular, PingFang SC;
|
||
|
|
font-weight: 400;
|
||
|
|
|
||
|
|
.rate_item_label {
|
||
|
|
color: #666;
|
||
|
|
font-size: 24rpx;
|
||
|
|
}
|
||
|
|
|
||
|
|
.rate_item_input {
|
||
|
|
color: #333;
|
||
|
|
font-size: 28rpx;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
&.danger {
|
||
|
|
background-color: #FEF6F3;
|
||
|
|
border-color: #F0622D;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
.form_item_title {
|
||
|
|
color: #333;
|
||
|
|
line-height: 42rpx;
|
||
|
|
font-size: 30rpx;
|
||
|
|
font-family: PingFang SC-Bold, PingFang SC;
|
||
|
|
font-weight: bold;
|
||
|
|
margin-bottom: 30rpx;
|
||
|
|
}
|
||
|
|
|
||
|
|
.form_item_remark {
|
||
|
|
margin-bottom: 30rpx;
|
||
|
|
|
||
|
|
.form_item_label {
|
||
|
|
color: #333333;
|
||
|
|
line-height: 42rpx;
|
||
|
|
font-size: 30rpx;
|
||
|
|
font-family: PingFang SC-Bold, PingFang SC;
|
||
|
|
font-weight: bold;
|
||
|
|
margin-bottom: 30rpx;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
.form_item {
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
justify-content: space-between;
|
||
|
|
line-height: 37rpx;
|
||
|
|
font-family: PingFang SC-Regular, PingFang SC;
|
||
|
|
font-weight: 400;
|
||
|
|
margin-bottom: 30rpx;
|
||
|
|
|
||
|
|
.form_item_label {
|
||
|
|
width: 260rpx;
|
||
|
|
color: #666666;
|
||
|
|
font-size: 26rpx;
|
||
|
|
word-break: break-all;
|
||
|
|
}
|
||
|
|
|
||
|
|
.form_item_input {
|
||
|
|
color: #333;
|
||
|
|
text-align: right;
|
||
|
|
word-break: break-all;
|
||
|
|
|
||
|
|
&.picker {
|
||
|
|
flex: 1;
|
||
|
|
// display: flex;
|
||
|
|
// justify-content: space-between;
|
||
|
|
|
||
|
|
// /deep/ picker {
|
||
|
|
// flex: 1;
|
||
|
|
// }
|
||
|
|
|
||
|
|
.picker_select {
|
||
|
|
color: #D4D4D4;
|
||
|
|
font-size: 28rpx;
|
||
|
|
font-family: PingFang SC-Regular, PingFang SC;
|
||
|
|
font-weight: 400;
|
||
|
|
text-align: right;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
//纯展示
|
||
|
|
&.text {
|
||
|
|
color: #333333;
|
||
|
|
line-height: 40rpx;
|
||
|
|
font-size: 28rpx;
|
||
|
|
font-family: PingFang SC-Regular, PingFang SC;
|
||
|
|
font-weight: 400;
|
||
|
|
}
|
||
|
|
|
||
|
|
//输入框
|
||
|
|
&.form_input {
|
||
|
|
/deep/ .is-input-border {
|
||
|
|
border: 0 !important;
|
||
|
|
|
||
|
|
.uni-easyinput__content-input {
|
||
|
|
height: 35rpx !important;
|
||
|
|
text-align: right;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
/deep/ .uni-date-x--border {
|
||
|
|
border: 0 !important;
|
||
|
|
|
||
|
|
.uni-date__x-input {
|
||
|
|
// height: 35rpx !important;
|
||
|
|
text-align: right;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
//收费站
|
||
|
|
.station_box {
|
||
|
|
display: flex;
|
||
|
|
flex-wrap: wrap;
|
||
|
|
margin-top: 40rpx;
|
||
|
|
|
||
|
|
.station_item {
|
||
|
|
height: 60rpx;
|
||
|
|
color: #666666;
|
||
|
|
line-height: 60rpx;
|
||
|
|
font-size: 26rpx;
|
||
|
|
font-family: PingFang SC-Regular, PingFang SC;
|
||
|
|
font-weight: 400;
|
||
|
|
border-radius: 20rpx;
|
||
|
|
border: 1rpx solid #C1C1C1;
|
||
|
|
padding: 0 20rpx;
|
||
|
|
margin-bottom: 40rpx;
|
||
|
|
margin-right: 20rpx;
|
||
|
|
|
||
|
|
&.active {
|
||
|
|
position: relative;
|
||
|
|
color: #1ECE5F;
|
||
|
|
border-color: #1ECE5F;
|
||
|
|
background: #EBFAF2;
|
||
|
|
|
||
|
|
.tag {
|
||
|
|
position: absolute;
|
||
|
|
top: 0;
|
||
|
|
right: 0;
|
||
|
|
width: 34rpx;
|
||
|
|
height: 23rpx;
|
||
|
|
background: #1ECE5F;
|
||
|
|
border-radius: 0rpx 20rpx 0rpx 5rpx;
|
||
|
|
text-align: center;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
.foot_btn {
|
||
|
|
position: fixed;
|
||
|
|
left: 0;
|
||
|
|
right: 0;
|
||
|
|
bottom: 0;
|
||
|
|
display: flex;
|
||
|
|
justify-content: space-between;
|
||
|
|
padding: 40rpx 30rpx;
|
||
|
|
background-color: #f5f5f5;
|
||
|
|
z-index: 11;
|
||
|
|
|
||
|
|
.act_btn {
|
||
|
|
width: 690rpx;
|
||
|
|
height: 90rpx;
|
||
|
|
color: #666666;
|
||
|
|
font-size: 28rpx;
|
||
|
|
line-height: 90rpx;
|
||
|
|
font-family: PingFang SC-Regular, PingFang SC;
|
||
|
|
font-weight: 400;
|
||
|
|
text-align: center;
|
||
|
|
background: #F6F6F6;
|
||
|
|
border-radius: 100rpx;
|
||
|
|
border: 1rpx solid #C1C1C1;
|
||
|
|
|
||
|
|
&.blue {
|
||
|
|
color: #fff;
|
||
|
|
background: #2D8CF0;
|
||
|
|
border-color: #2D8CF0;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
//增行
|
||
|
|
.line {
|
||
|
|
height: 1px;
|
||
|
|
background-color: #E1E1E1;
|
||
|
|
}
|
||
|
|
|
||
|
|
.add_btn {
|
||
|
|
height: 90rpx;
|
||
|
|
line-height: 90rpx;
|
||
|
|
color: #2D8CF0;
|
||
|
|
font-size: 28rpx;
|
||
|
|
font-family: PingFang SC-Regular, PingFang SC;
|
||
|
|
font-weight: 400;
|
||
|
|
text-align: center;
|
||
|
|
background: #ECF5FF;
|
||
|
|
border-radius: 30rpx;
|
||
|
|
border: 2rpx solid #2D8CF0;
|
||
|
|
margin-top: 30rpx;
|
||
|
|
}
|
||
|
|
|
||
|
|
.tab_box {
|
||
|
|
display: flex;
|
||
|
|
justify-content: space-around;
|
||
|
|
|
||
|
|
.tab_nav {
|
||
|
|
color: #999999;
|
||
|
|
line-height: 42rpx;
|
||
|
|
font-size: 30rpx;
|
||
|
|
font-family: PingFang SC-Regular, PingFang SC;
|
||
|
|
font-weight: 400;
|
||
|
|
padding-bottom: 25rpx;
|
||
|
|
|
||
|
|
&.active {
|
||
|
|
position: relative;
|
||
|
|
color: #2D8CF0;
|
||
|
|
font-weight: bold;
|
||
|
|
|
||
|
|
&::after {
|
||
|
|
position: absolute;
|
||
|
|
content: '';
|
||
|
|
left: 50%;
|
||
|
|
bottom: 0;
|
||
|
|
width: 74rpx;
|
||
|
|
height: 6rpx;
|
||
|
|
background: #2D8CF0;
|
||
|
|
border-radius: 100rpx;
|
||
|
|
margin-left: -37rpx;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
button {
|
||
|
|
background-color: #007aff;
|
||
|
|
color: #ffffff;
|
||
|
|
}
|
||
|
2 years ago
|
</style>
|