- {{timeName ? timeName : '请选择统计时段'}}
+ {{timeName ? timeName : '请选择'}}
@@ -501,13 +501,12 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../..
if(options.type == 'edit'){
const item = JSON.parse(options.item);
this.pageType = 'edit'
- this.getDetail(item.id);
+ this.getDetail(item.reportPhase, item.reportUnit, item.statisticalDate);
}else if(options.type == 'add'){
this.pageType = 'add';
- this.getDept()
-
let now = new Date();
this.roadData.statisticalDate = getDateStr(now, -1);//默认前一天
+ this.getDept();
}
},
@@ -590,7 +589,7 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../..
// this.$request(getApp().globalData.baseUrl + '/api/user/getByDeptId/' + this.unitId,{},"GET").then(res =>{
console.log('人员列表 ===>',res)
res.data.list.map(item =>{
- this.peopleList.push({id:item.id,people:item.username + (item.mobile ? ',' + item.mobile : '')})
+ this.peopleList.push({id:item.id,people:(item.nickname ? item.nickname : item.username) + (item.mobile ? ',' + item.mobile : '')})
})
if(this.pageType == 'edit'){
console.log('deptNameList ===>',this.peopleList)
@@ -616,7 +615,7 @@ 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;
- this.getRoadTime()
+ this.getRoadTime()
this.getPeople()
}else if(this.pageType == 'edit'){
console.log('reportingUnitId===>',this.roadData.reportingUnitId)
@@ -628,8 +627,8 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../..
}
})
},
- getDetail(id){
- this.$request(getApp().globalData.baseUrl + '/api/biz/roadtransport/road/find/' + id,{},"GET").then(res =>{
+ getDetail(reportPhase,reportUnit,statisticalDate){
+ 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();
@@ -712,7 +711,7 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../..
}else{
uni.showModal({
title:"提示",
- content:params.id == undefined ? "您确认提交该条报送数据?" : "您确认将该条数据进行修改?",
+ content: !checkNotEmpty(params.id) ? "您确认提交该条报送数据?" : "您确认将该条数据进行修改?",
success:(res) =>{
if(res.confirm){
params.isPassengerCountConvert = 0;
@@ -781,6 +780,13 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../..
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;
+ })
this.getRatio()
}
diff --git a/pages/roadTransport/transportData/list.vue b/pages/roadTransport/transportData/list.vue
index 9c097d7..a70c21c 100644
--- a/pages/roadTransport/transportData/list.vue
+++ b/pages/roadTransport/transportData/list.vue
@@ -6,15 +6,14 @@