report.blade.php 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. @extends('layouts.app')
  2. @section('title')
  3. 客户管理-项目报表
  4. @endsection
  5. @section('content')
  6. @component('customer.project.menu')@endcomponent
  7. <div class="container-fluid card" id="container">
  8. <div id="form_div"></div>
  9. <div>
  10. <button type="button" class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget" :class="[checkData.length>0?'btn-dark text-light':'']"
  11. data-toggle="dropdown" title="导出所有页将会以搜索条件得到的筛选结果,将其全部记录(每一页)导出">
  12. 导出Excel
  13. </button>
  14. <div class="dropdown-menu">
  15. <a class="dropdown-item" @click="reportExport(false)" href="javascript:">导出勾选内容</a>
  16. <a class="dropdown-item" @click="reportExport(true)" href="javascript:">导出所有页</a>
  17. </div>
  18. </div>
  19. <div>
  20. <label for="all" id="cloneCheckAll" class="d-none">
  21. <input id="all" type="checkbox" @click="checkAll($event)">全选
  22. </label>
  23. <table class="d-none" id="headerRoll"></table>
  24. <table class="table table-sm table-striped table-hover" id="headerParent">
  25. <tr class="text-center">
  26. <td colspan="2"></td>
  27. <td colspan="7" class="bg-light-khaki">客户信息</td>
  28. <td colspan="4" class="bg-light-info">盘点信息</td>
  29. <td colspan="3" class="bg-light-cyanogen">账单信息</td>
  30. </tr>
  31. <tr class="text-nowrap" id="header"></tr>
  32. </table>
  33. </div>
  34. </div>
  35. @stop
  36. @section('lastScript')
  37. <script type="text/javascript" src="{{mix('js/queryForm/queryForm.js')}}"></script>
  38. <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>
  39. <script>
  40. let vue = new Vue({
  41. el:"#container",
  42. data:{
  43. reports : [],
  44. owners : [],
  45. workgroup : [],
  46. customers : [],
  47. status : [],
  48. checkData : [],
  49. },
  50. mounted(){
  51. let data=[
  52. [
  53. {name:'workgroup',type:'select',tip:'项目小组',placeholder: '项目小组',data:this.workgroup},
  54. {name:'counting_month_start',type:'dateMonth',tip:'起始结算月'},
  55. {name:'owner_id',type:'select_multiple_select',tip:['输入关键词快速定位下拉列表,回车确定','选择要显示的项目'],
  56. placeholder:['项目','定位或多选项目'],data:this.owners},
  57. ],[
  58. {name:'customer_id',type:'select',tip:'客户',placeholder: '客户',data:this.customers},
  59. {name:'counting_month_end',type:'dateMonth',tip:'结束结算月'},
  60. {name:'status',type:'select',placeholder:'状态',data:this.status},
  61. ],
  62. ];
  63. this.form = new query({
  64. el:"#form_div",
  65. condition:data,
  66. });
  67. this.form.init();
  68. let column = [
  69. {name:'cloneCheckAll',customization:true,type:'checkAll',column:'id',
  70. dom:$('#cloneCheckAll').removeClass('d-none'), neglect: true},
  71. {name:'operating',value: '操作', neglect: true},
  72. {name:'index',value: '序号', neglect: true ,class:"bg-khaki"},
  73. {name:'workgroup',value: '项目小组',class:"bg-khaki"},
  74. {name:'customer',value: '客户',class:"bg-khaki"},
  75. {name:'owner',value: '子项目',class:"bg-khaki"},
  76. {name:'status',value: '状态',class:"bg-khaki"},
  77. {name:'created_at',value: '创建日期',class:"bg-khaki"},
  78. {name:'storage_duration',value: '在库时长',class:"bg-khaki"},
  79. {name:'counting_month',value: '结算月', class:"bg-info"},
  80. {name:'daily_average_order_amount',value: '日均单量', neglect: true, class:"bg-info"},
  81. {name:'last_month_counting_area',value: '结算月上月盘点面积', neglect: true, class:"bg-info"},
  82. {name:'current_month_counting_area',value: '结算月盘点面积', neglect: true, class:"bg-info"},
  83. {name:'init_bill_amount',value: '初始账单金额', neglect: true, class:"bg-cyanogen"},
  84. {name:'confirm_bill_amount',value: '确认账单金额', neglect: true, class:"bg-cyanogen"},
  85. {name:'confirm_created_at',value: '确认日期', class:"bg-cyanogen"},
  86. ];
  87. let _this=this;
  88. setTimeout(function () {
  89. let header = new Header({
  90. el: "#header",
  91. column: column,
  92. data: _this.reports,
  93. restorationColumn: 'id',
  94. fixedTop:($('#form_div').height())+2,
  95. offset:0.5,
  96. vue:vue
  97. });
  98. header.init();
  99. },0);
  100. },
  101. methods : {
  102. reportExport(isAll){
  103. },
  104. //全选事件
  105. checkAll(e){
  106. if (e.target.checked){
  107. this.reports.forEach((el)=>{
  108. if (this.checkData.indexOf(el.id) === '-1'){
  109. this.checkData.push(el.id);
  110. }
  111. });
  112. }else {
  113. this.checkData = [];
  114. }
  115. },
  116. }
  117. });
  118. </script>
  119. @stop