From 3f2f9acc04395ee436e211bd936767803a7128e9 Mon Sep 17 00:00:00 2001
From: wersd <1523826083@qq.com>
Date: Sat, 9 Aug 2025 18:22:40 +0800
Subject: [PATCH] =?UTF-8?q?add=20=E8=BF=90=E8=90=A5=E6=95=B0=E6=8D=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/crm/project/monthly/index.ts | 66 ++++
.../project/component/ProjectMonthlyChart.vue | 134 ++++++++
.../monthly/ProjectMonthlyStatForm.vue | 134 ++++++++
src/views/crm/project/monthly/index.vue | 303 ++++++++++++++++++
4 files changed, 637 insertions(+)
create mode 100644 src/api/crm/project/monthly/index.ts
create mode 100644 src/views/crm/project/component/ProjectMonthlyChart.vue
create mode 100644 src/views/crm/project/monthly/ProjectMonthlyStatForm.vue
create mode 100644 src/views/crm/project/monthly/index.vue
diff --git a/src/api/crm/project/monthly/index.ts b/src/api/crm/project/monthly/index.ts
new file mode 100644
index 000000000..d18caeb30
--- /dev/null
+++ b/src/api/crm/project/monthly/index.ts
@@ -0,0 +1,66 @@
+import request from '@/config/axios'
+
+// 项目月度统计 VO
+export interface ProjectMonthlyStatVO {
+ id: number; // 统计记录ID
+ projectName: string; // 项目名称
+ projectId: number // 项目ID
+ statMonth: string // 统计月份
+ chargingQuantity: number // 充电量(度)
+ grossProfit: number // 毛利润
+}
+export interface ProjectMonthlyStatPageReqVO {
+ projectId?: number; // 项目ID
+ statMonth?: string; // 统计月份
+ perGunCharging?: number[]; // 每枪充电量(度)
+ perGunProfit?: number[]; // 每枪利润
+ electricityServiceFee?: number[]; // 度电服务费(元)
+ pageNo?: number; // 页码
+ pageSize?: number; // 页大小
+ sortingFields?: SortingField[];
+}
+
+// 添加排序字段类型定义
+export interface SortingField {
+ field: string;
+ order: 'asc' | 'desc';
+}
+// 查询项目月度统计分页
+export const getProjectMonthlyStatPage = async (data: ProjectMonthlyStatPageReqVO) => {
+ return await request.post({ url: `/crm/project-monthly-stat/page`, data })
+}
+
+// 查询项目月度统计详情
+export const getProjectMonthlyStat = async (id: number) => {
+ return await request.get({ url: `/crm/project-monthly-stat/get?id=` + id })
+}
+
+// 新增项目月度统计
+export const createProjectMonthlyStat = async (data: ProjectMonthlyStatVO) => {
+ return await request.post({ url: `/crm/project-monthly-stat/create`, data })
+}
+
+// 修改项目月度统计
+export const updateProjectMonthlyStat = async (data: ProjectMonthlyStatVO) => {
+ return await request.put({ url: `/crm/project-monthly-stat/update`, data })
+}
+
+// 删除项目月度统计
+export const deleteProjectMonthlyStat = async (id: number) => {
+ return await request.delete({ url: `/crm/project-monthly-stat/delete?id=` + id })
+}
+
+// 导出项目月度统计 Excel
+export const exportProjectMonthlyStat = async (params: any) => {
+ return await request.download({ url: `/crm/project-monthly-stat/export-excel`, params })
+}
+
+// 同步项目月度统计
+export const syncProjectMonthlyStat = async (data: ProjectMonthlyStatVO) => {
+ return await request.put({ url: `/crm/project-monthly-stat/sync`, data })
+}
+
+// 查询项目月度统计图数据
+export const getProjectMonthlyStatChartData = async (params: any) => {
+ return await request.get({ url: `/crm/project-monthly-stat/get-chart-data`, params})
+}
\ No newline at end of file
diff --git a/src/views/crm/project/component/ProjectMonthlyChart.vue b/src/views/crm/project/component/ProjectMonthlyChart.vue
new file mode 100644
index 000000000..95c8070f1
--- /dev/null
+++ b/src/views/crm/project/component/ProjectMonthlyChart.vue
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/crm/project/monthly/ProjectMonthlyStatForm.vue b/src/views/crm/project/monthly/ProjectMonthlyStatForm.vue
new file mode 100644
index 000000000..9c58462d1
--- /dev/null
+++ b/src/views/crm/project/monthly/ProjectMonthlyStatForm.vue
@@ -0,0 +1,134 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/views/crm/project/monthly/index.vue b/src/views/crm/project/monthly/index.vue
new file mode 100644
index 000000000..57d1f5f7a
--- /dev/null
+++ b/src/views/crm/project/monthly/index.vue
@@ -0,0 +1,303 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+ 搜索
+ 重置
+
+ 新增
+
+
+ 导出
+
+
+
+ 查看汇总
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 同步
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file