SVN r1090
SVN-Revision: r1090
This commit is contained in:
@@ -96,4 +96,25 @@ namespace Lskj.Control.BrowserSetting
|
|||||||
}
|
}
|
||||||
else if (message.Name.Equals("CloseWin"))
|
else if (message.Name.Equals("CloseWin"))
|
||||||
{
|
{
|
||||||
|
if (frmWebBrowser != null && frmWebBrowser.Parent != null && frmWebBrowser.Parent.Parent != null && frmWebBrowser.Parent.Parent is BaseForm baseForm)
|
||||||
|
{
|
||||||
|
if (baseForm.InvokeRequired)
|
||||||
|
{
|
||||||
|
baseForm.Invoke(new Action(() =>
|
||||||
|
{
|
||||||
|
baseForm.DialogResult = DialogResult.OK;
|
||||||
|
baseForm.Close();
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
baseForm.DialogResult = DialogResult.OK;
|
||||||
|
baseForm.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (message.Name.Equals("SelectPro"))
|
||||||
|
{
|
||||||
|
string arg0 = message.Arguments.GetString(0);
|
||||||
|
if (frmWebBrowser != null && frmWebBrowser.Parent != null && frmWebBrowser.Parent.Parent != null && frmWebBrowser.Parent.Parent is BaseForm baseForm)
|
||||||
|
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using DevExpress.Utils;
|
using DevExpress.Utils;
|
||||||
|
using DevExpress.XtraGrid.Columns;
|
||||||
using DevExpress.XtraTab;
|
using DevExpress.XtraTab;
|
||||||
using Lskj.Business;
|
using Lskj.Business;
|
||||||
using Lskj.Business.Impl;
|
using Lskj.Business.Impl;
|
||||||
@@ -63,6 +64,15 @@ namespace Lskj.Control.BrowserSetting
|
|||||||
outexception = null;
|
outexception = null;
|
||||||
outtrn = true;
|
outtrn = true;
|
||||||
}
|
}
|
||||||
|
else if (name == "SelectPro" && arguments.Length == 1)
|
||||||
|
{
|
||||||
|
CefProcessMessage cefProcessMessage = CefProcessMessage.Create("SelectPro");
|
||||||
|
cefProcessMessage.Arguments.SetString(0, arguments[0].GetStringValue());
|
||||||
|
V8Context.GetFrame().SendProcessMessage(CefProcessId.Browser, cefProcessMessage);
|
||||||
|
outreturnValue = CefV8Value.CreateUndefined();
|
||||||
|
outexception = null;
|
||||||
|
outtrn = true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
outreturnValue = null;
|
outreturnValue = null;
|
||||||
@@ -283,4 +293,75 @@ namespace Lskj.Control.BrowserSetting
|
|||||||
mcpex.InitializeControl(new ModuleModel(MainImpl.GetSystemdllTab(moduleModel.SearchCondFormModuleCode)), null, null, true);
|
mcpex.InitializeControl(new ModuleModel(MainImpl.GetSystemdllTab(moduleModel.SearchCondFormModuleCode)), null, null, true);
|
||||||
if (StaticControl.ConditionsPanelDic.ContainsKey(args[4] + ""))
|
if (StaticControl.ConditionsPanelDic.ContainsKey(args[4] + ""))
|
||||||
{
|
{
|
||||||
StaticControl.ConditionsPanelDic[args[4] + "
|
StaticControl.ConditionsPanelDic[args[4] + ""].Dispose();
|
||||||
|
StaticControl.ConditionsPanelDic[args[4] + ""] = mcpex;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
StaticControl.ConditionsPanelDic.Add(args[4] + "", mcpex);
|
||||||
|
}
|
||||||
|
DialogResult dialogResult = mcpex.ShowDialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ERPInfo.Instance.PageControl.TabPages.Add(tp);
|
||||||
|
ERPInfo.Instance.PageControl.SelectedTabPage = tp;
|
||||||
|
ERPInfo.Instance.ModuleForms.Add(guid, module);
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||||
|
MessageUtil.Show(ex.InnerException != null ? ex.InnerException.Message : ex.Message);
|
||||||
|
LogHelper.Instance.WriteError(ex);
|
||||||
|
//LogUtil.WriteError("打开" + module.Name + "模块失败!", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void AddReturnRow(string rowdata)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrWhiteSpace(rowdata) && StaticControl.RightMenuGridView != null)
|
||||||
|
{
|
||||||
|
JObject rowObject = JsonConvert.DeserializeObject<JObject>(rowdata);
|
||||||
|
JArray jArray = new JArray();
|
||||||
|
jArray.Add(rowObject);
|
||||||
|
DataTable dataTable = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(jArray));
|
||||||
|
DataRow rowItem = dataTable.Rows[0];
|
||||||
|
|
||||||
|
DataTable gridTable = (StaticControl.RightMenuGridView.GridControl.DataSource as DataTable).TrimDeleteRows();
|
||||||
|
if (gridTable == null) return;
|
||||||
|
DataRow newRow = gridTable.NewRow();
|
||||||
|
GridColumnCollection gridColumns = StaticControl.RightMenuGridView.Columns;
|
||||||
|
StaticControl.RightMenuGridView.BeginDataUpdate();
|
||||||
|
|
||||||
|
// 赋值明细字段
|
||||||
|
foreach (GridColumn col in gridColumns)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// 未包含字段,则使用控件默认值.
|
||||||
|
GridColumnModel model = col.Tag as GridColumnModel;
|
||||||
|
string colFieldName = col.FieldName;
|
||||||
|
if (!string.IsNullOrWhiteSpace(StaticControl.Comprefix) && colFieldName.Equals(StaticControl.Comprefix + "ProductId", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
colFieldName = colFieldName.Replace(StaticControl.Comprefix, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (model == null)
|
||||||
|
{
|
||||||
|
if (rowItem.Table.Columns.Contains(colFieldName))
|
||||||
|
{
|
||||||
|
// 来源列中是否包含对应字段,包含则使用值
|
||||||
|
newRow[col.FieldName] = rowItem[colFieldName];
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (rowItem.Table.Columns.Contains(colFieldName))
|
||||||
|
{
|
||||||
|
// 来源列中是否包含对应字段,包含则使用值
|
||||||
|
newRow[col.FieldName] = rowItem[colFieldName];
|
||||||
|
}
|
||||||
|
if (model.LimitLength > 0)
|
||||||
|
{
|
||||||
|
DataRow HandleRow = newRow;
|
||||||
|
|
||||||
@@ -20,4 +20,7 @@ namespace Lskj.Control.BrowserSetting
|
|||||||
{
|
{
|
||||||
boundObject.OpenModule = function(menuId, menuName, dllName, modelFlag, urlParams)
|
boundObject.OpenModule = function(menuId, menuName, dllName, modelFlag, urlParams)
|
||||||
{
|
{
|
||||||
native f
|
native function OpenModule();
|
||||||
|
return OpenModule(menuId, menuName, dllName, modelFlag, urlParams);
|
||||||
|
};
|
||||||
|
boundObject.OpenOnRightClick = function(arrayIte
|
||||||
Reference in New Issue
Block a user