K3Cloud 销售出库单 webservice代码生成的代码谁有啊?金蝶就不能提供一些标准的东西吗。。。坑!我的代码提示:
KDServiceClientKDServiceClient: succeededSave: failed字段“销售组织”是必填项 字段“客户”是必填项
[code]private static SAL_OUTSTOCK_SaveResponse SAL_OUTSTOCK_Save(KDServiceClient client)
{
SAL_OUTSTOCK_Save save = new SAL_OUTSTOCK_Save();
//销售出库单
save.Model = new SAL_OUTSTOCK();
//单据类型
save.Model.FBillTypeID = new SAL_OUTSTOCK_BOS_BillType { FNumber = "XSCKD01_SYS" };
save.Model.SAL_OUTSTOCK__SubHeadEntity = new SAL_OUTSTOCK__SubHeadEntity()
{
//FPayConditionId = new STK_InStock_BD_PaymentCondition { },
FLocalCurrID = new SAL_OUTSTOCK_BD_Currency { FNUMBER = "PRE001" },
//FOwnerSupplierID = new SAL_OUTSTOCK_BD_Supplier { FNUMBER = "VEN00003" },
FSettleOrgID = new SAL_OUTSTOCK_ORG_Organizations { FNUMBER = "101.2" },
FSettleCurrID = new SAL_OUTSTOCK_BD_Currency { FNUMBER = "PRE001" },
FSETTLECustomerID = new SAL_OUTSTOCK_BD_Customer { FNUMBER = "CUST0001" },
FExchangeTypeID = new SAL_OUTSTOCK_BD_RateType { FNumber = "HLTX01_SYS" },
FExchangeRate = 1
};
//销售组织
save.Model.FSaleOrgId = new SAL_OUTSTOCK_ORG_Organizations { FNUMBER = "103" };
save.Model.FSaleDeptID = new SAL_OUTSTOCK_BD_Department { FDEPTID = 100202 };
save.Model.FSalesGroupID = new SAL_OUTSTOCK_BD_OperatorGroup { FNUMBER = "" };
save.Model.FSalesManID = new SAL_OUTSTOCK_BD_Saler { FNUMBER = "" };
//客户内码
save.Model.FCustomerID = new SAL_OUTSTOCK_BD_Customer { FNUMBER = "CUST0001" };
save.Model.FPayerID = new SAL_OUTSTOCK_BD_Customer { FCUSTID = 100044 };
save.Model.FSettleID = new SAL_OUTSTOCK_BD_Customer { FCUSTID = 100044 };
save.Model.FReceiverID = new SAL_OUTSTOCK_BD_Customer { FCUSTID = 100044 };
//收货组织
save.Model.FStockOrgId = new SAL_OUTSTOCK_ORG_Organizations { FNUMBER = "101.2" };
save.Model.FStockerGroupID = new SAL_OUTSTOCK_BD_OperatorGroup { };
save.Model.FStockerID = new SAL_OUTSTOCK_BD_WAREHOUSEWORKERS { FNumber = "BM000007" };
//业务类型
//save.Model.FBusinessType = "CG";
//库存组织
save.Model.FOwnerTypeIdHead = "BD_OwnerOrg";
save.Model.FOwnerIdHead = new SAL_OUTSTOCK_BOS_ItemClass { FNumber = "101.2" };
//日期
//save.Model.FDate = Convert.ToDateTime("2015-04-13");
save.Model.FCorrespondOrgId = new SAL_OUTSTOCK_ORG_Organizations { FNUMBER = "101.2" };
//save.Model.FCreateDate = DateTime.Now;
//销售出库单明细
save.Model.SAL_OUTSTOCK__FEntity = new SAL_OUTSTOCK__FEntity[] {
new SAL_OUTSTOCK__FEntity(){
//物料编码
FMaterialID = new SAL_OUTSTOCK_BD_MATERIAL(){
FNumber="1.01.001.0059"
},
//单位
FUnitID = new SAL_OUTSTOCK_BD_UNIT(){
FNumber="Pcs"
},
//仓库
FStockID= new SAL_OUTSTOCK_BD_STOCK(){
FNumber="CK003"
},
//基本单位数量
FBaseUnitQty=10,
//数量
FAuxUnitQty = 10,
//单价
FPrice = 10,
//价税合计
FAmount = 100,
//FStockStatusID= new SAL_OUTSTOCK_BD_StockStatus{
//FNumber="KCZT01_SYS"
//},
//FStockFlag=true
}
};
Console.WriteLine("SAL_OUTSTOCK_Save");
var result = client.Send
return result;
}[/code]