From 2f7b627c9bddb533c929e6750aad73f8da6a60ae Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期四, 19 六月 2025 13:24:45 +0800 Subject: [PATCH] 打印 --- DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.cs | 199 ++++++++++++++----------------------------------- 1 files changed, 57 insertions(+), 142 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.cs b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.cs index f384a35..4805548 100644 --- a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.cs +++ b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.cs @@ -1,3 +1,5 @@ +using Gs.DevApp.DevFrm.Rk; +using Gs.DevApp.DevFrm.Work; using Gs.DevApp.Entity; using Gs.DevApp.ToolBox; using Gs.DevApp.UserControl; @@ -106,52 +108,6 @@ frm.ShowDialog(); }; gvMx1.FocusedRowChanged += GvMx1_FocusedRowChanged; - this.ucBtnPrint1.btnDesignClick += (s, e) => - { - ucBtnPrint1.rptParameter = "rpt_SCTL{}"; - }; - this.ucBtnPrint1.btnReportClick += (s, e) => - { - ucBtnPrint1.guidKey = ""; - string rowGuid = lbMxGuid.Text.Trim(); - ucBtnPrint1.guidKey = rowGuid; - if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_1.Text.Trim(), txt_yuliang_1.Text.Trim())) - { - Gs.DevApp.ToolBox.MsgHelper.ShowError("璇疯緭鍏ユ纭殑鏉$爜鏁伴噺锛�"); - txt_iCount_1.Focus(); - this.ucBtnPrint1.rptParameter = "return false"; - return; - } - if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_psnQty_1.Text.Trim())) - { - Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�"); - txt_psnQty_1.Focus(); - this.ucBtnPrint1.rptParameter = "return false"; - return; - } - if (lbMxGuid.Text.Trim().Length < 10) - { - Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鐨勮锛�"); - this.ucBtnPrint1.rptParameter = "return false"; - return; - } - this.ucBtnPrint1.rptParameter = "rpt_SCTL{" + lbMxGuid.Text.Trim() - + "," + "" - + "," + Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(txt_yuliang_1.Text.Trim()) - + "," + txt_iCount_1.Text.Trim() - + "," + txt_psnQty_1.Text.Trim() - + "}"; - }; - - //鑷姩璁$畻鎵撳嵃閲� - txt_psnQty_1.TextChanged += (s, e) => - { - 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, txt_yuliang_1); - }; } @@ -207,55 +163,7 @@ _filterList = e.FilterList; getPageList(1); } - private void ToolBarMenu1_btnDesignClick(object sender, EventArgs e) - { - toolBarMenu1.guidKey = ""; - string rowGuid, rowName; - (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, - lbGuid, txt_billNo, gridView1); - toolBarMenu1.guidKey = rowGuid; - toolBarMenu1.rptParameter = "rpt_SCTL{}"; - } - private void ToolBarMenu1_btnReportClick(object sender, EventArgs e) - { - toolBarMenu1.guidKey = ""; - string rowGuid, rowName; - (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, - lbGuid, txt_billNo, gridView1); - toolBarMenu1.guidKey = rowGuid; - if (xtraTabControl1.SelectedTabPageIndex == 0) - { - getModel(rowGuid); - this.toolBarMenu1.rptParameter = "return false"; - return; - } - if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim())) - { - Gs.DevApp.ToolBox.MsgHelper.ShowError("璇疯緭鍏ユ纭殑鏉$爜鏁伴噺锛�"); - txt_iCount_1.Focus(); - this.toolBarMenu1.rptParameter = "return false"; - return; - } - if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim())) - { - Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�"); - txt_psnQty_1.Focus(); - this.toolBarMenu1.rptParameter = "return false"; - return; - } - if (lbMxGuid.Text.Trim().Length < 10) - { - Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鐨勮锛�"); - this.toolBarMenu1.rptParameter = "return false"; - return; - } - this.toolBarMenu1.rptParameter = "rpt_SCTL{" + lbMxGuid.Text.Trim() - + "," + "" - + "," + "" - + "," + txt_iCount_1.Text.Trim() - + "," + txt_psnQty_1.Text.Trim() - + "}"; - } + /// <summary> /// 鎵瑰噯 /// </summary> @@ -473,8 +381,8 @@ MsgHelper.ShowError("鐢宠鏁伴噺涓嶈兘涓虹┖锛�"); return; } - _sl = row["tld014"].ToString(); - if (string.IsNullOrEmpty(_sl)) + string _tld014 = row["tld014"].ToString(); + if (string.IsNullOrEmpty(_tld014)) { MsgHelper.ShowError("閫�鏂欏娉ㄤ笉鑳戒负绌猴紒"); return; @@ -484,8 +392,9 @@ Guid = _guid, AboutGuid = Gs.DevApp.ToolBox.UtilityHelper.ToGuid(row["aboutGuid"].ToString()), Sl = _sl, //鐢宠鏁伴噺 - Remark = row["tld014"].ToString() - }); + Remark = _tld014, + Bllb = row["tld015"].ToString().Replace("|",",") + }); } } try @@ -675,54 +584,12 @@ } } - - /// <summary> - /// 绉诲嚭鏉$爜 - /// </summary> - /// <param name="sender"></param> - /// <param name="e"></param> - private void repositoryItemButtonEdit2_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) - { - var rowhandle = gvMx2.FocusedRowHandle; - if (rowhandle < 0) - return; - if (e.Button.Index == 0) - { - var dr = gvMx2.GetDataRow(rowhandle); - var mxGuid = dr["guid"].ToString(); - if (!MsgHelper.AskQuestion("浣犻�夋嫨浜�1鏉℃暟鎹紝纭畾鍒犻櫎鍚楋紵")) - return; - var _obj = new - { - mxGuid = mxGuid, - inType = "dhtm" - }; - try - { - var strJson = UtilityHelper.HttpPost("", - "VArrivalBarcodeManager/DeleteBarcode", - JsonConvert.SerializeObject(_obj)); - var _rtn = UtilityHelper.ReturnToDynamic(strJson); - if (_rtn.rtnCode > 0) - { - if (_rtn.rtnCode > 0) getModel(lbGuid.Text); - } - MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); - } - catch (Exception ex) - { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); - } - } - } /// <summary> /// 宸ュ叿鏉′簨浠� /// </summary> /// <param name="inFieldValue"></param> private void _toolCk(int _inFieldValue) { - - string strMsg = ""; switch (_inFieldValue) { @@ -749,10 +616,31 @@ } if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵")) return; + + //濡傛灉鏄鏍革紝璇㈤棶瑕佷笉瑕佺敓鎴愯ˉ鏂檅eg + string txt_chkOut = "0"; + if (_inFieldValue == 1 && txt_tbl005.Text.Trim() == "浣滀笟涓嶈壇閫�鏂�") { + var frm = new Frm_MesItemTblShow(); + frm.UpdateParent += (ss, ee) => + { + try + { + txt_chkOut = ee.StringSingle; + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + }; + frm.ShowDialog(); + } + //濡傛灉鏄鏍革紝璇㈤棶瑕佷笉瑕佺敓鎴愯ˉ鏂檈nd + var _obj = new { guid = rowGuid, inFieldValue = _inFieldValue, + chkOut = txt_chkOut }; try { @@ -796,7 +684,6 @@ txtQuantity.Text = row["tld005"].ToString();//鐢宠鎬婚噺 txtYdy.Text = row["ydy"].ToString();//宸叉墦鍗版�婚噺 txt_kQty.Text = row["kdy"].ToString();//鍙墦鍗版�婚噺 - txt_psnQty_1.Text = row["tld005"].ToString(); //榛樿姣忓紶鏉$爜鏁伴噺 } else { @@ -810,5 +697,33 @@ txt_kQty.Text = ""; } } + + + /// <summary> + /// 閫夋嫨涓嶈壇 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void rptBl_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) + { + var rowhandle = gvMx1.FocusedRowHandle; + if (rowhandle < 0) + return; + UcDictionarySelect frm = new UcDictionarySelect("寮傚父鎻忚堪", " a.s_type='QC寮傚父鎻忚堪' and a.pid<>'00000000-0000-0000-0000-000000000000'"); + frm.UpdateParent += (ss, ee) => + { + System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(); + var lst = ee.DynamicList; + foreach (dynamic dym in lst) + { + if (stringBuilder.Length > 0) + stringBuilder.Append("|"); + stringBuilder.Append(dym.dicTxt); + } + gvMx1.SetFocusedRowCellValue("tld015", stringBuilder.ToString()); + // this.TextTxt = ; + }; + frm.ShowDialog(); + } } } \ No newline at end of file -- Gitblit v1.9.3