<table border="0" align="center" cellpadding="0" cellspacing="0" width="100%" id="mian"  ms-controller="putstores">
    <tbody>
        <tr>
            <td width="198" height="450" valign="top" id="tdleft" style="display: table-cell; ">
                <!--leftNav-->
                <div id="left">
                    <h2>采购管理</h2>
                    <ul>
                        <li><a href="#/Product/Purchase" class="sellnewspaper">采购订单</a></li>
                        <li class="selected"><a href="#/Product/PutStore" class="sellballoon">采购入库</a></li>
                        <li><a href="#/Product/PayPurchase" class="sellbriefcase">采购付款</a></li>
                        <li class="last"><a href="#/Product/ReturnedPurchase" class="selluserbriefcase">采购退货</a></li> 
                    </ul>
                </div>
                <!--End leftNav-->
            </td>
            <td valign="top" width="100%" id="right" class="addrightbg">
                <!--list-->
                 <div style="margin-bottom: 10px; display: block; ">
                <div style="display: block; ">
                <div class="boxtip" id="boxtip">
                    <h1>采购入库</h1>
                    <p>采购入库描述</p>
                    <a href="javascript:history.go(-1)" class="btn_back"></a>
                </div>
                <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="seacrhTable">
                    <tbody>
                        <tr>
                            <td width="460" class="searchico">
                                <div class="input-append" style="margin-bottom: 10px;">
                                    <input type="text" class="span4" placeholder="请输入采购订单名称或者采购员快速检索">
                                    <button class="add-on ibtsearch" type="button" id="btnsel" style="height: 28px; font-size: 12px; padding: 3px 12px;">
                                        搜索
                                    </button>
                                    <button class="add-on ibtsearch clearall" type="button" style="height: 28px; font-size: 12px; padding: 3px 12px;">
                                        显示全部</button>
                                </div>
                            </td>
                            <td class="fgray">
                                <span style="float: left;">历史搜索：</span><div class="hotlist">
                                    <span class="bindSearchHistory"></span>
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </table>
                <table width="100%" border="0" cellspacing="0" cellpadding="0" id="seacrhField" class="seacrhField">
                    <tbody>
                        <tr class="quickword">
                            <td colspan="4">
                                <span id="signcontractdate">采购时间：</span>
                                <div style="display: inline;">
                                    <a href="javascript:void(0)" class="selected" value="0" key="signcontractdate">不限</a>
                                    <a href="javascript:void(0)" value="1" key="signcontractdate">1个月以内</a>
                                    <a href="javascript:void(0)" value="3" key="signcontractdate">3个月以内</a>
                                    <a href="javascript:void(0)" value="6" key="signcontractdate">6个月以内</a>
                                    <a href="javascript:void(0)" value="9" key="signcontractdate">9个月以内</a>
                                    <a href="javascript:void(0)" value="12" key="signcontractdate">12个月以内</a>
                                    <a href="javascript:void(0)" value="24" key="signcontractdate">24个月以内</a>
                                    <a href="javascript:void(0)" value="36" key="signcontractdate">36个月以内</a>
                                </div>
                            </td>
                        </tr> 
                        <tr>
                            <td colspan="2" class="seabox"><span class="first">筛选条件：</span>
                                <div style="display: inline;"><!--ms-if--><!--ms-if--><!--ms-if--><!--ms-if--></div>
                                <!--ms-if-->
                            </td>
                        </tr>
                    </tbody>
                </table>
                </div>
                <!--<div class="boxTitlenob">
                    <h2>采购订单列表</h2>
                </div>-->
                <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tableList" id="tableList">
                    <thead>
                        <tr class="dobtn" style="background-color: rgba(0, 0, 0, 0);">
                            <td colspan="11" bgcolor="#FFFFFF">
                                <a href="javascript:void(0)" ms-click="doadd" class="doadd">新增</a>
                                <a href="javascript:void(0)" class="doalldel">批量删除</a>
                            </td>
                        </tr>
                        <tr class="head" style="background-color: rgba(0, 0, 0, 0);">
                            <td width="3%" align="center">
                                <input type="checkbox" id="cbo_tableList" class="checkAll">
                            </td>
                            <td width="8%" align="center">编号
                            </td>
                            <td width="15%" align="center">订单名称
                            </td> 
                            <td width="10%" align="center">金额
                            </td>
                            <td width="15%" align="center">供应商
                            </td>
                            <td width="5%" align="center">采购员
                            </td>
                            <td width="10%" align="center">采购日期
                            </td>
                             <td width="5%" align="center">金额
                            </td>
                             <td width="5%" align="center">已付金额
                            </td>
                             <td width="5%" align="center">已退金额
                            </td>
                            <td width="6%" align="center">操作
                            </td>
                        </tr>
                    </thead>
                    <tbody><tr style="background-color: rgb(255, 255, 255);">
                            <td align="center">
                                <input type="checkbox" name="checkbox" value="1246962065148395">
                            </td>
                            <td align="left">1405160001
                            </td>
                            <td align="left">服务类
                            </td>
                            <td align="left">
                                <a href="javascript:void(0)">北京CRM</a>
                            </td>
                            <td align="center">执行中
                            </td>
                            <td align="right">125
                            </td>
                            <td align="left">老林代理
                            </td> 
                            <td align="center">100
                            </td>
                            <td align="center"><span style="color:#21d034;">99</span>
                            </td>
                            <td align="center"><span style="color:#ff0000;">1</span>
                            </td>
                            <td align="center">
                                <a href="javascript:void(0)" ms-click="doview" class="doview" title="查看"></a>
                                <a href="javascript:void(0)" ms-click="doadd" class="doedit" title="编辑"></a>
                                <!--ms-if-->
                                <a href="javascript:void(0)" class="dodel" index="0" title="删除"></a>
                                <!--ms-if-->
                            </td>
                        </tr> </tbody>
                    <tfoot>
                        <tr style="background-color: rgba(0, 0, 0, 0);">
                            <td colspan="11" class="ipage"><div class="pageitems"><a href="#" class="first_last" style="display: inline-block; ">首页</a><div class="pagenums"><a class="active" href="0">1</a><a href="1">2</a></div><a href="#" class="first_last" style="display: inline-block; ">末页</a></div><div class="pageoption" style="display: block; "><span>每页显示数量</span> <select><option value="20">20</option><option value="50">50</option><option value="100">100</option><option value="200">200</option><option value="500">500</option><option value="1000">1000</option></select> <span style="display: block; ">总共26条</span></div></td>
                        </tr>
                    </tfoot>
                </table>
                </div>
               <!--End list--> 
            </td>
        </tr>
    </tbody>
