From 3c6cad1224e7cb985f03d15cc98a4a2074a5af49 Mon Sep 17 00:00:00 2001
From: cdk <2441919651@qq.com>
Date: 星期一, 22 十二月 2025 22:25:33 +0800
Subject: [PATCH] 增加轮播看板
---
DevApp/Gs.DevApp/DevFrm/BasicData/Frm_MesDepot.cs | 88 ++++++++++++++++++++++++++++++++++---------
1 files changed, 69 insertions(+), 19 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/BasicData/Frm_MesDepot.cs b/DevApp/Gs.DevApp/DevFrm/BasicData/Frm_MesDepot.cs
index c4f1719..c8364ef 100644
--- a/DevApp/Gs.DevApp/DevFrm/BasicData/Frm_MesDepot.cs
+++ b/DevApp/Gs.DevApp/DevFrm/BasicData/Frm_MesDepot.cs
@@ -1,17 +1,18 @@
-using System;
-using System.Collections.Generic;
-using System.Data;
-using System.Threading.Tasks;
-using System.Windows.Forms;
using DevExpress.XtraEditors;
using DevExpress.XtraEditors.Controls;
using DevExpress.XtraGrid.Views.Grid;
+using Gs.DevApp.DevFrm.Rpt;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Gs.DevApp.UserControl;
using MES.Service.Modes;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Threading.Tasks;
+using System.Windows.Forms;
namespace Gs.DevApp.DevFrm
{
@@ -33,16 +34,57 @@
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, null, "", (value) =>
{
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
- });
+ }, tips);
Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
{
getModel(value);
}, (value) =>
{
getPageList(this.pageBar1.CurrentPage);
- });
+ }, lbGuid);
getPageList(1);
pageBar1.PagerEvent += PageBar1_PagerEvent;
+
+
+ #region 鎵撳嵃搴撲綅鐮侊紝浠呬粎鎵撳嵃
+ this.ucBtnPrint1.SetPlButton(true);
+ this.ucBtnPrint1.SetPrintButton(false);
+ //鎵撳嵃鎵归噺鎿嶄綔浜嬩欢
+ this.ucBtnPrint1.btnAllClick += (s, e) =>
+ {
+ string rowGuid = lbGuid.Text.Trim();
+ SelectDeleteBar frm = new SelectDeleteBar(rowGuid, "浠撲綅鐮�");
+ string strCodeList = "";
+ frm.UpdateParent += (ss, ee) =>
+ {
+ strCodeList = ee.StringSingle;
+ };
+ frm.ShowDialog();
+ if (string.IsNullOrEmpty(strCodeList))
+ return;
+ try
+ {
+ string rptParameter = "rpt_KW{"
+ + "100" // 閲嶆墦閮芥槸浼�100
+ + "," + ""
+ + "," + ""
+ + "," + ""
+ + "," + ""
+ + "," + strCodeList
+ + "}";
+
+ using (Form rpt = new RptPreview(rowGuid, rptParameter))
+ {
+ rpt.ShowDialog();
+ }
+ frm.Close();
+ }
+ catch (Exception ex)
+ {
+ MsgHelper.ShowError(ex.Message);
+ }
+ };
+ #endregion
}
private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
{
@@ -159,14 +201,14 @@
toolBarMenu1.isSetBtn = false;
if (string.IsNullOrEmpty(txt_depotCode.Text.Trim()))
{
- MsgHelper.Warning("浠撳簱缂栫爜涓嶈兘涓虹┖锛�");
+ MsgHelper.ShowError("浠撳簱缂栫爜涓嶈兘涓虹┖锛�");
txt_depotCode.Focus();
return;
}
if (string.IsNullOrEmpty(txt_depotName.Text.Trim()))
{
- MsgHelper.Warning("浠撳簱鍚嶇О涓嶈兘涓虹┖锛�");
+ MsgHelper.ShowError("浠撳簱鍚嶇О涓嶈兘涓虹┖锛�");
txt_depotName.Focus();
return;
}
@@ -183,11 +225,11 @@
MsgHelper.ShowError("缂栫爜涓嶈兘涓虹┖锛�");
return;
}
- if (string.IsNullOrEmpty(row["DepotSectionName"].ToString()))
- {
- MsgHelper.ShowError("鍚嶇О涓嶈兘涓虹┖锛�");
- return;
- }
+ //if (string.IsNullOrEmpty(row["DepotSectionName"].ToString()))
+ //{
+ // MsgHelper.ShowError("鍚嶇О涓嶈兘涓虹┖锛�");
+ // return;
+ //}
lst.Add(new MesDepotSections
{
Guid = UtilityHelper.ToGuid(row["guid"].ToString()),
@@ -199,33 +241,36 @@
}
var _obj = new MesDepots
{
- Guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()),
+ Guid = lbGuid.Text.Trim(),
DepotCode = txt_depotCode.Text,
DepotName = txt_depotName.Text,
Description = txt_description.Text,
+ Remark5 = txt_remark5.TextTxt.Trim(),
list = lst
};
-
try
{
var strJson = UtilityHelper.HttpPost("",
_webServiceName + "EditModel",
JsonConvert.SerializeObject(_obj));
var _rtn = UtilityHelper.ReturnToDynamic(strJson);
- MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
if (_rtn.rtnCode > 0)
{
+ MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
lbGuid.Text = _rtn.rtnData;
toolBarMenu1.isSetBtn = true;
var gridViews = new List<GridView>();
gridViews.Add(gvMx1);
UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false, gridViews);
toolBarMenu1.currentAction = "";
+ Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6);
}
+ else
+ MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
@@ -235,7 +280,11 @@
/// <param name="pageSize">姣忛〉鍑犳潯</param>
private void getPageList(int curPage)
{
- var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
+ gcMain1.DataSource = null;
+ System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder();
+ _sbSqlWhere.Append(" and a.FSubsidiary in");
+ _sbSqlWhere.Append(ToolBox.UtilityHelper.GetOrgWhere());
+ _sbSqlWhere.Append(UtilityHelper.GetSearchWhere(_filterList));
var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "org.FNumber asc ,a.depot_code", "asc",
"", _sbSqlWhere.ToString());
var json = JsonConvert.SerializeObject(pgq);
@@ -364,5 +413,6 @@
}
}
}
+
}
}
\ No newline at end of file
--
Gitblit v1.9.3