saveBill自定义字段保存步骤
1、调用金蝶自定义字段查询接口,entity_number传对应单据的单据标识

2、获取到自定义字段的number属性

3、保存方式:直接传自定义字段的number值,如果自定义字段是基础资料类的,则再number后面加 _id,传基础资料的id值

请求示例:
{
"entityName": "wg_utility_bill",
"data": {
"id": "2255943233924349952",
"wg_biztype": "3",
"billdate": "2025-07-10",
"wg_utility_reason": "0710测试",
"wg_beardept_id": "1697221606960547840",
"wg_projectno_id": "",
"wg_fileslevel_id": "",
"customerid_id": "",
"wg_applicant_id": "1697009251337127936",
"wg_startdate": "",
"wg_enddate": "",
"remark": "",
"material_entity": [
{
"wg_consumeid_id": "2213176756452464640",
"wg_paytype_id": "2213034752443747328",
"wg_paytype_name": "BFT费用",
"allamount": "100",
"wg_taxexcluded": 100,
"wg_mremark": "",
"wg_attach_size": "2",
"wg_invoice_size": "0",
"wg_taxrate": "0",
"wg_offsetloan_amount": 0,
"wg_unoffsetloan_amount": "100.000000",
"allamountfor": "100"
}
],
"wg_offset_loan": [],
"currencyid_id": "100000",
"exchangerate": "1",
"totalamount": 100,
"custom_field__1__3w34a7wi588f": "11",
"custom_field__1__4oct299h528s": "",
"custom_field__4__4ugdyhgk8qjiatkh_id": "2177536279506330624",
"custom_field__5__51cn2jk3y5pw_id": "2254377811710143490"
}
}
curL:
curl ^"https://api.kingdee.com/weigusoft/wg_cost/saveBill?access_token=1751589696b6fadec8ca66f4bff7eece^&authority_info=80YVhAfnQaOYK7vgQL1NZOCzmT9slfIZW8j01JnRwGPlJhpCXkVtaJW70RN/XQPn^" ^
-H ^"Accept: */*^" ^
-H ^"Accept-Language: zh-CN,zh;q=0.9^" ^
-H ^"Appuserid: 10102023^" ^
-H ^"Connection: keep-alive^" ^
-H ^"Content-Type: application/json;charset=UTF-8^" ^
-H ^"Origin: http://localhost:5173^" ^
-H ^"Referer: http://localhost:5173/^" ^
-H ^"Sec-Fetch-Dest: empty^" ^
-H ^"Sec-Fetch-Mode: cors^" ^
-H ^"Sec-Fetch-Site: cross-site^" ^
-H ^"User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1^" ^
-H ^"X-GW-Router-Addr: https://tf.jdy.com^" ^
-H ^"access_token: 1751589696b6fadec8ca66f4bff7eece^" ^
-H ^"accountId: 1683187060740048426^" ^
-H ^"groupName: ns-f51c^" ^
--data-raw ^"^{^\^"entityName^\^":^\^"wg_utility_bill^\^",^\^"data^\^":^{^\^"id^\^":^\^"2255943233924349952^\^",^\^"wg_biztype^\^":^\^"3^\^",^\^"billdate^\^":^\^"2025-07-10^\^",^\^"wg_utility_reason^\^":^\^"0710^测^试^\^",^\^"wg_beardept_id^\^":^\^"1697221606960547840^\^",^\^"wg_projectno_id^\^":^\^"^\^",^\^"wg_fileslevel_id^\^":^\^"^\^",^\^"customerid_id^\^":^\^"^\^",^\^"wg_applicant_id^\^":^\^"1697009251337127936^\^",^\^"wg_startdate^\^":^\^"^\^",^\^"wg_enddate^\^":^\^"^\^",^\^"remark^\^":^\^"^\^",^\^"material_entity^\^":^[^{^\^"wg_consumeid_id^\^":^\^"2213176756452464640^\^",^\^"wg_paytype_id^\^":^\^"2213034752443747328^\^",^\^"wg_paytype_name^\^":^\^"BFT^费^用^\^",^\^"allamount^\^":^\^"100^\^",^\^"wg_taxexcluded^\^":100,^\^"wg_mremark^\^":^\^"^\^",^\^"wg_attach_size^\^":^\^"2^\^",^\^"wg_invoice_size^\^":^\^"0^\^",^\^"wg_taxrate^\^":^\^"0^\^",^\^"wg_offsetloan_amount^\^":0,^\^"wg_unoffsetloan_amount^\^":^\^"100.000000^\^",^\^"allamountfor^\^":^\^"100^\^"^}^],^\^"wg_offset_loan^\^":^[^],^\^"currencyid_id^\^":^\^"100000^\^",^\^"exchangerate^\^":^\^"1^\^",^\^"totalamount^\^":100,^\^"custom_field__1__3w34a7wi588f^\^":^\^"11^\^",^\^"custom_field__1__4oct299h528s^\^":^\^"^\^",^\^"custom_field__4__4ugdyhgk8qjiatkh_id^\^":^\^"2177536279506330624^\^",^\^"custom_field__5__51cn2jk3y5pw_id^\^":^\^"2254377811710143490^\^"^}^}^"