截流自动化的商城平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

audit.html 4.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. {layout name="layout2" /}
  2. <style>
  3. .div-flex {
  4. display: flex;
  5. align-items: center;
  6. justify-content: left;
  7. }
  8. .image {
  9. height: 80px;
  10. width: 80px;
  11. }
  12. </style>
  13. <div class="layui-card-body">
  14. <!--基本信息-->
  15. <div class="layui-form" lay-filter="layuiadmin-form-order" id="layuiadmin-form-order">
  16. <input type="hidden" class="id" name="id" value="{$detail.id}">
  17. <div class="layui-form-item div-flex">
  18. <label class="layui-form-label ">产品来源</label>
  19. <div class="div-width">{$detail.source_type_text}</div>
  20. </div>
  21. <div class="layui-form-item div-flex">
  22. <label class="layui-form-label ">商品名称:</label>
  23. <div class="div-width">{$detail.name}</div>
  24. </div>
  25. <div class="layui-form-item div-flex">
  26. <label class="layui-form-label ">商品封面:</label>
  27. <div class="div-width"><img src="{$detail.cover_img}" class="image-show image"></div>
  28. </div>
  29. <!-- 价格形式-->
  30. <div class="layui-form-item div-flex">
  31. <label class="layui-form-label ">价格形式:</label>
  32. <div class="div-width">
  33. <span>{$detail.price_type_text}</span>
  34. <span>{$detail.price_tips}</span>
  35. </div>
  36. </div>
  37. <div class="layui-form-item div-flex">
  38. <label class="layui-form-label ">商品链接:</label>
  39. <div class="div-width">{$detail.url}</div>
  40. </div>
  41. <div class="layui-form-item div-flex">
  42. <label class="layui-form-label ">审核状态:</label>
  43. <div class="div-width">{$detail.audit_status_text}</div>
  44. </div>
  45. <div class="layui-form-item div-flex">
  46. <label class="layui-form-label">审核原因:</label>
  47. <div class="layui-input-inline">
  48. <textarea name="audit_remark" placeholder="请输入审核不通过的原因" class="layui-textarea audit_remark">{$detail.audit_remark}</textarea>
  49. </div>
  50. </div>
  51. <div class="layui-form-item" style="text-align: center">
  52. <div class="layui-input-block ">
  53. {eq name= "detail.sys_audit_status" value="0"}
  54. <button type="button" class="layui-btn layui-btn-sm layui-btn-danger width_160 " id="fail">不通过</button>
  55. <button type="button" class="layui-btn layui-btn-sm layui-btn-normal width_160 " id="success">通过</button>
  56. {/eq}
  57. <button type="button" class="layui-btn layui-btn-sm layui-btn-primary width_160 " id="back">返回</button>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. <script type="text/javascript">
  63. layui.use(['form'], function () {
  64. var $ = layui.$;
  65. var id = $('.id').val();
  66. //主图放大
  67. $(document).on('click', '.image-show', function () {
  68. var src = $(this).attr('src');
  69. like.showImg(src, 400);
  70. });
  71. $('#back').click(function () {
  72. var index=parent.layer.getFrameIndex(window.name); //获取当前窗口的name
  73. parent.layer.close(index);
  74. parent.layui.table.reload('like-table-lists');
  75. return true;
  76. });
  77. // 审核通过
  78. $('#success').click(function () {
  79. var audit_remark = $('.audit_remark').val();
  80. layer.confirm('确认审核通过吗?', {
  81. btn: ['确认', '取消'] //按钮
  82. }, function () {
  83. like.ajax({
  84. url: '{:url("live.LiveGoods/audit")}'
  85. , data: {'id': id, 'status': 1, 'audit_remark': audit_remark}
  86. , type: 'post'
  87. , success: function (res) {
  88. if (res.code == 1) {
  89. layui.layer.msg(res.msg, {
  90. offset: '15px'
  91. , icon: 1
  92. , time: 1000
  93. }, function () {
  94. location.reload();
  95. });
  96. }
  97. }
  98. });
  99. });
  100. });
  101. // 审核失败
  102. $('#fail').click(function () {
  103. var audit_remark = $('.audit_remark').val();
  104. like.ajax({
  105. url: '{:url("live.LiveGoods/audit")}'
  106. , data: {'id': id, 'status': 3, 'audit_remark': audit_remark}
  107. , type: 'post'
  108. , success: function (res) {
  109. if (res.code == 1) {
  110. layui.layer.msg(res.msg, {
  111. offset: '15px'
  112. , icon: 1
  113. , time: 1000
  114. }, function () {
  115. location.reload();
  116. });
  117. }
  118. },
  119. });
  120. });
  121. });
  122. </script>