| | |
| | | using DevExpress.XtraEditors; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Gs.DevApp.UserControl; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | |
| | |
| | | { |
| | | public partial class Frm_BoxCode : DevExpress.XtraEditors.XtraForm |
| | | { |
| | | string _webServiceName = "MesWorkshopLineManager/"; |
| | | string _webServiceName = "Box/"; |
| | | List<FilterEntity> _filterList = new List<FilterEntity>(); |
| | | public Frm_BoxCode() |
| | | { |
| | |
| | | }, lbGuid); |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | this.txt_dptId.getSuppler(""); |
| | | txt_itemId.Click += (s, e) => |
| | | { |
| | | string _orgId = txt_orgId.GetId(); |
| | | var frm = new SelectBoxItem(_orgId); |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |
| | | try |
| | | { |
| | | var lst = new List<dynamic>(); |
| | | lst = ee.DynamicList; |
| | | txt_itemId.Text = lst[0].itemId; |
| | | txt_itemModel.Text = lst[0].itemModel; |
| | | txt_itemName.Text = lst[0].itemName; |
| | | txt_itemNo.Text = lst[0].itemNo; |
| | | txt_lotNo.Text = lst[0].gdbh; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MessageBox.Show(ex.Message); |
| | | } |
| | | }; |
| | | frm.ShowDialog(); |
| | | }; |
| | | txt_taskNo.Click += (s, e) => |
| | | { |
| | | string _orgId = txt_orgId.GetId(); |
| | | var frm = new SelectBoxDaa(_orgId); |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |
| | | try |
| | | { |
| | | var lst = new List<dynamic>(); |
| | | lst = ee.DynamicList; |
| | | txt_itemId.Text = lst[0].itemId; |
| | | txt_itemModel.Text = lst[0].itemModel; |
| | | txt_itemName.Text = lst[0].itemName; |
| | | txt_itemNo.Text = lst[0].itemNo; |
| | | txt_lotNo.Text = lst[0].gdbh; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MessageBox.Show(ex.Message); |
| | | } |
| | | }; |
| | | frm.ShowDialog(); |
| | | }; |
| | | } |
| | | private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); |
| | | Task.Delay(100); |
| | | await Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | | |
| | |
| | | private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e) |
| | | { |
| | | string rowGuid = "", rowName = ""; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_lineNo, gridView1, "lineNo"); |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_dwmc, gridView1, "lineNo"); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | |
| | | { |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, |
| | | lbGuid, txt_name, gridView1); |
| | | lbGuid, txt_lotNo, gridView1); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | |
| | | private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e) |
| | | { |
| | | toolBarMenu1.isSetBtn = false; |
| | | if (string.IsNullOrEmpty(txt_dptId.GetId().Trim())) |
| | | string _txt_orgId = txt_orgId.GetId(); |
| | | string _txt_taskNo = txt_taskNo.Text.Trim(); |
| | | string _txt_itemId = txt_itemId.Text.Trim(); |
| | | string _txt_lotNo = txt_lotNo.Text.Trim(); |
| | | string _txt_cusId = txt_cusId.GetId(); |
| | | string _txt_cusDh = txt_cusDh.Text.Trim(); |
| | | string _txt_saleDh = txt_saleDh.Text.Trim(); |
| | | string _txt_memo = txt_memo.Text.Trim(); |
| | | string _txt_extDate = txt_extDate.Text; |
| | | string _txt_quantity = txt_quantity.Text.Trim(); |
| | | string _txt_psnQty_1 = txt_psnQty_1.Text.Trim(); |
| | | string _txt_iCount_1 = txt_iCount_1.Text.Trim(); |
| | | if (string.IsNullOrEmpty(_txt_orgId.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请选择所在部门!"); |
| | | txt_dptId.Focus(); |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("组织不能为空!"); |
| | | txt_orgId.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(txt_lineNo.Text.Trim())) |
| | | if (txt_isSource.SelectedIndex == 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("产线编号不能为空!"); |
| | | txt_lineNo.Focus(); |
| | | if (_txt_taskNo.Trim().Length <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请选择工单!"); |
| | | txt_taskNo.Focus(); |
| | | return; |
| | | } |
| | | } |
| | | if (string.IsNullOrEmpty(_txt_itemId.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("产品ID不能为空!"); |
| | | txt_itemId.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(txt_name.Text.Trim())) |
| | | if (string.IsNullOrEmpty(_txt_quantity.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("产线名称不能为空!"); |
| | | txt_name.Focus(); |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("生产数量不能为空!"); |
| | | txt_quantity.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(txt_lineType.Text.Trim())) |
| | | if (string.IsNullOrEmpty(_txt_psnQty_1.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("产线类别不能为空!"); |
| | | txt_lineType.Focus(); |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("内包装数量不能为空!"); |
| | | txt_psnQty_1.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(_txt_iCount_1.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("打印数量不能为空!"); |
| | | txt_iCount_1.Focus(); |
| | | return; |
| | | } |
| | | var _obj = new |
| | | { |
| | | Guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建 |
| | | DptId = txt_dptId.GetId(), |
| | | Name = txt_name.Text.Trim(), |
| | | LineNo = txt_lineNo.Text.Trim(), |
| | | Remark = txt_remark.Text.Trim(), |
| | | LineType = txt_lineType.Text.Trim(), |
| | | isZxbg = txt_isZxbg.Checked |
| | | guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建 |
| | | orgId = _txt_orgId, |
| | | taskNo = _txt_taskNo, |
| | | itemId = _txt_itemId, |
| | | lotNo = _txt_lotNo, |
| | | cusId = _txt_cusId, |
| | | cusDh = _txt_cusDh, |
| | | saleDh = _txt_saleDh, |
| | | memo = _txt_memo, |
| | | extDate = _txt_extDate, |
| | | // |
| | | quantity = _txt_quantity, |
| | | psnQty_1 = _txt_psnQty_1, |
| | | iCount_1 = _txt_iCount_1, |
| | | }; |
| | | try |
| | | { |
| | |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | lbGuid.Text = _rtn.rtnData; |
| | | lbGuid.Text = _rtn.rtnData.outGuid; |
| | | toolBarMenu1.isSetBtn = true; |
| | | UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false); |
| | | toolBarMenu1.currentAction = ""; |