| | |
| | | { |
| | | string _webServiceName = "MesCgthSqManager/"; |
| | | List<FilterEntity> _filterList = new List<FilterEntity>(); |
| | | string _ucCk = "";//发料仓库 |
| | | string _ucGys = "";//供应商 |
| | | public Frm_MesCgthSq() |
| | | { |
| | |
| | | if (string.IsNullOrEmpty(orgId)) |
| | | return; |
| | | txt_suppId.getSuppler(orgId, _ucGys); |
| | | txt_depotId.getSuppler(orgId, _ucCk); |
| | | }; |
| | | //选择需要的明细 |
| | | btnSelect.Click += (s, e) => |
| | |
| | | private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e) |
| | | { |
| | | toolBarMenu1.isSetBtn = false; |
| | | var _ckId = txt_depotId.GetId(); //仓库编号 depots_code |
| | | var _gysId = txt_suppId.GetId(); //供应商编号 |
| | | string _orgId = txt_thOrgId.GetId(); |
| | | if (string.IsNullOrEmpty(_orgId)) |
| | |
| | | { |
| | | MsgHelper.Warning("请选择供应商!"); |
| | | txt_suppId.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(_ckId)) |
| | | { |
| | | MsgHelper.Warning("请选择仓库!"); |
| | | txt_depotId.Focus(); |
| | | return; |
| | | } |
| | | if (txt_returnMethod.SelectedIndex <= 0) |
| | |
| | | Guid = Gs.DevApp.ToolBox.UtilityHelper.ToGuid(lbGuid.Text.Trim()), //到货单主键 |
| | | Remark = txt_remark.Text.Trim(), //备注 |
| | | SuppId = int.Parse(_gysId), //供应商 |
| | | DepotId = int.Parse(_ckId),//仓库 |
| | | FType = txt_isOut.Checked == true ? 1 : 0, //0=采购,1=委外 |
| | | Fmrmode = txt_returnMethod.Text,//退料方式 |
| | | Reason = txt_returnType.Text,//退料原因 |
| | |
| | | MsgHelper.ShowError("申请数量不能为空!"); |
| | | return; |
| | | } |
| | | string _depotId = row["depotId"].ToString(); |
| | | if (string.IsNullOrEmpty(_depotId)) |
| | | { |
| | | MsgHelper.ShowError("仓库不能为空!"); |
| | | return; |
| | | } |
| | | _obj.list.Add(new |
| | | { |
| | | Guid = _guid, |
| | | AboutGuid = UtilityHelper.ToGuid(row["rkmxGuid"].ToString()), |
| | | Quantity = decimal.Parse(row["sqNum"].ToString()), |
| | | Bz = row["remark"].ToString(), |
| | | DepotId= row["depotId"].ToString(), |
| | | }); |
| | | } |
| | | } |
| | |
| | | { |
| | | dynamic dy = _rtn.rtnData; |
| | | _ucGys = dy.suppId; |
| | | _ucCk = dy.depotId; |
| | | lbGuid.Text = strGuid; |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gvList.Add(gvMx1); |
| | | UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit, gvList); |
| | | _ucGys = ""; |
| | | _ucCk = ""; |
| | | JObject _job = JObject.Parse(strJson); |
| | | JArray array = new JArray(); |
| | | foreach (var a in _job["rtnData"]["list"]) |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 查找仓库 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void rptCk_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) |
| | | { |
| | | var rowhandle = gvMx1.FocusedRowHandle; |
| | | if (rowhandle < 0) |
| | | return; |
| | | //var dr = gvMx1.GetDataRow(rowhandle); |
| | | var strOrgGuid = txt_thOrgId.GetId(); |
| | | if (string.IsNullOrEmpty(strOrgGuid)) |
| | | { |
| | | MsgHelper.Warning("提示:请先选择调出组织!"); |
| | | return; |
| | | }; |
| | | SelectCk frm = new SelectCk(strOrgGuid); |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |
| | | var lst = new List<dynamic>(); |
| | | lst = ee.DynamicList; |
| | | gvMx1.SetFocusedRowCellValue("depotName", lst[0].name); |
| | | gvMx1.SetFocusedRowCellValue("depotId", lst[0].guid); |
| | | }; |
| | | frm.ShowDialog(); |
| | | } |
| | | } |
| | | } |