菜单

保存

基本信息

  • 用途说明:生产领料单保存(单据标识:wg_new_inv_pick_bill)
  • 请求方式:POST
  • 请求地址:https://api.kingdee.com/weigusoft/wg_prd/wg_productionManagementCommonApi?access_token=

请求参数

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

body参数

参数名称 必选 类型 说明
api_name true String 默认-PRD_PICK
api_method_name true String 默认-MODIFY
id true String 编辑时需要传单据id,新增不用
wg_returnstatus true String 退库状态-A:未退库 Z:部分退库 C:全部退库
billno true String 单据编码
billdate true String 单据日期
transtype true String 业务类型-1:自制领料 2:直接领料 3:生产补料
deptid false String 部门
llrid true String 领料人id
llytid false String 领料用途id
cgyid false String 仓管员
storeid false String 仓库
spid false String 仓位
labs false String 标签
entitys false Array[String] 商品分录
exchangerate true String 汇率-默认:1
customfield false Array

表头自定义字段:customfield:[
    {
        "k": "custom_field__1__46x0ymvc5zmxie",
        "v": "测试自定义"
    },
    {
        "k": "custom_field__4__4zun4z79jiasrh",
        "v": "2221201684464471040"
    },
]

说明:

k:自定义字段属性名称

v:字段值(日期类型传时间戳,基础资料类型传对应基础资料id)

entitys的数据结构:

参数名称 类型 必选 说明
Seq String false 顺序
materialid String true 商品id
barcode String false 条形码
stockid String false 仓库id
spid String false 仓位id
baseunit String true 基本单位
unit_id String true 单位
qty Number true 数量
comment String false 备注
auxunitid String false 辅助单位id
auxqty Number false 辅助数量
srcinterid String false 源单id
srcbillno String false 源单单号
srcentryid String false 源单分录内码
src_billdate String false 源单日期
wg_srcorderbillno String false 销售订单号
wg_srcorderinterid String false 订单内码
wg_srcorderentryid String false 订单分录内码
materialunitcost String false 单位直接材料成本
materialcost String false 直接材料成本
entrytranstype String false  
unitcost String false 基本单位成本本位币
recvbaseqty String false 基本单位应收数量
inputcoefficient String false 换算率
coefficient String false 主单位换算率
auxcoefficient String false 辅助单位换算率
wg_returnqty Number false 退料数量
wg_returnbaseqty Number false 基本单位退料数量
wg_project String false 项目
material_customer String false 客户
recvqty Number false 应收数量
baseqty Number false 基本数量
unittype String false 单位类型
auxunittype String false 辅助单位类型
wg_pickqty Number false 应领数量
wg_pickbaseqty Number false 基本应领数量
wg_moproductentryid String false 商品分录内码 领料时需要传
wg_isconsumable Boolean false 选商品时直接领料共耗材料默认勾选
material_entity_lk Array[String] false 联查信息
productid String false 产品id

请求示例

