路由更名;国际客运接口联调

main
张群 2 years ago
parent 4539bcf802
commit 7c7e29ab20
  1. 8
      pages.json
  2. 4
      pages/airport/airport-runData/form.vue
  3. 8
      pages/home/index.vue
  4. 38
      pages/metro/subwayPage/form.vue
  5. 0
      pages/metro/subwayPage/list.vue
  6. 172
      pages/portShipping/waterInternational/form.vue
  7. 4
      pages/portShipping/waterInternational/list.vue
  8. 2
      pages/water/waterWay/form.vue

@ -136,25 +136,25 @@
}
},
{
"path": "pages/portShipping/internationalTransport/form",
"path": "pages/portShipping/waterInternational/form",
"style": {
"navigationBarTitleText": "水路国际客运报送"
}
},
{
"path": "pages/portShipping/internationalTransport/list",
"path": "pages/portShipping/waterInternational/list",
"style": {
"navigationBarTitleText": "水路国际客运"
}
},
{
"path": "pages/metro/runData/form",
"path": "pages/metro/subwayPage/form",
"style": {
"navigationBarTitleText": "地铁客流量报送"
}
},
{
"path": "pages/metro/runData/list",
"path": "pages/metro/subwayPage/list",
"style": {
"navigationBarTitleText": "地铁客流量"
}

@ -425,7 +425,7 @@
if (options.type == 'add') {
this.pageType = 'add';
let now = new Date();
this.form.affiliatedUnit = this.userInfo.organizationName ? this.userInfo.organizationName : '';
// this.form.affiliatedUnit = this.userInfo.organizationName ? this.userInfo.organizationName : '';
this.form.statDate = getDateStr(now, -1); //
this.queryTime(); //
} else if(options.item) {
@ -568,7 +568,7 @@
})
return;
}
if (!checkNotEmpty(this.form.inPassengersYoyIn) || !checkNotEmpty(this.form.outboundFlightsIn)) {
if (!checkNotEmpty(this.form.inboundFlightsIn) || !checkNotEmpty(this.form.outboundFlightsIn)) {
uni.showToast({
title: '国际入青/出青航班架次不能为空',
icon: 'none'

@ -90,8 +90,8 @@
<style lang="scss" scoped>
.highway_home {
position: relative;
height: calc(100vh - 50rpx);
padding: 0 50rpx 50rpx;
height: calc(100vh - 140rpx);
padding: 0 50rpx 140rpx;
background-color: #fff;
overflow: auto;
.act_btn_loginout{
@ -161,12 +161,14 @@
position: fixed;
left: 0;
right: 0;
bottom: 44rpx;
bottom: 0;
padding: 20rpx 0 44rpx;
color: #666;
font-size: 26rpx;
font-family: PingFang SC-Bold, PingFang SC;
line-height: 48rpx;
text-align: center;
background: #fff;
.tel{
color: #2D8CF0;
font-weight: bold;

@ -8,8 +8,14 @@
<view class="form_item_title">基本信息</view>
<view class="form_item">
<view class="form_item_label">所属单位</view>
<view class="form_item_input select">
{{form.affiliatedUnit}}
<view class="form_item_input picker">
<picker v-if="pageType == 'add' && deptNameList.length > 1" :value="form.organizationNameIndex"
:range="deptNameList" range-key="deptName" @change="bindDeptChange">
<text class="picker_select"
: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">
@ -128,12 +134,17 @@
userInfo: {},
pageType: '',
btnText: '保存',
mobile: getApp().globalData.mobile
mobile: getApp().globalData.mobile,
deptNameList: []
}
},
onLoad(options) {
this.userInfo = uni.getStorageSync('userInfo');
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); //
@ -148,12 +159,29 @@
this.btnText = '修改并保存';
this.$request(getApp().globalData.baseUrl + '/api/biz/railwayRunSituation/find//' + options.id, {}, "GET")
.then(res => {
this.form = res.data;
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: {
methods: {
//
bindDeptChange(e) {
this.form.organizationNameIndex = e.detail.value;
this.form.organizationName = this.deptNameList[e.detail.value].deptName;
},
call(tel) {
uni.makePhoneCall({
phoneNumber: tel
});
},
formatDigit(data) {
return !checkNotEmpty(data) ? '--' : (data+'').indexOf('.') > -1 && (data+'').substring((data+'').indexOf('.')).length > 2 ? data.toFixed(2) : data;
},
call(tel) {
uni.makePhoneCall({
phoneNumber: tel

@ -55,9 +55,9 @@
<view class="form_item">
<view class="form_item_label">航线</view>
<view class="form_item_input picker">
<picker :value="routeIndex" :range="shipRouteList" @change="e => changeRoute(e, index)">
<picker :value="routeIndex" :range="shipRouteList" range-key="route" @change="e => changeRoute(e, index)">
<text class="picker_select"
:style="item.route?'color:#333;':''">{{item.route?form.route:'请选择'}}</text>
:style="item.route?'color:#333;':''">{{item.route?item.route:'请选择'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</picker>
</view>
@ -65,7 +65,7 @@
<view class="form_item">
<view class="form_item_label">航次</view>
<view class="form_item_input picker">
<picker :value="voyageIndex" :range="shipVoyageList" @change="e => changeVoyage(e, index)">
<picker :value="voyageIndex" :range="item.routeIndex ? 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>
@ -75,7 +75,7 @@
<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"
<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">
</uni-easyinput>
</view>
@ -121,9 +121,9 @@
<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)">
<picker :value="routeIndex" :range="internationalRouteList" range-key="route" @change="e => changeRoute(e, index)">
<text class="picker_select"
:style="item.route?'color:#333;':''">{{item.route?form.route:'请选择'}}</text>
:style="item.route?'color:#333;':''">{{item.route?item.route:'请选择'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</picker>
</view>
@ -131,7 +131,7 @@
<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)">
<picker :value="voyageIndex" :range="item.routeIndex ? 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>
@ -141,7 +141,7 @@
<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"
<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">
</uni-easyinput>
</view>
@ -220,9 +220,7 @@
stationList: [], //
railwayNameIndex: '',
shipRouteList: [], //线
shipVoyageList: [],//
internationalRouteList: [], //线
internationalVoyageList: [],//
array: [], //
index: 2, //,0-24
userInfo: {},
@ -235,7 +233,6 @@
},
onLoad(options) {
this.userInfo = uni.getStorageSync('userInfo');
this.queryStation(); //
let arr = uni.getStorageSync('deptName');
this.deptNameList = checkNotEmpty(arr) ? arr : [];
if (options.type == 'add') {
@ -244,21 +241,47 @@
this.pageType = 'add';
let now = new Date();
this.form.statDate = getDateStr(now, -1); //
this.queryTime(); //
this.queryTime(); //
this.queryRoute();
} else if (options.id) {
this.btnText = '修改并保存';
this.$request(getApp().globalData.baseUrl + '/api/biz/railwayRunData/find/' + options.id, {}, "GET").then(
this.$request(getApp().globalData.baseUrl + '/api/biz/internationalPassengerTransport/selectById/' + 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(); //
this.queryTime(); //
this.queryRoute();
});
}
},
methods: {
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 : '';
}
})
})
},
//
bindDeptChange(e) {
this.form.organizationNameIndex = e.detail.value;
@ -307,60 +330,107 @@
queryYoyMom() {
if (this.form.statDate == '' || this.form.statPeriod == '') {
return;
}
}
//
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);
}
})
// let _date = getDateStr(new Date(this.form.statDate), -1);
this.$request(getApp().globalData.baseUrl + '/api/biz/railwayRunData/getYoYMoM?statDate=' + this.form
.statDate + '&statPeriod=' + this.form.statPeriod + '&_t=' + Date.parse(new Date()), {}, 'GET')
.then(res => {
this.yoyMom = res.data;
this.calcYoyMom(); //
})
// 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(); //
// })
},
//
calcYoyMom() {
console.log('同比环比计算')
this.form.inRailwayYomDo = this.$calcMom(this.form.inRailwayYomDo,this.yoyMom.yesterdayData.inboundRailwayDo);
this.form.inPepoleYoyDo = this.$calcMom(this.form.inPepole,this.yoyMom.yesterdayData.inPepole);
this.form.outRailwayYomDo = this.$calcMom(this.form.outboundRailwayDo,this.yoyMom.yesterdayData.outboundRailwayDo);
this.form.outPepoleYoyDo = this.$calcMom(this.form.outPepole,this.yoyMom.yesterdayData.outPepole);
this.form.inRailwayMomDo = this.$calcYoy(this.form.inboundRailwayDo,this.yoyMom.lastYearData.inboundRailwayDo);
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);
},
//
queryStation() {
this.$request(getApp().globalData.baseUrl + '/api/biz/railwayRunData/getCurrentSite?_t=' + Date.parse(
new Date()), {}, 'GET').then(res => {
this.stationList = res.data;
if (this.pageType == 'add') {
this.form.railwayName = res.data[0];
this.railwayNameIndex = 0;
}
})
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);
}
})
},
//线
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;
//
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;
}
}else{
//
this.form.internationalCruiseDTOList[index].routeIndex = e.detail.value;
this.form.internationalCruiseDTOList[index].route = this.internationalRouteList[e.detail.value].name;
//
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;
}
}
},
//
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;
//
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;
}
}else{
//
//
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'
});
}
this.form.internationalCruiseDTOList[index].voyageIndex = e.detail.value;
this.form.internationalCruiseDTOList[index].voyage = this.internationalVoyageList[e.detail.value].name;
this.form.internationalCruiseDTOList[index].voyage = this.internationalRouteList[routeIndex].voyageInfoVOList[e.detail.value].voyageCode;
}
},
//
@ -453,7 +523,7 @@
title: '提交中...',
mask: true
})
this.$request(getApp().globalData.baseUrl + '/api/biz/railwayRunData/saveOrUpdate', this.form,
this.$request(getApp().globalData.baseUrl + '/api/biz/internationalPassengerTransport/saveOrUpdate', this.form,
'POST').then(res => {
uni.hideLoading();
if (res.code == 200) {

@ -11,8 +11,6 @@
:contentText="contentText"></uni-load-more>
<!-- 筛选 -->
<view class="foot_btn_box">
<!-- <view @click="goPage('/pages/highway/runStatusData/form?type=add')" class="act_btn"><uni-icons type="plusempty"
size="18" color="#fff" style="margin-right: 9rpx;"></uni-icons></view> -->
<view @click="showSearch" class="act_btn btn1"><uni-icons type="search" size="18" color="#2D8CF0"
style="margin-right: 9rpx;"></uni-icons>
</view>
@ -144,7 +142,7 @@
Object.keys(this.query).map(key => {
params = params + '&' + key + '=' + this.query[key]
})
this.$request(getApp().globalData.baseUrl + '/api/biz/highSpeedOperationController/list?page=' + this.current +
this.$request(getApp().globalData.baseUrl + '/api/biz/internationalPassengerTransport/list?page=' + this.current +
'&pageSize=' + this.size + '&_t=' + Date.parse(new Date()) + params, {}, 'GET').then(res => {
if (res.code == 200) {
this.data = this.data.concat(res.data.list);

@ -283,7 +283,7 @@
//
let idx = this.form.bizWaterwayIslandDataSaveOrUpdateDTOList.findIndex(item => item.landNameIndex == e.detail
.value);
if (idx > -1 && this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index].landNameIndex == '') {
if (idx > -1 && this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index].landNameIndex !== idx) {
uni.showToast({
title: '水运(陆岛)不能重复选择',
icon: 'none'

Loading…
Cancel
Save