You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
164 lines
11 KiB
164 lines
11 KiB
using SSWMS.Common;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
|
|
namespace SSWMS.Client
|
|
{
|
|
public class DynamicCode
|
|
{
|
|
public delegate void DelegateDynamicMenu(string sHeader);
|
|
public delegate bool DelegateDynamicFlow(int iID, out string sResult);
|
|
|
|
public static Dictionary<string, DelegateDynamicMenu> DicDynamicMenu = new Dictionary<string, DelegateDynamicMenu>()
|
|
{
|
|
#region 工具栏
|
|
{ "INIT_APP", (string sHeader) => { } },
|
|
{ "CLOSE_APP", (string sHeader) => MainWindow.mainWin.Close() },
|
|
{ "CLOSE_DOCUMENTS", (string sHeader) => { } },
|
|
#endregion
|
|
|
|
#region 生产管理
|
|
{ "PLAN_EDIT", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(PLAN_EDIT), sHeader, new object[] { 0 }) },
|
|
{ "FLOW_PLAN", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(STATUS_FLOW_ACTION), sHeader, new object[] { "FLOW_PLAN" }) },
|
|
{ "RECORD_PLAN", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(DateSectQueryWindow), sHeader, new object[] { "PLAN" }) },
|
|
{ "MANAGE_IN_CELL", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(MANAGE_IN_CELL), sHeader, new object[] { }) },
|
|
{ "MANAGE_OUT_CELL", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(MANAGE_OUT_CELL), sHeader, new object[] { SystemCode.MANAGE_TYPE.OutCell }) },
|
|
{ "MANAGE_OUT_PICK", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(MANAGE_OUT_CELL), sHeader, new object[] { SystemCode.MANAGE_TYPE.OutPick }) },
|
|
{ "MANAGE_MOVE_CELL", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(MANAGE_MOVE_CELL), sHeader, new object[] { }) },
|
|
{ "MANAGE_OUT_CELL_STOCK", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(MANAGE_OUT_CELL_STOCK), sHeader, new object[] { }) },
|
|
{ "MANAGE_IN_STATION", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(MANAGE_IN_STATION), sHeader, new object[] { }) },
|
|
{ "MANAGE_OUT_STATION", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(MANAGE_OUT_STATION), sHeader, new object[] { }) },
|
|
{ "MANAGE_IN_STATION_STOCK", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(MANAGE_IN_STATION_STOCK), sHeader, new object[] { }) },
|
|
{ "STORAGE_UPDATE", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(STORAGE_UPDATE), sHeader, new object[] { }) },
|
|
{ "STORAGE_DELETE", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(STORAGE_DELETE), sHeader, new object[] { }) },
|
|
{ "STORAGE_PRINT", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(STORAGE_PRINT), sHeader, new object[] { }) },
|
|
{ "WAREHOUSE_STATUS", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(WAREHOUSE_CELL_STATUS), sHeader, new object[] { }) },
|
|
{ "STORAGE_ALL", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(STORAGE_ALL), sHeader, new object[] { }) },
|
|
{ "STORAGE_SUMMARY", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(DataGridWindow), sHeader,
|
|
new object[] { "V_STORAGE_SUMMARY", "", "STORAGE_PROPERTY_01", "", false }) },
|
|
{ "FLOW_MANAGE", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(STATUS_FLOW_ACTION), sHeader, new object[] { "FLOW_MANAGE" }) },
|
|
{ "RECORD_MANAGE", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(DateSectQueryWindow), sHeader, new object[] { "RECORD" }) },
|
|
{ "RECORD_SUMMARY", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(DateSectQueryWindow), sHeader, new object[] { "RECORD_SUMMARY" }) },
|
|
{ "RECORD_INTERFACE", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(RECORD_INTERFACE), sHeader, new object[] { }) },
|
|
{ "IO_CONTROL", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(DataGridWindow), sHeader,
|
|
new object[] { "IO_CONTROL", "", "CONTROL_ID", "", true }) },
|
|
{ "IO_CONTROL_APPLY", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(DataGridWindow), sHeader,
|
|
new object[] { "IO_CONTROL_APPLY", "", "APPLY_ID", "", true }) },
|
|
{ "IO_CONTROL_APPLY_HIS", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(DataGridWindow), sHeader,
|
|
new object[] { "IO_CONTROL_APPLY_HIS", "", "APPLY_ID desc", "", true }) },
|
|
#endregion
|
|
|
|
#region 基础信息
|
|
{ "GOODS_MAIN", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(DataGridWindow), sHeader, new object[] { "GOODS_MAIN",
|
|
$"GOODS_CLASS<>'{SystemCode.GOODS_CLASS.Stock}'",
|
|
"GOODS_CODE", "", true }) },
|
|
{ "CELL_STATUS", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(DataGridWindow), sHeader, new object[] { "WH_CELL",
|
|
$"CELL_TYPE<>'{SystemCode.CELL_TYPE.Station}'",
|
|
"CELL_CODE", "", true }) },
|
|
{ "MULTI_CELL_STATUS", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(WAREHOUSE_CELL_ENABLE), sHeader, new object[] { }) },
|
|
{ "IO_CONTROL_ROUTE", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(DataGridWindow), sHeader,
|
|
new object[] { "IO_CONTROL_ROUTE", "", "CONTROL_ROUTE_TYPE,CONTROL_ROUTE_ID", "", true }) },
|
|
{ "LED_MAIN", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(DataGridWindow), sHeader,
|
|
new object[] { "LED_MAIN", "", "LED_ID", "", true }) },
|
|
{ "SYS_LOG", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(DataGridWindow), sHeader,
|
|
new object[] { "SYS_LOG", "", "LOG_ID", "", true }) },
|
|
{ "SYS_USER", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(DataGridWindow), sHeader,
|
|
new object[] { "SYS_USER", $"USER_ID>{SystemCode.ConstCode.AdminUserID}", "USER_CODE", "", true }) },
|
|
{ "SYS_ROLE", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(DataGridWindow), sHeader,
|
|
new object[] { "SYS_ROLE", $"ROLE_ID>{SystemCode.ConstCode.AdminRoleID}", "ROLE_ID", "", true }) },
|
|
{ "ROLE_WAREHOUSE", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(RelationEdit), sHeader, new object[] { SystemCode.RELATION_TYPE.Warehouse }) },
|
|
{ "ROLE_ACTION", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(RelationEdit), sHeader, new object[] { SystemCode.RELATION_TYPE.Flow }) },
|
|
{ "ROLE_USER", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(RelationEdit), sHeader, new object[] { SystemCode.RELATION_TYPE.User }) },
|
|
{ "ROLE_MENU", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(RelationEdit), sHeader, new object[] { SystemCode.RELATION_TYPE.Menu }) },
|
|
{ "CACULATOR", (string sHeader) => {
|
|
Process.Start(AppDomain.CurrentDomain.BaseDirectory + @"@Tools\计算器.exe"); } },
|
|
{ "TEXT_DOCUMENT", (string sHeader) => {
|
|
Process.Start(AppDomain.CurrentDomain.BaseDirectory + @"@Tools\记事本.exe"); } },
|
|
{ "HELP", (string sHeader) => {
|
|
Process.Start(AppDomain.CurrentDomain.BaseDirectory + @"@Tools\SSLMS_Client_Help.chm"); } },
|
|
{ "CHANGE_PASSWORD", (string sHeader) => { new Password(MainApp._USER.USER_CODE).ShowDialog(); } },
|
|
#endregion
|
|
|
|
#region 系统配置
|
|
{ "APP_CONFIG", (string sHeader) => { } },
|
|
{ "INIT_WAREHOUSE", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(WAREHOUSE_AREA_MANAGE), sHeader, new object[] { }) },
|
|
{ "SYS_FLOW", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(DataGridWindow), sHeader,
|
|
new object[] { "SYS_FLOW", "", "FLOW_ORDER", "", true }) },
|
|
{ "SYS_MENU", (string sHeader) => MainWindow.mainWin.ActivateForm(
|
|
typeof(DataGridWindow), sHeader,
|
|
new object[] { "SYS_MENU", "", "MENU_ORDER", "", true }) }
|
|
#endregion
|
|
};
|
|
|
|
public static Dictionary<string, DelegateDynamicFlow> DicDynamicFlow = new Dictionary<string, DelegateDynamicFlow>()
|
|
{
|
|
#region 计划流程
|
|
{ "PLAN_EDIT", (int iID, out string sResult) => MainWindow.mainWin.ActivateForm(
|
|
typeof(PLAN_EDIT), $"计划修改-[{iID}]", new object[] { iID }, out sResult) },
|
|
{ "PLAN_IN_STATION", (int iID, out string sResult) => MainWindow.mainWin.ActivateForm(
|
|
typeof(PLAN_IN_STATION), $"暂存入库-[{iID}]", new object[] { iID }, out sResult) },
|
|
{ "PLAN_OUT_CELL", (int iID, out string sResult) => MainWindow.mainWin.ActivateForm(
|
|
typeof(PLAN_OUT_CELL), $"立库出库-[{iID}]", new object[] { iID }, out sResult) },
|
|
{ "PLAN_OUT_STATION", (int iID, out string sResult) => MainWindow.mainWin.ActivateForm(
|
|
typeof(PLAN_OUT_STATION), $"暂存出库-[{iID}]", new object[] { iID }, out sResult) },
|
|
{ "PLAN_OUT_AUTO", (int iID, out string sResult) => {
|
|
sResult = string.Empty;
|
|
return new PLAN_OUT_AUTO(iID).ShowDialog() == true; } },
|
|
{ "PLAN_EXECUTING", (int iID, out string sResult) => WCFChannel._I_PlanService.PlanUpdateStatus(iID,
|
|
SystemCode.PLAN_STATUS.Executing, MainApp._USER.USER_NAME, out sResult) },
|
|
{ "PLAN_PAUSE", (int iID, out string sResult) => WCFChannel._I_PlanService.PlanUpdateStatus(iID,
|
|
SystemCode.PLAN_STATUS.Pause, MainApp._USER.USER_NAME, out sResult) },
|
|
{ "PLAN_COMPLETE", (int iID, out string sResult) => WCFChannel._I_PlanService.PlanUpdateStatus(
|
|
iID, SystemCode.PLAN_STATUS.Complete, MainApp._USER.USER_NAME, out sResult) },
|
|
{ "PLAN_DELETE", (int iID, out string sResult) => WCFChannel._I_PlanService.PlanUpdateStatus(
|
|
iID, SystemCode.PLAN_STATUS.Delete, MainApp._USER.USER_NAME, out sResult) },
|
|
#endregion
|
|
|
|
#region 任务流程
|
|
{ "MANAGE_EXECUTE", (int iID, out string sResult) => WCFChannel._I_ControlService.ManageExecute(iID, out sResult) },
|
|
{ "MANAGE_CANCEL", (int iID, out string sResult) => WCFChannel._I_ControlService.ManageDelete(iID, 0, out sResult) },
|
|
{ "MANAGE_COMPLETE", (int iID, out string sResult) => WCFChannel._I_ControlService.ManageComplete(iID, 0, out sResult) },
|
|
{ "MANAGE_DELETE", (int iID, out string sResult) => WCFChannel._I_ControlService.ManageDelete(iID, 0, out sResult) }
|
|
#endregion
|
|
};
|
|
}
|
|
}
|