Pinvou/pinvou-agent / pinvou3-app/src-tauri/resources/common/bundle/dingtalk-skills/dws
dws
Unverified【何时用:仅当用户明确指向钉钉/DingTalk(钉钉文档、钉钉日程等)时使用;泛指做文档/表格/待办/审批默认走本地工具,不要误用钉钉】用 dws CLI 管理钉钉:AI表格/AI搜问(找人首选)/目标管理(Agoal)/组织大脑/日历/通讯录/群聊与机器人消息/待办/审批/智能合同/考勤/日志(日报周报)/DING消息/钉钉文档/云盘/Markdown文件/HTML文件/AI听记/邮箱/在线电子表格(axls)/知识库/白板/开放平台文档/个人IM与OA事件订阅。用户要求操作上述钉钉产品时使用。
references/products/oa/template/components/CalculateField.md
View on GitHub# 计算公式 — `CalculateField`
> 分类:增强控件
对表单内数值字段自动计算。
## JSON Schema
| 字段 | 类型 | 必填 | 说明 |
|------|------|------|------|
| `componentName` | string | 是 | 固定值 `"CalculateField"` |
| `props.id` | string | 是 | 唯一标识,格式 `CalculateField_{随机字符串}` |
| `props.label` | string | 是 | 控件标题 |
| `props.formula` | array | 是 | 计算公式(**必填,不能为空数组**),数组元素按顺序拼接,见下文「formula 结构」 |
| `props.placeholder` | string | 否 | 占位提示文字 |
| `props.notUpper` | string | 否 | `"0"` 显示大写金额,`"1"` 不显示 |
## 示例
```json
{
"componentName": "CalculateField",
"props": {
"id": "CalculateField_PIIZHXI39V40",
"label": "合计金额",
"formula": [
{ "id": "NumberField_UNITPRICE01" },
"*",
{ "id": "NumberField_QUANTITY01" }
],
"placeholder": "自动计算数值",
"notUpper": "0"
}
}
```
## formula 结构
`props.formula` 是一个**数组**,按顺序拼成一个四则运算表达式,元素共三种:
| 元素形式 | 说明 |
|---------|------|
| `{ "id": "<数值字段 props.id>" }` | 引用另一个数值型字段的值,只能引用 `NumberField` / `MoneyField` / `CalculateField` / `DiscountField`,且其 `id` **必须是本表单中已定义的控件 `props.id`**(不能引用自身) |
| 运算符字符串 | `"+"`、`"-"`、`"*"`、`"/"`、`"("`、`")"` |
| 数字字面量 | 如 `2`、`100`;小数点用 `"."` |
示例:“合计 = 单价 × 数量” → `[ { "id": "NumberField_UNITPRICE01" }, "*", { "id": "NumberField_QUANTITY01" } ]`。
## 约束
- `formula` **必填且不得为空数组**;公式必须能构成合法的数学表达式(括号配对、运算符不悬空)。
- `formula` 中引用的字段 `id` 必须是当前表单已存在的数值型控件 `id`(由脚本生成),**不得引用未定义或非数值型字段,也不能编造 id**。
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |