<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GYSList.aspx.cs" Inherits="WorkFlow.GYSManager.GYSList" %>

<%@ 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="../FlowPage/css/main.css" rel="stylesheet" type="text/css" />
    <link href="../FlowPage/css/ext-all.css" rel="stylesheet" type="text/css" />

    <script src="../js/My97DatePicker/WdatePicker.js" type="text/javascript"></script>

    <script type="text/javascript">
    
        var saveData = function () {
            GridData.setValue(Ext.encode(GridPanel2.getRowsValues({selectedOnly : false})));
        };
         var renderTopic = function (value,p,record) {
           return String.format(  '<b><a href="LookCP.aspx?id={1}" target="_blank" title="查看详细信息">{0}</a>', value,record.id);
        }; 
         var renderTopic1 = function (value,p,record) {
         
           return String.format(  '<b><a href="http://{1}" target="_blank" title="跳转打开该网址">{0}</a>', value,value);
        }; 
     
    </script>

</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" AutoScroll="true">
        <Items>
            <ext:Panel ID="Panel9" runat="server" Layout="Fit" Region="Center" Title="">
                <TopBar>
                    <ext:Toolbar ID="Toolbar1" runat="server">
                        <Items>
                            <ext:Hidden ID="GridData" runat="server" />
                            <ext:Hidden ID="hidAccount" runat="server" />
                            <ext:Button ID="Button4" runat="server" Text="新增" Icon="Add" ToolTip="新增产品">
                                <DirectEvents>
                                    <Click OnEvent="Add_Click">
                                    </Click>
                                </DirectEvents>
                            </ext:Button>
                        </Items>
                    </ext:Toolbar>
                </TopBar>
                <Items>
                    <ext:TabPanel ID="TabPanel1" runat="server" TabPosition="Bottom" Plain="true" Header="false"
                        Border="false" Title="Center">
                        <Items>
                            <ext:Panel ID="Panel10" runat="server" Title="<span style='font-size:14px'>我的供应商</span>"
                                Layout="FitLayout">
                                <Items>
                                    <ext:GridPanel ID="GridPanel1" runat="server" Frame="true" StripeRows="true" AnimCollapse="false"
                                        Icon="Table" TrackMouseOver="true">
                                        <Store>
                                            <ext:Store ID="Store1" runat="server" OnRefreshData="Store1_RefreshData">
                                                <Reader>
                                                    <ext:JsonReader IDProperty="Id">
                                                        <Fields>
                                                            <ext:RecordField Name="Id" />
                                                            <ext:RecordField Name="Name" />
                                                            <ext:RecordField Name="HY" />
                                                            <ext:RecordField Name="DH" />
                                                            <ext:RecordField Name="BH" />
                                                            <ext:RecordField Name="WZ" />
                                                            <ext:RecordField Name="CS" />
                                                            <ext:RecordField Name="FZR" />
                                                            <ext:RecordField Name="CreateDate" />
                                                        </Fields>
                                                    </ext:JsonReader>
                                                </Reader>
                                            </ext:Store>
                                        </Store>
                                        <ColumnModel ID="ColumnModel2" runat="server">
                                            <Columns> <ext:Column Header="编号 " DataIndex="BH" Width="70" />
                                                <ext:Column Header="供应商名称" DataIndex="Name" Width="250">
                                                    <Renderer Fn="renderTopic" />
                                                </ext:Column>
                                                <ext:Column Header="电话" DataIndex="DH" Width="110" />
                                                <ext:Column Header="行业" DataIndex="HY" Width="90" />                                               
                                                <ext:Column Header="网站 " DataIndex="WZ" Width="190" >
                                                    <Renderer Fn="renderTopic1" />
                                                </ext:Column>
                                                <ext:Column Header="城市 " DataIndex="CS" Width="70" />
                                                <ext:Column Header="负责人" DataIndex="FZR" Width="70" />
                                                <ext:Column Header="创建时间" DataIndex="CreateDate" Width="90" />
                                                <ext:Column Header="<span style='color:red'>是否共享</span>" DataIndex="GX" Width="70" />
                                                <ext:CommandColumn Width="66" Header="工具" Align="Center" ButtonAlign="Center">
                                                    <Commands>                                                   
                                                        <ext:GridCommand Icon="BookAddressesEdit" CommandName="Edit" Text="修改">
                                                        </ext:GridCommand>
                                                    </Commands>
                                                </ext:CommandColumn>
                                            </Columns>
                                        </ColumnModel>
                                        <LoadMask ShowMask="true" />
                                        <DirectEvents>
                                            <Command OnEvent="Command">
                                                <EventMask ShowMask="true" Msg="<span style='font-size: 12px;'>正在操作中，请稍后...</span>"
                                                    MinDelay="10" />
                                                <ExtraParams>
                                                    <ext:Parameter Name="command" Value="command" Mode="Raw" />
                                                    <ext:Parameter Name="Id" Value="record.data.Id" Mode="Raw" />
                                                </ExtraParams>
                                            </Command>
                                        </DirectEvents>
                                        <SelectionModel>
                                            <ext:CheckboxSelectionModel ID="CheckboxSelectionModel2" runat="server" />
                                        </SelectionModel>
                                        <BottomBar>
                                            <ext:PagingToolbar ID="PagingToolbar1" runat="server" PageSize="17" 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>
                            <ext:Panel ID="Panel11" runat="server" Title="<span style='font-size:14px'>共享供应商</span>"
                                Layout="FitLayout">
                                <Items>
                                </Items>
                            </ext:Panel>
                        </Items>
                        <DirectEvents>
                            <TabChange OnEvent="ChageTab_Click">
                            </TabChange>
                        </DirectEvents>
                    </ext:TabPanel>
                </Items>
            </ext:Panel>
        </Items>
    </ext:Viewport>
    <ext:Window ID="Window5" runat="server" Closable="True" Resizable="false" Height="500"
        Constrain="true" Icon="Anchor" Title="<span style='font-size:14px'>新增供应商</span>"
        Draggable="true" CloseAction="Hide" Width="700" Modal="true" Padding="0" Hidden="true"
        AutoScroll="true" Layout="FitLayout">
        <AutoLoad Mode="IFrame" NoCache="true" ShowMask="true">
        </AutoLoad>
        <Listeners>
            <Hide Handler="DirectMethod.Window5Close();" />
        </Listeners>
    </ext:Window>
    </form>
</body>
</html>
