| | |
| | | |
| | | namespace Gs.DevApp.DevFrm.WOM |
| | | { |
| | | public partial class FrmBackFlash : DevExpress.XtraEditors.XtraForm |
| | | public partial class FrmAutoRk : DevExpress.XtraEditors.XtraForm |
| | | { |
| | | string _webServiceName = "MesBackFlash/"; |
| | | string _webServiceName = "MesAutoRk/"; |
| | | List<FilterEntity> _filterList = new List<FilterEntity>(); |
| | | string _ucBm = "";//领料部门 |
| | | string _ucCk = "";//发料仓库 |
| | | string _ucKw = "";//发料库位 |
| | | string _ucWl = "";//料 |
| | | public FrmBackFlash() |
| | | string _orgId = ""; |
| | | public FrmAutoRk() |
| | | { |
| | | InitializeComponent(); |
| | | this.toolBarMenu1.btnAddClick += ToolBarMenu1_btnAddClick; |
| | | this.toolBarMenu1.btnEdtClick += ToolBarMenu1_btnEdtClick; |
| | | this.toolBarMenu1.btnSaveClick += ToolBarMenu1_btnSaveClick; |
| | | this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick; |
| | | this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1; |
| | |
| | | //选择库存组织(变明细中的物料和变货主) |
| | | this.txt_orgId.EditChanged += (s, e) => |
| | | { |
| | | string _orgId = txt_orgId.GetId(); |
| | | _orgId = txt_orgId.GetId(); |
| | | if (string.IsNullOrEmpty(_orgId)) |
| | | return; |
| | | txt_depotId.getSuppler(_orgId, _ucCk); |
| | |
| | | txt_itemNo.Text = txt_ItemId.GetCode(); |
| | | txt_itemModel.Text = txt_ItemId.GetModel(); |
| | | }; |
| | | this.txt_depotId.EditChanged += (s, e) => |
| | | { |
| | | string _depotId = txt_depotId.GetId(); |
| | | txt_kwId.getSuppler(_orgId, _depotId, _ucKw); |
| | | }; |
| | | } |
| | | |
| | | private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); |
| | |
| | | private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e) |
| | | { |
| | | string rowGuid = "", rowName = ""; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_itemNo, gridView1, "guid"); |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_itemNo, gridView1, "itemNo"); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | |
| | | if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定删除吗?")) |
| | | return; |
| | | List<dynamic> lst = new List<dynamic>(); |
| | | lst.Add(rowGuid); |
| | | var _obj = lst; |
| | | var _obj = new |
| | | { |
| | | guid = UtilityHelper.ToGuid(rowGuid), |
| | | }; |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", _webServiceName + "DeleteModel", JsonConvert.SerializeObject(_obj)); |
| | |
| | | //增加时,默认组织 |
| | | string deftOrg = UtilityHelper.GetFirstOrg(txt_orgId); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 修改事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e) |
| | | { |
| | | toolBarMenu1.currentAction = "edit"; |
| | | string rowGuid = "", rowName = ""; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_itemNo, gridView1); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4); |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | { |
| | | getModel(rowGuid); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 保存事件 |
| | | /// </summary> |
| | |
| | | txt_depotId.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(txt_kwId.GetId().Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("库位不能为空!"); |
| | | txt_depotId.Focus(); |
| | | return; |
| | | } |
| | | var _obj = new |
| | | { |
| | | guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), |
| | | itemId = txt_ItemId.GetId(), |
| | | departmentId = txt_departmentId.GetId().Trim(), |
| | | depotId = txt_depotId.GetId().Trim(), |
| | | depotlocid = txt_kwId.GetId().Trim() |
| | | }; |
| | | try |
| | | { |
| | |
| | | private void getPageList(int curPage) |
| | | { |
| | | gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "org.FNumber asc, d.depot_code asc,i.item_no", |
| | | var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "a.guid", |
| | | "asc", "", _sbSqlWhere.ToString()); |
| | | var json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | |
| | | { |
| | | gcMain1.DataSource = dt; |
| | | gcMain1.ForceInitialize(); |
| | | gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1); |
| | | gridView1.BestFitColumns(); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1); |
| | | } |
| | | else |
| | | UtilityHelper.SetDefaultTable(gcMain1, gridView1); |
| | |
| | | _ucBm = dy.departmentId; |
| | | _ucCk = dy.depotId; |
| | | _ucWl = dy.ItemId; |
| | | _ucKw = dy.kwId; |
| | | lbGuid.Text = strGuid; |
| | | UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit); |
| | | _ucBm = ""; |
| | | _ucCk = ""; |
| | | _ucWl = ""; |
| | | _ucKw = ""; |
| | | } |
| | | else |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | |
| | | }; |
| | | toolBarMenu1.guidKey = ""; |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_itemNo, gridView1, "guid"); |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_itemNo, gridView1, "itemNo"); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | |
| | | var _obj = new |
| | | { |
| | | guid = rowGuid, |
| | | ckValue = _inFieldValue, |
| | | parameter = "MES_BACK_FLASH,checkDate,checkStatus,createBy" |
| | | inFieldValue = _inFieldValue, |
| | | parameter = "MES_AUTO_RK,checkDate,checkStatus,createBy" |
| | | }; |
| | | try |
| | | { |
| | | var strJson = UtilityHelper.HttpPost("", "General/GeneralCheck", |
| | | var strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModelSubmit", |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |