From 2d3530a7c11557a40807ad7c0b9e302ce6ce3a9f Mon Sep 17 00:00:00 2001
From: hsy <1029150275@qq.com>
Date: 星期五, 28 八月 2026 10:16:32 +0800
Subject: [PATCH] feat: 综合业务模块页面重构与交互完善

---
 src/views/salesManagement/lawsuitManagement/index.vue |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/views/salesManagement/lawsuitManagement/index.vue b/src/views/salesManagement/lawsuitManagement/index.vue
index 1cd39f2..2b52310 100644
--- a/src/views/salesManagement/lawsuitManagement/index.vue
+++ b/src/views/salesManagement/lawsuitManagement/index.vue
@@ -253,6 +253,7 @@
 const fileList = ref([]);
 
 const form = reactive({
+  id: undefined,
   caseNo: "",
   projectId: "",
   projectName: "",
@@ -299,9 +300,13 @@
 
 const initProjects = async () => {
   try {
-    const res = await listProject({ pageSize: 1000 });
-    const rows = res?.rows || res?.data?.rows || [];
-    projectOptions.value = rows.map((p) => ({ label: p.projectName, value: p.id }));
+    const res = await listProject({ pageSize: 1000, current: 1, size: 1000 });
+    const rows = res?.records || res?.rows || res?.data?.records || res?.data?.rows || res?.data || [];
+    projectOptions.value = rows.map((p) => ({ 
+      label: (p.no ? p.no + ' - ' : '') + (p.title || ''), 
+      value: p.id,
+      title: p.title
+    }));
   } catch (e) {
     console.error("鍔犺浇椤圭洰鍒楄〃澶辫触", e);
   }
@@ -310,7 +315,7 @@
 const initContracts = async () => {
   try {
     const res = await contractListNoPage({});
-    const list = Array.isArray(res) ? res : res?.data ?? res?.records ?? [];
+    const list = Array.isArray(res) ? res : (res?.data?.records || res?.data || res?.records || []);
     contractOptions.value = list.map((item) => ({
       label: item.contractNo + (item.signingUnit ? `锛�${item.signingUnit}锛塦 : ""),
       value: item.id,
@@ -323,7 +328,7 @@
 
 const handleProjectChange = (val) => {
   const project = projectOptions.value.find((item) => item.value === val);
-  form.projectName = project ? project.label : "";
+  form.projectName = project ? (project.title || project.label) : "";
 };
 
 const handleContractChange = (val) => {
@@ -390,6 +395,7 @@
     form[key] = "";
   });
   form.claimAmount = undefined;
+  form.id = undefined;
 };
 
 const openForm = async (type, row) => {

--
Gitblit v1.9.3