From 7f02c3b0c0111e8fe634e5259f3d05e02bb0e4f7 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期日, 04 二月 2024 16:54:52 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WarM/条码打印/Gy_BarCodeBill.cs | 448 ++++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 368 insertions(+), 80 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 76eab56..f85a342 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"
@@ -44,43 +44,48 @@
public const Int16 HMinQtyCol = 23;
public const Int16 HBQtyCol = 24;
public const Int16 HPackQtyCol = 25;
- public const Int16 HDeptIDCol = 26;
- public const Int16 HDeptNumberCol = 27;
- public const Int16 HDeptNameCol = 28;
- public const Int16 HSourceIDCol = 29;
- public const Int16 HSourceNumberCol = 30;
- public const Int16 HSourceNameCol = 31;
- public const Int16 HDateCol = 32;
- public const Int16 HEndDateCol = 33;
- public const Int16 HSupIDCol = 34;
- public const Int16 HSupNumberCol = 35;
- public const Int16 HSupNameCol = 36;
- public const Int16 HCusIDCol = 37;
- public const Int16 HCusNumberCol = 38;
- public const Int16 HCusNameCol = 39;
- public const Int16 HCusTypeCol = 40;
- public const Int16 HSourceInterIDCol = 41;
- public const Int16 HSourceEntryIDCol = 42;
- public const Int16 HSourceBillNoCol = 43;
- public const Int16 HSourceBillTypeCol = 44;
- public const Int16 HInstructIDCol = 45;
- public const Int16 HInstructNoCol = 46;
- public const Int16 HSeOrderBillIDCol = 47;
- public const Int16 HSeOrderBillNoCol = 48;
- public const Int16 HSeOrderSEQCol = 49;
- public const Int16 HWhIDCol = 50;
- public const Int16 HWhNumberCol = 51;
- public const Int16 HWhNameCol = 52;
- public const Int16 HSPIDCol = 53;
- public const Int16 HSPNumberCol = 54;
- public const Int16 HSPNameCol = 55;
- public const Int16 HinitQtyCol = 56;
- public const Int16 HRemarkCol = 57;
- public const Int16 HPinfanBarCodeCol = 58;
- public const Int16 HMTONoCol = 59;
- public const Int16 HShowDateCol = 60;
- public const Int16 HInnerBillNoCol = 61;
- public const Int16 HMakerCol = 62;
+ public const Int16 HProduceDateCol = 26;
+ public const Int16 HExpiryDateCol = 27;
+ public const Int16 HDeptIDCol = 28;
+ public const Int16 HDeptNumberCol = 29;
+ public const Int16 HDeptNameCol = 30;
+ public const Int16 HSourceIDCol = 31;
+ public const Int16 HSourceNumberCol = 32;
+ public const Int16 HSourceNameCol = 33;
+ public const Int16 HDateCol = 34;
+ public const Int16 HEndDateCol = 35;
+ public const Int16 HSupIDCol = 36;
+ public const Int16 HSupNumberCol = 37;
+ public const Int16 HSupNameCol = 38;
+ public const Int16 HCusIDCol = 39;
+ public const Int16 HCusNumberCol = 40;
+ public const Int16 HCusNameCol = 41;
+ public const Int16 HCusTypeCol = 42;
+ public const Int16 HSourceInterIDCol = 43;
+ public const Int16 HSourceEntryIDCol = 44;
+ public const Int16 HSourceBillNoCol = 45;
+ public const Int16 HSourceBillTypeCol = 46;
+ public const Int16 HInstructIDCol = 47;
+ public const Int16 HInstructNoCol = 48;
+ public const Int16 HSeOrderBillIDCol = 49;
+ public const Int16 HSeOrderBillNoCol = 50;
+ public const Int16 HSeOrderSEQCol = 51;
+ public const Int16 HWhIDCol = 52;
+ public const Int16 HWhNumberCol = 53;
+ public const Int16 HWhNameCol = 54;
+ public const Int16 HSPIDCol = 55;
+ public const Int16 HSPNumberCol = 56;
+ public const Int16 HSPNameCol = 57;
+ public const Int16 HinitQtyCol = 58;
+ public const Int16 HRemarkCol = 59;
+ public const Int16 HPinfanBarCodeCol = 60;
+ public const Int16 HMTONoCol = 61;
+ public const Int16 HShowDateCol = 62;
+ public const Int16 HInnerBillNoCol = 63;
+ public const Int16 HMakerCol = 64;
+ public const Int16 HISKFPERIODCol = 65;
+ public const Int16 HEXPUNITCol = 66;
+ public const Int16 HEXPPERIODCol = 67;
public Int16 HSelectCol = 0;
public Int16 HSno2Col = 1;
@@ -142,6 +147,11 @@
public Int16 HInnerBillNo2Col = 57;
public Int16 HMaker2Col = 58;
public Int16 HEntryID2Col = 59;
+ public Int16 HProduceDate2Col = 60;
+ public Int16 HExpiryDate2Col = 61;
+ public Int16 HISKFPERIOD2Col = 62;
+ public Int16 HEXPUNIT2Col = 63;
+ public Int16 HEXPPERIOD2Col = 64;
//
public string ModName = "85";
public string ModCaption = "鏉$爜鐢熸垚";
@@ -196,6 +206,10 @@
cmbHBarCodeType.Items.Add("浠櫒鎴愬搧鏉$爜瑙勫垯");
cmbHBarCodeType.Items.Add("璇曞墏鎴愬搧鏉$爜瑙勫垯");
}
+ else if (sCapName == "涓帶")
+ {
+ cmbHBarCodeType.Items.Add("鍞竴鏉$爜");
+ }
else
{
//
@@ -205,18 +219,28 @@
//cmbHBarCodeType.Items.Add("鎵樼洏鏉$爜");
}
- //
- cmbSourceBillType.Items.Add("鐢熶骇璁㈠崟");
- cmbSourceBillType.Items.Add("鐢熶骇姹囨姤鍗�");
- cmbSourceBillType.Items.Add("閲囪喘璁㈠崟");
- cmbSourceBillType.Items.Add("鏀舵枡閫氱煡鍗�");
- cmbSourceBillType.Items.Add("濮斿璁㈠崟");
- cmbSourceBillType.Items.Add("閫�璐ч�氱煡鍗�");
- cmbSourceBillType.Items.Add("鍏朵粬鍏ュ簱鍗�");
- cmbSourceBillType.Items.Add("鐩存帴璋冩嫧鍗�");
- cmbSourceBillType.Items.Add("閲囪喘閫�鏂欏崟");
- cmbSourceBillType.Items.Add("鐢熶骇閫�鏂欏崟");
- cmbSourceBillType.Items.Add("缁勮鎷嗗嵏鍗�");
+ //婧愬崟绫诲瀷
+ if (sCapName == "涓帶")
+ {
+ cmbSourceBillType.Items.Add("鐢熶骇姹囨姤鍗�");
+ cmbSourceBillType.Items.Add("鏀舵枡閫氱煡鍗�");
+ }
+ else
+ {
+ cmbSourceBillType.Items.Add("鐢熶骇璁㈠崟");
+ cmbSourceBillType.Items.Add("鐢熶骇姹囨姤鍗�");
+ cmbSourceBillType.Items.Add("閲囪喘璁㈠崟");
+ cmbSourceBillType.Items.Add("鏀舵枡閫氱煡鍗�");
+ cmbSourceBillType.Items.Add("濮斿璁㈠崟");
+ cmbSourceBillType.Items.Add("宸ュ簭姹囨姤鍗�");
+ cmbSourceBillType.Items.Add("宸ュ簭娴佽浆鍗�");
+ cmbSourceBillType.Items.Add("閫�璐ч�氱煡鍗�");
+ cmbSourceBillType.Items.Add("鍏朵粬鍏ュ簱鍗�");
+ cmbSourceBillType.Items.Add("鐩存帴璋冩嫧鍗�");
+ cmbSourceBillType.Items.Add("閲囪喘閫�鏂欏崟");
+ cmbSourceBillType.Items.Add("鐢熶骇閫�鏂欏崟");
+ cmbSourceBillType.Items.Add("缁勮鎷嗗嵏鍗�");
+ }
//
DBUtility.Xt_BaseBillFun.Sub_ClearBill(gbUp);
//
@@ -624,6 +648,45 @@
{
sHRemark= sHRemark+DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0]["HRemark"]);
}
+ else if(DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HExpiryDateCol].Value) == "")
+ {
+ if (DBUtility.ClsPub.isBool(oDsCheck.Tables[0].Rows[0]["HISKFPERIOD"]))
+ {
+ DateTime HProduceDate; //鐢熶骇鏃ユ湡
+ string HEXPUNIT; //淇濊川鏈熷崟浣�
+ int HEXPPERIOD; //淇濊川鏈�
+
+ HProduceDate = dtpHDate.Value;
+ HEXPUNIT = DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0]["HEXPUNIT"]);
+ HEXPPERIOD = DBUtility.ClsPub.isInt(oDsCheck.Tables[0].Rows[0]["HEXPPERIOD"]);
+
+ grdMain.Rows[j].Cells[HISKFPERIODCol].Value = 1;
+ grdMain.Rows[j].Cells[HEXPUNITCol].Value = HEXPUNIT;
+ grdMain.Rows[j].Cells[HEXPPERIODCol].Value = HEXPPERIOD.ToString();
+ grdMain.Rows[j].Cells[HProduceDateCol].Value = HProduceDate.ToShortDateString();
+
+ if (HEXPUNIT == "Y")
+ {
+ grdMain.Rows[j].Cells[HExpiryDateCol].Value = HProduceDate.AddYears(HEXPPERIOD).ToShortDateString();
+ }
+ else if (HEXPUNIT == "M")
+ {
+ grdMain.Rows[j].Cells[HExpiryDateCol].Value = HProduceDate.AddMonths(HEXPPERIOD).ToShortDateString();
+ }
+ else
+ {
+ grdMain.Rows[j].Cells[HExpiryDateCol].Value = HProduceDate.AddDays(HEXPPERIOD).ToShortDateString();
+ }
+ }
+ else
+ {
+ grdMain.Rows[j].Cells[HISKFPERIODCol].Value = 0;
+ grdMain.Rows[j].Cells[HEXPUNITCol].Value = "";
+ grdMain.Rows[j].Cells[HEXPPERIODCol].Value = 0;
+ grdMain.Rows[j].Cells[HProduceDateCol].Value = "";
+ grdMain.Rows[j].Cells[HExpiryDateCol].Value = "";
+ }
+ }
}
}
if(sHRemark!="")
@@ -685,10 +748,10 @@
string HMaterNumber = ""; //鐗╂枡浠g爜
double HSumQty = 0; //浜у搧鏁伴噺
double HMinQty = 0; //鏈�灏忓寘瑁呮暟
- int HBQty = 0; //绠辨暟
+ Int64 HBQty = 0; //绠辨暟
double HQty = 0; //鏁伴噺
string WeiShu = ""; //灏炬暟
- int LSH = 0; //娴佹按鍙�
+ Int64 LSH = 0; //娴佹按鍙�
string LSH2 = ""; //娴佹按鍙疯浆鎹㈡垚瀛楃
string sDate = ""; //鏃ユ湡
string sYear = ""; //骞�
@@ -701,8 +764,10 @@
string HBarCodeBatchNo = ""; //鏉$爜鎵规鍙�
string HBarCodeDate = ""; //鏉$爜鏃ユ湡
int k = 0;
- int n = 0; //鍚屼竴鎵圭敓鎴愭潯鐮佷腑鐨勭鍑犳潯
+ Int64 n = 0; //鍚屼竴鎵圭敓鎴愭潯鐮佷腑鐨勭鍑犳潯
string sTMNumber = ""; //鏉$爜鑷畾涔夊墠缂�
+ string sSourceBillNo = ""; //婧愬崟鍙�
+ string sSourceEntryID = ""; //琛屽彿锛堟簮鍗曞瓙ID锛�
DataSet Ds;
//Ds = oCn.RunProcReturn("exec GetLSH '" + ClsPub.GetServerDate(0) + "'", "GetLSH");
//LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]);
@@ -748,7 +813,7 @@
sTMNumber = HNumber + sYear + sPeriod + sDay;
Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //鑾峰彇鏈�澶ф祦姘村彿
//oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'");
- LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]);
+ LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]);
}
else if (CampanyName == "椋為緳")
{
@@ -763,7 +828,24 @@
sTMNumber = HWorksNumber + HNumber + sYear + sPeriod + sDay;
Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //鑾峰彇鏈�澶ф祦姘村彿
//oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'");
- LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]);
+ LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]);
+ }
+ else if (CampanyName == "涓帶")
+ {
+ sSourceBillNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HBillNoCol].Value);
+ sSourceEntryID = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HSubIDCol].Value);
+ if (sSourceBillNo == "")
+ {
+ //鏉$爜鍓嶇紑 = 缁勭粐浠g爜 + 鐗╂枡浠g爜 + 骞� + 鏈� + 鏃�
+ sTMNumber = HOrgNumber + HNumber + sYear + sPeriod + sDay;
+ Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //鑾峰彇鏈�澶ф祦姘村彿
+ LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]);
+ }
+ else
+ {
+ //鏉$爜 = 婧愬崟鍗曞彿 + 鐗╂枡ID + 琛屽彿
+ sTMNumber = sSourceBillNo + HNumber + sSourceEntryID;
+ }
}
else //閫氱敤鏂规硶
{
@@ -771,7 +853,7 @@
sTMNumber = HOrgNumber + HNumber + sYear + sPeriod + sDay;
Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //鑾峰彇鏈�澶ф祦姘村彿
//oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'");
- LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]);
+ LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]);
}
}
else if (cmbHBarCodeType.Text == "鍝佺鏉$爜")
@@ -789,13 +871,22 @@
{
TM = HOrgNumber + HNumber + HBatchNo;
}//鍗氭棩鐗规畩澶勭悊
+ else if (cmbHBarCodeType.Text == "搴忓垪鐮�")
+ {
+ //鏉$爜瑙勫垯锛� GX+鐗╂枡鍐呯爜+骞村勾鏈堟湀鏃ユ棩+5浣嶆祦姘村彿
+ LSHlen = 5;
+ //鏉$爜鍓嶇紑 = GX+鐗╂枡鍐呯爜+骞村勾鏈堟湀鏃ユ棩
+ sTMNumber = "GX" + HNumber + sYear + sPeriod + sDay;
+ Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //鑾峰彇鏈�澶ф祦姘村彿
+ LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]);
+ }
else if(cmbHBarCodeType.Text == "浠櫒澶栬喘浠舵潯鐮佹櫘閫氳鍒�" || cmbHBarCodeType.Text == "浠櫒澶栬喘浠舵潯鐮佸鍣ㄨ鍒�")
{
//鐗╂枡缂栫爜+鍗曟嵁鏃ユ湡锛圷YMMDD锛�+娴佹按4浣�
sTMNumber = HMaterNumber + sYear + sPeriod + sDay;
Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //鑾峰彇鏈�澶ф祦姘村彿
//oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'");
- LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]);
+ LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]);
LSHlen = 4;
}
else if (cmbHBarCodeType.Text == "浠櫒鎴愬搧鏉$爜瑙勫垯") //鍙﹀澶勭悊浜�
@@ -804,7 +895,7 @@
//sTMNumber = HMaterNumber + sYear + sPeriod + sDay;
//Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //鑾峰彇鏈�澶ф祦姘村彿
// //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'");
- //LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]);
+ //LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]);
}
else if (cmbHBarCodeType.Text == "璇曞墏鎴愬搧鏉$爜瑙勫垯")
{
@@ -812,7 +903,7 @@
sTMNumber = HMaterNumber + HBatchNo ;
Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //鑾峰彇鏈�澶ф祦姘村彿
//oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'");
- LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]);
+ LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]);
LSHlen = 6;
}
else if (cmbHBarCodeType.Text == "鍐呴攢鏈烘潯鐮�")
@@ -822,11 +913,11 @@
sTMNumber = "1" + HModelName + HBarCodeDate + HBarCodeBatchNo + HYasuoji + "00" ;
Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //鑾峰彇鏈�澶ф祦姘村彿
//oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'");
- LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]);
- LSHlen = 5;
- if (sTMNumber.Length != 16)
+ LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]);
+ LSHlen = 4;
+ if (sTMNumber.Length != 16 && sTMNumber.Length != 15)
{
- MessageBox.Show("鏉$爜闀垮害涓嶅16浣嶏紝鏄惁鏁版嵁涓嶅叏锛佸埗閫犳湰閮�1浣�:[0] + 鏈哄瀷浠g爜5浣�:[" + HModelName + "] + 骞存湀鏃�5浣�:["+ HBarCodeDate + "] + 鎵规鍙�2浣�:[" + HBarCodeBatchNo + "]+ 鍘嬬缉鏈�1浣�:["+ HYasuoji + "]+00 ; ");
+ MessageBox.Show("鏉$爜闀垮害涓嶅15鎴�16浣嶏紝鏄惁鏁版嵁涓嶅叏锛佸埗閫犳湰閮�1浣�:[0] + 鏈哄瀷浠g爜5浣�:[" + HModelName + "] + 骞存湀鏃�4鎴�5浣�:["+ HBarCodeDate + "] + 鎵规鍙�2浣�:[" + HBarCodeBatchNo + "]+ 鍘嬬缉鏈�1浣�:["+ HYasuoji + "]+00 ; ");
return;
}
}
@@ -837,11 +928,11 @@
sTMNumber = HMaterNumber.Replace( "." , "" ) + HBarCodeDate + HBarCodeBatchNo;
Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //鑾峰彇鏈�澶ф祦姘村彿
//oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'");
- LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]);
- LSHlen = 5;
- if (sTMNumber.Length != 18)
+ LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]);
+ LSHlen = 4;
+ if (sTMNumber.Length != 18 && sTMNumber.Length != 17)
{
- MessageBox.Show("鏉$爜闀垮害涓嶅18浣嶏紝鏄惁鏁版嵁涓嶅叏锛佺墿鏂欎唬鐮�11浣�:["+ HMaterNumber.Replace(".", "") + "]+骞存湀鏃�5浣�:["+ HBarCodeDate + "]+鎵规鍙�2浣�:[" + HBarCodeBatchNo + "];");
+ MessageBox.Show("鏉$爜闀垮害涓嶅17鎴�18浣嶏紝鏄惁鏁版嵁涓嶅叏锛佺墿鏂欎唬鐮�11浣�:["+ HMaterNumber.Replace(".", "") + "]+骞存湀鏃�4鎴�5浣�:["+ HBarCodeDate + "]+鎵规鍙�2浣�:[" + HBarCodeBatchNo + "];");
return;
}
}
@@ -851,7 +942,7 @@
sTMNumber = HICMOBillNo;
Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //鑾峰彇鏈�澶ф祦姘村彿
//oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'");
- LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]);
+ LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]);
LSHlen = 5;
}
//else if (cmbHBarCodeType.Text == "鎵樼洏鏉$爜")
@@ -864,10 +955,13 @@
return;
}
- HBQty = HBQty + ClsPub.isInt(grdMain.Rows[j].Cells[HBQtyCol].Value);
+ Int64 HBQty2 = 0; //绠辨暟
+ HBQty2 =ClsPub.isLong(grdMain.Rows[j].Cells[HBQtyCol].Value);
+ HBQty = HBQty + ClsPub.isLong(grdMain.Rows[j].Cells[HBQtyCol].Value);
HMinQty = ClsPub.isDoule(grdMain.Rows[j].Cells[HMinQtyCol].Value);
HSumQty = ClsPub.isDoule(grdMain.Rows[j].Cells[HQtyCol].Value);
n = 0;
+ int nn = 0;
for (int i = k; i < HBQty; i++)
{
if (HSumQty - HMinQty > 0)
@@ -895,6 +989,33 @@
LSH2 = "0" + LSH2;
}
if (cmbHBarCodeType.Text == "鍞竴鏉$爜")
+ {
+ if (CampanyName == "涓帶")
+ {
+ if (sSourceBillNo == "")
+ {
+ //鏉$爜缂栧彿 = 鏉$爜鍓嶇紑 + 娴佹按鍙�
+ TM = sTMNumber + LSH2;
+ }
+ else
+ {
+ if (HBQty2 > 1)
+ {
+ MessageBox.Show("鐢熶骇姹囨姤鍗曘�佹敹鏂欓�氱煡鍗曠敓鎴愭潯鐮佹椂锛岀鏁颁笉鑳藉ぇ浜�1锛�");
+ bc.Enabled = true;
+ return;
+ }
+ //鏉$爜缂栧彿 = 鏉$爜鍓嶇紑
+ TM = sTMNumber;
+ }
+ }
+ else
+ {
+ //鏉$爜缂栧彿 = 鏉$爜鍓嶇紑 + 娴佹按鍙�
+ TM = sTMNumber + LSH2;
+ }
+ }
+ else if (cmbHBarCodeType.Text == "搴忓垪鐮�")
{
//鏉$爜缂栧彿 = 鏉$爜鍓嶇紑 + 娴佹按鍙�
TM = sTMNumber + LSH2;
@@ -976,16 +1097,31 @@
grdSub.Rows[i].Cells[HInnerBillNo2Col].Value = grdMain.Rows[j].Cells[HInnerBillNoCol].Value;
grdSub.Rows[i].Cells[HMaker2Col].Value = grdMain.Rows[j].Cells[HMakerCol].Value;
grdSub.Rows[i].Cells[HGiveAwayFlag2Col].Value = grdMain.Rows[j].Cells[HGiveAwayFlagCol].Value;
+ grdSub.Rows[i].Cells[HProduceDate2Col].Value = grdMain.Rows[j].Cells[HProduceDateCol].Value;
+ grdSub.Rows[i].Cells[HExpiryDate2Col].Value = grdMain.Rows[j].Cells[HExpiryDateCol].Value;
+ grdSub.Rows[i].Cells[HISKFPERIOD2Col].Value = grdMain.Rows[j].Cells[HISKFPERIODCol].Value;
+ grdSub.Rows[i].Cells[HEXPUNIT2Col].Value = grdMain.Rows[j].Cells[HEXPUNITCol].Value;
+ grdSub.Rows[i].Cells[HEXPPERIOD2Col].Value = grdMain.Rows[j].Cells[HEXPPERIODCol].Value;
//缃戞牸鎵撳嬀
+ //鏄惁璧犲搧
DataGridViewCheckBoxCell oCell = new DataGridViewCheckBoxCell();
oCell.ThreeState = false;
oCell.Value = grdSub.Rows[i].Cells[HGiveAwayFlag2Col].Value;
oCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
grdSub.Rows[i].Cells[HGiveAwayFlag2Col] = oCell;
+ //鏄惁鍚敤淇濊川鏈�
+ DataGridViewCheckBoxCell oCell2 = new DataGridViewCheckBoxCell();
+ oCell2.ThreeState = false;
+ oCell2.Value = grdSub.Rows[i].Cells[HISKFPERIOD2Col].Value;
+ oCell2.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
+ grdSub.Rows[i].Cells[HISKFPERIOD2Col] = oCell2;
k = k + 1;
n = n + 1;
- oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'");
+ //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'");
+ nn = nn + 1;
}
+ //鍚庡彴鎵归噺鎵ц璇彞
+ oCn.RunProc("exec h_p_WMS_SetMaxNo_QTY '" + sTMNumber + "'," + nn.ToString() + " ");
}
}
string HWei = ""; //灏炬暟
@@ -1022,6 +1158,11 @@
string HInnerBillNo = "";
bool HGiveAwayFlag = false;
Int64 HEntryID = 0;
+ string HProduceDate;
+ string HExpiryDate;
+ bool HISKFPERIOD = false;
+ string HEXPUNIT = "";
+ double HEXPPERIOD = 0;
try
{
oCn.BeginTran();
@@ -1067,13 +1208,34 @@
HSeOrderSEQ = ClsPub.isLong(grdSub.Rows[i].Cells[HSeOrderSEQ2Col].Value);
HInnerBillNo = ClsPub.isStrNull(grdSub.Rows[i].Cells[HInnerBillNo2Col].Value);
HGiveAwayFlag = ClsPub.isBool(grdSub.Rows[i].Cells[HGiveAwayFlag2Col].Value);
+ if (ClsPub.isDate(grdSub.Rows[i].Cells[HProduceDate2Col].Value) < Convert.ToDateTime("1950-01-01"))
+ {
+ HProduceDate = "";
+ }
+ else
+ {
+ HProduceDate = ClsPub.isStrNull(grdSub.Rows[i].Cells[HProduceDate2Col].Value);
+ }
+ if (ClsPub.isDate(grdSub.Rows[i].Cells[HExpiryDate2Col].Value) < Convert.ToDateTime("1950-01-01"))
+ {
+ HExpiryDate = "";
+ }
+ else
+ {
+ HExpiryDate = ClsPub.isStrNull(grdSub.Rows[i].Cells[HExpiryDate2Col].Value);
+ }
+ HISKFPERIOD = ClsPub.isBool(grdSub.Rows[i].Cells[HISKFPERIOD2Col].Value);
+ HEXPUNIT = ClsPub.isStrNull(grdSub.Rows[i].Cells[HEXPUNIT2Col].Value);
+ HEXPPERIOD = ClsPub.isDoule(grdSub.Rows[i].Cells[HEXPPERIOD2Col].Value);
oCn.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" +
",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" +
",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " +
",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark " +
",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate " +
",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HEntryID " +
- ",HGiveAwayFlag,HSeOrderSEQ " +
+ ",HGiveAwayFlag,HSeOrderSEQ,HInitSourceEntryID " +
+ ",HProduceDate,HExpiryDate " +
+ ",HISKFPERIOD,HEXPUNIT,HEXPPERIOD " +
",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo " +
") values ("
+ "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString()
@@ -1081,8 +1243,10 @@
+ ", " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HWei + "'"
+ ", " + HBarcodeQtys.ToString() + "," + HBarcodeNo.ToString() + "," + HDeptID.ToString() + "," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HRemark + "'"
+ ", " + HCusID.ToString() + ",'" + HCusType + "','" + HEndDate.ToShortDateString() + "','" + HWorkLineName + "','" + sDate + "'"
- + ", " + HOrgID.ToString() + "," + HOrgID.ToString() + ",'" + HSeOrderBillNo + "'," + HInterID.ToString() + "," + HEntryID.ToString() + ""
- + ", " + DBUtility.ClsPub.BoolToString(HGiveAwayFlag) + "," + HSeOrderSEQ.ToString()
+ + ", " + HOrgID.ToString() + "," + HOrgID.ToString() + ",'" + HSeOrderBillNo + "'," + HInterID.ToString() + "," + HEntryID.ToString()
+ + ", " + DBUtility.ClsPub.BoolToString(HGiveAwayFlag) + "," + HSeOrderSEQ.ToString() + "," + HSourceEntryID.ToString()
+ + ", " + (HProduceDate == "" ? "NULL" : "'" + HProduceDate + "'") + "," + (HExpiryDate == "" ? "NULL" : "'" + HExpiryDate + "'")
+ + ", " + DBUtility.ClsPub.BoolToString(HISKFPERIOD) + ",'" + HEXPUNIT + "'," + HEXPPERIOD.ToString()
+ ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HInnerBillNo + "')");
@@ -1165,7 +1329,7 @@
string HMaterNumber = ""; //鐗╂枡浠g爜
double HSumQty = 0; //浜у搧鏁伴噺
double HMinQty = 0; //鏈�灏忓寘瑁呮暟
- int HBQty = 0; //绠辨暟
+ Int64 HBQty = 0; //绠辨暟
double HQty = 0; //鏁伴噺
string WeiShu = ""; //灏炬暟
//int LSH = 0; //娴佹按鍙�
@@ -1216,7 +1380,7 @@
// return;
//}
- HBQty = HBQty + ClsPub.isInt(grdMain.Rows[j].Cells[HBQtyCol].Value);
+ HBQty = HBQty + ClsPub.isLong(grdMain.Rows[j].Cells[HBQtyCol].Value);
HMinQty = ClsPub.isDoule(grdMain.Rows[j].Cells[HMinQtyCol].Value);
HSumQty = ClsPub.isDoule(grdMain.Rows[j].Cells[HQtyCol].Value);
n = 0;
@@ -1489,7 +1653,7 @@
//
grdMain.RowCount = 0;
grdSub.RowCount = 0;
- grdMain.ColumnCount = 63; //鎬诲垪鏁�
+ grdMain.ColumnCount = 68; //鎬诲垪鏁�
DBUtility.Xt_BaseBillFun.initGridFst(grdMain, this.Name);
grdMain.Columns[HSnoCol].HeaderText = "搴忓彿";
grdMain.Columns[HMainIDCol].HeaderText = "婧愬崟涓籌D";
@@ -1546,6 +1710,11 @@
grdMain.Columns[HShowDateCol].HeaderText = "鏃ユ湡";
grdMain.Columns[HInnerBillNoCol].HeaderText = "鍐呴儴閲囪喘璁㈠崟鍙�";
grdMain.Columns[HMakerCol].HeaderText = "鍒跺崟浜�";
+ grdMain.Columns[HProduceDateCol].HeaderText = "鐢熶骇鏃ユ湡";
+ grdMain.Columns[HExpiryDateCol].HeaderText = "鏈夋晥鏈熻嚦";
+ grdMain.Columns[HISKFPERIODCol].HeaderText = "鏄惁鍚敤淇濊川鏈�";
+ grdMain.Columns[HEXPUNITCol].HeaderText = "淇濊川鏈熷崟浣�";
+ grdMain.Columns[HEXPPERIODCol].HeaderText = "淇濊川鏈�";
////
//鏍煎紡鍖�
grdMain.Columns[HTagCol].Visible = false; //闅愯棌鍒�
@@ -1593,7 +1762,12 @@
grdMain.Columns[HSourceIDCol].Visible = false;
grdMain.Columns[HSourceNumberCol].Visible = false;
grdMain.Columns[HSourceNameCol].Visible = false;
-
+ //grdMain.Columns[HProduceDateCol].Visible = false;
+ //grdMain.Columns[HExpiryDateCol].Visible = false;
+ grdMain.Columns[HISKFPERIODCol].Visible = false;
+ grdMain.Columns[HEXPUNITCol].Visible = false;
+ grdMain.Columns[HEXPPERIODCol].Visible = false;
+
//璁剧疆鍙紪杈戝垪
string sAllowCol = HQtyCol.ToString()+
"," + HMinQtyCol.ToString() +
@@ -1623,7 +1797,7 @@
DBUtility.Xt_BaseBillFun.initGridLast(sAllowCol, sTotalCol,oSumGrid);
//----------------------------
- grdSub.ColumnCount = 60; //鎬诲垪鏁�
+ grdSub.ColumnCount = 65; //鎬诲垪鏁�
DBUtility.Xt_BaseBillFun.initGridFst(grdSub, this.Name);
grdSub.Columns[HSelectCol].HeaderText = "閫夋嫨";
grdSub.Columns[HTMCol].HeaderText = "鏉$爜缂栧彿";
@@ -1683,6 +1857,11 @@
grdSub.Columns[HInnerBillNo2Col].HeaderText = "鍐呴儴閲囪喘璁㈠崟鍙�";
grdSub.Columns[HMaker2Col].HeaderText = "鍒跺崟浜�";
grdSub.Columns[HEntryID2Col].HeaderText = "琛屽彿";
+ grdSub.Columns[HProduceDate2Col].HeaderText = "鐢熶骇鏃ユ湡";
+ grdSub.Columns[HExpiryDate2Col].HeaderText = "鏈夋晥鏈熻嚦";
+ grdSub.Columns[HISKFPERIOD2Col].HeaderText = "鏄惁鍚敤淇濊川鏈�";
+ grdSub.Columns[HEXPUNIT2Col].HeaderText = "淇濊川鏈熷崟浣�";
+ grdSub.Columns[HEXPPERIOD2Col].HeaderText = "淇濊川鏈�";
//鏍煎紡鍖�
grdSub.Columns[HMaterID2Col].Visible = false;
grdSub.Columns[HModel2Col].Visible = false;
@@ -1731,11 +1910,18 @@
for (int i = 0; i < grdSub.Rows.Count; i++)
{
//缃戞牸鎵撳嬀
+ //鏄惁璧犲搧
DataGridViewCheckBoxCell oCell = new DataGridViewCheckBoxCell();
oCell.ThreeState = false;
oCell.Value = 0;
oCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
grdSub.Rows[i].Cells[HGiveAwayFlag2Col] = oCell;
+ //鏄惁鍚敤淇濊川鏈�
+ DataGridViewCheckBoxCell oCell2 = new DataGridViewCheckBoxCell();
+ oCell2.ThreeState = false;
+ oCell2.Value = 0;
+ oCell2.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
+ grdSub.Rows[i].Cells[HISKFPERIOD2Col] = oCell2;
}
DBUtility.Xt_BaseBillFun.GetGrid(grdMain, this.Name);
@@ -1928,6 +2114,11 @@
grdMain.Rows[sRow].Cells[HUnitIDCol].Value = 0;
grdMain.Rows[sRow].Cells[HUnitNumberCol].Value = "";
grdMain.Rows[sRow].Cells[HUnitNameCol].Value = "";
+ }
+ if (CampanyName == "涓帶")
+ {
+ grdMain.Rows[sRow].Cells[HQtyCol].Value = oMater.omodel.HQtyMin;
+ grdMain.Rows[sRow].Cells[HBQtyCol].Value = 1;
}
oEdit.Text = oMater.omodel.HNumber;
}
@@ -2173,6 +2364,24 @@
FillSelectData(oIF_PackageDismantleBillList.oBillSelectColl);
}
}
+ else if (cmbSourceBillType.Text.Trim() == "宸ュ簭娴佽浆鍗�")
+ {
+ string sWhere = " and HOrgID =" + HOrgID.ToString();
+ DAL.Cls_S_IF_ProcessExchangeBillList oIF_ProcessExchangeBillList = new DAL.Cls_S_IF_ProcessExchangeBillList();
+ if (oIF_ProcessExchangeBillList.Refresh(sWhere)) //閫夋嫨鍘熷崟
+ {
+ FillSelectData(oIF_ProcessExchangeBillList.oBillSelectColl);
+ }
+ }
+ else if (cmbSourceBillType.Text.Trim() == "宸ュ簭姹囨姤鍗�")
+ {
+ string sWhere = " and HOrgID =" + HOrgID.ToString();
+ DAL.Cls_S_IF_ProcessReportBillList oIF_ProcessReportBillList = new DAL.Cls_S_IF_ProcessReportBillList();
+ if (oIF_ProcessReportBillList.Refresh(sWhere)) //閫夋嫨鍘熷崟
+ {
+ FillSelectData(oIF_ProcessReportBillList.oBillSelectColl);
+ }
+ }
else
{
@@ -2244,7 +2453,7 @@
grdMain.Rows.Add();
grdMain.Rows[i].Cells[HTagCol].Value = "*";
//寰楀埌淇℃伅
- Ds = oCn.RunProcReturn("select * from h_v_IF_POStockInList where hmainid=" + oSelectRow.BillMainID + " and hsubid=" + oSelectRow.BillSubID, "h_v_IF_POStockInList");
+ Ds = oCn.RunProcReturn("select * from h_v_IF_POStockInBillList_Source where hmainid=" + oSelectRow.BillMainID + " and hsubid=" + oSelectRow.BillSubID, "h_v_IF_POStockInBillList_Source");
//鍐欏叆淇℃伅
Sub_WriteInForm1(Ds.Tables[0], i);
}
@@ -2318,13 +2527,33 @@
//鍐欏叆淇℃伅
Sub_WriteInForm1(Ds.Tables[0], i);
}
+ //宸ュ簭娴佽浆鍗�
+ if (oSelectRow.BillType == "3772")
+ {
+ grdMain.Rows.Add();
+ grdMain.Rows[i].Cells[HTagCol].Value = "*";
+ //寰楀埌淇℃伅
+ Ds = oCn.RunProcReturn("select * from h_v_IF_ProcessExchangeList where hmainid=" + oSelectRow.BillMainID + " and hsubid=" + oSelectRow.BillSubID, "h_v_IF_ProcessExchangeList");
+ //鍐欏叆淇℃伅
+ Sub_WriteInForm1(Ds.Tables[0], i);
+ }
+ //宸ュ簭姹囨姤鍗�
+ if (oSelectRow.BillType == "3714")
+ {
+ grdMain.Rows.Add();
+ grdMain.Rows[i].Cells[HTagCol].Value = "*";
+ //寰楀埌淇℃伅
+ Ds = oCn.RunProcReturn("select * from h_v_IF_ProcessReportList where hmainid=" + oSelectRow.BillMainID + " and hsubid=" + oSelectRow.BillSubID, "h_v_IF_ProcessReportList");
+ //鍐欏叆淇℃伅
+ Sub_WriteInForm1(Ds.Tables[0], i);
+ }
//鍗虫椂搴撳瓨
if (oSelectRow.BillType == "JSKC")
{
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 HAuxPropID=" + oSelectRow.HAuxPropID + " 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 + "' and 鐢熶骇鏃ユ湡='" + oSelectRow.HProduceDate + "' and 鏈夋晥鏈熻嚦='" + oSelectRow.HExpiryDate + "'", "h_v_KF_ICInventoryList_IF");
//鍐欏叆淇℃伅
Sub_WriteInForm2(Ds.Tables[0], i);
}
@@ -2392,6 +2621,11 @@
{
grdMain.Rows[i].Cells[HMinQtyCol].Value = oTable.Rows[0]["鏈�灏忓寘瑁呮暟"].ToString();
}
+ grdMain.Rows[i].Cells[HProduceDateCol].Value = oTable.Rows[0]["HProduceDate"].ToString();
+ grdMain.Rows[i].Cells[HExpiryDateCol].Value = oTable.Rows[0]["HExpiryDate"].ToString();
+ grdMain.Rows[i].Cells[HISKFPERIODCol].Value = oTable.Rows[0]["HISKFPERIOD"].ToString();
+ grdMain.Rows[i].Cells[HEXPUNITCol].Value = oTable.Rows[0]["HEXPUNIT"].ToString();
+ grdMain.Rows[i].Cells[HEXPPERIODCol].Value = oTable.Rows[0]["HEXPPERIOD"].ToString();
//--
//璁剧疆鍙紪杈戝垪
string sAllowCol = HQtyCol.ToString() +
@@ -2442,6 +2676,11 @@
grdMain.Rows[i].Cells[HUnitNameCol].Value = oTable.Rows[0]["璁¢噺鍗曚綅"].ToString();
grdMain.Rows[i].Cells[HRemarkCol].Value = oTable.Rows[0]["澶囨敞"].ToString();
grdMain.Rows[i].Cells[HMTONoCol].Value = oTable.Rows[0]["璁″垝璺熻釜鍙�"].ToString();
+ grdMain.Rows[i].Cells[HProduceDateCol].Value = oTable.Rows[0]["鐢熶骇鏃ユ湡"].ToString();
+ grdMain.Rows[i].Cells[HExpiryDateCol].Value = oTable.Rows[0]["鏈夋晥鏈熻嚦"].ToString();
+ grdMain.Rows[i].Cells[HISKFPERIODCol].Value = oTable.Rows[0]["HISKFPERIOD"].ToString();
+ grdMain.Rows[i].Cells[HEXPUNITCol].Value = oTable.Rows[0]["HEXPUNIT"].ToString();
+ grdMain.Rows[i].Cells[HEXPPERIODCol].Value = oTable.Rows[0]["HEXPPERIOD"].ToString();
if (cmbHBarCodeType.Text == "浠櫒澶栬喘浠舵潯鐮佸鍣ㄨ鍒�")
{
grdMain.Rows[i].Cells[HMinQtyCol].Value = ClsPub.isDoule(oTable.Rows[0]["鏈敓鎴愭潯鐮佹暟閲�"]);
@@ -2452,7 +2691,14 @@
}
else
{
- grdMain.Rows[i].Cells[HMinQtyCol].Value = oTable.Rows[0]["鏈�灏忓寘瑁呮暟"].ToString();
+ if (CampanyName == "涓帶")
+ {
+ grdMain.Rows[i].Cells[HMinQtyCol].Value = ClsPub.isDoule(oTable.Rows[0]["鏈敓鎴愭潯鐮佹暟閲�"]);
+ }
+ else
+ {
+ grdMain.Rows[i].Cells[HMinQtyCol].Value = oTable.Rows[0]["鏈�灏忓寘瑁呮暟"].ToString();
+ }
}
grdMain.Rows[i].Cells[HMakerCol].Value = ClsPub.CurUserName;
if (cmbSourceBillType.Text.Trim() == "鏀舵枡閫氱煡鍗�"|| cmbSourceBillType.Text.Trim() == "閲囪喘璁㈠崟"
@@ -2548,6 +2794,15 @@
grdMain.Rows[i].Cells[HShowDateCol].Value = dtpHDate.Value.ToShortDateString();
grdMain.Rows[i].Cells[HRemarkCol].Value = "鎸夊簱瀛樼敓鎴�";
grdMain.Rows[i].Cells[HMTONoCol].Value = oTable.Rows[0]["璁″垝璺熻釜鍙�"].ToString();
+ grdMain.Rows[i].Cells[HProduceDateCol].Value = oTable.Rows[0]["鐢熶骇鏃ユ湡"].ToString();
+ grdMain.Rows[i].Cells[HExpiryDateCol].Value = oTable.Rows[0]["鏈夋晥鏈熻嚦"].ToString();
+ grdMain.Rows[i].Cells[HISKFPERIODCol].Value = oTable.Rows[0]["HISKFPERIOD"].ToString();
+ grdMain.Rows[i].Cells[HEXPUNITCol].Value = oTable.Rows[0]["HEXPUNIT"].ToString();
+ grdMain.Rows[i].Cells[HEXPPERIODCol].Value = oTable.Rows[0]["HEXPPERIOD"].ToString();
+ if (CampanyName == "涓帶")
+ {
+ grdMain.Rows[i].Cells[HMinQtyCol].Value = ClsPub.isDoule(oTable.Rows[0]["鏁伴噺"]);
+ }
//--
//璁剧疆鍙紪杈戝垪
string sAllowCol = HQtyCol.ToString() +
@@ -3113,6 +3368,12 @@
grdMain.Rows[row + r].Cells[HMTONoCol].Value = grdMain.Rows[row].Cells[HMTONoCol].Value;
grdMain.Rows[row + r].Cells[HInnerBillNoCol].Value = grdMain.Rows[row].Cells[HInnerBillNoCol].Value;
grdMain.Rows[row + r].Cells[HMakerCol].Value = grdMain.Rows[row].Cells[HMakerCol].Value;
+ //缃戞牸鎵撳嬀
+ DataGridViewCheckBoxCell oCell = new DataGridViewCheckBoxCell();
+ oCell.ThreeState = false;
+ oCell.Value = grdMain.Rows[row].Cells[HGiveAwayFlagCol].Value;
+ oCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
+ grdMain.Rows[row + r].Cells[HGiveAwayFlagCol] = oCell;
}
DBUtility.Xt_BaseBillFun.SetSumGrid(oSumGrid);
@@ -3422,5 +3683,32 @@
MessageBox.Show("鐢熸垚绠辩爜澶辫触锛�" + e1.Message );
}
}
+
+ private void cmbSourceBillType_TextChanged(object sender, EventArgs e)
+ {
+ if (cmbSourceBillType.Text == "宸ュ簭娴佽浆鍗�")
+ {
+ cmbHBarCodeType.Items.Clear();
+ cmbHBarCodeType.Items.Add("搴忓垪鐮�");
+ this.cmbHBarCodeType.SelectedIndex = 0;
+ }
+ else
+ {
+ if (CampanyName == "涓帶")
+ {
+ cmbHBarCodeType.Items.Clear();
+ cmbHBarCodeType.Items.Add("鍞竴鏉$爜");
+ this.cmbHBarCodeType.SelectedIndex = 0;
+ }
+ else
+ {
+ cmbHBarCodeType.Items.Clear();
+ cmbHBarCodeType.Items.Add("鍞竴鏉$爜");
+ cmbHBarCodeType.Items.Add("鍝佺鏉$爜");
+ cmbHBarCodeType.Items.Add("鎵规鏉$爜");
+ this.cmbHBarCodeType.SelectedIndex = 0;
+ }
+ }
+ }
}
}
\ No newline at end of file
--
Gitblit v1.9.1