| | |
| | | //选择需要入库的明细 |
| | | btnSelect.Click += (s, e) => |
| | | { |
| | | tabMx.SelectedTabPageIndex = 0; |
| | | string _tbl002 = txt_tbl002.GetId(); |
| | | if (string.IsNullOrEmpty(_tbl002)) |
| | | { |
| | |
| | | gvMx1.CloseEditor(); |
| | | gvMx1.PostEditor(); |
| | | gvMx1.UpdateCurrentRow(); |
| | | gridView1.BestFitColumns(); |
| | | gvMx1.BestFitColumns(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | }; |
| | | frm.ShowDialog(); |
| | | }; |
| | | //打印事件 |
| | | #region 打印相关 |
| | | //预览打印事件 |
| | | this.ucBtnPrint1.btnPrintClick += (s, e) => |
| | | { |
| | | 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_iCount_1.Text = ""; |
| | | txt_psnQty_1.Text = ""; |
| | | _print(0); |
| | | }; |
| | | //打印批量操作事件 |
| | | this.ucBtnPrint1.btnAllClick += (s, e) => |
| | |
| | | } |
| | | } |
| | | }; |
| | | //直接打印事件 |
| | | this.ucBtnPrint1.btnZhiJieClick += (s, e) => |
| | | { |
| | | _print(1); |
| | | }; |
| | | gvMx1.FocusedRowChanged += GvMx1_FocusedRowChanged; |
| | | //打印自动计算 |
| | | txt_psnQty_1.TextChanged += (s, e) => |
| | |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.PrintAuto(txt_psnQty_1, txt_iCount_1, radOut, txt_yuliang_1); |
| | | }; |
| | | #endregion |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 打印 |
| | | /// </summary> |
| | | /// <param name="type">0表示预览打印,1表示直接打印</param> |
| | | private void _print(int type) |
| | | { |
| | | 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_iCount_1.Text = ""; |
| | | txt_psnQty_1.Text = ""; |
| | | } |
| | | private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); |
| | |
| | | { |
| | | _toolCk(5); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 审核事件 |
| | | /// </summary> |
| | |
| | | txt_tbl005.Focus(); |
| | | return; |
| | | } |
| | | if ((txt_tbl005.Text.Trim()=="良品退料") && txt_chkOut.Checked) |
| | | if ((txt_tbl005.Text.Trim() == "良品退料") && txt_chkOut.Checked) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("良品退料不能自动生成补料单,\n只有作业不良类型才能生成补料单,\n 请检查!"); |
| | | txt_tbl005.Focus(); |
| | |
| | | getModel(lbGuid.Text); |
| | | } |
| | | else |
| | | MsgHelper.ShowError("提示:" + _rtn.rtnMsg); |
| | | MsgHelper.ShowError("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | { |
| | | guid = rowGuid, |
| | | inFieldValue = _inFieldValue, |
| | | |
| | | |
| | | }; |
| | | try |
| | | { |