From a563ea879ef5fb6897e76d2df661e465dce2ab9b Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期一, 01 六月 2026 15:02:27 +0800
Subject: [PATCH] Merge branch 'dev_新疆_大罗素马铃薯new' of http://114.132.189.42:9002/r/product-inventory-management into dev_新疆_大罗素马铃薯new

---
 src/views/reportAnalysis/projectProfit/index.vue |  126 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 126 insertions(+), 0 deletions(-)

diff --git a/src/views/reportAnalysis/projectProfit/index.vue b/src/views/reportAnalysis/projectProfit/index.vue
new file mode 100644
index 0000000..f61cbe5
--- /dev/null
+++ b/src/views/reportAnalysis/projectProfit/index.vue
@@ -0,0 +1,126 @@
+<template>
+	<div class="app-container">
+		<el-form :model="filters" :inline="true" label-width="80px">
+			<el-form-item label="瀹㈡埛鍚嶇О">
+				<el-input v-model="filters.customerName" placeholder="璇疯緭鍏ュ鎴峰悕绉�" clearable style="width: 240px"/>
+			</el-form-item>
+			<el-form-item>
+				<el-button type="primary" @click="getTableData"> 鎼滅储 </el-button>
+				<el-button @click="resetFilters"> 閲嶇疆 </el-button>
+				<el-button @click="handleOut"> 瀵煎嚭 </el-button>
+			</el-form-item>
+		</el-form>
+		<div class="table_list">
+			<PIMTable
+				rowKey="id"
+				:column="columns"
+				:tableLoading="loading"
+				:tableData="dataList"
+				:page="{
+          current: pagination.currentPage,
+          size: pagination.pageSize,
+          total: pagination.total
+        }"
+				:isShowSummary="true"
+				:summaryMethod="summarizeMainTable"
+				@pagination="changePage"
+			></PIMTable>
+		</div>
+	</div>
+</template>
+
+<script setup>
+import { usePaginationApi } from "@/hooks/usePaginationApi";
+import { getPurchaseList } from "@/api/procurementManagement/projectProfit";
+import { onMounted, getCurrentInstance } from "vue";
+import { ElMessageBox } from "element-plus";
+
+const { proxy } = getCurrentInstance();
+
+defineOptions({
+	name: "椤圭洰鍒╂鼎",
+});
+
+const {
+	loading,
+	filters,
+	columns,
+	dataList,
+	pagination,
+	getTableData,
+	resetFilters,
+	onCurrentChange,
+} = usePaginationApi(
+	getPurchaseList,
+	{
+		customerName: undefined,
+	},
+	[
+		{
+			label: "閿�鍞悎鍚屽彿",
+			align: "center",
+			prop: "customerContractNo",
+		},
+		{
+			label: "瀹㈡埛鍚嶇О",
+			align: "center",
+			prop: "customerName",
+		},
+		{
+			label: "鍚堝悓閲戦",
+			align: "center",
+			prop: "contractAmount",
+		},
+		{
+			label: "閲囪喘閲戦",
+			align: "center",
+			prop: "purchaseAmount",
+		},
+		{
+			label: "鍒╂鼎",
+			align: "center",
+			prop: "balance",
+		},
+		{
+			label: "鍒╂鼎鐜�",
+			align: "center",
+			prop: "balanceRatio",
+		},
+	]
+);
+
+const changePage = ({ page, limit }) => {
+	pagination.currentPage = page;
+	pagination.pageSize = limit;
+	onCurrentChange(page);
+};
+
+// 涓昏〃鍚堣鏂规硶
+const summarizeMainTable = (param) => {
+	return proxy.summarizeTable(param, ["contractAmount", "purchaseAmount", "balance"]);
+};
+
+// 瀵煎嚭
+const handleOut = () => {
+	ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
+		confirmButtonText: "纭",
+		cancelButtonText: "鍙栨秷",
+		type: "warning",
+	})
+		.then(() => {
+			proxy.download("/purchase/report/export", {}, "椤圭洰鍒╂鼎.xlsx");
+		})
+		.catch(() => {
+			proxy.$modal.msg("宸插彇娑�");
+		});
+};
+
+onMounted(() => {
+	getTableData();
+});
+</script>
+<style lang="scss" scoped>
+.table_list {
+	margin-top: unset;
+}
+</style>

--
Gitblit v1.9.3