lu
2025-06-06 33e40a739ef06ee82f6c1869ce4f5088b57ed769
DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs
@@ -30,9 +30,13 @@
            this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1;
            this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
            this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
            toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
            toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
            toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
            this.toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
            this.toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
            this.toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
            this.toolBarMenu1.btnCaiGouChkClick += ToolBarMenu1_btnCaiGouChkClick;
            this.toolBarMenu1.btnCaiGouFchkClick += ToolBarMenu1_btnCaiGouFchkClick;
            this.toolBarMenu1.btnCaiWuChkClick += ToolBarMenu1_btnCaiWuChkClick;
            this.toolBarMenu1.btnCaiWuFchkClick += ToolBarMenu1_btnCaiWuFchkClick;
            this.toolBarMenu1.getXmlConfig();
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2);
@@ -89,14 +93,14 @@
                ucBtnPrint1.guidKey = "";
                string rowGuid = lbMxGuid.Text.Trim();
                ucBtnPrint1.guidKey = rowGuid;
                if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim()))
                if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_1.Text.Trim(), txt_yuliang_1.Text.Trim()))
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码张数!");
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("请输入正确的条码数量!");
                    txt_iCount_1.Focus();
                    this.ucBtnPrint1.rptParameter = "return false";
                    return;
                }
                if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim()))
                if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_psnQty_1.Text.Trim()))
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码数量!");
                    txt_psnQty_1.Focus();
@@ -111,7 +115,7 @@
                }
                this.ucBtnPrint1.rptParameter = "rpt_Qtrk{" + lbMxGuid.Text.Trim()
                       + "," + ""
                       + "," + Gs.DevApp.ToolBox.UtilityHelper.PrintYuLiang(radOut).ToString()
                       + "," + Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(txt_yuliang_1.Text.Trim())
                       + "," + txt_iCount_1.Text.Trim()
                       + "," + txt_psnQty_1.Text.Trim()
                       + "}";
@@ -120,14 +124,15 @@
            //自动计算打印量
            txt_psnQty_1.TextChanged += (s, e) =>
            {
                Gs.DevApp.ToolBox.UtilityHelper.PrintJiSuan(txt_psnQty_1, txt_iCount_1, txt_kQty.Text.Trim(), radOut);
                Gs.DevApp.ToolBox.UtilityHelper.PrintJiSuan(txt_psnQty_1, txt_iCount_1, txt_kQty.Text.Trim(), radOut, txt_yuliang_1);
            };
            radOut.SelectedIndexChanged += (s, e) =>
            {
                Gs.DevApp.ToolBox.UtilityHelper.PrintAuto(txt_psnQty_1, txt_iCount_1, radOut);
                Gs.DevApp.ToolBox.UtilityHelper.PrintAuto(txt_psnQty_1, txt_iCount_1, radOut, txt_yuliang_1);
            };
        }
        private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
        {
            _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
@@ -200,7 +205,7 @@
        {
            string rowGuid = "", rowName = "";
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                lbGuid, txt_qtck, gridView1, "qtck");
                lbGuid, txt_qtck, gridView1,"qtck");
            if (string.IsNullOrEmpty(rowGuid))
            {
                MsgHelper.Warning("请先选择你要操作的行!");
@@ -314,7 +319,7 @@
            string kcZz = txt_qt022.GetId();//库存组织
            string kcBm = txt_qt009.GetId();//库存部门
            string kcGys = txt_qt018.GetId();//库存供应商
            string djLx = txt_qt003.Text.Trim();//单据类型
            string djLx = txt_qt003.TextTxt.Trim();//单据类型
            string kcfx = txt_qt019.Text.Trim();//库存方向
            string inHzlx = ucLookHuoZhu1.GetHzLx();//货主类型
            string inHz = ucLookHuoZhu1.GetHzId();//货主
@@ -336,7 +341,7 @@
                Gs.DevApp.ToolBox.MsgHelper.Warning("请选择货主!");
                return;
            }
            if (txt_qt003.SelectedIndex < 0)
            if (txt_qt003.TextTxt.Length < 0)
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("请选择单据类型!");
                txt_qt003.Focus();
@@ -434,7 +439,7 @@
        /// <param name="pageSize">每页几条</param>
        private void getPageList(int curPage)
        {
            var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
            gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
            PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "qt001", "asc", "", _sbSqlWhere.ToString());
            string json = JsonConvert.SerializeObject(pgq);
            try
@@ -469,6 +474,10 @@
                ToolBox.MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
        /// <summary>
        /// 读取实体
        /// </summary>
        /// <param name="strGuid"></param>
        private void getModel(string strGuid)
        {
            gcMx1.DataSource = null;
@@ -564,7 +573,11 @@
            gvMx1.SetFocusedRowCellValue("kcDw", SelectedDataRow["dwName"]);
            gvMx1.SetFocusedRowCellValue("itemId", SelectedDataRow["id"]);
        }
        /// <summary>
        /// 移出明细
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            var rowhandle = gvMx1.FocusedRowHandle;
@@ -625,7 +638,46 @@
        {
            _toolCk(0);
        }
        /// <summary>
        /// 财务审核
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <exception cref="NotImplementedException"></exception>
        private void ToolBarMenu1_btnCaiWuChkClick(object sender, EventArgs e)
        {
            _toolCk(30);
        }
        /// <summary>
        /// 财务反审核
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <exception cref="NotImplementedException"></exception>
        private void ToolBarMenu1_btnCaiWuFchkClick(object sender, EventArgs e)
        {
            _toolCk(31);
        }
        /// <summary>
        /// 采购审核
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolBarMenu1_btnCaiGouChkClick(object sender, EventArgs e)
        {
            _toolCk(40);
        }
        /// <summary>
        /// 采购反审核
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolBarMenu1_btnCaiGouFchkClick(object sender, EventArgs e)
        {
            _toolCk(41);
        }
        /// <summary>
        /// 工具条事件
        /// </summary>
@@ -640,6 +692,18 @@
                    break;
                case 0:
                    strMsg = "反审核";
                    break;
                      case 30:
                    strMsg = "财务审核";
                    break;
                case 31:
                    strMsg = "财务反审核";
                    break;
                case 40:
                    strMsg = "采购审核";
                    break;
                case 41:
                    strMsg = "采购反审核";
                    break;
            };
            toolBarMenu1.guidKey = "";
@@ -671,9 +735,14 @@
                    {
                        getModel(lbGuid.Text.Trim());
                    }
                    int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid);
                    //int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid);
                    //gridView1.FocusedRowHandle = rowHandle;
                    //UtilityHelper.SetCheckIco(gridView1, "isSh", "qt016", "qt002", picCheckBox, this, _inFieldValue.ToString());
                    //注意,这里和其它页面有点不一样
                    getPageList(this.pageBar1.CurrentPage);
                    int rowHandle = gridView1.LocateByValue("guid", rowGuid);
                    gridView1.FocusedRowHandle = rowHandle;
                    UtilityHelper.SetCheckIco(gridView1, "isSh", "qt016", "qt002", picCheckBox, this, _inFieldValue.ToString());
                }
            }
            catch (Exception ex)
@@ -711,12 +780,14 @@
            }
        }
        /// <summary>
        /// 移出条码
        /// 重打条码
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void repositoryItemButtonEdit2_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            MsgHelper.ShowInformation("功能开发中!");
            return;
            var rowhandle = gvMx2.FocusedRowHandle;
            if (rowhandle < 0)
                return;