人人商城

index.html 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. {template '_header'}
  2. <form id="dataform" {ifp 'sale.deduct'}action="" method="post"{/if} class="form-horizontal form-validate">
  3. <div class='page-heading'>
  4. <h2>抵扣设置</h2></div>
  5. <div class="panel panel-default" >
  6. <div class="panel-body">
  7. <div class="col-sm-9 col-xs-12">
  8. <h4>积分抵扣</h4>
  9. <span> 开启积分抵扣, 商品最多抵扣的数目需要在商品【营销设置】中单独设置</span>
  10. </div>
  11. <div class="col-sm-2 pull-right" style="padding-top:10px;text-align: right" >
  12. {ifp 'sale.deduct'}
  13. <input type="checkbox" class="js-switch" name="data[creditdeduct]" value="1" {if $data['creditdeduct']==1}checked{/if} />
  14. {else}
  15. {if $data['creditdeduct']==1}
  16. <span class='text-success'>开启</span>
  17. {else}
  18. <span class='text-default'>关闭</span>
  19. {/if}
  20. {/if}
  21. </div>
  22. </div>
  23. <div class="form-group" id='creditdeduct' {if empty($data['creditdeduct'])}style="display:none"{/if}>
  24. <label class="col-sm-2 control-label">积分抵扣比例</label>
  25. <div class="col-sm-5">
  26. {ifp 'sale.deduct'}
  27. <div class='input-group'>
  28. <input type="hidden" name="data[credit]" value="1" class="form-control" />
  29. <span class='input-group-addon'>1个积分 抵扣</span>
  30. <input type="text" name="data[money]" value="{$data['money']}" class="form-control" />
  31. <span class='input-group-addon'>元</span>
  32. </div>
  33. <span class='help-block'>积分抵扣比例设置</span>
  34. {else}
  35. <div class='form-control-static'>{$data['credit']}积分 抵扣 {$data['money']} 元</div>
  36. {/if}
  37. </div>
  38. </div>
  39. </div>
  40. <div class="panel panel-default" >
  41. <div class="panel-body">
  42. <div class="col-sm-10 col-xs-12">
  43. <h4>余额抵扣</h4>
  44. <span>会员可以用余额+在线支付方式支付订单,商品最多抵扣的数目需要在商品【营销设置】中单独设置</span>
  45. </div>
  46. <div class="col-sm-2 pull-right" style="padding-top:10px;text-align: right" >
  47. {ifp 'sale.deduct'}
  48. <input type="checkbox" class="js-switch" name="data[moneydeduct]" value="1" {if $data['moneydeduct']==1}checked{/if} />
  49. {else}
  50. {if $data['moneydeduct']==1}
  51. <span class='text-success'>开启</span>
  52. {else}
  53. <span class='text-default'>关闭</span>
  54. {/if}
  55. {/if}
  56. </div>
  57. </div>
  58. <div class="form-group" id='moneydeduct' {if empty($data['moneydeduct'])}style="display:none"{/if}>
  59. <label class="col-sm-2 control-label">可以抵扣运费</label>
  60. <div class="col-sm-9 col-xs-12">
  61. {ifp 'sale.deduct'}
  62. <label class="radio-inline">
  63. <input type="radio" name="data[dispatchnodeduct]" value='0' {if $data['dispatchnodeduct']==0}checked{/if} /> 可以
  64. </label>
  65. <label class="radio-inline">
  66. <input type="radio" name="data[dispatchnodeduct]" value='1' {if $data['dispatchnodeduct']==1}checked{/if} /> 不可以
  67. </label>
  68. <span class='help-block'>会员使用余额抵扣时,能不能抵扣运费</span>
  69. {else}
  70. <div class='form-control-static'>{if $data['dispatchnodeduct']==1}不可以{else}可以{/if}</div>
  71. {/if}
  72. </div>
  73. </div>
  74. </div>
  75. {ifp 'sale.deduct'}
  76. <div class="form-group"></div>
  77. <div class="form-group">
  78. <div class="col-sm-12">
  79. <input type="submit" value="保存设置" class="btn btn-primary"/>
  80. </div>
  81. </div>
  82. {/if}
  83. </form>
  84. <script language="javascript">
  85. $(function () {
  86. $(":checkbox[name='data[creditdeduct]']").click(function () {
  87. if ($(this).prop('checked')) {
  88. $("#creditdeduct").show();
  89. }
  90. else {
  91. $("#creditdeduct").hide();
  92. }
  93. })
  94. $(":checkbox[name='data[moneydeduct]']").click(function () {
  95. if ($(this).prop('checked')) {
  96. $("#moneydeduct").show();
  97. }
  98. else {
  99. $("#moneydeduct").hide();
  100. }
  101. })
  102. })
  103. </script>
  104. {template '_footer'}