截流自动化的商城平台
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

edit_goods.html 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. {layout name="layout2" /}
  2. <style>
  3. .layui-form-label {
  4. color: #6a6f6c;
  5. width: 100px;
  6. }
  7. .layui-input-block {
  8. margin-left: 130px;
  9. }
  10. .tips{
  11. color: red;
  12. }
  13. </style>
  14. <div class="layui-form" lay-filter="layuiadmin-form-user_level" id="layuiadmin-form-user_level" style="padding: 20px 30px 0 0;">
  15. <div class="layui-form-item">
  16. <label class="layui-form-label"><span class="tips">*</span>商家名称</label>
  17. <div class="layui-input-inline">
  18. <input type="text" value="{$detail[0]['shop_name']}" readonly class="layui-input">
  19. </div>
  20. </div>
  21. <div class="layui-form-item">
  22. <label class="layui-form-label"><span class="tips">*</span>参与日期</label>
  23. <div class="layui-input-inline">
  24. <input type="text" class="layui-input" disabled readonly id="start_end" placeholder="选择日期" autocomplete="off" name="start_end">
  25. </div>
  26. </div>
  27. <div class="layui-form-item">
  28. <label class="layui-form-label"><span class="tips">*</span>秒杀时段</label>
  29. <div class="layui-input-inline">
  30. <select name="seckill_id" disabled>
  31. <option value="">请选择秒杀时段</option>
  32. {foreach $seckill as $item}
  33. <option value="{$item.id}" {if $detail[0]['seckill_id'] == $item.id} selected {/if}>{$item.time}</option>
  34. {/foreach}
  35. </select>
  36. </div>
  37. </div>
  38. <div class="layui-form-item">
  39. <label class="layui-form-label"><span class="tips">*</span>秒杀商品</label>
  40. <div class="layui-input-block">
  41. <table id="goods_list" class="layui-table" lay-size="sm" style="width: 800px;">
  42. <colgroup>
  43. <col width="60px">
  44. </colgroup>
  45. <thead>
  46. <tr style="background-color: #f3f5f9">
  47. <th style="width: 120px;text-align: center">商品</th>
  48. <th style="width: 120px;text-align: center">商品规格</th>
  49. <th style="width: 60px;text-align: center">商品价格</th>
  50. <th style="width: 30px;text-align: center">秒杀价格</th>
  51. </tr>
  52. </thead>
  53. <tbody>
  54. {foreach $detail as $item}
  55. <tr>
  56. <td >
  57. <img class="image-show" width="80px" height="80px" src="{$item.image}">{$item.name}
  58. </td>
  59. <td>{$item.spec_value_str}</td>
  60. <td style="text-align: center">{$item.goods_price}</td>
  61. <input type="hidden" name="id[]" value="{$item.id}" >
  62. <input type="hidden" name="item_id[]" value="{$item.item_id}" >
  63. <input type="hidden" name="goods_id[]" value="{$item.goods_id}" >
  64. <td style="text-align: center"><input name="price[]" value="{$item.price}" autocomplete="off" class="layui-input" readonly lay-verify="required" lay-reqtext="请输入秒杀价格"></td>
  65. </tr>
  66. {/foreach}
  67. </tbody>
  68. </table>
  69. </div>
  70. </div>
  71. <div class="layui-form-item layui-hide">
  72. <input type="button" lay-submit lay-filter="edit-seckill-submit" id="edit-seckill-submit" value="确认">
  73. </div>
  74. </div>
  75. <style>
  76. .layui-form-label {
  77. width: 100px;
  78. }
  79. .layui-input-block {
  80. margin-left: 130px;
  81. }
  82. </style>
  83. <script>
  84. layui.config({
  85. version:"{$front_version}",
  86. base: '/static/lib/' //静态资源所在路径
  87. }).use(['form', 'laydate'], function(){
  88. var $ = layui.$
  89. ,form = layui.form
  90. ,laydate = layui.laydate
  91. ,goods_ids = [];
  92. laydate.render({
  93. elem: '#start_end' //指定元素
  94. ,range: '~'
  95. ,value: "{$detail[0]['date']}"
  96. ,isInitValue: true
  97. });
  98. //图片放大
  99. $(document).on('click', '.image-show', function () {
  100. var src = $(this).attr('src');
  101. like.showImg(src,600);
  102. });
  103. })
  104. </script>