批量修改合同自定义列
接口说明
按合同批量写入或更新自定义列单元格内容。
请求信息
请求 URL:
http://lbl-open.thinkerx.com/api/lbl/update-contract-custom-columns请求方式:
POSTContent-Type:
application/json(推荐)或application/x-www-form-urlencoded
权限
需登录鉴权
订单模块--->修改订单
请求参数
| 参数名 | 必选 | 类型 | 说明 |
|---|---|---|---|
| factory_id | 否 | int | 单库工厂 id,默认 1;用于校验合同及解析 group_code |
| items | 是 | array | 批量列表;也可用同结构的 data 字段 |
items[] 单条
| 参数名 | 必选 | 类型 | 说明 |
|---|---|---|---|
| fid | 条件 | int | 合同 id;与 group_code 二选一;兼容 finance_group_id |
| group_code | 条件 | string | 合同号;与 fid 二选一;同一 factory_id 下须唯一,否则请改用 fid |
| custom_name | 是 | string | 自定义列键;兼容字段名 name |
| value | 否 | string | 单元格值;可为空 |
| label | 否 | string | 仅新建行时写入列展示名;已存在记录时忽略,不修改库中的 label |
| color | 否 | string | 仅新建行时写入;已存在记录时忽略,不修改库中的 color |
请求示例
{
"factory_id": 1,
"items": [
{ "fid": 91167, "custom_name": "zidingyi1", "value": "备注" },
{ "group_code": "FG20260320-3", "custom_name": "zidingyi2", "value": "" }
]
}返回示例
{
"status": 0,
"message": "ok",
"data": {
"updated": 2
}
}其它说明
单次最多 500 条。
每条
fid与group_code不得同时填写;必须填其一。该合同下已有
finance_order_group_attr记录时,接口只更新value,不改label、color;尚无记录时按label/color与排头配置插入新行。
