|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /// <summary> | 
|---|
|  |  |  | /// 销售出库缓存列表编辑按钮 获取表体信息 | 
|---|
|  |  |  | /// </summary> | 
|---|
|  |  |  | /// <param name="HSourceBillNo"></param> | 
|---|
|  |  |  | /// <returns></returns> | 
|---|
|  |  |  | [Route("SellOut/SellOutDetaiNew")] | 
|---|
|  |  |  | [HttpGet] | 
|---|
|  |  |  | public object SellOutDetaiNew(string HInterID) | 
|---|
|  |  |  | { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | DataSet ds; | 
|---|
|  |  |  | List<object> list = new List<object>(); | 
|---|
|  |  |  | string Swhere = ""; | 
|---|
|  |  |  | try | 
|---|
|  |  |  | { | 
|---|
|  |  |  | if (HInterID != "" || HInterID != null) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | Swhere = " and hmainid='" + HInterID + "'"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | Swhere = HInterID; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); | 
|---|
|  |  |  | //获取销售出库编辑数据 | 
|---|
|  |  |  | string sql = "select  数量 HQty,应收数量 HQtyMust,物料代码 HMaterNumber,物料名称 HMaterName,规格型号 HMaterModel,源单主内码 HSourceInterID,源单子内码 HSourceEntryID,源单单号 HSourceBillNo,批次 HBatchNo,辅助属性 HAuxPropID,计划跟踪号 HMTONo,ck HWHID  from h_v_SelloutDetail where 1 = 1 " + Swhere + ""; | 
|---|
|  |  |  | ds = oCN.RunProcReturn(sql, "h_v_SelloutDetail"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | list.Add(ds.Tables[0]); | 
|---|
|  |  |  | objJsonResult.code = "0"; | 
|---|
|  |  |  | objJsonResult.count = 1; | 
|---|
|  |  |  | objJsonResult.Message = "获取信息成功!"; | 
|---|
|  |  |  | objJsonResult.list = list; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | catch (Exception e) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | objJsonResult.code = "0"; | 
|---|
|  |  |  | objJsonResult.count = 0; | 
|---|
|  |  |  | objJsonResult.Message = "没有返回任何记录!" + e.ToString(); | 
|---|
|  |  |  | objJsonResult.data = null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //已上传列表刷新 | 
|---|
|  |  |  | [Route("Web/DisBillUpdateLoad_Json")] | 
|---|
|  |  |  | [HttpGet] | 
|---|
|  |  |  | public object DisBillUpdateLoad_Json(string HBillType, string HMaker, Int64 HOrgID) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | try | 
|---|
|  |  |  | { | 
|---|
|  |  |  | ds = webserver.GetDisBillUpdateLoad_Json(HBillType, HMaker, HOrgID); | 
|---|
|  |  |  | if (ds == null || ds.Tables[0].Rows.Count <= 0) | 
|---|
|  |  |  | { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | objJsonResult.code = "0"; | 
|---|
|  |  |  | objJsonResult.count = 0; | 
|---|
|  |  |  | objJsonResult.Message = "没有返回任何记录!"; | 
|---|
|  |  |  | objJsonResult.data = null; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | objJsonResult.code = "0"; | 
|---|
|  |  |  | objJsonResult.count = 1; | 
|---|
|  |  |  | objJsonResult.Message = "获取信息成功!"; | 
|---|
|  |  |  | objJsonResult.data = ds.Tables[0]; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | catch (Exception e) | 
|---|
|  |  |  | { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | objJsonResult.code = "0"; | 
|---|
|  |  |  | objJsonResult.count = 0; | 
|---|
|  |  |  | objJsonResult.Message = "没有返回任何记录!" + e.ToString(); | 
|---|
|  |  |  | objJsonResult.data = null; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //已上传查询 | 
|---|
|  |  |  | [Route("Web/QueryBillUpdateLoad_Json")] | 
|---|
|  |  |  | [HttpGet] | 
|---|
|  |  |  | public object QueryBillUpdateLoad_Json(string BillType, string HBillNo, string HSourceBillNo) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | try | 
|---|
|  |  |  | { | 
|---|
|  |  |  | ds = webserver.GetQueryBillUpdateLoad_Json(BillType, HBillNo, HSourceBillNo); | 
|---|
|  |  |  | if (ds == null || ds.Tables[0].Rows.Count <= 0) | 
|---|
|  |  |  | { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | objJsonResult.code = "0"; | 
|---|
|  |  |  | objJsonResult.count = 0; | 
|---|
|  |  |  | objJsonResult.Message = "没有返回任何记录!"; | 
|---|
|  |  |  | objJsonResult.data = null; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | objJsonResult.code = "0"; | 
|---|
|  |  |  | objJsonResult.count = 1; | 
|---|
|  |  |  | objJsonResult.Message = "获取信息成功!"; | 
|---|
|  |  |  | objJsonResult.data = ds.Tables[0]; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | catch (Exception e) | 
|---|
|  |  |  | { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | objJsonResult.code = "0"; | 
|---|
|  |  |  | objJsonResult.count = 0; | 
|---|
|  |  |  | objJsonResult.Message = "没有返回任何记录!" + e.ToString(); | 
|---|
|  |  |  | objJsonResult.data = null; | 
|---|
|  |  |  | return objJsonResult; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | [Route("SellOut/GetMAXNum")] | 
|---|
|  |  |  | [HttpGet] | 
|---|
|  |  |  | public object GetMAXNum() | 
|---|
|  |  |  | 
|---|
|  |  |  | { | 
|---|
|  |  |  | try | 
|---|
|  |  |  | { | 
|---|
|  |  |  | // DataSet ds = new DataSet(); | 
|---|
|  |  |  | // WebServer webserver = new WebServer(); | 
|---|
|  |  |  | //同步销售订单 | 
|---|
|  |  |  | new SQLHelper.ClsCN().RunProcReturn("EXEC h_p_IFCLD_ERPSourceBillToLocal_SEOrder '" + HSourceBillNo + "'", "h_p_IFCLD_ERPSourceBillToLocal_SEOrder"); | 
|---|
|  |  |  | // DataSet ds = new DataSet(); | 
|---|
|  |  |  | // WebServer webserver = new WebServer(); | 
|---|
|  |  |  | string sWhere = " Where 单据号 like '%" + HSourceBillNo.Trim() + "%'"; | 
|---|
|  |  |  | // | 
|---|
|  |  |  | if (HSourceBillType == "1402") | 
|---|
|  |  |  | 
|---|
|  |  |  | websLsmain.HEmpID = lsmain[0].HEmpID; | 
|---|
|  |  |  | websLsmain.HRemark = lsmain[0].HRemark; | 
|---|
|  |  |  | websLsmain.HMaker = lsmain[0].HMaker; | 
|---|
|  |  |  | websLsmain.HKeeperID= lsmain[0].HKeeperID; | 
|---|
|  |  |  | websLsmain.HBillType = "1205";//固定值 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (webserver.set_SaveSellOutBill_New(websLsmain, sSourceBillType, ref DBUtility.ClsPub.sErrInfo)) | 
|---|
|  |  |  | { | 
|---|