| | |
| | | using DevExpress.Utils.VisualEffects; |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraEditors.Controls; |
| | | using DevExpress.XtraGrid.Views.Grid; |
| | | using Gs.DevApp.DevFrm.Rk; |
| | | using Gs.DevApp.DevFrm.Rpt; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Gs.DevApp.UserControl; |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | |
| | |
| | | toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; |
| | | toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; |
| | | toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick; |
| | | toolBarMenu1.btnHbClick += ToolBarMenu1_btnHbClick; |
| | | toolBarMenu1.btnPrintClick += ToolBarMenu1_btnPrintClick; |
| | | |
| | | this.toolBarMenu1.getXmlConfig(); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMxL1); |
| | | |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "fstatus", "", (value) => |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); |
| | | }, tips); |
| | | }, tips, true, (strGuid) => { |
| | | getModelList(strGuid); |
| | | }); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => |
| | | { |
| | | getModel(value); |
| | |
| | | }; |
| | | frm.ShowDialog(); |
| | | }; |
| | | ////底部汇总启用 |
| | | // gvMx1.OptionsView.ShowFooter = true; |
| | | |
| | | //// 为某一列设置求和汇总 |
| | | // gvMx1.Columns["quantity"].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum; |
| | | // gvMx1.Columns["quantity"].SummaryItem.DisplayFormat = "合计: {0}"; |
| | | /////底部汇总 |
| | | UtilityHelper.SetupGridSummary(gvMx1, "quantity"); |
| | | //打印比例 |
| | | UtilityHelper.SetSimpleGridColor(gridView1, "barcodeProgress", "=100.00%", "Cell", Color.Green); |
| | | //入库比例 |
| | | UtilityHelper.SetSimpleGridColor(gridView1, "rkbl", "=100.00%", "Cell", Color.Green); |
| | | } |
| | | private void ToolBarMenu1_btnPrintClick(object sender, EventArgs e) |
| | | { |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_billNo, gridView1); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | MsgHelper.Warning("请先选择你要打印的单据!"); |
| | | return; |
| | | } |
| | | |
| | | |
| | | |
| | | //SelectDeleteBar frm = new SelectDeleteBar(rowGuid, "采购入库"); |
| | | //string strCodeList = ""; |
| | | //frm.UpdateParent += (ss, ee) => |
| | | //{ |
| | | // strCodeList = ee.StringSingle; |
| | | //}; |
| | | //frm.ShowDialog(); |
| | | //if (string.IsNullOrEmpty(strCodeList)) |
| | | // return; |
| | | try |
| | | { |
| | | string rptParameter = "rpt_Cgrk{" |
| | | + rowGuid // @inOrderGuid - 单据guid |
| | | + "," + "100" // @isDesign - 重打都是传100 |
| | | + "," + "" // @in1 - 入库时间(扩展用) |
| | | + "," + "" // @in2 - 特采(扩展用) |
| | | + "," + "" // @in3 - 供应商id(扩展用) |
| | | + "," + "" // @in4 - 张数(扩展用) |
| | | + "," + "" // @in5 - 数量(扩展用) |
| | | + "," + "" // @in6 - 扩展用 |
| | | + "}"; |
| | | using (Form rpt = new RptPreview(rowGuid, rptParameter)) |
| | | { |
| | | rpt.ShowDialog(); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.ShowError(ex.Message); |
| | | } |
| | | } |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); |
| | |
| | | private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e) |
| | | { |
| | | _toolCk("EditModelSubmitF"); |
| | | } |
| | | |
| | | private void ToolBarMenu1_btnHbClick(object sender, EventArgs e) |
| | | { |
| | | _toolCk("EditModelSubmitHb"); |
| | | } |
| | | /// <summary> |
| | | /// 取消事件 |
| | |
| | | { |
| | | Guid? _guid = UtilityHelper.ToGuid(row["guid"].ToString()); |
| | | string _msl = row["quantity"].ToString(); |
| | | |
| | | if (string.IsNullOrEmpty(_msl)) |
| | | { |
| | | MsgHelper.ShowError("数量不能为空!"); |
| | |
| | | AboutGuid = Gs.DevApp.ToolBox.UtilityHelper.ToGuid(row["aboutGuid"].ToString()), |
| | | ItemId = int.Parse(row["itemId"].ToString()), |
| | | Quantity = decimal.Parse(row["quantity"].ToString()), |
| | | |
| | | UrgentFlag = Gs.DevApp.ToolBox.UtilityHelper.ToBit(row["urgentFlag"].ToString()), |
| | | Remark = row["memo"].ToString(), |
| | | }); |
| | |
| | | gvList.Add(gvMx1); |
| | | UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false); |
| | | toolBarMenu1.currentAction = ""; |
| | | // 【新增刷新逻辑】保存成功后立即刷新当前模型数据和列表 |
| | | // 刷新当前单据详情 |
| | | getModel(lbGuid.Text.Trim()); |
| | | // 刷新列表页数据 |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | |
| | | // 跳转到查看结果页面 |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6); |
| | | } |
| | | } |
| | |
| | | _webServiceName + _meth, |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | MsgHelper.Warning("提示:" + _rtn.rtnData.outMsg); |
| | | |
| | | if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0) |
| | | { |
| | | MsgHelper.ShowInformation("提示:" + _rtn.rtnData.outMsg); |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | { |
| | | getModel(lbGuid.Text.Trim()); |
| | | } |
| | | int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid); |
| | | gridView1.FocusedRowHandle = rowHandle; |
| | | int _inFieldValue = (_meth == "EditModelSubmit" ? 1 : -1); |
| | | //判断审核后是否变为红章(1:红章已审核 ,-1 黑章未审核) |
| | | int _inFieldValue = ((_meth == "EditModelSubmit" || _meth == "EditModelSubmitHb") ? 1 : -1); |
| | | UtilityHelper.SetCheckIco(gridView1, "fstatus", "checkUser", "checkDate", picCheckBox, this, _inFieldValue.ToString()); |
| | | } |
| | | else |
| | | MsgHelper.ShowError("提示:" + _rtn.rtnData.outMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | |
| | | HistoryDhmxcs frm = new HistoryDhmxcs(mxGuid); |
| | | frm.ShowDialog(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 新增方法:列表显示 |
| | | /// </summary> |
| | | /// <param name="strGuid">主表id</param> |
| | | |
| | | private void getModelList(string strGuid) |
| | | { |
| | | gcMxL1.DataSource = null; |
| | | |
| | | |
| | | var _obj = new |
| | | { |
| | | guid = strGuid,//主建 |
| | | }; |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", _webServiceName + "GetModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | dynamic dy = _rtn.rtnData; |
| | | |
| | | JArray array1 = new JArray(); |
| | | foreach (var a in dy["list"]) |
| | | { |
| | | array1.Add(a); |
| | | } |
| | | DataTable dt1 = JsonConvert.DeserializeObject<DataTable>(array1.ToString()); |
| | | if (dt1.Rows.Count > 0) |
| | | { |
| | | gcMxL1.BindingContext = new BindingContext(); |
| | | gcMxL1.DataSource = dt1; |
| | | gcMxL1.ForceInitialize(); |
| | | gvMxL1.BestFitColumns(); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMxL1); |
| | | } |
| | | else |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMxL1, gvMxL1); |
| | | } |
| | | } |
| | | else |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |