From 14473aaaf9c8ebc51be5c3e0434f2d716efef591 Mon Sep 17 00:00:00 2001
From: cdk <2441919651@qq.com>
Date: 星期二, 02 十二月 2025 10:25:52 +0800
Subject: [PATCH] 调拨增加调出部门调入部门字段
---
DevApp/Gs.DevApp/DevFrm/Ck/UcBlcl.cs | 91 ++++++++++++++++++---------------------------
1 files changed, 36 insertions(+), 55 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/Ck/UcBlcl.cs b/DevApp/Gs.DevApp/DevFrm/Ck/UcBlcl.cs
index 880d0a9..890b578 100644
--- a/DevApp/Gs.DevApp/DevFrm/Ck/UcBlcl.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Ck/UcBlcl.cs
@@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
using System.Data;
+using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -71,17 +72,16 @@
txt_bl014.Text = txt_aboutGuid.GetPrdName();
txt_bl015.Text = txt_aboutGuid.GetPrdModel();
txt_dptName.Text = txt_aboutGuid.GetWorkName();
- txt_bl012.Text = txt_aboutGuid.GetWorkXb();
+ txt_lineName.Text = txt_aboutGuid.GetWorkXb();
txt_bl013.Text = txt_aboutGuid.GetRwd();
txt_tldh.Text = txt_aboutGuid.GetTldh();
};
-
//閫夋嫨闇�瑕佸叆搴撶殑鏄庣粏
btnSelect.Click += (s, e) =>
{
if (string.IsNullOrEmpty(this.txt_orgId.GetId()))
{
- MsgHelper.Warning("璇烽�夋嫨鐢熶骇缁勭粐锛�");
+ MsgHelper.ShowError("璇烽�夋嫨鐢熶骇缁勭粐锛�");
txt_orgId.Focus();
return;
}
@@ -91,16 +91,6 @@
return;
}
var frm = new UcBlclSelect(txt_aboutGuid.GetId(), this.txt_orgId.GetId());
-
- if (txt_bl017.Text.Trim() == "鐢熶骇琛ユ枡")
- {
- frm = new UcBlclSelect(txt_aboutGuid.GetId(), this.txt_orgId.GetId(), txt_bl017.Text.Trim());
- }
- else
- {
- frm = new UcBlclSelect(txt_aboutGuid.GetId(), this.txt_orgId.GetId());
-
- }
//璧嬪�肩粰鏄庣粏琛�
frm.UpdateParent += (ss, ee) =>
{
@@ -116,7 +106,6 @@
_row["bld002"] = dym.itemNo;//鐗╂枡缂栧彿
_row["bld003"] = dym.itemName;//鐗╂枡鍚嶇О
_row["bld004"] = dym.itemModel;//瑙勬牸鍨嬪彿
- _row["kbsl"] = dym.kbsl;
_row["dwName"] = dym.dwName;
_row["dabGuid"] = dym.dabGuid;
_row["bld013"] = idx.ToString();//椤规
@@ -226,7 +215,7 @@
lbGuid, txt_blNo, gridView1, "blNo");
if (string.IsNullOrEmpty(rowGuid))
{
- MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鍒犻櫎鍚楋紵"))
@@ -250,13 +239,12 @@
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2);
getPageList(this.pageBar1.CurrentPage);
}
- MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+ MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
-
}
/// <summary>
@@ -306,6 +294,9 @@
gvList.Add(gvMx1);
UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true, gvList);
}
+ //2025/07/12鍔犱笂淇敼鐘舵�佷笅涓嶈兘淇敼
+ txt_orgId.IsReadly = true;
+ txt_aboutGuid.IsReadly = true;
}
/// <summary>
/// 鏂板浜嬩欢
@@ -336,19 +327,19 @@
string inGdId = txt_aboutGuid.GetId();//宸ュ崟鍙�
if (string.IsNullOrEmpty(inGdId))
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨宸ュ崟锛�");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨宸ュ崟锛�");
txt_aboutGuid.Focus();
return;
}
if (string.IsNullOrEmpty(inGdId))
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨宸ュ崟锛�");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨宸ュ崟锛�");
txt_aboutGuid.Focus();
return;
}
if (string.IsNullOrEmpty(txt_bl017.Text.Trim()))
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鍗曟嵁绫诲瀷锛�");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鍗曟嵁绫诲瀷锛�");
txt_bl017.Focus();
return;
}
@@ -376,34 +367,11 @@
{
Guid? _guid = UtilityHelper.ToGuid(row["guid"].ToString());
string _msl = row["bld007"].ToString();
- string _kbsl = row["kbsl"].ToString();
if (string.IsNullOrEmpty(_msl))
{
MsgHelper.ShowError("鏁伴噺涓嶈兘涓虹┖锛�");
return;
}
-
- if (txt_bl017.Text.Trim()=="鐢熶骇琛ユ枡")
- {
- if (decimal.TryParse(row["bld007"].ToString(), out decimal msl) &&
- decimal.TryParse(row["kbsl"].ToString(), out decimal kbsl))
- {
- if (msl > kbsl)
- {
- MsgHelper.ShowError("" +
- "鐢宠鏁伴噺涓嶈兘澶т簬鍙ˉ鏁伴噺锛�");
- return;
- }
- }
- else
- {
- // 瑙f瀽澶辫触鐨勫鐞�
- MsgHelper.ShowError("" +
- "杈撳叆鐨勪笉鏄湁鏁堟暟瀛楋紒");
- return;
- }
- }
-
_obj.list.Add(new
{
Guid = _guid,
@@ -418,9 +386,10 @@
{
string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj));
ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+
if (_rtn.rtnCode > 0)
{
+ ToolBox.MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
lbGuid.Text = _rtn.rtnData.outGuid;
txt_blNo.Text = _rtn.rtnData.outNo;
toolBarMenu1.isSetBtn = true;
@@ -430,10 +399,12 @@
toolBarMenu1.currentAction = "";
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6);
}
+ else
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
catch (Exception ex)
{
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
@@ -444,8 +415,12 @@
/// <param name="pageSize">姣忛〉鍑犳潯</param>
private void getPageList(int curPage)
{
- gcMain1.DataSource = null;var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
- _sbSqlWhere += " and a.bl008='" + strType + "'";
+ gcMain1.DataSource = null;
+ System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder();
+ _sbSqlWhere.Append(" and a.bl008='" + strType + "'");
+ _sbSqlWhere.Append(" and a.org_id in");
+ _sbSqlWhere.Append(ToolBox.UtilityHelper.GetOrgWhere());
+ _sbSqlWhere.Append(UtilityHelper.GetSearchWhere(_filterList));
PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString());
string json = JsonConvert.SerializeObject(pgq);
try
@@ -579,13 +554,14 @@
case 0:
strMsg = "鍙嶅鏍�";
break;
- };
+ }
+ ;
toolBarMenu1.guidKey = "";
string rowGuid, rowName;
(rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_blNo, gridView1, "blNo");
if (string.IsNullOrEmpty(rowGuid))
{
- MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵"))
@@ -601,9 +577,10 @@
_webServiceName + "EditModelSubmit",
JsonConvert.SerializeObject(_obj));
var _rtn = UtilityHelper.ReturnToDynamic(strJson);
- MsgHelper.Warning(_rtn.rtnData.outMsg.ToString());
+
if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0)
{
+ MsgHelper.ShowInformation(_rtn.rtnData.outMsg.ToString());
if (xtraTabControl1.SelectedTabPageIndex == 1)
{
getModel(lbGuid.Text.Trim());
@@ -613,10 +590,12 @@
Form parentForm = this.FindForm();
UtilityHelper.SetCheckIco(gridView1, "bl018", "bl016", "bl006", picCheckBox, parentForm, _inFieldValue.ToString());
}
+ else
+ MsgHelper.ShowError(_rtn.rtnData.outMsg.ToString());
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
@@ -648,13 +627,15 @@
var _rtn = UtilityHelper.ReturnToDynamic(strJson);
if (_rtn.rtnCode > 0)
{
- if (_rtn.rtnCode > 0) getModel(lbGuid.Text);
+ MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
+ getModel(lbGuid.Text);
}
- MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+ else
+ MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
}
--
Gitblit v1.9.3