From aaa14fd4d2af3c61cf2732e0cf1fbd1a391853f5 Mon Sep 17 00:00:00 2001 From: zhangqun <179111901@qq.com> Date: Mon, 9 Oct 2023 15:51:10 +0800 Subject: [PATCH] =?UTF-8?q?=E9=81=93=E8=B7=AF=E8=BF=90=E8=BE=93=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=94=B9=E7=89=88=E9=87=8D=E6=96=B0=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 8 +- .../transportData/detail-copy.vue | 383 ------------------ pages/roadTransport/transportData/form.vue | 101 ++--- pages/roadTransport/transportData/list.vue | 101 +++-- 4 files changed, 77 insertions(+), 516 deletions(-) delete mode 100644 pages/roadTransport/transportData/detail-copy.vue diff --git a/pages.json b/pages.json index c6fc74d..5d0d8e9 100644 --- a/pages.json +++ b/pages.json @@ -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" } }, @@ -164,14 +164,14 @@ { "path": "pages/roadTransport/transportData/list", "style": { - "navigationBarTitleText": "道路运输", + "navigationBarTitleText": "道路运输数据", "enablePullDownRefresh": true } }, { "path": "pages/roadTransport/transportData/form", "style": { - "navigationBarTitleText": "道路运输编辑" + "navigationBarTitleText": "道路运输数据报送" } }, { diff --git a/pages/roadTransport/transportData/detail-copy.vue b/pages/roadTransport/transportData/detail-copy.vue deleted file mode 100644 index a2607fd..0000000 --- a/pages/roadTransport/transportData/detail-copy.vue +++ /dev/null @@ -1,383 +0,0 @@ - - - - - - - - 管理单位 - {{roadData.reportingUnitId}} - - {{roadData.statisticalDate || ''}} {{roadData.reportPhaseValue}} - - - 负责人 - {{roadData.responsiblePersonId || ''}} - - - 除定线、农民工包车辆 - {{roadData.otherCharter == 0 ? 0 : roadData.otherCharter || ''}} - - - 投放运力:包车数 - {{roadData.capacityCharter == 0 ? 0 : roadData.capacityCharter || ''}} - - - 收费站出口车辆数汇总环比: - {{roadData.exitVehicleCountMom ? roadData.exitVehicleCountMom + '%' : roadData.exitVehicleCountMom == 0 ? 0 : ''}} - - - 收费站入口车辆数汇总同比: - {{roadData.entranceVehicleCountYoy ? roadData.entranceVehicleCountYoy + '%' : roadData.entranceVehicleCountYoy == 0 ? 0 : ''}} - - - 收费站出口车辆数汇总同比: - {{roadData.exitVehicleCountYoy ? roadData.exitVehicleCountYoy + '%' : roadData.exitVehicleCountYoy == 0 ? 0 : ''}} - - - - - 收费站名称: - {{item.tollStationName}} - - - 高速公路名称: - {{item.highwayName}} - - - 收费站入口车辆数: - {{item.entranceVehicleCount}} - - - - 收费站入口车辆数环比(%) - {{item.entranceVehicleCountMom ? item.entranceVehicleCountMom + '%' : item.entranceVehicleCountMom == 0 ? 0 : ''}} - - - 收费站入口车辆数同比(%) - {{item.entranceVehicleCountYoy ? item.entranceVehicleCountYoy + '%' : item.entranceVehicleCountYoy == 0 ? 0 : ''}} - - - - 收费站出口车辆数: - {{item.exitVehicleCount}} - - - - 收费站出口车辆数环比(%) - {{item.exitVehicleCountMom ? item.exitVehicleCountMom + '%' : item.exitVehicleCountMom == 0 ? 0 : ''}} - - - 收费站出口车辆数同比(%) - {{item.exitVehicleCountYoy ? item.exitVehicleCountYoy + '%' : item.exitVehicleCountYoy == 0 ? 0 : ''}} - - - - 免收通行费车辆数: - {{item.tollExemptVehicleCount}} - - - - 免收通行费车辆数环比(%) - {{item.tollExemptVehicleCountMom ? item.tollExemptVehicleCountMom + '%' : item.tollExemptVehicleCountMom == 0 ? 0 : ''}} - - - 免收通行费车辆数同比(%) - {{item.tollExemptVehicleCountYoy ? item.tollExemptVehicleCountYoy + '%' : item.tollExemptVehicleCountYoy == 0 ? 0 : ''}} - - - - 免收通行费金额: - {{item.tollExemptAmount}} - - - 出口通行费: - {{item.exitToll}} - - - 报送人员及联系方式: - {{item.submitPersonnelContact}} - - - - 收起 - - - - - 收费站名称: - {{item.tollStationName}} - - - - - - 编辑 - - - - - - - - diff --git a/pages/roadTransport/transportData/form.vue b/pages/roadTransport/transportData/form.vue index 1252011..2da5104 100644 --- a/pages/roadTransport/transportData/form.vue +++ b/pages/roadTransport/transportData/form.vue @@ -11,18 +11,12 @@ 填报单位 - - - + + {{roadData.reportingUnitId}} @@ -44,7 +38,7 @@ - {{timeName ? timeName : '请选择统计时段'}} + {{timeName ? timeName : '请选择'}} @@ -243,61 +237,6 @@ - - - - - - 备注 @@ -562,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(); } }, @@ -651,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) @@ -665,7 +603,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'){ @@ -674,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) @@ -686,11 +627,11 @@ 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() + this.getDept(); // console.log('last==>',lastYearDate(this.roadData.statisticalDate)) }) }, @@ -770,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; @@ -839,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() } @@ -1139,8 +1087,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%; diff --git a/pages/roadTransport/transportData/list.vue b/pages/roadTransport/transportData/list.vue index 1782e4a..a70c21c 100644 --- a/pages/roadTransport/transportData/list.vue +++ b/pages/roadTransport/transportData/list.vue @@ -3,58 +3,18 @@ - + 报送时间 - {{item.statisticalDate || ''}}{{item.reportPhaseValue || ''}} - - {{item.reportingUnitId || ''}} - - - + + + {{item2}} + item.show == true); + if(idx > -1) { + this.listData[idx].show = false; + } + } this.listData[index1].show = flag; }, //时段 @@ -167,6 +134,11 @@ this.timeArray = res.data; }) }, + //时段文本转换 + renderTime(reportPhase) { + let idx = this.timeArray.findIndex(item => item.dictValue == reportPhase); + return idx > -1 ? this.timeArray[idx].dictLabel : ''; + }, // 点击筛选按钮 handleSearch(){ this.$refs.popup.open('bottom') @@ -234,7 +206,7 @@ ...this.query, } console.log('params ===>',params) - this.$request(getApp().globalData.baseUrl + '/api/biz/roadtransport/road/list',params,"GET").then(res =>{ + this.$request(getApp().globalData.baseUrl + '/api/biz/roadtransport/road/getTimeList',params,"GET").then(res =>{ console.log(res) if(res.code == 200){ res.data.list.map(item =>{ @@ -284,11 +256,15 @@ }) }, // 点击编辑按钮 - editItem(row){ - console.log(row) + editItem(row,reportUnit){ + let param = { + statisticalDate: row.statisticalDate, + reportUnit: reportUnit, + reportPhase: row.reportPhase + } uni.navigateTo({ // url:'pages/roadTransport/transportData/detail?item=' + JSON.stringify(row) - url:"/pages/roadTransport/transportData/form?item=" + JSON.stringify(row) + '&type=edit' + url:"/pages/roadTransport/transportData/form?item=" + JSON.stringify(param) + '&type=edit' }) }, // 点击查看详情按钮 @@ -345,6 +321,7 @@ } .unit_name { + flex: 1; color: #333333; font-size: 30rpx; font-family: PingFang SC-Bold, PingFang SC; @@ -353,6 +330,10 @@ margin-left: 20rpx; word-break: break-all; } + .unit_arrow{ + float: right; + line-height: 48rpx; + } } .report_time { color: #999999; @@ -372,6 +353,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;
编辑
填报单位
{{timeName ? timeName : '请选择统计时段'}}
{{timeName ? timeName : '请选择'}}
备注