From 6c4f48c41bca123db3c3aac7955b785569112542 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期五, 29 十一月 2024 13:53:38 +0800
Subject: [PATCH] 基础信息
---
DevApp/Gs.DevApp/DevFrm/WOM/Frm_Wompba.cs | 97 +++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 83 insertions(+), 14 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Wompba.cs b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Wompba.cs
index f0436b6..1f7d248 100644
--- a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Wompba.cs
+++ b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Wompba.cs
@@ -1,3 +1,5 @@
+using DevExpress.XtraEditors;
+using DevExpress.XtraGrid.Views.Grid;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Gs.DevApp.UserControl;
@@ -46,12 +48,18 @@
Rectangle r = new Rectangle(gridView1.GridControl.Width / 2 - 100, e.Bounds.Top + 45, e.Bounds.Right - 5, e.Bounds.Height - 5);
e.Graphics.DrawString(str, f, Brushes.Gray, r);
};
+ txt_pba013.EditChanged += (s, e) =>
+ {
+ string workGuid = this.txt_pba013.GetGuid();
+ txt_pba016.getSuppler(workGuid);
+ _getListJybz(workGuid);
+ };
//閫夋嫨闇�瑕佸叆搴撶殑鏄庣粏
btnSelect.Click += (s, e) =>
{
- if (string.IsNullOrEmpty(this.txt_pba013.Text))
+ if (string.IsNullOrEmpty(this.txt_pba013.GetId()))
{
- Gs.DevApp.ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨渚涘簲鍟嗭紝鎵嶈兘閫夋嫨鏉ユ枡鏄庣粏锛�");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨杞﹂棿锛屾墠鑳介�夋嫨浠诲姟鍗曪紒");
return;
}
var frm = new SelectWompba(this.txt_pba013.Text);
@@ -85,6 +93,8 @@
};
frm.ShowDialog();
};
+
+
}
/// <summary>
@@ -242,7 +252,7 @@
{
string rowGuid = "", rowName = "";
(rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
- lbGuid, txt_hNo, gridView1,"hNo");
+ lbGuid, txt_hNo, gridView1, "hNo");
if (string.IsNullOrEmpty(rowGuid))
{
MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
@@ -325,19 +335,32 @@
private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e)
{
toolBarMenu1.isSetBtn = false;
- //if (string.IsNullOrEmpty(txt_account.Text.Trim()))
- //{
- // Gs.DevApp.ToolBox.MsgHelper.Warning("鐧诲綍璐﹀彿涓嶈兘涓虹┖锛�");
- // txt_account.Focus();
- // return;
- //}
- var _sb = new StringBuilder();
+ string workId = txt_pba013.GetId();
+ if (string.IsNullOrEmpty(workId.Trim()))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨杞﹂棿锛�");
+ txt_pba013.Focus();
+ return;
+ }
+ string lineId = txt_pba016.GetId();
+ if (string.IsNullOrEmpty(lineId.Trim()))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨浜х嚎锛�");
+ txt_pba016.Focus();
+ return;
+ }
+ if (string.IsNullOrEmpty(txt_pba015.Text.Trim()))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.Warning("璁″垝浜烘暟涓嶈兘涓虹┖锛�");
+ txt_pba015.Focus();
+ return;
+ }
var _obj = new
{
guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
bz = txt_pba009.Text.Trim(),
- cjId = 1,
- cxId = 1,
+ cjId = workId,
+ cxId = lineId,
jhrs = txt_pba015.Text.Trim(),
list = new List<dynamic>(),
};
@@ -366,9 +389,9 @@
AboutGuid = Gs.DevApp.ToolBox.UtilityHelper.ToGuid(row["caaGuid"].ToString()),
LineId = int.Parse(row["daa015"].ToString()),//浜х嚎id
Yjkgsj = (row["mesStartProd"].ToString()),//棰勮寮�宸ユ椂闂�
- Jhrs = row["daa015"].ToString(),//璁″垝浜烘暟
+ Jhrs = row["planPersonnel"].ToString(),//璁″垝浜烘暟
Hxsj = row["changeLinetime"].ToString(),//鎹㈢嚎鏃堕棿
- Bz = row["daa009"].ToString(),//鎹㈢嚎鏃堕棿
+ Bz = row["daa009"].ToString(),//澶囨敞
Blsj = row["prepareTime"].ToString(),//棰勮澶囨枡鏃堕棿
Pcsl = row["daa008"].ToString()//鎺掍骇鏁伴噺
});
@@ -522,5 +545,51 @@
}
}
}
+
+ private void _getListJybz(string workGuid)
+ {
+ if (string.IsNullOrEmpty(workGuid))
+ return;
+ var _obj = new
+ {
+ guid = workGuid //涓诲缓
+ };
+ var json = JsonConvert.SerializeObject(_obj);
+ try
+ {
+ var strReturn = UtilityHelper.HttpPost("",
+ "SysDepartmentManager/GetModel", json);
+ var _job = JObject.Parse(strReturn);
+ var array = new JArray();
+ var d = _job["rtnData"]["list"];
+ foreach (var a in d) array.Add(a);
+ var dt = JsonConvert.DeserializeObject<DataTable>(array.ToString());
+ foreach (DataRow dr in dt.Rows)
+ {
+ rptJYBZ.Items.Add((new CboItemEntity(dr["id"].ToString(), dr["name"].ToString())));
+ }
+ }
+ catch (Exception ex)
+ {
+ MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ }
+ }
+
+ private void rptJYBZ_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ ComboBoxEdit comboBox = sender as ComboBoxEdit;
+ if (comboBox != null)
+ {
+ GridView myView = (gcMx1.MainView as GridView);
+ int dataIndex = myView.GetDataSourceRowIndex(myView.FocusedRowHandle);
+ CboItemEntity _itm = comboBox.EditValue as CboItemEntity;
+ string _val = _itm.Value.ToString();
+ string _txt = _itm.Text.ToString();
+ gvMx1.CloseEditor();
+ gvMx1.UpdateCurrentRow();
+ gvMx1.SetRowCellValue(dataIndex, "daa015LineName", _txt);
+ gvMx1.SetRowCellValue(dataIndex, "daa015", _val);
+ }
+ }
}
}
\ No newline at end of file
--
Gitblit v1.9.3