Browse Source

报表统计

master
“wangzihua” 4 months ago
parent
commit
dc9ca15f07
  1. 7
      src/api/business/service-applications/service-applications-api.js
  2. 34
      src/components/system/service-count/quarter-statistics.vue
  3. 4
      src/views/business/erp/service/service-applications-count.vue

7
src/api/business/service-applications/service-applications-api.js

@ -84,4 +84,11 @@ export const serviceApplicationsApi = {
}
});
},
/**
* 服务统计 @author wzh
*/
statistics: (params) => {
return postRequest('/serviceApplications/statistics', params);
},
};

34
src/components/system/service-count/quarter-statistics.vue

@ -62,17 +62,17 @@
bordered
>
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'quarterDuration'">
{{ record.quarterDuration }} 小时
<template v-if="column.dataIndex === 'quarterlyServiceDuration'">
{{ record.quarterlyServiceDuration }} 小时
</template>
<template v-else-if="column.dataIndex === 'quarterCost'">
{{ record.quarterCost }}
<template v-else-if="column.dataIndex === 'quarterlyServiceCost'">
{{ record.quarterlyServiceCost }}
</template>
<template v-else-if="column.dataIndex === 'yearDuration'">
{{ record.yearDuration }} 小时
<template v-else-if="column.dataIndex === 'annualServiceDuration'">
{{ record.annualServiceDuration }} 小时
</template>
<template v-else-if="column.dataIndex === 'yearCost'">
{{ record.yearCost }}
<template v-else-if="column.dataIndex === 'annualServiceCost'">
{{ record.annualServiceCost }}
</template>
</template>
</a-table>
@ -121,26 +121,26 @@ const columns = [
},
{
title: '季度累计服务时长',
dataIndex: 'quarterDuration',
key: 'quarterDuration',
dataIndex: 'quarterlyServiceDuration',
key: 'quarterlyServiceDuration',
width: 120
},
{
title: '季度累计服务成本',
dataIndex: 'quarterCost',
key: 'quarterCost',
dataIndex: 'quarterlyServiceCost',
key: 'quarterlyServiceCost',
width: 120
},
{
title: '年度累计服务时长',
dataIndex: 'yearDuration',
key: 'yearDuration',
dataIndex: 'annualServiceDuration',
key: 'annualServiceDuration',
width: 120
},
{
title: '年度累计服务成本',
dataIndex: 'yearCost',
key: 'yearCost',
dataIndex: 'annualServiceCost',
key: 'annualServiceCost',
width: 120
}
];
@ -175,7 +175,7 @@ async function handleSearch() {
};
// API
const result = await serviceApplicationsApi.getQuarterStatistics(params);
const result = await serviceApplicationsApi.statistics(params);
if (result.data) {
tableData.value = result.data.list || [];

4
src/views/business/erp/service/service-application-count.vue → src/views/business/erp/service/service-applications-count.vue

@ -6,7 +6,7 @@
* @Copyright 1.0
-->
<template>
<div class="service-application-count">
<div class="service-applications-count">
<a-tabs v-model:activeKey="activeTab" type="card">
<!-- 季度统计 -->
<a-tab-pane key="quarter" tab="季度统计">
@ -23,7 +23,7 @@ const activeTab = ref('quarter');
</script>
<style scoped>
.service-application-count {
.service-applications-count {
padding: 16px;
background: #fff;
}
Loading…
Cancel
Save