Index.cshtml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. @{
  2. ViewBag.Title = "设备列表";
  3. Layout = "~/Views/Shared/_Layout.cshtml";
  4. }
  5. @using MES.Production.Service;
  6. @using Central.Control.Domain;
  7. @using Ant.Service.Common;
  8. @using Ant.Service.Common.Enums;
  9. @using CommonToolHelper;
  10. @model PageInfo
  11. <!-- table star -->
  12. <div class="row col-lg-12">
  13. <div class="wrapper wrapper-content animated fadeInUp">
  14. <div class="ibox">
  15. <div class="ibox-title">
  16. <h5>设备列表</h5>
  17. @*<div class="ibox-tools rboor">
  18. <a class="btn btn-primary btn-xs p310" id="insert" action="add"><i class="im-plus"></i> 创建新设备</a>
  19. <a class="btn btn-primary btn-xs p310" id="modify" action="edit"><i class="im-pencil2"></i> 编辑</a>
  20. <a class="btn btn-primary btn-xs p310" id="delete" action="remove"><i class="im-remove4"></i> 删除</a>
  21. <a class="btn btn-primary btn-xs p310" id="showPassword" action="showPassword"><i class="im-vcard"></i> 查看密码</a>
  22. </div>*@
  23. </div>
  24. <div class="ibox-content">
  25. <!-- search star -->
  26. @using (Ajax.BeginForm("Index", null, new AjaxOptions() { }, new { @id = "form1", @class = "form-horizontal", @method = "get" }))
  27. {
  28. <div class="form-horizontal clearfix">
  29. <div class="col-lg-4 col-sm-3 pl0" style="width:55%;">
  30. <div class="form-group">
  31. </div>
  32. </div>
  33. <div class="col-lg-4 col-sm-4" style="float:right;">
  34. <div class="form-group">
  35. <div class="col-lg-12 col-sm-12 input-group">
  36. @Html.TextBox("Search", null, new { @class = "input-sm form-control", @placeholder = "请输入查询关键词" })
  37. <span class="input-group-btn">
  38. <button type="button" onclick="submit()" class="btn btn-sm btn-primary"> 搜索</button>
  39. </span>
  40. </div>
  41. </div>
  42. </div>
  43. </div>
  44. <!-- search end -->
  45. <div id="example_wrapper" class="dataTables_wrapper form-inline dt-bootstrap no-footer">
  46. <table id="example" class="table table-striped table-bordered table-hover dataTables-example dataTable" cellspacing="0" width="100%">
  47. <thead>
  48. <tr>
  49. @*<th class="tn" style="width: 40px !important"><input name="checkall" id="checkall" type="checkbox" value=""></th>*@
  50. <th width="15%">设备名称</th>
  51. <th width="10%">设备编码</th>
  52. <th width="15%">设备地址</th>
  53. <th width="15%">商品名称</th>
  54. <th width="9%">商品售卖价</th>
  55. <th width="6%">商品库存</th>
  56. <th width="15%">包装名称</th>
  57. <th width="9%">包装容量</th>
  58. <th width="6%">包装库存</th>
  59. </tr>
  60. </thead>
  61. <tbody>
  62. @{foreach (var item in Model.List)
  63. {
  64. <tr>
  65. @*<td class="tn"><input name="checkbox_name" type="checkbox" value="@item.Id"></td>*@
  66. <td>@item.Name</td>
  67. <td>@item.Code</td>
  68. <td>@item.Address</td>
  69. <td>@item.ProductName</td>
  70. <td>@item.ProductPrice</td>
  71. <td>@item.ProductStock</td>
  72. <td>@item.PackingName</td>
  73. <td>@item.PackingCapacity</td>
  74. <td>@item.PackingStock</td>
  75. </tr>
  76. }
  77. }
  78. </tbody>
  79. </table>
  80. <!-- page -->
  81. <div class="bottom">
  82. <div class="dataTables_info" id="example_info" Post="status" aria-live="polite">显示第 @Model.BeginPage 至 @Model.EndPage 项结果,共 @Model.Count 项</div>
  83. <div class="dataTables_length" id="example_length">
  84. <label>
  85. 显示
  86. <select name="example_length" onchange="submit()" aria-controls="example" class="form-control input-sm">
  87. <option value="10" @(Model.PageSize == 10 ? "selected" : "")>10</option>
  88. <option value="25" @(Model.PageSize == 25 ? "selected" : "")>25</option>
  89. <option value="50" @(Model.PageSize == 50 ? "selected" : "")>50</option>
  90. <option value="100" @(Model.PageSize == 100 ? "selected" : "")>100</option>
  91. </select> 项结果
  92. </label>
  93. </div>
  94. @CommonHtmlHelper.PaginationPager(Model.Index, Model.PageSize, Model.Count, 7, Model.Url)
  95. <div class="clear"></div>
  96. </div>
  97. <!-- page -->
  98. </div>
  99. }
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. <!-- table end -->
  105. @section scripts{
  106. <script type="text/javascript">
  107. $(function () {
  108. });
  109. </script>
  110. }