| | |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | [Route("GetHBarCodeShowBillSub_Merge")] |
| | | [HttpGet] |
| | | /// <summary> |
| | | /// 条码生成表体(物料,批次相同,合并数量) |
| | | /// </summary> |
| | | /// <param name="sMsg"></param> |
| | | /// <returns></returns> |
| | | public object GetHBarCodeShowBillSub_Merge(string HInterID) |
| | | { |
| | | try |
| | | { |
| | | DataSet ds; |
| | | string s = ""; |
| | | string ShowItem = " * ";//显示的字段 |
| | | if (DBUtility.ClsPub.isLong(HInterID) == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败,送货单内码为空"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | |
| | | ds = oCn.RunProcReturn("Select * from h_v_SRM_Barcode_MergePOInStock where HInterID = " + HInterID, "h_v_SRM_Barcode_MergePOInStock"); |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "获取成功"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 条码档案列表 |
| | | /// </summary> |
| | |
| | | TM2 = "0" + TM2; |
| | | } |
| | | bar2.HMaterID = oItemSub2.HMaterID; |
| | | bar2.HBarCode = oItemSub2.HBarCode.Replace(HBarcodeQty.ToString(), HWXQty.ToString()); |
| | | |
| | | var HBarCode_NX = oItemSub2.HBarCode.Split('@'); //内箱拆分条码编号 |
| | | string HBarMaterNumber_NX = HBarCode_NX[0];//内箱条码_物料代码 |
| | | string HBarMaterName_NX = HBarCode_NX[1];//内箱条码_物料名称 |
| | | string HBarMaterModel_NX = HBarCode_NX[2];//内箱条码_物料规格型号 |
| | | string HBarKFDate_NX = HBarCode_NX[3];//内箱条码_生产日期 |
| | | string HBarQty_NX = HBarCode_NX[4];//内箱条码_数量 |
| | | string HBarKFDQDate_NX = HBarCode_NX[5];//内箱条码_有效期至 |
| | | string HBarBatchNo_NX = HBarCode_NX[6];//内箱条码_批号 |
| | | string HBarSupName_NX = HBarCode_NX[7];//内箱条码_供应商名称 |
| | | string HBarSourceBillNo_NX = HBarCode_NX[8];//内箱条码_源单单号 |
| | | |
| | | HBarQty_NX = HWXQty.ToString(); |
| | | |
| | | string TM_NX = $"{HBarMaterNumber_NX}@{HBarMaterName_NX}@{HBarMaterModel_NX}@{HBarKFDate_NX}@{HBarQty_NX}@{HBarKFDQDate_NX}@{HBarBatchNo_NX.TrimStart().TrimEnd()}@{HBarSupName_NX}@{HBarSourceBillNo_NX}"; |
| | | |
| | | bar2.HBarCode = TM_NX;//oItemSub2.HBarCode.Replace(HBarcodeQty.ToString(), HWXQty.ToString());//问题所在 外箱包装数,替换成内箱包装数 |
| | | bar2.HUnitID = oItemSub2.HUnitID; |
| | | bar2.HQty = HWXQty; |
| | | bar2.HBatchNo = DBUtility.ClsPub.isStrNull(oItemSub2.HBatchNo); |