pintuan_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('Sellerpromotionpintuan/pintuan_quota_add_save')}" method="post">
  5. <dl>
  6. <dt><i class="required">*</i>{$Think.lang.pintuan_quota_add_quantity}{$Think.lang.ds_colon}</dt>
  7. <dd>
  8. <input id="pintuan_quota_quantity" name="pintuan_quota_quantity" type="text" class="text w30" /><em class="add-on">{$Think.lang.text_month}</em><span></span>
  9. <p class="hint">{$Think.lang.pintuan_price_explain1}</p>
  10. <p class="hint">{:sprintf($Think.lang.pintuan_price_explain2,$Think.config.ds_config.promotion_pintuan_price)} </p>
  11. <p class="hint"><strong style="color: red">{$Think.lang.period_settlement_deduct}</strong></p>
  12. </dd>
  13. </dl>
  14. <div class="bottom">
  15. <input id="submit_button" type="submit" class="submit" value="{$Think.lang.ds_submit}">
  16. </div>
  17. </form>
  18. </div>
  19. <script type="text/javascript">
  20. $(document).ready(function(){
  21. //页面输入内容验证
  22. $("#add_form").validate({
  23. errorPlacement: function(error, element){
  24. var error_td = element.parent('dd').children('span');
  25. error_td.append(error);
  26. },
  27. submitHandler:function(form){
  28. var unit_price = '{$Think.config.ds_config.promotion_pintuan_price}';
  29. var quantity = $("#pintuan_quota_quantity").val();
  30. var price = unit_price * quantity;
  31. layer.confirm('{$Think.lang.pintuan_quota_add_confirm}'+price+'{$Think.lang.ds_yuan}', {
  32. btn: ['{$Think.lang.ds_ok}', '{$Think.lang.ds_cancel}'],
  33. title: false,
  34. }, function () {
  35. ds_ajaxpost('add_form', 'url', "{:url('Sellerpromotionpintuan/index')}");
  36. });
  37. },
  38. rules : {
  39. pintuan_quota_quantity : {
  40. required : true,
  41. digits : true,
  42. min : 1,
  43. max : 12
  44. }
  45. },
  46. messages : {
  47. pintuan_quota_quantity : {
  48. required : "<i class='iconfont'>&#xe64c;</i>{$Think.lang.pintuan_quota_quantity_error}",
  49. digits : "<i class='iconfont'>&#xe64c;</i>{$Think.lang.pintuan_quota_quantity_error}",
  50. min : "<i class='iconfont'>&#xe64c;</i>{$Think.lang.pintuan_quota_quantity_error}",
  51. max : "<i class='iconfont'>&#xe64c;</i>{$Think.lang.pintuan_quota_quantity_error}"
  52. }
  53. }
  54. });
  55. });
  56. </script>
  57. {/block}