newPageQualitySupplierList.jsp 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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. //PC端状态修改
  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}/newhome/newPageQualitySupplier/updateEnabledStatus",{'enabledStatus':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. //CRM端状态修改
  41. function updateCrmEnabledStatusByIds(status,ids){
  42. var msg='确定开启?';
  43. if('0'==status){
  44. msg='确定停用?';
  45. }
  46. top.$.jBox.confirm(msg,'系统提示',function(v,h,f){
  47. if(v=='ok'){
  48. $.post("${ctx}/newhome/newPageQualitySupplier/updateCrmEnabledStatusByIds",{'crmEnabledStatus':status,'ids':ids}, function(data) {
  49. if(true==data.success){
  50. $.jBox.tip(data.msg, 'info');
  51. } else {
  52. $.jBox.tip(data.msg,'error');
  53. }
  54. $("#searchForm").submit();
  55. },"JSON");//这里返回的类型有:json,html,xml,text
  56. }
  57. return;
  58. },{buttonsFocus:1,persistent: true});
  59. }
  60. //批量保存排序
  61. function batchSaveSort() {
  62. var items = new Array();
  63. var $items = $('.check-item');
  64. $items.each(function(){
  65. items.push($(this).val());
  66. });
  67. //保存批量排序
  68. $.post("${ctx}/newhome/newPageQualitySupplier/batchSaveSort?newPageList="+items, function(data) {
  69. if(true==data.success){
  70. $.jBox.tip(data.msg, 'info');
  71. setInterval(g,1000);
  72. } else {
  73. $.jBox.tip(data.msg,'error');
  74. }
  75. },"JSON");//这里返回的类型有:json,html,xml,text
  76. }
  77. function g()
  78. {
  79. window.location.href="${ctx}/newhome/newPageQualitySupplier/";//刷新页面
  80. }
  81. //修改排序值
  82. function changeSort(id,sortThis) {
  83. var value = sortThis.value;
  84. $("#info"+id).val(id+"-"+value);
  85. }
  86. </script>
  87. </head>
  88. <body>
  89. <ul class="nav nav-tabs">
  90. <li class="active"><a href="${ctx}/newhome/newPageQualitySupplier/">优质供应商列表</a></li>
  91. <shiro:hasPermission name="newhome:newPageQualitySupplier:edit"><li><a href="${ctx}/newhome/newPageQualitySupplier/form">优质供应商添加</a></li></shiro:hasPermission>
  92. <shiro:hasPermission name="newhome:newPageQualitySupplier:edit"><li><a href="${ctx}/newhome/newPageQualitySupplier/formImage">供应商广告图添加</a></li></shiro:hasPermission>
  93. </ul>
  94. <sys:message content="${message}"/>
  95. &nbsp;&nbsp;<input id="batchConfirm" class="btn btn-primary" type="submit" onclick="batchSaveSort()" value="保存排序"/>
  96. <form:form id="searchForm" modelAttribute="newPageQualitySupplier" action="${ctx}/newhome/newPageQualitySupplier/" method="post" class="breadcrumb form-search">
  97. <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
  98. <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
  99. </form:form>
  100. <table id="contentTable" class="table table-striped table-bordered table-condensed">
  101. <thead>
  102. <tr>
  103. <th>ID</th>
  104. <th>供应商</th>
  105. <th>图片</th>
  106. <th>链接</th>
  107. <th>排序</th>
  108. <th>小程序端状态</th>
  109. <th>PC端状态</th>
  110. <th>创建时间</th>
  111. <shiro:hasPermission name="newhome:newPageQualitySupplier:edit"><th>操作</th></shiro:hasPermission>
  112. </tr>
  113. </thead>
  114. <tbody>
  115. <c:forEach items="${page.list}" var="newPageQualitySupplier">
  116. <tr>
  117. <input class="check-item" type="hidden" id="info${newPageQualitySupplier.id}" value='${newPageQualitySupplier.id}-${newPageQualitySupplier.sort}'/>
  118. <td>${newPageQualitySupplier.id}</td>
  119. <td>${newPageQualitySupplier.supplierName}</td>
  120. <td ><img style="width:120px;height: 80px;" src="${newPageQualitySupplier.image}"></td>
  121. <td><a href="${newPageQualitySupplier.link}" target="_blank">${newPageQualitySupplier.link}</a></td>
  122. <td><input id="sort" name="sort" style="width:50px;" value="${newPageQualitySupplier.sort}" onkeyup="this.value=this.value.replace(/\D/g,'0')" onchange="changeSort(${newPageQualitySupplier.id},this)"></td>
  123. <td><shiro:hasPermission name="newhome:newPageQualitySupplier:edit">
  124. <c:if test="${newPageQualitySupplier.crmEnabledStatus eq 1 }">
  125. <a href="javascript:void(0);" onclick="updateCrmEnabledStatusByIds('0','${newPageQualitySupplier.id}');" >
  126. <img alt="启用" src="/static/images/yes.gif" width="15px" border="none" title="启用">
  127. </a>
  128. </c:if>
  129. <c:if test="${newPageQualitySupplier.crmEnabledStatus ne 1 }">
  130. <a href="javascript:void(0)" onclick="updateCrmEnabledStatusByIds('1','${newPageQualitySupplier.id}');">
  131. <img alt="停用" src="/static/images/no.gif" width="15px" border="none" title="停用">
  132. </a>
  133. </c:if>
  134. </shiro:hasPermission></td>
  135. <td><shiro:hasPermission name="newhome:newPageQualitySupplier:edit">
  136. <c:if test="${newPageQualitySupplier.wwwEnabledStatus eq 1 }">
  137. <a href="javascript:void(0);" onclick="updateEnabledStatus('0','${newPageQualitySupplier.id}');" >
  138. <img alt="启用" src="/static/images/yes.gif" width="15px" border="none" title="启用">
  139. </a>
  140. </c:if>
  141. <c:if test="${newPageQualitySupplier.wwwEnabledStatus ne 1 }">
  142. <a href="javascript:void(0)" onclick="updateEnabledStatus('1','${newPageQualitySupplier.id}');">
  143. <img alt="停用" src="/static/images/no.gif" width="15px" border="none" title="停用">
  144. </a>
  145. </c:if>
  146. </shiro:hasPermission></td>
  147. <td><fmt:formatDate value="${newPageQualitySupplier.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
  148. <shiro:hasPermission name="newhome:newPageQualitySupplier:edit"><td>
  149. <a href="${ctx}/newhome/newPageQualitySupplier/form?id=${newPageQualitySupplier.id}">编辑</a>
  150. <a href="${ctx}/newhome/newPageQualitySupplier/product?id=${newPageQualitySupplier.id}">商品编辑</a>
  151. <shiro:hasPermission name="newhome:newPageQualitySupplier:delete">
  152. <a href="${ctx}/newhome/newPageQualitySupplier/delete?id=${newPageQualitySupplier.id}" onclick="return confirmx('确定删除吗?删除后不可恢复!', this.href)">删除</a>
  153. </shiro:hasPermission>
  154. </td></shiro:hasPermission>
  155. </tr>
  156. </c:forEach>
  157. </tbody>
  158. </table>
  159. <div class="pagination">${page}</div>
  160. </body>
  161. </html>