From d435de943589eb60a76ca0844efe2aa96cb68a3c Mon Sep 17 00:00:00 2001 From: kongdeqiang <123456> Date: 星期二, 12 十一月 2024 09:46:52 +0800 Subject: [PATCH] feat: 统计日报表 --- src/components/page/orderRecord/indexDay.vue | 104 ++++++++++++++++++++++++++++++++++ src/store/state.js | 19 ++++++ src/components/page/IndexXTYH.vue | 35 ++++++----- src/router/index.js | 5 + 4 files changed, 146 insertions(+), 17 deletions(-) diff --git a/src/components/page/IndexXTYH.vue b/src/components/page/IndexXTYH.vue index 2e02aac..1e80da9 100644 --- a/src/components/page/IndexXTYH.vue +++ b/src/components/page/IndexXTYH.vue @@ -265,23 +265,26 @@ this.dataLoading = false this.payFlag = false if(!this.statisticData.enterTime) { //娌℃湁鍏ュ満 - this.isShowjiaofei = false - this.pipaiCarNumShow = true //鍖归厤鍖哄煙鏄剧ず - this.$byutil.getData(this,this.$systemconfig.basePath + '/ffzf/outpark/getLikeCar',{outParkId:this.outParkId},res => { - if(res.code == 0) { - if(res.data.length > 0) { - this.moreCarNumData = res.data.map(item => { - return { - ...item, - createTime: this.$moment(item.createTime).format('YYYY-MM-DD HH:mm:ss') - } - }) - }else { - this.tishiDialogVisiable = true //鍏ュ満淇℃伅 寮傚父鎻愮ず + if(this.statisticData.carNo =='_鏃燺' || this.statisticData.carNo=='鏃犺溅鐗�'){ + this.isShowjiaofei = false + }else { + this.isShowjiaofei = false + this.pipaiCarNumShow = true //鍖归厤鍖哄煙鏄剧ず + this.$byutil.getData(this,this.$systemconfig.basePath + '/ffzf/outpark/getLikeCar',{outParkId:this.outParkId},res => { + if(res.code == 0) { + if(res.data.length > 0) { + this.moreCarNumData = res.data.map(item => { + return { + ...item, + createTime: this.$moment(item.createTime).format('YYYY-MM-DD HH:mm:ss') + } + }) + }else { + this.tishiDialogVisiable = true //鍏ュ満淇℃伅 寮傚父鎻愮ず + } } - } - }) - + }) + } }else if(this.statisticData.enterTime && (!this.statisticData.price || this.statisticData.price == 0)) { //閲戦涓�0 this.isShowjiaofei = false if(this.statisticData.carNo !='_鏃燺' && this.statisticData.carNo!='鏃犺溅鐗�') { diff --git a/src/components/page/orderRecord/indexDay.vue b/src/components/page/orderRecord/indexDay.vue new file mode 100644 index 0000000..7509b7f --- /dev/null +++ b/src/components/page/orderRecord/indexDay.vue @@ -0,0 +1,104 @@ +<template> + <div> + <div style="padding: 10px 10px 0px 10px;"> + <el-form :inline="true" :model="searchForm"> + <el-form-item label="鍋滆溅鍦�"> + <el-select v-model="searchForm.parkId" clearable> + <el-option v-for="item in table1" :key="item.id" :label="item.name" :value="item.id" ></el-option> + </el-select> + </el-form-item> + <el-form-item label="閫夋嫨鏈堜唤"> + <div class="date-box"> + <el-date-picker + v-model="searchForm.day" + type="month" + value-format="yyyy-MM" + placeholder="閫夋嫨鏈�"> + </el-date-picker> + </div> + </el-form-item> + <el-form-item> + <el-button type="primary" size="small" @click="onSearch" icon="el-icon-search">鏌ヨ</el-button> + </el-form-item> + </el-form> + </div> + + <el-table :data="table2" border style="width:55%;border:1px solid #bcbec2;" show-summary> + <el-table-column + prop="ti" + align="center" + label="鏃ユ湡" + width="120"> + </el-table-column> + <el-table-column prop="parkName" label="鍋滆溅鍦�" align="center" > + <el-table-column prop="num" label="鏈夋晥璁㈠崟鏁�" align="center" ></el-table-column> + <el-table-column prop="price" label="璁㈠崟鎬婚噾棰�(鍏�)" align="center" ></el-table-column> + </el-table-column> + </el-table> + </div> +</template> + +<script> + export default { + name: "index", + data: function () { + return { + flag:false, + flag2:false, + searchForm: { + parkId: '', + startTime:'', + endTime:'', + day:'', + }, + formData: { + parkName:'', + orderNum:'', + orderMoney:'' + }, + urlPath:this.$systemconfig.basePath + '/ffzf/orderrecord/', + table1:[], + table2:[], + } + }, + mounted() { + this.defaultDate(); + this.$byutil.postData(this, this.$systemconfig.basePath+'/ffzf/park/findAll', this.formData, res => { + this.table1 = res.data; + }) + }, + methods: { + loadData() { + this.$byutil.postData(this, this.urlPath+'findCountPageByDay', this.searchForm,res => { + this.table2 = res.data; + }); + }, + onSearch() { + this.loadData(); + }, + //璁剧疆榛樿鏃ユ湡 + defaultDate(){ + //榛樿鏄剧ず涓婃湀鏃ユ湡 + // let date = new Date(new Date() - 30 * 24 * 3600 * 1000); + // this.value = + // date.getFullYear() + + // (date.getMonth() + 1 < 10 ? "0" : "") + + // (date.getMonth() + 1); + // console.log(this.value ); //202212 + + //榛樿鏄剧ず褰撴湀鏃ユ湡 + let date = new Date(new Date()); + this.searchForm.day = + date.getFullYear() +'-'+ + (date.getMonth() + 1 < 10 ? "0" : "") + + (date.getMonth() + 1); + console.log(this.value ); //202301 + this.loadData() + }, + } + } +</script> + +<style scoped> + +</style> diff --git a/src/router/index.js b/src/router/index.js index 95d4ce7..852c55a 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -70,6 +70,11 @@ meta: { title: '璁㈠崟缁熻' } }, { + path: '/orderRecordDay', + component: resolve => require(['../components/page/orderRecord/indexDay.vue'], resolve), + meta: { title: '璁㈠崟缁熻璇︽儏' } + }, + { path: '/violationType', component: resolve => require(['../components/page/violationType/index.vue'], resolve), meta: { title: '杩濈珷绫诲瀷绠$悊' } diff --git a/src/store/state.js b/src/store/state.js index 130fbbe..1080d8a 100644 --- a/src/store/state.js +++ b/src/store/state.js @@ -85,6 +85,12 @@ parentId: 2, indexUrl: "orderRecord" }, + { + icon: 'el-icon-document', + name: '璁㈠崟缁熻璇︽儏', + parentId: 2, + indexUrl: "orderRecordDay" + }, ] }, { @@ -169,6 +175,12 @@ parentId: 2, indexUrl: "orderRecord" }, + { + icon: 'el-icon-document', + name: '璁㈠崟缁熻璇︽儏', + parentId: 2, + indexUrl: "orderRecordDay" + }, ] }, @@ -211,7 +223,12 @@ parentId: 2, indexUrl: "orderRecord" }, - + { + icon: 'el-icon-document', + name: '璁㈠崟缁熻璇︽儏', + parentId: 2, + indexUrl: "orderRecordDay" + }, ] }, -- Gitblit v1.9.1