简要描述:

  • 获取模块子表单子字段

请求URL:

  • 同获取模块自定义字段/api/v2/custom_fields/:entity_type/by_group

URL使用示例(获取合同模块关联产品子字段,subform_field_id是关联产品字段id): /api/v2/custom_fields/contract/by_group?subform_field_id=142

  • url请求参数说明
字段名 是否必填 描述
entity_type true 实体名(customer,contact,contract,lead,opportunity,product)
custom_field_template_id false 自定义业务类型id, 调用接口 业务模版接口获取id
subform_field_id false 子表单字段id,取得子表单子字段时比传
  • 实体名(:entity_type)参数说明:
参数名 描述
lead 线索
customer 客户
contact 联系人
opportunity 商机
contract 合同
received_payment 回款
product 产品

请求方式:

  • GET

请求参数:

返回值说明

list

字段 类型 说明
id number 自定义字段ID
label string 自定义字段标签
name string 自定义字段名称。可以作为存到数据库/编程/接口调用时的字段名(key)。
field_type string 对自定义字段类型的描述。

返回示例:

正确时返回:


{
    "code": 0,
    "data": {
        "list": [
            {
                "id": 3714,
                "name": "text_asset_317a06",
                "label": "单选t1",
                "field_type": "select",
                "category": "uncommon",
                "position": 0,
                "placeholder": null,
                "label_html_options": {},
                "custom_column_name": "text_asset_317a06_display",
                "input_field_options": {
                    "collection_options": [
                        {
                            "label": "请选择",
                            "value": "",
                            "related_custom_ids": []
                        },
                        {
                            "label": "11",
                            "value": "sel_2e2b",
                            "related_custom_ids": []
                        },
                        {
                            "label": "22",
                            "value": "sel_a88d",
                            "related_custom_ids": []
                        }
                    ]
                },
                "status": "enable",
                "required": false,
                "cannot_edit": false,
                "cannot_see": false,
                "is_user_custom_column": true,
                "field_type_option": "select",
                "exclude_place": [],
                "options": {
                    "select_options": [
                        [
                            "11",
                            "sel_2e2b"
                        ],
                        [
                            "22",
                            "sel_a88d"
                        ]
                    ],
                    "custom_column_name": "text_asset_317a06_display"
                },
                "has_number_range": false,
                "number_hidden_type": null
            },
            {
                "id": 3696,
                "name": "product",
                "label": "产品",
                "field_type": "select2_field",
                "category": "common",
                "position": 1,
                "placeholder": null,
                "label_html_options": {},
                "custom_column_name": "product.name",
                "input_field_options": {},
                "status": "enable",
                "required": true,
                "cannot_edit": false,
                "cannot_see": false,
                "is_user_custom_column": false,
                "field_type_option": "select2_field",
                "exclude_place": [],
                "options": {
                    "custom_column_name": "product.name",
                    "display_columns": [
                        "name",
                        "product_no",
                        "product_category.display",
                        "attachment"
                    ],
                    "attributes": {
                        "defaultValue": {
                            "content": [
                                {
                                    "standard_unit_price": "standard_unit_price",
                                    "recommended_unit_price": "standard_unit_price"
                                }
                            ]
                        }
                    }
                },
                "has_number_range": false,
                "number_hidden_type": null
            },
            {
                "id": 3739,
                "name": "text_asset_5deb2a",
                "label": "多选啊2",
                "field_type": "multi_select",
                "category": "uncommon",
                "position": 1,
                "placeholder": null,
                "label_html_options": {},
                "custom_column_name": "text_asset_5deb2a_display",
                "input_field_options": {
                    "collection_options": [
                        {
                            "label": "请选择",
                            "value": "",
                            "related_custom_ids": []
                        },
                        {
                            "label": "d1",
                            "value": "mul_326a",
                            "related_custom_ids": []
                        },
                        {
                            "label": "d2",
                            "value": "mul_e259",
                            "related_custom_ids": []
                        },
                        {
                            "label": "d3",
                            "value": "mul_e985",
                            "related_custom_ids": []
                        }
                    ],
                    "default": []
                },
                "status": "enable",
                "required": false,
                "cannot_edit": false,
                "cannot_see": false,
                "is_user_custom_column": true,
                "field_type_option": "multi_select",
                "exclude_place": [],
                "options": {
                    "select_options": [
                        [
                            "d1",
                            "mul_326a"
                        ],
                        [
                            "d2",
                            "mul_e259"
                        ],
                        [
                            "d3",
                            "mul_e985"
                        ]
                    ],
                    "custom_column_name": "text_asset_5deb2a_display"
                },
                "has_number_range": false,
                "number_hidden_type": null
            },
            {
                "id": 3697,
                "name": "standard_unit_price",
                "label": "标准单价",
                "field_type": "currency_field",
                "category": "common",
                "position": 2,
                "placeholder": null,
                "label_html_options": {},
                "custom_column_name": "standard_unit_price",
                "input_field_options": {},
                "status": "enable",
                "required": false,
                "cannot_edit": true,
                "cannot_see": false,
                "is_user_custom_column": false,
                "field_type_option": "currency_field",
                "exclude_place": [],
                "options": {
                    "custom_column_name": "standard_unit_price",
                    "readonly": true
                },
                "has_number_range": false,
                "number_hidden_type": null
            },
            {
                "id": 3699,
                "name": "recommended_unit_price",
                "label": "售价",
                "field_type": "currency_field",
                "category": "common",
                "position": 4,
                "placeholder": null,
                "label_html_options": {},
                "custom_column_name": "recommended_unit_price",
                "input_field_options": {},
                "status": "enable",
                "required": true,
                "cannot_edit": false,
                "cannot_see": false,
                "is_user_custom_column": false,
                "field_type_option": "currency_field",
                "exclude_place": [],
                "options": {
                    "custom_column_name": "recommended_unit_price"
                },
                "has_number_range": true,
                "number_hidden_type": null
            },
            {
                "id": 3700,
                "name": "quantity",
                "label": "数量",
                "field_type": "number_field",
                "category": "common",
                "position": 5,
                "placeholder": null,
                "label_html_options": {},
                "custom_column_name": "quantity",
                "input_field_options": {
                    "custom_column_name": "quantity",
                    "number_type": "float"
                },
                "status": "enable",
                "required": true,
                "cannot_edit": false,
                "cannot_see": false,
                "is_user_custom_column": false,
                "field_type_option": "float_field",
                "exclude_place": [],
                "options": {
                    "custom_column_name": "quantity",
                    "number_type": "float"
                },
                "has_number_range": true,
                "number_hidden_type": null
            },
            {
                "id": 3701,
                "name": "discount",
                "label": "折扣",
                "field_type": "number_field",
                "category": "common",
                "position": 6,
                "placeholder": null,
                "label_html_options": {},
                "custom_column_name": "discount",
                "input_field_options": {
                    "custom_column_name": "discount",
                    "number_type": "float",
                    "attributes": {
                        "defaultValue": {
                            "optionType": "formula",
                            "content": {
                                "formula": "ROUND([[arg__current__recommended_unit_price:[售价]]]/[[arg__current__standard_unit_price:[标准单价]]], 3)",
                                "variables": [
                                    {
                                        "variable_name": "arg__current__recommended_unit_price",
                                        "field_type": "currency_field",
                                        "label": "售价",
                                        "name": "recommended_unit_price"
                                    },
                                    {
                                        "variable_name": "arg__current__standard_unit_price",
                                        "field_type": "currency_field",
                                        "label": "标准单价",
                                        "name": "standard_unit_price"
                                    }
                                ]
                            }
                        }
                    },
                    "formula_options": {
                        "formula": "ROUND(arg__current__recommended_unit_price/arg__current__standard_unit_price, 3)",
                        "variables": [
                            {
                                "variable_name": "arg__current__recommended_unit_price",
                                "field_type": "currency_field",
                                "label": "售价",
                                "name": "recommended_unit_price"
                            },
                            {
                                "variable_name": "arg__current__standard_unit_price",
                                "field_type": "currency_field",
                                "label": "标准单价",
                                "name": "standard_unit_price"
                            }
                        ],
                        "status": "enable"
                    },
                    "number_format": "percentage"
                },
                "status": "enable",
                "required": false,
                "cannot_edit": false,
                "cannot_see": false,
                "is_user_custom_column": false,
                "field_type_option": "float_field",
                "exclude_place": [],
                "options": {
                    "custom_column_name": "discount",
                    "number_type": "float",
                    "attributes": {
                        "defaultValue": {
                            "optionType": "formula",
                            "content": {
                                "formula": "ROUND([[arg__current__recommended_unit_price:[售价]]]/[[arg__current__standard_unit_price:[标准单价]]], 3)",
                                "variables": [
                                    {
                                        "variable_name": "arg__current__recommended_unit_price",
                                        "field_type": "currency_field",
                                        "label": "售价",
                                        "name": "recommended_unit_price"
                                    },
                                    {
                                        "variable_name": "arg__current__standard_unit_price",
                                        "field_type": "currency_field",
                                        "label": "标准单价",
                                        "name": "standard_unit_price"
                                    }
                                ]
                            }
                        }
                    },
                    "formula_options": {
                        "formula": "ROUND(arg__current__recommended_unit_price/arg__current__standard_unit_price, 3)",
                        "variables": [
                            {
                                "variable_name": "arg__current__recommended_unit_price",
                                "field_type": "currency_field",
                                "label": "售价",
                                "name": "recommended_unit_price"
                            },
                            {
                                "variable_name": "arg__current__standard_unit_price",
                                "field_type": "currency_field",
                                "label": "标准单价",
                                "name": "standard_unit_price"
                            }
                        ],
                        "status": "enable"
                    },
                    "number_format": "percentage"
                },
                "has_number_range": false,
                "number_hidden_type": null
            },
            {
                "id": 3742,
                "name": "discount",
                "label": "折扣",
                "field_type": "number_field",
                "category": "common",
                "position": 6,
                "placeholder": null,
                "label_html_options": {},
                "custom_column_name": "discount",
                "input_field_options": {
                    "custom_column_name": "discount",
                    "number_type": "float",
                    "attributes": {
                        "defaultValue": {
                            "optionType": "formula",
                            "content": {
                                "formula": "ROUND([[arg__current__recommended_unit_price:[售价]]]/[[arg__current__standard_unit_price:[标准单价]]], 3)",
                                "variables": [
                                    {
                                        "variable_name": "arg__current__recommended_unit_price",
                                        "field_type": "currency_field",
                                        "label": "售价",
                                        "name": "recommended_unit_price"
                                    },
                                    {
                                        "variable_name": "arg__current__standard_unit_price",
                                        "field_type": "currency_field",
                                        "label": "标准单价",
                                        "name": "standard_unit_price"
                                    }
                                ]
                            }
                        }
                    },
                    "formula_options": {
                        "formula": "ROUND(arg__current__recommended_unit_price/arg__current__standard_unit_price, 3)",
                        "variables": [
                            {
                                "variable_name": "arg__current__recommended_unit_price",
                                "field_type": "currency_field",
                                "label": "售价",
                                "name": "recommended_unit_price"
                            },
                            {
                                "variable_name": "arg__current__standard_unit_price",
                                "field_type": "currency_field",
                                "label": "标准单价",
                                "name": "standard_unit_price"
                            }
                        ],
                        "status": "enable"
                    },
                    "number_format": "percentage"
                },
                "status": "enable",
                "required": false,
                "cannot_edit": false,
                "cannot_see": false,
                "is_user_custom_column": false,
                "field_type_option": "float_field",
                "exclude_place": [],
                "options": {
                    "custom_column_name": "discount",
                    "number_type": "float",
                    "attributes": {
                        "defaultValue": {
                            "optionType": "formula",
                            "content": {
                                "formula": "ROUND([[arg__current__recommended_unit_price:[售价]]]/[[arg__current__standard_unit_price:[标准单价]]], 3)",
                                "variables": [
                                    {
                                        "variable_name": "arg__current__recommended_unit_price",
                                        "field_type": "currency_field",
                                        "label": "售价",
                                        "name": "recommended_unit_price"
                                    },
                                    {
                                        "variable_name": "arg__current__standard_unit_price",
                                        "field_type": "currency_field",
                                        "label": "标准单价",
                                        "name": "standard_unit_price"
                                    }
                                ]
                            }
                        }
                    },
                    "formula_options": {
                        "formula": "ROUND(arg__current__recommended_unit_price/arg__current__standard_unit_price, 3)",
                        "variables": [
                            {
                                "variable_name": "arg__current__recommended_unit_price",
                                "field_type": "currency_field",
                                "label": "售价",
                                "name": "recommended_unit_price"
                            },
                            {
                                "variable_name": "arg__current__standard_unit_price",
                                "field_type": "currency_field",
                                "label": "标准单价",
                                "name": "standard_unit_price"
                            }
                        ],
                        "status": "enable"
                    },
                    "number_format": "percentage"
                },
                "has_number_range": false,
                "number_hidden_type": null
            },
            {
                "id": 3702,
                "name": "total_price",
                "label": "总价",
                "field_type": "currency_field",
                "category": "common",
                "position": 7,
                "placeholder": null,
                "label_html_options": {},
                "custom_column_name": "total_price",
                "input_field_options": {},
                "status": "enable",
                "required": false,
                "cannot_edit": true,
                "cannot_see": false,
                "is_user_custom_column": false,
                "field_type_option": "currency_field",
                "exclude_place": [],
                "options": {
                    "custom_column_name": "total_price",
                    "readonly": true,
                    "attributes": {
                        "defaultValue": {
                            "optionType": "formula",
                            "content": {
                                "formula": "[[arg__current__recommended_unit_price:[售价]]]*[[arg__current__quantity:[数量]]]",
                                "variables": [
                                    {
                                        "variable_name": "arg__current__recommended_unit_price",
                                        "field_type": "currency_field",
                                        "label": "售价",
                                        "name": "recommended_unit_price"
                                    },
                                    {
                                        "variable_name": "arg__current__quantity",
                                        "field_type": "number_field",
                                        "label": "数量",
                                        "name": "quantity"
                                    }
                                ]
                            }
                        }
                    },
                    "formula_options": {
                        "formula": "arg__current__recommended_unit_price*arg__current__quantity",
                        "variables": [
                            {
                                "variable_name": "arg__current__recommended_unit_price",
                                "field_type": "currency_field",
                                "label": "售价",
                                "name": "recommended_unit_price"
                            },
                            {
                                "variable_name": "arg__current__quantity",
                                "field_type": "number_field",
                                "label": "数量",
                                "name": "quantity"
                            }
                        ],
                        "status": "enable"
                    }
                },
                "has_number_range": false,
                "number_hidden_type": null
            },
            {
                "id": 3703,
                "name": "remark",
                "label": "备注",
                "field_type": "text_area",
                "category": "common",
                "position": 8,
                "placeholder": null,
                "label_html_options": {},
                "custom_column_name": "remark",
                "input_field_options": {},
                "status": "enable",
                "required": false,
                "cannot_edit": false,
                "cannot_see": false,
                "is_user_custom_column": false,
                "field_type_option": "text_area",
                "exclude_place": [],
                "options": {
                    "custom_column_name": "remark"
                },
                "has_number_range": false,
                "number_hidden_type": null
            },
            {
                "id": 581,
                "name": "user_field_asset_a5707e",
                "label": "多选用户啊1",
                "field_type": "multi_user_field",
                "category": "common",
                "position": 9,
                "placeholder": null,
                "label_html_options": {},
                "custom_column_name": "user_field_asset_a5707e_display",
                "input_field_options": {
                    "default": ""
                },
                "status": "enable",
                "required": false,
                "cannot_edit": false,
                "cannot_see": false,
                "is_user_custom_column": true,
                "field_type_option": "multi_user_field",
                "exclude_place": [],
                "options": {
                    "custom_column_name": "user_field_asset_a5707e_display"
                },
                "has_number_range": false,
                "number_hidden_type": null
            },
            {
                "id": 582,
                "name": "text_asset_3268f3",
                "label": "关联产品_文本1",
                "field_type": "text_field",
                "category": "common",
                "position": 10,
                "placeholder": null,
                "label_html_options": {},
                "custom_column_name": "text_asset_3268f3",
                "input_field_options": {},
                "status": "enable",
                "required": false,
                "cannot_edit": false,
                "cannot_see": false,
                "is_user_custom_column": true,
                "field_type_option": "text_field",
                "exclude_place": [],
                "options": {
                    "custom_column_name": "text_asset_3268f3"
                },
                "has_number_range": false,
                "number_hidden_type": null
            }
        ]
    }
}
文档更新时间: 2026-07-02 09:29   作者:曹勇