@model List<Com._9pm2.ClientWeb.Database.PriceUnit>
@{
    ViewBag.Title = "计价单位配置";
}
<script src="../../Scripts/priceunit.js?vn=20180813"></script>

<div class="system-list-page">

    <div class="list">
        <div>
            <button id="btnPriceUnitNew" type="button" class="btn btn-default">新增</button>
        </div>

        <table id="tPayment" style="max-width:600px">
            <thead>
                <tr>
                    <th class="">单位名称</th>
                    <th class="">计价类型</th>
                    <th style="width:100px">操作</th>
                </tr>
            </thead>
            <tbody>
                @foreach (var item in Model)
            {
                    <tr>
                        <td>
                            @item.Name
                         </td>
                        <td>
                            @((Com._9pm2.ClientWeb.Common.OrderValuationType)item.PriceType)
                        </td>
                        <td>

                            <div class="operation-btns">
                                <div>
                                    <button id="select">&nbsp;</button>
                                </div>
                                <ul>
                                    <li><a onclick="EditPriceUnit('@item.Id')">编辑</a>     </li>
                                    <li><a onclick="DeletePriceUnit('@item.Id')">删除</a></li>

                                </ul>
                            </div>
                        </td>
                    </tr>
                }
            </tbody>
        </table>
    </div>

    <div id="divPriceUnit" title="计价单位" style="display:none">
        <div id="divPriceUnitContent">
            <form id="formPriceUnit">
                <table class="font85 tableEdit">
                    <tr>
                        <td class="label">单位名称</td>
                        <td>
                            @Html.TextBox("Name", null, new { maxlength = "50" })&nbsp;<span class="redStar">*</span>
                        </td>
                        </tr>
                    <tr>
                        <td class="label">计价方式</td>
                        <td>
                            @Html.DropDownList("PriceType", new SelectList(ViewBag.DdlType as List<Com._9pm2.ClientWeb.Common.SimpleItemList>, "ItemValue", "ItemText"))   &nbsp;<span class="redStar">*</span>                         
                        </td>
                    </tr>
                </table>
                @Html.Hidden("Id")
            </form>
        </div>
        <div style="text-align:right;">

            <div class="error-msg"></div>
            <button type="button" class="btn btn-default" id="btnPriceUnitCancel">取消</button>
            <button type="button" class="btn btn-primary" id="btnPriceUnitSave">保存</button>

        </div>
    </div>

</div>
