开放平台

简要描述:

  • 创建采购单

请求URL:

  • http://lbl-open.thinkerx.com/api/lbl/methods/storePurchase

请求方式:

  • POST

参数:


参数名
必选类型说明
login_tokenstring通行证
factory_idstring单库工厂必填id
handlerstring操作人
group_codestring关联合同编号
dataarray板材信息, 详见json


请求示例


{
    "handler":"admin", // 操作人
    "group_code":"YX20260115-1", // 关联合同号
    "data": {
        "purchase": {
            "supplier_id": "14", // 经销商id
            "note": "12", // 备注 
            "order_time": "2026-01-15 14:01:16", // 下单时间
            "due_time": "2026-01-22", // 预计到场时间
            "currency_name": "undefined", 
            "currency_id": "0", //币种 默认0
            "ws_gst": "", // 税
            "money_without_gst": "524.047", // 扣税金额
            "money_sum": "524.047", // 未扣税金额
            "money_sum_zh": "伍佰贰拾肆元零伍分", // 大写金额
            "purchase_type": "0"
        },
        "one": {
            "bar":[], // 型材  结构都相同
            "glass":[], // 玻璃纱网
            "addon":[], // 配件
            "panel": [ //板材
                {
                    "id": "0",
                    "bom_id": "49", // 材料id
                    "wh_which": "panel", // 类型 同上面的key
                    "wpc_id": "",   // 接口带入,下面除了备注的都带入
                    "carQuantity": "0", //  接口带入
                    "wapd_id": "",
                    "oids": "",
                    "price": "167.97",
                    "money_sum": "500.047",
                    "wh_type": "face", // 采购方式 face:面积 count:数量
                    "quantity": "1", // 数量
                    "aluminum_price": "0", 
                    "process_charge": "0",
                    "total_weight": "0", // 重量
                    "supplier_code": "",
                    "note": "", // 备注
                    "priority": "0",
                    "gross": "2.977", 
                    "calculate_type": "0",
                    "back_date": "2026-01-22",
                    "conversion_quantity": "",
                    "theory_gross": "2.977",
                    "edge_length": "0"
                }
            ],
            "other": [ // 其他物料
                {
                    "id": "0",
                    "bom_id": "13",
                    "wh_which": "other",
                    "wpc_id": "",
                    "carQuantity": "0",
                    "wapd_id": "",
                    "oids": "",
                    "price": "12",
                    "money_sum": "24",
                    "quantity": "2",
                    "aluminum_price": "0",
                    "process_charge": "0",
                    "total_weight": "0",
                    "supplier_code": "",
                    "note": "",
                    "priority": "1",
                    "gross": "2",
                    "calculate_type": "0",
                    "back_date": "2026-01-22",
                    "conversion_quantity": "",
                    "theory_gross": "2",
                    "edge_length": "0"
                }
            ]
        }
    },
    "purchase_code": ""  // 自定义订单号
}

返回示例

{
    "return": 0,
    "error": "",
    "data": [
        
    ]
}

返回参数说明

参数名类型说明
statusint状态码 0成功 1失败
messagestr返回信息
dataarray账号数据












新格尔累计为
7368555
位用户提供服务

客服热线

联系电话:400-1567-080

微信咨询

扫码在线咨询
企微官网客服在线随时答复

公众号

扫一扫
关注官方公众号

抖音号

扫一扫
关注官方抖音号