12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- {extend name="default/base/base_seller" /}
- {block name="seller_main"}
- <div class="dssc-form-default">
- <form id="add_form" action="{:url('Sellergroupbuy/groupbuy_quota_add_save')}" method="post">
- <dl>
- <dt><i class="required">*</i>{$Think.lang.text_buy_count}</dt>
- <dd>
- <input id="groupbuy_quota_quantity" name="groupbuy_quota_quantity" type="text" class="text w30" /><em class="add-on">{$Think.lang.ds_month}</em><span></span>
- <p class="hint">{$Think.lang.purchase_unit_month}</p>
- <p class="hint">{$Think.lang.need_pay_monthly}{$Think.config.ds_config.groupbuy_price}{$Think.lang.ds_yuan}; </p>
- <p class="hint"><strong style="color: red">{$Think.lang.deduction_settlement_payment_days}</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.groupbuy_price}";
- var quantity = $("#groupbuy_quota_quantity").val();
- var price = unit_price * quantity;
- layer.confirm('{$Think.lang.need_pay_total}' + price + '{$Think.lang.ds_yuan}', {
- btn: ['{$Think.lang.ds_ok}', '{$Think.lang.ds_cancel}'],
- title: false,
- }, function () {
- ds_ajaxpost('add_form', 'url', "{:url('Sellergroupbuy/index')}");
- });
- },
- rules: {
- groupbuy_quota_quantity: {
- required: true,
- digits: true,
- min: 1
- }
- },
- messages: {
- groupbuy_quota_quantity: {
- required: "<i class='iconfont'></i>{$Think.lang.quantity_cannot_empty}",
- digits: "<i class='iconfont'></i>{$Think.lang.quantity_cannot_empty}",
- min: "<i class='iconfont'></i>{$Think.lang.quantity_cannot_empty}"
- }
- }
- });
- });
- </script>
- {/block}
|