API中心

  1. 销售管理
  2. 销售订单
返回

销售订单修改

接口所在U8C版本:U8 cloud3.0以及更高版本
详细描述:表体行号crowno必填,根据行号查到原单据的表体行,然后只需传要修改的字段。表体行状态vostatus必填,修改传update,删除行传delete。
API视频讲解API详情补丁列表常见问题参考
接口地址
请求方式
请求参数header
请求参数body
返回类型参数
代码示例
请求参数示例
正确返回示例
错误返回示例
接口地址:http://ip:port/u8cloud/api/so/saleorder/update

参数填写指南

请求方式:POST

请求参数(header):

参数填写指南
参数名必填描述默认值
Content-Type请求体数据类型application/json
usercode用户
password密码
trantype翻译类型,按编码为code,不需要翻译为pkcode
system系统参数

请求参数(body):

参数名类型是否数组必填描述默认值
saleorder销售订单实体
childrenvo销售订单子实体
blargessflagdouble是否赠品
cadvisecalbodyidstring发货库存组织(填写此属性需要同时填写【发货公司】)
cbatchidstring批次号
cbodywarehouseidstring发货仓库(填写此属性需要同时填写【发货公司】)
cconsigncorpidstring发货公司
ccurrencytypeidstring币种
cinventoryidstring存货
corder_bidstring明细主键(修改/删除明细时必填)
cpackunitidstring辅单位
cprojectidstring项目
crecaddrnodestring收货地点
creccalbodyidstring收货库存组织
creceiptareaidstring收货地区
creceiptcorpidstring收货单位
creceipttypestring来源单据类型
crecwareidstring收货仓库
crownostring行号
csourcebillbodyidstring来源单据行id
csourcebillcodestring来源单据号
csourcebillidstring来源单据id
dconsigndatestring计划发货日期
ddeliverdatestring要求收货日期
frownotestring行备注
nestbalancenumberstring累计暂估应收数量
nexchangeotobratedouble折本汇率
nitemdiscountratedouble单品折扣
nnumberdouble数量
noriginalcurdiscountmnydouble折扣额
noriginalcurmnydouble无税金额
noriginalcurnetpricedouble无税净价
noriginalcurpricedouble无税单价
noriginalcursummnydouble价税合计(3.2及其之前此字段必填,想不必填提DSP工单)
noriginalcurtaxmnydouble税额
noriginalcurtaxnetpricedouble含税净价
noriginalcurtaxpricestring含税单价
npacknumberdouble辅数量
ntaxratedouble税率
ntotalbalancenumberstring累计应收确认数量
ntotalinventorynumberstring累计出库数量
ntotalinvoicenumberstring累计开票数量
ntotalreceivenumberstring累计发货数量
ntotlbalcostnumstring累计成本结算数量
pk_defdoc1string自定义1(统计类型传)
pk_defdoc10string自定义10(统计类型传)
pk_defdoc11string自定义11(统计类型传)
pk_defdoc12string自定义12(统计类型传)
pk_defdoc13string自定义13(统计类型传)
pk_defdoc14string自定义14(统计类型传)
pk_defdoc15string自定义15(统计类型传)
pk_defdoc16string自定义16(统计类型传)
pk_defdoc17string自定义17(统计类型传)
pk_defdoc18string自定义18(统计类型传)
pk_defdoc19string自定义19(统计类型传)
pk_defdoc2string自定义2(统计类型传)
pk_defdoc20string自定义20(统计类型传)
pk_defdoc3string自定义3(统计类型传)
pk_defdoc4string自定义4(统计类型传)
pk_defdoc5string自定义5(统计类型传)
pk_defdoc6string自定义6(统计类型传)
pk_defdoc7string自定义7(统计类型传)
pk_defdoc8string自定义8(统计类型传)
pk_defdoc9string自定义9(统计类型传)
vdef1string自定义项1(除统计类型外用这个字段)
vdef10string自定义项10(除统计类型外用这个字段)
vdef11string自定义项11(除统计类型外用这个字段)
vdef12string自定义项12(除统计类型外用这个字段)
vdef13string自定义项13(除统计类型外用这个字段)
vdef14string自定义项14(除统计类型外用这个字段)
vdef15string自定义项15(除统计类型外用这个字段)
vdef16string自定义项16(除统计类型外用这个字段)
vdef17string自定义项17(除统计类型外用这个字段)
vdef18string自定义项18(除统计类型外用这个字段)
vdef19string自定义项19(除统计类型外用这个字段)
vdef2string自定义项2(除统计类型外用这个字段)
vdef20string自定义项20(除统计类型外用这个字段)
vdef3string自定义项3(除统计类型外用这个字段)
vdef4string自定义项4(除统计类型外用这个字段)
vdef5string自定义项5(除统计类型外用这个字段)
vdef6string自定义项6(除统计类型外用这个字段)
vdef7string自定义项7(除统计类型外用这个字段)
vdef8string自定义项8(除统计类型外用这个字段)
vdef9string自定义项9(除统计类型外用这个字段)
vfree1string自由项1
vfree2string自由项2
vfree3string自由项3
vfree4string自由项4
vfree5string自由项5
vostatusstring状态(调用修改接口时使用,传值:修改时update、删除时delete、新增时new)
vreceiveaddressstring收货地址
vsourcerownostring来源单据行号
parentvo销售订单主实体
bretinvflagstring退货标记(Y / N)
cbiztypestring业务流程
ccalbodyidstring库存组织
ccurrencytypeidstring币种(5.0sp开始支持)
ccustomeridstring客户
cdeptidstring部门
cemployeeidstring业务员
cfreecustidstring散户
coperatoridstring制单人
creceiptareaidstring收货地区
creceiptcorpidstring开票单位
creceiptcustomeridstring收货单位
csalecorpidstring销售组织
ctermprotocolidstring收款协议
ctransmodeidstring运输方式
cwarehouseidstring仓库
dapprovedatestring审核日期(3.6版本开始支持))
dbilldatestring单据日期
ndiscountratedouble整单折扣
nheadsummnystring整单价税合计
pk_corpstring公司
pk_defdoc1string自定义项1(统计型自定义项用此传编码)
pk_defdoc10string自定义项10
pk_defdoc11string自定义项11
pk_defdoc12string自定义项12
pk_defdoc13string自定义项13
pk_defdoc14string自定义项14
pk_defdoc15string自定义项15
pk_defdoc16string自定义项16
pk_defdoc17string自定义项17
pk_defdoc18string自定义项18
pk_defdoc19string自定义项19
pk_defdoc2string自定义项2
pk_defdoc20string自定义项20
pk_defdoc3string自定义项3
pk_defdoc4string自定义项4
pk_defdoc5string自定义项5
pk_defdoc6string自定义项6
pk_defdoc7string自定义项7
pk_defdoc8string自定义项8
pk_defdoc9string自定义项9
vdef1string自定义项1(备注型自定义项用此传值)
vdef10string自定义项10(备注型自定义项用此传值)
vdef11string自定义项11(备注型自定义项用此传值)
vdef12string自定义项12(备注型自定义项用此传值)
vdef13string自定义项13(备注型自定义项用此传值)
vdef14string自定义项14(备注型自定义项用此传值)
vdef15string自定义项15(备注型自定义项用此传值)
vdef16string自定义项16(备注型自定义项用此传值)
vdef17string自定义项17(备注型自定义项用此传值)
vdef18string自定义项18(备注型自定义项用此传值)
vdef19string自定义项19(备注型自定义项用此传值)
vdef2string自定义项2(备注型自定义项用此传值)
vdef20string自定义项20(备注型自定义项用此传值)
vdef3string自定义项3(备注型自定义项用此传值)
vdef4string自定义项4(备注型自定义项用此传值)
vdef5string自定义项5(备注型自定义项用此传值)
vdef6string自定义项6(备注型自定义项用此传值)
vdef7string自定义项7(备注型自定义项用此传值)
vdef8string自定义项8(备注型自定义项用此传值)
vdef9string自定义项9(备注型自定义项用此传值)
vnotestring备注
vreceiptcodestring单据号
vreceiveaddressstring收货地址

返回类型参数:

参数名类型是否数组必填描述默认值
SaleOrderVO销售订单保存后返回VO
children
advisecalbody_codestring发货库存组组织code
advisecalbody_namestring发货库存组组织name
bbindflagstring是否捆绑存货
bdericttransstring是否直运
blargessflagstring是否赠品
boosflagstring缺货标志
breturnprofitstring是否参与返利
bsafepricestring是否参与价保
bsupplyflagstring补货标志
cadvisecalbodyidstring建议发货库存组织
cbatchidstring批次
cbatchid string批次
cbodywarehouseidstring发货仓库主键
cbomorderidstring配置单ID
cchantypeidstring渠道类型ID
cconsigncorpidstring发货公司
ccurrencytypeidstring原币
cfactoryidstring工厂ID
cfreezeidstring库存冻结ID
cinvbasdocidstring存货档案主键
cinventoryidstring存货ID
cinventoryid1string存货ID1
clargessrownostring主存货行号
consigncorp_codestring发货公司code
consigncorp_namestring发货公司name
coperatoridstring制单人
corder_bidstring销售订单附表ID
cpackunitidstring辅单位
cpricecalprocstring价格计算过程
cpriceitemidstring价格项目ID
cpriceitemtablestring价目表
cpricepolicyidstring价格政策ID
cprolineidstring产品线
cprovideridstring供应商
cquoteunitidstring报价计量单位
crecaddrnodestring收货地点
creccalbodyidstring收货库存组织
creceiptareaidstring收货地区
creceiptcorpidstring收货单位
creceipttypestring来源单据类型(V5.1开始支持)
crecwareidstring收货仓库
crownostring行号
csaleidstring销售主表ID
csourcebillbodyidstring来源单据附表ID(V5.1开始支持)
csourcebillidstring来源单据主表ID(V5.1开始支持)
ct_managebidstring合同行ID
ct_manageidstring合同ID
cunitidstring主计量单位
dconsigndatestring发货日期
ddeliverdatestring交货日期
dept_codestring部门code
dept_namestring部门name
drint删除标志
fbatchstatusint批次状态
frownotestring行备注
frowstatusint行状态
inventory_codestring存货code
inventory_namestring存货name
nastretprofnumdouble已参与返利辅数量
nasttaldcnumdouble已参与价保辅数量
ndiscountmnydouble本币折扣额
ndiscountratedouble整单折扣
nestbalancenumberstring累计暂估应收
nexchangeotobratedouble折本汇率
nitemdiscountratedouble单品折扣率
nmnydouble本币无税金额
nnetpricedouble本币无税净价
nnumberdouble数量
norgqtnetprcdouble报价单位无税净价
norgqtprcdouble报价单位无税单价
norgqttaxnetprcdouble报价单位含税净价
norgqttaxprcdouble报价单位含税单价
noriginalcurdiscountmnydouble原币折扣额
noriginalcurmnydouble原币无税金额
noriginalcurnetpricedouble原币无税净价
noriginalcurpricedouble原币无税单价
noriginalcursummnydouble原币价税合计
noriginalcurtaxmnydouble原币税额
noriginalcurtaxnetpricedouble原币含税净价
noriginalcurtaxpricedouble原币含税单价
npacknumberdouble辅数量
npricedouble本币无税单价
nqtnetprcdouble报价单位本币无税净价
nqtorgnetprcdouble询价原币无税净价
nqtorgprcdouble询价原币无税单价
nqtorgtaxnetprcdouble询价原币含税净价
nqtorgtaxprc double询价原币含税单价
nqtprcdouble报价单位本币无税单价
nqttaxnetprcdouble报价单位本币含税净价
nqttaxprcdouble报价单位本币含税单价
nquoteunitnumdouble报价单位数量
nquoteunitratedouble报价计量单位换算率
nretprofmnydouble返利金额
nretprofnumdouble已参与返利主数量
nreturntaxratedouble出口退税率
nsummnydouble本币价税合计
ntaldcmnydouble价保金额
ntaldcnumdouble已参与价保主数量
ntaxmnydouble本币税额
ntaxnetpricedouble本币含税净价
ntaxpricedouble本币含税单价
ntaxratedouble税率
ntotalbalancenumberstring累计应收确认数量
ntotalinventorynumberstring累计出库
ntotalinvoicenumberstring累计开票
ntotalpaymnystring累计收款金额
ntotalreceivenumberstring累计发货数量
ntotlbalcostnumstring累计成本结算数量
packunit_codestring辅单位code
packunit_namestring辅单位name
pk_corpstring公司主键
recaddrnode_codestring收货地点code
recaddrnode_namestring收货地点name
receiptarea_codestring收货地区code
receiptarea_namestring收货地区name
receiptcorp_codestring开票单位code
receiptcorp_namestring开票单位name
tconsigntimestring发货时间
tdelivertimestring到货时间
tsstring时间戳
unit_codestring单位code
unit_namestring单位name
veditreasonstring修订理由
vreceiveaddressstring收货地址
warehouse_codestring发货仓库code
warehouse_namestring发货仓库name
parent
approver_codestring审批人code
approver_namestring审批人name
bcooptopostring是否已协同生成采购订单
bfreecustflagstring是否散户
binitflagstring期初标志
binvoicendflagstring开票关闭标记
biztype_codestring业务类型code
biztype_namestring业务类型name
boutendflagstring出库关闭标记
boverdatestring是否超帐期
bpayendflagstring付款关闭标记
bpocooptomestring是否由采购订单协同生成
breceiptendflagstring发货关闭标记
bretinvflagstring退货标记
btransendflagstring运输关闭标志
calbody_codestring库存组织code
calbody_namestring库存组织name
capproveidstring审批人
cbaltypeidstring结算方式
cbiztypestring业务类型
ccalbodyidstring库存组织
ccooppohidstring对方订单号
ccreditnumstring信用证号
ccustbankidstring开户银行
ccustomeridstring客户
cdeptidstring部门
cemployeeidstring业务员
cfreecustidstring散户ID
coperatoridstring制单人
corp_codestring公司code
corp_namestring公司name
creceiptareaidstring收货地区
creceiptcorpidstring开票单位
creceiptcustomeridstring收货单位
creceipttypestring单据类型
csalecorpidstring销售组织
csaleidstring销售主表ID
ctermprotocolidstring收款协议
ctransmodeidstring运输方式
customer_codestring客户code
customer_namestring客户name
cwarehouseidstring仓库
dapprovedatestring审批日期
daudittimestring审批时间
dbilldatestring日期
dbilltimestring制单时间
dept_codestring部门code
dept_namestring部门name
dmakedatestring制单日期
dmoditimestring最后修改时间
drint删除标志
editauthorstring修订人
editdatestring修订日期
editionnumstring修订版本号
employee_codestring业务员code
employee_namestring业务员name
finvoiceclassdouble发票类别
finvoicetypedouble发票类型
fstatusdouble状态
ibalanceflagdouble结算标志
iprintcountstring打印次数
naccountperioddouble帐期
ndiscountratedouble整单折扣
nevaluatecarriagedouble预估运费
nheadsummnydouble金额合计
npreceivemnydouble预收款金额
npreceiveratedouble预收款比例
nsubscriptiondouble订金
operator_codestring制单人code
operator_namestring制单人name
pk_corpstring公司
pk_defdoc1string自定义项1
pk_defdoc10string自定义项10
pk_defdoc11string自定义项11
pk_defdoc12string自定义项12
pk_defdoc13string自定义项13
pk_defdoc14string自定义项14
pk_defdoc15string自定义项15
pk_defdoc16string自定义项16
pk_defdoc17string自定义项17
pk_defdoc18string自定义项18
pk_defdoc19string自定义项19
pk_defdoc2string自定义项2
pk_defdoc20string自定义项20
pk_defdoc3string自定义项3
pk_defdoc4string自定义项4
pk_defdoc5string自定义项5
pk_defdoc6string自定义项6
pk_defdoc7string自定义项7
pk_defdoc8string自定义项8
pk_defdoc9string自定义项9
receiptarea_codestring收货地区code
receiptarea_namestring收货地区name
receiptcorp_codestring开票单位code
receiptcorp_namestring开票单位name
receiptcustomer_codestring收货单位code
receiptcustomer_namestring收货单位name
salecorp_codestring销售组织code
salecorp_namestring销售组织name
transmode_codestring运输方式code
transmode_namestring运输方式name
tsstring时间戳
vaccountyearstring会计年度
vdef1string自定义项1
vdef10string自定义项10
vdef11string自定义项11
vdef12string自定义项12
vdef13string自定义项13
vdef14string自定义项14
vdef15string自定义项15
vdef16string自定义项16
vdef17string自定义项17
vdef18string自定义项18
vdef19string自定义项19
vdef2string自定义项2
vdef20string自定义项2-
vdef3string自定义项3
vdef4string自定义项4
vdef5string自定义项5
vdef6string自定义项6
vdef7string自定义项7
vdef8string自定义项8
vdef9string自定义项9
veditreasonstring修订理由
vnotestring备注
vreceiptcodestring单据号
vreceiveaddressstring收货地址

