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 |   46 ++++++++++++++++++++++++++++++++++++----------
 1 files changed, 36 insertions(+), 10 deletions(-)

diff --git a/src/views/research/application/data.ts b/src/views/research/application/data.ts
index 258cb62..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';
@@ -16,6 +19,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 = {
@@ -180,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',
@@ -209,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',
     },
     {

--
Gitblit v1.9.3