POST api/Pos/Busi/Sell/AddOrUpdate
添加或修改一个售货单。注意,售货单仅在初始状态(任何一次付款前,才能被修改)。 提交售货单时,系统将验证其在仓库是否有记录(哪怕是库存为零),没有的不能提交; 其次将验证其在门店是否有报价;当零售价与门价当前价格不一致时,将提交失败; 将验证折后价是否低于最低零售限价,折合价低于此价格时,将提交失败。 需要判断返回值,返回值的errcode=0表示操作成功。
Request Information
URI Parameters
None.
Body Parameters
售货单的信息
PosSellParmName | Description | Type | Additional information |
---|---|---|---|
billnum |
售货单号*/ |
string |
Required Max length: 20 |
shopid |
门店 |
string |
Required Max length: 4 |
hapendate |
发生日期,格式YYYYMMDD。 |
string |
Required Max length: 8 |
happentime |
发生时间,HHmmss |
string |
Required Max length: 6 |
dyzh |
绑定导游的导游证号。 |
string |
Max length: 20 |
busifromtype |
交易来源 1-前台售货,2手机售货,3其他。 |
string |
Required Max length: 1 Min length: 1 |
memory |
备注。 |
string |
Max length: 100 |
memberid |
会员的ID。 |
integer |
None. |
details |
销售的明细记录 |
Collection of PosSellDetailParm |
Required |
Request Formats
application/json, text/json
{ "billnum": "sample string 1", "shopid": "sample string 2", "hapendate": "sample string 3", "happentime": "sample string 4", "dyzh": "sample string 5", "busifromtype": "sample string 6", "memory": "sample string 7", "memberid": 1, "details": [ { "autoid": 1, "productid": 2, "amount": 3.0, "costprice": 4.0, "discountrate": 5.0, "discountbase": 6.0, "retailprice": 7.0, "unit": "sample string 8" }, { "autoid": 1, "productid": 2, "amount": 3.0, "costprice": 4.0, "discountrate": 5.0, "discountbase": 6.0, "retailprice": 7.0, "unit": "sample string 8" } ] }
application/xml, text/xml
<PosSellParm xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Tour.V5.Parm"> <billnum>sample string 1</billnum> <busifromtype>sample string 6</busifromtype> <details> <PosSellDetailParm> <amount>3</amount> <autoid>1</autoid> <costprice>4</costprice> <discountbase>6</discountbase> <discountrate>5</discountrate> <productid>2</productid> <retailprice>7</retailprice> <unit>sample string 8</unit> </PosSellDetailParm> <PosSellDetailParm> <amount>3</amount> <autoid>1</autoid> <costprice>4</costprice> <discountbase>6</discountbase> <discountrate>5</discountrate> <productid>2</productid> <retailprice>7</retailprice> <unit>sample string 8</unit> </PosSellDetailParm> </details> <dyzh>sample string 5</dyzh> <hapendate>sample string 3</hapendate> <happentime>sample string 4</happentime> <memberid>1</memberid> <memory>sample string 7</memory> <shopid>sample string 2</shopid> </PosSellParm>
application/x-www-form-urlencoded
Sample not available.
application/bson
Binary JSON content. See http://bsonspec.org for details.
Response Information
Resource Description
添加或修改一个售货单。注意,售货单仅在初始状态(任何一次付款前,才能被修改)。 提交售货单时,系统将验证其在仓库是否有记录(哪怕是库存为零),没有的不能提交; 其次将验证其在门店是否有报价;当零售价与门价当前价格不一致时,将提交失败; 将验证折后价是否低于最低零售限价,折合价低于此价格时,将提交失败。 需要判断返回值,返回值的errcode=0表示操作成功。
CommonOperationResultName | Description | Type | Additional information |
---|---|---|---|
errcode |
错误代码,通常0表示成功,其他值表示错误。 |
integer |
None. |
errmsg |
错误描述,当errcode不为零时,此值可以用于呈现给用户。 |
string |
None. |
tag |
操作同时,服务器端需要返回的其他值。 |
string |
None. |
Response Formats
application/json, text/json
{ "errcode": 1, "errmsg": "sample string 2", "tag": "sample string 3" }
application/xml, text/xml
<CommonOperationResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer"> <errcode>1</errcode> <errmsg>sample string 2</errmsg> <tag>sample string 3</tag> </CommonOperationResult>
application/bson
Binary JSON content. See http://bsonspec.org for details.