- erpsdk:金蝶云星空(K3Cloud)WebAPI 通用 SDK——账套/组织/AppSecret 登录、 会话复用、单据查询与读写(Save/Submit/Audit/删除/下推/分配/工作流审批)、 分组维护、即时库存、报表取数(分页),内置新旧两套 ERP 站点 - printkit:网络打印机直连(IPP over TLS,无驱动无弹窗)——内置 EPSON L6570/L565,PDF/图片格式化、Excel·WPS 表格按列过滤排版分页、 Validate-Job 干跑校验、设备能力预检与参数降级 - 均按 SDK 形态供给:sdk.json / api.json / pyproject.toml / _selftest.py
28 lines
1.1 KiB
Python
28 lines
1.1 KiB
Python
# -*- coding: utf-8 -*-
|
|
"""erpsdk —— 金蝶云星空 WebAPI 通用能力 SDK。
|
|
|
|
读:
|
|
erp = ErpClient('new').login(username, password)
|
|
rows = erp.bill_query('PUR_PurchaseOrder', 'FBillNo,FDate', filter_string="FDate>='2026-11-01'")
|
|
doc = erp.view('CN_PAYAPPLY', number='FKSQ20261100934')
|
|
rep = erp.report_query('STK_StockSummaryRpt', scheme_id, '2026-10-01', '2026-11-13',
|
|
org_id='100084', stock_codes=['0101010101'])
|
|
|
|
写(引用字段用 ref 构造):
|
|
from erpsdk import ErpClient, ref
|
|
erp.save('CN_PAYAPPLY', {
|
|
'FBILLTYPEID': ref('FKSQ006.0YS'),
|
|
'FDATE': '2026-10-30',
|
|
'FPAYAPPLYENTRY': [{'FCOSTID': ref('0111001'), 'FAPPLYAMOUNTFOR': 2000}],
|
|
})
|
|
erp.submit('CN_PAYAPPLY', numbers=['FKSQ...'])
|
|
"""
|
|
|
|
from .client import (MSG_CODE, SITES, ErpClient, ErpError,
|
|
_ref as ref, _save_options as save_options,
|
|
_staff_ref as staff_ref, _user_ref as user_ref)
|
|
|
|
__version__ = '0.1.5'
|
|
__all__ = ['ErpClient', 'ErpError', 'SITES', 'MSG_CODE',
|
|
'ref', 'staff_ref', 'user_ref', 'save_options', '__version__']
|