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 bordered
> >
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'quarterDuration'"> <template v-if="column.dataIndex === 'quarterlyServiceDuration'">
{{ record.quarterDuration }} 小时 {{ record.quarterlyServiceDuration }} 小时
</template> </template>
<template v-else-if="column.dataIndex === 'quarterCost'"> <template v-else-if="column.dataIndex === 'quarterlyServiceCost'">
{{ record.quarterCost }} {{ record.quarterlyServiceCost }}
</template> </template>
<template v-else-if="column.dataIndex === 'yearDuration'"> <template v-else-if="column.dataIndex === 'annualServiceDuration'">
{{ record.yearDuration }} 小时 {{ record.annualServiceDuration }} 小时
</template> </template>
<template v-else-if="column.dataIndex === 'yearCost'"> <template v-else-if="column.dataIndex === 'annualServiceCost'">
{{ record.yearCost }} {{ record.annualServiceCost }}
</template> </template>
</template> </template>
</a-table> </a-table>
@ -121,26 +121,26 @@ const columns = [
}, },
{ {
title: '季度累计服务时长', title: '季度累计服务时长',
dataIndex: 'quarterDuration', dataIndex: 'quarterlyServiceDuration',
key: 'quarterDuration', key: 'quarterlyServiceDuration',
width: 120 width: 120
}, },
{ {
title: '季度累计服务成本', title: '季度累计服务成本',
dataIndex: 'quarterCost', dataIndex: 'quarterlyServiceCost',
key: 'quarterCost', key: 'quarterlyServiceCost',
width: 120 width: 120
}, },
{ {
title: '年度累计服务时长', title: '年度累计服务时长',
dataIndex: 'yearDuration', dataIndex: 'annualServiceDuration',
key: 'yearDuration', key: 'annualServiceDuration',
width: 120 width: 120
}, },
{ {
title: '年度累计服务成本', title: '年度累计服务成本',
dataIndex: 'yearCost', dataIndex: 'annualServiceCost',
key: 'yearCost', key: 'annualServiceCost',
width: 120 width: 120
} }
]; ];
@ -175,7 +175,7 @@ async function handleSearch() {
}; };
// API // API
const result = await serviceApplicationsApi.getQuarterStatistics(params); const result = await serviceApplicationsApi.statistics(params);
if (result.data) { if (result.data) {
tableData.value = result.data.list || []; 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 * @Copyright 1.0
--> -->
<template> <template>
<div class="service-application-count"> <div class="service-applications-count">
<a-tabs v-model:activeKey="activeTab" type="card"> <a-tabs v-model:activeKey="activeTab" type="card">
<!-- 季度统计 --> <!-- 季度统计 -->
<a-tab-pane key="quarter" tab="季度统计"> <a-tab-pane key="quarter" tab="季度统计">
@ -23,7 +23,7 @@ const activeTab = ref('quarter');
</script> </script>
<style scoped> <style scoped>
.service-application-count { .service-applications-count {
padding: 16px; padding: 16px;
background: #fff; background: #fff;
} }
Loading…
Cancel
Save