From fe2d6627b8f1002af7a31b08f6f43bec034d04ee Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期三, 21 十月 2026 18:29:07 +0800
Subject: [PATCH] feat: 完善课题、会员、财务、企微页面并新增资产/用车/采购

---
 src/views/research/application/data.ts |   62 +++++++++++++++++++++++++-----
 1 files changed, 51 insertions(+), 11 deletions(-)

diff --git a/src/views/research/application/data.ts b/src/views/research/application/data.ts
index b427dd3..fd50bee 100644
--- a/src/views/research/application/data.ts
+++ b/src/views/research/application/data.ts
@@ -2,7 +2,10 @@
 
 import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
 import type { VxeTableGridOptions } from '#/adapter/vxe-table';
+import type { ResearchApplicationApi } from '#/api/research/application';
 import type { ResearchGuidelineApi } from '#/api/research/guideline';
+
+import { z } from '#/adapter/form';
 
 import { DICT_TYPE } from '@vben/constants';
 import { getDictOptions } from '@vben/hooks';
@@ -17,6 +20,30 @@
 /** 琛ㄥ崟绫诲瀷 */
 export type FormType = 'create' | 'detail' | 'edit';
 
+/** 璇鹃缁勬垚鍛樿鑹查�夐」 */
+export const MEMBER_ROLE_OPTIONS = [
+  { label: '涓绘寔浜�', value: '涓绘寔浜�' },
+  { label: '鏍稿績鎴愬憳', value: '鏍稿績鎴愬憳' },
+  { label: '鍙備笌浜�', value: '鍙備笌浜�' },
+];
+
+/**
+ * 鎴愬憳琛屾姇褰变负鍙彁浜ゅ璞★細鍙繚鐣欏悗绔帴鍙楃殑瀛楁锛�
+ * 涓嶅甫 id / applicationId锛岄伩鍏嶄笌銆屽厛鍒犲悗澧炪�嶇殑杞垹琛屼富閿啿绐併��
+ */
+export function toSubmitMembers(
+  members?: ResearchApplicationApi.ApplicationMember[],
+): ResearchApplicationApi.ApplicationMember[] {
+  return (members ?? []).map((member) => ({
+    name: member.name,
+    contactPhone: member.contactPhone,
+    workUnit: member.workUnit,
+    jobTitle: member.jobTitle,
+    memberRole: member.memberRole,
+    sortNo: member.sortNo,
+  }));
+}
+
 /** 璇鹃鐢虫姤涔︾姸鎬侊紙瀵瑰簲瀛楀吀 research_application_status锛� */
 export const ApplicationStatus = {
   DRAFT: 0, // 鑽夌
@@ -28,7 +55,9 @@
 /** 缁忚垂鎷ㄤ粯鐘舵�侊紙瀵瑰簲瀛楀吀 research_fund_status锛� */
 export const FundStatus = {
   PENDING: 0, // 寰呮嫧浠�
+  APPROVING: 15, // 鎶ラ攢瀹℃壒涓�
   PAID: 20, // 宸叉嫧浠�
+  REJECTED: 30, // 宸查┏鍥�
 } as const;
 
 /** 璇鹃鐢虫姤涔﹁〃鍗曢厤缃� */
@@ -178,10 +207,14 @@
       label: '鑱旂郴鐢佃瘽',
       component: 'Input',
       componentProps: {
-        placeholder: '璇疯緭鍏ヨ仈绯荤數璇�',
-        maxlength: 20,
+        placeholder: '璇疯緭鍏� 11 浣嶆墜鏈哄彿',
+        maxlength: 11,
         disabled: readonly,
       },
+      rules: z
+        .string({ message: '鑱旂郴鐢佃瘽涓嶈兘涓虹┖' })
+        .min(1, '鑱旂郴鐢佃瘽涓嶈兘涓虹┖')
+        .regex(/^1[3-9]\d{9}$/, '鑱旂郴鐢佃瘽鏍煎紡涓嶆纭紝璇疯緭鍏ユ纭殑 11 浣嶆墜鏈哄彿'),
     },
     {
       fieldName: 'contactEmail',
@@ -207,15 +240,10 @@
       },
     },
     {
-      fieldName: 'teamMembers',
+      // 瀛愯〃缂栬緫鐢� form.vue 鐨� #members 鎻掓Ы娓叉煋
+      fieldName: 'members',
       label: '璇鹃缁勬垚鍛�',
-      component: 'Textarea',
-      componentProps: {
-        placeholder: '姣忚涓�鏉★紝鏍煎紡锛氬鍚峾鍗曚綅|鑱岀О\n渚嬪锛氭潕鍥泑XX澶у|鍓暀鎺�',
-        autoSize: { minRows: 3, maxRows: 6 },
-        disabled: readonly,
-      },
-      help: '姣忚涓�鏉★紝鐢ㄧ珫绾垮垎闅旓細濮撳悕|鍗曚綅|鑱岀О',
+      component: 'Input',
       formItemClass: 'col-span-2',
     },
     {
@@ -516,13 +544,25 @@
     {
       field: 'status',
       title: '鎷ㄤ粯鐘舵��',
-      minWidth: 100,
+      minWidth: 110,
       cellRender: {
         name: 'CellDict',
         props: { type: DICT_TYPE.RESEARCH_FUND_STATUS },
       },
     },
     {
+      field: 'reimbursementNo',
+      title: '璐㈠姟鎶ラ攢鍗曞彿',
+      minWidth: 160,
+      formatter: dashIfEmpty,
+    },
+    {
+      field: 'rejectReason',
+      title: '椹冲洖鍘熷洜',
+      minWidth: 200,
+      formatter: dashIfEmpty,
+    },
+    {
       field: 'hasAttachment',
       title: '鎷ㄤ粯鍑瘉',
       minWidth: 100,

--
Gitblit v1.9.3