@model Com._9pm2.ClientWeb.Models.ListModel
@{
    ViewBag.Title = "客户订单状态";
}
<script src="../../Scripts/orderstatuslist.js?vn=20180813"></script>

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

    <div class="list">
        <div>
            <button id="btnOrderStatusNew" type="button" class="btn btn-default">新增</button>
        </div>
        <table id="tOrderStatus" 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.OrderStatus)
            {
                    <tr>
                        <td class="imgIcon">
                            <img src="~/Images/flow/@item.Icon" />
                        </td>
                        <td>
                            @item.StatusName
                        </td>
                        <td>
                            @if (!item.IsSystemReversed)
                            {
                                <div class="operation-btns">
                                    <div>
                                        <button id="select">&nbsp;</button>
                                    </div>
                                    <ul>
                                        <li><a onclick="EditOrderStatus('@item.StatusNo')">编辑</a>     </li>
                                        <li><a onclick="DeleteOrderStatus('@item.StatusNo')">删除</a> </li>

                                    </ul>
                                </div>
                            }
                            else
                            {
                                <span style="color:gray">系统保留</span>
                            }
                        </td>
                    </tr>
                }
            </tbody>
        </table>
    </div>

    <div class="system-list-page" id="divOrderStatus" title="订单状态" style="display:none">
        <div id="divOrderStatusContent">
            <form id="formOrderStatus">
                <table class="font85 tableEdit">
                    <tr>
                        <td class="label">订单状态</td>
                        <td>
                            @Html.TextBox("StatusName", null, new { maxlength = "50" })&nbsp;<span class="redStar">*</span>
                        </td>
                    </tr>
                    <tr>
                        <td class="label">状态图标</td>
                        <td>
                            <div class="divIcon">
                                @for (int i = 1; i <= 20; i++)
                                {
                                    string name = i.ToString() + ".png";
                                    string cl1= i==1?"selected":"";
                                    string cl2 = i == 1 ? "selected" : "non-selected";

                                    <div id="item_@i" class="item @cl1">
                                        <img src="~/Images/flow/@name">
                                        <div class="check @cl2">
                                            <img src="~/Images/flow/gou.png" />
                                        </div>
                                    </div>
                                }
                            </div>
                        </td>
                    </tr>
                </table>
                @Html.Hidden("StatusNo")
            </form>
        </div>
        <div style="text-align:right;">

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

</div>
 