123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- {extend name="default/base/base_seller" /}
- {block name="seller_main"}
- <div class="dssc-form-default">
- <form id="add_form" action="{:url('Sellerpromotionpintuan/pintuan_quota_add_save')}" method="post">
- <dl>
- <dt><i class="required">*</i>{$Think.lang.pintuan_quota_add_quantity}{$Think.lang.ds_colon}</dt>
- <dd>
- <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>
- <p class="hint">{$Think.lang.pintuan_price_explain1}</p>
- <p class="hint">{:sprintf($Think.lang.pintuan_price_explain2,$Think.config.ds_config.promotion_pintuan_price)} </p>
- <p class="hint"><strong style="color: red">{$Think.lang.period_settlement_deduct}</strong></p>
- </dd>
- </dl>
- <div class="bottom">
- <input id="submit_button" type="submit" class="submit" value="{$Think.lang.ds_submit}">
- </div>
- </form>
- </div>
- <script type="text/javascript">
- $(document).ready(function(){
- //页面输入内容验证
- $("#add_form").validate({
- errorPlacement: function(error, element){
- var error_td = element.parent('dd').children('span');
- error_td.append(error);
- },
- submitHandler:function(form){
- var unit_price = '{$Think.config.ds_config.promotion_pintuan_price}';
- var quantity = $("#pintuan_quota_quantity").val();
- var price = unit_price * quantity;
- layer.confirm('{$Think.lang.pintuan_quota_add_confirm}'+price+'{$Think.lang.ds_yuan}', {
- btn: ['{$Think.lang.ds_ok}', '{$Think.lang.ds_cancel}'],
- title: false,
- }, function () {
- ds_ajaxpost('add_form', 'url', "{:url('Sellerpromotionpintuan/index')}");
- });
-
-
- },
- rules : {
- pintuan_quota_quantity : {
- required : true,
- digits : true,
- min : 1,
- max : 12
- }
- },
- messages : {
- pintuan_quota_quantity : {
- required : "<i class='iconfont'></i>{$Think.lang.pintuan_quota_quantity_error}",
- digits : "<i class='iconfont'></i>{$Think.lang.pintuan_quota_quantity_error}",
- min : "<i class='iconfont'></i>{$Think.lang.pintuan_quota_quantity_error}",
- max : "<i class='iconfont'></i>{$Think.lang.pintuan_quota_quantity_error}"
- }
- }
- });
- });
- </script>
- {/block}
|