<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WorkFlow_SPList.aspx.cs"
    Inherits="WorkFlow.FlowPage.WorkFlow_SPPage.WorkFlow_SPList" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>审批界面</title>
    <link href="../css/main.css" rel="stylesheet" type="text/css" />
    <link href="../css/ext-all.css" rel="stylesheet" type="text/css" />
     <style type="text/css">
        .hg
        {
            height: 20px;
            padding-top: 3px;
        }
        .workflow-node
        {
            background-image: url(../images/workflow.gif) !important;
        }
        .workflow-folder
        {
            background-image: url(../images/folder.gif) !important;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <ext:ResourceManager ID="ResourceManager1" runat="server" DirectMethodNamespace="DirectMethod">
    </ext:ResourceManager>
    <ext:Viewport ID="Viewport1" runat="server" Layout="border">
        <Items>
            <ext:Panel ID="Panel6" runat="server" Collapsible="true" Layout="FitLayout" Region="West"
                Split="true" Title="工作流程管理" Width="175">
                <Items>
                    <ext:TreePanel ID="TreePanel1" runat="server" Title="">
                        <Root>
                            <ext:TreeNode Text="流程审批" Expanded="true"   IconCls="workflow-folder" >
                                <Nodes>
                                    <ext:TreeNode Text="未审批" NodeID="未审批"  IconCls="workflow-node" Cls="hg">
                                    </ext:TreeNode>
                                </Nodes>
                                <Nodes>
                                    <ext:TreeNode Text="已审批" NodeID="已审批"  IconCls="workflow-node" Cls="hg">
                                    </ext:TreeNode>
                                </Nodes>
                            </ext:TreeNode>
                        </Root>
                        <Listeners>
                            <Click Handler="e.stopEvent();DirectMethod.NodeClick(node.id);" />
                        </Listeners>
                    </ext:TreePanel>
                </Items>
            </ext:Panel>
            <ext:Panel ID="Panel9" runat="server" Layout="Fit" Region="Center" Title="流程列表">
                <TopBar>
                    <ext:Toolbar ID="Toolbar1" runat="server">
                        <Items>
                            <ext:Button ID="Button8" runat="server" Text="刷新" Icon="Reload" ToolTip="刷新">
                                <DirectEvents>
                                    <Click OnEvent="ReLoad_Click">
                                        <EventMask ShowMask="true" Msg="<span style='font-size: 12px;'>正在刷新中，请稍后...</span>"
                                            MinDelay="10" />
                                    </Click>
                                </DirectEvents>
                            </ext:Button>
                        </Items>
                    </ext:Toolbar>
                </TopBar>
                <Items>
                    <ext:GridPanel ID="GridPanel2" runat="server" Frame="true" StripeRows="true" Title=""
                        Border="false" ClicksToEdit="1" AnimCollapse="false" Icon="Table" TrackMouseOver="true">
                        <Store>
                            <ext:Store ID="Store2" runat="server"  OnRefreshData="Store2_RefreshData">
                                <Reader>
                                    <ext:JsonReader IDProperty="User_WorkFlow_View_User_WorkFlow_Order_ID">
                                        <Fields>
                                            <ext:RecordField Name="User_WorkFlow_View_User_WorkFlow_Order_ID" />
                                            <ext:RecordField Name="User_WorkFlow_View_TitleInfo" />
                                            <ext:RecordField Name="User_WorkFlow_View_Name" />
                                            <ext:RecordField Name="User_WorkFlow_View_CreateDate" />
                                            <ext:RecordField Name="UserInfoName" />
                                            <ext:RecordField Name="Notes" />
                                        </Fields>
                                    </ext:JsonReader>
                                </Reader>
                            </ext:Store>
                        </Store>
                        <ColumnModel ID="ColumnModel1" runat="server">
                            <Columns>
                                <ext:Column Header="标题" DataIndex="User_WorkFlow_View_TitleInfo" Width="183" />
                                <ext:Column Header="编号" DataIndex="User_WorkFlow_View_User_WorkFlow_Order_ID" Width="83" />
                                <ext:Column Header="流程名称" DataIndex="User_WorkFlow_View_Name" Width="183" />
                                <ext:Column Header="创建人" DataIndex="UserInfoName" Width="83" />
                                <ext:Column Header="创建时间" DataIndex="User_WorkFlow_View_CreateDate" Width="153" />
                                <ext:Column Header="备注" DataIndex="Notes" Width="83" />
                                <ext:CommandColumn Width="70" Header="操作" GroupName="Id" ButtonAlign="Center" Align="Center">
                                    <Commands>
                                        <ext:GridCommand Icon="NoteEdit" CommandName="SPWorkFlow" Text="审批">
                                        </ext:GridCommand>
                                    </Commands>
                                </ext:CommandColumn>
                                <ext:CommandColumn Width="90" Header="查看操作" GroupName="Id" ButtonAlign="Center" Align="Center">
                                    <Commands>
                                        <ext:GridCommand Icon="NoteEdit" CommandName="SPLookWorkFlow" Text="查看审批">
                                        </ext:GridCommand>
                                    </Commands>
                                </ext:CommandColumn>
                            </Columns>
                        </ColumnModel>
                             <LoadMask ShowMask="true" />
                        <DirectEvents>
                            <Command OnEvent="SP">
                                <EventMask ShowMask="true" Msg="<span style='font-size: 12px;'>正在操作中，请稍后...</span>"
                                    MinDelay="10" />
                                <ExtraParams>
                                    <ext:Parameter Name="command" Value="command" Mode="Raw" />
                                    <ext:Parameter Name="User_WorkFlow_View_User_WorkFlow_Order_ID" Value="record.data.User_WorkFlow_View_User_WorkFlow_Order_ID"
                                        Mode="Raw" />
                                </ExtraParams>
                            </Command>
                        </DirectEvents>
                        <SelectionModel>
                            <ext:CheckboxSelectionModel ID="CheckboxSelectionModel1" runat="server" />
                        </SelectionModel>
                        <BottomBar>
                            <ext:PagingToolbar ID="PagingToolbar1" runat="server" PageSize="14" DisplayInfo="true"
                                BeforePageText="<span style='font-size:12px'>第</span>" AfterPageText="<span style='font-size:12px'>页</span>"
                                DisplayMsg="<span style='font-size:12px'>显示 {0} - {1}， 共 {2} 条</span>" EmptyMsg="<span style='font-size:12px'>无数据可以显示</span>"
                                Cls="fontsize" />
                        </BottomBar>
                    </ext:GridPanel>
                </Items>
            </ext:Panel>
        </Items>
    </ext:Viewport>
    <ext:Window ID="Window1" runat="server" Resizable="false" Height="560" Icon="Anchor"
        Title="<span style='font-size:14px'>审批界面</span>" Draggable="true" Maximized="true"
        Width="1000" Modal="true" Padding="0" Hidden="true" AutoScroll="true">
        <AutoLoad Mode="IFrame" NoCache="true" ShowMask="true">
        </AutoLoad>
        <Listeners>
            <Hide Handler="DirectMethod.close();" />
        </Listeners>
    </ext:Window>
    </form>
</body>
</html>
