| | |
| | | sErrMsg = "多源单模式下,扫描物料条码的原单信息必须正确!"; |
| | | return false; |
| | | } |
| | | else if (dal.omodel_View.HBarCodeStatus == "待装箱") |
| | | { |
| | | sErrMsg = "所扫条码为待装箱状态,不允许汇报!"; |
| | | return false; |
| | | } |
| | | } |
| | | else //非多原单 |
| | | { |
| | |
| | | #endregion |
| | | |
| | | |
| | | #region 生产装箱追溯单模块调用方法 |
| | | |
| | | #region 扫描箱条码 |
| | | |
| | | [WebMethod] |
| | | public Model.ClsGy_BarCodeBill_WMS_Model get_BarCode_PackUnionCarryUp(Int64 HInterID, string HBillNo, string HBillType, string HBarCode_Pack, string HHMaker, Int64 HStockOrgID, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | Model.ClsGy_BarCodeBill_WMS_Model oBar = new Model.ClsGy_BarCodeBill_WMS_Model(); |
| | | DataSet ds = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_PackUnionCarryUp " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode_Pack + "','" + HHMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddBarCode_PackUnionCarryUp"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描箱条码判断失败!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 0) |
| | | { |
| | | oBar.HBarCode = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBarCode_Pack"]); |
| | | return oBar; |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描箱条码失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]); |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 扫描SN条码 |
| | | |
| | | [WebMethod] |
| | | public bool get_SNBarCode_PackUnionCarryUp(string HBarCode, Int64 HInterID, string HBillType, string HBillNo, string HBarCode_Pack, string HMaker, Int64 HStockOrgID, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds = oCN.RunProcReturn("exec h_p_WMS_AddSNBarCode_PackUnionCarryUp '" + HBarCode + "'," + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode_Pack + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddSNBarCode_PackUnionCarryUp"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描SN条码失败!"; |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 0) |
| | | { |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]); |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 返回列表信息 |
| | | |
| | | [WebMethod] |
| | | public DataSet GetBillEntry_TmpList_PackUnionCarryUp(Int64 HInterID, string HBillNo, string HBillType, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | DataSet DS = oCn.RunProcReturn("exec h_p_WMS_BillEntryTmpList_PackUnionCarryUp " + HInterID.ToString() + ",'" + HBillType + "'", "h_p_WMS_BillEntryTmpList_PackUnionCarryUp"); |
| | | return DS; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 上传生成生产装箱追溯单 |
| | | |
| | | [WebMethod] |
| | | public bool set_SavePackUnionCarryUpBill_New(Int64 HInterID, string HBillType, string HBillNo, string HBarCode_Pack, string HMaker, Int64 HStockOrgID, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | try |
| | | { |
| | | oCn.BeginTran(); |
| | | DataSet ds = oCn.RunProcReturn("exec h_p_Sc_PackUnionCarryUpBill_Insert " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode_Pack + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_Sc_PackUnionCarryUpBill_Insert"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";上传失败!"; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 0) |
| | | { |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]); |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sErrMsg = "生成生产装箱追溯单失败!" + e.Message; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 删除明细表体选中行记录 |
| | | |
| | | [WebMethod] |
| | | public bool set_DelPackUnionBill_Temp(Int64 HInterID, string HBarCode, string HBillType, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | try |
| | | { |
| | | oCn.RunProc("Delete from Sc_PackUnionBill_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and (HBarCode='" + HBarCode + "' or HBarCode_Cus='" + HBarCode + "') and HPieceQty=1", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sErrMsg = "删除生产装箱追溯单扫码临时表记录失败!" + e.Message; |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region 缓存列表模块调用方法 |
| | | |
| | | #region 返回缓存列表信息 |
| | | |
| | | [WebMethod] |
| | | public DataSet GetSc_PackUnionBill_TempList(string HBillType, string HMaker, Int64 HStockOrgID) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | DataSet Ds = oCn.RunProcReturn("exec h_p_Sc_PackUnionBill_TempList '" + HBillType + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_Sc_PackUnionBill_TempList"); |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | return Ds; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 删除缓存列表单据 |
| | | |
| | | [WebMethod] |
| | | public bool DeleteTemp_PackUnionBill(Int64 HInterID, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | try |
| | | { |
| | | oCn.RunProc("Delete from Sc_PackUnionBill_Temp where HInterID=" + HInterID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sErrMsg = "删除失败!" + e.Message; |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region 校验模式 扫码模块调用方法 |
| | | |
| | | #region 缓存列表编辑打开单据时,获取单据信息 *校验模式 |