| | |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraPrinting.Native; |
| | | using Gs.DevApp.DevFrm.WOM; |
| | | using Gs.DevApp.Entity; |
| | |
| | | }, lbGuid); |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | //设置申请组织 |
| | | //设置申请组织 |
| | | this.txt_fapporgid.EditChanged += (s, e) => |
| | | { |
| | | string _sqGuid = txt_fapporgid.GetId(); |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | }; |
| | | |
| | |
| | | gvMx1.SetFocusedRowCellValue("dcHzGuid", _orgId); |
| | | }; |
| | | |
| | | #region 2025-08-27 复制beg |
| | | #region 2025-08-27 复制beg |
| | | btnCopyXls.Click += (s, e) => |
| | | { |
| | | string kcZz = txt_fapporgid.GetId(); |
| | | if (string.IsNullOrEmpty(kcZz)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请先选择申请组织后才能使用复制功能!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请先选择申请组织后才能使用复制功能!"); |
| | | txt_fapporgid.Focus(); |
| | | return; |
| | | } |
| | | string filePath = AppContext.BaseDirectory + "xlsCopy.xls"; |
| | | if (File.Exists(filePath)) |
| | | { |
| | | var frm = new CopyXls(kcZz, lbGuid.Text.Trim(), OrderType.物料调拨.ToString()); |
| | | var frm = new CopyXls(kcZz, lbGuid.Text.Trim(), OrderType.物料调拨.ToString()); |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |
| | | try |
| | |
| | | } |
| | | else |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("找不到xlsCopy.xls文件,请联系管理员!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("找不到xlsCopy.xls文件,请联系管理员!"); |
| | | } |
| | | }; |
| | | #endregion |
| | | |
| | | #region 2025-10-17 选择生产/委外订单 |
| | | #region 2025-10-17 选择生产/委外订单 |
| | | btnSelect.Click += (s, e) => |
| | | { |
| | | string kcZz = txt_fapporgid.GetId(); |
| | | if (string.IsNullOrEmpty(kcZz)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请先选择申请组织后才能选择生产订单!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请先选择申请组织后才能选择生产订单!"); |
| | | txt_fapporgid.Focus(); |
| | | return; |
| | | } |
| | | |
| | | // 根据当前申请类型判断应该打开哪个类型的弹窗 |
| | | // 根据当前申请类型判断应该打开哪个类型的弹窗 |
| | | string selectedValue = txt_fBillTypeID.EditValue?.ToString(); |
| | | string defaultType = "1"; // 默认生产 |
| | | if (!string.IsNullOrEmpty(selectedValue) && selectedValue.Contains("委外")) |
| | | string defaultType = "1"; // 默认生产 |
| | | if (!string.IsNullOrEmpty(selectedValue) && selectedValue.Contains("委外")) |
| | | { |
| | | defaultType = "2"; // 委外 |
| | | defaultType = "2"; // 委外 |
| | | } |
| | | SetComboBoxValue(txt_fBillTypeID, "生产调拨申请单(DBSQD03_SC)"); |
| | | SetComboBoxValue(txt_fBillTypeID, "生产调拨申请单(DBSQD03_SC)"); |
| | | var frm = new SelectSqmx(defaultType); |
| | | //var frm = new SelectSqmx(); |
| | | |
| | | // 监听选择类型变化事件,同步更新申请类型 |
| | | // 监听选择类型变化事件,同步更新申请类型 |
| | | frm.SelectionTypeChanged += (ss, ee) => |
| | | { |
| | | string workId = ee.Data; // 1是生产,2是委外 |
| | | // 生产订单,设置对应的申请类型 |
| | | string workId = ee.Data; // 1是生产,2是委外 |
| | | // 生产订单,设置对应的申请类型 |
| | | if (workId == "1") |
| | | { |
| | | SetComboBoxValue(txt_fBillTypeID, "生产调拨申请单(DBSQD03_SC)"); |
| | | SetComboBoxValue(txt_fBillTypeID, "生产调拨申请单(DBSQD03_SC)"); |
| | | } |
| | | else if (workId == "2") |
| | | { |
| | | // 委外订单,设置对应的申请类型 |
| | | SetComboBoxValue(txt_fBillTypeID, "委外调拨申请单(DBSQD02_WW)"); |
| | | // 委外订单,设置对应的申请类型 |
| | | SetComboBoxValue(txt_fBillTypeID, "委外调拨申请单(DBSQD02_WW)"); |
| | | } |
| | | }; |
| | | |
| | | //赋值给明细表 |
| | | //赋值给明细表 |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |
| | | try |
| | |
| | | }; |
| | | var strReturn = UtilityHelper.HttpPost("", "MesInvItemMovesManager/SelectScddToView", JsonConvert.SerializeObject(_obj)); |
| | | var dt = UtilityHelper.ReturnToList(strReturn); |
| | | if (dt.rtnCode == -102 && dt.rtnMsg == "委外") |
| | | if (dt.rtnCode == -102 && dt.rtnMsg == "委外") |
| | | { |
| | | MsgHelper.ShowError("提示:业务类型为委外(WW)时,只能选择委外订单!"); |
| | | MsgHelper.ShowError("提示:业务类型为委外(WW)时,只能选择委外订单!"); |
| | | return; |
| | | } |
| | | else if (dt.rtnCode == -102 && dt.rtnMsg == "生产") |
| | | else if (dt.rtnCode == -102 && dt.rtnMsg == "生产") |
| | | { |
| | | MsgHelper.ShowError("提示:业务类型为标准(NORMAL)时,只能选择生产订单!"); |
| | | MsgHelper.ShowError("提示:业务类型为标准(NORMAL)时,只能选择生产订单!"); |
| | | return; |
| | | } |
| | | ; |
| | |
| | | } |
| | | catch(Exception ex) |
| | | { |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | }; |
| | | frm.ShowDialog(); |
| | | }; |
| | | #endregion |
| | | |
| | | #region 2025-10-17 选择委外订单 |
| | | #region 2025-10-17 选择委外订单 |
| | | btnScdd.Click += (s, e) => |
| | | { |
| | | string kcZz = txt_fapporgid.GetId(); |
| | | if (string.IsNullOrEmpty(kcZz)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请先选择申请组织后才能选择委外订单!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请先选择申请组织后才能选择委外订单!"); |
| | | txt_fapporgid.Focus(); |
| | | return; |
| | | } |
| | | var frm = new SelectScdd("1"); |
| | | //赋值给明细表 |
| | | //赋值给明细表 |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |
| | | try |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | }; |
| | | frm.ShowDialog(); |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 这是打印 |
| | | /// 这是打印 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | this.toolBarMenu1.rptParameter = "return false"; |
| | | MsgHelper.Warning("请先选择你要打印的单据!"); |
| | | MsgHelper.Warning("请先选择你要打印的单据!"); |
| | | return; |
| | | } |
| | | Frm_MesDbck_Print_Select frm = new Frm_MesDbck_Print_Select(rowGuid); |
| | | DialogResult result = frm.ShowDialog(); |
| | | if (result == DialogResult.Cancel || result == DialogResult.None) |
| | | { |
| | | // 用户点击了取消按钮或直接关闭窗口 |
| | | // 用户点击了取消按钮或直接关闭窗口 |
| | | this.toolBarMenu1.rptParameter = "return false"; |
| | | } |
| | | |
| | |
| | | // lbGuid, txt_fBillNo, gridView1, "fBillNo"); |
| | | //if (string.IsNullOrEmpty(rowGuid)) |
| | | //{ |
| | | // MsgHelper.ShowError("请先选择你要操作的行!"); |
| | | // MsgHelper.ShowError("请先选择你要操作的行!"); |
| | | // return; |
| | | //} |
| | | //this.toolBarMenu1.rptParameter = "rpt_sdzjdb{" |
| | |
| | | getPageList(1); |
| | | } |
| | | /// <summary> |
| | | /// 分页事件 |
| | | /// 分页事件 |
| | | /// </summary> |
| | | /// <param name="curPage"></param> |
| | | /// <param name="pageSize"></param> |
| | |
| | | getPageList(curPage); |
| | | } |
| | | /// <summary> |
| | | /// 查询事件 |
| | | /// 查询事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | |
| | | frm.ShowDialog(); |
| | | } |
| | | /// <summary> |
| | | /// 查询回调 |
| | | /// 查询回调 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 取消事件 |
| | | /// 取消事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 删除事件 |
| | | /// 删除事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | |
| | | lbGuid, txt_fBillNo, gridView1, "FBillNo"); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定删除吗?")) |
| | | if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定删除吗?")) |
| | | return; |
| | | var _obj = new |
| | | { |
| | |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | MsgHelper.ShowInformation("提示:" + _rtn.rtnMsg); |
| | | MsgHelper.ShowInformation("提示:" + _rtn.rtnMsg); |
| | | if (xtraTabControl1.SelectedTabPageIndex == 0) |
| | | { } |
| | | else |
| | |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | } |
| | | else |
| | | MsgHelper.ShowError("提示:" + _rtn.rtnMsg); |
| | | MsgHelper.ShowError("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 刷新事件 |
| | | /// 刷新事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 修改事件 |
| | | /// 修改事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_fBillNo, gridView1, "FBillNo"); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); |
| | |
| | | gvList.Add(gvMx1); |
| | | UtilityHelper.ChangeEnableByControl(splitMx1.Panel1.Controls, true, gvList); |
| | | } |
| | | //2025/07/12加上修改状态下不能修改供应商和组织srm,禁用 |
| | | //2025/07/12加上修改状态下不能修改供应商和组织srm,禁用 |
| | | txt_fapporgid.IsReadly = true; |
| | | txt_ftranstype.ReadOnly = true; |
| | | txt_fOwnerTypeIdHead.ReadOnly = true; |
| | |
| | | txt_djtype.Properties.ReadOnly = true; |
| | | } |
| | | /// <summary> |
| | | /// 新增事件 |
| | | /// 新增事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | |
| | | gridViews.Add(gvMx1); |
| | | UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true, gridViews); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1); |
| | | //增加时,默认组织 |
| | | //增加时,默认组织 |
| | | string deftOrg = UtilityHelper.GetFirstOrg(txt_fapporgid); |
| | | txt_fBusinessType.Properties.ReadOnly = true; |
| | | txt_djtype.Properties.ReadOnly = true; |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 保存事件 |
| | | /// 保存事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | |
| | | string gdbh = txt_FSourceOrder.Text.ToString(); |
| | | //if (txt_fBillTypeID.SelectedIndex <= 0) |
| | | //{ |
| | | // Gs.DevApp.ToolBox.MsgHelper.Warning("请选择单据类型!"); |
| | | // Gs.DevApp.ToolBox.MsgHelper.Warning("请选择单据类型!"); |
| | | // txt_fBillTypeID.Focus(); |
| | | // return; |
| | | //} |
| | | if (string.IsNullOrEmpty(dbfx)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择调拨方向!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择调拨方向!"); |
| | | txt_fTransferDirect.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(sqOrg)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择申请组织!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择申请组织!"); |
| | | txt_fapporgid.Focus(); |
| | | return; |
| | | } |
| | | //if (txt_fOwnerTypeIdHead.SelectedIndex <= 0) |
| | | //{ |
| | | // Gs.DevApp.ToolBox.MsgHelper.Warning("请选择调出货主类型!"); |
| | | // Gs.DevApp.ToolBox.MsgHelper.Warning("请选择调出货主类型!"); |
| | | // txt_fOwnerTypeIdHead.Focus(); |
| | | // return; |
| | | //} |
| | | //if (txt_fOwnerTypeInIdHead.SelectedIndex <= 0) |
| | | //{ |
| | | // Gs.DevApp.ToolBox.MsgHelper.Warning("请选择调入货主类型!"); |
| | | // Gs.DevApp.ToolBox.MsgHelper.Warning("请选择调入货主类型!"); |
| | | // txt_fOwnerTypeInIdHead.Focus(); |
| | | // return; |
| | | //} |
| | | var _obj = new |
| | | { |
| | | guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建 |
| | | djlx = djlx,//单据类型 |
| | | ywlx = ywlx,//业务类型 |
| | | dbfx = dbfx,//调拨方向 |
| | | sqOrg = sqOrg,//审请组织 |
| | | dblx = dblx,//调拨类型 |
| | | dchzlx = dchzlx,//调出货主类型 |
| | | drhzlx = drhzlx,//调入货主类型 |
| | | inRemark = txt_fRemarks.Text.Trim(),//备注 |
| | | guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建 |
| | | djlx = djlx,//单据类型 |
| | | ywlx = ywlx,//业务类型 |
| | | dbfx = dbfx,//调拨方向 |
| | | sqOrg = sqOrg,//审请组织 |
| | | dblx = dblx,//调拨类型 |
| | | dchzlx = dchzlx,//调出货主类型 |
| | | drhzlx = drhzlx,//调入货主类型 |
| | | inRemark = txt_fRemarks.Text.Trim(),//备注 |
| | | list = new List<dynamic>(), |
| | | gdbh = gdbh //工单单号 |
| | | gdbh = gdbh //工单单号 |
| | | }; |
| | | gvMx1.CloseEditor(); |
| | | gvMx1.PostEditor(); |
| | | gvMx1.UpdateCurrentRow(); |
| | | if (gvMx1.DataRowCount <= 0) |
| | | { |
| | | MsgHelper.ShowError("明细不能为空,请选择你的申请明细!"); |
| | | MsgHelper.ShowError("明细不能为空,请选择你的申请明细!"); |
| | | return; |
| | | } |
| | | for (var i = 0; i < gvMx1.DataRowCount; i++) |
| | |
| | | string _msl = row["shNum"].ToString(); |
| | | if (string.IsNullOrEmpty(_msl)) |
| | | { |
| | | MsgHelper.ShowError("数量不能为空!"); |
| | | MsgHelper.ShowError("数量不能为空!"); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(row["dcOrgGuid"].ToString())) |
| | | { |
| | | MsgHelper.ShowError("调出组织不能为空!"); |
| | | MsgHelper.ShowError("调出组织不能为空!"); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(row["dcCkGuid"].ToString())) |
| | | { |
| | | MsgHelper.ShowError("调出仓库不能为空!"); |
| | | MsgHelper.ShowError("调出仓库不能为空!"); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(row["drOrgGuid"].ToString())) |
| | | { |
| | | MsgHelper.ShowError("调入组织不能为空!"); |
| | | MsgHelper.ShowError("调入组织不能为空!"); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(row["drCkGuid"].ToString())) |
| | | { |
| | | MsgHelper.ShowError("调入仓库不能为空!"); |
| | | MsgHelper.ShowError("调入仓库不能为空!"); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(row["dcHzGuid"].ToString())) |
| | | { |
| | | MsgHelper.ShowError("调出货主不能为空!"); |
| | | MsgHelper.ShowError("调出货主不能为空!"); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(row["drHzGuid"].ToString())) |
| | | { |
| | | MsgHelper.ShowError("调入货主不能为空!"); |
| | | MsgHelper.ShowError("调入货主不能为空!"); |
| | | return; |
| | | } |
| | | _obj.list.Add(new |
| | |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | ToolBox.MsgHelper.ShowInformation("提示:" + _rtn.rtnMsg); |
| | | ToolBox.MsgHelper.ShowInformation("提示:" + _rtn.rtnMsg); |
| | | lbGuid.Text = _rtn.rtnData.outGuid; |
| | | txt_fBillNo.Text = _rtn.rtnData.outNo; |
| | | toolBarMenu1.isSetBtn = true; |
| | |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6); |
| | | } |
| | | else |
| | | ToolBox.MsgHelper.ShowError("提示:" + _rtn.rtnMsg); |
| | | ToolBox.MsgHelper.ShowError("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | ToolBox.MsgHelper.ShowError("提示:" + ex.Message); |
| | | ToolBox.MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 日志 |
| | | /// 日志 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="curPage">第几页</param> |
| | | /// <param name="pageSize">每页几条</param> |
| | | /// <param name="curPage">第几页</param> |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage) |
| | | { |
| | | gcMain1.DataSource = null; |
| | |
| | | else |
| | | UtilityHelper.SetDefaultTable(gcMain1, gridView1); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | pageBar1.TotalPages = dd.rtnData.pages;//总页 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RecordCount = dd.rtnData.total;//总记录数 |
| | | pageBar1.TotalPages = dd.rtnData.pages;//总页 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RecordCount = dd.rtnData.total;//总记录数 |
| | | } |
| | | else |
| | | { |
| | | ToolBox.MsgHelper.ShowError("提示:" + dd.rtnMsg); |
| | | ToolBox.MsgHelper.ShowError("提示:" + dd.rtnMsg); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | ToolBox.MsgHelper.ShowError("提示:" + ex.Message); |
| | | ToolBox.MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | |
| | | } |
| | |
| | | if (toolBarMenu1.currentAction == "edit") isEdit = true; |
| | | if (string.IsNullOrEmpty(strGuid)) |
| | | { |
| | | ToolBox.MsgHelper.ShowError("请先选择你要操作的行!"); |
| | | ToolBox.MsgHelper.ShowError("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | var _obj = new |
| | | { |
| | | guid = strGuid,//主建 |
| | | guid = strGuid,//主建 |
| | | }; |
| | | try |
| | | { |
| | |
| | | } |
| | | } |
| | | else |
| | | ToolBox.MsgHelper.ShowError("提示:" + _rtn.rtnMsg); |
| | | ToolBox.MsgHelper.ShowError("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | ToolBox.MsgHelper.ShowError("提示:" + ex.Message); |
| | | ToolBox.MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 审核事件 |
| | | /// 审核事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 反审核 |
| | | /// 反审核 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | |
| | | _toolCk(0); |
| | | } |
| | | /// <summary> |
| | | /// 售后审核 |
| | | /// 售后审核 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 售后反审核 |
| | | /// 售后反审核 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | |
| | | _toolCk(21); |
| | | } |
| | | /// <summary> |
| | | /// 工具条事件 |
| | | /// 工具条事件 |
| | | /// </summary> |
| | | /// <param name="inFieldValue"></param> |
| | | private void _toolCk(int _inFieldValue) |
| | |
| | | switch (_inFieldValue) |
| | | { |
| | | case 1: |
| | | strMsg = "审核"; |
| | | strMsg = "审核"; |
| | | break; |
| | | case 0: |
| | | strMsg = "反审核"; |
| | | strMsg = "反审核"; |
| | | break; |
| | | case 20: |
| | | strMsg = "售后审核"; |
| | | strMsg = "售后审核"; |
| | | break; |
| | | case 21: |
| | | strMsg = "售后反审核"; |
| | | strMsg = "售后反审核"; |
| | | break; |
| | | } |
| | | ; |
| | |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_fBillNo, gridView1, "FBillNo"); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | MsgHelper.ShowError("请先选择你要操作的行!"); |
| | | MsgHelper.ShowError("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定" + strMsg + "吗?")) |
| | | if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定" + strMsg + "吗?")) |
| | | return; |
| | | var _obj = new |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | //注意,这里和其它页面有点不一样 |
| | | //注意,这里和其它页面有点不一样 |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | int rowHandle = gridView1.LocateByValue("guid", rowGuid); |
| | | gridView1.FocusedRowHandle = rowHandle; |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 选择物料 |
| | | /// 选择物料 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 删除物料 |
| | | /// 删除物料 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | |
| | | { |
| | | var dr = gvMx1.GetDataRow(rowhandle); |
| | | var mxGuid = dr["id"].ToString(); |
| | | if (!MsgHelper.AskQuestion("你选择了1条数据,确定删除吗?")) |
| | | if (!MsgHelper.AskQuestion("你选择了1条数据,确定删除吗?")) |
| | | return; |
| | | if (string.IsNullOrEmpty(mxGuid)) |
| | | { |
| | |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | MsgHelper.ShowInformation("提示:" + _rtn.rtnMsg); |
| | | MsgHelper.ShowInformation("提示:" + _rtn.rtnMsg); |
| | | getModel(lbGuid.Text); |
| | | } |
| | | else |
| | | MsgHelper.ShowError("提示:" + _rtn.rtnMsg); |
| | | MsgHelper.ShowError("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 查找调出组织 |
| | | /// 查找调出组织 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | |
| | | frm.ShowDialog(); |
| | | } |
| | | /// <summary> |
| | | /// 查找调出仓库 |
| | | /// 查找调出仓库 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | |
| | | var strOrgGuid = dr["dcOrgGuid"].ToString(); |
| | | if (string.IsNullOrEmpty(strOrgGuid)) |
| | | { |
| | | MsgHelper.ShowError("提示:请先选择调出组织!"); |
| | | MsgHelper.ShowError("提示:请先选择调出组织!"); |
| | | return; |
| | | } |
| | | ; |
| | |
| | | frm.ShowDialog(); |
| | | } |
| | | /// <summary> |
| | | /// 查找仓位 |
| | | /// 查找仓位 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | |
| | | var dr = gvMx1.GetDataRow(rowhandle); |
| | | if (dr["dcCkGuid"] == null) |
| | | { |
| | | MsgHelper.ShowError("提示:请先选择调出仓库!"); |
| | | MsgHelper.ShowError("提示:请先选择调出仓库!"); |
| | | return; |
| | | } |
| | | ; |
| | | var strCkGuid = dr["dcCkGuid"].ToString(); |
| | | if (string.IsNullOrEmpty(strCkGuid)) |
| | | { |
| | | MsgHelper.ShowError("提示:请先选择调出仓库!"); |
| | | MsgHelper.ShowError("提示:请先选择调出仓库!"); |
| | | return; |
| | | } |
| | | ; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 调入组织 |
| | | /// 调入组织 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | |
| | | frm.ShowDialog(); |
| | | } |
| | | /// <summary> |
| | | /// 调入仓库 |
| | | /// 调入仓库 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | |
| | | var strOrgGuid = dr["drOrgGuid"].ToString(); |
| | | if (string.IsNullOrEmpty(strOrgGuid)) |
| | | { |
| | | MsgHelper.ShowError("提示:请先选择调入组织!"); |
| | | MsgHelper.ShowError("提示:请先选择调入组织!"); |
| | | return; |
| | | } |
| | | ; |
| | |
| | | frm.ShowDialog(); |
| | | } |
| | | /// <summary> |
| | | /// 调入仓位 |
| | | /// 调入仓位 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | |
| | | var dr = gvMx1.GetDataRow(rowhandle); |
| | | if (dr["drCkGuid"] == null) |
| | | { |
| | | MsgHelper.ShowError("提示:请先选择调入仓库!"); |
| | | MsgHelper.ShowError("提示:请先选择调入仓库!"); |
| | | return; |
| | | } |
| | | ; |
| | | var strCkGuid = dr["drCkGuid"].ToString(); |
| | | if (string.IsNullOrEmpty(strCkGuid)) |
| | | { |
| | | MsgHelper.ShowError("提示:请先选择调入仓库!"); |
| | | MsgHelper.ShowError("提示:请先选择调入仓库!"); |
| | | return; |
| | | } |
| | | ; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 调入货主 |
| | | /// 调入货主 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | |
| | | int _drhzlx = txt_fOwnerTypeInIdHead.SelectedIndex; |
| | | //if (_drhzlx <= 0) |
| | | //{ |
| | | // MsgHelper.Warning("提示:请先选择调入货主类型!"); |
| | | // MsgHelper.Warning("提示:请先选择调入货主类型!"); |
| | | // return; |
| | | //} |
| | | SelectHz frm = new SelectHz("", _drhzlx.ToString()); |
| | |
| | | frm.ShowDialog(); |
| | | } |
| | | /// <summary> |
| | | /// 调出货主 |
| | | /// 调出货主 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | |
| | | int _drhzlx = txt_fOwnerTypeIdHead.SelectedIndex; |
| | | //if (_drhzlx <= 0) |
| | | //{ |
| | | // MsgHelper.Warning("提示:请先选择调出货主类型!"); |
| | | // MsgHelper.Warning("提示:请先选择调出货主类型!"); |
| | | // return; |
| | | //} |
| | | SelectHz frm = new SelectHz("", _drhzlx.ToString()); |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 预计开工时间变化事件 |
| | | /// 预计开工时间变化事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | |
| | | if (string.IsNullOrEmpty(selectedValue)) |
| | | return; |
| | | |
| | | if (selectedValue == "委外调拨申请单(DBSQD02_WW)") |
| | | if (selectedValue == "委外调拨申请单(DBSQD02_WW)") |
| | | { |
| | | SetComboBoxValue(txt_fBusinessType, "委外(WW)"); |
| | | SetComboBoxValue(txt_djtype, "委外直接调拨单(WWDB01_SYS)"); |
| | | SetComboBoxValue(txt_fBusinessType, "委外(WW)"); |
| | | SetComboBoxValue(txt_djtype, "委外直接调拨单(WWDB01_SYS)"); |
| | | |
| | | } |
| | | else if (selectedValue == "生产调拨申请单(DBSQD03_SC)") |
| | | else if (selectedValue == "生产调拨申请单(DBSQD03_SC)") |
| | | { |
| | | SetComboBoxValue(txt_fBusinessType, "生产(SC)"); |
| | | SetComboBoxValue(txt_djtype, "生产直接调拨单(SCDB01_SYS)"); |
| | | SetComboBoxValue(txt_fBusinessType, "生产(SC)"); |
| | | SetComboBoxValue(txt_djtype, "生产直接调拨单(SCDB01_SYS)"); |
| | | } |
| | | else |
| | | { |
| | | SetComboBoxValue(txt_fBusinessType, "标准(NORMAL)"); |
| | | SetComboBoxValue(txt_djtype, "标准直接调拨单(ZJDB01_SYS)"); |
| | | SetComboBoxValue(txt_fBusinessType, "标准(NORMAL)"); |
| | | SetComboBoxValue(txt_djtype, "标准直接调拨单(ZJDB01_SYS)"); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | else |
| | | { |
| | | // 如果值不存在,设置为第一个选项或空 |
| | | // 如果值不存在,设置为第一个选项或空 |
| | | if (comboBox.Properties.Items.Count > 0) |
| | | comboBox.EditValue = comboBox.Properties.Items[0]; |
| | | else |