质量管理,现场控制点裁剪柜允许编辑
This commit is contained in:
parent
eba44201cb
commit
c40e74e47e
|
@ -4,7 +4,7 @@
|
|||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>现场控制点裁剪</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style>
|
||||
|
@ -28,10 +28,12 @@
|
|||
RegionPercent="20%" Title="现场控制点裁剪" TitleToolTip="现场控制点裁剪" ShowBorder="true" ShowHeader="true"
|
||||
BodyPadding="10px">
|
||||
<Items>
|
||||
<f:Tree ID="trWBS" EnableCollapse="true" ShowHeader="true" OnNodeCheck="trWBS_NodeCheck" OnlyLeafCheck="true"
|
||||
<f:Tree ID="trWBS" EnableCollapse="true" ShowHeader="true" OnNodeCheck="trWBS_NodeCheck" OnlyLeafCheck="true"
|
||||
OnNodeCommand="trWBS_NodeCommand" OnNodeExpand="trWBS_NodeExpand" AutoLeafIdentification="true"
|
||||
runat="server">
|
||||
|
||||
<Listeners>
|
||||
<f:Listener Event="beforenodecontextmenu" Handler="onTreeNodeContextMenu" />
|
||||
</Listeners>
|
||||
</f:Tree>
|
||||
<f:HiddenField runat="server" ID="hdSelectId">
|
||||
</f:HiddenField>
|
||||
|
@ -44,11 +46,11 @@
|
|||
<Items>
|
||||
<f:Grid ID="Grid1" Width="870px" ShowBorder="true" ShowHeader="false" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="BreakdownProjectId" AllowSorting="true" EnableColumnLines="true"
|
||||
SortField="BreakdownCode" SortDirection="ASC" AllowCellEditing="true" ClicksToEdit="1" KeepCurrentSelection="true"
|
||||
SortField="BreakdownCode" SortDirection="ASC" AllowCellEditing="true" ClicksToEdit="1" KeepCurrentSelection="true"
|
||||
ForceFit="true" OnRowCommand="Grid1_RowCommand"
|
||||
ShowSelectedCell="true" DataIDField="BreakdownProjectId" AllowPaging="true" IsDatabasePaging="true"
|
||||
PageSize="100" OnPageIndexChange="Grid1_PageIndexChange" AllowFilters="true" OnFilterChange="Grid1_FilterChange">
|
||||
|
||||
|
||||
<Columns>
|
||||
<f:RenderField Width="70px" ColumnID="BreakdownCode" DataField="BreakdownCode" FieldType="String"
|
||||
HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center">
|
||||
|
@ -93,9 +95,11 @@
|
|||
<f:RenderField Width="40px" ColumnID="ModelURL" DataField="ModelURL" FieldType="String" Hidden="true"
|
||||
HeaderText="模板附件" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:LinkButtonField HeaderText="附件" ColumnID="download" Width="40px" Text="附件" CommandName="download" />
|
||||
<f:LinkButtonField HeaderText="附件" ColumnID="download" Width="40px" Text="附件" CommandName="download" />
|
||||
</Columns>
|
||||
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</Listeners>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator2" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
|
@ -112,20 +116,70 @@
|
|||
</f:Panel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
|
||||
<f:Window ID="Windowtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
|
||||
<f:Window ID="Window1" Title="编辑" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Self" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="800px" Height="300px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window3" Title="编辑" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Self" EnableResize="false" runat="server" OnClose="Window3_Close" IsModal="true"
|
||||
Width="1000px" Height="600px">
|
||||
</f:Window>
|
||||
<f:Window ID="Windowtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
|
||||
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<%-- <f:MenuButton ID="btnMenuAdd" OnClick="btnMenuAdd_Click" EnablePostBack="true" runat="server" Hidden="true" Icon="Add"
|
||||
Text="增加">
|
||||
</f:MenuButton>--%>
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true" Hidden="true" Icon="Pencil"
|
||||
runat="server" Text="修改">
|
||||
</f:MenuButton>
|
||||
<%--<f:MenuButton ID="btnMenuCopy" OnClick="btnMenuCopy_Click" EnablePostBack="true" Icon="PageCopy"
|
||||
runat="server" Text="复制">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuPaste" OnClick="btnMenuPaste_Click" EnablePostBack="true" Icon="PagePaste"
|
||||
runat="server" Text="粘贴">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true" Hidden="true" Icon="Delete"
|
||||
ConfirmText="确认删除选中项?" ConfirmTarget="Top" runat="server" Text="删除">
|
||||
</f:MenuButton>--%>
|
||||
</f:Menu>
|
||||
<f:Menu ID="Menu2" runat="server">
|
||||
<Items>
|
||||
<f:MenuButton ID="btnMenuModify" EnablePostBack="true" runat="server" Hidden="true" Text="修改" Icon="Pencil"
|
||||
OnClick="btnMenuModify_Click">
|
||||
</f:MenuButton>
|
||||
<%--<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Hidden="true" Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?"
|
||||
OnClick="btnMenuDel_Click">
|
||||
</f:MenuButton>--%>
|
||||
</Items>
|
||||
</f:Menu>
|
||||
|
||||
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var treeID = '<%= trWBS.ClientID %>';
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
var menuID2 = '<%= Menu2.ClientID %>';
|
||||
// 保存当前菜单对应的树节点ID
|
||||
var currentNodeId;
|
||||
|
||||
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onTreeNodeContextMenu(event, nodeId) {
|
||||
currentNodeId = nodeId;
|
||||
F(menuID).show();
|
||||
return false;
|
||||
}
|
||||
// 设置所有菜单项的禁用状态
|
||||
function setMenuItemsDisabled(disabled) {
|
||||
var menu = F(menuID);
|
||||
$.each(menu.items, function (index, item) {
|
||||
item.setDisabled(disabled);
|
||||
});
|
||||
}
|
||||
|
||||
// 显示菜单后,检查是否禁用菜单项
|
||||
function onMenuShow() {
|
||||
if (currentNodeId) {
|
||||
|
|
|
@ -240,7 +240,8 @@ namespace FineUIPro.Web.CQMS.WBS
|
|||
orderby x.SortIndex
|
||||
select x).ToList();
|
||||
foreach (var q in childDivisions)
|
||||
{if (q.IsSelected == true)
|
||||
{
|
||||
if (q.IsSelected == true)
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = q.DivisionName;
|
||||
|
@ -438,8 +439,8 @@ namespace FineUIPro.Web.CQMS.WBS
|
|||
return id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#region 删除
|
||||
/// <summary>
|
||||
|
@ -528,8 +529,8 @@ namespace FineUIPro.Web.CQMS.WBS
|
|||
tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
|
||||
Grid1.DataBind();
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
@ -989,7 +990,7 @@ namespace FineUIPro.Web.CQMS.WBS
|
|||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
#region 获取按钮权限
|
||||
/// <summary>
|
||||
|
@ -1005,9 +1006,83 @@ namespace FineUIPro.Web.CQMS.WBS
|
|||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectControlPointMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
this.btnMenuEdit.Hidden = false;
|
||||
this.btnMenuModify.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 右键增加、修改、删除方法
|
||||
|
||||
/// <summary>
|
||||
/// 右键修改事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.trWBS.SelectedNode != null)
|
||||
{
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectControlPointMenuId, BLL.Const.BtnModify))
|
||||
{
|
||||
if (this.trWBS.SelectedNode.CommandName != "ProjectType" && this.trWBS.SelectedNode.CommandName != "UnitWork" && this.trWBS.SelectedNode.CommandName != "CNProfessional") //非工程类型和单位工程、专业节点可以修改
|
||||
{
|
||||
this.hdSelectId.Text = this.trWBS.SelectedNode.NodeID;
|
||||
string unitWorkId = this.GetUnitWorkId(this.trWBS.SelectedNode);
|
||||
string openUrl = String.Format("EditDivisionProject.aspx?type=modify&selectedCode={0}&unitWorkId={1}", this.trWBS.SelectedNode.NodeID, unitWorkId, "编辑 - ");
|
||||
PageContext.RegisterStartupScript(Window1.GetSaveStateReference(hdSelectId.ClientID)
|
||||
+ Window1.GetShowReference(openUrl));
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("单位工程、工程类型和专业节点无法修改!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择树节点!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Grid双击事件
|
||||
/// <summary>
|
||||
/// Grid行双击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
btnMenuModify_Click(null, null);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 编辑
|
||||
/// <summary>
|
||||
/// 编辑按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuModify_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("EditBreakdownProject.aspx?type=modify&breakdownProjectId={0}&divisionProjectId={1}", this.Grid1.SelectedRowID, this.trWBS.SelectedNodeID, "新增 - ")));
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
|
@ -122,6 +122,24 @@ namespace FineUIPro.Web.CQMS.WBS
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Window3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window3;
|
||||
|
||||
/// <summary>
|
||||
/// Windowtt 控件。
|
||||
/// </summary>
|
||||
|
@ -130,5 +148,41 @@ namespace FineUIPro.Web.CQMS.WBS
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Windowtt;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
|
||||
/// <summary>
|
||||
/// Menu2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu2;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuModify 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuModify;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue