<div ms-controller="marketingcontract">
    <table border="0" align="center" cellpadding="0" cellspacing="0" style="margin-bottom: -5px; width: 100%;">
        <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>
                                    <i ms-if="entity.State==112001" class="contractEnd_big" title="执行中"></i>
                                    <i ms-if="entity.State==112002" class="contractStop_bigs" title="结束"></i>
                                    <i ms-if="entity.State==112003" class="contractexecute_bigs" title="意外终止"></i>
                                    <span ms-if="entity.State==112001" style="margin-left: 35px; font-size: 18px; color: green; font-weight: bold;">执行中</span>
                                    <span ms-if="entity.State==112002" style="margin-left: 35px; font-size: 18px; color: red; font-weight: bold;">结束</span>
                                    <span ms-if="entity.State==112003" style="margin-left: 35px; font-size: 18px; color: black; font-weight: bold;">意外终止</span>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <div style="min-height:420px;">
                        <ul style="margin-top: 16px;">
                            <li ms-class-selected="currNav==1"><a ms-click="doChangeNav(1,0)" href="javascript:void(0)">合同详情</a></li>
                            <li ms-class-selected="currNav==4"><a ms-click="doChangeNav(4)" href="javascript:void(0)">应收记录</a></li>
                            <li ms-class-selected="currNav==5"><a ms-click="doChangeNav(5)" href="javascript:void(0)">应付记录</a></li>
                            <li ms-class-selected="currNav==2"><a ms-click="doChangeNav(2,entity.ContractNum,entity.Customer,entity.Id)" 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>
                            <li ms-class-selected="currNav==5"><a ms-click="doChangeNav(5)" href="javascript:void(0)">服务记录</a></li>-->
                        </ul>
                    </div>
                </td>
                <!--End leftNav-->
                <td valign="top">
                    <table width="100%" border="0" cellpadding="0" cellspacing="0" id="ContractPanelPrint">
                        <tbody>
                            <tr>
                                <td class="addrightbg" valign="top" style="height: 46px; line-height: 46px; border-bottom: 1px solid #d2d2d2;">&nbsp; <a style='color: #2D2D2D; font-weight: 300; font-size: 18px; font-family: "黑体"; font-family: "Microsoft Yahei";'>{{entity.ContractName}}</a>
                                    <a title="百度搜索" target="_blank" ms-href="'http://www.baidu.com/s?wd='+entity.Name">
                                        <img style="margin-top: 17px;" src="/Content/Themes/base/Images/ico/c_baidu.jpg"></a>
                                    <a title="谷歌搜索" target="_blank" ms-href="'http://www.google.com.hk/search?q='+entity.Name">
                                        <img style="margin-top: 17px;" src="/Content/Themes/base/Images/ico/c_google.jpg"></a>
                                    <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>
                                    <div style="width: 99%;" class="top10" ms-if="!entity.IsSample">
                                        <div>
                                            <ul class="tabWarp" style="padding-left: 10px;">
                                                <li ms-class-hover="tab=='tab1'" ms-class-normal="tab!='tab1'" val="tab1" ms-click="tabChange">基本信息</li>
                                                <li ms-class-hover="tab=='tab2'" ms-class-normal="tab!='tab2'" val="tab2" ms-click="tabChange">业务明细</li>
                                                <li ms-class-hover="tab=='tab3'" ms-class-normal="tab!='tab3'" val="tab3" ms-click="tabChange">付款发货</li>
                                                <!--<li ms-class-hover="tab=='tab4'" ms-class-normal="tab!='tab4'" val="tab4" ms-click="tabChange">应收应付</li>-->
                                            </ul>
                                        </div>
                                        <div class="tabContent" ms-visible="tab=='tab1'">
                                            <table style="width: 99%; margin: 0 10px;" border="0" cellspacing="1" cellpadding="0" class="tablecInfo">
                                                <tr>
                                                    <td width="100">{{lang.BelongToCampaign}}：
                                                    </td>
                                                    <td width="340">{{entity.MarketingCampaignDisplay}}
                                                    </td>
                                                    <td width="100">{{lang.BelongToActivity}}：
                                                    </td>
                                                    <td width="340">{{entity.MarketActivityDisplay}}
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>{{lang.BelongToSalesOpportunities}}：
                                                    </td>
                                                    <td>{{entity.SalesOpportunitiesDisplay}}
                                                    </td>
                                                    <td>{{lang.BelongToDocumentaryOffer}}：
                                                    </td>
                                                    <td>{{entity.DocumentaryOfferDisplay}}
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>{{lang.BelongToEmployee}}：
                                                    </td>
                                                    <td>{{entity.BelongToDisplay}}
                                                    </td>
                                                    <td>{{lang.ContractType}}：</td>
                                                    <td>{{entity.ContractTypeDisplay}} &nbsp;&nbsp;({{lang.ContractNumber}}： {{entity.ContractNum}})    
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="4" style="height: 20px; background-color: #fff"></td>

                                                </tr>
                                                <tr>
                                                    <td>{{lang.SignDateTime}}：
                                                    </td>
                                                    <td>{{entity.SignAContractDate|truncate(10,'')}}
                                                    </td>
                                                    <td>{{lang.ContractLitmid}}：
                                                    </td>
                                                    <td>{{entity.StartDate|truncate(10,'')}} 至 {{entity.EndDate|truncate(10,'')}}&nbsp; &nbsp; &nbsp; 
                                                        <span ms-if="showdate" style="color: green;">离到期&nbsp;{{dtime}}天</span>
                                                        <span ms-if="!showdate" style="color: red;">已过期&nbsp;{{dtime}}天</span>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td rowspan="2">{{lang.MySignPersion}}：
                                                    </td>
                                                    <td rowspan="2">{{entity.MySignPersionDisplay}}
                                                    </td>
                                                    <td>客户：</td>
                                                    <td><a href='javascript:void(0);' ms-click="gotoview(entity.Customer)">{{entity.CustomerDisplay}}</a>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>{{lang.CustomerSignPersion}}：</td>
                                                    <td>{{entity.CustomerSignDisplay}}
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>{{lang.ContractState}}：
                                                    </td>
                                                    <td>
                                                        <span ms-if="entity.State==112002" style="color: red;">{{entity.StateDisplay}}</span>
                                                        <span ms-if="entity.State!=112002" style="color: black;">{{entity.StateDisplay}}</span>
                                                    </td>
                                                    <td>合同总金额：</td>
                                                    <td>
                                                        <span style="font-size: 20px; color: blue;">{{entity.Amount}}</span>元
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>{{lang.CurrentStage}}：
                                                    </td>
                                                    <td>
                                                        <span ms-if="entity.State==112002" style="color: red;">{{entity.CurrentStageDisplay}}</span>
                                                        <span ms-if="entity.State!=112002" style="color: black;">{{entity.CurrentStageDisplay}}</span>


                                                    </td>
                                                    <td>毛利估算：
                                                    </td>
                                                    <td>{{entity.GrossProfit}}
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>附件：
                                                    </td>
                                                    <td>
                                                        <ul>
                                                            <li ms-repeat-file="entity.FileList">
                                                                <a ms-if="file.Id>0" ms-href="/Upload/DownAttachmet/{{file.Id}}" target="_blank" style="margin-left:5px;">{{file.FileName}}</a>
                                                                <a ms-if="file.Id<0" ms-href="/Upload/Down?path={{file.Path}}" target="_blank" style="margin-left:5px;">{{file.FileName|getFileName}}</a>
                                                                <span ms-if="!file.Id" class="txtdeleted">{{file.FileName}}</span>
                                                            </li>
                                                        </ul>
                                                    </td>
                                                    <td>{{lang.ReturnedMoney}}：
                                                    </td>
                                                    <td>
                                                        <span style="font-size: 20px; color: green;">{{entity.ReturnedMoney?entity.ReturnedMoney:0}}</span> 元<span ms-if="entity.Amount-entity.ReturnedMoney >0">(待收余款<span style="color: red; font-size: 20px;">{{entity.Amount-entity.ReturnedMoney}}</span>元)</span>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top">{{lang.ContractRemark}}：
                                                    </td>
                                                    <td valign="top" colspan="3" style="height: 100px;">{{entity.Remark|html}}
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>录入人：</td>
                                                    <td>{{entity.AddByName}}</td>
                                                    <td>录入时间：</td>
                                                    <td>{{entity.AddTime}}
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                        <div class="tabContent" ms-visible="tab=='tab2'">
                                            <table style="width: 99%; margin: 0 auto;" border="0" cellspacing="1" cellpadding="0" class="tableList hasOfferPanel">
                                                <tr class="minhead" align="center">
                                                    <td width="18%">{{lang.ProductOrServerName}}
                                                    </td>
                                                    <td width="10%">{{lang.ProductAlias}}
                                                    </td>
                                                    <td width="8%">{{lang.Brand|html}}
                                                    </td>
                                                    <td width="10%">规格/型号/摘要
                                                    </td>
                                                    <td width="10%">单价
                                                    </td>
                                                    <td width="6%">{{lang.Price}}
                                                    </td>
                                                    <td width="6%">{{lang.Quantity}}
                                                    </td>
                                                    <td width="6%">金额
                                                    </td>
                                                    <td width="6%" ms-visible="PRODUCTSTOCKTPRICE">提成基准价
                                                    </td>
                                                    <td width="6%" ms-visible="PRODUCTSTOCKTPRICE">提成金额
                                                    </td>
                                                    <td width="6%">已出库
                                                    </td>
                                                    <td width="6%">已回款
                                                    </td>
                                                </tr>
                                                <tbody ms-each-item="contractdetailslist">
                                                    <tr align="center" style="background-color: rgb(255, 255, 255);" ms-click="onSetIndex">
                                                        <td align="left">
                                                            <a href='javascript:void(0);' ms-click="gotoview(item.Id,'productlist')" ms-click="viewProduct(item.Product)">{{item.ProductName|truncate(20)}}</a>
                                                            &nbsp;
                                                            <a ms-if="item.Product" ms-click="viewProduct(item.Product)" href="javascript:void(0);" class="productbtn" title="查看产品"></a>
                                                        </td>
                                                        <td align="left">{{item.ProductAlias}}
                                                        </td>
                                                        <td>{{item.BrandDisplay}}
                                                        </td>
                                                        <td>{{item.Standard}}
                                                        </td>
                                                        <td>{{item.StandardPrice}}
                                                        </td>
                                                        <td>{{item.Price}}
                                                        </td>
                                                        <td>{{item.Num}}
                                                        </td>
                                                        <td align="left">{{item.Money}}
                                                        </td>
                                                        <td ms-visible="PRODUCTSTOCKTPRICE">
                                                            {{item.RoyaltyPrice}}
                                                        </td>
                                                        <td ms-visible="PRODUCTSTOCKTPRICE">
                                                            {{item.RoyaltyMoney}}
                                                        </td>
                                                        <td>{{item.OutNum}}
                                                        </td>
                                                        <td>{{item.ReturnAmount}}
                                                        </td>
                                                    </tr>

                                                </tbody>
                                                <tr style="background-color: rgb(255, 255, 255);">
                                                    <td colspan="7" style="background-color: rgb(255, 255, 255);">
                                                        <table width="100%" border="0" cellspacing="1" cellpadding="0">
                                                            <tr style="background: #fff;">
                                                                <td>&nbsp;</td>
                                                                <td style="text-align: right;">小计</td>
                                                            </tr>
                                                            <tr style="background: #fff;" ms-visible="entity.ContainsTax">
                                                                <td>&nbsp;</td>
                                                                <td style="text-align: right;">上述价格&nbsp;&nbsp; 另计税金:&nbsp;&nbsp;税率
                                                                </td>
                                                            </tr>
                                                            <tr style="background: #fff;" ms-visible="entity.ContainsTax">
                                                                <td>&nbsp;</td>
                                                                <td style="text-align: right;">+税额</td>
                                                            </tr>
                                                            <tr style="background: #fff;">
                                                                <td>&nbsp;</td>
                                                                <td style="text-align: right;">-优惠</td>
                                                            </tr>
                                                            <tr style="background: #fff;">
                                                                <td>业务说明： {{entity.ProductRemark|truncate(50,'...')}}</td>
                                                                <td style="text-align: right;">合同总金额</td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                    <td colspan="5" style="background-color: rgb(255, 255, 255);">
                                                        <table width="100%" border="0" cellspacing="1" cellpadding="0">
                                                            <tr>
                                                                <td style="padding: 0px;">{{entity.CountAmount}}
                                                                </td>
                                                            </tr>
                                                            <tr ms-visible="entity.ContainsTax">
                                                                <td style="padding: 0px;">{{entity.TaxRate}}%
                                                                </td>
                                                            </tr>
                                                            <tr ms-visible="entity.ContainsTax">
                                                                <td style="padding: 0px;">{{entity.FillUpTax}}
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td style="padding: 0px;">{{entity.FavourableAmount}}
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td style="padding: 0px;">
                                                                    <span style="font-size: 18px;">{{entity.Amount}}</span>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                            </table>
                                            
                                        </div>
                                        <div class="tabContent" ms-visible="tab=='tab3'">
                                            <table style="width: 100%;" border="0" cellspacing="1" cellpadding="0" class="tablecInfo">
                                                <tbody>
                                                    <tr>
                                                        <td width="90">1.付款方式：
                                                        </td>
                                                        <td width="300">{{entity.PayTypeDisplay}}
                                                        </td>
                                                        <td width="90">结算方式：
                                                        </td>
                                                        <td>{{entity.BalanceTypeDisplay}}
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>付款说明：
                                                        </td>
                                                        <td>{{entity.PayRemark}}
                                                        </td>
                                                        <td>要求票据：
                                                        </td>
                                                        <td>{{entity.NoteTypeDisplay}}
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>2.发货方式：
                                                        </td>
                                                        <td>{{entity.ConsignmentTypeDisplay}}
                                                        </td>
                                                        <td>交货日期：
                                                        </td>
                                                        <td>{{entity.DeliveryDate|truncate(10,'')}}
                                                        </td>

                                                    </tr>
                                                    <tr>
                                                        <td>收货人：
                                                        </td>
                                                        <td>{{entity.ConsigneeDisplay}}
                                                        </td>
                                                        <td>运费承担：
                                                        </td>
                                                        <td>{{entity.FreightBearRemark}}
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>收货电话：
                                                        </td>
                                                        <td>{{entity.ConsigneePhone}}
                                                        </td>
                                                        <td>交付/收货地址：
                                                        </td>
                                                        <td>{{entity.ConsigneeAddress}}
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>3.发货说明：
                                                        </td>
                                                        <td colspan="3">{{entity.ConsigneeRemark}}
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                            <table style="width: 100%; margin: 0 auto;" border="0" cellspacing="1" cellpadding="0" class="tableList hasOfferPanel">
                                                <tr class="minhead" align="center">
                                                    <td width="5%">计划付款期次
                                                    </td>
                                                    <td width="15%">{{lang.ItemCostName}}
                                                    </td>
                                                    <td width="8%">{{lang.Amount}}
                                                    </td>
                                                    <td width="5%">{{lang.Percents}}
                                                    </td>
                                                    <!--<td width="8%">{{lang.PlanReturnedMoneyDate}}
                                                    </td>
                                                    <td width="7%">{{lang.ReturnedMonerState}}
                                                    </td>-->
                                                    <td width="15%">说明
                                                    </td>
                                                </tr>
                                                <tr align="center" ms-repeat-item="planofpaylist" ms-click="onSetIndex">
                                                    <td>第{{item.Num}}次
                                                    </td>
                                                    <td>{{item.Item}}
                                                    </td>
                                                    <td>{{item.Money}}
                                                    </td>
                                                    <td>{{item.Percents}}%
                                                    </td>
                                                    <!--<td>{{item.ReturnedDate|truncate(10,'')}}
                                                    </td>
                                                    <td>{{item.ReturnedStateDisplay}}
                                                    </td>-->
                                                    <td>{{item.Remark}}
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="5">对付款期次的补充：{{entity.PayRemark1}}
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="5">{{lang.CustomOpenBrank}}：{{entity.CustomerBankIdDisplay}} &nbsp&nbsp;
                                {{lang.CustomerBankName}}：{{entity.CustomerBankName}} &nbsp&nbsp;
                                {{lang.CustomerBankAccount}}：{{entity.CustomerAccount}} &nbsp&nbsp;
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                        <div class="tabContent" ms-visible="tab=='tab4'">
                                            <table style="width: 100%; margin: 0 auto;" border="0" cellspacing="1" cellpadding="0" class="tableList">
                                                <tr class="minhead" align="center">
                                                    <td width="5%">期次
                                                    </td>
                                                    <td width="10%">结算单位
                                                    </td>
                                                    <td width="8%">项目
                                                    </td>
                                                    <td width="10%">收付
                                                    </td>
                                                    <td width="6%">金额
                                                    </td>
                                                    <td width="6%">结算方式
                                                    </td>
                                                    <td width="6%">费用日期
                                                    </td>
                                                    <td width="6%">计划日期
                                                    </td>
                                                    <td width="6%">责任人
                                                    </td>
                                                </tr>
                                                <tbody>
                                                    <tr align="center" style="background-color: #ffffff;" ms-repeat-item="arapList">
                                                        <td>
                                                            {{item.Batch}}
                                                        </td>
                                                        <td>
                                                            {{item.SettleCustomerName}}
                                                        </td>
                                                        <td>
                                                            {{item.Project}}
                                                        </td>
                                                        <td>
                                                            {{item.Type==1?"付":"收"}}
                                                        </td>
                                                        <td align="right">
                                                            {{item.Money}}
                                                        </td>
                                                        <td>
                                                            {{item.SettleWay}}
                                                        </td>
                                                        <td>
                                                            {{item.CostDate|truncate(10,"")}}
                                                        </td>
                                                        <td>
                                                            {{item.PlanDate|truncate(10,"")}}
                                                        </td>
                                                        <td>
                                                             {{item.DutyPersonName}}
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="9">
                                                            合计应收：{{arapSum.m1}}，应付：{{arapSum.m2}}，利润：{{arapSum.m3}}
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                    <div style="width: 99%;" class="top10 bottom10" ms-if="entity.IsSample">
                                        <table style="width: 99%; margin: 0 10px;" border="0" cellspacing="1" cellpadding="0" class="tablecInfo">
                                            <tr>
                                                <td width="100">{{lang.ContractName1}}
                                                </td>
                                                <td width="340">{{entity.ContractName}}
                                                </td>
                                                <td width="100">{{lang.ContractNumber1}}：</td>
                                                <td width="340">{{entity.ContractTypeDisplay}} &nbsp;({{lang.ContractNumber}}： {{entity.ContractNum}}) 
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>客户：</td>
                                                <td>{{entity.CustomerDisplay}}
                                                </td>
                                                <td>{{lang.SignDateTime}}：
                                                </td>
                                                <td>{{entity.SignAContractDate|truncate(10,'')}} 
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>联系人：
                                                </td>
                                                <td>{{entity.CustomerSignDisplay}}
                                                </td>
                                                <td>交货日期：
                                                </td>
                                                <td>{{entity.DeliveryDate|truncate(10,'')}}

                                                </td>
                                            </tr>
                                            <tr>
                                                <td>手机：
                                                </td>
                                                <td>{{entity.CustomerMobile}}
                                                </td>
                                                <td>发货方式：
                                                </td>
                                                <td>{{entity.ConsignmentTypeDisplay}}
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>地址：
                                                </td>
                                                <td>{{entity.ConsigneeAddress}}
                                                </td>
                                                <td width="70">付款方式：
                                                </td>
                                                <td width="380">{{entity.PayTypeDisplay}}
                                                </td>
                                            </tr>
                                        </table>
                                        <table style="width: 99%; margin: 0 10px;" border="0" cellspacing="1" cellpadding="0" class="tableList hasOfferPanel">
                                            <tr class="minhead" align="center">
                                                <td width="18%">{{lang.ProductOrServerName}}
                                                </td>
                                                <td width="10%">{{lang.ProductAlias}}
                                                </td>
                                                <td width="8%">{{lang.Brand|html}}
                                                </td>
                                                <td width="10%">规格/型号/摘要
                                                </td>
                                                <td width="6%">产品单价
                                                </td>
                                                <td width="6%">{{lang.Price}}
                                                </td>
                                                <td width="6%">{{lang.Quantity}}
                                                </td>
                                                <td width="6%">成交金额
                                                </td>
                                            </tr>
                                            <tbody>
                                                <tr align="center" style="background-color: rgb(255, 255, 255);" ms-repeat-item="contractdetailslist">
                                                    <td align="left">
                                                        <a ms-click="gotoview(item.Id,'productlist')" href='javascript:void(0);'>{{item.ProductName|truncate(20)}}</a>
                                                        <a ms-if="item.Product" ms-click="viewProduct(item.Product)" href="javascript:void(0);" class="productbtn" title="查看产品"></a>
                                                    </td>
                                                    <td align="left">{{item.ProductAlias}}
                                                    </td>
                                                    <td>{{item.BrandDisplay}}
                                                    </td>
                                                    <td>{{item.Standard}}
                                                    </td>
                                                    <td>{{item.StandardPrice}}
                                                    </td>
                                                    <td>{{item.Price}}
                                                    </td>
                                                    <td>{{item.Num}}
                                                    </td>
                                                    <td align="left">{{item.Money}}
                                                    </td>
                                                </tr>

                                            </tbody>
                                            <tr style="background-color: rgb(255, 255, 255);">
                                                <td colspan="7" style="background-color: rgb(255, 255, 255);">
                                                    <table width="100%" border="0" cellspacing="1" cellpadding="0">
                                                        <tr style="background: #fff;">
                                                            <td>&nbsp;</td>
                                                            <td style="text-align: right;">小计</td>
                                                        </tr>
                                                        <tr style="background: #fff;" ms-visible="entity.ContainsTax>0">
                                                            <td>&nbsp;</td>
                                                            <td style="text-align: right;">上述价格&nbsp;&nbsp; 另计税金:&nbsp;&nbsp;税率
                                                            </td>
                                                        </tr>
                                                        <tr style="background: #fff;" ms-visible="entity.ContainsTax>0">
                                                            <td>&nbsp;</td>
                                                            <td style="text-align: right;">+税额</td>
                                                        </tr>
                                                        <tr style="background: #fff;">
                                                            <td>&nbsp;</td>
                                                            <td style="text-align: right;">-优惠</td>
                                                        </tr>
                                                        <tr style="background: #fff;">
                                                            <td></td>
                                                            <td style="text-align: right;">合同总金额</td>
                                                        </tr>
                                                    </table>
                                                </td>
                                                <td colspan="3" style="background-color: rgb(255, 255, 255);">
                                                    <table width="100%" border="0" cellspacing="1" cellpadding="0">
                                                        <tr>
                                                            <td style="padding: 0px;">{{entity.CountAmount}}
                                                            </td>
                                                        </tr>
                                                        <tr ms-visible="entity.ContainsTax">
                                                            <td style="padding: 0px;">{{entity.TaxRate}}%
                                                            </td>
                                                        </tr>
                                                        <tr ms-visible="entity.ContainsTax">
                                                            <td style="padding: 0px;">{{entity.FillUpTax}}
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td style="padding: 0px;">{{entity.FavourableAmount}}
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td style="padding: 0px;">
                                                                <span style="font-size: 18px;">{{entity.Amount}}</span>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>

                                        </table>
                                        <table style="width: 99%; margin: 0 10px;" border="0" cellspacing="1" cellpadding="0" class="tablecInfo">
                                            <tr>
                                                <td width="100" valign="top">{{lang.ContractRemark}}：
                                                </td>
                                                <td valign="top" colspan="5" style="height: 100px;">{{entity.Remark|html}}
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>{{lang.ContractState1}}：
                                                </td>
                                                <td>{{entity.StateDisplay}}
                                                </td>
                                                <td>开票类型：
                                                </td>
                                                <td>{{entity.NoteTypeDisplay}}
                                                </td>
                                                <td>{{lang.CurrentStage1}}：
                                                </td>
                                                <td>{{entity.CurrentStageDisplay}}
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>{{lang.BelongToEmployee}}：
                                                </td>
                                                <td>{{entity.BelongToDisplay}} </td>
                                                <td>制单人：</td>
                                                <td>{{entity.AddByName}}</td>
                                                <td>录入时间：</td>
                                                <td>{{entity.AddTime|truncate(10,'')}}
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </td>
                            </tr>
                            <tr ms-if='currNav==3'>
                                <td>
                                    <div style="min-height: 500px; margin-top: 5px;">
                                        <table style="width: 98%; margin: 0 auto;" border="0" cellspacing="1" cellpadding="0" class="tableList hasOfferPanel">
                                            <tr style="background: #ffffff;" ms-if="canout" class="dobtn">
                                                <td colspan="14">
                                                    <a href="javascript:void(0)" class="doadd" ms-click="addSalesOut">新增出库</a>
                                                </td>
                                            </tr>
                                            <tr class="minhead" align="center">
                                                <td width="18%">出库单号
                                                </td>
                                                <td width="10%">供应商
                                                </td>
                                                <td width="8%">产品名称
                                                </td>
                                                <td width="10%">产品型号
                                                </td>
                                                <td width="6%">产品数量
                                                </td>
                                                <td width="10%">出库仓库
                                                </td>
                                                <td width="6%">仓位
                                                </td>
                                                <td width="6%">出库时间
                                                </td>
                                                <td width="6%">出库操作人
                                                </td>
                                                <td width="6%">展开
                                                </td>
                                            </tr>
                                            <tbody ms-each-item="outlist">
                                                <tr align="center" style="background-color: rgb(255, 255, 255);">
                                                    <td>{{item.BillNo}}
                                                    </td>
                                                    <td>{{item.SupplyName}}
                                                    </td>
                                                    <td>{{item.ProductName}}
                                                    </td>
                                                    <td>{{item.Standard}}
                                                    </td>
                                                    <td>{{item.Number}}
                                                    </td>

                                                    <td>{{item.StorageName}}
                                                    </td>
                                                    <td>{{item.SpaceName}}
                                                    </td>
                                                    <td>{{item.ActionTime}}
                                                    </td>
                                                    <td>{{item.AddByName}}
                                                    </td>
                                                    <td>
                                                        <a ms-if="showindex == $index" href="javascript:void(0);" class="notexpand" title="展开更多信息" ms-click="showmore($index)">&nbsp;</a>
                                                        <a ms-if="showindex != $index" href="javascript:void(0);" class="expand" title="展开更多信息" ms-click="showmore($index)">&nbsp;</a>
                                                    </td>
                                                </tr>
                                                <tr ms-if="showindex == $index" style="background-color: rgb(255, 255, 255);">
                                                    <td colspan="11" style="padding-left: 1%;">
                                                        <span ms-visible="item.HasServiceTimeLimit">服务期限
                                            {{item.ProductionTime|truncate(10,'')}} 至 {{item.ValidDate|truncate(10,'')}}
                                                        </span>
                                                        &nbsp; 
                                        <span ms-visible="item.HasSN">序列号
                                            {{item.SN}}
                                        </span>
                                                        &nbsp;
                                         <span ms-visible="item.HasAccountPwd">帐号密码
                                         {{lang.Account}}&nbsp;{{item.UserName}}
                                         {{lang.Password}}&nbsp;{{item.PassWord}}
                                         </span>
                                                        &nbsp;
                                     <span ms-visible="item.UseLimitOfNum">用户数限制
                                         {{item.UseLimitOfNum}}
                                     </span>
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </td>
                            </tr>
                            <tr ms-if='currNav!=1 && currNav!=3'>
                                <td>
                                    <div style="min-height: 500px; padding: 10px;" id="ContractOtherview">
                                    </div>

                                </td>
                            </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
        </tbody>
    </table>
</div>
<style>
    #otherContent #mian {
        background: white;
        overflow: hidden;
        width: 100%;
        border: none;
        margin: 0;
    }
</style>
