mallvouchertemplateedit.html 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. {include file="public/header" /}
  2. <div class="page">
  3. <div class="fixed-bar">
  4. <div class="item-title">
  5. <div class="subject">
  6. <h3>{$Think.lang.ds_voucher_price_manage}</h3>
  7. <h5></h5>
  8. </div>
  9. {include file="public/admin_items" /}
  10. </div>
  11. </div>
  12. <form id="add_form" method="post">
  13. <div class="ncap-form-default">
  14. <dl>
  15. <dt><label class="validation">{$Think.lang.admin_mallvouchertemplate_title}{$Think.lang.ds_colon}</label></dt>
  16. <dd>
  17. <input class="w400 text" name="mallvouchertemplate_title" type="text" id="mallvouchertemplate_title" value="{$info.mallvouchertemplate_title|default=''}" />
  18. <span></span>
  19. </dd>
  20. </dl>
  21. <dl>
  22. <dt><label class="validation">{$Think.lang.admin_mallvouchertemplate_goodsclass}{$Think.lang.ds_colon}</label></dt>
  23. <dd>
  24. <div id="gcategory" class="default_select">
  25. <input type="hidden" name="mallvouchertemplate_gcid" value="{$info.mallvouchertemplate_gcid}" class="mls_id" />
  26. <input type="hidden" name="mallvouchertemplate_gcname" value="{$spec.mallvouchertemplate_gcname|default=''}" class="mls_name" />
  27. {if $info.mallvouchertemplate_gcid}
  28. <span>{$info.mallvouchertemplate_gcname|default=''}</span>
  29. <input type="button" value="{$Think.lang.ds_edit}" class="edit_gcategory" />
  30. {/if}
  31. <select {if $info.mallvouchertemplate_gcid}style="display:none"{/if}>
  32. {foreach name="gc_list" item="gc"}
  33. <option value="{$gc.gc_id}">{$gc.gc_name}</option>
  34. {/foreach}
  35. </select>
  36. </div>
  37. </dd>
  38. </dl>
  39. <dl>
  40. <dt><label class="validation">{$Think.lang.admin_mallvouchertemplate_price}{$Think.lang.ds_colon}</label></dt>
  41. <dd>
  42. <input class="w400 text" name="mallvouchertemplate_price" type="text" id="mallvouchertemplate_price" value="{$info.mallvouchertemplate_price|default=''}" />
  43. <span></span>
  44. </dd>
  45. </dl>
  46. <dl>
  47. <dt><label class="validation">{$Think.lang.admin_mallvouchertemplate_startdate}{$Think.lang.ds_colon}</label></dt>
  48. <dd>
  49. <input class="w400 text" name="mallvouchertemplate_startdate" type="text" id="mallvouchertemplate_startdate" value="{$info.mallvouchertemplate_startdate|date='Y-m-d H:i'}" />
  50. <span></span>
  51. </dd>
  52. </dl>
  53. <dl>
  54. <dt><label class="validation">{$Think.lang.admin_mallvouchertemplate_enddate}{$Think.lang.ds_colon}</label></dt>
  55. <dd>
  56. <input class="w400 text" name="mallvouchertemplate_enddate" type="text" id="mallvouchertemplate_enddate" value="{$info.mallvouchertemplate_enddate|date='Y-m-d H:i'}" />
  57. <span></span>
  58. </dd>
  59. </dl>
  60. <dl>
  61. <dt><label class="validation">{$Think.lang.admin_mallvouchertemplate_limit}{$Think.lang.ds_colon}</label></dt>
  62. <dd>
  63. <input class="w400 text" name="mallvouchertemplate_limit" type="text" id="mallvouchertemplate_limit" value="{$info.mallvouchertemplate_limit|default=''}" />
  64. <span></span>
  65. </dd>
  66. </dl>
  67. <dl>
  68. <dt><label class="validation">{$Think.lang.admin_mallvouchertemplate_points}{$Think.lang.ds_colon}</label></dt>
  69. <dd>
  70. <input class="w400 text" name="mallvouchertemplate_points" type="text" id="mallvouchertemplate_points" value="{$info.mallvouchertemplate_points|default='0'}" />
  71. <span></span>
  72. </dd>
  73. </dl>
  74. <dl>
  75. <dt><label class="validation">{$Think.lang.admin_mallvouchertemplate_quantity}{$Think.lang.ds_colon}</label></dt>
  76. <dd>
  77. <input class="w400 text" name="mallvouchertemplate_quantity" type="text" id="mallvouchertemplate_quantity" value="{$info.mallvouchertemplate_quantity}" />
  78. <span></span>
  79. </dd>
  80. </dl>
  81. <dl>
  82. <dt><label class="validation">{$Think.lang.admin_mallvouchertemplate_eachlimit}{$Think.lang.ds_colon}</label></dt>
  83. <dd>
  84. <input class="w400 text" name="mallvouchertemplate_eachlimit" placeholder="设置为0则表示没有限制" type="text" id="mallvouchertemplate_eachlimit" value="{$info.mallvouchertemplate_eachlimit}" />
  85. <span></span>
  86. </dd>
  87. </dl>
  88. <dl>
  89. <dt></dt>
  90. <dd>
  91. <input type="submit" class="btn" value="{$Think.lang.ds_submit}">
  92. </dd>
  93. </dl>
  94. </div>
  95. </form>
  96. </div>
  97. <link rel="stylesheet" href="{$Think.PLUGINS_SITE_ROOT}/js/jquery-ui-timepicker/jquery-ui-timepicker-addon.min.css">
  98. <script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery-ui-timepicker/jquery-ui-timepicker-addon.min.js"></script>
  99. <script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery-ui-timepicker/i18n/jquery-ui-timepicker-zh-CN.js"></script>
  100. <script src="{$Think.PLUGINS_SITE_ROOT}/mlselection.js"></script>
  101. <script>
  102. $(function() {
  103. gcategoryInit("gcategory");
  104. });
  105. </script>
  106. <script>
  107. //按钮先执行验证再提交表单
  108. $(function(){
  109. $('#mallvouchertemplate_startdate').datetimepicker({dateFormat: 'yy-mm-dd'});
  110. $('#mallvouchertemplate_enddate').datetimepicker({dateFormat: 'yy-mm-dd'});
  111. //页面输入内容验证
  112. $("#add_form").validate({
  113. errorPlacement: function(error, element){
  114. var error_td = element.parent('dd').children('span');
  115. error_td.append(error);
  116. },
  117. rules : {
  118. mallvouchertemplate_title: {
  119. required : true,
  120. maxlength : 255
  121. },
  122. mallvouchertemplate_price: {
  123. required : true,
  124. digits : true,
  125. min : 0
  126. },
  127. mallvouchertemplate_limit:{
  128. required : true,
  129. digits : true,
  130. min : 0
  131. },
  132. mallvouchertemplate_quantity:{
  133. required : true,
  134. digits : true,
  135. min : 0
  136. },
  137. mallvouchertemplate_eachlimit:{
  138. required : true,
  139. digits : true,
  140. min : 0
  141. }
  142. },
  143. messages : {
  144. mallvouchertemplate_title: {
  145. required : '{$Think.lang.admin_mallvouchertemplate_title_error}',
  146. maxlength : '{$Think.lang.admin_mallvouchertemplate_title_lengtherror}'
  147. },
  148. mallvouchertemplate_price: {
  149. required : '{$Think.lang.admin_mallvouchertemplate_price_error}',
  150. digits : '{$Think.lang.admin_mallvouchertemplate_price_error}',
  151. min : '{$Think.lang.admin_mallvouchertemplate_price_error}'
  152. },
  153. mallvouchertemplate_limit: {
  154. required : '{$Think.lang.admin_mallvouchertemplate_limit_error}',
  155. digits : '{$Think.lang.admin_mallvouchertemplate_limit_error}',
  156. min : '{$Think.lang.admin_mallvouchertemplate_limit_error}'
  157. },
  158. mallvouchertemplate_quantity: {
  159. required : '{$Think.lang.admin_mallvouchertemplate_quantity_error}',
  160. digits : '{$Think.lang.admin_mallvouchertemplate_quantity_error}',
  161. min : '{$Think.lang.admin_mallvouchertemplate_quantity_error}'
  162. },
  163. mallvouchertemplate_eachlimit: {
  164. required : '{$Think.lang.admin_mallvouchertemplate_quantity_error}',
  165. digits : '{$Think.lang.admin_mallvouchertemplate_quantity_error}',
  166. min : '{$Think.lang.admin_mallvouchertemplate_quantity_error}'
  167. }
  168. }
  169. });
  170. });
  171. </script>