| | |
| | | |
| | | using Gs.DevApp.DevFrm.QC; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Gs.DevApp.UserControl; |
| | | using Newtonsoft.Json; |
| | |
| | | toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; |
| | | this.toolBarMenu1.getXmlConfig(); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) => |
| | | { |
| | | |
| | |
| | | foreach (dynamic dym in lst) |
| | | { |
| | | DataRow _row = _Table.NewRow(); |
| | | _row["fSeq"] = dym.fSeq; |
| | | _row["statStatus"] = "Y-是"; |
| | | _row["collectionName"] = "空"; |
| | | //_row["fSeq"] = dym.fSeq; |
| | | _row["signingFlag"] = false; |
| | | _row["storageFlag"] = true; |
| | | _row["frontProcessNo"] = "空"; |
| | | _row["processNo"] = dym.processNo; |
| | | _row["processName"] = dym.processName; |
| | | _Table.Rows.Add(_row); |
| | |
| | | { |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gvList.Add(gvMx1); |
| | | gvList.Add(gvMx2); |
| | | UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false, gvList); |
| | | this.btnCopy.Enabled = true; |
| | | } |
| | |
| | | var _obj = new |
| | | { |
| | | guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建 |
| | | //fType = txt_fType.Text.Trim(), |
| | | //fBegDate = txt_fBegDate.Text.Trim(), |
| | | //fEndDate = txt_fEndDate.Text.Trim(), |
| | | //fJingDu = txt_fJingDu.Text.Trim(), |
| | | //fCapacity = txt_fCapacity.Text.Trim(), |
| | | //fMaxWeight = txt_fMaxWeight.Text.Trim(), |
| | | //fMinWeight = txt_fMinWeight.Text.Trim(), |
| | | //fSumPeople = txt_fSumPeople.Text.Trim(), |
| | | //remark = txt_remark.Text.Trim(), |
| | | orgName=txt_orgName.Text.Trim(), |
| | | itemNo=txt_itemNo.Text.Trim(), |
| | | list = new List<dynamic>(), |
| | | list2 = new List<dynamic>(), |
| | | }; |
| | | gvMx1.CloseEditor(); |
| | | gvMx1.PostEditor(); |
| | |
| | | { |
| | | _obj.list.Add(new |
| | | { |
| | | fSeq = row["fSeq"].ToString(),//序号 |
| | | guid = row["guid"].ToString(),//序号 |
| | | processNo = row["processNo"].ToString(),//工序编号 |
| | | remark = row["gxOrder"].ToString(),//工序顺序号 |
| | | statStatus = (row["signingFlag"].ToString()),//报工标识 |
| | | collectionName = row["storageFlag"].ToString(),//入库标识 |
| | | gxOrder = row["gxOrder"].ToString(),//工序顺序号 |
| | | signingFlag = row["signingFlag"].ToString(),//报工标识 |
| | | storageFlag = row["storageFlag"].ToString(),//入库标识 |
| | | frontProcessNo = row["frontProcessNo"].ToString(),//上工序号 |
| | | }); |
| | | } |
| | | |
| | | } |
| | | |
| | | gvMx2.CloseEditor(); |
| | | gvMx2.PostEditor(); |
| | | gvMx2.UpdateCurrentRow(); |
| | | for (var i = 0; i < gvMx2.DataRowCount; i++) |
| | | { |
| | | var row2 = gvMx2.GetDataRow(i); |
| | | if (row2 != null) |
| | | { |
| | | _obj.list2.Add(new |
| | | { |
| | | guid = row2["guid"].ToString(),//主键 |
| | | workers = row2["workers"].ToString(),//标准人数 |
| | | hours = row2["hours"].ToString(),//标准工时 |
| | | capacity = (row2["capacity"].ToString()),//单小时产能 |
| | | sCapacity = row2["sCapacity"].ToString(),//标准产能 |
| | | lineType = row2["lineType"].ToString(),//线体类别 |
| | | changeTime = row2["changeTime"].ToString(),//换线时间 |
| | | }); |
| | | } |
| | | |
| | | } |
| | | |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj)); |
| | |
| | | toolBarMenu1.isSetBtn = true; |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gvList.Add(gvMx1); |
| | | gvList.Add(gvMx2); |
| | | UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false, gvList); |
| | | toolBarMenu1.currentAction = ""; |
| | | //Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6); |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | lbGuid.Text = strGuid; |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gvList.Add(gvMx1); |
| | | gvList.Add(gvMx2); |
| | | UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit, gvList); |
| | | this.btnCopy.Enabled = true; |
| | | JObject _job = JObject.Parse(strJson); |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 移出产能 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void repositoryItemButtonEdit2_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) |
| | | { |
| | | var rowhandle = gvMx2.FocusedRowHandle; |
| | | if (rowhandle < 0) |
| | | return; |
| | | if (e.Button.Index == 0) |
| | | { |
| | | var dr = gvMx2.GetDataRow(rowhandle); |
| | | var mxGuid2 = dr["guid"].ToString(); |
| | | if (!MsgHelper.AskQuestion("你选择了1条数据,确定删除吗?")) |
| | | return; |
| | | if (string.IsNullOrEmpty(mxGuid2)) |
| | | { |
| | | gvMx2.DeleteRow(rowhandle); |
| | | return; |
| | | } |
| | | var _obj = new |
| | | { |
| | | guid = lbGuid.Text.Trim(),//这是产品的guid |
| | | mxGuid2 = mxGuid2, |
| | | }; |
| | | try |
| | | { |
| | | var strJson = UtilityHelper.HttpPost("", |
| | | _webServiceName + "DeleteMode2OrMx", |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | getModel(lbGuid.Text); |
| | | } |
| | | MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 读取工序下拉 |
| | | /// </summary> |
| | | private void _getListJyxm() |
| | | { |
| | | var pgq = new PageQueryModel(1, 999999, "a.processNo", "asc", "", ""); |
| | | var pgq = new PageQueryModel(1, 999999, "a.PROC_NO", "asc", "", ""); |
| | | var json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |
| | |
| | | rptGx.Items.Add("空"); |
| | | foreach (DataRow dr in dt.Rows) |
| | | { |
| | | rptGx.Items.Add(dr["processNo"].ToString()); |
| | | rptGx.Items.Add(dr["procNo"].ToString()); |
| | | } |
| | | } |
| | | catch (Exception ex) |