From 8a3bfdab689684fe5ee19b2f69842e450fc7c60a Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期五, 30 一月 2026 14:02:39 +0800
Subject: [PATCH] fix: 完成生产数据分析页面

---
 src/api/viewIndex.js |  239 +++++++++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 196 insertions(+), 43 deletions(-)

diff --git a/src/api/viewIndex.js b/src/api/viewIndex.js
index 8ac39e4..84a2149 100644
--- a/src/api/viewIndex.js
+++ b/src/api/viewIndex.js
@@ -1,45 +1,198 @@
 // 棣栭〉鎺ュ彛
-import request from '@/utils/request'
+import request from "@/utils/request";
 
-// 鏈湀鍚堝悓閲戦
-export const getContractAmount = () => {
-    return request({
-        url: '/sales/ledger/getContractAmount',
-        method: 'get'
-    })
-}
-// 鏈湀寮�绁ㄩ噾棰�
-export const getInvoiceAmount = () => {
-    return request({
-        url: '/invoiceLedger/getInvoiceAmount',
-        method: 'get'
-    })
-}
-// 鏈湀鍥炴閲戦
-export const getReceiptAmount = () => {
-    return request({
-        url: '/receiptPayment/getReceiptAmount',
-        method: 'get'
-    })
-}
-// 瀹㈡埛鍚堝悓閲戦TOP5缁熻
-export const getTopFiveList = () => {
-    return request({
-        url: 'sales/ledger/getTopFiveList',
-        method: 'get'
-    })
-}
-// 鍥炴楗肩姸鍥�
-export const getAmountMouth = () => {
-    return request({
-        url: 'receiptPayment/getAmountMouth',
-        method: 'get'
-    })
-}
-// 鍥炴楗肩姸鍥�
-export const paymentMonthList = () => {
-    return request({
-        url: '/purchase/paymentRegistration/paymentMonthList',
-        method: 'get'
-    })
-}
\ No newline at end of file
+// 閿�鍞�-閲囪喘-搴撳瓨鏁版嵁
+export const getBusiness = () => {
+  return request({
+    url: "/home/business",
+    method: "get",
+  });
+};
+// 瀹㈡埛鍚堝悓閲戦鍒嗘瀽
+export const analysisCustomerContractAmounts = () => {
+  return request({
+    url: "/home/analysisCustomerContractAmounts",
+    method: "get",
+  });
+};
+// 璐ㄦ鍒嗘瀽
+export const qualityStatistics = () => {
+  return request({
+    url: "/home/qualityStatistics",
+    method: "get",
+  });
+};
+// 搴旀敹搴斾粯缁熻
+export const statisticsReceivablePayable = (query) => {
+  return request({
+    url: "/home/statisticsReceivablePayable",
+    method: "get",
+    params: query,
+  });
+};
+// 寰呭姙浜嬮」
+export const homeTodos = () => {
+  return request({
+    url: "/home/todos",
+    method: "get",
+  });
+};
+
+// 绾垮舰鍥�
+export const getAmountHalfYear = () => {
+  return request({
+    url: "/sales/ledger/getAmountHalfYear",
+    method: "get",
+  });
+};
+
+// 鍚勭敓浜ц鍗曠殑瀹屾垚杩涘害缁熻
+// /home/progressStatistics
+export const getProgressStatistics = () => {
+  return request({
+    url: "/home/progressStatistics",
+    method: "get",
+  });
+};
+
+//鍦ㄥ埗鍝佸懆杞儏鍐�
+//home/workInProcessTurnover
+export const getWorkInProcessTurnover = () => {
+  return request({
+    url: "/home/workInProcessTurnover",
+    method: "get",
+  });
+};
+
+// 瀹㈡埛钀ユ敹璐$尞鏁板�煎垎鏋�
+export const customerRevenueAnalysis = (params) => {
+  return request({
+    url: "/home/customerRevenueAnalysis",
+    method: "get",
+    params,
+  });
+};
+
+// 鍛樺伐-瀹㈡埛-渚涘簲鍟嗘�绘暟
+export const summaryStatistics = () => {
+  return request({
+    url: "/home/summaryStatistics",
+    method: "get",
+  });
+};
+
+// 鍚勯儴闂ㄤ汉鍛樺垎甯�
+export const deptStaffDistribution = () => {
+  return request({
+    url: "/home/deptStaffDistribution",
+    method: "get",
+  });
+};
+
+// 渚涘簲鍟嗛噰璐帓鍚�
+export const supplierPurchaseRanking = (query) => {
+  return request({
+    url: "/home/supplierPurchaseRanking",
+    method: "get",
+    params: query,
+  });
+};
+
+// 瀹㈡埛閲戦璐$尞鎺掑悕
+export const customerContributionRanking = (query) => {
+  return request({
+    url: "/home/customerContributionRanking",
+    method: "get",
+    params: query,
+  });
+};
+
+// 鍚勪骇鍝佸ぇ绫诲垎甯�
+export const productCategoryDistribution = () => {
+  return request({
+    url: "/home/productCategoryDistribution",
+    method: "get",
+  });
+};
+
+// 浜у搧閿�鍞噾棰濆垎鏋�
+export const productSalesAnalysis = () => {
+  return request({
+    url: "/home/productSalesAnalysis",
+    method: "get",
+  });
+};
+
+// 鍘熸潗鏂欓噰璐噾棰濆崰姣�
+export const rawMaterialPurchaseAmountRatio = () => {
+  return request({
+    url: "/home/rawMaterialPurchaseAmountRatio",
+    method: "get",
+  });
+};
+
+// 璐圭敤鏋勬垚鍒嗘瀽锛坱ype: 1 鎴� 2锛�
+export const expenseCompositionAnalysis = (params) => {
+  return request({
+    url: "/home/expenseCompositionAnalysis",
+    method: "get",
+    params,
+  });
+};
+
+// 閿�鍞�/閲囪喘/鍌ㄥ瓨浜у搧鏁�
+export const salesPurchaseStorageProductCount = () => {
+  return request({
+    url: "/home/salesPurchaseStorageProductCount",
+    method: "get",
+  });
+};
+
+// 浜у搧鍑哄叆搴撳垎鏋愶紙鍙紶 productType: 1 鍘熸潗鏂� 2 鍗婃垚鍝� 3 鎴愬搧锛�
+export const productInOutAnalysis = (params) => {
+  return request({
+    url: "/home/productInOutAnalysis",
+    method: "get",
+    params,
+  });
+};
+
+// 浜у搧鍛ㄨ浆澶╂暟
+export const productTurnoverDays = () => {
+  return request({
+    url: "/home/productTurnoverDays",
+    method: "get",
+  });
+};
+
+// 鏀舵敮瀵规瘮鍒嗘瀽
+export const incomeExpenseAnalysis = () => {
+  return request({
+    url: "/home/incomeExpenseAnalysis",
+    method: "get",
+  });
+};
+
+// 鍒╂鼎瓒嬪娍鍒嗘瀽
+export const profitTrendAnalysis = () => {
+  return request({
+    url: "/home/profitTrendAnalysis",
+    method: "get",
+  });
+};
+
+// 鏈堝害鏀跺叆
+export const getMonthlyIncome = () => {
+  return request({
+    url: "/home/monthlyIncome",
+    method: "get",
+  });
+};
+
+// 鏈堝害鏀嚭
+export const getMonthlyExpenditure = () => {
+  return request({
+    url: "/home/monthlyExpenditure",
+    method: "get",
+  });
+};

--
Gitblit v1.9.3