From 7c2cdcbc7f5585b96fba76a07b0e4417a09c4d7e Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 02 六月 2026 11:06:10 +0800
Subject: [PATCH] 新疆马铃薯 1.过程检验下载添加3个模版
---
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