POST jxc_api/PurchaseOrder/Add

Request Information

URI Parameters

None.

Body Parameters

PurchaseOrderEditModel
NameDescriptionTypeAdditional information
Id

integer

None.

No

string

None.

VendId

integer

None.

Purchaser

integer

None.

Date

date

None.

DeliveryDate

date

None.

BType

BillType

None.

DiscRate

decimal number

None.

DiscAmount

decimal number

None.

Amount

decimal number

None.

PrintCount

integer

None.

AcId

integer

None.

AmountFirst

decimal number

None.

Note

string

None.

AccountingItemId

integer

None.

PayInfoItems

Collection of PayEditModel

None.

DepartmentId

integer

None.

AutoGenerate

boolean

None.

Items

Collection of PurchaseOrderEntryEditModel

None.

SettlePeriodId

integer

None.

SettlePeriodName

string

None.

SettlePeriodDate

date

None.

InvoiceType

integer

None.

InvoiceTypeName

string

None.

NeedJudgePrice

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "No": "sample string 2",
  "VendId": 3,
  "Purchaser": 4,
  "Date": "2024-11-24 17:25:35",
  "DeliveryDate": "2024-11-24 17:25:35",
  "BType": 1010,
  "DiscRate": 7.0,
  "DiscAmount": 8.0,
  "Amount": 9.0,
  "PrintCount": 10,
  "AcId": 11,
  "AmountFirst": 12.0,
  "Note": "sample string 13",
  "AccountingItemId": 14,
  "PayInfoItems": [
    {
      "AcId": 1,
      "Amount": 2.0,
      "PayMethod": 3,
      "RefNo": "sample string 4"
    },
    {
      "AcId": 1,
      "Amount": 2.0,
      "PayMethod": 3,
      "RefNo": "sample string 4"
    }
  ],
  "DepartmentId": 15,
  "AutoGenerate": true,
  "Items": [
    {
      "Id": 1,
      "PoId": 2,
      "ProdId": 3,
      "ApId": 4,
      "WhId": 5,
      "UnitId": 6,
      "QTY": 7.0,
      "Price": 8.0,
      "PriceTax": 9.0,
      "DiscRate": 10.0,
      "DiscAmount": 11.0,
      "DiscAllocation": 12.0,
      "Amount": 13.0,
      "TaxRate": 14.0,
      "Tax": 15.0,
      "AmountTax": 16.0,
      "Note": "sample string 17",
      "StrValue1": "sample string 18",
      "StrValue2": "sample string 19",
      "StrValue3": "sample string 20",
      "StrValue4": "sample string 21",
      "StrValue5": "sample string 22",
      "StrValue6": "sample string 23",
      "StrValue7": "sample string 24",
      "StrValue8": "sample string 25",
      "SoId": 26,
      "SoNo": "sample string 27",
      "SoeId": 28
    },
    {
      "Id": 1,
      "PoId": 2,
      "ProdId": 3,
      "ApId": 4,
      "WhId": 5,
      "UnitId": 6,
      "QTY": 7.0,
      "Price": 8.0,
      "PriceTax": 9.0,
      "DiscRate": 10.0,
      "DiscAmount": 11.0,
      "DiscAllocation": 12.0,
      "Amount": 13.0,
      "TaxRate": 14.0,
      "Tax": 15.0,
      "AmountTax": 16.0,
      "Note": "sample string 17",
      "StrValue1": "sample string 18",
      "StrValue2": "sample string 19",
      "StrValue3": "sample string 20",
      "StrValue4": "sample string 21",
      "StrValue5": "sample string 22",
      "StrValue6": "sample string 23",
      "StrValue7": "sample string 24",
      "StrValue8": "sample string 25",
      "SoId": 26,
      "SoNo": "sample string 27",
      "SoeId": 28
    }
  ],
  "SettlePeriodId": 17,
  "SettlePeriodName": "sample string 18",
  "SettlePeriodDate": "2024-11-24 17:25:35",
  "InvoiceType": 20,
  "InvoiceTypeName": "普通发票",
  "NeedJudgePrice": true
}

application/xml, text/xml

