|
|
|
|
@ -75,7 +75,7 @@ |
|
|
|
|
<view class="edit_item input"> |
|
|
|
|
<p class="left">投放运力-班车数</p> |
|
|
|
|
<view class="right"> |
|
|
|
|
<uni-easyinput maxlength="20" @blur="calcBusNum" @clear="calcBusNum" type="number" v-model="roadData.capacityShuttle" placeholder="请输入" placeholderStyle="color:#d4d4d4;"></uni-easyinput> |
|
|
|
|
<uni-easyinput :disabled="isEdit" length="20" @blur="calcBusNum" @clear="calcBusNum" type="number" v-model="roadData.capacityShuttle" placeholder="请输入" placeholderStyle="color:#d4d4d4;"></uni-easyinput> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="edit_item input"> |
|
|
|
|
@ -133,7 +133,7 @@ |
|
|
|
|
<view class="edit_item input"> |
|
|
|
|
<p class="left">投放运力-班车班次</p> |
|
|
|
|
<view class="right"> |
|
|
|
|
<uni-easyinput @blur="calcTotalTrips" @clear="calcTotalTrips" type="number" v-model="roadData.capacityShuttleTrips" placeholder="请输入" placeholderStyle="color:#d4d4d4;"></uni-easyinput> |
|
|
|
|
<uni-easyinput :disabled="isEdit" @blur="calcTotalTrips" @clear="calcTotalTrips" type="number" v-model="roadData.capacityShuttleTrips" placeholder="请输入" placeholderStyle="color:#d4d4d4;"></uni-easyinput> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="edit_item input"> |
|
|
|
|
@ -171,7 +171,7 @@ |
|
|
|
|
<view class="edit_item input"> |
|
|
|
|
<p class="left">班车客运量(人)</p> |
|
|
|
|
<view class="right"> |
|
|
|
|
<uni-easyinput maxlength="20" @blur="calctotalPassenger" @clear="calctotalPassenger" type="number" v-model="roadData.shuttlePassengerVolume" placeholder="请输入" placeholderStyle="color:#d4d4d4;"></uni-easyinput> |
|
|
|
|
<uni-easyinput :disabled="isEdit" maxlength="20" @blur="calctotalPassenger" @clear="calctotalPassenger" type="number" v-model="roadData.shuttlePassengerVolume" placeholder="请输入" placeholderStyle="color:#d4d4d4;"></uni-easyinput> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="edit_item input"> |
|
|
|
|
@ -387,7 +387,7 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../.. |
|
|
|
|
migrantWorkersTrips:"", //运送农民工班次 |
|
|
|
|
otherTrips:"", //除定线通勤包车、农民工包车班次 |
|
|
|
|
capacityCharterTrips:null, //投放运力:包车班次 |
|
|
|
|
capacityShuttleTrips:"", //投放运力:班车班次 |
|
|
|
|
capacityShuttleTrips:"", //投放运力:班车班次 |
|
|
|
|
capacityTotalTrips:null, //投放运力:班次 |
|
|
|
|
regularCommutePassengerVolume:"", //定线通勤包车客运量(万) |
|
|
|
|
migrantWorkersPassengerVolume:"", //运送农民工包车客运量(万) |
|
|
|
|
@ -497,6 +497,7 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../.. |
|
|
|
|
mobile: getApp().globalData.mobile, |
|
|
|
|
unitName:'', |
|
|
|
|
peopleNumber:'', |
|
|
|
|
isEdit:false, |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onLoad(options){ |
|
|
|
|
@ -511,8 +512,9 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../.. |
|
|
|
|
}else if(options.type == 'add'){ |
|
|
|
|
this.pageType = 'add'; |
|
|
|
|
let now = new Date(); |
|
|
|
|
this.roadData.statisticalDate = getDateStr(now, -1);//默认前一天 |
|
|
|
|
this.getDept(); |
|
|
|
|
this.roadData.statisticalDate = getDateStr(now, 0);//默认当天 |
|
|
|
|
// this.getDept(); |
|
|
|
|
this.getDict(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
@ -522,6 +524,12 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../.. |
|
|
|
|
phoneNumber: tel |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getDict(){ |
|
|
|
|
this.$request(getApp().globalData.baseUrl + '/api/dict/dictList?dictType=industry',"GET").then(res =>{ |
|
|
|
|
let code = res.data.find(item => item.dictLabel == '道路运输').dictValue |
|
|
|
|
this.getDept(code) |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
getDataDetail(reportPhase,reportUnit,statisticalDate){ |
|
|
|
|
this.$request(getApp().globalData.baseUrl + '/api/biz/roadtransport/road/getDetail?reportPhase=' + reportPhase + '&reportUnit=' + reportUnit + '&statisticalDate=' + statisticalDate,{},"GET").then(res =>{ |
|
|
|
|
res.data.reportPhase = this.roadData.reportPhase; |
|
|
|
|
@ -539,6 +547,11 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../.. |
|
|
|
|
this.peopleName = tmp ? tmp.people.split(',')[0] : '' |
|
|
|
|
this.peopleNumber = tmp ? tmp.people.split(',')[1] : this.roadData.contactNumber |
|
|
|
|
} |
|
|
|
|
if(this.isEdit){ |
|
|
|
|
this.roadData.capacityShuttle = this.roadData.capacityShuttle ? this.roadData.capacityShuttle : 0 |
|
|
|
|
this.roadData.capacityShuttleTrips = this.roadData.capacityShuttleTrips ? this.roadData.capacityShuttleTrips : 0 |
|
|
|
|
this.roadData.shuttlePassengerVolume = this.roadData.shuttlePassengerVolume ? this.roadData.shuttlePassengerVolume : 0 |
|
|
|
|
} |
|
|
|
|
this.getRatio(); |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
@ -641,11 +654,11 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../.. |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
getDept(){ |
|
|
|
|
getDept(code){ |
|
|
|
|
// 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 =>{ |
|
|
|
|
this.$request(getApp().globalData.baseUrl + '/api/dept/getCurrentAndSubordinateDept?tradeCode='+ code +'&deptName=',{},"GET").then(res =>{ |
|
|
|
|
console.log('单位===>',res) |
|
|
|
|
this.treeData = res.data; |
|
|
|
|
if(this.pageType == 'add'){ |
|
|
|
|
@ -654,6 +667,11 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../.. |
|
|
|
|
this.roadData.reportingUnitId = this.deptNameList.length > 0 ? this.deptNameList[0].deptName : ''; |
|
|
|
|
this.roadData.reportingUnitIdIndex = this.deptNameList.length > 0 ? 0 : ''; |
|
|
|
|
this.selectId1 = this.unitId; |
|
|
|
|
if(res.data[0].children.length == 0){ |
|
|
|
|
this.isEdit = true |
|
|
|
|
}else{ |
|
|
|
|
this.isEdit = false |
|
|
|
|
} |
|
|
|
|
this.getRoadTime() |
|
|
|
|
}else if(this.pageType == 'edit'){ |
|
|
|
|
console.log('reportingUnitId===>',this.roadData.reportingUnitId) |
|
|
|
|
@ -661,6 +679,14 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../.. |
|
|
|
|
this.unitId = this.roadData.responsiblePersonId; |
|
|
|
|
this.unitName = this.roadData.reportingUnitId; |
|
|
|
|
this.selectId1 = this.unitId; |
|
|
|
|
if(res.data[0].children.length == 0){ |
|
|
|
|
this.isEdit = true |
|
|
|
|
this.roadData.capacityShuttle = this.roadData.capacityShuttle ? this.roadData.capacityShuttle : 0 |
|
|
|
|
this.roadData.capacityShuttleTrips = this.roadData.capacityShuttleTrips ? this.roadData.capacityShuttleTrips : 0 |
|
|
|
|
this.roadData.shuttlePassengerVolume = this.roadData.shuttlePassengerVolume ? this.roadData.shuttlePassengerVolume : 0 |
|
|
|
|
}else{ |
|
|
|
|
this.isEdit = false |
|
|
|
|
} |
|
|
|
|
this.getPeople() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
@ -669,7 +695,8 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../.. |
|
|
|
|
this.$request(getApp().globalData.baseUrl + '/api/biz/roadtransport/road/getDataByTime?reportPhase=' + reportPhase + '&reportUnit=' + reportUnit + '&statisticalDate=' + statisticalDate,{},"GET").then(res =>{ |
|
|
|
|
this.roadData = res.data; |
|
|
|
|
this.getRoadTime(); |
|
|
|
|
this.getDept(); |
|
|
|
|
this.getDict() |
|
|
|
|
// this.getDept(); |
|
|
|
|
// console.log('last==>',lastYearDate(this.roadData.statisticalDate)) |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
@ -814,21 +841,25 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../.. |
|
|
|
|
let now = new Date(); |
|
|
|
|
// let dateStr = getDateStr(now,0); |
|
|
|
|
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()) { |
|
|
|
|
this.roadData.reportPhase = "0012"; |
|
|
|
|
this.index = this.roadTime.findIndex(item => item.dictValue == "0012") |
|
|
|
|
this.timeName = this.roadTime.find(item => item.dictValue == "0012").dictLabel |
|
|
|
|
}else{ |
|
|
|
|
// if(new Date(dateStr + ' 11:00').getTime() < new Date().getTime() && new Date().getTime() < new Date(dateStr + ' 13:30').getTime()) { |
|
|
|
|
// this.roadData.reportPhase = "0012"; |
|
|
|
|
// this.index = this.roadTime.findIndex(item => item.dictValue == "0012") |
|
|
|
|
// this.timeName = this.roadTime.find(item => item.dictValue == "0012").dictLabel |
|
|
|
|
// }else{ |
|
|
|
|
this.roadData.reportPhase = "03"; |
|
|
|
|
this.index = this.roadTime.findIndex(item => item.dictValue == "03") |
|
|
|
|
this.timeName = this.roadTime.find(item => item.dictValue == "03").dictLabel |
|
|
|
|
} |
|
|
|
|
// } |
|
|
|
|
//报送阶段 - 初始化查询当前账户下级报送汇总数据 |
|
|
|
|
this.$request(getApp().globalData.baseUrl + '/api/biz/roadtransport/road/getDetail?reportPhase=' + this.roadData.reportPhase + '&reportUnit=' + this.roadData.reportingUnitId + '&statisticalDate=' + this.roadData.statisticalDate,{},"GET").then(res =>{ |
|
|
|
|
res.data.reportPhase = this.roadData.reportPhase; |
|
|
|
|
res.data.reportingUnitId = this.roadData.reportingUnitId; |
|
|
|
|
res.data.statisticalDate = this.roadData.statisticalDate; |
|
|
|
|
this.roadData = res.data; |
|
|
|
|
console.log('roadData ====>',this.roadData.capacityShuttle) |
|
|
|
|
this.roadData.capacityShuttle = this.roadData.capacityShuttle ? this.roadData.capacityShuttle : 0 |
|
|
|
|
this.roadData.capacityShuttleTrips = this.roadData.capacityShuttleTrips ? this.roadData.capacityShuttleTrips : 0 |
|
|
|
|
this.roadData.shuttlePassengerVolume = this.roadData.shuttlePassengerVolume ? this.roadData.shuttlePassengerVolume : 0 |
|
|
|
|
this.getPeople() |
|
|
|
|
}) |
|
|
|
|
this.getRatio() |
|
|
|
|
@ -1027,6 +1058,11 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../.. |
|
|
|
|
/deep/ .content-clear-icon{ |
|
|
|
|
padding: 0 !important; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/deep/.is-disabled{ |
|
|
|
|
background: transparent !important; |
|
|
|
|
color:#333; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|