From dfcac169420875fd807a7909189059482fe1b93b Mon Sep 17 00:00:00 2001 From: zrg <z18737863051@163.com> Date: 星期五, 15 三月 2024 15:52:20 +0800 Subject: [PATCH] 增加 其他出库单 编辑模块; , 并完善 其他出库单 列表功能;(常规 功能, 新增,修改,删除,审核,作废,关闭,自定义过滤,源单类型列表(源单 手工录入), 合计行,保存控制,审核控制,删除控制,关联数回填 等等 ) (注: 基础资料选择, 均用 基础资料列表 的方式) --- DAL/仓库管理/ClsKf_MoveStockBill.cs | 86 ++++++++++++++++++++++++++++++++++++++---- 1 files changed, 77 insertions(+), 9 deletions(-) diff --git "a/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockBill.cs" "b/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockBill.cs" index 6072206..99e8b1a 100644 --- "a/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockBill.cs" +++ "b/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockBill.cs" @@ -37,6 +37,22 @@ { try { + + //淇濆瓨鍓嶆帶鍒�========================================= + string HBillNote = ""; + DataSet ds = oCn.RunProcReturn("Exec h_p_Kf_MoveStockBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Kf_MoveStockBill_BeforeSaveCtrl"); + if (ds == null) + { + sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒"; + return false; + } + if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") + { + sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); + return false; + } + //========================================================= + // oCn.BeginTran(); //鏇存柊涓昏〃 @@ -72,23 +88,23 @@ //鍒犻櫎瀛愯〃 DeleteBillSub(lngBillKey); //鎻掑叆瀛愯〃 - omodel.HInterID = lngBillKey; + // omodel.HInterID = lngBillKey; foreach (Model.ClsKf_MoveStockBillSub oSub in DetailColl) { oCn.RunProc("Insert into Kf_ICStockBillSub " + - " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + + " (HInterID,HEntryID,HCloseMan,HCloseType,HRemark" + ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" + ",HQty,HPrice,HMoney,HWHID,HSCWHID" + - ",HSPID,HSCSPID,HBatchNo" + + ",HSPID,HSCSPID,HBatchNo,HOutPrice,HOutMoney" + ",HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo" + ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" + ") values(" - + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + + + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + - "," + oSub.HSPID.ToString() + "," + oSub.HSCSPID.ToString() + ",'" + oSub.HBatchNo + "'" + + "," + oSub.HSPID.ToString() + "," + oSub.HSCSPID.ToString() + ",'" + oSub.HBatchNo + "','" + oSub.HOutPrice + "','" + oSub.HOutMoney + "'" + "," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'" + "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" + ") "); @@ -105,6 +121,24 @@ // return false; // } //} + + //=========================淇濆瓨鍚庢帶鍒� + DataSet ds2 = oCn.RunProcReturn("Exec h_p_Kf_MoveStockBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Kf_MoveStockBill_AfterSaveCtrl"); + if (ds2 == null) + { + sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒"; + oCn.RollBack(); + return false; + } + if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0") + { + sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]); + oCn.RollBack(); + return false; + } + //============================ + + sReturn = "淇敼鍗曟嵁鎴愬姛锛�"; oCn.Commit(); return true; @@ -133,6 +167,22 @@ { omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); } + + //淇濆瓨鍓嶆帶鍒�========================================= + string HBillNote = ""; + DataSet ds = oCn.RunProcReturn("Exec h_p_Kf_MoveStockBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Kf_MoveStockBill_BeforeSaveCtrl"); + if (ds == null) + { + sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒"; + return false; + } + if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") + { + sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); + return false; + } + //========================================================= + // oCn.BeginTran(); //涓昏〃 @@ -155,19 +205,19 @@ foreach (Model.ClsKf_MoveStockBillSub oSub in DetailColl) { oCn.RunProc("Insert into Kf_ICStockBillSub " + - " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + + " (HInterID,HEntryID,HCloseMan,HCloseType,HRemark" + ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" + ",HQty,HPrice,HMoney,HWHID,HSCWHID" + - ",HSPID,HSCSPID,HBatchNo" + + ",HSPID,HSCSPID,HBatchNo,HOutPrice,HOutMoney" + ",HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo" + ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" + ") values(" - + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + + + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + - "," + oSub.HSPID.ToString() + "," + oSub.HSCSPID.ToString() + ",'" + oSub.HBatchNo + "'" + + "," + oSub.HSPID.ToString() + "," + oSub.HSCSPID.ToString() + ",'" + oSub.HBatchNo + "','" + oSub.HOutPrice + "','" + oSub.HOutMoney + "'" + "," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'" + "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" + ") "); @@ -185,6 +235,24 @@ // } //} // + + //=========================淇濆瓨鍚庢帶鍒� + DataSet ds2 = oCn.RunProcReturn("Exec h_p_Kf_MoveStockBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Kf_MoveStockBill_AfterSaveCtrl"); + if (ds2 == null) + { + sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒"; + oCn.RollBack(); + return false; + } + if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0") + { + sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]); + oCn.RollBack(); + return false; + } + //============================ + + sReturn = "鏂板鍗曟嵁鎴愬姛锛�"; oCn.Commit(); return true; -- Gitblit v1.9.1