请求参数示例:

#常规示例#增删行示例

复制代码

#
{"saleorder":[{"childrenvo":[{"crowno":"10","vostatus":"update","cconsigncorpid":"1000","cadvisecalbodyid":"1000","cbodywarehouseid":"1","cinventoryid":"1103","nnumber":"50","noriginalcurprice":"111"}],"parentvo":{"ccustomerid":"C1014","pk_corp":"1000","cbiztype":"so81","coperatorid":"18242366050","cdeptid":"107","vreceiptcode":"SO10002101293074"}}]}

正确返回示例:

复制代码

{
    "status": "success",
    "data": "[{\"parentvo\":{\"pk_corp\":\"1001\",\"corp_code\":\"1000\",\"corp_name\":\"天海总公司\",\"cbiztype\":\"1001121000000000433A\",\"biztype_code\":\"so81\",\"biztype_name\":\"30-4331-4c\",\"ccustomerid\":\"000111100000000008R2\",\"customer_code\":\"C1014\",\"customer_name\":\"沈阳康贝商贸有限公司\",\"csalecorpid\":\"00011110000000000999\",\"salecorp_code\":\"1001\",\"salecorp_name\":\"天海销售总公司销售组织\",\"ccalbodyid\":\"100111100000000000OQ\",\"calbody_code\":\"1000\",\"calbody_name\":\"天海集团库存组织\",\"coperatorid\":\"00011310000000007F1O\",\"operator_code\":\"18242366050\",\"operator_name\":\"刘云祥\",\"cdeptid\":\"100111100000000000PD\",\"dept_code\":\"107\",\"dept_name\":\"销售部门\",\"vreceiptcode\":\"SO10002101293074\",\"dbilldate\":\"2021-01-29\",\"dmakedate\":\"2021-01-29\",\"dbilltime\":\"2021-01-29 10:40:23\",\"dmoditime\":\"2021-01-29 10:40:23\",\"creceiptcustomerid\":\"000111100000000008R2\",\"receiptcustomer_code\":\"C1014\",\"receiptcustomer_name\":\"沈阳康贝商贸有限公司\",\"creceiptcorpid\":\"000111100000000008R2\",\"receiptcorp_code\":\"C1014\",\"receiptcorp_name\":\"沈阳康贝商贸有限公司\",\"ndiscountrate\":100,\"csaleid\":\"100112100000000062L9\",\"ts\":\"2021-01-29 10:40:24\",\"fstatus\":\"1\",\"dr\":\"0\",\"nheadsummny\":6493.5,\"bretinvflag\":false,\"boutendflag\":false,\"breceiptendflag\":false},\"childrenvo\":[{\"cinventoryid\":\"00011210000000003O06\",\"inventory_code\":\"1103\",\"inventory_name\":\"稻香村\",\"nnumber\":50,\"noriginalcursummny\":6493.5,\"cunitid\":\"000111100000000006JB\",\"unit_code\":\"11\",\"unit_name\":\"盒\",\"cdeptid\":\"100111100000000000PD\",\"dept_code\":\"107\",\"dept_name\":\"销售部门\",\"csalecorpid\":\"00011110000000000999\",\"creceiptcorpid\":\"000111100000000008R2\",\"receiptcorp_code\":\"C1014\",\"receiptcorp_name\":\"沈阳康贝商贸有限公司\",\"cadvisecalbodyid\":\"100111100000000000OQ\",\"cbodywarehouseid\":\"10011210000000001E5N\",\"blargessflag\":false,\"noriginalcurprice\":111,\"crowno\":\"10\",\"ntaxrate\":17,\"noriginalcurtaxprice\":129.87,\"noriginalcurmny\":5550,\"noriginalcurtaxmny\":943.5,\"ndiscountrate\":100,\"nitemdiscountrate\":100,\"noriginalcurnetprice\":111,\"noriginalcurtaxnetprice\":129.87,\"noriginalcurdiscountmny\":0,\"dconsigndate\":\"2021-01-29\",\"ddeliverdate\":\"2021-01-29\",\"cquoteunitid\":\"000111100000000006JB\",\"cquoteunit_code\":\"11\",\"cquoteunit_name\":\"盒\",\"csaleid\":\"100112100000000062L9\",\"corder_bid\":\"100112100000000062LA\",\"ts\":\"2021-01-29 10:40:24\"}]}]",
    "taskNumber": "202101290018"
}

错误返回示例:

复制代码

{
    "status": "falied",
    "errorcode": "-32000",
    "errormsg": "U8C返回信息:[单据号:SO10002101293074,csaleid:100112100000000062L9]的单据不是自由态,不能修改!",
    "taskNumber": "202101290019"
}