| | |
| | | { |
| | | public partial class Frm_FqcDetect01 : DevExpress.XtraEditors.XtraForm |
| | | { |
| | | string _strTag= "N:不合格"; |
| | | string _webServiceName = "FqcManager/"; |
| | | List<FilterEntity> _filterList = new List<FilterEntity>(); |
| | | public Frm_FqcDetect01() |
| | |
| | | txt_lineId.Text = lst[0].lineId; |
| | | txt_checkStates.Text = "W:未知"; |
| | | txt_fcheckResu.Text = "W:未知"; |
| | | txt_freceQty.Text = "W:未知"; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | } |
| | | if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定提交检验吗?")) |
| | | return; |
| | | if (txt_fcheckResu.Text.Trim() == "不合格") |
| | | if (txt_fcheckResu.Text.Trim() == _strTag) |
| | | { |
| | | if (string.IsNullOrEmpty(txt_msg.TextTxt.Trim())) |
| | | { |
| | | MsgHelper.Warning("单据为不合格时,请填写违规信息!"); |
| | | return; |
| | | } |
| | | string _txt_fngHandle = txt_fngHandle.Text.Trim(); |
| | | string _txt_fmrmode = txt_fmrmode.GetCode(); |
| | | string _txt_fzrId = txt_fzrId.GetId(); |
| | | string _txt_workNo = txt_workNo.Text.Trim(); |
| | | string _txt_msg = txt_msg.TextTxt; |
| | | string _txt_zrType = txt_zrType.Text.Trim(); |
| | | if (txt_fngHandle.SelectedIndex <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请选择处置结果!"); |
| | | txt_fngHandle.Focus(); |
| | | return; |
| | | } |
| | | if (txt_zrType.SelectedIndex <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请选择责任判定!"); |
| | | txt_zrType.Focus(); |
| | | return; |
| | | } |
| | | if (_txt_fzrId.Length <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请选择责任人!"); |
| | | txt_fzrId.Focus(); |
| | | return; |
| | | } |
| | | //当处置结果为反工时,要选择工序和反工编号 |
| | | if (txt_fngHandle.SelectedIndex == 1) |
| | | { |
| | | if (string.IsNullOrEmpty(_txt_workNo)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请填写反工单号!"); |
| | | txt_workNo.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(_txt_fmrmode)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请填选择反工工序!"); |
| | | txt_fmrmode.Focus(); |
| | | return; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (!string.IsNullOrEmpty(_txt_workNo)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("不需要填写反工单号!"); |
| | | txt_workNo.Focus(); |
| | | return; |
| | | } |
| | | if (!string.IsNullOrEmpty(_txt_fmrmode)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("不需要选择反工工序!"); |
| | | txt_fmrmode.Focus(); |
| | | return; |
| | | } |
| | | } |
| | | }; |
| | | |
| | | var _obj = new |
| | | { |
| | | guid = rowGuid, |
| | |
| | | txt_djType.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(_txt_fbatchQty.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("抽检数量不能为空!"); |
| | | txt_fbatchQty.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(_txt_lotNo.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("工单号不能为空!"); |
| | | txt_lotNo.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(_kbList.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("送检箱码不能为空!"); |
| | | txt_kbList.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(txt_kbSl.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("送检数量不能为空!"); |
| | | txt_kbList.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(_txt_fbatchQty.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("抽检数量不能为空!"); |
| | | txt_fbatchQty.Focus(); |
| | | return; |
| | | } |
| | | if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric2(_txt_fbatchQty)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请输入正确的抽检数量!"); |
| | | txt_fbatchQty.Focus(); |
| | | return; |
| | | } |
| | | if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric2(txt_kbSl.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请输入正确的送检数量!"); |
| | | txt_kbList.Focus(); |
| | | return; |
| | | } |
| | | if (Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(_txt_fbatchQty) > Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(txt_kbSl.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("抽检数量不能大于送检数量!"); |
| | | txt_fbatchQty.Focus(); |
| | | return; |
| | | } |
| | | //当不合格时的检查 |
| | | string _txt_fngHandle = txt_fngHandle.Text.Trim(); |
| | | string _txt_fmrmode = txt_fmrmode.GetCode(); |
| | | string _txt_fzrId = txt_fzrId.GetId(); |
| | | string _txt_workNo = txt_workNo.Text.Trim(); |
| | | string _txt_zrType = txt_zrType.Text.Trim(); |
| | | if (txt_fcheckResu.Text.Trim() == _strTag) |
| | | { |
| | | if (string.IsNullOrEmpty(txt_msg.TextTxt.Trim())) |
| | | { |
| | | MsgHelper.Warning("当不合格时,请填写违规信息!"); |
| | | txt_msg.Focus(); |
| | | return; |
| | | } |
| | | |
| | | if (txt_fngHandle.SelectedIndex <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("当不合格时,请选择处置结果!"); |
| | | txt_fngHandle.Focus(); |
| | | return; |
| | | } |
| | | if (txt_zrType.SelectedIndex <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("当不合格时,请选择责任判定!"); |
| | | txt_zrType.Focus(); |
| | | return; |
| | | } |
| | | if (_txt_fzrId.Length <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("当不合格时,请选择责任人!"); |
| | | txt_fzrId.Focus(); |
| | | return; |
| | | } |
| | | //当处置结果为反工时,要选择工序和反工编号 |
| | | if (txt_fngHandle.SelectedIndex == 1) |
| | | { |
| | | if (string.IsNullOrEmpty(_txt_workNo)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("当不合格时,请填写反工单号!"); |
| | | txt_workNo.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(_txt_fmrmode)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("当不合格时,请填选择反工工序!"); |
| | | txt_fmrmode.Focus(); |
| | | return; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (!string.IsNullOrEmpty(_txt_workNo)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("不需要填写反工单号!"); |
| | | txt_workNo.Focus(); |
| | | return; |
| | | } |
| | | if (!string.IsNullOrEmpty(_txt_fmrmode)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("不需要选择反工工序!"); |
| | | txt_fmrmode.Focus(); |
| | | return; |
| | | } |
| | | } |
| | | }; |
| | | |
| | | var _obj = new |
| | | { |
| | | guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建 |
| | |
| | | fmanageNo = _txt_fmanageNo,//流程编号 |
| | | lotNo1 = _txt_lotNo1,//送检批号 |
| | | lotNo = _txt_lotNo,//生产工单 |
| | | edtType = 0, |
| | | kbList = _kbList, |
| | | fngHandle = _txt_fngHandle, |
| | | fzrId = _txt_fzrId, |
| | | workNo = _txt_workNo, |
| | | fmrmode = _txt_fmrmode, |
| | | zrType = _txt_zrType, |
| | | list = new List<dynamic>(), |
| | | }; |
| | | gvMx1.CloseEditor(); |
| | |
| | | string _defectLevel = row["defectLevel"].ToString(); |
| | | string _defectDetails = row["defectDetails"].ToString(); |
| | | string _fcheckResu = row["fcheckResu"].ToString(); |
| | | if (_fcheckResu == "不合格") |
| | | if (_fcheckResu == _strTag) |
| | | { |
| | | if (string.IsNullOrEmpty(_defectLevel)) |
| | | { |