Sample:
<PurchaseOrderEditModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LemonScm.WebApi.Areas.Purchase.Models">
  <_x003C_AcId_x003E_k__BackingField>11</_x003C_AcId_x003E_k__BackingField>
  <_x003C_AccountingItemId_x003E_k__BackingField>14</_x003C_AccountingItemId_x003E_k__BackingField>
  <_x003C_AmountFirst_x003E_k__BackingField>12</_x003C_AmountFirst_x003E_k__BackingField>
  <_x003C_Amount_x003E_k__BackingField>9</_x003C_Amount_x003E_k__BackingField>
  <_x003C_AutoGenerate_x003E_k__BackingField>true</_x003C_AutoGenerate_x003E_k__BackingField>
  <_x003C_BType_x003E_k__BackingField>Purchase</_x003C_BType_x003E_k__BackingField>
  <_x003C_Date_x003E_k__BackingField>2024-11-24T17:25:35.3419872+08:00</_x003C_Date_x003E_k__BackingField>
  <_x003C_DeliveryDate_x003E_k__BackingField>2024-11-24T17:25:35.3419872+08:00</_x003C_DeliveryDate_x003E_k__BackingField>
  <_x003C_DepartmentId_x003E_k__BackingField>15</_x003C_DepartmentId_x003E_k__BackingField>
  <_x003C_DiscAmount_x003E_k__BackingField>8</_x003C_DiscAmount_x003E_k__BackingField>
  <_x003C_DiscRate_x003E_k__BackingField>7</_x003C_DiscRate_x003E_k__BackingField>
  <_x003C_Id_x003E_k__BackingField>1</_x003C_Id_x003E_k__BackingField>
  <_x003C_InvoiceType_x003E_k__BackingField>20</_x003C_InvoiceType_x003E_k__BackingField>
  <_x003C_Items_x003E_k__BackingField>
    <PurchaseOrderEntryEditModel>
      <Amount>13</Amount>
      <AmountTax>16</AmountTax>
      <ApId>4</ApId>
      <DiscAllocation>12</DiscAllocation>
      <DiscAmount>11</DiscAmount>
      <DiscRate>10</DiscRate>
      <Id>1</Id>
      <Note>sample string 17</Note>
      <PoId>2</PoId>
      <Price>8</Price>
      <PriceTax>9</PriceTax>
      <ProdId>3</ProdId>
      <QTY>7</QTY>
      <SoId>26</SoId>
      <SoNo>sample string 27</SoNo>
      <SoeId>28</SoeId>
      <StrValue1>sample string 18</StrValue1>
      <StrValue2>sample string 19</StrValue2>
      <StrValue3>sample string 20</StrValue3>
      <StrValue4>sample string 21</StrValue4>
      <StrValue5>sample string 22</StrValue5>
      <StrValue6>sample string 23</StrValue6>
      <StrValue7>sample string 24</StrValue7>
      <StrValue8>sample string 25</StrValue8>
      <Tax>15</Tax>
      <TaxRate>14</TaxRate>
      <UnitId>6</UnitId>
      <WhId>5</WhId>
    </PurchaseOrderEntryEditModel>
    <PurchaseOrderEntryEditModel>
      <Amount>13</Amount>
      <AmountTax>16</AmountTax>
      <ApId>4</ApId>
      <DiscAllocation>12</DiscAllocation>
      <DiscAmount>11</DiscAmount>
      <DiscRate>10</DiscRate>
      <Id>1</Id>
      <Note>sample string 17</Note>
      <PoId>2</PoId>
      <Price>8</Price>
      <PriceTax>9</PriceTax>
      <ProdId>3</ProdId>
      <QTY>7</QTY>
      <SoId>26</SoId>
      <SoNo>sample string 27</SoNo>
      <SoeId>28</SoeId>
      <StrValue1>sample string 18</StrValue1>
      <StrValue2>sample string 19</StrValue2>
      <StrValue3>sample string 20</StrValue3>
      <StrValue4>sample string 21</StrValue4>
      <StrValue5>sample string 22</StrValue5>
      <StrValue6>sample string 23</StrValue6>
      <StrValue7>sample string 24</StrValue7>
      <StrValue8>sample string 25</StrValue8>
      <Tax>15</Tax>
      <TaxRate>14</TaxRate>
      <UnitId>6</UnitId>
      <WhId>5</WhId>
    </PurchaseOrderEntryEditModel>
  </_x003C_Items_x003E_k__BackingField>
  <_x003C_NeedJudgePrice_x003E_k__BackingField>true</_x003C_NeedJudgePrice_x003E_k__BackingField>
  <_x003C_No_x003E_k__BackingField>sample string 2</_x003C_No_x003E_k__BackingField>
  <_x003C_Note_x003E_k__BackingField>sample string 13</_x003C_Note_x003E_k__BackingField>
  <_x003C_PayInfoItems_x003E_k__BackingField xmlns:d2p1="http://schemas.datacontract.org/2004/07/LemonScm.WebApi.Areas.BaseData.Models">
    <d2p1:PayEditModel>
      <d2p1:AcId>1</d2p1:AcId>
      <d2p1:Amount>2</d2p1:Amount>
      <d2p1:PayMethod>3</d2p1:PayMethod>
      <d2p1:RefNo>sample string 4</d2p1:RefNo>
    </d2p1:PayEditModel>
    <d2p1:PayEditModel>
      <d2p1:AcId>1</d2p1:AcId>
      <d2p1:Amount>2</d2p1:Amount>
      <d2p1:PayMethod>3</d2p1:PayMethod>
      <d2p1:RefNo>sample string 4</d2p1:RefNo>
    </d2p1:PayEditModel>
  </_x003C_PayInfoItems_x003E_k__BackingField>
  <_x003C_PrintCount_x003E_k__BackingField>10</_x003C_PrintCount_x003E_k__BackingField>
  <_x003C_Purchaser_x003E_k__BackingField>4</_x003C_Purchaser_x003E_k__BackingField>
  <_x003C_SettlePeriodDate_x003E_k__BackingField>2024-11-24T17:25:35.3419872+08:00</_x003C_SettlePeriodDate_x003E_k__BackingField>
  <_x003C_SettlePeriodId_x003E_k__BackingField>17</_x003C_SettlePeriodId_x003E_k__BackingField>
  <_x003C_SettlePeriodName_x003E_k__BackingField>sample string 18</_x003C_SettlePeriodName_x003E_k__BackingField>
  <_x003C_VendId_x003E_k__BackingField>3</_x003C_VendId_x003E_k__BackingField>
</PurchaseOrderEditModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

WebApi.IdNoPair
NameDescriptionTypeAdditional information
Id

integer

None.

No

string

None.

Message

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "No": "sample string 2",
  "Message": "sample string 3"
}

application/xml, text/xml

Sample:
<IdNoPair xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LemonScm.WebApi.Models">
  <Id>1</Id>
  <Message>sample string 3</Message>
  <No>sample string 2</No>
</IdNoPair>