yxj
2023-11-02 5cdd75c0b3a95e96d380a12692e6464113efc96b
条码生成模块,按库存生成条码时增加写入生产日期、有效期至等
3个文件已修改
101 ■■■■■ 已修改文件
BLL/系统公用CLS/Cls_S_KF_ICInventoryList_IF.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/基础资料/BillSelect.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/条码打印/Gy_BarCodeBill.cs 93 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BLL/ϵͳ¹«ÓÃCLS/Cls_S_KF_ICInventoryList_IF.cs
@@ -31,7 +31,7 @@
        public bool Refresh(string sWhere)
        {
            string sErr = "";
            int MainIDCol, SubIDCol, SPIDCol, BatchNoCol, AuxPropIDCol, MTONoCol;
            int MainIDCol, SubIDCol, SPIDCol, BatchNoCol, AuxPropIDCol, MTONoCol, HProduceDateCol, HExpiryDateCol;
            string stmp;
            string tSQL;
            try
@@ -46,6 +46,8 @@
                BatchNoCol = oFrm.Fun_GetCol("批次");
                AuxPropIDCol = oFrm.Fun_GetCol("HAuxPropID");
                MTONoCol = oFrm.Fun_GetCol("计划跟踪号");
                HProduceDateCol = oFrm.Fun_GetCol("生产日期");
                HExpiryDateCol = oFrm.Fun_GetCol("有效期至");
                //
                //循环 é€‰ä¸­è¡Œ
                if (oFrm.OKTag == Pub_Class.ClsPub.Enum_OKTag.OKTag_OK)
@@ -59,6 +61,8 @@
                        oSelect.BatchNo = DBUtility.ClsPub.isStrNull(oFrm.grdMain.Rows[oFrm.grdMain.SelectedRows[i].Index].Cells[BatchNoCol].Value);
                        oSelect.HAuxPropID = DBUtility.ClsPub.isLong(oFrm.grdMain.Rows[oFrm.grdMain.SelectedRows[i].Index].Cells[AuxPropIDCol].Value);
                        oSelect.BillNo = DBUtility.ClsPub.isStrNull(oFrm.grdMain.Rows[oFrm.grdMain.SelectedRows[i].Index].Cells[MTONoCol].Value);
                        oSelect.HProduceDate = DBUtility.ClsPub.isDate(oFrm.grdMain.Rows[oFrm.grdMain.SelectedRows[i].Index].Cells[HProduceDateCol].Value);
                        oSelect.HExpiryDate = DBUtility.ClsPub.isDate(oFrm.grdMain.Rows[oFrm.grdMain.SelectedRows[i].Index].Cells[HExpiryDateCol].Value);
                        oSelect.BillTitle = mvarReportTitle;
                        oSelect.BillType = mvarItemKey;
                        oBillSelectColl.Add(oSelect);
DBUtility/»ù´¡×ÊÁÏ/BillSelect.cs
@@ -14,5 +14,7 @@
        public Int64 SPID;
        public string BatchNo;
        public Int64 HAuxPropID;
        public DateTime HProduceDate;   //生产日期
        public DateTime HExpiryDate;    //有效期至
    }
}
WarM/ÌõÂë´òÓ¡/Gy_BarCodeBill.cs
@@ -44,45 +44,45 @@
        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 = 63;
        public const Int16 HExpiryDateCol = 64;
        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;
@@ -636,8 +636,8 @@
                    {
                        sHRemark= sHRemark+DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0]["HRemark"]);
                    }
                    else
                    {
                    else if(DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HExpiryDateCol].Value) == "")
                    {
                        if (DBUtility.ClsPub.isBool(oDsCheck.Tables[0].Rows[0]["HISKFPERIOD"]))
                        {
                            DateTime HProduceDate;  //生产日期
@@ -1707,8 +1707,8 @@
            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[HProduceDateCol].Visible = false;
            //grdMain.Columns[HExpiryDateCol].Visible = false;
            grdMain.Columns[HISKFPERIODCol].Visible = false;
            grdMain.Columns[HEXPUNITCol].Visible = false;
            grdMain.Columns[HEXPPERIODCol].Visible = false;
@@ -2493,7 +2493,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 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);
                }
@@ -2717,6 +2717,11 @@
            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();
            //--
            //设置可编辑列
            string sAllowCol = HQtyCol.ToString() +