refund.html 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <link rel="stylesheet" href="/static/bootstrap-multiselect-0.9.15/dist/css/bootstrap-multiselect.css">
  4. <div class="row">
  5. <div class="col-sm-12">
  6. <div class="ibox float-e-margins">
  7. <div class="ibox-content">
  8. <form method="post" action="{:url('refund')}" class="form-horizontal">
  9. <input type="hidden" name="id" value="{$id|default='0'}">
  10. <div class="col-sm-12">
  11. <div class="form-group">
  12. <label class="control-label">选择日期<span class="text-danger">*</span></label></br>
  13. {:widget_view('common/multiselect',['name'=>'days','lists' => $days, 'val' => []])}
  14. </div>
  15. </div>
  16. <div class="col-sm-12">
  17. <div class="form-group">
  18. <label class="control-label">退餐备注</label></br>
  19. <textarea name="remark" class="form-control" cols="30" rows="3" ></textarea>
  20. </div>
  21. </div>
  22. <div class="col-sm-12">
  23. <div class="hr-line-dashed">
  24. </div>
  25. </div>
  26. <div class="form-group">
  27. <div class="col-sm-6 col-sm-offset-2">
  28. <button class="btn btn-primary ajax-post" data-layer="1" target-form="form-horizontal" type="submit">确 定</button>
  29. </div>
  30. </div>
  31. </form>
  32. </div>
  33. </div>
  34. </div>
  35. </div>
  36. {/block}
  37. {block name="script"}
  38. <script src="/static/bootstrap-multiselect-0.9.15/dist/js/bootstrap-multiselect.js"></script>
  39. <script>
  40. $(function () {
  41. $('#types').multiselect({
  42. buttonText: function(options, select) {
  43. if (options.length === 0) {
  44. return '请选择';
  45. }
  46. else if (options.length > 2) {
  47. return '已选择'+options.length+'项';
  48. }
  49. else {
  50. var labels = [];
  51. options.each(function() {
  52. if ($(this).attr('label') !== undefined) {
  53. labels.push($(this).attr('label'));
  54. }
  55. else {
  56. labels.push($(this).html());
  57. }
  58. });
  59. return labels.join(', ') + '';
  60. }
  61. },
  62. filterPlaceholder: '搜索',
  63. includeSelectAllOption: true, // 显示全选
  64. selectAllText: '全选',
  65. maxHeight: 300,
  66. // enableClickableOptGroups: true, // 分组可选
  67. // enableCollapsibleOptGroups: true, // 分组可折叠
  68. enableFiltering: true, // 开启搜索
  69. buttonClass: 'btn btn-primary',
  70. onChange: function(option, checked) {
  71. console.log(option.length + ' options ' + (checked ? 'selected' : 'deselected'));
  72. }
  73. });
  74. })
  75. </script>
  76. {/block}