<div ms-controller="marketingsalesopportunities">
    <table border="0" align="center" cellpadding="0" cellspacing="0" style="margin-bottom: -5px; width: 990px;">
        <tbody style="background-color: #fff;">
            <tr>
                <!--leftNav-->
                <td width="120" height="*" valign="top" bgcolor="#edecec" id="view_left">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableClassify">
                        <tbody>
                            <tr>
                                <td class="salesstate">
                                    <div ms-class="_{{entity.State}}">
                                        <i class="i" ms-title="entity.StateDisplay"></i>
                                        <div class="t">{{entity.StateDisplay}}</div>
                                    </div>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <div>
                        <ul style="margin-top: 16px;">
                            <li ms-class-selected="currNav==1"><a ms-click="doChangeNav(1)" href="javascript:void(0)">机会详情</a></li>
                            <li ms-class-selected="currNav==2"><a ms-click="doChangeNav(2)" href="javascript:void(0)">跟单报价</a></li>
                            <li ms-class-selected="currNav==3"><a ms-click="doChangeNav(3)" href="javascript:void(0)">相关日程</a></li>
                            <li ms-class-selected="currNav==4"><a ms-click="doChangeNav(4)" href="javascript:void(0)">相关合同</a></li>
                        </ul>
                    </div>
                </td>
                <!--End leftNav-->
                <td valign="top">
                    <table width="100%" border="0" cellpadding="0" cellspacing="0" id="salesPanelPrint">
                        <tbody>
                            <tr>
                                <td class="addrightbg" valign="top" style="height: 46px; line-height: 46px; border-bottom: 1px solid #d2d2d2;">&nbsp; 
                                    <span style='color: #2D2D2D; font-weight: 300; font-size: 18px; font-family: "黑体"; font-family: "Microsoft Yahei";'>{{entity.Title|truncate(25,"...")}}
                                        <span style="font-size: 9pt; background: #ffd800;">{{entity.CustomerSourceDisplay}}</span>
                                    </span>
                                    <span style="float: right; margin-right: 15px;">
                                        <a ms-if="entity.EDIT" href="javascript:void(0)" ms-click="doedit(entity.Id)" class="view_doedit">编辑</a>
                                        <a ms-if="entity.DELETE" href="javascript:void(0)" ms-click="dodel(entity.Id)" class="view_doalldel">删除</a>
                                        <a href="javascript:void(0)" ms-click="doPrint" class="view_doprint">打印</a>
                                        <a class="view_prefix" ms-if="hasPrevious" href="javascript:void(0)" ms-click="doview(previousId)" ms-title="previousLabel">&nbsp;</a>
                                        <a class="view_next" ms-if="hasNext" href="javascript:void(0)" ms-title="nextLabel" ms-click="doview(nextId)">&nbsp;</a>
                                    </span>
                                </td>
                            </tr>
                            <tr ms-if='currNav==1'>
                                <td>
                                    <table border="0" cellspacing="1" cellpadding="0" bgcolor="#D2D2D2" style="width: 98%; margin: 5px auto;" class="tablecInfo">
                                        <tr>
                                            <td width="80" height="30" bgcolor="#FAFAFA">归属战役：
                                            </td>
                                            <td width="37%" bgcolor="#FAFAFA">{{entity.MarketingCampaignDisplay}}
                                            </td>
                                            <td width="80" bgcolor="#FAFAFA">归属活动：
                                            </td>
                                            <td width="37%" bgcolor="#FAFAFA">{{entity.MarketActivityDisplay}}
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>客户：
                                            </td>
                                            <td bgcolor="#FFFFFF">
                                                <a href="javascript:void(0)" ms-click="viewCustomer(entity.Customer)">{{entity.CustomerDisplay}}
                                            </td>
                                            <td height="30" bgcolor="#FFFFFF">客户联系人：
                                            </td>
                                            <td bgcolor="#FFFFFF">
                                                <a href="javascript:void(0)" ms-click="viewContact(entity.CustomerContact)">{{entity.CustomerContactDisplay}}</a>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>签单可能性：
                                            </td>
                                            <td ms-widget='processbar,hotprocessbarid2,hotOpts2' readonly="readonly"></td>
                                            <td bgcolor="#FFFFFF" style="width: 130px;">机会提供人：
                                            </td>
                                            <td style="background: #fff;">
                                                {{entity.InfoProvider}}
                                            </td>
                                        </tr>
                                        <tr class="bg">
                                            <td bgcolor="#FFFFFF">预签单日期：
                                            </td>
                                            <td style="background: #fff;">{{entity.ExpectSigningDate|truncate(10,"")}}
                                            </td>
                                            <td bgcolor="#FFFFFF">预签金额：
                                            </td>
                                            <td style="background: #fff;">{{entity.ExpectAmount}}
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>跟单阶段：
                                            </td>
                                            <td colspan="3" style="background: #fff; height: 80px; width: 717px; overflow: hidden;" ms-widget='followStage,followStage2,stageOpts2'></td>
                                        </tr>
                                        <tr class="bg">
                                            <td  bgcolor="#FFFFFF">跟单标签：
                                            </td>
                                            <td colspan="3" valign="top" style="background: #fff;">{{entity.FollowServerTagDisplay}}
                                            </td>
                                        </tr>
                                        <tr class="bg">
                                            <td bgcolor="#FFFFFF">机会描述：
                                            </td>
                                            <td colspan="3" valign="top" style="background: #fff; height: 200px;">{{entity.CustomerDemand|html}}
                                            </td>
                                        </tr>
                                        <!--<tr>
                                            <td>备注：
                                            </td>
                                            <td colspan="3" valign="top" style="background: #fff; height: 100px;">{{entity.Remark}}
                                            </td>
                                        </tr>-->
                                        <tr>
                                            <td>附件：</td>
                                            <td>
                                                <a ms-href="/Upload/Down?path={{entity.AttachmentPath}}" target="_blank">{{entity.AttachmentName}}</a>
                                            </td>
                                            <td>机会状态：
                                            </td>
                                            <td style="background: #fff;">{{entity.StateDisplay}}
                                            </td>
                                        </tr>
                                        <tr>
                                            <td bgcolor="#FFFFFF" style="width: 130px;">机会跟单人：
                                            </td>
                                            <td style="background: #fff;">
                                                <a href="javascript:void(0)" ms-widget='userCard' ms-data-userid="entity.OpportunitiesFollow">{{entity.OpportunitiesFollowDisplay}}</a>
                                            </td>
                                            <td bgcolor="#FFFFFF" style="width: 130px;">发现时间：
                                            </td>
                                            <td bgcolor="#FFFFFF">{{entity.DiscoverDate}}
                                            </td>
                                        </tr>
                                        <tr class="bg">
                                            <td>录入人：
                                            </td>
                                            <td style="background: #fff;">{{entity.AddBy?entity.AddBy.FullName:''}}
                                            </td>
                                            <td>录入日期：
                                            </td>
                                            <td style="background: #fff;">{{entity.AddTime}}
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr ms-if='currNav !=1'>
                                <td>
                                    <div style="min-height: 500px; padding: 10px;" id="salesOtherview">
                                    </div>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
        </tbody>
    </table>
</div>
