| | |
| | | public const Int16 HEXPPERIODCol = 43; |
| | | public const Int16 HLSHCol = 44; |
| | | public const Int16 HBaNoCol = 45; |
| | | public const Int16 HCusModelCol = 46; |
| | | // |
| | | public string ModName = "85"; |
| | | public string ModCaption = "浪潮ãå
èå®¢æ·æ ç¾çæ"; |
| | | public string ModCaption = "浪潮ãå
èãé¡ºè¾¾å®¢æ·æ ç¾çæ"; |
| | | public const string ModRightName = "Gy_CusBarCodeBill_KaiBei_LangChao"; |
| | | |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus; |
| | |
| | | public int selectRow = 0; |
| | | public Int64 HInterID = 0; //å
ç |
| | | public Int64 HOrgID = ClsPub.HOrgID; |
| | | public string HCusModel = "Z"; //åå代ç |
| | | public string HCS = "Z"; //åå代ç |
| | | public string sDate = ""; //æ¥æ |
| | | public string sYear = ""; //å¹´ï¼2ä½ï¼ |
| | | public string sYear4 = ""; //å¹´ï¼4ä½ï¼ |
| | |
| | | string HCode2 = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HCode2Col].Value); // æ¹æ¬¡ä½ |
| | | HCode2 = HCode2.ToUpper(); |
| | | string HCode3 = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HCode3Col].Value); // çæ¬å· |
| | | string HBatchNoNumber = HCode1 + sYear + sPeriod + sDay + HCusModel; // æ¹æ¬¡çæåç¼ |
| | | string HBatchNoNumber = HCode1 + sYear + sPeriod + sDay + HCS; // æ¹æ¬¡çæåç¼ |
| | | HBatchNoNumber = HBatchNoNumber.ToUpper(); |
| | | string HBarCodeType = cmbHCusName.Text; // æ¡ç ç±»å |
| | | string HInnerBillNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HInnerBillNoCol].Value); // 客æ·è®¢åå· |
| | |
| | | { |
| | | string TM = ""; //æ¡ç |
| | | int LSHlen = 4; //æµæ°´å·é¿åº¦ |
| | | int LWSHlen = 5; //å¤ç®±æµæ°´å·é¿åº¦ |
| | | double HSumQty = 0; //äº§åæ°é |
| | | double HMinQty = 0; //å
ç®±æå°å
è£
æ° |
| | | int HBQty = 0; //å
ç®±æ° |
| | |
| | | double HQty = 0; //æ°é |
| | | Int64 HCusID = 0; //客æ·ID |
| | | string HCusModelName = ""; //å®¢æ·æå· |
| | | string HCusModel = ""; //客æ·ç©æåç§° |
| | | bool HGiveAwayFlag = false; //èµ åæ è®° |
| | | string HProduceDate; //çäº§æ¥æï¼ä¿è´¨æç¨ï¼ |
| | | string HExpiryDate; //ä¿è´¨æè³ï¼ä¿è´¨æç¨ï¼ |
| | |
| | | string sHCode1 = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HCode1Col].Value); // ç©æç±»å« |
| | | string sHCode2 = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HCode2Col].Value); // æ¹æ¬¡ä½ |
| | | sHCode2 = sHCode2.ToUpper(); |
| | | string HBatchNoNumber = sHCode1 + sYear + sPeriod + sDay + HCusModel; // æ¹æ¬¡çæåç¼ |
| | | string HBatchNoNumber = sHCode1 + sYear + sPeriod + sDay + HCS; // æ¹æ¬¡çæåç¼ |
| | | HBatchNoNumber = HBatchNoNumber.ToUpper(); |
| | | |
| | | DataSet oDsBatchNo = oCn.RunProcReturn("exec h_p_Gy_CusBarCodeBill_KaiBeiLC_GetBatchNo '" + sHSourceBillNo + "'," + sHMaterID.ToString() + ",'" + sHMaterNumber + "','" + sHCusModelName + "','" + sHCode2 + "','" + HBatchNoNumber + "'", "h_p_Gy_CusBarCodeBill_KaiBeiLC_GetBatchNo"); |
| | |
| | | { |
| | | HBarCodeType = "å
èå
ç®±ç "; |
| | | } |
| | | else if (cmbHCusName.Text.Contains("顺达")) |
| | | { |
| | | HBarCodeType = "顺达å
ç®±ç "; |
| | | } |
| | | else |
| | | { |
| | | HBarCodeType = "å
ç®±ç "; |
| | |
| | | HQty = HMinQty; |
| | | HCusID = ClsPub.isLong(cmbHCusName.SelectedValue); |
| | | HCusModelName = ClsPub.isStrNull(grdMain.Rows[j].Cells[HCusModelNameCol].Value); |
| | | HCusModel = ClsPub.isStrNull(grdMain.Rows[j].Cells[HCusModelCol].Value); |
| | | HGiveAwayFlag = ClsPub.isBool(grdMain.Rows[j].Cells[HGiveAwayFlagCol].Value); |
| | | HISKFPERIOD = ClsPub.isBool(grdMain.Rows[j].Cells[HISKFPERIODCol].Value); |
| | | HProduceDate = ClsPub.isStrNull(grdMain.Rows[j].Cells[HProduceDateCol].Value); |
| | |
| | | HCode2 = ClsPub.isStrNull(grdMain.Rows[j].Cells[HCode2Col].Value).ToUpper(); |
| | | HCode3 = ClsPub.isStrNull(grdMain.Rows[j].Cells[HCode3Col].Value).ToUpper(); |
| | | HSno = LSH; |
| | | HBoxNo = HCode1 + sYear + sPeriod + sDay + HCusModel; |
| | | HBoxNo = HCode1 + sYear + sPeriod + sDay + HCS; |
| | | HBoxNo = HBoxNo.ToUpper(); |
| | | sHBaNo = ClsPub.isStrNull(grdMain.Rows[j].Cells[HBaNoCol].Value); // çé¢ä¸è¾å
¥çæ¹æ¬¡ä½ |
| | | |
| | | //å®¢æ·æå·HCusModelNameãç©æç±»å«HCode1ãæ¹æ¬¡ä½HCode2ãçæ¬å·HCode3ãæ¹æ¬¡åºåå·HSnoãæ¹æ¬¡çæåç¼HBoxNoãåå代ç HCusModel |
| | | //å®¢æ·æå·HCusModelNameãç©æç±»å«HCode1ãæ¹æ¬¡ä½HCode2ãçæ¬å·HCode3ãæ¹æ¬¡åºåå·HSnoãæ¹æ¬¡çæåç¼HBoxNoã客æ·ç©æåç§°HCusModel |
| | | //çé¢ä¸è¾å
¥çæ¹æ¬¡ä½HSupNameã36è¿å¶æ¹æ¬¡åºåå·HSupNumberã客æ·è®¢åå·HInnerBillNoãå¹´å¨HWorkLineName |
| | | oCn.RunProc("insert into Gy_BarCodeBill_Cus" + |
| | | "(HInterID,HEntryID,HBillType,HBarCode,HBarCodeType" + |
| | |
| | | HCode3 = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HCode3Col].Value); |
| | | if (cmbHCusName.Text.Contains("å
è")) |
| | | { |
| | | LWSHlen = 5; |
| | | HBarCodeType = "å
èå¤ç®±ç "; |
| | | //è·åæå¤§æµæ°´å· |
| | | //æ¡ç åç¼ = 'CA'+å¹´å¨ |
| | |
| | | Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | LWSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]); |
| | | } |
| | | else if (cmbHCusName.Text.Contains("顺达")) |
| | | { |
| | | LWSHlen = 6; |
| | | HBarCodeType = "顺达å¤ç®±ç "; |
| | | //è·åæå¤§æµæ°´å· |
| | | //æ¡ç åç¼ = 'B103288'+å¹´å¨ |
| | | sTMNumber = "B103288" + sYearWeek; |
| | | Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | LWSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]); |
| | | } |
| | | else |
| | | { |
| | | LWSHlen = 5; |
| | | HBarCodeType = "å¤ç®±ç "; |
| | | //è·åæå¤§æµæ°´å· |
| | | //æ¡ç åç¼ = ä¾åºå代ç + å¹´ + æ + æ¥ |
| | | sTMNumber = HCusModel + sYear4 + sPeriod2 + sDay; |
| | | sTMNumber = HCS + sYear4 + sPeriod2 + sDay; |
| | | Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | LWSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]); |
| | | } |
| | |
| | | // |
| | | LWSH = LWSH + 1; |
| | | LSH2 = LWSH.ToString(); |
| | | while (LSH2.Length < 5) //å¦ææµæ°´å·ä½æ°å°äº 5 åé¢è¡¥0 |
| | | while (LSH2.Length < LWSHlen) //妿å¤ç®±æµæ°´å·ä½æ°å°äº å¤ç®±æµæ°´å·é¿åº¦ åé¢è¡¥0 |
| | | { |
| | | LSH2 = "0" + LSH2; |
| | | } |
| | |
| | | HQty = HWMinQty; |
| | | HCusID = ClsPub.isLong(cmbHCusName.SelectedValue); |
| | | HCusModelName = ClsPub.isStrNull(grdMain.Rows[j].Cells[HCusModelNameCol].Value); |
| | | HCusModel = ClsPub.isStrNull(grdMain.Rows[j].Cells[HCusModelCol].Value); |
| | | HGiveAwayFlag = ClsPub.isBool(grdMain.Rows[j].Cells[HGiveAwayFlagCol].Value); |
| | | HISKFPERIOD = ClsPub.isBool(grdMain.Rows[j].Cells[HISKFPERIODCol].Value); |
| | | HProduceDate = ClsPub.isStrNull(grdMain.Rows[j].Cells[HProduceDateCol].Value); |
| | |
| | | HCode2 = ClsPub.isStrNull(grdMain.Rows[j].Cells[HCode2Col].Value).ToUpper(); |
| | | HCode3 = ClsPub.isStrNull(grdMain.Rows[j].Cells[HCode3Col].Value).ToUpper(); |
| | | HSno = 0; |
| | | HBoxNo = HCode1 + sYear + sPeriod + sDay + HCusModel; |
| | | HBoxNo = HCode1 + sYear + sPeriod + sDay + HCS; |
| | | HBoxNo = HBoxNo.ToUpper(); |
| | | sHBaNo = ClsPub.isStrNull(grdMain.Rows[j].Cells[HBaNoCol].Value); // çé¢ä¸è¾å
¥çæ¹æ¬¡ä½ |
| | | |
| | | //å®¢æ·æå·HCusModelNameãç©æç±»å«HCode1ãæ¹æ¬¡ä½HCode2ãçæ¬å·HCode3ãæ¹æ¬¡åºåå·HSnoãæ¹æ¬¡çæåç¼HBoxNoãåå代ç HCusModel |
| | | //å®¢æ·æå·HCusModelNameãç©æç±»å«HCode1ãæ¹æ¬¡ä½HCode2ãçæ¬å·HCode3ãæ¹æ¬¡åºåå·HSnoãæ¹æ¬¡çæåç¼HBoxNoã客æ·ç©æåç§°HCusModel |
| | | //çé¢ä¸è¾å
¥çæ¹æ¬¡ä½HSupNameã36è¿å¶æ¹æ¬¡åºåå·HSupNumberã客æ·è®¢åå·HInnerBillNoãå¹´å¨HWorkLineName |
| | | oCn.RunProc("insert into Gy_BarCodeBill_Cus" + |
| | | "(HInterID,HEntryID,HBillType,HBarCode,HBarCodeType" + |
| | |
| | | private void Display() |
| | | { |
| | | //å·æ°å
ç®±ç å表 |
| | | DataSet DSet = oCn.RunProcReturn("select * from h_v_Gy_BarCodeBill_CusList where HInterID=" + HInterID.ToString() + " and (æ¡ç ç±»å='å
ç®±ç ' or æ¡ç ç±»å='å
èå
ç®±ç ') order by HItemID", "h_v_Gy_BarCodeBill_CusList", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | DataSet DSet = oCn.RunProcReturn("select * from h_v_Gy_BarCodeBill_CusList where HInterID=" + HInterID.ToString() + " and (æ¡ç ç±»å='å
ç®±ç ' or æ¡ç ç±»å='å
èå
ç®±ç ' or æ¡ç ç±»å='顺达å
ç®±ç ') order by HItemID", "h_v_Gy_BarCodeBill_CusList", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //çæé¦è¡æ é¢ |
| | | if (DSet == null) |
| | | { |
| | |
| | | grdSub.DataSource = DSet.Tables[0].DefaultView; |
| | | |
| | | //å·æ°å¤ç®±ç å表 |
| | | DataSet DWSet = oCn.RunProcReturn("select * from h_v_Gy_BarCodeBill_CusList where HInterID=" + HInterID.ToString() + " and (æ¡ç ç±»å='å¤ç®±ç ' or æ¡ç ç±»å='å
èå¤ç®±ç ') order by HItemID", "h_v_Gy_BarCodeBill_CusList", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | DataSet DWSet = oCn.RunProcReturn("select * from h_v_Gy_BarCodeBill_CusList where HInterID=" + HInterID.ToString() + " and (æ¡ç ç±»å='å¤ç®±ç ' or æ¡ç ç±»å='å
èå¤ç®±ç ' or æ¡ç ç±»å='顺达å¤ç®±ç ') order by HItemID", "h_v_Gy_BarCodeBill_CusList", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //çæé¦è¡æ é¢ |
| | | if (DWSet == null) |
| | | { |
| | |
| | | private void initGrid() |
| | | { |
| | | grdMain.RowCount = 0; |
| | | grdMain.ColumnCount = 46; //æ»åæ° |
| | | grdMain.ColumnCount = 47; //æ»åæ° |
| | | DBUtility.Xt_BaseBillFun.initGridFst(grdMain, this.Name); |
| | | grdMain.Columns[HSnoCol].HeaderText = "åºå·"; |
| | | grdMain.Columns[HMainIDCol].HeaderText = "æºå主ID"; |
| | |
| | | grdMain.Columns[HMaterNameCol].HeaderText = "ç©æåç§°"; |
| | | grdMain.Columns[HMaterModelCol].HeaderText = "è§æ ¼åå·"; |
| | | grdMain.Columns[HCusModelNameCol].HeaderText = "å®¢æ·æå·"; |
| | | grdMain.Columns[HCusModelCol].HeaderText = "客æ·ç©æåç§°"; |
| | | grdMain.Columns[HUnitIDCol].HeaderText = "计éåä½ID"; |
| | | grdMain.Columns[HUnitNumberCol].HeaderText = "计éåä½ä»£ç "; |
| | | grdMain.Columns[HUnitNameCol].HeaderText = "计éåä½åç§°"; |
| | |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | grdMain.Rows[j].Cells[HCusModelNameCol].Value = ""; |
| | | grdMain.Rows[j].Cells[HCusModelCol].Value = ""; |
| | | } |
| | | else |
| | | { |
| | | grdMain.Rows[j].Cells[HCusModelNameCol].Value = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HCusRelationNumber"]); |
| | | grdMain.Rows[j].Cells[HCusModelCol].Value = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HCusRelationName"]); |
| | | if (num == 2) |
| | | { |
| | | grdMain.Rows[j].Cells[HCode1Col].Value = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HCode1"]); |