菜单

保存

基本信息

  • 用途说明:费用归集据保存接口(单据标识:wg_prd_cost_collect)
  • 请求方式:POST
  • 请求地址:https://api.kingdee.com/weigusoft/wg_cost/saveBill?access_token=?access_token=&authority_info=

headers参数

  • 所有的接口必须携带header参数
参数名称 参数示例 是否必填 参数说明
Content-Type application/json true 固定传:application/json
groupName ns-v7g6 true 分组名称,获取授权信息时返回的groupName
accountId 16xxxxxxxxxxxx true 账套ID,获取授权信息时返回的accountId
X-GW-Router-Addr https://tf.jdy.com true IDC域名,获取授权信息时返回的domain
Appuserid 10102023 true 当前登录用户id

params参数

参数名称 参数类型 是否必填 参数说明
access_token string true 金蝶云通行证token
authority_info string true 见文档authority_info参数说明

body参数

参数名称 必选 类型 说明
entityName true String 单据标识:wg_prd_cost_collect
data true Object 其他参数

data的数据结构:

参数名称 类型 必选 说明
id String true 单据id,修改时必填,新增不传该字段
wg_periodid_id String true 所属期间
wg_costtypeid_id String true 费用类型
wg_billsource String true 数据来源,手动录入:MO
外部引入:WEBIMPORT
内部引入:FROMMATIMMPORT
领料引入:PICK
退料引入:RETURN
报工引入:REPORT
凭证引入:VOUCHER
wg_amount String true 金额
deptid Array false 车间
wg_kdisvmotaskbillno String false 加工单编号
wg_fpmethod String false 分配方式,1:统一分配,2:按车间分配
wg_standard String false 分配标准,1:按完工产量
2:按完工入库材料成本
3:按投入产量
4:按投入材料成本
5:按工时
wg_remark String false 备注
entryentity Array true 源单分录

请求示例

{
    "entityName": "wg_prd_cost_collect",
    "data": {
        "id": "2448081557601245184",
        "wg_periodid_id":"1358196054587080815",
        "wg_billsource":"MO",
        "wg_costtypeid_id":"1646234363148386307",
        "wg_fpmethod":"2",
         "wg_standard":"2",
        "wg_amount":"520",
        "wg_kdisvmotaskbillno":"SCJG-20260317-00003",
        "deptid":[{"number":"BM00004"},{"number":"BM00001"}],//多选基础资料
        "wg_remark":"测试新增",
        "wg_seq":"1",
        "wg_materialid_id": "2116664555018025984",
        "ishavebasedata":"true"//是否包含多选基础资料

    }
}

响应示例

{
    "data": {
        "id": "2448081557601245184"
    },
    "errorCode": "success",
    "status": true,
    "success": true
}

curl:

curl --location --request POST 'https://api.kingdee.com/weigusoft/wg_cost/saveBill?access_token=1773538584aefabf5cdc22dbecbea65d&authority_info=5WrG/TIIn2mBi1i5zjz+p+ochGEpV2UCp+eExRSkMnuQmTSvuzxKWR8RRaynxAog' \ --header 'Appuserid: 10102023' \ --header 'X-GW-Router-Addr: https://tf-ek.jdy.com' \ --header 'access_token: 17667199780d4cbc8ca5cc39910a9df1' \ --header 'accountId: 1675743896569628608' \ --header 'groupName: ns-isv5' \ --header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \ --header 'Content-Type: application/json;charset=UTF-8' \ --header 'Accept: */*' \ --header 'Host: api.kingdee.com' \ --header 'Connection: keep-alive' \ --data-raw '{ "entityName": "wg_prd_cost_collect", "data": { "id": "2448081557601245184", "wg_periodid_id":"1358196054587080815", "wg_billsource":"MO", "wg_costtypeid_id":"1646234363148386307", "wg_fpmethod":"2", "wg_standard":"2", "wg_amount":"520", "wg_kdisvmotaskbillno":"SCJG-20260317-00003", "deptid":[{"number":"BM00004"},{"number":"BM00001"}], "wg_remark":"测试新增", "wg_seq":"1", "wg_materialid_id": "2116664555018025984", "ishavebasedata":"true" } }'

分享文章
最近修改: 2026-04-01