| | |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region 扫描源单条码 |
| | | |
| | | [WebMethod] |
| | | public Model.ClsKf_ICStockBill_WMS get_CheckTypeBySource_New(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, bool HRedBlueflag, string HHMaker, Int64 HOWNERID, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | Model.ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS(); |
| | | Int64 HAccessFlag = 0; //是否物料条码带出源单信息标志(0为直接扫源单条码,1为物料条码带出源单信息) |
| | | |
| | | //获取系统参数 |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | if (oSystemParameter.ShowBill(ref sErrMsg) == false) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描源单时获取系统参数失败! " + sErrMsg; |
| | | return null; |
| | | } |
| | | oBar = getSourceBillList_New(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HRedBlueflag, HHMaker, HOWNERID, HAccessFlag, oSystemParameter.omodel, ref sErrMsg); |
| | | if (oBar == null) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描源单失败!" + sErrMsg; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | return oBar; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region 将源单信息存入条码出入库临时表 |
| | | |
| | | [WebMethod] |
| | | public Model.ClsKf_ICStockBill_WMS getSourceBillList_New(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, bool HRedBlueflag, string HHMaker, Int64 HOWNERID, Int64 HAccessFlag, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | Model.ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS(); |
| | | Int64 sMulSourceFlag = 0; //多源单标志(0为非多源单模式,1为多源单模式) |
| | | string sRedBlue = "蓝字"; |
| | | if (HRedBlueflag) |
| | | { |
| | | sRedBlue = "红字"; |
| | | } |
| | | else |
| | | { |
| | | sRedBlue = "蓝字"; |
| | | } |
| | | //多源单模式时,sMulSourceFlag = 1 |
| | | if (HBillType == "1202" && oSystemParameterMain.Kf_ProductInBill_MulSourceBill == "Y") |
| | | { |
| | | //生产入库单 |
| | | sMulSourceFlag = 1; |
| | | } |
| | | else if (HBillType == "1201" && oSystemParameterMain.Kf_POStockInBill_MulSourceBill == "Y") |
| | | { |
| | | //采购入库单 |
| | | sMulSourceFlag = 1; |
| | | } |
| | | else if (HBillType == "1210" && oSystemParameterMain.Kf_EntrustInBill_MulSourceBill == "Y") |
| | | { |
| | | //委外入库单 |
| | | sMulSourceFlag = 1; |
| | | } |
| | | else if (HBillType == "1204" && oSystemParameterMain.Kf_MateOutBill_MulSourceBill == "Y") |
| | | { |
| | | //生产领料单 |
| | | sMulSourceFlag = 1; |
| | | } |
| | | else if (HBillType == "1205" && oSystemParameterMain.Kf_SellOutBill_MulSourceBill == "Y") |
| | | { |
| | | //销售出库单 |
| | | sMulSourceFlag = 1; |
| | | } |
| | | else if (HBillType == "1211" && oSystemParameterMain.Kf_EntrustOutBill_MulSourceBill == "Y") |
| | | { |
| | | //委外出库单 |
| | | sMulSourceFlag = 1; |
| | | } |
| | | else if (HBillType == "3711" && oSystemParameterMain.Sc_ICMOReportBill_MulSourceBill == "Y") |
| | | { |
| | | //生产汇报单 |
| | | sMulSourceFlag = 1; |
| | | } |
| | | else if (HBillType == "1207" && oSystemParameterMain.Kf_MoveStockBill_MulSourceBill == "Y") |
| | | { |
| | | //直接调拨单 |
| | | sMulSourceFlag = 1; |
| | | } |
| | | //else if (HBillType == "1250" && oSystemParameterMain.Kf_MoveStockStepOutBill_MulSourceBill == "Y") |
| | | //{ |
| | | // //分步式调出单 |
| | | // sMulSourceFlag = 1; |
| | | //} |
| | | //else if (HBillType == "1251" && oSystemParameterMain.Kf_MoveStockStepInBill_MulSourceBill == "Y") |
| | | //{ |
| | | // //分步式调入单 |
| | | // sMulSourceFlag = 1; |
| | | //} |
| | | else if (HBillType == "1245" && oSystemParameterMain.Kf_ProductInBackBill_MulSourceBill == "Y") |
| | | { |
| | | //生产退库单 |
| | | sMulSourceFlag = 1; |
| | | } |
| | | else if (HBillType == "1239" && oSystemParameterMain.Kf_POStockInBackBill_MulSourceBill == "Y") |
| | | { |
| | | //采购退料单 |
| | | sMulSourceFlag = 1; |
| | | } |
| | | else if (HBillType == "1246" && oSystemParameterMain.Kf_EntrustInBackBill_MulSourceBill == "Y") |
| | | { |
| | | //委外退库单 |
| | | sMulSourceFlag = 1; |
| | | } |
| | | else if (HBillType == "1244" && oSystemParameterMain.Kf_MateOutBackBill_MulSourceBill == "Y") |
| | | { |
| | | //生产退料单 |
| | | sMulSourceFlag = 1; |
| | | } |
| | | else if (HBillType == "1247" && oSystemParameterMain.Kf_SellOutBackBill_MulSourceBill == "Y") |
| | | { |
| | | //销售退货单 |
| | | sMulSourceFlag = 1; |
| | | } |
| | | else if (HBillType == "1238" && oSystemParameterMain.Kf_EntrustOutBackBill_MulSourceBill == "Y") |
| | | { |
| | | //委外退料单 |
| | | sMulSourceFlag = 1; |
| | | } |
| | | |
| | | DataSet ds1 = oCn.RunProcReturn("exec h_p_KF_PonderationBillMain_Temp_AddSource_New " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "','" + sRedBlue + "'," + sMulSourceFlag.ToString() + ",'" + HHMaker + "'," + HOWNERID.ToString() + "," + HAccessFlag.ToString(), "h_p_KF_PonderationBillMain_Temp_AddSource_New"); |
| | | if (ds1 == null || ds1.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "将源单信息存入条码出入库临时表失败!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0][0]) == 0) |
| | | { |
| | | oBar.HBarType = "源单条码"; |
| | | oBar.HMulSourceFlag = sMulSourceFlag; |
| | | oBar.HSourceBillType = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSourceBillType"]); |
| | | oBar.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSourceBillNo"]); |
| | | oBar.HSupID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HSupID"]); |
| | | oBar.HSupName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSupName"]); |
| | | oBar.HDeptID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HDeptID"]); |
| | | oBar.HDeptName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HDeptName"]); |
| | | oBar.HCustom = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HCustom"]); |
| | | return oBar; |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HRemark"]); |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region 返回源单信息 |
| | | |
| | | //根据所输源单号模糊查询源单信息,并返回数据 |
| | | //根据所输源单号模糊查询源单信息,并返回数据(按源单选择按钮时调用) |
| | | [WebMethod] |
| | | public DataSet GetSourceBillList(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, Int64 HOWNERID, ref string sErrMsg) |
| | | { |