analyze.blade.php 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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. <table class="table table-striped table-sm table-bordered table-hover" style="background: #fff;">
  25. <tr>
  26. <th>
  27. <input type="checkbox" class="form-control-sm tooltipTarget" title="全选"
  28. id="checkSelectingAll" @click="checkBoxAllToggle" v-model="checkBoxAll" value="1">
  29. </th>
  30. <th>序号</th>
  31. <th>货主</th>
  32. <th class="text-muted">退件数</th>
  33. <th class="text-success font-weight-bold">审核数</th>
  34. <th>未审核数</th>
  35. <th class="text-success font-weight-bold">入库数</th>
  36. <th>未入库数</th>
  37. </tr>
  38. <tr v-for="(rejectedBill,index) in rejectedBills " :data-id="rejectedBill.id">
  39. <td>
  40. <input type="checkbox" v-model="rejectedBills_checkBoxes" :value="rejectedBill.id_owner">
  41. </td>
  42. <td class="text-muted" style="opacity:0.7">
  43. @{{ index+1 }}
  44. </td>
  45. <td>
  46. @{{ rejectedBill.owner_name }}
  47. </td>
  48. <td class="text-muted">
  49. @{{ rejectedBill.bounce_amount }}
  50. </td>
  51. <td class="text-success font-weight-bold">
  52. @{{ rejectedBill.check_amount }}
  53. </td>
  54. <td>
  55. @{{ rejectedBill.bounce_amount-rejectedBill.check_amount }}
  56. </td>
  57. <td class="text-success font-weight-bold">
  58. @{{ rejectedBill.in_storage_count }}
  59. </td>
  60. <td>
  61. @{{ rejectedBill.not_in_storage_count }}
  62. </td>
  63. </tr>
  64. </table>
  65. </div>
  66. @endsection
  67. @section('lastScript')
  68. <script src="{{asset('js/queryForm/export200804.js')}}"></script>
  69. <script src="{{asset('js/queryForm/queryForm200803a.js')}}"></script>
  70. <script>
  71. new Vue({
  72. el:"#list",
  73. data:{
  74. rejectedBills : {!! $rejectedBills !!},
  75. checkBoxAll:[],
  76. sum : '{{count($rejectedBills)}}',
  77. rejectedBills_checkBoxes:[],
  78. owners:[
  79. @foreach($owners as $owner)
  80. {name:'{{$owner->id}}',value:'{{$owner->name}}'},
  81. @endforeach
  82. ],
  83. },
  84. mounted:function(){
  85. $(".tooltipTarget").tooltip({'trigger':'hover'});
  86. $('#list').removeClass('d-none');
  87. let data=[
  88. [
  89. {name:'created_at_start',type:'dateTime',tip:'选择显示指定日期的起始时间'},
  90. {name:'owner_id',type:'select_multiple_select',tip:['输入关键词快速定位下拉列表,回车确定','选择要显示的客户'],
  91. placeholder:['货主','定位或多选货主'],data:this.owners},
  92. ],[
  93. {name:'created_at_end',type:'dateTime',tip:'选择显示指定日期的结束时间'},
  94. ]
  95. ];
  96. this.form=new query({
  97. el:"#form_div",
  98. condition:data,
  99. isPaginations:false,
  100. });
  101. this.form.init();
  102. },
  103. methods:{
  104. checkBoxAllToggle:function(e){
  105. let _this=this;
  106. if(_this.rejectedBills_checkBoxes.length>=this.rejectedBills.length){
  107. _this.rejectedBills_checkBoxes=[];
  108. _this.checkBoxAll=[];
  109. }
  110. else{
  111. _this.rejectedBills_checkBoxes=[];
  112. this.rejectedBills.forEach(function(bill){
  113. _this.rejectedBills_checkBoxes.push(bill.id_owner);
  114. _this.checkBoxAll=[1];
  115. });
  116. }
  117. },
  118. exportExcel:function(checkAllSign){
  119. let url = '{{url('rejected/exportAnalyze')}}';
  120. let token='{{ csrf_token() }}';
  121. excelExport(checkAllSign,this.rejectedBills_checkBoxes,url,this.sum,token);
  122. },
  123. },
  124. });
  125. </script>
  126. @endsection