20231008权限报送变更需求

dev201310
zhangqun 3 years ago
parent 75fe6f23ff
commit 8848a17b9a
  1. 4
      pages.json
  2. 98
      pages/bus/busDataInfo/form.vue
  3. 28
      pages/highWay/runData/form.vue
  4. 2
      pages/highWay/runData/list.vue
  5. 2
      pages/highWay/runStatusData/list.vue
  6. 2
      pages/home/index.vue
  7. 707
      pages/portShipping/waterInternational/form.vue
  8. 431
      pages/railway/railwayRunData/form.vue
  9. 2
      pages/railway/railwayRunData/list.vue
  10. 77
      pages/roadTransport/transportData/form.vue
  11. 83
      pages/roadTransport/transportData/list.vue
  12. 56
      pages/water/waterWay/form.vue

@ -2,7 +2,7 @@
"pages": [{
"path": "pages/home/home",
"style": {
"navigationBarTitleText": "交通运输报送系统"
"navigationBarTitleText": "青岛交通信息"
}
},
{
@ -14,7 +14,7 @@
{
"path": "pages/login/login",
"style": {
"navigationBarTitleText": "交通运输报送系统",
"navigationBarTitleText": "青岛交通信息",
"navigationBarBackgroundColor": "#2D8CF0"
}
},

@ -38,6 +38,85 @@
</picker>
</view>
</view>
<!-- 汇总统计 -->
<view class="form_item">
<view class="form_item_label">投入车辆统计</view>
<view class="form_item_input">
{{form.entranceVehicleCount === 0 ? form.entranceVehicleCount : form.entranceVehicleCount || ''}}
</view>
</view>
<!-- 同比环比 -->
<view class="form_item_rate"
:class="checkNotEmpty(form.entranceVehicleCount) && form.entranceVehicleCount === yoyMom.minusDaysEntranceVehicleSum ? 'danger' : ''">
<view class="rate_item">
<view class="rate_item_label"
:style="checkNotEmpty(form.entranceVehicleCount) && form.entranceVehicleCount === yoyMom.minusDaysEntranceVehicleSum ?'color: #EB4747':''">
投入车辆统计环比</view>
<view class="rate_item_input"
:style="checkNotEmpty(form.entranceVehicleCount) && form.entranceVehicleCount === yoyMom.minusDaysEntranceVehicleSum ?'color: #EB4747':''">
{{formatDigit(form.entranceVehicleCountMom)}}%
</view>
</view>
<view class="line"></view>
<view class="rate_item">
<view class="rate_item_label">投入车辆统计同比</view>
<view class="rate_item_input">
{{formatDigit(form.entranceVehicleCountYoy)}}%
</view>
</view>
</view>
<view class="form_item">
<view class="form_item_label">人数统计</view>
<view class="form_item_input">
{{form.exitVehicleCount === 0 ? form.exitVehicleCount : form.exitVehicleCount || ''}}
</view>
</view>
<!-- 同比环比 -->
<view class="form_item_rate"
:class="checkNotEmpty(form.exitVehicleCount) && form.exitVehicleCount === yoyMom.minusDaysExitVehicleSum ? 'danger' : ''">
<view class="rate_item">
<view class="rate_item_label"
:style="checkNotEmpty(form.exitVehicleCount) && form.exitVehicleCount === yoyMom.minusDaysExitVehicleSum ?'color: #EB4747':''">
人数统计环比</view>
<view class="rate_item_input"
:style="checkNotEmpty(form.exitVehicleCount) && form.exitVehicleCount === yoyMom.minusDaysExitVehicleSum ?'color: #EB4747':''">
{{formatDigit(form.exitVehicleCountMom)}}%
</view>
</view>
<view class="line"></view>
<view class="rate_item">
<view class="rate_item_label">人数统计同比</view>
<view class="rate_item_input">
{{formatDigit(form.exitVehicleCountYoy)}}%
</view>
</view>
</view>
<view class="form_item">
<view class="form_item_label">班次统计</view>
<view class="form_item_input">
{{form.exitVehicleCount === 0 ? form.exitVehicleCount : form.exitVehicleCount || ''}}
</view>
</view>
<!-- 同比环比 -->
<view class="form_item_rate"
:class="checkNotEmpty(form.exitVehicleCount) && form.exitVehicleCount === yoyMom.minusDaysExitVehicleSum ? 'danger' : ''">
<view class="rate_item">
<view class="rate_item_label"
:style="checkNotEmpty(form.exitVehicleCount) && form.exitVehicleCount === yoyMom.minusDaysExitVehicleSum ?'color: #EB4747':''">
班次统计环比</view>
<view class="rate_item_input"
:style="checkNotEmpty(form.exitVehicleCount) && form.exitVehicleCount === yoyMom.minusDaysExitVehicleSum ?'color: #EB4747':''">
{{formatDigit(form.exitVehicleCountMom)}}%
</view>
</view>
<view class="line"></view>
<view class="rate_item">
<view class="rate_item_label">班次统计同比</view>
<view class="rate_item_input">
{{formatDigit(form.exitVehicleCountYoy)}}%
</view>
</view>
</view>
</view>
<!-- 陆岛权限 -->
<view class="station_box">
@ -246,6 +325,9 @@
phoneNumber: tel
});
},
checkNotEmpty(data) {
return checkNotEmpty(data);
},
formatDigit(data) {
return (data+'').indexOf('.') > -1 && (data+'').substring((data+'').indexOf('.')).length > 2 ? data.toFixed(2) : data;
},
@ -292,20 +374,20 @@
busUnit:item.stationName,
// busIndex:'',
vehicleInput:'',
vehicleInputMom:0,
vehicleInputYoy:0,
operatingShiftsMom:0,
operatingShiftsYoy:0,
vehicleInputMom:'',
vehicleInputYoy:'',
operatingShiftsMom:'',
operatingShiftsYoy:'',
passengerCount:'',
passengerCountMom:0,
passengerCountYoy:0,
passengerCountMom:'',
passengerCountYoy:'',
yestVehicleInput:'',
yestOperatingShifts:'',
yestPassengerCount:'',
lyVehicleInput:'',
lyPassengerCount:'',
lyOperatingShifts:'',
isPassengerCountConvert:0,
isPassengerCountConvert:'',
})
})
} else {
@ -338,7 +420,7 @@
"yestPassengerCount": '',
"yesterdayvehicleInput": '',
"yestOperatingShifts":'',
"isPassengerCountConvert":0,
"isPassengerCountConvert":'',
})
}
})

@ -6,7 +6,7 @@
</view>
<view class="form_item_box">
<view class="form_item_title">基本信息</view>
<view class="form_item">
<!-- <view class="form_item">
<view class="form_item_label">管理单位名称</view>
<view class="form_item_input picker">
<picker v-if="pageType == 'add' && deptNameList.length > 1" :value="form.organizationNameIndex"
@ -17,7 +17,7 @@
</picker>
<text v-else>{{form.organizationName}}</text>
</view>
</view>
</view> -->
<view class="form_item">
<view class="form_item_label">统计日期</view>
<view class="form_item_input picker">
@ -271,11 +271,11 @@
},
onLoad(options) {
this.userInfo = uni.getStorageSync('userInfo');
let arr = uni.getStorageSync('deptName');
this.deptNameList = checkNotEmpty(arr) ? arr : [];
// 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.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); //
@ -307,14 +307,14 @@
this.$request(getApp().globalData.baseUrl + '/api/biz/highwayParentDataController/selectById/' + 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 : '';
if(!checkNotEmpty(this.form.organizationName)) {
this.form.organizationName = this.deptNameList.length > 0 ? this.deptNameList[0].deptName : '';
this.form.organizationNameIndex = this.deptNameList.length > 0 ? 0 : '';
}
}
// if (checkNotEmpty(this.deptNameList)) {
// let idx = this.deptNameList.findIndex(item => item.deptName == this.form.organizationName);
// this.form.organizationNameIndex = idx > -1 ? idx : '';
// if(!checkNotEmpty(this.form.organizationName)) {
// this.form.organizationName = this.deptNameList.length > 0 ? this.deptNameList[0].deptName : '';
// this.form.organizationNameIndex = this.deptNameList.length > 0 ? 0 : '';
// }
// }
this.queryTime();
this.queryStation();
})

