清运报表

This commit is contained in:
曹磊 2025-07-11 16:12:13 +08:00
parent 9b928f794f
commit 07db11caa6
17 changed files with 1396 additions and 133 deletions

View File

@ -47,10 +47,6 @@
containLabel: true containLabel: true
}), }),
}, },
seriesLabel: {
type: Object,
default: () => ({show: false, position: 'top'}),
},
}, },
emits: ['click'], emits: ['click'],
setup(props, { emit }) { setup(props, { emit }) {

View File

@ -41,6 +41,10 @@ export const getExportUrl = Api.exportXls;
*/ */
export const list = (params) => defHttp.get({ url: Api.list, params }); export const list = (params) => defHttp.get({ url: Api.list, params });
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({ url: url, params });
};
export const queryXqHyXzList = (params) => defHttp.get({ url: Api.queryXqHyXzList, params }); export const queryXqHyXzList = (params) => defHttp.get({ url: Api.queryXqHyXzList, params });
export const queryXqHyTdcsList = (params) => defHttp.get({ url: Api.queryXqHyTdcsList, params }); export const queryXqHyTdcsList = (params) => defHttp.get({ url: Api.queryXqHyTdcsList, params });

View File

@ -42,8 +42,10 @@
</a-card> </a-card>
<!-- 查看详情弹窗 --> <!-- 查看详情弹窗 -->
<a-modal v-model:visible="detailVisible" title="新增会员详情" width="80%" :footer="null"> <a-modal v-model:visible="detailVisible" title="新增会员详情" width="80%" :footer="null">
<a-table :dataSource="detailData" :columns="detailXzhyColumns" rowKey="rowNumber"> <a-spin :spinning="confirmLoading">
</a-table> <a-table :dataSource="detailData" :columns="detailXzhyColumns" rowKey="rowNumber">
</a-table>
</a-spin>
</a-modal> </a-modal>
</div> </div>
</template> </template>
@ -60,6 +62,7 @@
const housingestates = ref(); const housingestates = ref();
const izList = ref(false) const izList = ref(false)
const detailVisible = ref(false); const detailVisible = ref(false);
const confirmLoading = ref(false);
const detailData = ref([]); const detailData = ref([]);
const parmas = reactive<any>({ const parmas = reactive<any>({
@ -104,13 +107,13 @@
// //
const handleView = async (record) => { const handleView = async (record) => {
console.log("🚀 ~ handleView ~ record:", record) detailVisible.value = true;
try { try {
confirmLoading.value = true;
detailData.value = []; detailData.value = [];
const res = await queryXzhyDetailList({ housingestateId: record.housingestateId,beginTime:parmas.beginTime,endTime:parmas.endTime,pageSize: -1 }); const res = await queryXzhyDetailList({ housingestateId: record.housingestateId,beginTime:parmas.beginTime,endTime:parmas.endTime,pageSize: -1 });
detailData.value = res.records; detailData.value = res.records;
console.log("🚀 ~ handleView ~ res:", res) confirmLoading.value = false;
detailVisible.value = true;
} catch (error) { } catch (error) {
console.error('获取详情失败:', error); console.error('获取详情失败:', error);
} }

View File

@ -42,8 +42,10 @@
</a-card> </a-card>
<!-- 查看详情弹窗 --> <!-- 查看详情弹窗 -->
<a-modal v-model:visible="detailVisible" title="投递次数详情" width="80%" :footer="null"> <a-modal v-model:visible="detailVisible" title="投递次数详情" width="80%" :footer="null">
<a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="rowNumber"> <a-spin :spinning="confirmLoading">
</a-table> <a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="rowNumber">
</a-table>
</a-spin>
</a-modal> </a-modal>
</div> </div>
</template> </template>
@ -58,9 +60,10 @@
const dataSource = ref([]); const dataSource = ref([]);
const dateValue = ref(); const dateValue = ref();
const housingestates = ref(); const housingestates = ref();
const izList = ref(false) const izList = ref(false)
const detailVisible = ref(false); const detailVisible = ref(false);
const detailData = ref([]); const confirmLoading = ref(false);
const detailData = ref([]);
async function getHousingestates(){ async function getHousingestates(){
housingestates.value = await housingestateList(null); housingestates.value = await housingestateList(null);
@ -74,13 +77,13 @@ const detailData = ref([]);
// //
const handleView = async (record) => { const handleView = async (record) => {
console.log("🚀 ~ handleView ~ record:", record) detailVisible.value = true;
try { try {
confirmLoading.value = true;
detailData.value = []; detailData.value = [];
const res = await queryTdcsDetailList({ housingestateId: record.housingestateId,beginTime:parmas.beginTime,endTime:parmas.endTime,pageSize: -1 }); const res = await queryTdcsDetailList({ housingestateId: record.housingestateId,beginTime:parmas.beginTime,endTime:parmas.endTime,pageSize: -1 });
detailData.value = res.records; detailData.value = res.records;
console.log("🚀 ~ handleView ~ res:", res) confirmLoading.value = false;
detailVisible.value = true;
} catch (error) { } catch (error) {
console.error('获取详情失败:', error); console.error('获取详情失败:', error);
} }

View File

@ -42,8 +42,10 @@
</a-card> </a-card>
<!-- 查看详情弹窗 --> <!-- 查看详情弹窗 -->
<a-modal v-model:visible="detailVisible" title="投递重量详情" width="80%" :footer="null"> <a-modal v-model:visible="detailVisible" title="投递重量详情" width="80%" :footer="null">
<a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="phone"> <a-spin :spinning="confirmLoading">
</a-table> <a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="phone">
</a-table>
</a-spin>
</a-modal> </a-modal>
</div> </div>
</template> </template>
@ -58,9 +60,10 @@
const dataSource = ref([]); const dataSource = ref([]);
const dateValue = ref(); const dateValue = ref();
const housingestates = ref(); const housingestates = ref();
const izList = ref(false) const izList = ref(false)
const detailVisible = ref(false); const detailVisible = ref(false);
const detailData = ref([]); const confirmLoading = ref(false);
const detailData = ref([]);
async function getHousingestates(){ async function getHousingestates(){
housingestates.value = await housingestateList(null); housingestates.value = await housingestateList(null);
@ -74,13 +77,14 @@ const detailData = ref([]);
// //
const handleView = async (record) => { const handleView = async (record) => {
console.log("🚀 ~ handleView ~ record:", record) detailVisible.value = true;
try { try {
confirmLoading.value = true;
detailData.value = []; detailData.value = [];
const res = await queryTdcsDetailList({ housingestateId: record.housingestateId,beginTime:parmas.beginTime,endTime:parmas.endTime,pageSize: -1 }); const res = await queryTdcsDetailList({ housingestateId: record.housingestateId,beginTime:parmas.beginTime,endTime:parmas.endTime,pageSize: -1 });
detailData.value = res.records; detailData.value = res.records;
console.log("🚀 ~ handleView ~ res:", res) confirmLoading.value = false;
detailVisible.value = true;
} catch (error) { } catch (error) {
console.error('获取详情失败:', error); console.error('获取详情失败:', error);
} }

View File

@ -42,27 +42,29 @@
</a-card> </a-card>
<!-- 查看详情弹窗 --> <!-- 查看详情弹窗 -->
<a-modal v-model:visible="detailVisible" title="会员投递详情" width="80%" :footer="null"> <a-modal v-model:visible="detailVisible" title="会员投递详情" width="80%" :footer="null">
<a-row> <a-spin :spinning="confirmLoading">
<a-col :span="20"> <a-row>
<div style="margin: 5px 0px 5px 20px">订单状态 <a-col :span="20">
<a-select ref="select" <div style="margin: 5px 0px 5px 20px">订单状态
placeholder="请选订单状态" <a-select ref="select"
v-model:value="detailParmas.invalid" placeholder="请选订单状态"
style="width: 200px;margin-left: 5px;" v-model:value="detailParmas.invalid"
@change="loadDetailDate"> style="width: 200px;margin-left: 5px;"
<a-select-option value="" >全部</a-select-option> @change="loadDetailDate">
<a-select-option value="0">正常</a-select-option> <a-select-option value="" >全部</a-select-option>
<a-select-option value="1">违规</a-select-option> <a-select-option value="0">正常</a-select-option>
<a-select-option value="2">部分违规</a-select-option> <a-select-option value="1">违规</a-select-option>
<a-select-option value="3">待审核</a-select-option> <a-select-option value="2">部分违规</a-select-option>
<a-select-option value="4">异常</a-select-option> <a-select-option value="3">待审核</a-select-option>
<a-select-option value="5">忽略</a-select-option> <a-select-option value="4">异常</a-select-option>
</a-select> <a-select-option value="5">忽略</a-select-option>
</div> </a-select>
</a-col> </div>
</a-row> </a-col>
<a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="rowNumber"> </a-row>
</a-table> <a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="rowNumber">
</a-table>
</a-spin>
</a-modal> </a-modal>
</div> </div>
</template> </template>
@ -80,6 +82,7 @@ const dateValue = ref();
const housingestates = ref(); const housingestates = ref();
const izList = ref(false) const izList = ref(false)
const detailVisible = ref(false); const detailVisible = ref(false);
const confirmLoading = ref(false);
const detailData = ref([]); const detailData = ref([]);
async function getHousingestates() { async function getHousingestates() {
@ -155,11 +158,13 @@ const handleView = async (record) => {
// //
async function loadDetailDate(){ async function loadDetailDate(){
detailVisible.value = true;
try { try {
confirmLoading.value = true;
detailData.value = []; detailData.value = [];
const res = await queryHywgList({ beginTime:parmas.beginTime,endTime:parmas.endTime,housingestateId:parmas.housingestateId,phone:detailParmas.phone,invalid:detailParmas.invalid }); const res = await queryHyjlList({ beginTime:parmas.beginTime,endTime:parmas.endTime,housingestateId:parmas.housingestateId,phone:detailParmas.phone,invalid:detailParmas.invalid });
detailData.value = res; detailData.value = res;
detailVisible.value = true; confirmLoading.value = false;
} catch (error) { } catch (error) {
console.error('获取详情失败:', error); console.error('获取详情失败:', error);
} }

View File

@ -42,27 +42,29 @@
</a-card> </a-card>
<!-- 查看详情弹窗 --> <!-- 查看详情弹窗 -->
<a-modal v-model:visible="detailVisible" title="会员投递详情" width="80%" :footer="null"> <a-modal v-model:visible="detailVisible" title="会员投递详情" width="80%" :footer="null">
<a-row> <a-spin :spinning="confirmLoading">
<a-col :span="20"> <a-row>
<div style="margin: 5px 0px 5px 20px">订单状态 <a-col :span="20">
<a-select ref="select" <div style="margin: 5px 0px 5px 20px">订单状态
placeholder="请选订单状态" <a-select ref="select"
v-model:value="detailParmas.invalid" placeholder="请选订单状态"
style="width: 200px;margin-left: 5px;" v-model:value="detailParmas.invalid"
@change="loadDetailDate"> style="width: 200px;margin-left: 5px;"
<a-select-option value="" >全部</a-select-option> @change="loadDetailDate">
<a-select-option value="0">正常</a-select-option> <a-select-option value="" >全部</a-select-option>
<a-select-option value="1">违规</a-select-option> <a-select-option value="0">正常</a-select-option>
<a-select-option value="2">部分违规</a-select-option> <a-select-option value="1">违规</a-select-option>
<a-select-option value="3">待审核</a-select-option> <a-select-option value="2">部分违规</a-select-option>
<a-select-option value="4">异常</a-select-option> <a-select-option value="3">待审核</a-select-option>
<a-select-option value="5">忽略</a-select-option> <a-select-option value="4">异常</a-select-option>
</a-select> <a-select-option value="5">忽略</a-select-option>
</div> </a-select>
</a-col> </div>
</a-row> </a-col>
<a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="rowNumber"> </a-row>
</a-table> <a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="rowNumber">
</a-table>
</a-spin>
</a-modal> </a-modal>
</div> </div>
</template> </template>
@ -79,6 +81,7 @@
const housingestates = ref(); const housingestates = ref();
const izList = ref(false) const izList = ref(false)
const detailVisible = ref(false); const detailVisible = ref(false);
const confirmLoading = ref(false);
const detailData = ref([]); const detailData = ref([]);
async function getHousingestates(){ async function getHousingestates(){
@ -91,7 +94,6 @@
type: '1', type: '1',
housingestateId: '', housingestateId: '',
pageSize: 10, pageSize: 10,
type: '1',
}) })
const detailParmas = reactive<any>({ const detailParmas = reactive<any>({
@ -155,11 +157,13 @@
// //
async function loadDetailDate(){ async function loadDetailDate(){
detailVisible.value = true;
try { try {
confirmLoading.value = true;
detailData.value = []; detailData.value = [];
const res = await queryHyjlList({ beginTime:parmas.beginTime,endTime:parmas.endTime,housingestateId:parmas.housingestateId,phone:detailParmas.phone,invalid:detailParmas.invalid }); const res = await queryHyjlList({ beginTime:parmas.beginTime,endTime:parmas.endTime,housingestateId:parmas.housingestateId,phone:detailParmas.phone,invalid:detailParmas.invalid });
detailData.value = res; detailData.value = res;
detailVisible.value = true; confirmLoading.value = false;
} catch (error) { } catch (error) {
console.error('获取详情失败:', error); console.error('获取详情失败:', error);
} }

View File

@ -41,23 +41,25 @@
</a-card> </a-card>
<!-- 查看详情弹窗 --> <!-- 查看详情弹窗 -->
<a-modal v-model:visible="detailVisible" title="会员投递详情" width="80%" :footer="null"> <a-modal v-model:visible="detailVisible" title="会员投递详情" width="80%" :footer="null">
<a-row> <a-spin :spinning="confirmLoading">
<a-col :span="20"> <a-row>
<div style="margin: 5px 0px 5px 20px">订单状态 <a-col :span="20">
<a-select ref="select" <div style="margin: 5px 0px 5px 20px">订单状态
placeholder="请选订单状态" <a-select ref="select"
v-model:value="detailParmas.invalid" placeholder="请选订单状态"
style="width: 200px;margin-left: 5px;" v-model:value="detailParmas.invalid"
@change="loadDetailDate"> style="width: 200px;margin-left: 5px;"
<a-select-option value="" >全部</a-select-option> @change="loadDetailDate">
<a-select-option value="1">违规</a-select-option> <a-select-option value="" >全部</a-select-option>
<a-select-option value="2">部分违规</a-select-option> <a-select-option value="1">违规</a-select-option>
</a-select> <a-select-option value="2">部分违规</a-select-option>
</div> </a-select>
</a-col> </div>
</a-row> </a-col>
<a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="rowNumber"> </a-row>
</a-table> <a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="rowNumber">
</a-table>
</a-spin>
</a-modal> </a-modal>
</div> </div>
</template> </template>
@ -73,6 +75,7 @@ const dateValue = ref();
const housingestates = ref(); const housingestates = ref();
const izList = ref(false) const izList = ref(false)
const detailVisible = ref(false); const detailVisible = ref(false);
const confirmLoading = ref(false);
const detailData = ref([]); const detailData = ref([]);
async function getHousingestates() { async function getHousingestates() {
@ -144,7 +147,9 @@ const handleView = async (record) => {
// //
async function loadDetailDate(){ async function loadDetailDate(){
detailVisible.value = true;
try { try {
confirmLoading.value = true;
detailData.value = []; detailData.value = [];
let detailParams = { let detailParams = {
beginTime:detailParmas.shortDay+' 00:00:00', beginTime:detailParmas.shortDay+' 00:00:00',
@ -154,7 +159,7 @@ async function loadDetailDate(){
}; };
const res = await queryHywgList(detailParams); const res = await queryHywgList(detailParams);
detailData.value = res; detailData.value = res;
detailVisible.value = true; confirmLoading.value = false;
} catch (error) { } catch (error) {
console.error('获取详情失败:', error); console.error('获取详情失败:', error);
} }

53
src/views/zh/qy/qy.api.ts Normal file
View File

@ -0,0 +1,53 @@
import { defHttp } from '/@/utils/http/axios';
enum Api {
staffList = '/zh/qy/queryStaffList',
housingestateList = '/zh/hy/queryHousingestateList',
querySjQyList = '/zh/qy/querySjQyList',
querySjQyZlList = '/zh/qy/querySjQyZlList',
querySjQyCsList = '/zh/qy/querySjQyCsList',
querySjdQyCsList = '/zh/qy/querySjdQyCsList',
querySjdQyZlList = '/zh/qy/querySjdQyZlList',
queryXqQyCsListlList = '/zh/qy/queryXqQyCsListlList',
}
/**
*
* @param params
*/
export const staffList = (params) => defHttp.get({ url: Api.staffList, params });
/**
*
* @param params
*/
export const housingestateList = (params) => defHttp.get({ url: Api.housingestateList, params });
/**
*
* @param params
*/
export const sjQyList = (params) => defHttp.get({ url: Api.querySjQyList, params });
/**
*
* @param params
*/
export const sjQyZlList = (params) => defHttp.get({ url: Api.querySjQyZlList, params });
/**
*
* @param params
*/
export const sjQyCsList = (params) => defHttp.get({ url: Api.querySjQyCsList, params });
/**
*
* @param params
*/
export const sjdQyCsList = (params) => defHttp.get({ url: Api.querySjdQyCsList, params });
/**
*
* @param params
*/
export const sjdQyZlList = (params) => defHttp.get({ url: Api.querySjdQyZlList, params });
/**
*
* @param params
*/
export const xqQyCsList = (params) => defHttp.get({ url: Api.queryXqQyCsListlList, params });

222
src/views/zh/qy/qy.data.ts Normal file
View File

@ -0,0 +1,222 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
import {ref} from "vue";
export const detailSjqyColumns : BasicColumn[] =[
{
title: '序号',
dataIndex: 'rowNumber',
key: 'rowNumber',
align: 'center'
},
{
title: '司机电话',
dataIndex: 'staffPhone',
key: 'staffPhone',
align: 'center'
},
{
title: '司机',
dataIndex: 'staffName',
key: 'staffName',
align: 'center'
},
{
title: '区域',
dataIndex: 'housingName',
key: 'housingName',
align: 'center'
},
{
title: '设备',
dataIndex: 'content',
key: 'content',
align: 'center'
},
{
title: '桶',
dataIndex: 'dtu',
key: 'dtu',
align: 'center'
},
{
title: '清运重量(公斤)',
dataIndex: 'thisWeight',
key: 'thisWeight',
align: 'center'
},
{
title: '清运状态',
dataIndex: 'status',
key: 'status',
align: 'center',
customRender: function ({ text }) {
if (text == '0') {
return '创建';
} else if (text == '1') {
return '完成';
} else if (text == '2') {
return '无效';
} else{
return '';
}
},
},
{
title: '清运开始时间',
dataIndex: 'startTime',
key: 'startTime',
align: 'center'
},
{
title: '清运完成时间',
dataIndex: 'finishedTime',
key: 'finishedTime',
align: 'center'
},
]
export const sjqyzlColumns : BasicColumn[] =[
{
title: '序号',
dataIndex: 'rowNumber',
key: 'rowNumber',
align: 'center'
},
{
title: '司机电话',
dataIndex: 'phone',
key: 'phone',
align: 'center'
},
{
title: '司机',
dataIndex: 'name',
key: 'name',
align: 'center'
},
{
title: '清运重量(吨)',
dataIndex: 'value',
key: 'value',
align: 'center'
},
{
title: '操作',
key: 'action',
align: 'center',
width: '150px',
}
]
export const sjqycsColumns : BasicColumn[] =[
{
title: '序号',
dataIndex: 'rowNumber',
key: 'rowNumber',
align: 'center'
},
{
title: '司机电话',
dataIndex: 'phone',
key: 'phone',
align: 'center'
},
{
title: '司机',
dataIndex: 'name',
key: 'name',
align: 'center'
},
{
title: '清运次数',
dataIndex: 'value',
key: 'value',
align: 'center'
},
{
title: '操作',
key: 'action',
align: 'center',
width: '150px',
}
]
export const sjdqycsColumns : BasicColumn[] =[
{
title: '时间',
dataIndex: 'name',
key: 'name',
align: 'center'
},
{
title: '清运次数',
dataIndex: 'value',
key: 'value',
align: 'center'
},
{
title: '操作',
key: 'action',
align: 'center',
width: '150px',
}
]
export const sjdqyzlColumns : BasicColumn[] =[
{
title: '时间',
dataIndex: 'name',
key: 'name',
align: 'center'
},
{
title: '清运重量(吨)',
dataIndex: 'value',
key: 'value',
align: 'center'
},
{
title: '操作',
key: 'action',
align: 'center',
width: '150px',
}
]
export const xqqyColumns : BasicColumn[] =[
{
title: '序号',
dataIndex: 'rowNumber',
key: 'rowNumber',
align: 'center'
},
{
title: '小区名称',
dataIndex: 'housingName',
key: 'housingName',
align: 'center'
},
{
title: '设备地点',
dataIndex: 'content',
key: 'content',
align: 'center'
},
{
title: '清运次数',
dataIndex: 'value',
key: 'value',
align: 'center'
},
{
title: '操作',
key: 'action',
align: 'center',
width: '150px',
}
]

View File

@ -0,0 +1,179 @@
<template>
<div class="p-4">
<a-card :bordered="false" style="height: 100%">
<a-row>
<a-col :span="21">
<a-radio-group v-model:value="parmas.type" @change="changeType">
<a-radio-button value="1">当天</a-radio-button>
<a-radio-button value="2">近3天</a-radio-button>
<a-radio-button value="3">近7天</a-radio-button>
<a-radio-button value="4">近30天</a-radio-button>
<a-radio-button value="5">自定义</a-radio-button>
</a-radio-group>
<span v-show="parmas.type == '5'" style="margin-left: 5px;">
<a-range-picker :value-format="valueFormat" @change="changeDate" />
</span>
<a-select ref="select" placeholder="请选区域" v-model:value="parmas.housingestateId"
style="width: 200px;margin-left: 5px;" @change="handleHousinges">
<a-select-option value="">全部</a-select-option>
<a-select-option :value="item.housingestateId" v-for="item in housingestates" :key="item.housingestateId">{{item.housingestateName }}</a-select-option>
</a-select>
</a-col>
<a-col :span="3">
<a-radio-group v-model:value="izList" button-style="solid" @change="loadDate">
<a-radio-button :value="false">统计图</a-radio-button>
<a-radio-button :value="true">列表页</a-radio-button>
</a-radio-group>
</a-col>
</a-row>
<Bar v-show="!izList" :chartData="dataSource" height="80vh" :option="{ title: { text: '时间段清运次数统计', left: 'center' }}" :itemStyle="{ normal: {label : {show: true, position: 'top'}}}" :seriesName="'清运次数'"></Bar>
<div v-show="izList" style="margin-top: 20px;">
<a-table :dataSource="dataSource" :columns="sjdqycsColumns" :pagination="false">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<a-button type="link" @click="handleView(record)">查看</a-button>
</template>
</template>
</a-table>
</div>
</a-card>
<a-modal v-model:visible="detailVisible" title="清运详情" width="80%" :footer="null">
<a-spin :spinning="confirmLoading">
<a-row>
<a-col :span="20">
<div style="margin: 5px 0px 5px 20px">清运状态
<a-select ref="select"
placeholder="请选清运状态"
v-model:value="detailParmas.status"
style="width: 200px;margin-left: 5px;"
@change="loadDetailDate">
<a-select-option value="" >全部</a-select-option>
<a-select-option value="0">创建</a-select-option>
<a-select-option value="1">完成</a-select-option>
<a-select-option value="2">无效</a-select-option>
</a-select>
</div>
</a-col>
</a-row>
<a-table :dataSource="detailData" :columns="detailSjqyColumns" rowKey="rowNumber">
</a-table>
</a-spin>
</a-modal>
</div>
</template>
<script lang="ts" setup>
import { ref, unref, reactive, onMounted } from 'vue';
import Bar from '/@/components/chart/Bar.vue';
import { housingestateList,sjdQyCsList,sjQyList } from '../qy.api';
import { sjdqycsColumns,detailSjqyColumns } from '../qy.data';
const valueFormat = 'YYYY-MM-DD';
const dataSource = ref([]);
const dateValue = ref();
const housingestates = ref();
const izList = ref(false)
const detailVisible = ref(false);
const confirmLoading = ref(false);
const detailData = ref([]);
async function getHousingestates(){
housingestates.value = await housingestateList();
}
const parmas = reactive<any>({
beginTime: '',
endTime: '',
type: '1',
housingId: '',
})
function handleHousinges(){
loadDate();
};
const detailParmas = reactive<any>({
housingId: '',
status: '',
shortHour: '',
})
function changeType() {
parmas.endTime = getPreviousDate(0) + ' 23:59:59';
if (parmas.type === '1') {
parmas.beginTime = getPreviousDate(0) + ' 00:00:00';
loadDate();
}
if (parmas.type === '2') {
parmas.beginTime = getPreviousDate(2) + ' 00:00:00';
loadDate();
}
if (parmas.type === '3') {
parmas.beginTime = getPreviousDate(6) + ' 00:00:00';
loadDate();
}
if (parmas.type === '4') {
parmas.beginTime = getPreviousDate(29) + ' 00:00:00';
loadDate();
}
}
const changeDate = (date, dateString) => {
parmas.beginTime = dateString[0] + ' 00:00:00';
parmas.endTime = dateString[1] + ' 23:59:59';
loadDate();
};
async function loadDate() {
const res = await sjdQyCsList(parmas);
dataSource.value = [];
for (let i = 0; i < res.length; i++) {
dataSource.value.push({
shortHour: `${res[i].shortHour}`,
name: `${res[i].shortHour}`,
value: res[i].cn,
});
}
}
//
const handleView = async (record) => {
detailParmas.shortHour = record.shortHour;
loadDetailDate();
}
//
async function loadDetailDate(){
detailVisible.value = true;
try {
confirmLoading.value = true;
detailData.value = [];
const res = await sjQyList({ beginTime:parmas.beginTime,endTime:parmas.endTime,housingId:parmas.housingId,status:detailParmas.status,shortHour:detailParmas.shortHour });
detailData.value = res;
confirmLoading.value = false;
} catch (error) {
console.error('获取详情失败:', error);
}
}
function getPreviousDate(days) {
const date = new Date();
date.setDate(date.getDate() - days);
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // +10-indexed
const day = String(date.getDate()).padStart(2, '0'); //
const formattedDate = `${year}-${month}-${day}`;
return formattedDate;
}
onMounted(() => {
if (parmas.type == '1') {
parmas.beginTime = getPreviousDate(0) + ' 00:00:00';
parmas.endTime = getPreviousDate(0) + ' 23:59:59';
}
loadDate();
getHousingestates();
})
</script>

View File

@ -0,0 +1,182 @@
<template>
<div class="p-4">
<a-card :bordered="false" style="height: 100%">
<a-row>
<a-col :span="21">
<a-radio-group v-model:value="parmas.type" @change="changeType">
<a-radio-button value="1">当天</a-radio-button>
<a-radio-button value="2">近3天</a-radio-button>
<a-radio-button value="3">近7天</a-radio-button>
<a-radio-button value="4">近30天</a-radio-button>
<a-radio-button value="5">自定义</a-radio-button>
</a-radio-group>
<span v-show="parmas.type == '5'" style="margin-left: 5px;">
<a-range-picker :value-format="valueFormat" @change="changeDate" />
</span>
<a-select ref="select"
placeholder="请选区域"
v-model:value="parmas.housingId"
style="width: 200px;margin-left: 5px;"
@change="handleHousinges">
<a-select-option value="" >全部</a-select-option>
<a-select-option :value="item.housingestateId" v-for="item in housingestates" :key="item.housingestateId">{{item.housingestateName}}</a-select-option>
</a-select>
</a-col>
<a-col :span="3">
<a-radio-group v-model:value="izList" button-style="solid" @change="loadDate">
<a-radio-button :value="false">统计图</a-radio-button>
<a-radio-button :value="true">列表页</a-radio-button>
</a-radio-group>
</a-col>
</a-row>
<Bar v-show="!izList" :chartData="dataSource" height="80vh" :option="{ title: { text: '时间段清运重量统计', left: 'center' }}" :itemStyle="{ normal: {label : {show: true, position: 'top'}}}" :seriesName="'清运重量(吨)'"></Bar>
<div v-show="izList" style="margin-top: 20px;">
<a-table :dataSource="dataSource" :columns="sjdqyzlColumns" :pagination="false">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<a-button type="link" @click="handleView(record)">查看</a-button>
</template>
</template>
</a-table>
</div>
</a-card>
<a-modal v-model:visible="detailVisible" title="清运详情" width="80%" :footer="null">
<a-spin :spinning="confirmLoading">
<a-row>
<a-col :span="20">
<div style="margin: 5px 0px 5px 20px">清运状态
<a-select ref="select"
placeholder="请选清运状态"
v-model:value="detailParmas.status"
style="width: 200px;margin-left: 5px;"
@change="loadDetailDate">
<a-select-option value="" >全部</a-select-option>
<a-select-option value="0">创建</a-select-option>
<a-select-option value="1">完成</a-select-option>
<a-select-option value="2">无效</a-select-option>
</a-select>
</div>
</a-col>
</a-row>
<a-table :dataSource="detailData" :columns="detailSjqyColumns" rowKey="rowNumber">
</a-table>
</a-spin>
</a-modal>
</div>
</template>
<script lang="ts" setup>
import { ref, unref, reactive, onMounted } from 'vue';
import Bar from '/@/components/chart/Bar.vue';
import { housingestateList,sjdQyZlList,sjQyList } from '../qy.api';
import { sjdqyzlColumns,detailSjqyColumns } from '../qy.data';
const valueFormat = 'YYYY-MM-DD';
const dataSource = ref([]);
const dateValue = ref();
const housingestates = ref();
const izList = ref(false)
const detailVisible = ref(false);
const confirmLoading = ref(false);
const detailData = ref([]);
async function getHousingestates(){
housingestates.value = await housingestateList();
}
const parmas = reactive<any>({
beginTime: '',
endTime: '',
type: '1',
housingId: '',
})
function handleHousinges(){
loadDate();
};
const detailParmas = reactive<any>({
housingId: '',
status: '',
shortHour: '',
})
function changeType() {
parmas.endTime = getPreviousDate(0) + ' 23:59:59';
if (parmas.type === '1') {
parmas.beginTime = getPreviousDate(0) + ' 00:00:00';
loadDate();
}
if (parmas.type === '2') {
parmas.beginTime = getPreviousDate(2) + ' 00:00:00';
loadDate();
}
if (parmas.type === '3') {
parmas.beginTime = getPreviousDate(6) + ' 00:00:00';
loadDate();
}
if (parmas.type === '4') {
parmas.beginTime = getPreviousDate(29) + ' 00:00:00';
loadDate();
}
}
const changeDate = (date, dateString) => {
parmas.beginTime = dateString[0] + ' 00:00:00';
parmas.endTime = dateString[1] + ' 23:59:59';
loadDate();
};
async function loadDate() {
const res = await sjdQyZlList(parmas);
dataSource.value = [];
for (let i = 0; i < res.length; i++) {
dataSource.value.push({
shortHour: `${res[i].shortHour}`,
name: `${res[i].shortHour}`,
value: res[i].thisWeight,
});
}
}
//
const handleView = async (record) => {
detailParmas.shortHour = record.shortHour;
loadDetailDate();
}
//
async function loadDetailDate(){
detailVisible.value = true;
try {
confirmLoading.value = true;
detailData.value = [];
const res = await sjQyList({ beginTime:parmas.beginTime,endTime:parmas.endTime,housingId:parmas.housingId,status:detailParmas.status,shortHour:detailParmas.shortHour });
detailData.value = res;
confirmLoading.value = false;
} catch (error) {
console.error('获取详情失败:', error);
}
}
function getPreviousDate(days) {
const date = new Date();
date.setDate(date.getDate() - days);
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // +10-indexed
const day = String(date.getDate()).padStart(2, '0'); //
const formattedDate = `${year}-${month}-${day}`;
return formattedDate;
}
onMounted(() => {
if (parmas.type == '1') {
parmas.beginTime = getPreviousDate(0) + ' 00:00:00';
parmas.endTime = getPreviousDate(0) + ' 23:59:59';
}
loadDate();
getHousingestates();
})
</script>

View File

@ -0,0 +1,197 @@
<template>
<div class="p-4">
<a-card :bordered="false" style="height: 100%">
<a-row>
<a-col :span="21">
<a-radio-group v-model:value="parmas.type" @change="changeType">
<a-radio-button value="1">当天</a-radio-button>
<a-radio-button value="2">近3天</a-radio-button>
<a-radio-button value="3">近7天</a-radio-button>
<a-radio-button value="4">近30天</a-radio-button>
<a-radio-button value="5">自定义</a-radio-button>
</a-radio-group>
<span v-show="parmas.type == '5'" style="margin-left: 5px;">
<a-range-picker :value-format="valueFormat" @change="changeDate" />
</span>
<a-select ref="select" placeholder="请选司机" v-model:value="parmas.staffPhone"
style="width: 200px;margin-left: 5px;" @change="handleStaff">
<a-select-option value="">全部</a-select-option>
<a-select-option :value="item.staffPhone" v-for="item in staffs" :key="item.staffPhone">{{item.staffName }}</a-select-option>
</a-select>
</a-col>
<a-col :span="3">
<a-radio-group v-model:value="izList" button-style="solid" @change="loadDate">
<a-radio-button :value="false">统计图</a-radio-button>
<a-radio-button :value="true">列表页</a-radio-button>
</a-radio-group>
</a-col>
</a-row>
<LineMulti v-show="!izList" :chartData="dataSource" height="80vh"
:option="{ title: { text: '货运司机清运次数统计', left: 'center' } }"
:seriesLabel="{show: true, position: 'top'}" type="line"></LineMulti>
<div v-show="izList" style="margin-top: 20px;">
<a-table :dataSource="dataSource" :columns="sjqycsColumns">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<a-button type="link" @click="handleView(record)">查看</a-button>
</template>
</template>
</a-table>
</div>
</a-card>
<a-modal v-model:visible="detailVisible" title="清运详情" width="80%" :footer="null">
<a-spin :spinning="confirmLoading">
<a-row>
<a-col :span="20">
<div style="margin: 5px 0px 5px 20px">清运状态
<a-select ref="select"
placeholder="请选清运状态"
v-model:value="detailParmas.status"
style="width: 200px;margin-left: 5px;"
@change="loadDetailDate">
<a-select-option value="" >全部</a-select-option>
<a-select-option value="0">创建</a-select-option>
<a-select-option value="1">完成</a-select-option>
<a-select-option value="2">无效</a-select-option>
</a-select>
</div>
</a-col>
</a-row>
<a-table :dataSource="detailData" :columns="detailSjqyColumns" rowKey="rowNumber">
</a-table>
</a-spin>
</a-modal>
</div>
</template>
<script lang="ts" setup>
import { ref, unref, reactive, onMounted } from 'vue';
import LineMulti from '/@/components/chart/LineMulti.vue';
import { staffList,sjQyList,sjQyCsList } from '../qy.api';
import { sjqycsColumns,detailSjqyColumns } from '../qy.data';
const valueFormat = 'YYYY-MM-DD';
const dataSource = ref([]);
const dateValue = ref();
const staffs = ref();
const izList = ref(false)
const detailVisible = ref(false);
const confirmLoading = ref(false);
const detailData = ref([]);
async function getStaffs() {
let params = {
beginTime: parmas.beginTime,
endTime: parmas.endTime,
}
staffs.value = await staffList(params);
}
const parmas = reactive<any>({
beginTime: '',
endTime: '',
type: '1',
staffPhone: '',
pageSize: 10,
})
const detailParmas = reactive<any>({
staffPhone: '',
status: '',
})
function changeType() {
parmas.endTime = getPreviousDate(0) + ' 23:59:59';
if (parmas.type === '1') {
parmas.beginTime = getPreviousDate(0) + ' 00:00:00';
loadDate();
getStaffs();
}
if (parmas.type === '2') {
parmas.beginTime = getPreviousDate(2) + ' 00:00:00';
loadDate();
getStaffs();
}
if (parmas.type === '3') {
parmas.beginTime = getPreviousDate(6) + ' 00:00:00';
loadDate();
getStaffs();
}
if (parmas.type === '4') {
parmas.beginTime = getPreviousDate(29) + ' 00:00:00';
loadDate();
getStaffs();
}
}
const changeDate = (date, dateString) => {
parmas.beginTime = dateString[0] + ' 00:00:00';
parmas.endTime = dateString[1] + ' 23:59:59';
loadDate();
getStaffs();
};
function handleStaff() {
loadDate();
};
async function loadDate() {
if(izList.value){
parmas.pageSize=-1
}else{
parmas.pageSize=10
}
const resData = await sjQyCsList(parmas);
const res = resData.records;
dataSource.value = [];
for (let i = 0; i < res.length; i++) {
dataSource.value.push({
type: '清运次数',
rowNumber: res[i].rowNumber,
phone: `${res[i].staffPhone}`,
name: `${res[i].staffName}`,
value: res[i].cn,
});
}
}
//
const handleView = async (record) => {
detailParmas.staffPhone = record.phone;
loadDetailDate();
}
//
async function loadDetailDate(){
detailVisible.value = true;
try {
confirmLoading.value = true;
detailData.value = [];
const res = await sjQyList({ beginTime:parmas.beginTime,endTime:parmas.endTime,staffPhone:detailParmas.staffPhone,status:detailParmas.status });
detailData.value = res;
confirmLoading.value = false;
} catch (error) {
console.error('获取详情失败:', error);
}
}
function getPreviousDate(days) {
const date = new Date();
date.setDate(date.getDate() - days);
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // +10-indexed
const day = String(date.getDate()).padStart(2, '0'); //
const formattedDate = `${year}-${month}-${day}`;
return formattedDate;
}
onMounted(() => {
if (parmas.type == '1') {
parmas.beginTime = getPreviousDate(0) + ' 00:00:00';
parmas.endTime = getPreviousDate(0) + ' 23:59:59';
}
loadDate();
getStaffs();
})
</script>

View File

@ -0,0 +1,197 @@
<template>
<div class="p-4">
<a-card :bordered="false" style="height: 100%">
<a-row>
<a-col :span="21">
<a-radio-group v-model:value="parmas.type" @change="changeType">
<a-radio-button value="1">当天</a-radio-button>
<a-radio-button value="2">近3天</a-radio-button>
<a-radio-button value="3">近7天</a-radio-button>
<a-radio-button value="4">近30天</a-radio-button>
<a-radio-button value="5">自定义</a-radio-button>
</a-radio-group>
<span v-show="parmas.type == '5'" style="margin-left: 5px;">
<a-range-picker :value-format="valueFormat" @change="changeDate" />
</span>
<a-select ref="select" placeholder="请选司机" v-model:value="parmas.staffPhone"
style="width: 200px;margin-left: 5px;" @change="handleStaff">
<a-select-option value="">全部</a-select-option>
<a-select-option :value="item.staffPhone" v-for="item in staffs" :key="item.staffPhone">{{item.staffName }}</a-select-option>
</a-select>
</a-col>
<a-col :span="3">
<a-radio-group v-model:value="izList" button-style="solid" @change="loadDate">
<a-radio-button :value="false">统计图</a-radio-button>
<a-radio-button :value="true">列表页</a-radio-button>
</a-radio-group>
</a-col>
</a-row>
<LineMulti v-show="!izList" :chartData="dataSource" height="80vh"
:option="{ title: { text: '货运司机清运重量统计', left: 'center' } }"
:seriesLabel="{show: true, position: 'top'}" type="line"></LineMulti>
<div v-show="izList" style="margin-top: 20px;">
<a-table :dataSource="dataSource" :columns="sjqyzlColumns">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<a-button type="link" @click="handleView(record)">查看</a-button>
</template>
</template>
</a-table>
</div>
</a-card>
<a-modal v-model:visible="detailVisible" title="清运详情" width="80%" :footer="null">
<a-spin :spinning="confirmLoading">
<a-row>
<a-col :span="20">
<div style="margin: 5px 0px 5px 20px">清运状态
<a-select ref="select"
placeholder="请选清运状态"
v-model:value="detailParmas.status"
style="width: 200px;margin-left: 5px;"
@change="loadDetailDate">
<a-select-option value="" >全部</a-select-option>
<a-select-option value="0">创建</a-select-option>
<a-select-option value="1">完成</a-select-option>
<a-select-option value="2">无效</a-select-option>
</a-select>
</div>
</a-col>
</a-row>
<a-table :dataSource="detailData" :columns="detailSjqyColumns" rowKey="rowNumber">
</a-table>
</a-spin>
</a-modal>
</div>
</template>
<script lang="ts" setup>
import { ref, unref, reactive, onMounted } from 'vue';
import LineMulti from '/@/components/chart/LineMulti.vue';
import { staffList,sjQyList,sjQyZlList } from '../qy.api';
import { sjqyzlColumns,detailSjqyColumns } from '../qy.data';
const valueFormat = 'YYYY-MM-DD';
const dataSource = ref([]);
const dateValue = ref();
const staffs = ref();
const izList = ref(false)
const detailVisible = ref(false);
const confirmLoading = ref(false);
const detailData = ref([]);
async function getStaffs() {
let params = {
beginTime: parmas.beginTime,
endTime: parmas.endTime,
}
staffs.value = await staffList(params);
}
const parmas = reactive<any>({
beginTime: '',
endTime: '',
type: '1',
staffPhone: '',
pageSize: 10,
})
const detailParmas = reactive<any>({
staffPhone: '',
status: '',
})
function changeType() {
parmas.endTime = getPreviousDate(0) + ' 23:59:59';
if (parmas.type === '1') {
parmas.beginTime = getPreviousDate(0) + ' 00:00:00';
loadDate();
getStaffs();
}
if (parmas.type === '2') {
parmas.beginTime = getPreviousDate(2) + ' 00:00:00';
loadDate();
getStaffs();
}
if (parmas.type === '3') {
parmas.beginTime = getPreviousDate(6) + ' 00:00:00';
loadDate();
getStaffs();
}
if (parmas.type === '4') {
parmas.beginTime = getPreviousDate(29) + ' 00:00:00';
loadDate();
getStaffs();
}
}
const changeDate = (date, dateString) => {
parmas.beginTime = dateString[0] + ' 00:00:00';
parmas.endTime = dateString[1] + ' 23:59:59';
loadDate();
getStaffs();
};
function handleStaff() {
loadDate();
};
async function loadDate() {
if(izList.value){
parmas.pageSize=-1
}else{
parmas.pageSize=10
}
const resData = await sjQyZlList(parmas);
const res = resData.records;
dataSource.value = [];
for (let i = 0; i < res.length; i++) {
dataSource.value.push({
type: '清运重量(吨)',
rowNumber: res[i].rowNumber,
phone: `${res[i].staffPhone}`,
name: `${res[i].staffName}`,
value: res[i].thisWeight,
});
}
}
//
const handleView = async (record) => {
detailParmas.staffPhone = record.phone;
loadDetailDate();
}
//
async function loadDetailDate(){
detailVisible.value = true;
try {
confirmLoading.value = true;
detailData.value = [];
const res = await sjQyList({ beginTime:parmas.beginTime,endTime:parmas.endTime,staffPhone:detailParmas.staffPhone,status:detailParmas.status });
detailData.value = res;
confirmLoading.value = false;
} catch (error) {
console.error('获取详情失败:', error);
}
}
function getPreviousDate(days) {
const date = new Date();
date.setDate(date.getDate() - days);
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // +10-indexed
const day = String(date.getDate()).padStart(2, '0'); //
const formattedDate = `${year}-${month}-${day}`;
return formattedDate;
}
onMounted(() => {
if (parmas.type == '1') {
parmas.beginTime = getPreviousDate(0) + ' 00:00:00';
parmas.endTime = getPreviousDate(0) + ' 23:59:59';
}
loadDate();
getStaffs();
})
</script>

View File

@ -0,0 +1,199 @@
<template>
<div class="p-4">
<a-card :bordered="false" style="height: 100%">
<a-row>
<a-col :span="21">
<a-radio-group v-model:value="parmas.type" @change="changeType">
<a-radio-button value="1">当天</a-radio-button>
<a-radio-button value="2">近3天</a-radio-button>
<a-radio-button value="3">近7天</a-radio-button>
<a-radio-button value="4">近30天</a-radio-button>
<a-radio-button value="5">自定义</a-radio-button>
</a-radio-group>
<span v-show="parmas.type == '5'" style="margin-left: 5px;">
<a-range-picker :value-format="valueFormat" @change="changeDate" />
</span>
<a-select ref="select" placeholder="请选区域" v-model:value="parmas.housingestateId"
style="width: 200px;margin-left: 5px;" @change="handleHousinges">
<a-select-option value="">全部</a-select-option>
<a-select-option :value="item.housingestateId" v-for="item in housingestates" :key="item.housingestateId">{{item.housingestateName }}</a-select-option>
</a-select>
</a-col>
<a-col :span="3">
<a-radio-group v-model:value="izList" button-style="solid" @change="loadDate">
<a-radio-button :value="false">统计图</a-radio-button>
<a-radio-button :value="true">列表页</a-radio-button>
</a-radio-group>
</a-col>
</a-row>
<Bar v-show="!izList" :chartData="dataSource" height="80vh"
:option="{ title: { text: '小区清运次数排行榜', left: 'center' } }"
:itemStyle="{ normal: { label: { show: true, position: 'top' } } }"
:axisLabel="{ rotate: 45}"
:seriesName="'清运次数'"></Bar>
<div v-show="izList" style="margin-top: 20px;">
<a-table :dataSource="dataSource" :columns="xqqyColumns">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<a-button type="link" @click="handleView(record)">查看</a-button>
</template>
</template>
</a-table>
</div>
</a-card>
<!-- 查看详情弹窗 -->
<a-modal v-model:visible="detailVisible" title="清运详情" width="80%" :footer="null">
<a-spin :spinning="confirmLoading">
<a-row>
<a-col :span="20">
<div style="margin: 5px 0px 5px 20px">清运状态
<a-select ref="select"
placeholder="请选清运状态"
v-model:value="detailParmas.status"
style="width: 200px;margin-left: 5px;"
@change="loadDetailDate">
<a-select-option value="" >全部</a-select-option>
<a-select-option value="0">创建</a-select-option>
<a-select-option value="1">完成</a-select-option>
<a-select-option value="2">无效</a-select-option>
</a-select>
</div>
</a-col>
</a-row>
<a-table :dataSource="detailData" :columns="detailSjqyColumns" rowKey="rowNumber">
</a-table>
</a-spin>
</a-modal>
</div>
</template>
<script lang="ts" setup>
import { ref, unref, reactive, onMounted } from 'vue';
import Bar from '/@/components/chart/Bar.vue';
import { housingestateList,xqQyCsList,sjQyList } from '../qy.api';
import { xqqyColumns,detailSjqyColumns } from '../qy.data';
const valueFormat = 'YYYY-MM-DD';
const dataSource = ref([]);
const dateValue = ref();
const housingestates = ref();
const izList = ref(false)
const detailVisible = ref(false);
const confirmLoading = ref(false);
const detailData = ref([]);
async function getHousingestates() {
housingestates.value = await housingestateList();
}
const parmas = reactive<any>({
beginTime: '',
endTime: '',
type: '1',
housingId: '',
pageSize: 10,
})
const detailParmas = reactive<any>({
housingId: '',
imei: '',
status: '',
})
function changeType() {
parmas.endTime = getPreviousDate(0) + ' 23:59:59';
if (parmas.type === '1') {
parmas.beginTime = getPreviousDate(0) + ' 00:00:00';
loadDate();
}
if (parmas.type === '2') {
parmas.beginTime = getPreviousDate(2) + ' 00:00:00';
loadDate();
}
if (parmas.type === '3') {
parmas.beginTime = getPreviousDate(6) + ' 00:00:00';
loadDate();
}
if (parmas.type === '4') {
parmas.beginTime = getPreviousDate(29) + ' 00:00:00';
loadDate();
}
}
const changeDate = (date, dateString) => {
parmas.beginTime = dateString[0] + ' 00:00:00';
parmas.endTime = dateString[1] + ' 23:59:59';
loadDate();
};
function handleHousinges() {
loadDate();
};
async function loadDate() {
if(izList.value){
parmas.pageSize=-1
}else{
parmas.pageSize=10
}
const resData = await xqQyCsList(parmas);
const res = resData.records;
dataSource.value = [];
for (let i = 0; i < res.length; i++) {
let name = res[i].imei;
console.log(res[i].housingName);
console.log(res[i].content);
if(res[i].housingName!=null&&res[i].content!=null){
name = res[i].housingName+'-'+res[i].content;
}
dataSource.value.push({
rowNumber: res[i].rowNumber,
housingName: `${res[i].housingName}`,
content: `${res[i].content}`,
imei: `${res[i].imei}`,
name: `${name}`,
value: res[i].cn,
});
}
}
//
const handleView = async (record) => {
detailParmas.imei = record.imei;
loadDetailDate();
}
//
async function loadDetailDate(){
detailVisible.value = true;
try {
confirmLoading.value = true;
detailData.value = [];
const res = await sjQyList({ beginTime:parmas.beginTime,endTime:parmas.endTime,imei:detailParmas.imei,status:detailParmas.status });
detailData.value = res;
confirmLoading.value = false;
} catch (error) {
console.error('获取详情失败:', error);
}
}
function getPreviousDate(days) {
const date = new Date();
date.setDate(date.getDate() - days);
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // +10-indexed
const day = String(date.getDate()).padStart(2, '0'); //
const formattedDate = `${year}-${month}-${day}`;
return formattedDate;
}
onMounted(() => {
if (parmas.type == '1') {
parmas.beginTime = getPreviousDate(0) + ' 00:00:00';
parmas.endTime = getPreviousDate(0) + ' 23:59:59';
}
loadDate();
getHousingestates();
})
</script>

View File

@ -43,27 +43,29 @@
</a-card> </a-card>
<!-- 查看详情弹窗 --> <!-- 查看详情弹窗 -->
<a-modal v-model:visible="detailVisible" title="投递次数详情" width="80%" :footer="null"> <a-modal v-model:visible="detailVisible" title="投递次数详情" width="80%" :footer="null">
<a-row> <a-spin :spinning="confirmLoading">
<a-col :span="20"> <a-row>
<div style="margin: 5px 0px 5px 20px">订单状态 <a-col :span="20">
<a-select ref="select" <div style="margin: 5px 0px 5px 20px">订单状态
placeholder="请选订单状态" <a-select ref="select"
v-model:value="detailParmas.invalid" placeholder="请选订单状态"
style="width: 200px;margin-left: 5px;" v-model:value="detailParmas.invalid"
@change="loadDetailDate"> style="width: 200px;margin-left: 5px;"
<a-select-option value="" >全部</a-select-option> @change="loadDetailDate">
<a-select-option value="0">正常</a-select-option> <a-select-option value="" >全部</a-select-option>
<a-select-option value="1">违规</a-select-option> <a-select-option value="0">正常</a-select-option>
<a-select-option value="2">部分违规</a-select-option> <a-select-option value="1">违规</a-select-option>
<a-select-option value="3">待审核</a-select-option> <a-select-option value="2">部分违规</a-select-option>
<a-select-option value="4">异常</a-select-option> <a-select-option value="3">待审核</a-select-option>
<a-select-option value="5">忽略</a-select-option> <a-select-option value="4">异常</a-select-option>
</a-select> <a-select-option value="5">忽略</a-select-option>
</div> </a-select>
</a-col> </div>
</a-row> </a-col>
<a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="rowNumber"> </a-row>
</a-table> <a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="rowNumber">
</a-table>
</a-spin>
</a-modal> </a-modal>
</div> </div>
</template> </template>
@ -81,6 +83,7 @@ const dateValue = ref();
const housingestates = ref(); const housingestates = ref();
const izList = ref(false) const izList = ref(false)
const detailVisible = ref(false); const detailVisible = ref(false);
const confirmLoading = ref(false);
const detailData = ref([]); const detailData = ref([]);
async function getHousingestates() { async function getHousingestates() {
@ -163,11 +166,13 @@ const handleView = async (record) => {
// //
async function loadDetailDate(){ async function loadDetailDate(){
detailVisible.value = true;
try { try {
confirmLoading.value = true;
detailData.value = []; detailData.value = [];
const res = await queryHyjlList({ beginTime:parmas.beginTime,endTime:parmas.endTime,imei:detailParmas.imei,invalid:detailParmas.invalid }); const res = await queryHyjlList({ beginTime:parmas.beginTime,endTime:parmas.endTime,imei:detailParmas.imei,invalid:detailParmas.invalid });
detailData.value = res; detailData.value = res;
detailVisible.value = true; confirmLoading.value = false;
} catch (error) { } catch (error) {
console.error('获取详情失败:', error); console.error('获取详情失败:', error);
} }

View File

@ -43,27 +43,29 @@
</a-card> </a-card>
<!-- 查看详情弹窗 --> <!-- 查看详情弹窗 -->
<a-modal v-model:visible="detailVisible" title="会员投递详情" width="80%" :footer="null"> <a-modal v-model:visible="detailVisible" title="会员投递详情" width="80%" :footer="null">
<a-row> <a-spin :spinning="confirmLoading">
<a-col :span="20"> <a-row>
<div style="margin: 5px 0px 5px 20px">订单状态 <a-col :span="20">
<a-select ref="select" <div style="margin: 5px 0px 5px 20px">订单状态
placeholder="请选订单状态" <a-select ref="select"
v-model:value="detailParmas.invalid" placeholder="请选订单状态"
style="width: 200px;margin-left: 5px;" v-model:value="detailParmas.invalid"
@change="loadDetailDate"> style="width: 200px;margin-left: 5px;"
<a-select-option value="" >全部</a-select-option> @change="loadDetailDate">
<a-select-option value="0">正常</a-select-option> <a-select-option value="" >全部</a-select-option>
<a-select-option value="1">违规</a-select-option> <a-select-option value="0">正常</a-select-option>
<a-select-option value="2">部分违规</a-select-option> <a-select-option value="1">违规</a-select-option>
<a-select-option value="3">待审核</a-select-option> <a-select-option value="2">部分违规</a-select-option>
<a-select-option value="4">异常</a-select-option> <a-select-option value="3">待审核</a-select-option>
<a-select-option value="5">忽略</a-select-option> <a-select-option value="4">异常</a-select-option>
</a-select> <a-select-option value="5">忽略</a-select-option>
</div> </a-select>
</a-col> </div>
</a-row> </a-col>
<a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="rowNumber"> </a-row>
</a-table> <a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="rowNumber">
</a-table>
</a-spin>
</a-modal> </a-modal>
</div> </div>
</template> </template>
@ -80,6 +82,7 @@ const dateValue = ref();
const housingestates = ref(); const housingestates = ref();
const izList = ref(false) const izList = ref(false)
const detailVisible = ref(false); const detailVisible = ref(false);
const confirmLoading = ref(false);
const detailData = ref([]); const detailData = ref([]);
async function getHousingestates() { async function getHousingestates() {
@ -162,11 +165,13 @@ const handleView = async (record) => {
// //
async function loadDetailDate(){ async function loadDetailDate(){
detailVisible.value = true;
try { try {
confirmLoading.value = true;
detailData.value = []; detailData.value = [];
const res = await queryHyjlList({ beginTime:parmas.beginTime,endTime:parmas.endTime,imei:detailParmas.imei,invalid:detailParmas.invalid }); const res = await queryHyjlList({ beginTime:parmas.beginTime,endTime:parmas.endTime,imei:detailParmas.imei,invalid:detailParmas.invalid });
detailData.value = res; detailData.value = res;
detailVisible.value = true; confirmLoading.value = false;
} catch (error) { } catch (error) {
console.error('获取详情失败:', error); console.error('获取详情失败:', error);
} }