From 461327f1c993043239e16c01defbe8b884528712 Mon Sep 17 00:00:00 2001
From: 沈泽 <211959439@qq.com>
Date: 星期五, 10 九月 2021 08:11:11 +0800
Subject: [PATCH] 1
---
WarM/条码打印/Gy_BarCodeBill.cs | 63 ++++++++++++++++++++++++++-----
1 files changed, 52 insertions(+), 11 deletions(-)
diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs"
index 164b9d3..580f92b 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs"
@@ -156,6 +156,7 @@
public Int64 HInterID = 0; //鍐呯爜
public Int64 HOrgID = -1;
public string HOrgNumber = "";
+ public string ERPMode = ""; //ERP妯″紡锛圵ISE銆丆LOUD锛�
public string CampanyName = ""; //瀹㈡埛瀹氬埗鍖栧悕绉�
public string SourceQtyCtl = ""; //瓒呮簮鍗曟暟閲忔帶鍒�
//-------------------------------------------------------------------------
@@ -373,6 +374,7 @@
}
else
{
+ ERPMode = oSystemParameter.omodel.WMS_WMSStockCtl_ERPMode;
CampanyName = oSystemParameter.omodel.WMS_CampanyName;
SourceQtyCtl = oSystemParameter.omodel.BarCode_SourceQtyCtl;
}
@@ -975,6 +977,7 @@
grdSub.RowCount = 0;
grdMain.ColumnCount = 60; //鎬诲垪鏁�
DBUtility.Xt_BaseBillFun.initGridFst(grdMain, this.Name);
+ grdMain.Columns[HSnoCol].HeaderText = "搴忓彿";
grdMain.Columns[HMainIDCol].HeaderText = "婧愬崟涓籌D";
grdMain.Columns[HSubIDCol].HeaderText = "婧愬崟瀛怚D";
grdMain.Columns[HBillNoCol].HeaderText = "婧愬崟鍗曞彿";
@@ -1027,7 +1030,6 @@
grdMain.Columns[HInnerBillNoCol].HeaderText = "鍐呴儴閲囪喘璁㈠崟鍙�";
grdMain.Columns[HMakerCol].HeaderText = "鍒跺崟浜�";
////
- grdMain.Columns[HSnoCol].HeaderText = "搴忓彿";
//鏍煎紡鍖�
grdMain.Columns[HTagCol].Visible = false; //闅愯棌鍒�
grdMain.Columns[HMainIDCol].Visible = false;
@@ -1037,8 +1039,8 @@
grdMain.Columns[HModelCol].Visible = false;
//grdMain.Columns[HBatchNoCol].Visible = false;
grdMain.Columns[HAuxPropIDCol].Visible = false;
- grdMain.Columns[HAuxPropNumberCol].Visible = false;
- grdMain.Columns[HAuxPropNameCol].Visible = false;
+ //grdMain.Columns[HAuxPropNumberCol].Visible = false;
+ //grdMain.Columns[HAuxPropNameCol].Visible = false;
grdMain.Columns[HUnitIDCol].Visible = false;
grdMain.Columns[HinitQtyCol].Visible = false;
grdMain.Columns[HSupIDCol].Visible = false;
@@ -1153,8 +1155,8 @@
grdSub.Columns[HMaterID2Col].Visible = false;
grdSub.Columns[HModel2Col].Visible = false;
grdSub.Columns[HAuxPropID2Col].Visible = false;
- grdSub.Columns[HAuxPropNumber2Col].Visible = false;
- grdSub.Columns[HAuxPropName2Col].Visible = false;
+ //grdSub.Columns[HAuxPropNumber2Col].Visible = false;
+ //grdSub.Columns[HAuxPropName2Col].Visible = false;
grdSub.Columns[HUnitID2Col].Visible = false;
grdSub.Columns[HPrintCol].Visible = false;
grdSub.Columns[HSourceInterID2Col].Visible = false;
@@ -1336,6 +1338,7 @@
}
DAL.ClsIF_Material_View oMater = new DAL.ClsIF_Material_View();//鐗╂枡
DAL.ClsIF_Unit_View oUnit = new DAL.ClsIF_Unit_View();//璁¢噺鍗曚綅
+ DAL.ClsIF_Property_View oProperty = new DAL.ClsIF_Property_View();//杈呭姪灞炴��
if (!grdStatus)
{
return;
@@ -1368,6 +1371,9 @@
grdMain.Rows[sRow].Cells[HMinQtyCol].Value = oMater.omodel.HQtyMin;
grdMain.Rows[sRow].Cells[HDateCol].Value = dtpHDate.Value.ToShortDateString();
grdMain.Rows[sRow].Cells[HShowDateCol].Value = dtpHDate.Value.ToShortDateString();
+ grdMain.Rows[sRow].Cells[HAuxPropIDCol].Value = 0;
+ grdMain.Rows[sRow].Cells[HAuxPropNumberCol].Value = "";
+ grdMain.Rows[sRow].Cells[HAuxPropNameCol].Value = "";
if (oUnit.GetInfoByID(oMater.omodel.HUnitID))
{
grdMain.Rows[sRow].Cells[HUnitIDCol].Value = oUnit.omodel.HItemID.ToString();
@@ -1392,6 +1398,9 @@
grdMain.Rows[sRow].Cells[HUnitIDCol].Value = 0;
grdMain.Rows[sRow].Cells[HUnitNumberCol].Value = "";
grdMain.Rows[sRow].Cells[HUnitNameCol].Value = "";
+ grdMain.Rows[sRow].Cells[HAuxPropIDCol].Value = 0;
+ grdMain.Rows[sRow].Cells[HAuxPropNumberCol].Value = "";
+ grdMain.Rows[sRow].Cells[HAuxPropNameCol].Value = "";
}
}
else
@@ -1402,6 +1411,11 @@
grdMain.Rows[sRow].Cells[HMaterModelCol].Value = "";
grdMain.Rows[sRow].Cells[HMinQtyCol].Value = 0;
grdMain.Rows[sRow].Cells[HUnitIDCol].Value = 0;
+ grdMain.Rows[sRow].Cells[HUnitNumberCol].Value = "";
+ grdMain.Rows[sRow].Cells[HUnitNameCol].Value = "";
+ grdMain.Rows[sRow].Cells[HAuxPropIDCol].Value = 0;
+ grdMain.Rows[sRow].Cells[HAuxPropNumberCol].Value = "";
+ grdMain.Rows[sRow].Cells[HAuxPropNameCol].Value = "";
}
break;
@@ -1435,6 +1449,31 @@
case HDateCol:
BLL.ClsPub_BLL.Sub_SelectDate(grdMain, sRow, HDateCol);
oEdit.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[sRow].Cells[HDateCol].Value);
+ break;
+
+ case HAuxPropNumberCol:
+ oProperty.WherePart = "";
+ if (ERPMode == "CLOUD")
+ {
+ sWhere = " and HMaterNumber = '" + DBUtility.ClsPub.isStrNull(grdMain.Rows[grdMain.CurrentCell.RowIndex].Cells[HMaterNumberCol].Value) + "'";
+ }
+ else
+ {
+ sWhere = "";
+ }
+ if (oProperty.RefreshView(sWhere))
+ {
+ grdMain.Rows[sRow].Cells[HAuxPropIDCol].Value = oProperty.oModel.HItemID.ToString();
+ grdMain.Rows[sRow].Cells[HAuxPropNumberCol].Value = oProperty.oModel.HNumber;
+ grdMain.Rows[sRow].Cells[HAuxPropNameCol].Value = oProperty.oModel.HName;
+ oEdit.Text = oProperty.oModel.HNumber;
+ }
+ else
+ {
+ grdMain.Rows[sRow].Cells[HAuxPropIDCol].Value = 0;
+ grdMain.Rows[sRow].Cells[HAuxPropNumberCol].Value = "";
+ grdMain.Rows[sRow].Cells[HAuxPropNameCol].Value = "";
+ }
break;
@@ -1742,7 +1781,7 @@
grdMain.Rows.Add();
Application.DoEvents();
//寰楀埌淇℃伅
- Ds = oCn.RunProcReturn("select * from h_v_KF_ICInventoryList_IF where hmaterid=" + oSelectRow.BillMainID + " and hwhid=" + oSelectRow.BillSubID + " and hspid=" + oSelectRow.SPID + " and 鎵规='" + oSelectRow.BatchNo + "' and 璁″垝璺熻釜鍙�='" + oSelectRow.BillNo + "'", "h_v_KF_ICInventoryList_IF");
+ Ds = oCn.RunProcReturn("select * from h_v_KF_ICInventoryList_IF where hmaterid=" + oSelectRow.BillMainID + " and hwhid=" + oSelectRow.BillSubID + " and hspid=" + oSelectRow.SPID + " and HAuxPropID=" + oSelectRow.HAuxPropID + " and 鎵规='" + oSelectRow.BatchNo + "' and 璁″垝璺熻釜鍙�='" + oSelectRow.BillNo + "'", "h_v_KF_ICInventoryList_IF");
//鍐欏叆淇℃伅
Sub_WriteInForm2(Ds.Tables[0], i);
}
@@ -1793,13 +1832,14 @@
//grdMain.Rows[i].Cells[HSourceNumberCol].Value = oTable.Rows[0]["鐢熶骇绾夸唬鐮�"].ToString();
grdMain.Rows[i].Cells[HSourceNameCol].Value = oTable.Rows[0]["鐢熶骇绾�"].ToString();
grdMain.Rows[i].Cells[HEndDateCol].Value = oTable.Rows[0]["璁″垝瀹屽伐鏃ユ湡"].ToString();
- grdMain.Rows[i].Cells[HMinQtyCol].Value = oTable.Rows[0]["鏈�灏忓寘瑁呮暟"].ToString();
+ grdMain.Rows[i].Cells[HMinQtyCol].Value = oTable.Rows[0]["鏈�灏忓寘瑁呮暟"].ToString();
//--
//璁剧疆鍙紪杈戝垪
string sAllowCol = HQtyCol.ToString() +
+ "," + HMinQtyCol.ToString() +
+ "," + HAuxPropNumberCol.ToString() +
"," + HBatchNoCol.ToString() +
- "," + HRemarkCol.ToString() +
- "," + HMinQtyCol.ToString();
+ "," + HRemarkCol.ToString();
grdMain.Columns[HBillNoCol].ReadOnly = true;
//璁剧疆鍚堣鍒�
string sTotalCol = HQtyCol.ToString();
@@ -1870,9 +1910,10 @@
//--
//璁剧疆鍙紪杈戝垪
string sAllowCol = HQtyCol.ToString() +
+ "," + HMinQtyCol.ToString() +
+ "," + HAuxPropNumberCol.ToString() +
"," + HBatchNoCol.ToString() +
- "," + HRemarkCol.ToString() +
- "," + HMinQtyCol.ToString();
+ "," + HRemarkCol.ToString();
grdMain.Columns[HBillNoCol].ReadOnly = true;
//璁剧疆鍚堣鍒�
string sTotalCol = HQtyCol.ToString();
--
Gitblit v1.9.1