templateedit.html 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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" action="{:url('Voucher/templateedit')}">
  13. <input type="hidden" id="tid" name="tid" value="{$t_info.vouchertemplate_id}"/>
  14. <table class="ds-default-table">
  15. <tbody>
  16. <tr class="noborder">
  17. <td colspan="2" class="required"><label>{$Think.lang.ds_store_name}{$Think.lang.ds_colon}</label></td>
  18. </tr>
  19. <tr class="noborder">
  20. <td class="vatop rowform"><input type="text" class="readonly txt" value="{$t_info.vouchertemplate_storename}" readonly></td>
  21. <td class="vatop tips"></td>
  22. </tr>
  23. <tr class="noborder">
  24. <td colspan="2" class="required"><label>{$Think.lang.ds_storeclass}{$Think.lang.ds_colon}</label></td>
  25. </tr>
  26. <tr class="noborder">
  27. <td class="vatop rowform"><input type="text" class="readonly txt" value="{if isset($store_class[$t_info.vouchertemplate_sc_id]) && $t_info.vouchertemplate_sc_id gt 0}{$store_class[$t_info.vouchertemplate_sc_id]['storeclass_name']}{/if}" readonly></td>
  28. <td class="vatop tips"></td>
  29. </tr>
  30. <tr class="noborder">
  31. <td colspan="2" class="required"><label>{$Think.lang.admin_voucher_template_title}{$Think.lang.ds_colon}</label></td>
  32. </tr>
  33. <tr class="noborder">
  34. <td class="vatop rowform"><input type="text" class="readonly txt" value="{$t_info.vouchertemplate_title}" readonly></td>
  35. <td class="vatop tips"></td>
  36. </tr>
  37. <tr class="noborder">
  38. <td colspan="2" class="required"><label>{$Think.lang.admin_voucher_template_enddate}{$Think.lang.ds_colon}</label></td>
  39. </tr>
  40. <tr class="noborder">
  41. <td class="vatop rowform"><input type="text" class="readonly txt" value="{$t_info.vouchertemplate_enddate|date='Y-m-d'}" readonly></td>
  42. <td class="vatop tips"></td>
  43. </tr>
  44. <tr class="noborder">
  45. <td colspan="2" class="required"><label>{$Think.lang.admin_voucher_template_price}{$Think.lang.ds_colon}</label></td>
  46. </tr>
  47. <tr class="noborder">
  48. <td class="vatop rowform"><input type="text" class="readonly txt" value="{$t_info.vouchertemplate_price}" readonly></td>
  49. <td class="vatop tips"></td>
  50. </tr>
  51. <tr class="noborder">
  52. <td colspan="2" class="required"><label>{$Think.lang.admin_voucher_template_total}{$Think.lang.ds_colon}</label></td>
  53. </tr>
  54. <tr class="noborder">
  55. <td class="vatop rowform"><input type="text" class="readonly txt" value="{$t_info.vouchertemplate_total}" readonly></td>
  56. <td class="vatop tips"></td>
  57. </tr>
  58. <tr class="noborder">
  59. <td colspan="2" class="required"><label>{$Think.lang.admin_voucher_template_eachlimit}{$Think.lang.ds_colon}</label></td>
  60. </tr>
  61. <tr class="noborder">
  62. <td class="vatop rowform"><input type="text" class="readonly txt" value="{$t_info.vouchertemplate_eachlimit}" readonly></td>
  63. <td class="vatop tips"></td>
  64. </tr>
  65. <tr class="noborder">
  66. <td colspan="2" class="required"><label>{$Think.lang.admin_voucher_template_orderpricelimit}{$Think.lang.ds_colon}</label></td>
  67. </tr>
  68. <tr class="noborder">
  69. <td class="vatop rowform"><input type="text" class="readonly txt" value="{$t_info.vouchertemplate_limit}" readonly></td>
  70. <td class="vatop tips"></td>
  71. </tr>
  72. <tr class="noborder">
  73. <td colspan="2" class="required"><label>{$Think.lang.admin_voucher_template_describe}{$Think.lang.ds_colon}</label></td>
  74. </tr>
  75. <tr class="noborder">
  76. <td class="vatop rowform"><textarea rows="6" readonly="readonly" class="readonly tarea">{$t_info.vouchertemplate_desc}</textarea></td>
  77. <td class="vatop tips"></td>
  78. </tr>
  79. <tr class="noborder">
  80. <td colspan="2" class="required"><label>{$Think.lang.admin_voucher_template_image}{$Think.lang.ds_colon}</label></td>
  81. </tr>
  82. <tr class="noborder">
  83. <td class="vatop rowform">
  84. <img onload="javascript:ResizeImage(this,160,160);" src="{$t_info.vouchertemplate_customimg}"/>
  85. </td>
  86. <td class="vatop tips"></td>
  87. </tr>
  88. <tr class="noborder">
  89. <td colspan="2" class="required"><label>{$Think.lang.admin_voucher_template_giveoutnum}{$Think.lang.ds_colon}</label></td>
  90. </tr>
  91. <tr class="noborder">
  92. <td class="vatop rowform"><input type="text" class="readonly txt" value="{$t_info.vouchertemplate_giveout}" readonly></td>
  93. <td class="vatop tips"></td>
  94. </tr>
  95. <tr class="noborder">
  96. <td colspan="2" class="required"><label>{$Think.lang.admin_voucher_template_usednum}{$Think.lang.ds_colon}</label></td>
  97. </tr>
  98. <tr class="noborder">
  99. <td class="vatop rowform"><input type="text" class="readonly txt" value="{$t_info.vouchertemplate_used}" readonly></td>
  100. <td class="vatop tips"></td>
  101. </tr>
  102. <tr class="noborder">
  103. <td colspan="2" class="required"><label>{$Think.lang.admin_voucher_template_points}{$Think.lang.ds_colon}</label></td>
  104. </tr>
  105. <tr class="noborder">
  106. <td class="vatop rowform"><input type="text" class="txt" id="points" name="points" value="{$t_info.vouchertemplate_points}"></td>
  107. <td class="vatop tips"></td>
  108. </tr>
  109. <tr class="noborder">
  110. <td colspan="2" class="required"><label>{$Think.lang.admin_voucher_template_if_private}{$Think.lang.ds_colon}</label></td>
  111. </tr>
  112. <tr class="noborder">
  113. <td class="vatop rowform">
  114. {if $t_info.vouchertemplate_if_private ==1}
  115. <input type="text" class="readonly txt" value="{$Think.lang.ds_yes}" readonly />
  116. {else}
  117. <input type="text" class="readonly txt" value="{$Think.lang.ds_no}" readonly />
  118. {/if}
  119. </td>
  120. <td class="vatop tips"></td>
  121. </tr>
  122. <tr class="noborder">
  123. <td colspan="2" class="required"><label>{$Think.lang.ds_status}{$Think.lang.ds_colon}</label></td>
  124. </tr>
  125. <tr class="noborder">
  126. <td class="vatop rowform">
  127. {foreach name="templatestate_arr" item="v"}
  128. <input type="radio" value="{$v.0}" id="tstate_{$v.0}" name="tstate" {eq name="v.0" value="$t_info.vouchertemplate_state"}checked="checked"{/eq}>{$v.1}
  129. {/foreach}
  130. </td>
  131. <td class="vatop tips"></td>
  132. </tr>
  133. <tr class="noborder">
  134. <td colspan="2" class="required"><label>{$Think.lang.ds_recommend}:</label></td>
  135. </tr>
  136. <tr class="noborder">
  137. <td class="vatop rowform onoff">
  138. <label title="{$Think.lang.ds_yes}" class="cb-enable {eq name='t_info.vouchertemplate_recommend' value='1'}selected{/eq}" for="recommend1"><span>{$Think.lang.ds_yes}</span></label>
  139. <label title="{$Think.lang.ds_no}" class="cb-disable {eq name='t_info.vouchertemplate_recommend' value='0'}selected{/eq}" for="recommend0"><span>{$Think.lang.ds_no}</span></label>
  140. <input type="radio" value="1" {eq name='t_info.vouchertemplate_recommend' value='1'}checked="checked"{/eq} name="recommend" id="recommend1">
  141. <input type="radio" value="0" {eq name='t_info.vouchertemplate_recommend' value='0'}checked="checked"{/eq} name="recommend" id="recommend0"></td>
  142. <td class="vatop tips"></td>
  143. </tr>
  144. </tbody>
  145. <tfoot>
  146. <tr class="tfoot">
  147. <td colspan="15"><input class="btn" type="submit" value="{$Think.lang.ds_submit}"/></td>
  148. </tr>
  149. </tfoot>
  150. </table>
  151. </form>
  152. </div>
  153. <script>
  154. //按钮先执行验证再提交表单
  155. $(function(){
  156. //页面输入内容验证
  157. $("#add_form").validate({
  158. errorPlacement: function(error, element){
  159. error.appendTo(element.parent().parent().prev().find('td:first'));
  160. },
  161. rules : {
  162. points: {
  163. required : true,
  164. digits : true
  165. }
  166. },
  167. messages : {
  168. points: {
  169. required : '{$Think.lang.admin_voucher_template_points_error}',
  170. digits : '{$Think.lang.admin_voucher_template_points_error}'
  171. }
  172. }
  173. });
  174. });
  175. </script>