<div ms-controller="CustomerPriceList">
    <table border="0" align="center" cellpadding="0" cellspacing="0" id="mian">
        <tbody>
            <tr>
                <td valign="top" bgcolor="#FFFFFF" height="1" style="vertical-align: top; width: 198px;">
                    <table cellpadding="0" cellspacing="0" class="bordergrag">
                        <tr>
                            <td style="vertical-align: top;">
                                <div class="boxTitlenoneb">
                                    <h2>
                                        <a href="javascript:void(0)" ms-click="expanCategory" style="color: #016b96; float: right; margin-right: 5px; font-size: 12px; font-weight: normal;">- 收起</a>
                                        {{lang.Category}}
                                    </h2>
                                    <ul id="customer_ProductCategory_Tree" class='ztree' ms-widget="productCategoryTree,customer_ProductCategory_Tree,pCategoryTreeOpts" style="width: 198px;height:510px; overflow: auto;"></ul>
                                    <br>
                                </div>
                            </td>
                        </tr>
                    </table>
                </td>
                <td width="10" valign="top">&nbsp;
                </td>
                <td valign="top">
                    <div>
                        <div id="pricelist">
                            <div class="boxTitlenob">
                                <h2>价格列表
                                <span class="h2btn first" ms-mhover="msdropdown" ms-if="EXPORT">
                                    <a href="javascript:void(0)" class="btnexcel" title="导出数据到Execl" ms-click="exportExcel(0)">导出Excel
                                    <span class="caret"></span>
                                    </a>
                                    <ul class="dropdown-menu">
                                        <li><a href="javascript:void(0);" ms-click="exportExcel(1)">导出当前页</a></li>
                                        <li><a href="javascript:void(0);" ms-click="exportExcel(0)">导出所有</a></li>
                                    </ul>
                                </span>
                                    <span class="h2btn">
                                        <a href="javascript:void(0)" class="transfer" ms-click="grid1.reloadData">刷新</a>
                                    </span>
                                    <span class="rseachbox">
                                        <input class="input" type="text" ms-duplex="key" placeholder="请输入产品名称" ms-enter="grid1.doSearch">
                                        <button type="button" class="inputbt" ms-click="grid1.doSearch"></button>
                                    </span>
                                </h2>
                            </div>
                            <div>
                                <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tableList bottom10" id="table1" style="margin-bottom: 1px;">
                                    <thead>
                                        <tr class="head">
                                            <td width="35%" align="center">产品名称
                                            </td>
                                            <td width="20%" align="center">规格型号
                                            </td>
                                            <td width="10%" align="center">标准价
                                            </td>
                                            <td colspan="3">
                                                享受价格
                                                <label style="margin-left:10px;" title="如果勾选了批量定价，则修改任何一条记录的价格类型，其余记录采用相同类型">
                                                <input type="checkbox" ms-duplex-radio="editPrices" title="本定价修改视为特供价格，如执行标准价格体系（标准价和级别价）请到产品中心修改。若价格框留空表示删除该特供价，恢复标准价格体系。" />
                                                    &nbsp;特供价</label>
                                                <a ms-if="editPrice" href="javascript:void(0)" class="dosave" ms-click="saveCustomerPrice" style="margin-left:5px;">保存定价</a>
                                            </td>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr ms-repeat-item="grid1.list" ms-class-1="productdown:item.State!=1" ms-title="item.State==1?'':'产品已下架'">
                                            <td style="padding-left: 5px;">
                                                <a href="javascript:void(0)" ms-click="viewproduct(item.Id)">{{item.Name|truncate(15,".")}}</a>
                                            </td>
                                            <td>
                                                {{item.Standard|truncate(10,".")}}
                                            </td>
                                            <td align="left" style="font-weight: bold; font-size: 14px;">{{item.GeneralCustomerPrice}}
                                            </td>
                                            <td width="5%">
                                                <label style="margin-left: 5px; font-size: 9pt;" title="特供价">
                                                    <input type="checkbox" ms-duplex-radio="item.Edit" /></label>
                                            </td>
                                            <td align="left" style="font-weight: bold; font-size: 14px;" width="15%">
                                                {{priceTypes[item.PriceType]}}
                                            </td>
                                            <td align="right">
                                                <span ms-if="!item.Edit">{{item.CustomerPrice}}
                                                </span>
                                                <span ms-if="item.Edit">
                                                    <input type="text" ms-duplex="item.CustomerPrice" style="width: 60px; font-weight: bold;margin-bottom:3px;" />
                                                </span>
                                            </td>
                                        </tr>
                                    </tbody>
                                    <tfoot>
                                        <tr ms-if="grid1.total==0">
                                            <td colspan="9" class="gridmsg">{{grid1.gridmsg|html}}</td>
                                        </tr>
                                        <tr>
                                            <td colspan="6" ms-widget='paging' data-gridid="grid1"></td>
                                        </tr>
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
</div>
