analyze.blade.php 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. @extends('layouts.app')
  2. @section('title')退货管理@endsection
  3. @section('content')
  4. <div id="nav2">
  5. @component('rejected.menu')@endcomponent
  6. @component('rejected.search.menu')@endcomponent
  7. </div>
  8. <div class="container-fluid" id="list">
  9. <div id="form_div"></div>
  10. <span class="dropdown m-1">
  11. <button
  12. class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget"
  13. :class="[rejectedBills_checkBoxes.length>0?'btn-dark text-light':'']"
  14. data-toggle="dropdown" title="导出所有页将会以搜索条件得到的过滤结果,将其全部记录(每一页)导出">
  15. 导出Excel
  16. </button>
  17. <div class="dropdown-menu">
  18. <a class="dropdown-item" @click="exportExcel(false)"
  19. href="javascript:">导出勾选内容</a>
  20. <a class="dropdown-item" @click="exportExcel(true)"
  21. href="javascript:">导出所有页</a>
  22. </div>
  23. </span>
  24. <input type="checkbox" class="form-control-sm tooltipTarget d-none" title="全选"
  25. id="checkSelectingAll" @click="checkBoxAllToggle" v-model="checkBoxAll" value="1">
  26. <table class="table table-striped table-sm table-bordered table-hover d-none" id="headerRoll"></table>
  27. <table class="table table-striped table-sm table-bordered table-hover" style="background: #fff;" id="headerParent">
  28. <tr id="header"></tr>
  29. <tr v-for="(rejectedBill,index) in rejectedBills " :data-id="rejectedBill.id">
  30. <td>
  31. <input type="checkbox" v-model="rejectedBills_checkBoxes" :value="rejectedBill.id_owner">
  32. </td>
  33. <td class="text-muted" style="opacity:0.7">
  34. @{{ index+1 }}
  35. </td>
  36. <td>
  37. @{{ rejectedBill.owner_name }}
  38. </td>
  39. <td class="text-muted">
  40. @{{ rejectedBill.bounce_amount }}
  41. </td>
  42. <td class="text-success font-weight-bold">
  43. @{{ rejectedBill.check_amount }}
  44. </td>
  45. <td>
  46. @{{ rejectedBill.bounce_amount-rejectedBill.check_amount }}
  47. </td>
  48. <td class="text-success font-weight-bold">
  49. @{{ rejectedBill.in_storage_count }}
  50. </td>
  51. <td>
  52. @{{ rejectedBill.not_in_storage_count }}
  53. </td>
  54. </tr>
  55. </table>
  56. </div>
  57. @endsection
  58. @section('lastScript')
  59. <script src="{{asset('js/queryForm/export200813b.js')}}"></script>
  60. <script src="{{asset('js/queryForm/queryForm200803a.js')}}"></script>
  61. <script type="text/javascript" src="{{asset('js/queryForm/header200814.js')}}"></script>
  62. <script>
  63. new Vue({
  64. el:"#list",
  65. data:{
  66. rejectedBills : {!! $rejectedBills !!},
  67. checkBoxAll:[],
  68. sum : '{{count($rejectedBills)}}',
  69. rejectedBills_checkBoxes:[],
  70. owners:[
  71. @foreach($owners as $owner)
  72. {name:'{{$owner->id}}',value:'{{$owner->name}}'},
  73. @endforeach
  74. ],
  75. },
  76. mounted:function(){
  77. $(".tooltipTarget").tooltip({'trigger':'hover'});
  78. $('#list').removeClass('d-none');
  79. let data=[
  80. [
  81. {name:'created_at_start',type:'dateTime',tip:'选择显示指定日期的起始时间'},
  82. {name:'owner_id',type:'select_multiple_select',tip:['输入关键词快速定位下拉列表,回车确定','选择要显示的客户'],
  83. placeholder:['货主','定位或多选货主'],data:this.owners},
  84. ],[
  85. {name:'created_at_end',type:'dateTime',tip:'选择显示指定日期的结束时间'},
  86. ]
  87. ];
  88. this.form=new query({
  89. el:"#form_div",
  90. condition:data,
  91. isPaginations:false,
  92. });
  93. this.form.init();
  94. let header = new Header({
  95. el: "#header",
  96. column: [
  97. {name:'checkSelectingAll',customization:true,dom:$('#checkSelectingAll').removeClass('d-none'), neglect: true},
  98. {name:'index',value: '序号', neglect: true},
  99. {name:'owner_name',value: '货主', neglect: true},
  100. {name:'bounce_amount',value: '退件数', neglect: true, class:'text-muted'},
  101. {name:'check_amount',value: '审核数', neglect: true, class:'text-success font-weight-bold'},
  102. {name:'bounce_amount_check_amount',value: '未审核数', neglect: true},
  103. {name:'in_storage_count',value: '入库数', neglect: true, class:'text-success font-weight-bold'},
  104. {name:'not_in_storage_count',value: '未入库数', neglect: true},
  105. ],
  106. data: this.rejectedBills,
  107. restorationColumn: 'id',
  108. fixedTop:($('#form_div').height())+2,
  109. offset:0.5,
  110. });
  111. header.init();
  112. },
  113. methods:{
  114. checkBoxAllToggle:function(e){
  115. let _this=this;
  116. if(_this.rejectedBills_checkBoxes.length>=this.rejectedBills.length){
  117. _this.rejectedBills_checkBoxes=[];
  118. _this.checkBoxAll=[];
  119. }
  120. else{
  121. _this.rejectedBills_checkBoxes=[];
  122. this.rejectedBills.forEach(function(bill){
  123. _this.rejectedBills_checkBoxes.push(bill.id_owner);
  124. _this.checkBoxAll=[1];
  125. });
  126. }
  127. },
  128. exportExcel:function(checkAllSign){
  129. let url = '{{url('rejected/exportAnalyze')}}';
  130. let token='{{ csrf_token() }}';
  131. excelExport(checkAllSign,this.rejectedBills_checkBoxes,url,this.sum,token);
  132. },
  133. },
  134. });
  135. </script>
  136. @endsection