{
    "api_name": "PRD_PICK",
    "api_method_name": "MODIFY",
    "id": "2147238060570468352",//编辑时需要传单据id,新增不用
    "wg_returnstatus": "A",//退库状态
    "billno": "SCLLN-WG-20250210-000001",//单据编码
    "billdate": "2025-02-10",//单据日期
    "transtype": 1,//业务类型
    "deptid": "1697221606960547840",//部门
    "llrid": "2112328019375832064",//领料人
    "llytid": "1763881400118828032",//领料用途id
    "cgyid": "1697009251337127936",//仓管员
    "storeid": "2086365887979382784",//仓库
    "spid": "",//仓位
    "labs": [],//标签
    "entitys": [//商品分录
        {
            "Seq": 1,//排序
            "materialid": "1955930838466160640",//商品id
            "barcode": "",//商品条码
            "stockid": "1976966180547706880",//仓库
            "spid": "1976966244502461440",//仓位
            "baseunit": "1761683272590448640",//基本单位
            "unit_id": "1761683272590448640",//单位
            "qty": 3.01,//数量
            "comment": "",//备注
            "auxunitid": "",//辅助单位
            "auxqty": "0",//辅助数量
            "srcinterid": "2144408782699091968",//源单id
            "srcbillno": "SCJG-WG-20250206-00004",//源单单号
            "srcbilltypeid": "wg_production_process",//源单类型id
            "srcentryid": "2144408908939227137",//源单分录内码
            "src_billdate": "2025-02-06",//源单日期
            "wg_srcorderbillno": "",
            "wg_srcorderinterid": "2144408722628153344",
            "wg_srcorderentryid": "2144408722628154370",
            "materialunitcost": "0",//基本单位直接材料成本
            "materialcost": "0",//直接材料成本
            "entrytranstype": "",
            "unitcost": "0",//基本单位成本本位币
            "recvbaseqty": "",//基本单位应收数量
            "inputcoefficient": "0",//换算率
            "coefficient": "1",//主单位换算率 
            "auxcoefficient": "0",//辅助单位换算率
            "wg_returnqty": "0",//退料数量
            "wg_returnbaseqty": "0",//基本退料数量
            "wg_project": "",//项目
            "material_customer": "",//客户
            "recvqty": "",//应收数量
            "baseqty": "0.01",//基本数量
            "unittype": "0",//单位类型
            "auxunittype": "0",//辅助单位类型
            "wg_pickqty": "0.01",//应领数量
            "wg_pickbaseqty": "0.01",//基本应领数量
            "wg_moproductentryid": "2144408904812058624",//商品分录内码 领料时需要传
            "wg_isconsumable": false, //选商品时直接领料共耗材料默认勾选
            "material_entity_lk": [//联查信息
                {
                    "material_entity_lk_auxqty_old": "0",
                    "material_entity_lk_deffloatqty": "0",
                    "material_entity_lk_auxqty": "0",
                    "material_entity_lk_qty": "0.01",
                    "material_entity_lk_baseqty_old": "0.01",
                    "material_entity_lk_sid": "2144408908939227137",
                    "material_entity_lk_baseqty": "0.01",
                    "material_entity_lk_sbillid": "2144408782699091968",
                    "material_entity_lk_qty_old": "0.01",
                    "id": "0",
                    "material_entity_lk_stableid": "-8038385163725575365",
                    "seq": "1",
                    "material_entity_lk_deffloatqty_old": "0"
                }
            ],
            "productid": "1956637072957638656"
        }
    ],
    "exchangerate": "1",//汇率

   customfield:[//自定义字段
    {
        "k": "custom_field__1__46x0ymvc5zmxie",
        "v": ""
    },
    {
        "k": "custom_field__1__4dxzvxie6muk5y",
        "v": ""
    },
    {
        "k": "custom_field__1__4kepqzvn0u5w",
        "v": "1111"
    },
    {
        "k": "custom_field__1__4oct299h528s",
        "v": ""
    },
    {
        "k": "custom_field__4__4zun22carw7i",
        "v": "0"
    },
    {
        "k": "custom_field__4__4zun3rvxkt2s",
        "v": "2221897456122137600"
    },
    {
        "k": "custom_field__4__4zun4z79jiasrh",
        "v": "2221201393866294272"
    },
    {
        "k": "custom_field__4__4zun6hp4xieleg",
        "v": "2221202033388620800"
    },
    {
        "k": "custom_field__4__4zuo5v7kfgxiea",
        "v": "0"
    },
    {
        "k": "custom_field__4__4zuqe0sjiavcfs",
        "v": "0"
    }
]
}

响应示例

{
    "data": {
        "id": "2147238060570468352"//单据id
    },
    "errorCode": "success",
    "status": true,
    "success": true
}

分享文章
上一个
详情
下一个
生产入库
最近修改: 2025-06-25