apparatusOptionList.jsp 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <%@ page contentType="text/html;charset=UTF-8" %>
  2. <%@ include file="/WEB-INF/views/include/taglib.jsp"%>
  3. <html>
  4. <head>
  5. <title>选项管理</title>
  6. <meta name="decorator" content="default"/>
  7. <style type="text/css">
  8. .table th{text-align: center;}
  9. .table td{text-align: center;}
  10. </style>
  11. <script type="text/javascript">
  12. $(document).ready(function() {
  13. });
  14. function page(n,s){
  15. $("#pageNo").val(n);
  16. $("#pageSize").val(s);
  17. $("#searchForm").submit();
  18. return false;
  19. }
  20. //状态修改
  21. function updateEnabledStatus(status,ids){
  22. var msg='确定启用?';
  23. if('0'==status){
  24. msg='确定停用?';
  25. }
  26. top.$.jBox.confirm(msg,'系统提示',function(v,h,f){
  27. if(v=='ok'){
  28. $.post("${ctx}/shareapparatus/apparatusOption/updateEnabledStatus",{'status':status,'ids':ids}, function(data) {
  29. if(true==data.success){
  30. $.jBox.tip(data.msg, 'info');
  31. } else {
  32. $.jBox.tip(data.msg,'error');
  33. }
  34. $("#searchForm").submit();
  35. },"JSON");//这里返回的类型有:json,html,xml,text
  36. }
  37. return;
  38. },{buttonsFocus:1,persistent: true});
  39. }
  40. </script>
  41. </head>
  42. <body>
  43. <ul class="nav nav-tabs">
  44. <li class="active"><a href="${ctx}/shareapparatus/apparatusOption/list?apparatusId=${apparatusId}">选项列表</a></li>
  45. <shiro:hasPermission name="shareapparatus:apparatusOption:edit"><li><a href="${ctx}/shareapparatus/apparatusOption/form?apparatusId=${apparatusId}">选项添加</a></li></shiro:hasPermission>
  46. </ul>
  47. <form:form id="searchForm" modelAttribute="apparatusOption" action="${ctx}/shareapparatus/apparatusOption/list?apparatusId=${apparatusId}" method="post" class="breadcrumb form-search">
  48. <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
  49. <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
  50. <%--<div class="ul-form">
  51. <label>共享仪器id:</label>
  52. <form:input path="apparatusId" htmlEscape="false" maxlength="11" class="input-medium"/>
  53. &nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
  54. <div class="clearfix"></div>
  55. </div>--%>
  56. </form:form>
  57. <sys:message content="${message}"/>
  58. <table id="contentTable" class="table table-striped table-bordered table-condensed">
  59. <thead>
  60. <tr>
  61. <th>序号</th>
  62. <th>选项内容</th>
  63. <%--<th>月份</th>
  64. <th>总天数</th>--%>
  65. <th>总价</th>
  66. <th>CDKEY</th>
  67. <th>是否已售</th>
  68. <th>状态</th>
  69. <th>添加时间</th>
  70. <shiro:hasPermission name="shareapparatus:apparatusOption:edit"><th>操作</th></shiro:hasPermission>
  71. </tr>
  72. </thead>
  73. <tbody>
  74. <c:forEach items="${page.list}" var="apparatusOption" varStatus="status">
  75. <tr>
  76. <td>${status.index+1}</td>
  77. <td>${apparatusOption.content}</td>
  78. <%--<td>${apparatusOption.month}</td>
  79. <td>${apparatusOption.days}</td>--%>
  80. <td>${apparatusOption.totalPrice}</td>
  81. <td>${apparatusOption.cdkey}</td>
  82. <td>${fns:getDictLabel(apparatusOption.soldOut, 'yes_no', '')}</td>
  83. <td><shiro:hasPermission name="shareapparatus:apparatusOption:edit">
  84. <c:if test="${apparatusOption.enabledStatus eq 1 }">
  85. <a href="javascript:void(0);" onclick="updateEnabledStatus('0','${apparatusOption.id}');" >
  86. <img alt="启用" src="/static/images/yes.gif" width="15px" border="none" title="启用">
  87. </a>
  88. </c:if>
  89. <c:if test="${apparatusOption.enabledStatus ne 1 }">
  90. <a href="javascript:void(0)" onclick="updateEnabledStatus('1','${apparatusOption.id}');">
  91. <img alt="停用" src="/static/images/no.gif" width="15px" border="none" title="停用">
  92. </a>
  93. </c:if>
  94. </shiro:hasPermission>
  95. <shiro:lacksPermission name="shareapparatus:apparatusOption:edit">
  96. <c:if test="${apparatusOption.enabledStatus eq 1 }">
  97. <img alt="启用" src="/static/images/yes.gif" width="15px" border="none" title="启用">
  98. </c:if>
  99. <c:if test="${apparatusOption.enabledStatus ne 1 }">
  100. <img alt="停用" src="/static/images/no.gif" width="15px" border="none" title="停用">
  101. </c:if>
  102. </shiro:lacksPermission>
  103. </td>
  104. <td>
  105. <fmt:formatDate value="${apparatusOption.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
  106. </td>
  107. <shiro:hasPermission name="shareapparatus:apparatusOption:edit"><td>
  108. <a href="${ctx}/shareapparatus/apparatusOption/form?id=${apparatusOption.id}">编辑</a>
  109. <shiro:hasPermission name="shareapparatus:apparatusOption:delete">
  110. <a href="${ctx}/shareapparatus/apparatusOption/delete?id=${apparatusOption.id}" onclick="return confirmx('确认要删除该选项吗?', this.href)">删除</a>
  111. </shiro:hasPermission>
  112. </td></shiro:hasPermission>
  113. </tr>
  114. </c:forEach>
  115. </tbody>
  116. </table>
  117. <div class="pagination">${page}</div>
  118. </body>
  119. </html>