@model Com._9pm2.ClientWeb.Models.StockList
@{
    ViewBag.Title = "库存预警";
}
<script src="~/Scripts/stockcommon.js?vn=20180813"></script>
 

<div class="callout callout-warning lead ">提示：库存量低于安全库存的材料在此页显示</div>


@{
    Com._9pm2.ClientWeb.Models.LoginUser user = Session["LoginUser"] as Com._9pm2.ClientWeb.Models.LoginUser;
}
<form method="post" action="/Warehouse/StockWarning">
    <div class="divSearch">
        <div>                    
            @Html.TextBox("sKeywords", null, new { maxlength = "50", placeholder = "材料名称" })
            <button class="btn btn-default" id="btnSearch">搜索</button>           
        </div>
    </div>
</form>

<div class="error-msg"></div>

<div class="list">
    <table id="tStock" class="">
        <thead>
            <tr>               
                <th>类别</th>
                <th>材料名称</th>
                <th>计价单位</th>
                <th>库存数量</th>
                <th>安全库存</th>
            </tr>
        </thead>
        <tbody id="stockList">
            @foreach (var item in Model.List)
            {
                <tr id="@item.Id">                  
                    <td>@item.Material.MaterialCategory.Name</td>
                    
                    <td>@item.Material.Name</td>
                    <td class="text-center" >@item.Material.PriceUnit.Name</td>
                    <td class="text-red text-center" >@item.Number.ToString("0.##")</td>      
                    <td class="text-green text-center">@(item.Material.SafetyStock.HasValue? item.Material.SafetyStock.Value.ToString("0.##"):"--") </td>
                </tr>            
            }
        </tbody>
    </table>
    @Html.Pager("StockWarning", "Warehouse", Model.RouterDirectory, Model.PagerConfig, "pagerDiv", "pagerDiv", 8, true, false, true, true, false)
</div>  
 