| | |
| | | using Gs.DevApp.Entity; |
| | | using DevExpress.Utils.MVVM.Services; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | |
| | | public Frm_Work01(string _fGx, string _fBc) |
| | | { |
| | | InitializeComponent(); |
| | | this.Text = "工序采集 - " + _fGx + " - " + fBc; |
| | | this.fGx = _fGx; |
| | | this.fBc = _fBc; |
| | | this.Text = "工序采集 - " + fGx + " - " + fBc; |
| | | txt_gx.Text = fGx; |
| | | txt_bc.Text = fBc; |
| | | txt_barCode.KeyDown += (s, e) => |
| | |
| | | }; |
| | | btnBad.Click += (s, e) => |
| | | { |
| | | getModel("", badTag); |
| | | UcDictionarySelect frm = new UcDictionarySelect("缺陷描述", " s_type='工序采集不良项目'"); |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |
| | | System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(); |
| | | var lst = ee.DynamicList; |
| | | foreach (dynamic dym in lst) |
| | | { |
| | | if (stringBuilder.Length > 0) |
| | | stringBuilder.Append("|"); |
| | | stringBuilder.Append(dym.dicTxt); |
| | | } |
| | | string _txt = stringBuilder.ToString(); |
| | | if (string.IsNullOrEmpty(_txt)) |
| | | { |
| | | Toast vm = new Toast(-1, "~当为不良时,请选择不良项目~"); |
| | | vm.Show(); |
| | | } |
| | | else |
| | | getModel("", badTag, _txt); |
| | | }; |
| | | frm.ShowDialog(); |
| | | }; |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="_checkVal">检测值</param> |
| | | /// <param name="_checkResult">检测结果</param> |
| | | private void getModel(string _checkVal, string _checkResult) |
| | | /// <param name="_badReson">不良原因</param> |
| | | /// <param name="_inBz">备注</param> |
| | | private void getModel(string _checkVal, string _checkResult, string _badReson = "", string _inBz = "") |
| | | { |
| | | string _barCode = txt_barCode.Text.Trim(); |
| | | string _inBz = ""; ; //备注 |
| | | if (string.IsNullOrEmpty(_barCode)) |
| | | { |
| | | Toast vm = new Toast(-1, "~请先扫追溯码~"); |
| | |
| | | var _obj = new |
| | | { |
| | | barCode = _barCode, |
| | | inBz = _inBz, |
| | | inBz = _inBz.Trim(), |
| | | checkVal = _checkVal, |
| | | checkResult = _checkResult, |
| | | processNo = txt_gx.Text.Trim(),//工序 |
| | | banCi = txt_bc.Text.Trim(),//班次 |
| | | gongWei = txt_gw.Text.Trim(),//工位 |
| | | badReson = _badReson.Trim() |
| | | }; |
| | | try |
| | | { |
| | |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | dynamic dy = _rtn.rtnData; |
| | | //头表和汇总 |
| | | UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, false); |
| | | lbSum1.Text = dy.lbSum1; |
| | | lbSum2.Text = dy.lbSum2; |
| | | lbSum3.Text = dy.lbSum3; |
| | | lbSum4.Text = dy.lbSum4; |
| | | prog1.Position = dy.jd; |
| | | //良品 |
| | | txt_barCode.ReadOnly = false; |
| | | JObject _job = JObject.Parse(strJson); |
| | | JArray array = new JArray(); |
| | |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1); |
| | | } |
| | | //不良品 |
| | | JArray array2 = new JArray(); |
| | | foreach (var a in _job["rtnData"]["list2"]) |
| | | { |
| | |
| | | Toast vm = new Toast(-1, _rtn.rtnMsg); |
| | | vm.Show(); |
| | | } |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |