清运报表
This commit is contained in:
parent
9b928f794f
commit
07db11caa6
|
@ -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 }) {
|
||||||
|
|
|
@ -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 });
|
||||||
|
|
|
@ -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-spin :spinning="confirmLoading">
|
||||||
<a-table :dataSource="detailData" :columns="detailXzhyColumns" rowKey="rowNumber">
|
<a-table :dataSource="detailData" :columns="detailXzhyColumns" rowKey="rowNumber">
|
||||||
</a-table>
|
</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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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-spin :spinning="confirmLoading">
|
||||||
<a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="rowNumber">
|
<a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="rowNumber">
|
||||||
</a-table>
|
</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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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-spin :spinning="confirmLoading">
|
||||||
<a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="phone">
|
<a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="phone">
|
||||||
</a-table>
|
</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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
</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-spin :spinning="confirmLoading">
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="20">
|
<a-col :span="20">
|
||||||
<div style="margin: 5px 0px 5px 20px">订单状态
|
<div style="margin: 5px 0px 5px 20px">订单状态
|
||||||
|
@ -63,6 +64,7 @@
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="rowNumber">
|
<a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="rowNumber">
|
||||||
</a-table>
|
</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(){
|
||||||
try {
|
|
||||||
detailData.value = [];
|
|
||||||
const res = await queryHywgList({ beginTime:parmas.beginTime,endTime:parmas.endTime,housingestateId:parmas.housingestateId,phone:detailParmas.phone,invalid:detailParmas.invalid });
|
|
||||||
detailData.value = res;
|
|
||||||
detailVisible.value = true;
|
detailVisible.value = true;
|
||||||
|
try {
|
||||||
|
confirmLoading.value = true;
|
||||||
|
detailData.value = [];
|
||||||
|
const res = await queryHyjlList({ beginTime:parmas.beginTime,endTime:parmas.endTime,housingestateId:parmas.housingestateId,phone:detailParmas.phone,invalid:detailParmas.invalid });
|
||||||
|
detailData.value = res;
|
||||||
|
confirmLoading.value = false;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取详情失败:', error);
|
console.error('获取详情失败:', error);
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
</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-spin :spinning="confirmLoading">
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="20">
|
<a-col :span="20">
|
||||||
<div style="margin: 5px 0px 5px 20px">订单状态
|
<div style="margin: 5px 0px 5px 20px">订单状态
|
||||||
|
@ -63,6 +64,7 @@
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="rowNumber">
|
<a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="rowNumber">
|
||||||
</a-table>
|
</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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
</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-spin :spinning="confirmLoading">
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="20">
|
<a-col :span="20">
|
||||||
<div style="margin: 5px 0px 5px 20px">订单状态
|
<div style="margin: 5px 0px 5px 20px">订单状态
|
||||||
|
@ -58,6 +59,7 @@
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="rowNumber">
|
<a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="rowNumber">
|
||||||
</a-table>
|
</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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 });
|
|
@ -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',
|
||||||
|
}
|
||||||
|
]
|
|
@ -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'); // 月份+1(0-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>
|
|
@ -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'); // 月份+1(0-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>
|
|
@ -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'); // 月份+1(0-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>
|
|
@ -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'); // 月份+1(0-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>
|
|
@ -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'); // 月份+1(0-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>
|
|
@ -43,6 +43,7 @@
|
||||||
</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-spin :spinning="confirmLoading">
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="20">
|
<a-col :span="20">
|
||||||
<div style="margin: 5px 0px 5px 20px">订单状态
|
<div style="margin: 5px 0px 5px 20px">订单状态
|
||||||
|
@ -64,6 +65,7 @@
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="rowNumber">
|
<a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="rowNumber">
|
||||||
</a-table>
|
</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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
</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-spin :spinning="confirmLoading">
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="20">
|
<a-col :span="20">
|
||||||
<div style="margin: 5px 0px 5px 20px">订单状态
|
<div style="margin: 5px 0px 5px 20px">订单状态
|
||||||
|
@ -64,6 +65,7 @@
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="rowNumber">
|
<a-table :dataSource="detailData" :columns="detailTdcsColumns" rowKey="rowNumber">
|
||||||
</a-table>
|
</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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue