# 在表单带出预算信息

来源快照：`result_data_new_260518.json`

- 来源 ID：`1178052685428678742`
- 模块：电子费控
- 目录：场景示例 - 预算报销
- space ID：`1963167002611772846`
- 原文链接：未提供
- 产品基线：未提供

## 正文

# 1\. 编写目的

在员工提交流程冻结、扣除预算时，时常存在报销金额超出剩余预算导致流程无法提交的情况，如果可以在流程表单选择预算维度成员后，就带出相应的预算使用情况，对员工报销会更便捷，例如表单上填写产品部-办公费，2025-09-10，带出预算使用情况如下：预算总额100，审批中5.00，已发生5.00，剩余可用90.00。本期专题涉及功能点如下：

方式1：通过在表单插入代码块带出预算信息，见2.1

方式2：通过字段联动带出预算信息，见2.2、2.3

方式3：见2.4

# 2\. 操作说明

## 2.1 代码块带出预算信息

打开需要带出预算信息的表单，增加1个数字类型的字段-预算信息（字段名称可以随意修改，这里只是示例）

![](https://weapp.eteams.cn/papi/file/preview?fileId=1225597226278821890&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

进入【电子费控】-【设置】-【系统设置】-【费用设置】-【关联工作流设置】-【预算设置】-【高级设置】，设置字段对应

![](https://weapp.eteams.cn/papi/file/preview?fileId=1178055717879365633&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

这4个预算信息字段都对应刚才添加的表单字段

![](https://weapp.eteams.cn/papi/file/preview?fileId=1225597501116563458&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

复制文件里的代码到表单设计器

![](https://weapp.eteams.cn/papi/file/preview?fileId=1178056684272705542&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

复制后效果如下，根据第一步“预算信息”字段所在的位置修改对应的代码。如图所示，第一步中我们将预算信息添加到明细表，因此修改明细表中的代码，将红框位置的代码改为预算信息的数据key

![](https://weapp.eteams.cn/papi/file/preview?fileId=1225597870518575107&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

数据key获取

![](https://weapp.eteams.cn/papi/file/preview?fileId=1225598179637510147&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

保存后在表单选择预算维度，成功带出预算信息

![](https://weapp.eteams.cn/papi/file/preview?fileId=1225598287110578176&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

## 2.2 动作流带出预算信息（主表）

1、选择自定义触发组件，配置输入参数

输入参数包含预算模板维度参数及费用日期参数；其中维度参数可扩展配置

![](https://weapp.eteams.cn/papi/file/preview?fileId=1194046632657788931&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

2、选择serverless组件

分组标识: fnaBudgetFieldLinkAction

输入参数配置示例

![](https://weapp.eteams.cn/papi/file/preview?fileId=1194047281188675593&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

输入参数配置如下

![](https://weapp.eteams.cn/papi/file/preview?fileId=1194046963332038664&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

mainDimension 输入参数配置

其中code,value可以自行扩展，必须以code,value开头 数字进行结尾；code对应预算模板维度名称

![](https://weapp.eteams.cn/papi/file/preview?fileId=1194047040620175376&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

输出参数配置示例

![](https://weapp.eteams.cn/papi/file/preview?fileId=1194047482972749830&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

输出参数配置如下

![](https://weapp.eteams.cn/papi/file/preview?fileId=1194047431517028362&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

budgetAmountMainData输出参数配置

![](https://weapp.eteams.cn/papi/file/preview?fileId=1194048019865116682&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

3、输出组件配置

输出组件配置示例

![](https://weapp.eteams.cn/papi/file/preview?fileId=1194048290593759240&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

参数配置如下

![](https://weapp.eteams.cn/papi/file/preview?fileId=1194048093029769221&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

4、字段联动配置示例

主表触发动作需要开启载入时；选择空值跳过

![](https://weapp.eteams.cn/papi/file/preview?fileId=1194048406474604552&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

## 2.3 动作流带出预算信息（明细表）

1、选择自定义触发组件，配置输入参数

包含预算模板维度参数及费用日期参数；其中维度参数可扩展配置

![](https://weapp.eteams.cn/papi/file/preview?fileId=1194048999222034439&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

2、选择serverless组件

分组标识: fnaBudgetFieldLinkAction

输入参数配置示例

![](https://weapp.eteams.cn/papi/file/preview?fileId=1194049480207425538&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

输入参数配置如下

![](https://weapp.eteams.cn/papi/file/preview?fileId=1194049200934502411&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

detailDimension输入参数配置

其中code,value可以自行扩展，必须以code,value开头 数字进行结尾；code对应预算模板维

度名称

![](https://weapp.eteams.cn/papi/file/preview?fileId=1194049265405632519&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

输出参数配置示例

![](https://weapp.eteams.cn/papi/file/preview?fileId=1194050257550680069&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

输出参数配置如下

![](https://weapp.eteams.cn/papi/file/preview?fileId=1194050343571963912&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

budgetAmountDetailData输出参数配置

![](https://weapp.eteams.cn/papi/file/preview?fileId=1194050425167339530&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

3、输出组件配置

输出组件配置示例

![](https://weapp.eteams.cn/papi/file/preview?fileId=1194050541031407621&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

参数配置如下

![](https://weapp.eteams.cn/papi/file/preview?fileId=1194050472236433411&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

4、字段联动配置示例

![](https://weapp.eteams.cn/papi/file/preview?fileId=1194050704303562756&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

## 2.4 预算信息组件带出

通过预算信息组件带出预算使用情况，详情见[预算信息](https://weapp.eteams.cn/sp/ebdpage/view/freepass/1152863419640021002?id=1232538172514910248&freepass_doc=1&space_id=1963167002611772846 "预算信息")

# 3\. 视频讲解

[预算信息带出](https://www.e-cology.com.cn/sp/doc/docShare/1240713196101713921?tenantKey=t7akvdnf84 "预算信息带出")
