<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CPAdd.aspx.cs" Inherits="WorkFlow.CPManager.CPAdd"
    ValidateRequest="false" %>

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<%@ 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" />
    <style type="text/css">
        .cbStates-list
        {
            width: 398px;
            font: 11px tahoma,arial,helvetica,sans-serif;
        }
        .cbStates-list th
        {
            font-weight: bold;
        }
        .cbStates-list td, .cbStates-list th
        {
            padding: 3px;
        }
    </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="PList" runat="server" Layout="Fit" Region="Center">
                <Items>
                    <ext:Panel ID="Panel6" runat="server" Border="false" AutoScroll="true">
                        <TopBar>
                            <ext:Toolbar ID="Toolbar1" runat="server">
                                <Items>
                                    <ext:Hidden ID="UpdateId" runat="server">
                                    </ext:Hidden>
                                    <ext:Button ID="Button3" runat="server" Text="保存" Icon="Disk" ToolTip="保存产品">
                                        <DirectEvents>
                                            <Click OnEvent="Add_Click">
                                            </Click>
                                        </DirectEvents>
                                    </ext:Button>
                                </Items>
                            </ext:Toolbar>
                        </TopBar>
                        <Items>
                            <ext:Panel ID="Panel2" runat="server" Title="<span style='font-size: 12px;'>产品信息</span>"
                                FormGroup="true" AutoScroll="false">
                                <Content>
                                    <table cellspacing="9">
                                        <tr>
                                            <td>
                                                产品名称：<span style="color: Red">*</span>
                                            </td>
                                            <td style="padding-top: 2px; padding-bottom: 2px">
                                                <ext:TextField ID="CPMC" runat="server" Width="215">
                                                </ext:TextField>
                                            </td>
                                            <td>
                                                产品编码：<span style="color: Red">*</span>
                                            </td>
                                            <td style="padding-top: 2px; padding-bottom: 2px">
                                                <ext:TextField ID="CPBM" runat="server" Width="215">
                                                </ext:TextField>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                产品类别：
                                            </td>
                                            <td style="padding-top: 2px; padding-bottom: 2px">
                                                <ext:ComboBox ID="CPLB" runat="server" Width="215" DisplayField="Name" ValueField="Id"
                                                    TypeAhead="true" Mode="Local" ForceSelection="true" TriggerAction="All" ItemSelector="div.list-item"
                                                    SelectOnFocus="true">
                                                    <Store>
                                                        <ext:Store ID="SCPLB" runat="server">
                                                            <Reader>
                                                                <ext:JsonReader IDProperty="Id">
                                                                    <Fields>
                                                                        <ext:RecordField Name="Name" />
                                                                        <ext:RecordField Name="Id" />
                                                                    </Fields>
                                                                </ext:JsonReader>
                                                            </Reader>
                                                        </ext:Store>
                                                    </Store>
                                                    <Template ID="Template15" runat="server">
                                                        <Html>
                                                        <tpl for=".">
						                                    <div class="list-item">
							                                     <h3>{Name}</h3>							
						                                    </div>
					                                    </tpl>
                                                        </Html>
                                                    </Template>
                                                </ext:ComboBox>
                                            </td>
                                            <td>
                                                型号 ：
                                            </td>
                                            <td style="padding-top: 2px; padding-bottom: 2px">
                                                <ext:TextField ID="XH" runat="server" Width="215">
                                                </ext:TextField>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                单位：
                                            </td>
                                            <td style="padding-top: 2px; padding-bottom: 2px">
                                                <ext:ComboBox ID="DW" runat="server" Width="215" DisplayField="Name" ValueField="Id"
                                                    TypeAhead="true" Mode="Local" ForceSelection="true" TriggerAction="All" ItemSelector="div.list-item"
                                                    SelectOnFocus="true">
                                                    <Store>
                                                        <ext:Store ID="SDW" runat="server">
                                                            <Reader>
                                                                <ext:JsonReader IDProperty="Id">
                                                                    <Fields>
                                                                        <ext:RecordField Name="Name" />
                                                                        <ext:RecordField Name="Id" />
                                                                    </Fields>
                                                                </ext:JsonReader>
                                                            </Reader>
                                                        </ext:Store>
                                                    </Store>
                                                    <Template ID="Template1" runat="server">
                                                        <Html>
                                                        <tpl for=".">
						                                    <div class="list-item">
							                                     <h3>{Name}</h3>							
						                                    </div>
					                                    </tpl>
                                                        </Html>
                                                    </Template>
                                                </ext:ComboBox>
                                            </td>
                                            <td>
                                                安全库存量：
                                            </td>
                                            <td style="padding-top: 2px; padding-bottom: 2px">
                                                <ext:TextField ID="AQKCL" runat="server" Width="215">
                                                </ext:TextField>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                供应商名称：
                                            </td>
                                            <td style="padding-top: 2px; padding-bottom: 2px">
                                            
                                               <ext:ComboBox ID="GYSMC" runat="server" Width="215" DisplayField="Name" ValueField="Id"
                                            TypeAhead="true" Mode="Local" ForceSelection="true" TriggerAction="All" ItemSelector="tr.list-item"
                                            MinChars="1" ListWidth="400" PageSize="10" SelectOnFocus="true">
                                            <Store>
                                                <ext:Store ID="SGYSMC" runat="server">
                                                    <Reader>
                                                        <ext:JsonReader IDProperty="Id">
                                                            <Fields>
                                                                <ext:RecordField Name="CS" />
                                                                <ext:RecordField Name="Name" />
                                                                      <ext:RecordField Name="HY" />
                                                                <ext:RecordField Name="Id" />
                                                            </Fields>
                                                        </ext:JsonReader>
                                                    </Reader>
                                                    <AutoLoadParams>
                                                        <ext:Parameter Name="start" Value="0" Mode="Raw" />
                                                        <ext:Parameter Name="limit" Value="10" Mode="Raw" />
                                                    </AutoLoadParams>
                                                </ext:Store>
                                            </Store>
                                            <Template ID="Template18" runat="server">
                                                <Html>
                                                <tpl for=".">
                            <tpl if="[xindex] == 1">
                                <table class="cbStates-list">
                                    <tr>
                                        <th>供应商</th>
                                        <th>城市</th>
                                          <th>行业</th>
                                    </tr>
                            </tpl>
                            <tr class="list-item">
                                <td style="padding:3px 0px;">{Name}</td>
                                <td>{CS}</td>  <td>{HY}</td>
                            </tr>
                       <tpl if="[xcount-xindex]==0">
                            </table>
                            </tpl> </tpl> </Html> </Template>
                          <Triggers>
                <ext:FieldTrigger Icon="Clear" HideTrigger="true" />
            </Triggers>
            <Listeners>
                <BeforeQuery Handler="this.triggers[0][ this.getRawValue().toString().length == 0 ? 'hide' : 'show']();" />
                <TriggerClick Handler="if (index == 0) { this.focus().clearValue(); trigger.hide();}" />
                <Select Handler="this.triggers[0].show();" />
            </Listeners>
                            </ext:ComboBox>
                                            </td>
                                            <td>
                                                重量：
                                            </td>
                                            <td style="padding-top: 2px; padding-bottom: 2px">
                                                <ext:TextField ID="ZL" runat="server" Width="215">
                                                </ext:TextField>
                                            </td>
                                        </tr>
                                    </table>
                                </Content>
                            </ext:Panel>
                            <ext:Panel ID="Panel3" runat="server" Title="<span style='font-size: 12px;'>价格信息</span>"
                                FormGroup="true" AutoScroll="false">
                                <Content>
                                    <table cellspacing="9">
                                        <tr>
                                            <td>
                                                建议成交价：
                                            </td>
                                            <td style="padding-top: 2px; padding-bottom: 2px">
                                                <ext:TextField ID="JYCJJ" runat="server" Width="115">
                                                </ext:TextField>
                                            </td>
                                            <td>
                                                单价：
                                            </td>
                                            <td style="padding-top: 2px; padding-bottom: 2px">
                                                <ext:TextField ID="DJ" runat="server" Width="115">
                                                </ext:TextField>
                                            </td>
                                            <td>
                                                成本价：
                                            </td>
                                            <td style="padding-top: 2px; padding-bottom: 2px">
                                                <ext:TextField ID="CBJ" runat="server" Width="115">
                                                </ext:TextField>
                                            </td>
                                        </tr>
                                    </table>
                                </Content>
                            </ext:Panel>
                            <ext:Panel ID="Panel5" runat="server" Title="<span style='font-size: 12px;'>描述信息</span>"
                                FormGroup="true" AutoScroll="false">
                                <Content>
                                    <table cellspacing="9">
                                        <tr>
                                            <td>
                                                描述 ：
                                            </td>
                                            <td style="padding-top: 2px; padding-bottom: 2px">
                                                <FCKeditorV2:FCKeditor ID="MS" runat="server" Width="570px">
                                                </FCKeditorV2:FCKeditor>
                                            </td>
                                        </tr>
                                    </table>
                                </Content>
                            </ext:Panel>
                        </Items>
                    </ext:Panel>
                </Items>
            </ext:Panel>
        </Items>
    </ext:Viewport>
    </form>
</body>
</html>
