| | |
| | | using DevExpress.XtraGrid.Columns; |
| | | using DevExpress.XtraLayout.Utils; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Newtonsoft.Json; |
| | |
| | | public Frm_Work01(string _fGx, string _fBc, string _strinOther) |
| | | { |
| | | InitializeComponent(); |
| | | gvMx1.IndicatorWidth = 60; |
| | | gvMx1.CustomDrawRowIndicator += (s, e) => |
| | | { |
| | | if (e.Info.IsRowIndicator && e.RowHandle >= 0) |
| | | e.Info.DisplayText = (e.RowHandle + 1).ToString(); |
| | | }; |
| | | txt_gx.Text = _fGx; |
| | | txt_bc.Text = _fBc; |
| | | txt_dianJianPath.Text = _strinOther; |
| | | dianJianPath = _strinOther; |
| | | this.Text = "工序采集【" + _fGx + " - " + _fBc + "】"; |
| | | label8.Text = _fGx + "数量"; |
| | | addColumn(); |
| | | txt_barCode.KeyDown += (s, e) => |
| | | { |
| | | if (e.KeyCode == Keys.Enter) { addModel(goodTag); }; |
| | | if (e.KeyCode == Keys.Enter) { addModel(goodTag); } |
| | | ; |
| | | }; |
| | | btnGood.Click += (s, e) => |
| | | { |
| | |
| | | }; |
| | | btnBad.Click += (s, e) => |
| | | { |
| | | string _barCode = txt_barCode.Text.Trim(); |
| | | if (string.IsNullOrEmpty(_barCode)) |
| | | { |
| | | Toast vm = new Toast(-1, "~请先扫追溯码~"); |
| | | vm.Show(); |
| | | return; |
| | | } |
| | | UcDictionarySelect frm = new UcDictionarySelect("工序不良描述", " a.s_type='工序不良描述' and pid<>'00000000-0000-0000-0000-000000000000'"); |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |
| | |
| | | // _obj.t012 = SJJG;这个待确定 |
| | | return _obj; |
| | | } |
| | | |
| | | if (txt_gx.Text.Trim() == fGxZhongJian) |
| | | { |
| | | return _obj; |
| | |
| | | return; |
| | | } |
| | | dynamic _obj = getObj(_barCode, _checkResult, _badDescription); |
| | | //if (_obj == null) |
| | | //{ |
| | | // Toast vm = new Toast(-1, "~读取数据失败,请检查设备~"); |
| | | // vm.Show(); |
| | | // return; |
| | | //} |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", _webServiceName + "GetModel", JsonConvert.SerializeObject(_obj)); |
| | |
| | | { |
| | | Toast vm = new Toast((goodTag == "√" ? 1 : -1), _msg); |
| | | vm.Show(); |
| | | }; |
| | | } |
| | | ; |
| | | } |
| | | else |
| | | { |
| | |
| | | /// </summary> |
| | | public void addColumn() |
| | | { |
| | | //只有电检才显示 |
| | | if (txt_gx.Text.Trim() == fGxDianJian) |
| | | layDianJian.Visibility = LayoutVisibility.Always; |
| | | else |
| | | layDianJian.Visibility = LayoutVisibility.Never; |
| | | //只有水检才显示 |
| | | if (txt_gx.Text.Trim() == fGxShouJian) |
| | | layShuiJian.Visibility = LayoutVisibility.Always; |
| | | else |
| | | layShuiJian.Visibility = LayoutVisibility.Never; |
| | | |
| | | List<dynamic> _lst = new List<dynamic>(); |
| | | if (txt_gx.Text.Trim() == fGxDianJian) |
| | | { |
| | |
| | | kejian = true, |
| | | visibleIndex = 1, |
| | | }); |
| | | |
| | | _lst.Add(new |
| | | { |
| | | ziduan = "t011", |
| | |
| | | kejian = true, |
| | | visibleIndex = 1, |
| | | }); |
| | | |
| | | _lst.Add(new |
| | | { |
| | | ziduan = "t010", |