</table>

<!--新增和编辑-->
<noscript type="text/avalon" id="formTemplate">  
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="formTable">
            <tbody><tr>
                <td width="90">
                    订单名称：
                </td>
                <td width="400px;">  
                     <input type="text" ms-duplex="entity.ProbeFeedbackPersonDisplay"/>
                </td>
                <td width="90">
                    订单编号：
                </td>
                <td width="400px;">
                    <input type="text" ms-duplex="entity.ProbeFeedbackPersonDisplay"/>
                </td>
            </tr>
            <tr>
                <td width="90">
                    采购员：
                </td>
                <td colspan="3">
                     <input type="hidden" ms-duplex="entity.ProbeFeedbackPerson"/>
                     <input type="text" ms-duplex="entity.ProbeFeedbackPersonDisplay" readonly="readonly"/>
                     <input type="hidden" ms-duplex="entity.ProbeFeedbackDepartment"/>
                     <button type="button" class="myfbt" ms-widget="dropDownGroupPostUserTree,porobeFeedbackPersonTree,porobeFeedbackPersonOpts" ><i class="iadduser"></i></button>
             
                </td>
            </tr>
            <tr>
                <td width="90">
                    采购日期：
                </td>
                <td colspan="3">
                      <input type="text" ms-duplex="entity.ShareToDisplay"/> 
                  </td>
            </tr>
            <tr>
                <td width="90">
                    供应商：
                </td>
                <td colspan="3">
                    <input type="text" ms-duplex="entity.ProbeFeedbackPersonDisplay" readonly="readonly"/>联系人：<input type="text" ms-duplex="entity.ProbeFeedbackPersonDisplay" style="width:80px;" readonly="readonly"/> 
                    <button type="button" class="myfbt" ms-widget="dropDownGroupPostUserTree,porobeFeedbackPersonTree,porobeFeedbackPersonOpts" ><i class="iadduser"></i></button>
                </td>
            </tr>
            <tr>
                <td width="90">
                    要求到货日期：
                </td>
                <td colspan="3"> 
                     <input type="button"  ms-click="uploadFiles" ms-value="lang.UploadFile" /> 
                </td>
            </tr>
        </tbody></table> 
         <div class="boxTitlenob top10 hasOfferPanel">
                        <h2>
                            <button class="btn btn-mini btn-danger btn_del_row" type="button" ms-click="onRelevanceAllDel('planofpay')">
                            - 批量删除</button>
                        <button class="btn btn-mini btn-primary btn_add_row" type="button" ms-click="onRelevanceAdd('planofpay')">
                            + 新增</button>产品明细  
                        </h2>
                    </div>
         <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tableList hasOfferPanel">
                        <thead>
                            <tr class="minhead" align="center">
                                <td width="3%">
                                    <input type="checkbox" ms-click="onChkAll('contractdetails')">
                                </td>
                                <td width="3%">{{lang.OrdinalNumber}}
                                </td>
                                <td width="20%">{{lang.ProductOrServerName}}
                                </td>
                                <td width="7%">{{lang.ProductAlias}}
                                </td>
                                <td width="6%">{{lang.Brand}}
                                </td>
                                <td width="7%">{{lang.Standard}}
                                </td>
                                <td width="6%">{{lang.Price}}
                                </td>
                                <td width="6%">{{lang.Quantity}}
                                </td>
                                <td width="8%">{{lang.Amount}}
                                </td>
                                <td width="8%">{{lang.PlanOfPayDate}}</td>
                                <td width="5%">{{lang.PlanOfPayNum}}</td>
                                <td width="5%" align="center">{{lang.Operate}}
                                </td>
                            </tr>
                        </thead>
                        <tbody ms-each-item="contractdetailslist">
                            <tr align="center" style="background-color: rgb(255, 255, 255); " ms-click="onSetIndex">
                                <td align="center">
                                    <input type="checkbox" ms-value="item.Id" name="contractdetails" ms-attr-index="$index">
                                </td>
                                <td>
                                   {{($index+1)}}
                                </td>
                                <td> 
                                    <input type="text" ms-duplex="item.ProductName" readonly="readonly" style="width:160px;"/>
                                    <input type="hidden" ms-duplex="item.Product" />
                                    <button type="button" ms-attr-index="$index" class="myfbt" ms-live-click="onSelectProuct" ><i class="customer"></i></button>
                               </td>
                                <td>
                                    <input type="text" ms-duplex="item.ProductAlias" style="width:70px;"/>
                                </td>
                                <td>
                                    <input type="text" ms-duplex="item.BrandDisplay" readonly="readonly" style="width:70px;"/>
                                </td>
                                <td>
                                    <input type="text" ms-duplex="item.Standard" readonly="readonly" style="width:70px;"/>
                                </td>
                                <td>
                                    <input type="text" ms-duplex="item.Price" style="width:40px;" ms-blur="onSumCost"/>
                                </td>
                                <td>
                                    <input type="text" ms-duplex="item.Num" style="width:40px;" ms-blur="onSumCost"/>
                                </td>
                                <td>
                                    <input type="text" ms-duplex="item.Money" readonly="readonly" style="width:40px;"/>
                                </td>
                                <td>
                                    <input type="text" ms-duplex="item.PlanOfPayDate" style="width:80px;" readonly="readonly" ms-widget="date,planofpaydateid,planofpaydateOpts"/>
                                </td>
                                <td>
                                    <div class="input-append">
                                        <input type="text" ms-duplex="item.PlanOfPayNum" style="width: 30px" />
                                        <span class="add-on">{{lang.Ci}}</span>
                                    </div>
                                </td>
                                <td width="5%" align="center">
                                    <a href="javascript:void(0)" class="dodel" ms-attr-index="$index" ms-click="onRelevanceDel('contractdetails')"></a>
                                </td>
                            </tr>
                            <tr style="background-color: rgb(255, 255, 255); "  ms-click="onSetIndex"> 
                                 <td colspan="12" style="padding-left:7%;">  
                                     <label>
                                         <input type="checkbox" ms-duplex-radio="item.HasServiceTimeLimit" />{{lang.HasServiceTimeLimit}}&nbsp;&nbsp;</label> 
                                        <a ms-visible="item.HasServiceTimeLimit"> 
                                            <input type="text" ms-duplex="item.StartDate" style="width: 80px;"  readonly="readonly" ms-widget="date,serverstardateid,serverstardateOpts"/>
                                         ~
                                         <input ms-duplex="item.EndDate" type="text" style="width: 80px;" readonly="readonly" ms-widget="date,serverenddateid,serverenddateOpts"/>
                                        </a>
                                        &nbsp;&nbsp;&nbsp;&nbsp;
                                     <label>
                                         <input type="checkbox" ms-duplex-radio="item.HasSerialNumber" />{{lang.HasSerialNumber}}&nbsp;&nbsp;</label>
                                         <input type="text" ms-duplex="item.SerialNumber"   ms-visible="item.HasSerialNumber" style="width: 80px;" />
                                     &nbsp;&nbsp;&nbsp;&nbsp;
                                     <label>
                                         <input type="checkbox" ms-duplex-radio="item.HasAccountPwd" />{{lang.HasAccountPwd}}&nbsp;&nbsp;</label>
                                         <m ms-visible="item.HasAccountPwd">
                                          {{lang.Account}}&nbsp;<input type="text" ms-duplex="item.UserName" style="width: 80px;" />&nbsp;&nbsp;
                                         {{lang.Password}}&nbsp;<input type="text" ms-duplex="item.PassWord" style="width: 80px;" />
                                        </m>
                                     &nbsp;&nbsp;&nbsp;&nbsp;
                                     <label>
                                         <input type="checkbox" ms-duplex-radio="item.IsUseLimit" />{{lang.HasUseLimitOfNum}}&nbsp;&nbsp;</label>
                                         <input ms-duplex="item.UseLimitOfNum" ms-visible="item.IsUseLimit" type="text" style="width: 80px;" />
                                   </td>
                            </tr> 
                        </tbody>
                        <tfoot class="productOfferTotal">
                            <tr style="background-color: rgb(255, 255, 255);">
                                <td colspan="9" align="right" style="background-color: rgb(255, 255, 255);">{{lang.TotalAmount}}
                                </td>
                                <td colspan="3" style="background-color: rgb(255, 255, 255);">&nbsp;<input type="text" style="border: 0; outline: 0; background: #fff;" readonly="readonly"
                                    ms-value="detailsTotalAmount" />
                                </td>
                            </tr> 
                        </tfoot>
                    </table>
     <table width="100%" border="0" cellspacing="0" cellpadding="0" class="formTable">
            <tbody>  
            <tr>
                <td width="90">
                    备注：
                </td>
                <td colspan="3">
                      <input type="text" ms-duplex="entity.ShareToDisplay"/> 
                  </td>
            </tr>
            <tr>
                <td width="90">
                    录入人：
                </td>
                <td colspan="3">
                    <input type="text" ms-duplex="entity.ProbeFeedbackPersonDisplay" readonly="readonly"/>
                </td>
            </tr>
            <tr>
                <td width="90">
                    录入时间：
                </td>
                <td colspan="3"> 
                     <input type="button"  ms-click="uploadFiles" ms-value="lang.UploadFile" /> 
                </td>
            </tr>
        </tbody></table> 
</noscript>
<!--查看-->
<noscript type="text/avalon" id="viewTemplate"> 
        <table width="100%"  border="0" cellspacing="1" cellpadding="0" class="tablecInfo">
            <tbody><tr>
                <td width="100">
                    {{lang.BelongToCampaign}}：
                </td>
                <td width="300">
                    {{entity.MarketingCampaignDisplay}}
                </td>
                <td width="100">
                    {{lang.BelongToActivity}}：
                </td>
                <td width="300">
                    {{entity.MarketActivityDisplay}}
                </td>
            </tr> <tr>
                <td width="100">
                    {{lang.ProbeFeedbackPerson}}：
                </td>
                <td width="300">
                     {{entity.ProbeFeedbackPersonDisplay}}
                </td>
                <td width="100">
                    {{lang.ProbeType}}：
                </td>
                <td width="300">
                    {{entity.ProbeTypeDisplay}}
                </td>
            </tr>
            <tr>
                <td width="90">
                    {{lang.Theme}}：
                </td>
                <td colspan="3">
                    {{entity.Title}}
                </td>
            </tr>
            <tr>
                <td width="90">
                    {{lang.ShareTo}}：
                </td>
                <td colspan="3">
                    {{entity.ShareToDisplay}}
                </td>
            </tr>
            <tr>
                <td width="90">
                    {{lang.ProbeAndVerdict}}：
                </td>
                <td colspan="3">
                    {{entity.ProbeDescribe}}
                </td>
            </tr>
            <tr>
                <td width="90">
                    {{lang.ProbeAttachment}}：
                </td>
                <td colspan="3"> 
                     {{entity.Files}}
                </td>
            </tr>
            <tr>
                    <td>
                        {{lang.AddByDisplay}}
                    </td>
                    <td> 
                        {{entity.AddBy.FullName}}
                    </td>
                    <td>
                        {{lang.AddTime}}
                    </td>
                    <td>
                        {{entity.AddTime|truncate(10,'')}}
                    </td>
                </tr>
            </tbody></table>  
</noscript>