截流自动化的商城平台
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.

edit.html 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. {layout name="layout2" /}
  2. <div class="layui-form" lay-filter="layui-form" id="layui-form" style="padding: 20px 30px 0 0;">
  3. <input type="hidden" value="{$detail.id}" name="id">
  4. <!--品牌名称-->
  5. <div class="layui-form-item">
  6. <label class="layui-form-label"><font color="red">*</font>品牌名称</label>
  7. <div class="layui-input-inline">
  8. <input type="text" name="name" value="{$detail.name}" lay-verify="required" lay-verType="tips" placeholder="请输入品牌名称" autocomplete="off" class="layui-input">
  9. </div>
  10. </div>
  11. <!--品牌首字母-->
  12. <div class="layui-form-item">
  13. <label class="layui-form-label"><font color="red">*</font>品牌首字母</label>
  14. <div class="layui-input-inline">
  15. <select name="initial" id="initial">
  16. {foreach $capital as $val}
  17. <option value="{$val}" {if condition="$detail.initial eq $val" }selected{/if}>{$val}</option>
  18. {/foreach}
  19. </select>
  20. </div>
  21. </div>
  22. <!--品牌图片-->
  23. <div class="layui-form-item">
  24. <label class="layui-form-label">品牌图片</label>
  25. <div class="layui-input-block">
  26. <div class="like-upload-image">
  27. {if $detail.image}
  28. <div class="upload-image-div">
  29. <img src="{$detail.image}" alt="img">
  30. <input type="hidden" name="image" value="{$detail.image}">
  31. <div class="del-upload-btn">x</div>
  32. </div>
  33. <div class="upload-image-elem" style="display:none;"><a class="add-upload-image"> + 添加图片</a></div>
  34. {else}
  35. <div class="upload-image-elem"><a class="add-upload-image"> + 添加图片</a></div>
  36. {/if}
  37. </div>
  38. <div class="layui-form-mid layui-word-aux">建议尺寸:宽200像素*高200像素的jpg,jpeg,png图片</div>
  39. </div>
  40. </div>
  41. <!--品牌排序-->
  42. <div class="layui-form-item">
  43. <label class="layui-form-label">品牌排序</label>
  44. <div class="layui-input-inline">
  45. <input type="number" name="sort" value="{$detail.sort}" placeholder="请输入品牌排序" class="layui-input">
  46. </div>
  47. </div>
  48. <!--是否显示-->
  49. <div class="layui-form-item">
  50. <label class="layui-form-label">显示状态</label>
  51. <div class="layui-input-inline">
  52. <input type="radio" name="is_show" value="1" title="显示" {if condition="$detail.is_show eq 1" }checked{/if}>
  53. <input type="radio" name="is_show" value="0" title="不显示" {if condition="$detail.is_show eq 0" }checked{/if}>
  54. </div>
  55. </div>
  56. <!--品牌描述-->
  57. <div class="layui-form-item">
  58. <label class="layui-form-label">品牌描述</label>
  59. <div class="layui-input-inline">
  60. <textarea name="remark" placeholder="请输入品牌描述" class="layui-textarea">{$detail.remark}</textarea>
  61. </div>
  62. </div>
  63. <div class="layui-form-item layui-hide">
  64. <input type="button" lay-submit lay-filter="edit-submit" id="edit-submit" value="确认">
  65. </div>
  66. </div>
  67. <script>
  68. layui.use([], function () {
  69. like.delUpload();
  70. $(document).on("click", ".add-upload-image", function () {
  71. like.imageUpload({
  72. limit: 1,
  73. field: "image",
  74. that: $(this)
  75. });
  76. })
  77. });
  78. </script>