@ -7,7 +7,7 @@
{{item.statDate || ''}}<text style="margin-left:16rpx;">{{item.statPeriodValue || ''}}</text>
</view>
</view>
<view class="unit_station">{{item.organizationName || ''}}</view>
<!-- <view class="unit_station">{{item.organizationName || ''}}</view> -->
</view>
<uni-load-more iconType="circle" :status="status" @clickLoadMore="loadMore"
:contentText="contentText"></uni-load-more>

@ -6,7 +6,7 @@
<view class="unit_name">{{item.statDate || ''}}<text
style="margin-left:16rpx;">{{item.statPeriodValue || ''}}</text></view>
</view>
<view class="unit_station">{{item.organizationName || ''}}</view>
<!-- <view class="unit_station">{{item.organizationName || ''}}</view> -->
</view>
<uni-load-more iconType="circle" :status="status" @clickLoadMore="loadMore"
:contentText="contentText"></uni-load-more>

@ -44,7 +44,7 @@
if(this.routersData.length == 0 && options.routers) {
this.routersData = JSON.parse(options.routers);
uni.setNavigationBarTitle({
title: this.routersData.meta.title || '交通运输报送系统'
title: this.routersData.meta.title || '青岛交通信息'
})
this.routersData.children.map((item,index) => {
item.show = index == 0 ? true : false;

@ -9,13 +9,19 @@
<view class="form_item">
<view class="form_item_label">所属单位</view>
<view class="form_item_input picker">
<picker v-if="pageType == 'add' && deptNameList.length > 1" :value="form.organizationNameIndex"
<!-- <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>
<text v-else>{{form.organizationName}}</text> -->
<!-- <view class="pick_pop" @click="showPop" v-if="pageType == 'add' && (treeData.length > 1 || (treeData.length == 1 && treeData[0].children.length > 0))">
<text>{{form.organizationName}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</view>
<text v-else>{{form.organizationName}}</text> -->
{{form.organizationName}}
</view>
</view>
<view class="form_item">
@ -55,9 +61,9 @@
<view class="form_item">
<view class="form_item_label">航线</view>
<view class="form_item_input picker">
<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>
<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>
</picker>
</view>
@ -65,9 +71,10 @@
<view class="form_item">
<view class="form_item_label">航次</view>
<view class="form_item_input picker">
<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>
<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>
</picker>
</view>
@ -75,8 +82,8 @@
<view class="form_item">
<view class="form_item_label">航次数</view>
<view class="form_item_input form_input">
<uni-easyinput @blur="calcYoyMom(1,index)" @clear="calcYoyMom(1,index)" v-model="item.voyageNumber" type="number"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
<uni-easyinput @blur="calcYoyMom(1,index)" @clear="calcYoyMom(1,index)" v-model="item.voyageNumber"
type="number" placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</view>
</view>
@ -103,26 +110,25 @@
<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(1,index)" @clear="calcYoyMom(1,index)" v-model="item.passengerCount" type="number"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
<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>
</view>
<!-- 同比环比 -->
<view class="form_item_rate"
:class="item.passengerDod === 0 ? 'danger' : '' ">
<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' : ''">
<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_label">{{item.direction == '1' ? '入青' : item.direction == '2' ? '出青' : ''}}旅客人数同比
</view>
<view class="rate_item_input">
{{formatDigit(item.passengerYoy)}}%
</view>
@ -131,16 +137,16 @@
<view class="form_item_remark">
<view class="form_item_label">备注</view>
<view class="form_item_input">
<uni-easyinput v-model="item.remarks"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入备注信息" type="textarea" maxlength="200"
autoHeight></uni-easyinput>
<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" v-if="form.passengerShipDTOList.length > 1"></view>
</view>
<!-- 国际邮轮 -->
<view class="form_item_li" v-show="tabType == 2" v-for="(item,index) in form.internationalCruiseDTOList" :key="index">
<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 }}
@ -149,9 +155,9 @@
<view class="form_item">
<view class="form_item_label">航线</view>
<view class="form_item_input picker">
<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>
<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>
</picker>
</view>
@ -159,9 +165,10 @@
<view class="form_item">
<view class="form_item_label">航次</view>
<view class="form_item_input picker">
<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>
<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>
</picker>
</view>
@ -169,8 +176,8 @@
<view class="form_item">
<view class="form_item_label">航次数</view>
<view class="form_item_input form_input">
<uni-easyinput @blur="calcYoyMom(1,index)" @clear="calcYoyMom(1,index)" v-model="item.voyageNumber" type="number"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
<uni-easyinput @blur="calcYoyMom(1,index)" @clear="calcYoyMom(1,index)" v-model="item.voyageNumber"
type="number" placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</view>
</view>
@ -197,26 +204,25 @@
<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(2,index)" @clear="calcYoyMom(2,index)" v-model="item.passengerCount" type="number"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
<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>
</view>
<!-- 同比环比 -->
<view class="form_item_rate"
:class="item.passengerDod === 0 ? 'danger' : '' ">
<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' : ''">
<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_label">{{item.direction == '1' ? '入青' : item.direction == '2' ? '出青' : ''}}旅客人数同比
</view>
<view class="rate_item_input">
{{formatDigit(item.passengerYoy)}}%
</view>
@ -225,9 +231,8 @@
<view class="form_item_remark">
<view class="form_item_label">备注</view>
<view class="form_item_input">
<uni-easyinput v-model="item.remarks"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入备注信息" type="textarea" maxlength="200"
autoHeight></uni-easyinput>
<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" v-if="form.internationalCruiseDTOList.length > 1"></view>
@ -238,6 +243,99 @@
<view class="foot_btn">
<view class="act_btn blue" @click="doSubmit">{{btnText}}</view>
</view>
<!-- 层级单位 -->
<view class="pop_conbox">
<uni-popup ref="unitPopup" style="width: 100%;">
<view class="pop_box">
<view class="pop_title">
<view class="pop_title">
填报单位
<uni-icons @click="this.$refs.unitPopup.close()" type="closeempty" size="18" color="#666"
class="pop_close"></uni-icons>
</view>
</view>
<view class="popup-content">
<view class="tree_item" v-for="(item,index) in treeData" :key="index">
<view class="item">
<view class="first_item">
<view class="first_item_top" :class="item.deptId == selectId ? 'check' : ''">
<view class="left_item">
<uni-icons v-show="item.children.length != 0 && !item.isExpand" @click="expandItem(item)"
type="right" size="15"></uni-icons>
<uni-icons v-show="item.children.length != 0 && item.isExpand" @click="expandItem(item)"
type="bottom" size="15"></uni-icons>
</view>
<view class="right_item" @click="clickItem(item)">
{{item.deptName}}
</view>
</view>
<view v-if="item.children.length != 0 && item.isExpand">
<view class="second_item" v-for="(item1,index1) in treeData[index].children" :key="item1.deptId">
<view class="seco_top_item" :class="item1.deptId == selectId ? 'check' : ''">
<view class="left_item">
<uni-icons v-show="item1.children.length != 0 && !item1.isExpand" @click="expandItem(item1)"
type="right" size="15"></uni-icons>
<uni-icons v-show="item1.children.length != 0 && item1.isExpand" @click="expandItem(item1)"
type="bottom" size="15"></uni-icons>
</view>
<view class="right_item" @click="clickItem(item1)">
{{item1.deptName}}
</view>
</view>
<view v-if="item1.children.length != 0 && item1.isExpand">
<view class="third_item" v-for="(item2,index2) in treeData[index].children[index1].children"
:key="item2.deptId">
<view class="third_top_item" :class="item2.deptId == selectId ? 'check' : ''">
<view class="left_item">
<uni-icons @click.stop="expandItem(item2)"
v-if="item2.children.length != 0 && !item2.isExpand" type="right"
size="15"></uni-icons>
<uni-icons @click.stop="expandItem(item2)"
v-if="item2.children.length != 0 && item2.isExpand" type="bottom"
size="15"></uni-icons>
</view>
<view class="right_item" @click="clickItem(item2)">
{{item2.deptName}}
</view>
</view>
<view v-if="item2.children.length != 0 && item2.isExpand">
<view class="four_item"
v-for="(item3,index3) in treeData[index].children[index1].children[index2].children"
:key="item3.deptId">
<view class="four_item_item" :class="item3.deptId == selectId ? 'check' : ''">
<view class="left_item">
<uni-icons @click="expandItem(item3)"
v-if="item3.children.length != 0 && !item3.isExpand" type="right"
size="15"></uni-icons>
<uni-icons @click="expandItem(item3)"
v-if="item3.children.length != 0 && item3.isExpand" type="bottom"
size="15"></uni-icons>
</view>
<view class="right_item" @click="clickItem(item3)">
{{item3.deptName}} 123
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="btn_box">
<p class="btn" @click="searchReset">取消</p>
<p class="btn" @click="searchList">确认</p>
</view>
</view>
</uni-popup>
</view>
</view>
</template>
<script>
@ -249,17 +347,17 @@
data() {
return {
form: {
"internationalCruiseDTOList": [],//
"passengerShipDTOList":[{
"internationalCruiseDTOList": [], //
"passengerShipDTOList": [{
"route": "",
"routeIndex": "",
"voyage": "",
"voyageIndex": "",
"direction": "",
"passengerCount": "",
"passengerDod": "",//
"passengerYoy": "",//
}],//
"passengerDod": "", //
"passengerYoy": "", //
}], //
"organizationName": "",
"statDate": "",
"statPeriod": ""
@ -275,7 +373,13 @@
btnText: '保存',
tabType: 1,
deptNameList: [], //
mobile: getApp().globalData.mobile
mobile: getApp().globalData.mobile,
//
treeData: [],
treeIndex: '',
selectId: '',
selectName: '',
selectId1: '',
}
},
onLoad(options) {
@ -283,63 +387,126 @@
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.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); //
this.queryTime(); //
this.queryTime(); //
this.queryRoute();
this.getDept();
} else if (options.id) {
this.btnText = '修改并保存';
this.$request(getApp().globalData.baseUrl + '/api/biz/internationalPassengerTransport/selectById/' + options.id, {}, "GET").then(
this.$request(getApp().globalData.baseUrl + '/api/biz/internationalPassengerTransport/selectById/' + options
.id, {}, "GET").then(
res => {
this.form = res.data;
this.form.passengerShipDTOList = this.form.passengerShipVOList;
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 : '';
if(!checkNotEmpty(this.form.organizationName)) {
this.form.organizationName = this.deptNameList.length > 0 ? this.deptNameList[0].deptName : '';
this.form.organizationNameIndex = this.deptNameList.length > 0 ? 0 : '';
}
}
this.queryTime(); //
// if (checkNotEmpty(this.deptNameList)) {
// let idx = this.deptNameList.findIndex(item => item.deptName == this.form.organizationName);
// this.form.organizationNameIndex = idx > -1 ? idx : '';
// if(!checkNotEmpty(this.form.organizationName)) {
// this.form.organizationName = this.deptNameList.length > 0 ? this.deptNameList[0].deptName : '';
// this.form.organizationNameIndex = this.deptNameList.length > 0 ? 0 : '';
// }
// }
this.getDept();
this.queryTime(); //
this.queryRoute();
});
}
},
methods: {
//线
queryRoute() {
this.$request(getApp().globalData.baseUrl + '/api/biz/internationalPassengerTransportPermissions/findList', {}, "GET").then(res => {
this.shipRouteList = res.data['客班轮'];
this.internationalRouteList = res.data['国际邮轮'];
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.internationalRouteList.findIndex(item2 => item2.route == item.route);
item.routeIndex = idx > -1 ? idx : '';
if(idx > -1) {
let _idx = this.internationalRouteList[idx].voyageInfoVOList.findIndex(item2 => item2.voyageCode == item.voyage);
item.voyageIndex = _idx > -1 ? _idx : '';
}
})
console.log(this.form)
})
methods: {
//线
queryRoute() {
this.$request(getApp().globalData.baseUrl + '/api/biz/internationalPassengerTransportPermissions/findList', {},
"GET").then(res => {
this.shipRouteList = res.data['客班轮'];
this.internationalRouteList = res.data['国际邮轮'];
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.internationalRouteList.findIndex(item2 => item2.route == item.route);
item.routeIndex = idx > -1 ? idx : '';
if (idx > -1) {
let _idx = this.internationalRouteList[idx].voyageInfoVOList.findIndex(item2 => item2.voyageCode ==
item.voyage);
item.voyageIndex = _idx > -1 ? _idx : '';
}
})
console.log(this.form)
})
},
//
bindDeptChange(e) {
this.form.organizationNameIndex = e.detail.value;
this.form.organizationName = this.deptNameList[e.detail.value].deptName;
},
//
getDept() {
// this.$request(getApp().globalData.baseUrl + '/api/dict/dictList?dictType=industry',{},"GET").then(res =>{
// console.log('code===>',res)
// })
this.$request(getApp().globalData.baseUrl + '/api/dept/getCurrentAndSubordinateDept?tradeCode=02&deptName=', {},
"GET").then(res => {
// console.log('===>',res)
this.treeData = res.data;
if (this.pageType == 'add') {
this.form.organizationName = this.deptNameList.length > 0 ? this.deptNameList[0].deptName : '';
this.form.organizationNameIndex = this.deptNameList.length > 0 ? 0 : '';
this.selectId1 = this.form.organizationName;
} else if (this.pageType == 'edit') {
this.selectId1 = this.form.organizationName;
}
})
},
//treee
showPop() {
this.selectId = this.selectId1;
this.$refs.unitPopup.open('bottom')
this.newArr = []
this.traversalTree(this.treeData, this.newArr);
this.treeData = this.newArr
},
traversalTree(arrs, that) {
arrs.map((item, index) => {
that.push({
deptId: item.deptId,
deptName: item.deptName,
isExpand: item.isExpand,
isCheckd: false,
children: []
})
if (item.children.length !== 0) {
this.traversalTree(item.children, that[index].children)
}
})
},
clickItem(item1) {
this.selectId = item1.deptName
this.selectName = item1.deptName
},
expandItem(item) {
this.treeIndex = this.treeData.findIndex(val => val.id == item.id)
item.isExpand = !item.isExpand
},
searchReset() {
this.$refs.unitPopup.close()
},
searchList() {
this.form.organizationName = this.selectName;
this.selectId1 = this.selectId;
this.$refs.unitPopup.close()
},
call(tel) {
uni.makePhoneCall({
phoneNumber: tel
@ -348,54 +515,55 @@
//
addRow() {
let obj = {
route: "",
routeIndex: "",
voyage: "",
voyageIndex: "",
voyageNumber: "",
direction: "",
passengerCount: "",
passengerDod: "",//
passengerYoy: "",//
route: "",
routeIndex: "",
voyage: "",
voyageIndex: "",
voyageNumber: "",
direction: "",
passengerCount: "",
passengerDod: "", //
passengerYoy: "", //
};
if(this.tabType == 1) {
if (this.tabType == 1) {
//
this.form.passengerShipDTOList.push(obj);
}else{
} else {
//
this.form.internationalCruiseDTOList.push(obj);
}
},
//
deleteRow(index) {
if(this.tabType == 1) {
if (this.tabType == 1) {
//
this.form.passengerShipDTOList.splice(index, 1);
}else{
} 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;
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;
}
//
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);
}
}
//
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/internationalPassengerTransport/getYoYAndMoM?statDate=' + this.form
@ -407,80 +575,91 @@
},
//
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 => {
let dayData = res.data.minusDays;
let yearData = res.data.minusYears;
if(type == 1) {
//
// this.form.passengerShipDTOList[index].voyageNumberDod = this.$calcMom(this.form.passengerShipDTOList[index].voyageNumber,dayData.voyageNumber);
// this.form.passengerShipDTOList[index].voyageNumberYoy = this.$calcYoy(this.form.passengerShipDTOList[index].voyageNumber,yearData.voyageNumber);
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].voyageNumberDod = this.$calcMom(this.form.internationalCruiseDTOList[index].voyageNumber,dayData.voyageNumber);
// this.form.internationalCruiseDTOList[index].voyageNumberYoy = this.$calcYoy(this.form.internationalCruiseDTOList[index].voyageNumber,yearData.voyageNumber);
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);
}
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 => {
let dayData = res.data.minusDays;
let yearData = res.data.minusYears;
if (type == 1) {
//
// this.form.passengerShipDTOList[index].voyageNumberDod = this.$calcMom(this.form.passengerShipDTOList[index].voyageNumber,dayData.voyageNumber);
// this.form.passengerShipDTOList[index].voyageNumberYoy = this.$calcYoy(this.form.passengerShipDTOList[index].voyageNumber,yearData.voyageNumber);
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].voyageNumberDod = this.$calcMom(this.form.internationalCruiseDTOList[index].voyageNumber,dayData.voyageNumber);
// this.form.internationalCruiseDTOList[index].voyageNumberYoy = this.$calcYoy(this.form.internationalCruiseDTOList[index].voyageNumber,yearData.voyageNumber);
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);
}
})
},
//线
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;
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].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;
} 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].direction = this.internationalRouteList[e.detail.value].direction;
}
},
//
changeVoyage(e, index) {
if(this.tabType == 1) {
if (this.tabType == 1) {
//
//
//
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;
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{
} 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'
});
}
else {
this.form.internationalCruiseDTOList[index].voyageIndex = e.detail.value;
this.form.internationalCruiseDTOList[index].voyage = this.internationalRouteList[routeIndex].voyageInfoVOList[e.detail.value].voyageCode;
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'
});
} 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)
}
console.log('航次选择', this.form)
},
//
changeStatPeriod(e) {
@ -503,7 +682,7 @@
if (this.pageType == 'add') {
let now = new Date();
//11:00-13:30 0-12
let dateStr = getDateStr(now, 0).replaceAll('-','/');
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()) {
@ -534,7 +713,8 @@
let checkList = true;
if (this.form.passengerShipDTOList.length > 0) {
checkList = this.form.passengerShipDTOList.every(item => {
return checkNotEmpty(item.route) && checkNotEmpty(item.voyage) && checkNotEmpty(item.voyageNumber) && checkNotEmpty(item.passengerCount)
return checkNotEmpty(item.route) && checkNotEmpty(item.voyage) && checkNotEmpty(item.voyageNumber) &&
checkNotEmpty(item.passengerCount)
})
}
if (!checkList) {
@ -547,7 +727,8 @@
let checkList2 = true;
if (this.form.internationalCruiseDTOList.length > 0) {
checkList2 = this.form.internationalCruiseDTOList.every(item => {
return checkNotEmpty(item.route) && checkNotEmpty(item.voyage) && checkNotEmpty(item.voyageNumber) && checkNotEmpty(item.passengerCount)
return checkNotEmpty(item.route) && checkNotEmpty(item.voyage) && checkNotEmpty(item.voyageNumber) &&
checkNotEmpty(item.passengerCount)
})
}
if (!checkList2) {
@ -680,10 +861,11 @@
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
margin-bottom: 30rpx;
}
/deep/ .is-input-border{
border-radius: 20rpx !important;
border: 1px solid #c1c1c1 !important;
}
/deep/ .is-input-border {
border-radius: 20rpx !important;
border: 1px solid #c1c1c1 !important;
}
}
@ -887,4 +1069,165 @@
background-color: #007aff;
color: #ffffff;
}
</style>
.pop_conbox {
.pop_box {
border-radius: 30rpx 30rpx 0 0;
background-color: #fff;
padding: 30rpx;
.pop_title {
color: #333333;
font-size: 32rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
line-height: 45rpx;
text-align: center;
margin: 20rpx 0;
.pop_close {
float: right;
}
}
.popup-content {
max-height: 600rpx;
margin: 30rpx 0;
overflow-x: hidden;
overflow-y: auto;
.tree_item {
width: 100%;
display: flex;
padding: 10rpx 0;
.item {
width: 100%;
// display: flex;
.first_item {
width: 100%;
.first_item_top {
width: 100%;
display: flex;
padding: 10rpx 0;
&.check {
background: rgba(45, 140, 240, 0.2);
}
.left_item {
width: 40rpx;
height: 40rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 10rpx;
}
}
}
.second_item {
width: 100%;
.seco_top_item {
width: 100%;
display: flex;
padding: 10rpx 0 10rpx 40rpx;
&.check {
background: rgba(45, 140, 240, 0.2);
}
.left_item {
width: 40rpx;
height: 40rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 10rpx;
}
}
.third_item {
width: 100%;
.third_top_item {
width: 100%;
display: flex;
padding: 10rpx 0 10rpx 80rpx;
&.check {
background: rgba(45, 140, 240, 0.2);
}
.left_item {
width: 40rpx;
height: 40rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 10rpx;
}
}
.four_item {
width: 100%;
.four_item_item {
width: 100%;
display: flex;
padding: 10rpx 0 10rpx 120rpx;
&.check {
background: rgba(45, 140, 240, 0.2);
}
.left_item {
width: 40rpx;
height: 40rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 10rpx;
}
}
}
}
}
}
}
}
.btn_box {
width: 100%;
height: 120rpx;
display: flex;
margin-top: 20px;
align-items: center;
justify-content: space-between;
.btn {
width: 290rpx;
height: 90rpx;
background: #FFFFFF;
border-radius: 100rpx;
border: 1rpx solid #C1C1C1;
color: #666;
font-size: 28rpx;
line-height: 88rpx;
text-align: center;
&:last-child {
background: #2D8CF0;
color: #FFFFFF;
border-color: #2D8CF0;
}
}
}
}
}
</style>

@ -6,14 +6,9 @@
</view>
<view class="form_item_box">
<view class="form_item_title">基本信息</view>
<view class="form_item">
<!-- <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> -->
<picker v-if="pageType == 'add' && stationList.length > 1" :value="form.railwayNameIndex"
:range="stationList" @change="changeRailway">
<text class="picker_select"
@ -22,7 +17,7 @@
</picker>
<text v-else>{{form.railwayName}}</text>
</view>
</view>
</view> -->
<view class="form_item">
<view class="form_item_label">统计日期</view>
<view class="form_item_input picker">
@ -43,8 +38,146 @@
</picker>
</view>
</view>
<!-- 汇总统计 进青 -->
<view class="form_item">
<view class="form_item_label">进终到车次统计</view>
<view class="form_item_input">
{{form.entranceVehicleCount === 0 ? form.entranceVehicleCount : form.entranceVehicleCount || ''}}
</view>
</view>
<!-- 同比环比 -->
<view class="form_item_rate"
:class="checkNotEmpty(form.entranceVehicleCount) && form.entranceVehicleCount === yoyMom.minusDaysEntranceVehicleSum ? 'danger' : ''">
<view class="rate_item">
<view class="rate_item_label"
:style="checkNotEmpty(form.entranceVehicleCount) && form.entranceVehicleCount === yoyMom.minusDaysEntranceVehicleSum ?'color: #EB4747':''">
终到此次统计环比</view>
<view class="rate_item_input"
:style="checkNotEmpty(form.entranceVehicleCount) && form.entranceVehicleCount === yoyMom.minusDaysEntranceVehicleSum ?'color: #EB4747':''">
{{formatDigit(form.entranceVehicleCountMom)}}%
</view>
</view>
<view class="line"></view>
<view class="rate_item">
<view class="rate_item_label">终到此次统计同比</view>
<view class="rate_item_input">
{{formatDigit(form.entranceVehicleCountYoy)}}%
</view>
</view>
</view>
<view class="form_item">
<view class="form_item_label">进青过路车次统计</view>
<view class="form_item_input">
{{form.entranceVehicleCount === 0 ? form.entranceVehicleCount : form.entranceVehicleCount || ''}}
</view>
</view>
<view class="form_item">
<view class="form_item_label">进青人次统计</view>
<view class="form_item_input">
{{form.exitVehicleCount === 0 ? form.exitVehicleCount : form.exitVehicleCount || ''}}
</view>
</view>
<!-- 同比环比 -->
<view class="form_item_rate"
:class="checkNotEmpty(form.exitVehicleCount) && form.exitVehicleCount === yoyMom.minusDaysExitVehicleSum ? 'danger' : ''">
<view class="rate_item">
<view class="rate_item_label"
:style="checkNotEmpty(form.exitVehicleCount) && form.exitVehicleCount === yoyMom.minusDaysExitVehicleSum ?'color: #EB4747':''">
人次统计环比</view>
<view class="rate_item_input"
:style="checkNotEmpty(form.exitVehicleCount) && form.exitVehicleCount === yoyMom.minusDaysExitVehicleSum ?'color: #EB4747':''">
{{formatDigit(form.exitVehicleCountMom)}}%
</view>
</view>
<view class="line"></view>
<view class="rate_item">
<view class="rate_item_label">人次统计同比</view>
<view class="rate_item_input">
{{formatDigit(form.exitVehicleCountYoy)}}%
</view>
</view>
</view>
<!-- 出青 -->
<view class="form_item">
<view class="form_item_label">出青始发车次统计</view>
<view class="form_item_input">
{{form.entranceVehicleCount === 0 ? form.entranceVehicleCount : form.entranceVehicleCount || ''}}
</view>
</view>
<!-- 同比环比 -->
<view class="form_item_rate"
:class="checkNotEmpty(form.entranceVehicleCount) && form.entranceVehicleCount === yoyMom.minusDaysEntranceVehicleSum ? 'danger' : ''">
<view class="rate_item">
<view class="rate_item_label"
:style="checkNotEmpty(form.entranceVehicleCount) && form.entranceVehicleCount === yoyMom.minusDaysEntranceVehicleSum ?'color: #EB4747':''">
始发车次统计环比</view>
<view class="rate_item_input"
:style="checkNotEmpty(form.entranceVehicleCount) && form.entranceVehicleCount === yoyMom.minusDaysEntranceVehicleSum ?'color: #EB4747':''">
{{formatDigit(form.entranceVehicleCountMom)}}%
</view>
</view>
<view class="line"></view>
<view class="rate_item">
<view class="rate_item_label">始发车次统计同比</view>
<view class="rate_item_input">
{{formatDigit(form.entranceVehicleCountYoy)}}%
</view>
</view>
</view>
<view class="form_item">
<view class="form_item_label">出青过路车次统计</view>
<view class="form_item_input">
{{form.entranceVehicleCount === 0 ? form.entranceVehicleCount : form.entranceVehicleCount || ''}}
</view>
</view>
<view class="form_item">
<view class="form_item_label">出青人次统计</view>
<view class="form_item_input">
{{form.exitVehicleCount === 0 ? form.exitVehicleCount : form.exitVehicleCount || ''}}
</view>
</view>
<!-- 同比环比 -->
<view class="form_item_rate"
:class="checkNotEmpty(form.exitVehicleCount) && form.exitVehicleCount === yoyMom.minusDaysExitVehicleSum ? 'danger' : ''">
<view class="rate_item">
<view class="rate_item_label"
:style="checkNotEmpty(form.exitVehicleCount) && form.exitVehicleCount === yoyMom.minusDaysExitVehicleSum ?'color: #EB4747':''">
人次统计环比</view>
<view class="rate_item_input"
:style="checkNotEmpty(form.exitVehicleCount) && form.exitVehicleCount === yoyMom.minusDaysExitVehicleSum ?'color: #EB4747':''">
{{formatDigit(form.exitVehicleCountMom)}}%
</view>
</view>
<view class="line"></view>
<view class="rate_item">
<view class="rate_item_label">人次统计同比</view>
<view class="rate_item_input">
{{formatDigit(form.exitVehicleCountYoy)}}%
</view>
</view>
</view>
</view>
<view class="form_item_box" style="margin-top: 30rpx;">
<!-- 车站权限 -->
<view class="station_box">
<view v-if="index < 9" :style="(index+1)%3 == 0 ? 'margin-right:0;':''" @click="changeRailwayNameIndexIndex(index)"
class="station_item" :class="[item.isFinish ? 'active' : '',index == railwayNameIndex ? 'choosed' : '']"
v-for="(item, index) in stationList" :key="item.id">
<view v-if='item.isFinish' class="tag">
<uni-icons type="checkmarkempty" color="#fff" size="12"></uni-icons>
</view>
{{item.railwayName || ''}}
</view>
<view v-if="index >= 9 && showRailway" :style="(index+1)%3 == 0 ? 'margin-right:0;':''"
@click="changeRailwayNameIndexIndex(index)" class="station_item"
:class="[item.isFinish ? 'active' : '',index == railwayNameIndex ? 'choosed' : '']"
v-for="(item, index) in stationList" :key="item.id">
<view v-if='item.isFinish' class="tag">
<uni-icons type="checkmarkempty" color="#fff" size="12"></uni-icons>
</view>
{{item.railwayName || ''}}
</view>
</view>
<view class="form_item_box">
<!-- tab 切换 -->
<view class="tab_box">
<view class="tab_nav" :class="tabType == 1 ? 'active' : ''" @click="tabType = 1">进青岛</view>
@ -56,38 +189,44 @@
style="display:flex; justify-content: space-between; font-size: 30rpx;color:#333;font-weight: bold;margin-top: 30rpx;">
车次信息
</view>
<view class="form_item">
<view class="form_item_label">车站名称</view>
<view class="form_item_input">
{{form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].railwayName}}
</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.inboundRailwayDo" type="number"
<uni-easyinput @blur="calcYoyMom" @clear="calcYoyMom" v-model="form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].inboundRailwayDo" type="number"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</view>
</view>
<!-- 同比环比 -->
<view class="form_item_rate"
:class="form.inRailwayYomDo === 0 ? 'danger' : '' ">
:class="form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].inRailwayYomDo === 0 ? 'danger' : '' ">
<view class="rate_item">
<view class="rate_item_label"
:style="form.inRailwayYomDo === 0 ? 'color: #EB4747' : ''">
:style="form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].inRailwayYomDo === 0 ? 'color: #EB4747' : ''">
终到车次环比</view>
<view class="rate_item_input"
:style="form.inRailwayYomDo === 0 ? 'color: #EB4747' : ''">
{{formatDigit(form.inRailwayYomDo)}}%
:style="form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].inRailwayYomDo === 0 ? 'color: #EB4747' : ''">
{{formatDigit(form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].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)}}%
{{formatDigit(form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].inRailwayMomDo)}}%
</view>
</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"
<uni-easyinput @blur="calcYoyMom" @clear="calcYoyMom" v-model="form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].inboundPassengersDo" type="number"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</view>
@ -95,35 +234,35 @@
<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.inPepole" type="number"
<uni-easyinput @blur="calcYoyMom" @clear="calcYoyMom" v-model="form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].inPepole" type="number"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</view>
</view>
<!-- 同比环比 -->
<view class="form_item_rate"
:class="form.inPepoleYoyDo === 0 ? 'danger' : '' ">
:class="form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].inPepoleYoyDo === 0 ? 'danger' : '' ">
<view class="rate_item">
<view class="rate_item_label"
:style="form.inPepoleYoyDo === 0 ? 'color: #EB4747' : ''">人数环比
:style="form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].inPepoleYoyDo === 0 ? 'color: #EB4747' : ''">人数环比
</view>
<view class="rate_item_input"
:style="form.inPepoleYoyDo === 0 ? 'color: #EB4747' : ''">
{{formatDigit(form.inPepoleYoyDo)}}%
:style="form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].inPepoleYoyDo === 0 ? 'color: #EB4747' : ''">
{{formatDigit(form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].inPepoleYoyDo)}}%
</view>
</view>
<view class="line"></view>
<view class="rate_item">
<view class="rate_item_label">人数同比</view>
<view class="rate_item_input">
{{formatDigit(form.inPepoleMomDo)}}%
{{formatDigit(form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].inPepoleMomDo)}}%
</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="form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].inMark"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入备注信息" type="textarea" maxlength="200"
autoHeight></uni-easyinput>
</view>
@ -136,37 +275,43 @@
style="display:flex; justify-content: space-between; font-size: 30rpx;color:#333;font-weight: bold;margin-top: 30rpx;">
车次信息
</view>
<view class="form_item">
<view class="form_item_label">车站名称</view>
<view class="form_item_input">
{{form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].railwayName}}
</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.outboundRailwayDo" type="number"
<uni-easyinput @blur="calcYoyMom" @clear="calcYoyMom" v-model="form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].outboundRailwayDo" type="number"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</view>
</view>
<!-- 同比环比 -->
<view class="form_item_rate" :class="form.outRailwayYomDo === 0 ? 'danger' : '' ">
<view class="form_item_rate" :class="form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].outRailwayYomDo === 0 ? 'danger' : '' ">
<view class="rate_item">
<view class="rate_item_label"
:style="form.outRailwayYomDo === 0 ? 'color: #EB4747' : ''">
:style="form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].outRailwayYomDo === 0 ? 'color: #EB4747' : ''">
始发车次环比</view>
<view class="rate_item_input"
:style="form.outRailwayYomDo === 0 ? 'color: #EB4747' : ''">
{{formatDigit(form.outRailwayYomDo)}}%
:style="form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].outRailwayYomDo === 0 ? 'color: #EB4747' : ''">
{{formatDigit(form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].outRailwayYomDo)}}%
</view>
</view>
<view class="line"></view>
<view class="rate_item">
<view class="rate_item_label">始发车次同比</view>
<view class="rate_item_input">
{{formatDigit(form.outRailwayMomDo)}}%
{{formatDigit(form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].outRailwayMomDo)}}%
</view>
</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.outboundPassengersDo" type="number"
<uni-easyinput @blur="calcYoyMom" @clear="calcYoyMom" v-model="form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].outboundPassengersDo" type="number"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</view>
@ -174,34 +319,34 @@
<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.outPepole" type="number"
<uni-easyinput @blur="calcYoyMom" @clear="calcYoyMom" v-model="form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].outPepole" type="number"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</view>
</view>
<!-- 同比环比 -->
<view class="form_item_rate" :class="form.outPepoleYoyDo === 0 ? 'danger' : '' ">
<view class="form_item_rate" :class="form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].outPepoleYoyDo === 0 ? 'danger' : '' ">
<view class="rate_item">
<view class="rate_item_label"
:style="form.outPepoleYoyDo === 0 ? 'color: #EB4747' : ''">人数环比
:style="form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].outPepoleYoyDo === 0 ? 'color: #EB4747' : ''">人数环比
</view>
<view class="rate_item_input"
:style="form.outPepoleYoyDo === 0 ? 'color: #EB4747' : ''">
{{formatDigit(form.outPepoleYoyDo)}}%
:style="form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].outPepoleYoyDo === 0 ? 'color: #EB4747' : ''">
{{formatDigit(form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].outPepoleYoyDo)}}%
</view>
</view>
<view class="line"></view>
<view class="rate_item">
<view class="rate_item_label">人数同比</view>
<view class="rate_item_input">
{{formatDigit(form.outPepoleMomDo)}}%
{{formatDigit(form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].outPepoleMomDo)}}%
</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="form.bizRailwayDataSaveOrUpdateDTOList[railwayNameIndex].outMark"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入备注信息" type="textarea" maxlength="200"
autoHeight></uni-easyinput>
</view>
@ -243,11 +388,32 @@
"outboundPassengersDo": '',
"outboundRailwayDo": '',
"railwayName": "",
"bizRailwayDataSaveOrUpdateDTOList": [{
"inMark": "",
"inPepole": '',
"inPepoleMomDo": '',
"inPepoleYoyDo": '',
"inRailwayMomDo": '',
"inRailwayYomDo": '',
"inboundPassengersDo": '',
"inboundRailwayDo": '',
"isHoliday": "",
"outMark": "",
"outPepole": '',
"outPepoleMomDo": '',
"outPepoleYoyDo": '',
"outRailwayMomDo": '',
"outRailwayYomDo": '',
"outboundPassengersDo": '',
"outboundRailwayDo": '',
"railwayName": "",
}],
"statDate": "",
"statPeriod": ""
}, //form
stationList: [], //
railwayNameIndex: '',
railwayNameIndex: 0,
showRailway: false,
submitPerson: [], //
submitPersonIndex: -1, //
array: [], //
@ -283,51 +449,122 @@
phoneNumber: tel
});
},
checkNotEmpty(data) {
return checkNotEmpty(data);
},
//
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 == '' || this.form.railwayName == '') {
queryYoyMom(index, railwayName) {
if (this.form.statDate == '' || this.form.statPeriod == '') {
return;
}
// 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 + '&railwayName=' + this.form.railwayName + '&_t=' + Date.parse(new Date()), {}, 'GET')
.statDate + '&statPeriod=' + this.form.statPeriod + '&railwayName=' + railwayName + '&_t=' + Date.parse(new Date()), {}, 'GET')
.then(res => {
this.yoyMom = res.data;
this.calcYoyMom(); //
this.calcYoyMom(index); //
})
},
//
calcYoyMom() {
calcYoyMom(index) {
console.log('同比环比计算')
this.form.inRailwayYomDo = this.$calcMom(this.form.inboundRailwayDo,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);
// this.form.inRailwayYomDo = this.$calcMom(this.form.inboundRailwayDo,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);
},
//
changeRailwayNameIndexIndex(index) {
let arr = this.form.bizRailwayDataSaveOrUpdateDTOList;
this.stationList[this.railwayNameIndex].isFinish = checkNotEmpty(arr[index].inboundRailwayDo) && checkNotEmpty(arr[index].inboundPassengersDo) && checkNotEmpty(arr[index].inPepole) && checkNotEmpty(arr[index].outboundRailwayDo) && checkNotEmpty(arr[index].outboundPassengersDo) && checkNotEmpty(arr[index].outPepole) ? true : false;
this.railwayNameIndex = index;
// this.queryYoyMom();
},
//
queryStation() {
this.$request(getApp().globalData.baseUrl + '/api/biz/railwayRunData/getCurrentSite?_t=' + Date.parse(
new Date()), {}, 'GET').then(res => {
this.stationList = res.data;
let arr = [];
res.data.map(item => {
arr.push({railwayName: item, isFinish: false})
})
this.stationList = arr;
if (this.pageType == 'add') {
this.form.railwayName = res.data[0];
this.form.railwayName = arr[0].railwayName;
this.railwayNameIndex = 0;
this.form.bizRailwayDataSaveOrUpdateDTOList = [];
this.stationList.map(item => {
item.isFinish = false;
this.form.bizRailwayDataSaveOrUpdateDTOList.push({
"inMark": "",
"inPepole": '',
"inPepoleMomDo": '',
"inPepoleYoyDo": '',
"inRailwayMomDo": '',
"inRailwayYomDo": '',
"inboundPassengersDo": '',
"inboundRailwayDo": '',
"isHoliday": "",
"outMark": "",
"outPepole": '',
"outPepoleMomDo": '',
"outPepoleYoyDo": '',
"outRailwayMomDo": '',
"outRailwayYomDo": '',
"outboundPassengersDo": '',
"outboundRailwayDo": '',
"railwayName": item.railwayName,
})
})
}else{
let arr = JSON.parse(JSON.stringify(this.form.bizRailwayDataSaveOrUpdateDTOList));
this.form.bizRailwayDataSaveOrUpdateDTOList = [];
this.stationList.map(item => {
let idx = arr.findIndex(item2 => item2.railwayName == item.railwayName);
if (idx > -1) {
item.isFinish = checkNotEmpty(arr[idx].inboundRailwayDo) && checkNotEmpty(arr[idx].inboundPassengersDo) && checkNotEmpty(arr[idx].inPepole) && checkNotEmpty(arr[idx].outboundRailwayDo) && checkNotEmpty(arr[idx].outboundPassengersDo) && checkNotEmpty(arr[idx].outPepole) ? true :
false;
this.form.bizRailwayDataSaveOrUpdateDTOList.push(arr[idx]);
} else {
item.isFinish = false;
this.form.bizRailwayDataSaveOrUpdateDTOList.push({
"inMark": "",
"inPepole": '',
"inPepoleMomDo": '',
"inPepoleYoyDo": '',
"inRailwayMomDo": '',
"inRailwayYomDo": '',
"inboundPassengersDo": '',
"inboundRailwayDo": '',
"isHoliday": "",
"outMark": "",
"outPepole": '',
"outPepoleMomDo": '',
"outPepoleYoyDo": '',
"outRailwayMomDo": '',
"outRailwayYomDo": '',
"outboundPassengersDo": '',
"outboundRailwayDo": '',
"railwayName": item.railwayName,
})
}
})
}
this.queryYoyMom();
// this.queryYoyMom();
})
},
//
changeRailway(e) {
this.railwayNameIndex = e.detail.value;
this.form.railwayName = this.stationList[e.detail.value];
this.form.railwayName = this.stationList[e.detail.value].railwayName;
this.queryYoyMom();
},
@ -336,7 +573,9 @@
this.index = e.detail.value;
this.form.statPeriod = this.array[e.detail.value].dictValue;
console.log('change 时段', this.form);
this.queryYoyMom();
this.form.bizRailwayDataSaveOrUpdateDTOList.map((item,index) => {
this.queryYoyMom(index,item.railwayName);
})
},
//
doCancel() {
@ -372,55 +611,54 @@
let idx = this.array.findIndex(item => item.dictValue == this.form.statPeriod);
this.index = idx > -1 ? idx : '';
}
this.queryYoyMom(); //
// 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: '报送日期和时段不能为空',
icon: 'none'
})
return;
}
if (!checkNotEmpty(this.form.inboundRailwayDo) || !checkNotEmpty(this.form.inboundPassengersDo) || !
checkNotEmpty(this.form.inPepole)) {
uni.showToast({
title: '入青终到车次、过站车次、人数不能为空',
icon: 'none'
})
return;
}
if (!checkNotEmpty(this.form.outboundRailwayDo) || !checkNotEmpty(this.form.outboundPassengersDo) || !
checkNotEmpty(this.form.outPepole)) {
uni.showToast({
title: '出青终到车次、过站车次、人数不能为空',
icon: 'none'
})
return;
}
// if (this.form.inPepole == this.yoyMom.yesterdayData.inPepole && this.form.inMark) {
// if (!checkNotEmpty(this.form.railwayName)) {
// uni.showToast({
// title: '',
// icon: 'none'
// })
// return;
// }
// if (!checkNotEmpty(this.form.statDate) || !checkNotEmpty(this.form.statPeriod)) {
// uni.showToast({
// title: '',
// icon: 'none'
// })
// return;
// }
// if (!checkNotEmpty(this.form.inboundRailwayDo) || !checkNotEmpty(this.form.inboundPassengersDo) || !
// checkNotEmpty(this.form.inPepole)) {
// uni.showToast({
// title: '',
// title: '',
// icon: 'none'
// })
// return;
// }
// if (this.form.outPepole == this.yoyMom.yesterdayData.outPepole && this.form.outRemark) {
// if (!checkNotEmpty(this.form.outboundRailwayDo) || !checkNotEmpty(this.form.outboundPassengersDo) || !
// checkNotEmpty(this.form.outPepole)) {
// uni.showToast({
// title: '',
// title: '',
// icon: 'none'
// })
// return;
// }
let checkList = true;
if (this.form.bizRailwayDataSaveOrUpdateDTOList.length > 0) {
checkList = this.form.bizRailwayDataSaveOrUpdateDTOList.every(item => {
return checkNotEmpty(item.inboundRailwayDo) && checkNotEmpty(item.inboundPassengersDo) && checkNotEmpty(item.inPepole) && checkNotEmpty(item.outboundRailwayDo) && checkNotEmpty(item.outboundPassengersDo) && checkNotEmpty(item.outPepole)
})
}
if (!checkList) {
uni.showToast({
title: '进青/出青车站信息请填写完整',
icon: 'none'
})
return;
}
uni.showModal({
title: '提示',
content: this.form.id == undefined ? '您确认提交该条报送数据?' : '您确认将该条数据进行修改?',
@ -631,35 +869,44 @@
margin-top: 40rpx;
.station_item {
width: 173rpx;
height: 60rpx;
color: #666666;
line-height: 60rpx;
font-size: 26rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
text-align: center;
border-radius: 20rpx;
border: 1rpx solid #C1C1C1;
padding: 0 20rpx;
margin-bottom: 40rpx;
margin-right: 20rpx;
overflow: hidden;
&.active {
position: relative;
color: #1ECE5F;
border-color: #1ECE5F;
background: #EBFAF2;
.tag {
position: absolute;
top: 0;
right: 0;
width: 34rpx;
height: 23rpx;
color: #fff;
line-height: 23rpx;
background: #1ECE5F;
border-radius: 0rpx 20rpx 0rpx 5rpx;
text-align: center;
}
}
&.choosed {
border-color: #2D8CF0 !important;
}
}
}

@ -7,7 +7,7 @@
style="margin-left:16rpx;">{{item.statPeriodValue || ''}}</text>
</view>
</view>
<view class="unit_station">{{item.railwayName || ''}}</view>
<!-- <view class="unit_station">{{item.railwayName || ''}}</view> -->
</view>
<uni-load-more iconType="circle" :status="status" @clickLoadMore="loadMore"
:contentText="contentText"></uni-load-more>

@ -11,18 +11,12 @@
<view class="edit_item">
<p class="left unit">填报单位</p>
<view class="right">
<!-- <picker v-if="pageType == 'add' && deptNameList.length > 1" :value="roadData.reportingUnitIdIndex" :range="deptNameList"
range-key="deptName" @change="bindDeptChange">
<text class="picker_select"
:style="roadData.reportingUnitId?'color:#333;':''">{{roadData.reportingUnitId?roadData.reportingUnitId:'请选择'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</picker> -->
<!-- -->
<view class="pick_pop" @click="showPop" v-if="pageType == 'add' && (treeData.length > 1 || (treeData.length == 1 && treeData[0].children.length > 0))">
<!-- <view class="pick_pop" @click="showPop" v-if="pageType == 'add' && (treeData.length > 1 || (treeData.length == 1 && treeData[0].children.length > 0))">
<text>{{roadData.reportingUnitId}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</view>
<text v-else>{{roadData.reportingUnitId}}</text>
<text v-else>{{roadData.reportingUnitId}}</text> -->
{{roadData.reportingUnitId}}
</view>
</view>
<view class="edit_item">
@ -243,61 +237,6 @@
<uni-easyinput maxlength="20" type="number" v-model="roadData.customizedPassengerVolume" placeholder="请输入" placeholderStyle="color:#d4d4d4;"></uni-easyinput>
</view>
</view>
<!-- <view class="edit_item input">
<p class="left">去年同期客运量()</p>
<view class="right">
<uni-easyinput v-model="roadData.passengerVolumeLastYear" placeholder="请输入" placeholderStyle="color:#d4d4d4;"></uni-easyinput>
</view>
</view>
<view class="edit_item input">
<p class="left">去年总客车量()</p>
<view class="right">
<uni-easyinput v-model="roadData.totalBusLastYear" placeholder="请输入" placeholderStyle="color:#d4d4d4;"></uni-easyinput>
</view>
</view> -->
<!-- <view class="per_con">
<view class="content top">
<view class="left">客运量与去年同期比率</view>
<view class="right">{{roadData.passengerVolumeRatio != '' ? roadData.passengerVolumeRatio == 0 ? 0 : roadData.passengerVolumeRatio.toFixed(2) + '%' : '-'}}</view>
</view>
<view class="content">
<view class="left">客车总量同比上升</view>
<view class="right">{{roadData.totalBusIncreaseRatio != '' ? roadData.passengerVolumeRatio == 0 ? 0 : roadData.totalBusIncreaseRatio.toFixed(2) + '%' : '-'}}</view>
</view>
</view> -->
<!-- <view class="edit_item input">
<p class="left">较大以上安全事故次数</p>
<view class="right">
<uni-easyinput v-model="roadData.significantAccidents" placeholder="请输入" placeholderStyle="color:#d4d4d4;"></uni-easyinput>
</view>
</view> -->
<!-- <view class="edit_item input">
<p class="left">当日人员伤者数()</p>
<view class="right">
<uni-easyinput v-model="roadData.dailyInjuredPersons" placeholder="请输入" placeholderStyle="color:#d4d4d4;"></uni-easyinput>
</view>
</view>
<view class="edit_item input">
<p class="left">交通运行情况</p>
<view class="right">
<uni-easyinput v-model="roadData.trafficSituationReport" placeholder="请输入" placeholderStyle="color:#d4d4d4;"></uni-easyinput>
</view>
</view>
<view class="edit_item input">
<p class="left">当日人员亡者数()</p>
<view class="right">
<uni-easyinput v-model="roadData.dailyFatalities" placeholder="请输入" placeholderStyle="color:#d4d4d4;"></uni-easyinput>
</view>
</view>
<view class="edit_item input">
<p class="left">应急情况报告</p>
<p class="right">{{roadData.emergencySituationReport}}</p>
<view class="right">
<uni-easyinput v-model="roadData.emergencySituationReport" placeholder="请输入" placeholderStyle="color:#d4d4d4;"></uni-easyinput>
</view>
</view> -->
<view class="remark_item">
<p class="left">备注</p>
<view class="right">
@ -665,7 +604,10 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../..
},
getDept(){
this.$request(getApp().globalData.baseUrl + '/api/dept/getCurrentAndSubordinateDept',{},"GET").then(res =>{
// this.$request(getApp().globalData.baseUrl + '/api/dict/dictList?dictType=industry',{},"GET").then(res =>{
// console.log('code===>',res)
// })
this.$request(getApp().globalData.baseUrl + '/api/dept/getCurrentAndSubordinateDept?tradeCode=09&deptName=',{},"GET").then(res =>{
console.log('单位===>',res)
this.treeData = res.data;
if(this.pageType == 'add'){
@ -690,7 +632,7 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../..
this.$request(getApp().globalData.baseUrl + '/api/biz/roadtransport/road/find/' + id,{},"GET").then(res =>{
this.roadData = res.data;
this.getRoadTime();
this.getDept()
this.getDept();
// console.log('last==>',lastYearDate(this.roadData.statisticalDate))
})
},
@ -1139,8 +1081,9 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../..
}
}
.popup-content{
max-height: 500rpx;
max-height: 600rpx;
margin: 30rpx 0;
overflow-x: hidden;
overflow-y: auto;
.tree_item{
width: 100%;

@ -3,58 +3,19 @@
<!-- 道路运输页面 -->
<view class="top_box">
<view class="list_box">
<view class="list_item" v-for="(item,index) in listData" :key="index" @click="editItem(item)">
<view class="list_item" v-for="(item,index) in listData" :key="index">
<view class="list_top">
<view class="unit_tags">报送时间</view>
<view class="unit_name">{{item.statisticalDate || ''}}<text style="margin-left:16rpx;">{{item.reportPhaseValue || ''}}</text></view>
</view>
<view class="unit_station">{{item.reportingUnitId || ''}}</view>
<!-- <view class="report_time">{{item.statisticalDate || ''}}<text style="margin-left:16rpx;">{{item.reportPhaseValue || ''}}</text></view> -->
<!-- <view class="item">
<view class="item_line" @click="showDetail(index,true)">
<view class="left_txt">定线通勤包车()</view>
<view class="right_txt">{{item.regularCommuteCharter == 0 ? 0 : item.regularCommuteCharter || ''}}</view>
<view class="unit_arrow">
<uni-icons @click="showDetail(index,false)" v-if="item.show" type="bottom" size="16" color="#666666"></uni-icons>
<uni-icons @click="showDetail(index,true)" v-else type="right" size="16" color="#666666"></uni-icons>
</view>
<view class="item_bottom" v-show="item.show">
<view class="bott_item">
<view class="left_txt">运送农民工包车()</view>
<view class="right_txt">{{item.migrantWorkersCharter == 0 ? 0 : item.migrantWorkersCharter || ''}}</view>
</view>
<view class="bott_item">
<view class="left_txt">除定线通勘包车农民工包车()</view>
<view class="right_txt">{{item.otherCharter == 0 ? 0 : item.otherCharter || ''}}</view>
</view>
<view class="bott_item">
<view class="left_txt">投放运力:包车数()</view>
<view class="right_txt">{{item.capacityCharter == 0 ? 0 : item.capacityCharter || ''}}</view>
</view>
<view class="bott_item">
<view class="left_txt">投放运力:班车数()</view>
<view class="right_txt">{{item.capacityShuttle == 0 ? 0 : item.capacityShuttle || ''}}</view>
</view>
<view class="bott_item">
<view class="left_txt">投放运力总客车数</view>
<view class="right_txt">{{item.capacityTotalBus == 0 ? 0 : item.capacityTotalBus || ''}}</view>
</view>
<view class="bott_item">
<view class="left_txt">总客位数</view>
<view class="right_txt">{{item.totalSeatCapacity == 0 ? 0 : item.totalSeatCapacity || ''}}</view>
</view>
<view class="bott_item">
<view class="left_txt">定线通勤班次</view>
<view class="right_txt">{{item.regularCommuteTrips == 0 ? 0 : item.regularCommuteTrips || ''}}</view>
</view>
<view class="omit">......</view>
<view class="list_item_shouqi" @click="showDetail(index,false)">
<uni-icons type="top" size="16" color="#2D8CF0"></uni-icons>
<text class="txt">收起</text>
</view>
</view>
</view> -->
<!-- <view class="button_box">
<p class="button" @click="detailItem(item)">查看详情</p>
<p class="button edit" @click="editItem(item)">编辑</p>
</view> -->
</view>
<view class="list_cnt" v-if="item.show">
<view class="list_cnt_item" @click="editItem(item)">{{item.reportingUnitId}}</view>
<view class="list_cnt_item" @click="editItem(item)">{{item.reportingUnitId}}</view>
</view>
</view>
</view>
<uni-load-more iconType="circle" :status="status" @clickLoadMore="loadMore"
@ -158,6 +119,13 @@
methods: {
//
showDetail(index1,flag) {
if(flag) {
//
let idx = this.listData.findIndex(item => item.show == true);
if(idx > -1) {
this.listData[idx].show = false;
}
}
this.listData[index1].show = flag;
},
//
@ -345,6 +313,7 @@
}
.unit_name {
flex: 1;
color: #333333;
font-size: 30rpx;
font-family: PingFang SC-Bold, PingFang SC;
@ -353,6 +322,10 @@
margin-left: 20rpx;
word-break: break-all;
}
.unit_arrow{
float: right;
line-height: 48rpx;
}
}
.report_time {
color: #999999;
@ -372,6 +345,20 @@
margin-top:10rpx;
}
//
.list_cnt{
border-top: 1rpx solid #F7F0EE;
margin-top: 30rpx;
.list_cnt_item {
color: #666666;
font-size: 30rpx;
line-height: 40rpx;
font-family: Microsoft YaHei-Regular, Microsoft YaHei;
font-weight: 400;
margin-top: 30rpx;
}
}
.item{
width: 570rpx;
// display: flex;

@ -38,6 +38,59 @@
</picker>
</view>
</view>
<!-- 汇总统计 -->
<view class="form_item">
<view class="form_item_label">航次统计</view>
<view class="form_item_input">
{{form.entranceVehicleCount === 0 ? form.entranceVehicleCount : form.entranceVehicleCount || ''}}
</view>
</view>
<!-- 同比环比 -->
<view class="form_item_rate"
:class="checkNotEmpty(form.entranceVehicleCount) && form.entranceVehicleCount === yoyMom.minusDaysEntranceVehicleSum ? 'danger' : ''">
<view class="rate_item">
<view class="rate_item_label"
:style="checkNotEmpty(form.entranceVehicleCount) && form.entranceVehicleCount === yoyMom.minusDaysEntranceVehicleSum ?'color: #EB4747':''">
航次统计环比</view>
<view class="rate_item_input"
:style="checkNotEmpty(form.entranceVehicleCount) && form.entranceVehicleCount === yoyMom.minusDaysEntranceVehicleSum ?'color: #EB4747':''">
{{formatDigit(form.entranceVehicleCountMom)}}%
</view>
</view>
<view class="line"></view>
<view class="rate_item">
<view class="rate_item_label">航次统计同比</view>
<view class="rate_item_input">
{{formatDigit(form.entranceVehicleCountYoy)}}%
</view>
</view>
</view>
<view class="form_item">
<view class="form_item_label">人数统计</view>
<view class="form_item_input">
{{form.exitVehicleCount === 0 ? form.exitVehicleCount : form.exitVehicleCount || ''}}
</view>
</view>
<!-- 同比环比 -->
<view class="form_item_rate"
:class="checkNotEmpty(form.exitVehicleCount) && form.exitVehicleCount === yoyMom.minusDaysExitVehicleSum ? 'danger' : ''">
<view class="rate_item">
<view class="rate_item_label"
:style="checkNotEmpty(form.exitVehicleCount) && form.exitVehicleCount === yoyMom.minusDaysExitVehicleSum ?'color: #EB4747':''">
人数统计环比</view>
<view class="rate_item_input"
:style="checkNotEmpty(form.exitVehicleCount) && form.exitVehicleCount === yoyMom.minusDaysExitVehicleSum ?'color: #EB4747':''">
{{formatDigit(form.exitVehicleCountMom)}}%
</view>
</view>
<view class="line"></view>
<view class="rate_item">
<view class="rate_item_label">人数统计同比</view>
<view class="rate_item_input">
{{formatDigit(form.exitVehicleCountYoy)}}%
</view>
</view>
</view>
</view>
<!-- 陆岛权限 -->
<view class="station_box">
@ -215,6 +268,9 @@
phoneNumber: tel
});
},
checkNotEmpty(data) {
return checkNotEmpty(data);
},
formatDigit(data) {
return !checkNotEmpty(data) ? '--' : (data+'').indexOf('.') > -1 && (data+'').substring((data+'').indexOf('.')).length > 2 ? data.toFixed(2) : data;
},

Loading…
Cancel
Save