| | |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "isCheck", "", (value) => |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); |
| | | }); |
| | | }, tips); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => |
| | | { |
| | | getModel(value); |
| | | }, (value) => |
| | | { |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | }); |
| | | }, lbGuid); |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | //选择库存组织(变明细中的物料和变货主) |
| | |
| | | } |
| | | }; |
| | | gvMx1.FocusedRowChanged += GvMx1_FocusedRowChanged; |
| | | this.ucBtnPrint1.btnDesignClick += (s, e) => |
| | | { |
| | | ucBtnPrint1.rptParameter = "rpt_Strk{}"; |
| | | }; |
| | | this.ucBtnPrint1.btnReportClick += (s, e) => |
| | | this.ucBtnPrint1.btnPrintClick += (s, e) => |
| | | { |
| | | 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(); |
| | |
| | | } |
| | | this.ucBtnPrint1.rptParameter = "rpt_Strk{" + 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); |
| | | }; |
| | | } |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); |
| | | Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList); |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName); |
| | | frm.UpdateParent += Frm_UpdateParent; |
| | | frm.ShowDialog(); |
| | | } |
| | |
| | | UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true, gridViews); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx2, gvMx2); |
| | | //增加时,默认组织 |
| | | string deftOrg = UtilityHelper.GetFirstOrg(txt_fStockOrgId); |
| | | } |
| | | /// <summary> |
| | | /// 保存事件 |
| | |
| | | string kcZz = txt_fStockOrgId.GetId();//库存组织 |
| | | string inRkyy = txt_remark.Text.Trim();//原因 |
| | | string kcCk = txt_fStockId.GetId();//仓库 |
| | | string kh=txt_fCustId.GetId();//客户 |
| | | string kh = txt_fCustId.GetId();//客户 |
| | | if (string.IsNullOrEmpty(kcZz)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请选择库存组织!"); |
| | |
| | | kcZz = kcZz,//库存组织 |
| | | kcCk = kcCk,//库存仓库 |
| | | inRkyy = inRkyy,//入库原因 |
| | | kh= kh, |
| | | kh = kh, |
| | | list = new List<dynamic>(), |
| | | }; |
| | | gvMx1.CloseEditor(); |
| | | gvMx1.PostEditor(); |
| | | gvMx1.UpdateCurrentRow(); |
| | | if (gvMx1.DataRowCount <= 0) |
| | | { |
| | |
| | | gvList.Add(gvMx2); |
| | | UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false, gvList); |
| | | toolBarMenu1.currentAction = ""; |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | /// <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, "billNo", "asc", "", _sbSqlWhere.ToString()); |
| | | string json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | |
| | | { |
| | | gcMain1.DataSource = dt; |
| | | gcMain1.ForceInitialize(); |
| | | gridView1.BestFitColumns(); |
| | | gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1); |
| | | } |
| | | else |
| | | UtilityHelper.SetDefaultTable(gcMain1, gridView1); |
| | |
| | | } |
| | | private void getModel(string strGuid) |
| | | { |
| | | gcMx1.DataSource = null; |
| | | bool isEdit = false; |
| | | if (toolBarMenu1.currentAction == "add") return; |
| | | if (toolBarMenu1.currentAction == "edit") isEdit = true; |
| | |
| | | gcMx1.DataSource = dt; |
| | | gcMx1.ForceInitialize(); |
| | | gvMx1.BestFitColumns(); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1); |
| | | } |
| | | else |
| | | { |
| | |
| | | gcMx2.DataSource = dt2; |
| | | gcMx2.ForceInitialize(); |
| | | gvMx2.BestFitColumns(); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx2); |
| | | } |
| | | else |
| | | { |
| | |
| | | txtWlmc.Text = row["itemName"].ToString(); |
| | | txtQuantity.Text = row["sqsl"].ToString();//申请总量 |
| | | txtYdy.Text = row["ydy"].ToString();//已打印总量 |
| | | txtKdy.Text = row["kdy"].ToString();//可打印总量 |
| | | txt_kQty.Text = row["kdy"].ToString();//可打印总量 |
| | | } |
| | | else |
| | | { |
| | | lbMxGuid.Text = ""; |
| | | ucBtnPrint1.guidKey = ""; |
| | | txtWlid.Text = ""; |
| | | txtWlgg.Text = ""; |
| | | txtWlmc.Text = ""; |
| | | txtQuantity.Text = ""; |
| | | txtYdy.Text = ""; |
| | | txt_kQty.Text = ""; |
| | | txt_psnQty_1.Text = ""; |
| | | txt_iCount_1.Text = ""; |
| | | } |
| | | } |
| | | /// <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; |
| | |
| | | try |
| | | { |
| | | var strJson = UtilityHelper.HttpPost("", |
| | | _webServiceName + "DeleteBarcode", |
| | | "VArrivalBarcodeManager/DeleteBarcode", |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |