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

<%@ 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 id="Head1" 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" />
</head>
<body style="background-color: #565656">
    <form id="form1" runat="server">
    <ext:ResourceManager ID="ResourceManager1" runat="server" DirectMethodNamespace="DirectMethod">
    </ext:ResourceManager>
   <ext:Panel ID="PList" runat="server" Region="Center" Border="false">
        <Content>
            <table width="100%" style="background-color: #565656">
                <tr>
                    <td align="center">
                        <div style="background-image: url('../FlowPage/icon/1new.png'); width: 880px; height: 10px">
                        </div>
                        <div style="background-image: url('../FlowPage/icon/2.png'); width: 880px; text-align: center">
                            <table width="100%">
                                <tr>
                                    <td align="center">
                                <table cellspacing="9">
                                <tr>
                                    <td>
                                        销售机会名称：<span style="color: Red">*</span>
                                    </td>
                                    <td style="padding-top: 2px; padding-bottom: 2px" colspan="3">
                                        <ext:TextField ID="XSJHMC" runat="server" Width="490" ReadOnly="true">
                                        </ext:TextField>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        客户名称：<span style="color: Red">*</span>
                                    </td>
                                    <td style="padding-top: 2px; padding-bottom: 2px">
                                        <ext:ComboBox ID="KHMC" runat="server" Width="231" DisplayField="KHMC" ValueField="Id"
                                            ReadOnly="true" TypeAhead="true" Mode="Local" ForceSelection="true" TriggerAction="All" ItemSelector="tr.list-item"
                                            MinChars="1" ListWidth="300" PageSize="10" SelectOnFocus="true">
                                            <Store>
                                                <ext:Store ID="Store2" runat="server">
                                                    <Reader>
                                                        <ext:JsonReader IDProperty="Id">
                                                            <Fields>
                                                                <ext:RecordField Name="KHBH" />
                                                                <ext:RecordField Name="KHMC" />
                                                                <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>
                                    </tr>
                            </tpl>
                            <tr class="list-item">
                                <td style="padding:3px 0px;">{KHBH}</td>
                                <td>{KHMC}</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();DirectMethod.Search()" />
                                            </listeners>
                            </ext:ComboBox> </td>
                            <td>
                                联系人：
                            </td>
                            <td style="padding-top: 2px; padding-bottom: 2px">
                                <ext:ComboBox ID="LXR" runat="server" Width="155" DisplayField="XM" ValueField="Id"
                                   ReadOnly="true"  EmptyText="" TypeAhead="true" Mode="Local" ForceSelection="true" TriggerAction="All"
                                    ItemSelector="div.list-item" SelectOnFocus="true" SelectedIndex="0">
                                    <Store>
                                        <ext:Store ID="SLXR" runat="server">
                                            <Reader>
                                                <ext:JsonReader IDProperty="Id">
                                                    <Fields>
                                                        <ext:RecordField Name="XM" />
                                                        <ext:RecordField Name="Id" />
                                                    </Fields>
                                                </ext:JsonReader>
                                            </Reader>
                                        </ext:Store>
                                    </Store>
                                    <Template ID="Template3" runat="server">
                                        <Html>
                                        <tpl for=".">
                                            <div class="list-item">
                                                 <h3>{XM}</h3>							
                                            </div>
                                        </tpl>
                                        </Html>
                                    </Template>
                                </ext:ComboBox>
                            </td>
                            </tr>
                            <tr>
                                <td>
                                    预计成交日期：<span style="color: Red">*</span>
                                </td>
                                <td style="padding-top: 2px; padding-bottom: 2px">
                                    <ext:TriggerField runat="server" ID="YJCJRQ" TriggerIcon="Date" Width="100" Editable="false"  ReadOnly="true">
                                        <Listeners>
                                            <Focus Handler="WdatePicker({toDate:'%y-%M-01',dateFmt:'yyyy-MM-dd',alwaysUseStartDate:true});" />
                                            <TriggerClick Handler="WdatePicker({el:'YJCJRQ',toDate:'%y-%M-01',dateFmt:'yyyy-MM-dd',alwaysUseStartDate:true});" />
                                        </Listeners>
                                    </ext:TriggerField>
                                </td>
                                <td>
                                    类型：
                                </td>
                                <td style="padding-top: 2px; padding-bottom: 2px">
                                    <ext:ComboBox ID="LX" runat="server" SelectedIndex="0" Width="155"  ReadOnly="true">
                                        <Items>
                                            <ext:ListItem Text="无" Value="无" />
                                            <ext:ListItem Text="已有业务" Value="已有业务" />
                                            <ext:ListItem Text="新业务" Value="新业务" />
                                        </Items>
                                    </ext:ComboBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    下一步：
                                </td>
                                <td style="padding-top: 2px; padding-bottom: 2px">
                                    <ext:TextField ID="XYB" runat="server" Width="215"  ReadOnly="true">
                                    </ext:TextField>
                                </td>
                                <td>
                                    客户来源：
                                </td>
                                <td style="padding-top: 2px; padding-bottom: 2px">
                                    <ext:ComboBox ID="KHLY" runat="server" Width="155" DisplayField="FLName" ValueField="Id"
                                      ReadOnly="true"   TypeAhead="true" Mode="Local" ForceSelection="true" TriggerAction="All" ItemSelector="div.list-item"
                                        SelectOnFocus="true">
                                        <Store>
                                            <ext:Store ID="SKHLY" runat="server">
                                                <Reader>
                                                    <ext:JsonReader IDProperty="Id">
                                                        <Fields>
                                                            <ext:RecordField Name="FLName" />
                                                            <ext:RecordField Name="Id" />
                                                        </Fields>
                                                    </ext:JsonReader>
                                                </Reader>
                                            </ext:Store>
                                        </Store>
                                        <Template ID="Template1" runat="server">
                                            <Html>
                                            <tpl for=".">
						<div class="list-item">
							 <h3>{FLName}</h3>							
						</div>
					</tpl>
                                            </Html>
                                        </Template>
                                    </ext:ComboBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    销售阶段：
                                </td>
                                <td style="padding-top: 2px; padding-bottom: 2px">
                                    <ext:ComboBox ID="XSJD" runat="server" Width="215" DisplayField="FLName" ValueField="Id"
                                       ReadOnly="true"  TypeAhead="true" Mode="Local" ForceSelection="true" TriggerAction="All" ItemSelector="div.list-item"
                                        SelectOnFocus="true">
                                        <Store>
                                            <ext:Store ID="SXSJD" runat="server">
                                                <Reader>
                                                    <ext:JsonReader IDProperty="Id">
                                                        <Fields>
                                                            <ext:RecordField Name="FLName" />
                                                            <ext:RecordField Name="Id" />
                                                        </Fields>
                                                    </ext:JsonReader>
                                                </Reader>
                                            </ext:Store>
                                        </Store>
                                        <Template ID="Template2" runat="server">
                                            <Html>
                                            <tpl for=".">
						<div class="list-item">
							 <h3>{FLName}</h3>							
						</div>
					</tpl>
                                            </Html>
                                        </Template>
                                    </ext:ComboBox>
                                </td>
                                <td>
                                    负责人：<span style="color: Red">*</span>
                                </td>
                                <td style="padding-top: 2px; padding-bottom: 2px">
                                    <ext:ComboBox ID="FZR" runat="server" Width="155" DisplayField="Name" ValueField="LoginAccount"
                                       ReadOnly="true"  TypeAhead="true" Mode="Local" ForceSelection="true" TriggerAction="All" EmptyText="选择一个负责人"
                                        ItemSelector="div.list-item" SelectOnFocus="true">
                                        <Store>
                                            <ext:Store ID="Store1" runat="server">
                                                <Reader>
                                                    <ext:JsonReader IDProperty="LoginAccount">
                                                        <Fields>
                                                            <ext:RecordField Name="DepartmentName" />
                                                            <ext:RecordField Name="Name" />
                                                            <ext:RecordField Name="PostionName" />
                                                            <ext:RecordField Name="LoginAccount" />
                                                        </Fields>
                                                    </ext:JsonReader>
                                                </Reader>
                                            </ext:Store>
                                        </Store>
                                        <Template ID="Template4" runat="server">
                                            <Html>
                                            <tpl for=".">
						                                    <div class="list-item">
							                                     <h3>{LoginAccount}{Name}</h3>
							                                     {DepartmentName}, {PostionName}
						                                    </div>
					                                    </tpl>
                                            </Html>
                                        </Template>
                                    </ext:ComboBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    可能性：
                                </td>
                                <td style="padding-top: 2px; padding-bottom: 2px">
                                    <ext:NumberField ID="KNX" runat="server" MinValue="0" Width="100"  ReadOnly="true">
                                    </ext:NumberField>
                                    %
                                </td>
                                <td>
                                    金额：<span style="color: Red">*</span>
                                </td>
                                <td style="padding-top: 2px; padding-bottom: 2px">
                                    <ext:TextField ID="JE" Width="155" runat="server"  ReadOnly="true">
                                    </ext:TextField>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    营销活动：
                                </td>
                                <td colspan="3">
                                    <ext:HtmlEditor ID="YXHD" runat="server" Width="490" Height="123"  ReadOnly="true">
                                    </ext:HtmlEditor>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    阶段描述：
                                </td>
                                <td colspan="3">
                                    <ext:HtmlEditor ID="JDMS" runat="server" Width="490" Height="123"  ReadOnly="true">
                                    </ext:HtmlEditor>
                                </td>
                            </tr>
                            </table>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div style="background-image: url('../FlowPage/icon/1.png'); width: 880px; height: 10px">
                        </div>
                    </td>
                </tr>
            </table>
        </Content>
    </ext:Panel>
    </form>
</body>
</html>
