quota_add.html 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. {extend name="default/base/base_seller" /}
  2. {block name="seller_main"}
  3. <div class="dssc-form-default">
  4. <form id="add_form" action="{:url('Sellerpromotionmansong/mansong_quota_add_save')}" method="post">
  5. <dl>
  6. <dt><i class="required">*</i>{$Think.lang.mansong_quota_add_quantity}{$Think.lang.ds_colon}</dt>
  7. <dd>
  8. <input id="mansong_quota_quantity" name="mansong_quota_quantity" type="text" class="text w50"/><em class="add-on">{$Think.lang.text_month}</em>
  9. <span></span>
  10. <p class="hint">{$Think.lang.mansong_price_explain1}</p>
  11. <p class="hint">{$Think.lang.mansong_price_explain2}{$Think.config.ds_config.promotion_mansong_price}{$Think.lang.ds_yuan}</p>
  12. <p class="hint"><strong style="color: red">{$Think.lang.notice_package_renewal6}</strong></p>
  13. </dd>
  14. </dl>
  15. <div class="bottom">
  16. <input id="submit_button" type="submit" value="{$Think.lang.ds_submit}" class="submit">
  17. </div>
  18. </form>
  19. </div>
  20. <script>
  21. $(document).ready(function () {
  22. //页面输入内容验证
  23. $("#add_form").validate({
  24. errorPlacement: function (error, element) {
  25. var error_td = element.parent('dd').children('span');
  26. error_td.append(error);
  27. },
  28. submitHandler: function (form) {
  29. var unit_price = '{$Think.config.ds_config.promotion_mansong_price}';
  30. var quantity = $("#mansong_quota_quantity").val();
  31. var price = unit_price * quantity;
  32. layer.confirm('{$Think.lang.mansong_quota_add_confirm}' + price + '{$Think.lang.ds_yuan}', {
  33. btn: ['{$Think.lang.ds_ok}', '{$Think.lang.ds_cancel}'],
  34. title: false,
  35. }, function () {
  36. ds_ajaxpost('add_form', 'url', "{:url('Sellerpromotionmansong/index')}");
  37. });
  38. },
  39. rules: {
  40. mansong_quota_quantity: {
  41. required: true,
  42. digits: true,
  43. min: 1,
  44. max: 12
  45. }
  46. },
  47. messages: {
  48. mansong_quota_quantity: {
  49. required: '<i class="iconfont">&#xe64c;</i>{$Think.lang.mansong_quota_quantity_error}',
  50. digits: '<i class="iconfont">&#xe64c;</i>{$Think.lang.mansong_quota_quantity_error}',
  51. min: '<i class="iconfont">&#xe64c;</i>{$Think.lang.mansong_quota_quantity_error}',
  52. max: '<i class="iconfont">&#xe64c;</i>{$Think.lang.mansong_quota_quantity_error}'
  53. }
  54. }
  55. });
  56. });
  57. </script>
  58. {/block}