人人商城

enoughfree.html 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. {template '_header'}
  2. <div class='page-heading'><h2>满额包邮设置</h2></div>
  3. <form id="dataform" {ifp 'sale.enoughfree'}action="" method="post"{/if} class="form-horizontal form-validate">
  4. <div class="panel panel-default" >
  5. <div class="panel-body">
  6. <div class="col-sm-9 col-xs-12">
  7. <h4>满额包邮</h4>
  8. <span> 开启满包邮, 订单总金额超过多少可以包邮</span>
  9. </div>
  10. <div class="col-sm-2 pull-right" style="padding-top:10px;text-align: right" >
  11. {ifp 'sale.enoughfree'}
  12. <input type="checkbox" class="js-switch" name="data[enoughfree]" value="1" {if $data['enoughfree']==1}checked{/if} />
  13. {else}
  14. {if $data['enoughfree']==1}
  15. <span class='text-success'>开启</span>
  16. {else}
  17. <span class='text-default'>关闭</span>
  18. {/if}
  19. {/if}
  20. </div>
  21. </div>
  22. <div id='enoughfree' {if empty($data['enoughfree'])}style="display:none"{/if}>
  23. <div class="form-group">
  24. <label class="col-sm-2 control-label">单笔订单满</label>
  25. <div class="col-sm-9 col-xs-12">
  26. {ifp 'sale.enoughfree'}
  27. <div class='input-group'>
  28. <input type="text" name="data[enoughorder]" value="{$data['enoughorder']}" class="form-control" />
  29. <span class='input-group-addon'>元</span>
  30. </div>
  31. <span class='help-block'>如果开启满额包邮,设置0为全场包邮</span>
  32. {else}
  33. <div class='form-control-static'>{if empty($data['enoughmoney'])}全场包邮{else}订单金额满{$data['enoughmoney']}元包邮{/if}</div>
  34. {/if}
  35. </div>
  36. </div>
  37. <div class="form-group">
  38. <label class="col-sm-2 control-label">不参加的地区</label>
  39. <div class="col-sm-9 col-xs-12">
  40. {ifp 'sale.enoughfree'}
  41. <div id="areas" class="form-control-static">{$data['enoughareas']}</div>
  42. <a href="javascript:;" class="btn btn-default" onclick="selectAreas()">选择地区</a>
  43. <input type="hidden" id='selectedareas' name="data[enoughareas]" value="{$data['enoughareas']}" />
  44. <input type="hidden" id='selectedareas_code' name="data[enoughareas_code]" value="{$data['enoughareas_code']}" />
  45. {else}
  46. <div class='form-control-static'>{$data['enoughareas']}</div>
  47. {/if}
  48. </div>
  49. </div>
  50. <div class="form-group">
  51. <label class="col-sm-2 control-label">不参与包邮的商品</label>
  52. <div class="col-sm-9">
  53. <div class="form-group" style="height: auto; display: block;">
  54. <div class="col-sm-12 col-xs-12">
  55. {ifp 'sale.enoughfree'}
  56. <?php echo tpl_selector('goodsids',array('preview'=>true,'readonly'=>true, 'multi'=>1,'url'=>webUrl('goods/query'),'items'=>$goods,'buttontext'=>'选择商品','placeholder'=>'请选择商品'))?>
  57. {else}
  58. <div class="input-group multi-img-details container ui-sortable">
  59. {loop $goods $item}
  60. <div data-name="goodsid" data-id="{$item['id']}" class="multi-item">
  61. <img src="{php echo tomedia($item['thumb'])}" class="img-responsive img-thumbnail">
  62. <div class="img-nickname">{$item['title']}</div>
  63. </div>
  64. {/loop}
  65. </div>
  66. {/if}
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. {ifp 'sale.enoughfree'}
  74. <div class="form-group"></div>
  75. <div class="form-group">
  76. <div class="col-sm-9 col-xs-12">
  77. <input type="submit" value="保存设置" class="btn btn-primary"/>
  78. </div>
  79. </div>
  80. {/if}
  81. </form>
  82. <script language='javascript'>
  83. $(function () {
  84. $(":checkbox[name='data[enoughfree]']").click(function () {
  85. if ($(this).prop('checked')) {
  86. $("#enoughfree").show();
  87. }
  88. else {
  89. $("#enoughfree").hide();
  90. }
  91. })
  92. })
  93. </script>
  94. {if empty($new_area)}
  95. {template 'shop/selectareas'}
  96. {else}
  97. {template 'shop/selectareasNew'}
  98. {/if}
  99. {template '_footer'}