hsy
4 小时以前 2d3530a7c11557a40807ad7c0b9e302ce6ce3a9f
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) => {