浏览代码

feat(custom): dynamicForm

linyuanjie 1 天之前
父节点
当前提交
c1444178e3
共有 4 个文件被更改,包括 2270 次插入23 次删除
  1. 4 0
      src/api/services/task/data.d.ts
  2. 180 13
      src/components/formParse/components/DynamicForm.tsx
  3. 2067 0
      src/pages/decl/fakeData.ts
  4. 19 10
      src/pages/decl/index.tsx

+ 4 - 0
src/api/services/task/data.d.ts

@@ -143,6 +143,8 @@ declare namespace API {
     INPUT_MAP: API.FD_EXPAND_INPUT_MAP
     BUTTON: API.FD_EXPAND_BUTTON
     TITLE: API.FD_EXPAND_TITLE
+    // TODO 虚构数据
+    SWITCH: any
   }
   type FD_EXPAND_INVOICE_PICKER = API.FD_EXPAND_FILE_PICKER & {
     /** 发票识别 */
@@ -247,6 +249,8 @@ declare namespace API {
     weight?: string
     widgetId?: string
     dynamicTriggers?: FDDynamicTriggersItem[]
+    events?: any
+    dependencies?: any
   }
   type AddWidgetParams = Omit<WidgetParams, 'weight' | 'widgetId' | 'dynamicTriggers'>
   /** 新增组件返回结果 */

+ 180 - 13
src/components/formParse/components/DynamicForm.tsx

@@ -1,9 +1,40 @@
 import { forwardRef, memo, useEffect, useImperativeHandle } from 'react'
 import useUserStore from '@/store/userStore'
 import { dictMapping, useNoAuthDict } from '@/hooks/useDict'
-import { DatePicker, Form, Input, InputNumber, Select, Upload } from 'antd'
+import { DatePicker, Form, Input, InputNumber, Radio, Select, Switch, Upload } from 'antd'
 import { PlusOutlined } from '@ant-design/icons'
 
+// 基础比较条件类型(原子条件)
+type CompareCondition = {
+  type: 'COMPARE' // COMPARE代表原子条件 仅进行对比,不进行逻辑运算
+  operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' // 扩展其他运算符
+  field: string // 支持点分路径如 user.age
+  value: any // 可细化类型为 string | number | Array<any> 等
+}
+// 逻辑运算符类型(可嵌套)
+type LogicalCondition = {
+  type: 'AND' | 'OR' | 'NOT' | 'NONE'
+  conditions: Condition[] // 递归引用
+}
+// 复合条件类型
+type Condition = LogicalCondition | CompareCondition
+
+interface DependenciesItem {
+  triggerFields: string[]
+  condition: Condition
+  action: {
+    type: 'show' | 'hide' | 'fetch'
+    params?: {
+      url?: string
+      params?: Record<string, any>
+      method?: 'get' | 'post' | 'put' | 'delete' | 'patch' | 'head' | 'options' | 'link' | 'unlink'
+      headers?: Record<string, any>
+      body?: Record<string, any>
+    }
+  }
+}
+type Dependencies = DependenciesItem[]
+
 const { RangePicker } = DatePicker
 
 export interface DynamicFormRef {
@@ -20,24 +51,20 @@ interface DynamicFormProps {
 
 const DynamicForm = memo(
   forwardRef<DynamicFormRef, DynamicFormProps>(
-    ({ formItems = [], formData = {}, formRule = {}, disabled = false, setFormData }, ref) => {
+    ({ formItems = [], formData = {}, formRule = {}, disabled = false }, ref) => {
       useImperativeHandle(ref, () => {
         return {
           onSubmit
         }
       })
 
-      console.log(formRule)
-
       const { dictArray: inputUnitTypeOptions, dictRequestFn: getInputUnitTypeOptions } =
         useNoAuthDict('input_unit_type')
       useEffect(() => {
         getInputUnitTypeOptions()
       }, [])
-      useEffect(() => {
-        console.log(inputUnitTypeOptions)
-      }, [inputUnitTypeOptions])
 
+      // form相关
       const [form] = Form.useForm()
       const onSubmit = () => {
         form.submit()
@@ -48,11 +75,123 @@ const DynamicForm = memo(
       const onFinishFailed = (errorInfo: any) => {
         console.log('Failed:', errorInfo)
       }
-      console.log('formData', formData)
-      console.log(formItems)
-      console.log(setFormData)
 
-      // 表单项生成器
+      // 1.1生成事件处理对象
+      const getEventHandlers = (field: API.TmplItem) => {
+        const { widgetId, events } = field.itemStruct!
+        const handlers: Record<string, (e: any) => any> = {}
+        Object.entries(events || {}).forEach(([eventNames, config]) => {
+          // eventNames首字母大写
+          handlers['on' + eventNames.charAt(0).toUpperCase() + eventNames.slice(1)] = (e) =>
+            handlerEvent(e, eventNames, config, widgetId!)
+        })
+        return handlers
+      }
+      // 1.2自定义事件处理函数
+      const handlerEvent = (value: any, eventNames: string, eventConfig: any, widgetId: string) => {
+        console.log('自定义事件处理函数')
+        console.log(value, eventNames, eventConfig, widgetId)
+        // 这里可以实现事件的统一处理逻辑
+        // 例如:表单联动、远程数据加载、字段验证等
+        // switch (eventConfig.type) {
+        //   case 'linkage':
+        //     // 处理表单联动
+        //     form.setFieldsValue(eventConfig.targetValues)
+        //     break
+        //   case 'remote':
+        //     // 处理远程数据加载
+        //     fetchData(eventConfig.url, value).then((data) => {
+        //       form.setFieldsValue(data)
+        //     })
+        //     break
+        //   // 其他事件类型...
+        // }
+      }
+
+      // 2.1收集依赖
+      const dependenciesMap = new Map<string, Map<string, Dependencies>>()
+      const registerDependency = () => {
+        formItems.forEach((comp) => {
+          // { gender: { make: [] } }
+          if (comp.itemStruct?.dependencies) {
+            comp.itemStruct?.dependencies.forEach((dep: any) => {
+              const { triggerFields } = dep
+              triggerFields.forEach((field: string) => {
+                let fieldDep = dependenciesMap.get(field)
+                if (!fieldDep) {
+                  dependenciesMap.set(field, (fieldDep = new Map()))
+                }
+                const depMap = fieldDep.get(comp.itemStruct!.widgetId!) || []
+                fieldDep.set(comp.itemStruct!.widgetId!, [...depMap, dep])
+              })
+            })
+          }
+        })
+      }
+      registerDependency()
+      console.log(dependenciesMap)
+      // 2.2触发依赖
+      const compareCondition = (conditions: CompareCondition[], formData: any): boolean => {
+        const condition = conditions[0]
+        switch (condition.operator) {
+          case 'eq':
+            return formData[condition.field] === condition.value
+          case 'neq':
+            return formData[condition.field] !== condition.value
+          case 'gt':
+            return formData[condition.field] > condition.value
+          case 'gte':
+            return formData[condition.field] >= condition.value
+          default:
+            return false
+        }
+      }
+      const evaluateCondition = (condition: Condition, formData: any): boolean => {
+        switch (condition.type) {
+          case 'AND':
+            return (condition.conditions as LogicalCondition[]).every((condition) =>
+              evaluateCondition(condition, formData)
+            )
+          case 'OR':
+            return (condition.conditions as LogicalCondition[]).some((condition) =>
+              evaluateCondition(condition, formData)
+            )
+          case 'NOT':
+            return !compareCondition(condition.conditions as CompareCondition[], formData)
+          case 'NONE':
+            return compareCondition(condition.conditions as CompareCondition[], formData)
+          case 'COMPARE':
+            return compareCondition([condition as CompareCondition], formData)
+          default:
+            return false
+        }
+      }
+      const triggerDependency = (field: string, _value: any, allValues: any) => {
+        const depMap = dependenciesMap.get(field)
+        console.log(depMap)
+        if (depMap) {
+          for (const [key, dep] of depMap) {
+            dep.forEach((depItem) => {
+              const { condition, action: _action } = depItem
+              // condition条件为true才执行action
+              console.log(evaluateCondition(condition, allValues))
+              if (evaluateCondition(condition, allValues)) {
+                console.log(key, '执行action')
+                // action.type === 'show' && (allValues[comp.prop] = true)
+              }
+            })
+          }
+        }
+      }
+      // 监听表单数据变动
+      const onValuesChange = (changedValues: any, allValues: any) => {
+        // console.log(changedValues)
+        // console.log(allValues)
+        // console.log(formData)
+        console.log(allValues)
+        triggerDependency(Object.keys(changedValues)[0], Object.values(changedValues)[0], allValues)
+      }
+      // 表单项包裹
       const FieldWrapper = (props: { children: React.ReactNode }) => {
         return (
           <div className='px-[20px] py-[16px] mb-[16px] rounded-[10px] bg-[#ecf5ff]'>
@@ -60,6 +199,7 @@ const DynamicForm = memo(
           </div>
         )
       }
+      // 表单项生成器
       const renderField = (field: API.TmplItem) => {
         const options = field.itemStruct
         const { type, label, desc, placeholder, visible, expand, widgetId } = options!
@@ -78,6 +218,7 @@ const DynamicForm = memo(
         switch (type) {
           case 'INPUT': {
             const expandVal = expand as API.FD_COM['INPUT']
+            const handlers = getEventHandlers(field)
 
             return (
               <FieldWrapper key={widgetId}>
@@ -93,6 +234,7 @@ const DynamicForm = memo(
                     suffix={expandVal.suffix}
                     showCount
                     allowClear
+                    {...handlers}
                   />
                 </Form.Item>
               </FieldWrapper>
@@ -175,6 +317,30 @@ const DynamicForm = memo(
               </FieldWrapper>
             )
           }
+          case 'RADIO': {
+            const expandVal = expand as API.FD_COM['RADIO']
+            const handlers = getEventHandlers(field)
+
+            return (
+              <FieldWrapper key={widgetId}>
+                <Form.Item name={widgetId} label={labelContent} style={{ marginBottom: 0 }}>
+                  <Radio.Group options={expandVal.userInput} {...handlers} />
+                </Form.Item>
+              </FieldWrapper>
+            )
+          }
+          case 'SWITCH': {
+            // const expandVal = expand as API.FD_COM['SWITCH']
+            const handlers = getEventHandlers(field)
+
+            return (
+              <FieldWrapper key={widgetId}>
+                <Form.Item name={widgetId} label={labelContent} style={{ marginBottom: 0 }}>
+                  <Switch {...handlers} />
+                </Form.Item>
+              </FieldWrapper>
+            )
+          }
           case 'DATETIME_PICKER': {
             const expandVal = expand as API.FD_COM['DATETIME_PICKER']
 
@@ -270,12 +436,12 @@ const DynamicForm = memo(
               }
             })()
             const normFile = (e: any) => {
-              console.log(e)
+              // console.log(e)
               if (Array.isArray(e)) return e
               return e?.fileList || []
             }
 
-            console.log(limitType)
+            // console.log(limitType)
 
             const handlePreview = (file: any) => {
               console.log(file)
@@ -324,6 +490,7 @@ const DynamicForm = memo(
           form={form}
           layout='vertical'
           initialValues={formData}
+          onValuesChange={onValuesChange}
           disabled={disabled}
           onFinish={onFinish}
           onFinishFailed={onFinishFailed}>

+ 2067 - 0
src/pages/decl/fakeData.ts

@@ -0,0 +1,2067 @@
+export const fakeData = {
+  declarationId: '1940683994725937153',
+  declarationSn: '6d6de0dbf2bf4488bbba2cc06ffa3c15',
+  enterpriseName: '要易云科技(北京)有限责任公司',
+  regCode: '91110111MA01TUN04W',
+  declarationType: 'SELF',
+  url: 'https://pre.yaoeasier.com/#/decl?tId=1&declSn=6d6de0dbf2bf4488bbba2cc06ffa3c15',
+  secretKey: '1234',
+  issueDate: '2025-07-03',
+  expiryDate: '2025-10-01',
+  declarationState: 'READ',
+  openInfo: {
+    region: '广东省·深圳市',
+    remoteIp: '14.153.95.209',
+    timestamp: '2025-07-03 16:08:23'
+  },
+  submitInfo: {
+    region: '台湾省·中华电信',
+    remoteIp: '1.162.160.15',
+    timestamp: '2025-07-06 15:42:34'
+  },
+  checkInfo: null,
+  formItems: [
+    {
+      weight: '3584',
+      itemDeli: [
+        {
+          value: ''
+        }
+      ],
+      itemStruct: {
+        desc: null,
+        span: 24,
+        type: 'INPUT',
+        label: {
+          text: '标题1',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          bIcon: '后缀icon',
+          fIcon: '前缀icon',
+          prefix: '',
+          suffix: '',
+          maxChars: 100,
+          limitVisible: false
+        },
+        formId: '1749787121238',
+        weight: '3584',
+        visible: true,
+        required: false,
+        widgetId: '1933373437387804673',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null,
+        // TODO 虚构参数
+        events: {
+          change: {
+            type: 'fetch',
+            params: {
+              url: '/api/user/list',
+              method: 'get',
+              headers: {
+                'Content-Type': 'application/json'
+              },
+              body: {
+                page: 1,
+                pageSize: 10
+              }
+            }
+          },
+          focus: {
+            type: 'tip',
+            data: {
+              type: 'success',
+              message: '焦点'
+            }
+          },
+          blur: {
+            type: 'tip',
+            data: {
+              type: 'success',
+              message: '失去焦点'
+            }
+          }
+        }
+      }
+    },
+    // TODO 虚构数据 性别
+    {
+      weight: '7167',
+      itemDeli: [
+        {
+          value: 'B'
+        }
+      ],
+      itemStruct: {
+        desc: '',
+        span: 24,
+        type: 'RADIO',
+        label: {
+          text: '性别',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          userInput: [
+            {
+              label: '男',
+              value: 'male'
+            },
+            {
+              label: '女',
+              value: 'female'
+            },
+            {
+              label: '未知',
+              value: 'unknown'
+            }
+          ],
+          sourceType: 'USER_INPUT'
+        },
+        formId: '1744104017642',
+        weight: '3585',
+        visible: true,
+        required: false,
+        widgetId: '1909536774773596162',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    // TODO 虚构数据 打球
+    {
+      weight: '7167',
+      itemDeli: [
+        {
+          value: 'B'
+        }
+      ],
+      itemStruct: {
+        desc: '',
+        span: 24,
+        type: 'SWITCH',
+        label: {
+          text: '打球',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {},
+        formId: '1744104017642',
+        weight: '4586',
+        visible: true,
+        required: false,
+        widgetId: '1909536774773596163',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null,
+        dependencies: [
+          {
+            triggerFields: ['1909536774773596162'],
+            condition: {
+              type: 'NONE',
+              conditions: [
+                { type: 'COMPARE', field: '1909536774773596162', operator: 'eq', value: 'male' }
+              ]
+            },
+            action: {
+              type: 'show'
+            }
+          }
+        ]
+      }
+    },
+    // TODO 虚构数据 化妆
+    {
+      weight: '7167',
+      itemDeli: [
+        {
+          value: 'B'
+        }
+      ],
+      itemStruct: {
+        desc: '',
+        span: 24,
+        type: 'SWITCH',
+        label: {
+          text: '化妆',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {},
+        formId: '1744104017642',
+        weight: '4587',
+        visible: true,
+        required: false,
+        widgetId: '1909536774773596164',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null,
+        dependencies: [
+          {
+            triggerFields: ['1909536774773596162'],
+            condition: {
+              type: 'NONE',
+              conditions: [
+                { type: 'COMPARE', field: '1909536774773596162', operator: 'eq', value: 'female' }
+              ]
+            },
+            action: {
+              type: 'show'
+            }
+          }
+        ]
+      }
+    },
+    // TODO 虚构数据 人妖
+    {
+      weight: '7167',
+      itemDeli: [
+        {
+          value: 'B'
+        }
+      ],
+      itemStruct: {
+        desc: '',
+        span: 24,
+        type: 'SWITCH',
+        label: {
+          text: '人妖',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {},
+        formId: '1744104017642',
+        weight: '4591',
+        visible: true,
+        required: false,
+        widgetId: '1909536774773596169',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null,
+        dependencies: [
+          {
+            triggerFields: ['1909536774773596162', '1933373437387804673'],
+            condition: {
+              type: 'AND',
+              conditions: [
+                { type: 'COMPARE', field: '1909536774773596162', operator: 'eq', value: 'unknown' },
+                { type: 'COMPARE', field: '1933373437387804673', operator: 'eq', value: 'abc' }
+              ]
+            },
+            action: {
+              type: 'show'
+            }
+          }
+        ]
+      }
+    },
+
+    {
+      weight: '7168',
+      itemDeli: [],
+      itemStruct: {
+        desc: '',
+        span: 24,
+        type: 'TITLE',
+        label: {
+          text: 'xxxxx',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          desc: '描述',
+          title: '标题2'
+        },
+        formId: '1749736411279',
+        weight: '7168',
+        visible: true,
+        required: false,
+        widgetId: '1933160742243909634',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '14336',
+      itemDeli: [],
+      itemStruct: {
+        desc: null,
+        span: 24,
+        type: 'TITLE',
+        label: {
+          text: '标题',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          desc: '描述',
+          title: '标题3555'
+        },
+        formId: '1749710041244',
+        weight: '14336',
+        visible: true,
+        required: false,
+        widgetId: '1933050140766781441',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '19712',
+      itemDeli: [
+        {
+          value: ''
+        }
+      ],
+      itemStruct: {
+        desc: '',
+        span: 24,
+        type: 'NUMBER_INPUT',
+        label: {
+          text: '标题4',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          max: null,
+          min: null,
+          unit: '',
+          bIcon: '',
+          fIcon: '',
+          prefix: '',
+          suffix: '',
+          maxChars: 100,
+          featureType: 'NUMBER',
+          limitVisible: false,
+          decimalPlacesNumber: 0
+        },
+        formId: '1749788709667',
+        weight: '19712',
+        visible: true,
+        required: false,
+        widgetId: '1933380099754496002',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '20608',
+      itemDeli: [],
+      itemStruct: {
+        desc: '222',
+        span: 24,
+        type: 'TITLE',
+        label: {
+          text: '标题',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          desc: '描述',
+          title: '标题5222'
+        },
+        formId: '1749786919841',
+        weight: '20608',
+        visible: true,
+        required: false,
+        widgetId: '1933372591027589122',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '21504',
+      itemDeli: [],
+      itemStruct: {
+        desc: 'qwqwqw11',
+        span: 24,
+        type: 'TITLE',
+        label: {
+          text: '标题1',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          desc: '描述',
+          title: '标题6'
+        },
+        formId: '1749710173724',
+        weight: '21504',
+        visible: true,
+        required: false,
+        widgetId: '1933050694616236034',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '22848',
+      itemDeli: [],
+      itemStruct: {
+        desc: null,
+        span: 24,
+        type: 'TITLE',
+        label: {
+          text: '标题',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          desc: '描述',
+          title: '标题'
+        },
+        formId: '1749787073890',
+        weight: '22848',
+        visible: true,
+        required: false,
+        widgetId: '1933373237457915905',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '23072',
+      itemDeli: [],
+      itemStruct: {
+        desc: null,
+        span: 24,
+        type: 'FINANCE_PICKER',
+        label: {
+          text: '财务数据采集222',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          limit: 1,
+          accept: null,
+          btnText: '上传财务文件',
+          showTip: true,
+          fileSize: 20,
+          fillType: 'EXCEL',
+          listType: 'TEXT',
+          multiple: false,
+          sizeUnit: 'MB',
+          enableParse: true,
+          hasTemplate: true,
+          templateTip: '',
+          templateList: [
+            {
+              url: 'https://cos.ap-beijing.myqcloud.com/yyc3-1321096020/static/20250410/f2c812ff00f343b6a3a3d54415fbdb30.xlsx',
+              auth: false,
+              name: '公司类财务数据模版.xlsx',
+              fileId: null,
+              folder: null,
+              viewUrl:
+                'https://cos.ap-beijing.myqcloud.com/yyc3-1321096020/static/20250410/f2c812ff00f343b6a3a3d54415fbdb30.xlsx',
+              endpoint: null,
+              fileName: null,
+              original: '公司类财务数据模版.xlsx',
+              bucketName: null
+            }
+          ],
+          requiredLimit: 1,
+          animateLoading: true,
+          fileParserType: 'COMMON_FINANCIAL_EXCEL_PARSER',
+          multiAcceptList: ['EXCEL']
+        },
+        formId: '1749796842398',
+        weight: '23072',
+        visible: true,
+        required: false,
+        widgetId: '1933414213228498945',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '23296',
+      itemDeli: [],
+      itemStruct: {
+        desc: '2332',
+        span: 24,
+        type: 'TITLE',
+        label: {
+          text: '标题',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          desc: '描述',
+          title: '标题2222233131'
+        },
+        formId: '1749786732176',
+        weight: '23296',
+        visible: true,
+        required: false,
+        widgetId: '1933371805245706242',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '25088',
+      itemDeli: [],
+      itemStruct: {
+        desc: null,
+        span: 24,
+        type: 'FINANCE_PICKER',
+        label: {
+          text: '财务数据采集',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          limit: 1,
+          accept: null,
+          btnText: '上传财务文件',
+          showTip: true,
+          fileSize: 20,
+          fillType: 'EXCEL',
+          listType: 'TEXT',
+          multiple: false,
+          sizeUnit: 'MB',
+          enableParse: true,
+          hasTemplate: true,
+          templateTip: '',
+          templateList: [
+            {
+              url: 'https://cos.ap-beijing.myqcloud.com/yyc3-1321096020/static/20250410/f2c812ff00f343b6a3a3d54415fbdb30.xlsx',
+              auth: false,
+              name: '公司类财务数据模版.xlsx',
+              fileId: null,
+              folder: null,
+              viewUrl:
+                'https://cos.ap-beijing.myqcloud.com/yyc3-1321096020/static/20250410/f2c812ff00f343b6a3a3d54415fbdb30.xlsx',
+              endpoint: null,
+              fileName: null,
+              original: '公司类财务数据模版.xlsx',
+              bucketName: null
+            }
+          ],
+          requiredLimit: 1,
+          animateLoading: true,
+          fileParserType: 'COMMON_FINANCIAL_EXCEL_PARSER',
+          multiAcceptList: ['EXCEL']
+        },
+        formId: '1749782686756',
+        weight: '25088',
+        visible: true,
+        required: false,
+        widgetId: '1933354835431460865',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '28672',
+      itemDeli: [],
+      itemStruct: {
+        desc: '',
+        span: 24,
+        type: 'FILE_PICKER',
+        label: {
+          text: '上传图片',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          limit: 1,
+          accept: null,
+          btnText: '点击上传',
+          showTip: true,
+          fileSize: 10,
+          listType: 'PICTURE_CARD',
+          multiple: false,
+          sizeUnit: 'MB',
+          hasTemplate: false,
+          templateTip: '',
+          templateList: [],
+          requiredLimit: 1,
+          animateLoading: true,
+          multiAcceptList: ['IMG']
+        },
+        formId: '1747815868590',
+        weight: '28672',
+        visible: true,
+        required: false,
+        widgetId: '1925105403615272962',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '43008',
+      itemDeli: [],
+      itemStruct: {
+        desc: null,
+        span: 24,
+        type: 'INVOICE_PICKER',
+        label: {
+          text: '发票',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          check: true,
+          limit: 1,
+          accept: null,
+          btnText: '上传发票',
+          showTip: true,
+          fileSize: 20,
+          listType: 'TEXT',
+          multiple: false,
+          sizeUnit: 'MB',
+          recognize: true,
+          hasTemplate: false,
+          templateTip: '',
+          templateList: [],
+          requiredLimit: 1,
+          animateLoading: true,
+          multiAcceptList: ['IMG', 'PDF']
+        },
+        formId: '1749780522346',
+        weight: '43008',
+        visible: true,
+        required: false,
+        widgetId: '1933345758072606721',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '86016',
+      itemDeli: [
+        {
+          value: ''
+        }
+      ],
+      itemStruct: {
+        desc: null,
+        span: 24,
+        type: 'NUMBER_INPUT',
+        label: {
+          text: '标题',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          max: null,
+          min: null,
+          unit: '',
+          bIcon: '',
+          fIcon: '',
+          prefix: '',
+          suffix: '',
+          maxChars: 100,
+          featureType: 'NUMBER',
+          limitVisible: false,
+          decimalPlacesNumber: 0
+        },
+        formId: '1744699865624',
+        weight: '86016',
+        visible: true,
+        required: false,
+        widgetId: '1912035941357989890',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '100352',
+      itemDeli: [
+        {
+          value: ''
+        }
+      ],
+      itemStruct: {
+        desc: '',
+        span: 24,
+        type: 'NUMBER_INPUT',
+        label: {
+          text: '开户注册',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          max: null,
+          min: null,
+          unit: 'NONE',
+          bIcon: '',
+          fIcon: '',
+          prefix: '',
+          suffix: '%',
+          maxChars: 100,
+          featureType: 'PERCENT',
+          limitVisible: false,
+          decimalPlacesNumber: 0
+        },
+        formId: '1743500228951',
+        weight: '100352',
+        visible: true,
+        required: false,
+        widgetId: '1907004298306007041',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '129024',
+      itemDeli: [
+        {
+          value: ''
+        }
+      ],
+      itemStruct: {
+        desc: '',
+        span: 24,
+        type: 'NUMBER_INPUT',
+        label: {
+          text: '数字-限制最小值',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          max: null,
+          min: 66,
+          unit: '美元',
+          bIcon: '',
+          fIcon: '',
+          prefix: '',
+          suffix: '',
+          maxChars: 100,
+          featureType: 'NUMBER',
+          limitVisible: false,
+          decimalPlacesNumber: 2
+        },
+        formId: '1743515706517',
+        weight: '129024',
+        visible: true,
+        required: false,
+        widgetId: '1907069215163883521',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '132608',
+      itemDeli: [
+        {
+          value: ''
+        }
+      ],
+      itemStruct: {
+        desc: null,
+        span: 24,
+        type: 'AMOUNT_INPUT',
+        label: {
+          text: '标题',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          max: null,
+          min: null,
+          unit: 'YUAN',
+          bIcon: '',
+          fIcon: '',
+          prefix: '',
+          suffix: '',
+          maxChars: 100,
+          limitVisible: false,
+          decimalPlacesNumber: 2
+        },
+        formId: '1744699909871',
+        weight: '132608',
+        visible: true,
+        required: false,
+        widgetId: '1912036124422582274',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '136192',
+      itemDeli: [
+        {
+          value: ''
+        }
+      ],
+      itemStruct: {
+        desc: '',
+        span: 24,
+        type: 'NUMBER_INPUT',
+        label: {
+          text: '数字-限制最大值',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          max: 88,
+          min: null,
+          unit: 'NONE',
+          bIcon: '',
+          fIcon: '',
+          prefix: '',
+          suffix: '',
+          maxChars: 100,
+          numberType: 'ANY',
+          featureType: 'NUMBER',
+          currencyType: 'NONE',
+          limitVisible: false,
+          decimalPlacesNumber: 2
+        },
+        formId: '1743515744079',
+        weight: '136192',
+        visible: true,
+        required: false,
+        widgetId: '1907069372911656962',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '139776',
+      itemDeli: [
+        {
+          value: ''
+        }
+      ],
+      itemStruct: {
+        desc: '',
+        span: 24,
+        type: 'NUMBER_INPUT',
+        label: {
+          text: '数字-66到88',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          max: 88,
+          min: 66,
+          unit: 'NONE',
+          bIcon: '',
+          fIcon: '',
+          prefix: '',
+          suffix: '',
+          maxChars: 100,
+          featureType: 'NUMBER',
+          limitVisible: false,
+          decimalPlacesNumber: 2
+        },
+        formId: '1743515780291',
+        weight: '139776',
+        visible: true,
+        required: false,
+        widgetId: '1907069526582566913',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '172032',
+      itemDeli: [
+        {
+          value: ''
+        }
+      ],
+      itemStruct: {
+        desc: null,
+        span: 24,
+        type: 'AMOUNT_INPUT',
+        label: {
+          text: '金额',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          max: null,
+          min: null,
+          unit: 'YUAN',
+          bIcon: '',
+          fIcon: '',
+          prefix: '',
+          suffix: '',
+          maxChars: 100,
+          numberType: 'ANY',
+          currencyType: 'CNY',
+          limitVisible: false,
+          decimalPlacesNumber: 2
+        },
+        formId: '1743499510254',
+        weight: '172032',
+        visible: true,
+        required: false,
+        widgetId: '1907001285340311554',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '229376',
+      itemDeli: [],
+      itemStruct: {
+        desc: null,
+        span: 24,
+        type: 'INVOICE_PICKER',
+        label: {
+          text: '发票',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          check: false,
+          limit: 1,
+          accept: null,
+          btnText: '上传发票',
+          showTip: true,
+          fileSize: 20,
+          listType: 'TEXT',
+          multiple: false,
+          sizeUnit: 'MB',
+          recognize: true,
+          hasTemplate: false,
+          templateTip: '',
+          templateList: [],
+          requiredLimit: 1,
+          animateLoading: true,
+          multiAcceptList: ['IMG', 'PDF']
+        },
+        formId: '1743422407597',
+        weight: '229376',
+        visible: true,
+        required: false,
+        widgetId: '1906677898592219138',
+        categoryId: '1906584101959024642',
+        placeholder: '占位符',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '245760',
+      itemDeli: [],
+      itemStruct: {
+        desc: null,
+        span: 24,
+        type: 'INVOICE_PICKER',
+        label: {
+          text: '发票',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          check: true,
+          limit: 1,
+          accept: null,
+          btnText: '上传发票',
+          showTip: true,
+          fileSize: 20,
+          listType: 'TEXT',
+          multiple: false,
+          sizeUnit: 'MB',
+          recognize: true,
+          hasTemplate: false,
+          templateTip: '',
+          templateList: [],
+          requiredLimit: 1,
+          animateLoading: true,
+          multiAcceptList: ['IMG', 'PDF']
+        },
+        formId: '1744722935191',
+        weight: '245760',
+        visible: true,
+        required: false,
+        widgetId: '1912132696460349442',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '262144',
+      itemDeli: [],
+      itemStruct: {
+        desc: null,
+        span: 24,
+        type: 'FINANCE_PICKER',
+        label: {
+          text: '财务数据采集',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          limit: 1,
+          accept: null,
+          btnText: '上传财务文件',
+          showTip: true,
+          fileSize: 20,
+          fillType: 'EXCEL',
+          listType: 'TEXT',
+          multiple: false,
+          sizeUnit: 'MB',
+          enableParse: true,
+          hasTemplate: true,
+          templateTip: '',
+          templateList: [
+            {
+              url: 'https://cos.ap-beijing.myqcloud.com/yyc3-1321096020/static/20250328/c99480604ad34ac589b62cf3db9a77aa.xlsx',
+              auth: false,
+              name: '公司类财务数据模版.xlsx',
+              fileId: null,
+              folder: null,
+              viewUrl:
+                'https://cos.ap-beijing.myqcloud.com/yyc3-1321096020/static/20250328/c99480604ad34ac589b62cf3db9a77aa.xlsx',
+              endpoint: null,
+              fileName: null,
+              original: '公司类财务数据模版.xlsx',
+              bucketName: null
+            }
+          ],
+          requiredLimit: 1,
+          animateLoading: true,
+          fileParserType: 'COMMON_FINANCIAL_EXCEL_PARSER',
+          multiAcceptList: ['EXCEL']
+        },
+        formId: '1743405210697',
+        weight: '262144',
+        visible: true,
+        required: false,
+        widgetId: '1906605766591979522',
+        categoryId: '1906584101959024642',
+        placeholder: '占位符',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '393216',
+      itemDeli: [],
+      itemStruct: {
+        desc: '',
+        span: 24,
+        type: 'OBJECT_PICKER',
+        label: {
+          text: '标题',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          child: 'child',
+          label: 'label',
+          level: 1,
+          value: 'value',
+          animateLoading: true
+        },
+        formId: '1743424532627',
+        weight: '393216',
+        visible: true,
+        required: false,
+        widgetId: '1906686804957687809',
+        categoryId: '1906584101959024642',
+        placeholder: '占位符',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '491520',
+      itemDeli: [
+        {
+          value: ''
+        }
+      ],
+      itemStruct: {
+        desc: '',
+        span: 24,
+        type: 'DATETIME_PICKER',
+        label: {
+          text: '日期',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          format: 'YYYY-MM-DD',
+          dateType: 'DATE',
+          periodEnd: '2025-05-01 00:00:00',
+          periodStart: '2025-04-01 00:00:00'
+        },
+        formId: '1744040870270',
+        weight: '491520',
+        visible: true,
+        required: false,
+        widgetId: '1909271916668862466',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '540672',
+      itemDeli: [
+        {
+          value: []
+        }
+      ],
+      itemStruct: {
+        desc: '',
+        span: 24,
+        type: 'DATETIME_PICKER',
+        label: {
+          text: '日期范围',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          format: 'YYYY-MM-DD HH:mm:ss',
+          dateType: 'DATERANGE',
+          periodEnd: '2025-04-07 00:00:00',
+          periodStart: '2025-04-25 11:31:30'
+        },
+        formId: '1744078284656',
+        weight: '540672',
+        visible: true,
+        required: false,
+        widgetId: '1909428840727134209',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '565248',
+      itemDeli: [
+        {
+          value: ''
+        }
+      ],
+      itemStruct: {
+        desc: '',
+        span: 24,
+        type: 'DATETIME_PICKER',
+        label: {
+          text: '250407-041020-250430-120510',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          format: 'YYYY-MM-DD HH:mm:ss',
+          dateType: 'DATETIME',
+          periodEnd: '2025-04-30 12:05:10',
+          periodStart: '2025-04-07 04:10:20'
+        },
+        formId: '1744078955850',
+        weight: '565248',
+        visible: true,
+        required: false,
+        widgetId: '1909431661803421698',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '577536',
+      itemDeli: [
+        {
+          value: []
+        }
+      ],
+      itemStruct: {
+        desc: '',
+        span: 24,
+        type: 'DATETIME_PICKER',
+        label: {
+          text: '日期时间范围',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          format: 'YYYY-MM-DD HH:mm:ss',
+          dateType: 'DATETIMERANGE',
+          periodEnd: '2025-04-16 08:06:05',
+          periodStart: '2025-04-15 09:10:12'
+        },
+        formId: '1744078974537',
+        weight: '577536',
+        visible: true,
+        required: false,
+        widgetId: '1909431736877268993',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '616448',
+      itemDeli: [
+        {
+          value: 'B'
+        }
+      ],
+      itemStruct: {
+        desc: '',
+        span: 24,
+        type: 'RADIO',
+        label: {
+          text: 'RADIO',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          userInput: [
+            {
+              label: 'A',
+              value: 'A'
+            },
+            {
+              label: 'B',
+              value: 'B'
+            },
+            {
+              label: '选项40',
+              value: '选项40'
+            }
+          ],
+          sourceType: 'USER_INPUT'
+        },
+        formId: '1744104017642',
+        weight: '616448',
+        visible: true,
+        required: false,
+        widgetId: '1909536774773596161',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '626176',
+      itemDeli: [
+        {
+          value: ''
+        }
+      ],
+      itemStruct: {
+        desc: null,
+        span: 24,
+        type: 'DATETIME_PICKER',
+        label: {
+          text: '标题',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          format: 'YYYY-MM-DD HH:mm:ss',
+          dateType: 'DATE',
+          periodEnd: '2025-04-01 00:00:00',
+          periodStart: '2025-04-01 00:00:00'
+        },
+        formId: '1744688913722',
+        weight: '626176',
+        visible: true,
+        required: false,
+        widgetId: '1911990009769766913',
+        categoryId: '1906584101959024642',
+        placeholder: '请选择',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '635904',
+      itemDeli: [
+        {
+          value: ''
+        }
+      ],
+      itemStruct: {
+        desc: '',
+        span: 24,
+        type: 'SELECT',
+        label: {
+          text: '下拉选择',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          multiple: false,
+          userInput: [
+            {
+              label: 'aa',
+              value: 'aa'
+            },
+            {
+              label: 'BB',
+              value: 'BB'
+            }
+          ],
+          sourceType: 'USER_INPUT'
+        },
+        formId: '1744106540530',
+        weight: '635904',
+        visible: true,
+        required: false,
+        widgetId: '1909547356146950146',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '645632',
+      itemDeli: [
+        {
+          value: []
+        }
+      ],
+      itemStruct: {
+        desc: '',
+        span: 24,
+        type: 'SELECT',
+        label: {
+          text: '下拉多选',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          multiple: true,
+          userInput: [
+            {
+              label: '选项1',
+              value: '1'
+            },
+            {
+              label: '选项2',
+              value: '2'
+            },
+            {
+              label: '3',
+              value: '3'
+            }
+          ],
+          sourceType: 'USER_INPUT'
+        },
+        formId: '1744107302998',
+        weight: '645632',
+        visible: true,
+        required: false,
+        widgetId: '1909550551845888001',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    },
+    {
+      weight: '650496',
+      itemDeli: [],
+      itemStruct: {
+        desc: '',
+        span: 24,
+        type: 'FILE_PICKER',
+        label: {
+          text: '标题212',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          limit: 3,
+          accept: null,
+          btnText: '点击上传',
+          showTip: true,
+          fileSize: 10,
+          listType: 'PICTURE_CARD',
+          multiple: false,
+          sizeUnit: 'MB',
+          hasTemplate: false,
+          templateTip: '',
+          templateList: [],
+          requiredLimit: 4,
+          animateLoading: true,
+          multiAcceptList: ['EXCEL', 'PPT', 'PDF']
+        },
+        formId: '1749796053528',
+        weight: '650496',
+        visible: true,
+        required: true,
+        widgetId: '1933410901477363713',
+        categoryId: '1906584101959024642',
+        placeholder: '请输入',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: []
+      }
+    },
+    {
+      weight: '655360',
+      itemDeli: [],
+      itemStruct: {
+        desc: null,
+        span: 24,
+        type: 'INVOICE_PICKER',
+        label: {
+          text: '发票',
+          align: 'LEFT',
+          visible: true,
+          position: 'LEFT'
+        },
+        score: 10,
+        valid: [
+          {
+            format: 'REGEX',
+            message: '',
+            expression: {
+              body: '',
+              modifier: ''
+            }
+          }
+        ],
+        expand: {
+          check: true,
+          limit: 1,
+          accept: null,
+          btnText: '上传发票',
+          showTip: true,
+          fileSize: 20,
+          listType: 'TEXT',
+          multiple: false,
+          sizeUnit: 'MB',
+          recognize: true,
+          hasTemplate: false,
+          templateTip: '',
+          templateList: [],
+          requiredLimit: 1,
+          animateLoading: true,
+          multiAcceptList: ['IMG', 'PDF']
+        },
+        formId: '1744096118908',
+        weight: '655360',
+        visible: true,
+        required: false,
+        widgetId: '1909503642003382274',
+        categoryId: '1906584101959024642',
+        placeholder: '占位符',
+        defaultValue: {
+          value: '',
+          format: 'PLAIN'
+        },
+        dynamicTriggers: null
+      }
+    }
+  ],
+  result: null,
+  sender: {
+    senderName: '林',
+    senderEmail: 'lin@163.com',
+    senderPhone: '15523322110',
+    senderAvatar: 'https://file.freerr.cn/avatar/20240219/male.png'
+  },
+  recipient: null,
+  deptId: '1',
+  tenantId: '1',
+  parentId: null,
+  checkState: 'UN_CHECK',
+  checkMsg: null,
+  remarks: null,
+  rollbackRemark: null,
+  payDetail: {
+    reqSn: null,
+    amount: '0.00',
+    orderState: '0000',
+    paymentTime: null,
+    issueTime: '2025-07-04 11:38:14',
+    expireTime: '2025-07-31 00:00:00',
+    payType: null,
+    bizPayType: 'FULLY_PREPAID'
+  },
+  isTenantApplied: false
+}

+ 19 - 10
src/pages/decl/index.tsx

@@ -9,6 +9,7 @@ import { DeclState, DeclStateText } from '@/api/services/riskcontrol/enum'
 import { Button, Divider, Input, Layout, Result } from 'antd'
 import { LoadingOutlined } from '@ant-design/icons'
 import FormParse, { type FormParseRef } from '@/components/formParse'
+import { fakeData } from './fakeData'
 import { DeclProvider } from './providers/DeclProvider'
 
 const { Search } = Input
@@ -50,17 +51,25 @@ function Decl() {
     setFormData({})
     setFormRule({})
     setBtnLoading(true)
-    const res = await openDeclForm({
-      tId,
-      declSn,
-      secretKey
-    })
+
+    // 固定数据,debug 用。并增加表单项联动+预远程数据加载
+    const fakeDataResult = fakeData
+    setDeclFormData(fakeDataResult as any)
+    setPageState('decl')
+    setOrderState(declFormData?.payDetail?.orderState as string)
     setBtnLoading(false)
-    if (res?.code === '2000') {
-      setDeclFormData(res.data)
-      setPageState('decl')
-      setOrderState(declFormData?.payDetail?.orderState as string)
-    }
+
+    // const res = await openDeclForm({
+    //   tId,
+    //   declSn,
+    //   secretKey
+    // })
+    // setBtnLoading(false)
+    // if (res?.code === '2000') {
+    //   setDeclFormData(res.data)
+    //   setPageState('decl')
+    //   setOrderState(declFormData?.payDetail?.orderState as string)
+    // }
   }
   useEffect(() => {
     if (!tId || !declSn) {