index.blade.php 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. @extends('layouts.app')
  2. @section('title')客户管理-项目查询@endsection
  3. @section('content')
  4. @component('customer.project.menu')@endcomponent
  5. <div class="container-fluid" id="container">
  6. <div class="mt-1">
  7. <button type="button" class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget" :class="[checkData.length>0?'btn-dark text-light':'']"
  8. data-toggle="dropdown" title="导出所有页将会以搜索条件得到的筛选结果,将其全部记录(每一页)导出">
  9. 导出Excel
  10. </button>
  11. <div class="dropdown-menu">
  12. <a class="dropdown-item" @click="excelExport(false)" href="javascript:">导出勾选内容</a>
  13. <a class="dropdown-item" @click="excelExport(true)" href="javascript:">导出所有页</a>
  14. </div>
  15. </div>
  16. <div>
  17. <label for="all" id="cloneCheckAll" class="d-none">
  18. <input id="all" type="checkbox" @click="checkAll($event)">全选
  19. </label>
  20. <table class="d-none" id="headerRoll"></table>
  21. <table class="table table-sm text-nowrap table-striped table-hover" id="headerParent">
  22. <tr id="header"></tr>
  23. </table>
  24. </div>
  25. </div>
  26. @endsection
  27. @section('lastScript')
  28. <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>
  29. <script>
  30. let vue = new Vue({
  31. el:"#container",
  32. data:{
  33. owners : [],
  34. checkData : [],
  35. },
  36. mounted(){
  37. let column = [
  38. {name:'cloneCheckAll',customization:true,type:'checkAll',column:'id',
  39. dom:$('#cloneCheckAll').removeClass('d-none'), neglect: true},
  40. {name:'operating',value: '操作', neglect: true},
  41. {name:'customer',value: '客户'},
  42. {name:'tax_rate',value: '税率', neglect: true},
  43. {name:'name',value: '项目'},
  44. {name:'code',value: '货主代码'},
  45. {name:'contract_number',value: '合同号'},
  46. {name:'created_at',value: '创建日期'},
  47. {name:'salesman',value: '销售名称'},
  48. {name:'customer_full_name',value: '公司全称'},
  49. {name:'linkman',value: '联系人'},
  50. {name:'phone_number',value: '联系电话'},
  51. {name:'workgroup',value: '项目小组'},
  52. {name:'relating_price',value: '关联报价', neglect: true},
  53. {name:'type',value: '用仓类型'},
  54. {name:'current_month_counting_area',value: '当月结算面积', neglect: true},
  55. {name:'waring_line_on',value: '月单量预警', neglect: true},
  56. {name:'is_activating',value: '是否激活', neglect: true},
  57. {name:'description',value: '项目描述'},
  58. ];
  59. let _this=this;
  60. setTimeout(function () {
  61. let header = new Header({
  62. el: "#header",
  63. column: column,
  64. data: _this.owners,
  65. restorationColumn: 'id',
  66. fixedTop:($('#form_div').height())+2,
  67. offset:0.5,
  68. vue:vue
  69. });
  70. header.init();
  71. },0);
  72. },
  73. methods:{
  74. excelExport(isAll){
  75. },
  76. //全选事件
  77. checkAll(e){
  78. if (e.target.checked){
  79. this.owners.forEach((el)=>{
  80. if (this.checkData.indexOf(el.id) === '-1'){
  81. this.checkData.push(el.id);
  82. }
  83. });
  84. }else {
  85. this.checkData = [];
  86. }
  87. },
  88. },
  89. });
  90. </script>
  91. @endsection