From 0964a3d755ab490b709acca3a12df323a5053c8e Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 23 四月 2026 13:35:09 +0800
Subject: [PATCH] 发货记录增加数量+“库存预警”字段移至库存管理+点击销售合同号自动跳转到销售台账

---
 src/views/reportAnalysis/projectProfit/index.vue |   62 +++++++++++++++++++++++++++----
 1 files changed, 54 insertions(+), 8 deletions(-)

diff --git a/src/views/reportAnalysis/projectProfit/index.vue b/src/views/reportAnalysis/projectProfit/index.vue
index 82031bb..bbf9b46 100644
--- a/src/views/reportAnalysis/projectProfit/index.vue
+++ b/src/views/reportAnalysis/projectProfit/index.vue
@@ -7,10 +7,12 @@
       <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"
@@ -19,8 +21,13 @@
           size: pagination.pageSize,
           total: pagination.total,
         }"
-        @pagination="onCurrentChange"
-      ></PIMTable>
+        @pagination="changePage"
+      >
+      <template #customerContractNo="{ row }">
+         <el-button type="primary" text @click="showDetail(row)">{{ row.customerContractNo }}
+					</el-button>
+        </template>
+      </PIMTable>
     </div>
   </div>
 </template>
@@ -28,7 +35,13 @@
 <script setup>
 import { usePaginationApi } from "@/hooks/usePaginationApi";
 import { getPurchaseList } from "@/api/procurementManagement/projectProfit";
-import { onMounted } from "vue";
+import { onMounted, getCurrentInstance } from "vue";
+import { ElMessageBox } from "element-plus";
+import { useRouter, useRoute } from "vue-router";
+
+const router = useRouter();
+  const route = useRoute();
+const { proxy } = getCurrentInstance();
 
 defineOptions({
   name: "椤圭洰鍒╂鼎",
@@ -53,6 +66,8 @@
       label: "閿�鍞悎鍚屽彿",
       align: "center",
       prop: "customerContractNo",
+      dataType: "slot",
+      slot: "customerContractNo",
     },
     {
       label: "瀹㈡埛鍚嶇О",
@@ -84,14 +99,45 @@
       align: "center",
       prop: "balanceRatio",
     },
-    {
-      label: "澧炲�肩◣",
-      align: "center",
-      prop: "balanceAmount",
-    },
+    // {
+    //   label: "澧炲�肩◣",
+    //   align: "center",
+    //   prop: "balanceAmount",
+    // },
   ]
 );
 
+const showDetail = (row) => {
+  
+ router.push({
+      path: "/salesManagement/salesLedger",
+      query: {
+        customerContractNo: row.customerContractNo
+      },
+    });
+};
+
+
+const changePage = ({ page }) => {
+  pagination.currentPage = page;
+  onCurrentChange(page);
+};
+
+// 瀵煎嚭
+const handleOut = () => {
+  ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
+    confirmButtonText: "纭",
+    cancelButtonText: "鍙栨秷",
+    type: "warning",
+  })
+    .then(() => {
+      proxy.download("/purchase/report/export", {}, "椤圭洰鍒╂鼎.xlsx");
+    })
+    .catch(() => {
+      proxy.$modal.msg("宸插彇娑�");
+    });
+};
+
 onMounted(() => {
   getTableData();
 });

--
Gitblit v1.9.3