recycle.blade.php 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  1. @extends('layouts.app')
  2. @section('title')回收站-退货管理@endsection
  3. @section('content')
  4. <div id="nav2">
  5. @component('rejected.menu')@endcomponent
  6. </div>
  7. <div class="container-fluid">
  8. <div class="card" style="min-width: 2000px;">
  9. <div class="card-body d-none" id="list">
  10. @if(Session::has('successTip'))
  11. <div class="alert alert-success h1">{{Session::get('successTip')}}</div>
  12. @endif
  13. <div class="card">
  14. <div class="card-body">
  15. <div class="row">
  16. <div class="col-12">
  17. <div class="row">
  18. <div class="col" v-if="isBeingFilterConditions">
  19. <label for="">
  20. <a :href="'{{url('rejected').'?paginate='}}'+filterParams.paginate"><span class="btn btn-warning text-dark">清除筛选</span></a>
  21. </label>
  22. </div>
  23. <table class="table mb-n3 table-sm table-bordered">
  24. <tr>
  25. <td>
  26. <span class="text-muted">每页显示记录:</span>
  27. </td>
  28. <td colspan="9">
  29. <select name="" id="setPaginate" class="tooltipTarget form-control-sm" style="vertical-align: middle"
  30. @change="setPaginate" v-model="filterParams.paginate">
  31. <option value="50">50条</option>
  32. <option value="100">100条</option>
  33. <option value="200">200条</option>
  34. <option value="500">500条</option>
  35. <option value="1000">1000条</option>
  36. </select>
  37. </td>
  38. <td width="80%"></td>
  39. </tr>
  40. {{-- <tr>--}}
  41. {{-- <td class="text-muted">按条件筛选:</td>--}}
  42. {{-- <td colspan="2">--}}
  43. {{-- <label for="">时间:</label>--}}
  44. {{-- <input type="date" name="created_at_start" class="form-control-sm tooltipTarget" style="width:140px"--}}
  45. {{-- :class="filterParams.created_at_start?'bg-warning':''"--}}
  46. {{-- @keypress="created_at_startEntering" @change="created_at_startChange" title="选择显示指定日期的起始时间">--}}
  47. {{-- </td>--}}
  48. {{-- <td>--}}
  49. {{-- <label for="">客户:</label>--}}
  50. {{-- <input type="text" class="form-control-sm tooltipTarget" placeholder="查找"--}}
  51. {{-- style="width:70px" @input="locateOwner" @keypress="owner_idEntering"--}}
  52. {{-- title="输入关键词快速定位下拉列表,回车确定">--}}
  53. {{-- <select name="owner_id" id="owner_id" class="form-control-sm tooltipTarget"--}}
  54. {{-- :class="filterParams.owner_id?'bg-warning':''"--}}
  55. {{-- title="选择要显示的客户" @change="owner_idChange">--}}
  56. {{-- <option value="" selected>全部客户</option>--}}
  57. {{-- <option v-for="owner in owners" :value="owner.id">@{{ owner.name }}</option>--}}
  58. {{-- </select>--}}
  59. {{-- </td>--}}
  60. {{-- <td>--}}
  61. {{-- <label for="">订单号:</label>--}}
  62. {{-- <input type="text" class="form-control-sm tooltipTarget" placeholder="搜索订单号" name="order_number"--}}
  63. {{-- :class="filterParams.order_number?'bg-warning':''"--}}
  64. {{-- @keypress="order_numberEntering" title="可在两侧增加百分号(%)进行模糊搜索">--}}
  65. {{-- </td>--}}
  66. {{-- <td>--}}
  67. {{-- <label for="">退回单号:</label>--}}
  68. {{-- <input type="text" class="form-control-sm tooltipTarget" placeholder="搜索退回单号" name="logistic_number_return"--}}
  69. {{-- :class="filterParams.logistic_number_return?'bg-warning':''"--}}
  70. {{-- @keypress="logistic_number_returnEntering" title="可在两侧增加百分号(%)进行模糊搜索">--}}
  71. {{-- </td>--}}
  72. {{-- <td>--}}
  73. {{-- <label for="">审核:</label>--}}
  74. {{-- <select name="is_checked" class="form-control-sm" @change="is_checkedChange"--}}
  75. {{-- :class="filterParams.is_checked?'bg-warning':''">--}}
  76. {{-- <option value=""></option>--}}
  77. {{-- <option value="1">已审核</option>--}}
  78. {{-- <option value="0">未审核</option>--}}
  79. {{-- </select></td>--}}
  80. {{-- <td></td>--}}
  81. {{-- <td width="16%"></td>--}}
  82. {{-- </tr>--}}
  83. {{-- <tr>--}}
  84. {{-- <td ></td>--}}
  85. {{-- <td colspan="2">--}}
  86. {{-- <label for="">&nbsp;  &nbsp;&nbsp;</label>--}}
  87. {{-- <input type="date" name="created_at_end" class="form-control-sm tooltipTarget" style="width:140px"--}}
  88. {{-- :class="filterParams.created_at_end?'bg-warning':''"--}}
  89. {{-- @keypress="created_at_endEntering" @change="created_at_endChange" title="选择显示指定日期的结束时间">--}}
  90. {{-- </td>--}}
  91. {{-- <td>--}}
  92. {{-- <label for="">商品条码:</label>--}}
  93. {{-- <input type="text" class="form-control-sm tooltipTarget" placeholder="包含该商品的退单" name="barcode_goods"--}}
  94. {{-- :class="filterParams.barcode_goods?'bg-warning':''" title="可模糊匹配右边未填完的部分,按回车提交"--}}
  95. {{-- @keypress="barcode_goodsEntering">--}}
  96. {{-- </td>--}}
  97. {{-- <td>--}}
  98. {{-- <label for="">是否正品:</label>--}}
  99. {{-- <select name="id_quality_label" id="id_quality_label" class="form-control-sm tooltipTarget"--}}
  100. {{-- :class="filterParams.id_quality_label?'bg-warning':''"--}}
  101. {{-- title="正品仅显示全部是正品的退单,但残次显示的是包含有残次的退单" @change="id_quality_labelChange">--}}
  102. {{-- <option value="" selected></option>--}}
  103. {{-- <option v-for="qualityLabel in qualityLabels" :value="qualityLabel.id">@{{ qualityLabel.name }}</option>--}}
  104. {{-- </select>--}}
  105. {{-- </td>--}}
  106. {{-- <td>--}}
  107. {{-- <label for="">寄件人手机:</label>--}}
  108. {{-- <input type="text" class="form-control-sm tooltipTarget" name="mobile_sender"--}}
  109. {{-- :class="filterParams.mobile_sender?'bg-warning':''"--}}
  110. {{-- @change="mobile_senderChange" title="输入完成敲回车提交">--}}
  111. {{-- </td>--}}
  112. {{-- <td>--}}
  113. {{-- <label for="">审核批次号:</label>--}}
  114. {{-- <input type="text" class="form-control-sm tooltipTarget" name="checked_numbers"--}}
  115. {{-- :class="filterParams.checked_numbers?'bg-warning':''"--}}
  116. {{-- @change="checked_numbersChange" title="支持右位留空的模糊搜索">--}}
  117. {{-- </td>--}}
  118. {{-- <td>--}}
  119. {{-- <label for="">是否入库:</label>--}}
  120. {{-- <select name="is_loaded" id="is_loaded" class="form-control-sm"--}}
  121. {{-- :class="filterParams.is_loaded?'bg-warning':''"--}}
  122. {{-- title="" @change="is_loadedChange">--}}
  123. {{-- <option value="" selected></option>--}}
  124. {{-- <option value="1">是</option>--}}
  125. {{-- <option value="0">否</option>--}}
  126. {{-- <option value="null">无需入库</option>--}}
  127. {{-- </select>--}}
  128. {{-- </td>--}}
  129. {{-- <td></td>--}}
  130. {{-- </tr>--}}
  131. <tr>
  132. <td>
  133. <span class="text-muted">操作选定记录:</span>
  134. </td>
  135. <td colspan="9">
  136. @can('退货管理-删除')
  137. <span class="btn btn-sm" @click="recoverSelected" style="cursor: pointer"
  138. :class="[rejectedBills_checkBoxes.length>0?'btn-danger':'btn-outline-danger']">恢复</span>
  139. @endcan
  140. </td>
  141. <td></td>
  142. </tr>
  143. </table>
  144. </div>
  145. </div>
  146. </div>
  147. </div>
  148. </div>
  149. <table class="table table-striped table-sm table-bordered table-hover">
  150. <tr>
  151. <th>
  152. <input type="checkbox" class="form-control-sm tooltipTarget" title="全选"
  153. id="checkSelectingAll" @click="checkBoxAllToggle" v-model="checkBoxAll" value="1">
  154. {{-- @can('退货管理-审核')--}}
  155. {{-- <span style="vertical-align: top;padding:5px 0 0 5px;line-height: 25px" >全选</span>--}}
  156. {{-- <button v-if="checkBoxAll" class="btn btn-outline-info btn-sm tooltipTarget"--}}
  157. {{-- @click="checkAll" title="将本页所有可见列表已勾选的标记为审核,拖动该按钮取消全选"--}}
  158. {{-- id="checkConfirmingAll" draggable="true" ondragstart="drag(event)"--}}
  159. {{-- >全审</button>--}}
  160. {{-- @endcan--}}
  161. </th>
  162. <th>是否审核</th>
  163. <th>是否完结</th>
  164. <th>是否入库</th>
  165. <th>创建时间</th>
  166. <th>客户名称</th>
  167. <th>退回单号</th>
  168. <th>退回公司</th>
  169. <th>订单号</th>
  170. <th>姓名</th>
  171. <th>手机</th>
  172. <th>原单单号</th>
  173. <th>到付费用</th>
  174. <th>商品总数</th>
  175. <th>商品条码</th>
  176. <th>商品名称</th>
  177. <th>数量</th>
  178. <th>是否正品</th>
  179. <th>批次号</th>
  180. <th>生产日期</th>
  181. <th>效期</th>
  182. <th>备注</th>
  183. <th>录入人</th>
  184. </tr>
  185. <tr v-for="(rejectedBill,i) in rejectedBills" v-if="!rejectedBill.is_hide" @click="selectTr===i+1?selectTr=0:selectTr=i+1" :class="selectTr===i+1?'focusing' : ''">
  186. <td>
  187. <input type="checkbox" v-model="rejectedBills_checkBoxes" :value="rejectedBill.id"/>
  188. </td>
  189. <td class="text-muted">
  190. <span v-if="rejectedBill.is_checked==1" class="text-success">
  191. {{-- <span class="fa fa-check-square"></span> 已审核--}}
  192. <span class="fa fa-check-square"></span> @{{ rejectedBill.checked_numbers }}
  193. </span>
  194. <span v-else class="text-muted">
  195. 未审核
  196. </span>
  197. </td>
  198. <td class="" :class="[rejectedBill.is_finished!=0?'text-success':'text-muted']">@{{rejectedBill.is_finished | yesNo}}</td>
  199. <td class="" :class="[rejectedBill.is_loaded==1?'text-success':'text-muted']">@{{rejectedBill.is_loaded | yesNoIsLoaded}}</td>
  200. <td class="text-muted">@{{rejectedBill.created_at}}</td>
  201. <td>@{{rejectedBill.owner.name}}</td>
  202. <td>@{{rejectedBill.logistic_number_return}}</td>
  203. <td class="text-muted">@{{rejectedBill.logistic.name}}</td>
  204. <td>@{{rejectedBill.order_number}}</td>
  205. <td class="text-muted">@{{rejectedBill.sender}}</td>
  206. <td class="text-muted">@{{rejectedBill.mobile_sender}}</td>
  207. <td>@{{rejectedBill.logistic_number}}</td>
  208. <td class="text-muted">@{{rejectedBill.fee_collected}}</td>
  209. <td class="text-muted">@{{rejectedBill.goods_amount}}</td>
  210. <td colspan="8">
  211. <div class="text-center" v-if="rejectedBill.detailFolding && rejectedBill.items.length>1">
  212. <a href="javascript:;" @click="rejectedBill.detailFolding=false">@{{rejectedBill.goods_amount}}件商品,点击展开明细</a></div>
  213. <table class="table table-sm" v-else>
  214. <tr v-for="item in rejectedBill.items">
  215. <td>@{{item.barcode_goods}}</td>
  216. <td>@{{item.name_goods}}</td>
  217. <td>@{{item.amount}}</td>
  218. <td class="text-muted">@{{item.quality_label}}</td>
  219. <td class="text-muted">@{{item.batch_number}}</td>
  220. <td class="text-muted">@{{item.made_at}}</td>
  221. <td class="text-muted">@{{item.validity_at}}</td>
  222. <td class="text-muted">@{{item.remark}}</td>
  223. </tr>
  224. <tr v-if="!rejectedBill.detailFolding && rejectedBill.items.length>1">
  225. <td colspan="7" class="text-center">
  226. <a href="javascript:;" @click="rejectedBill.detailFolding=true">点击收起明细</a>
  227. </td>
  228. </tr>
  229. </table>
  230. </td>
  231. <td class="text-muted">@{{rejectedBill.operator_name}}</td>
  232. </tr>
  233. </table>
  234. <div class="text-info h5 btn btn">{{$rejectedBills->count()}}/{{$total}}</div>
  235. {{$rejectedBills->appends($paginateParams)->links()}}
  236. </div>
  237. </div>
  238. </div>
  239. @endsection
  240. @section('lastScript')
  241. <script>
  242. let vueList=new Vue({
  243. el:"#list",
  244. data:{
  245. filterParams:{created_at:'',owner_id:'',order_number:'',logistic_number_return:'',mobile_sender:'',barcode_goods:'',
  246. is_checked:'',created_at_start:'',created_at_end:'',id_quality_label:'',is_loaded:'',checked_numbers:'',paginate:'50'},
  247. checkBoxAll:[],
  248. rejectedBills:[
  249. @foreach( $rejectedBills as $rejectedBill )
  250. {
  251. id:'{{$rejectedBill->id}}',is_checked:'{{$rejectedBill->is_checked}}',checked_numbers:'{{$rejectedBill->checked_numbers}}',
  252. created_at:'{{$rejectedBill->created_at->format("Y-m-d H:i")}}',owner:{!! $rejectedBill->owner !!},
  253. order_number:'{{$rejectedBill->order_number}}',sender:'{{$rejectedBill->sender}}',
  254. is_hide:false,
  255. mobile_sender:'{{$rejectedBill->mobile_sender}}',logistic_number:'{{$rejectedBill->logistic_number}}',
  256. logistic_number_return:'{{$rejectedBill->logistic_number_return}}',logistic:{!!$rejectedBill->logistic ?? "''"!!},
  257. fee_collected:'{{$rejectedBill->fee_collected}}',goods_amount:'{{$rejectedBill->goods_amount}}',
  258. is_loaded:'{{$rejectedBill->is_loaded_null}}',operator_name:'{{$rejectedBill->operator_name}}',detailFolding:true,
  259. items:{!! $rejectedBill->items !!},is_finished:'{{$rejectedBill->is_finished}}',
  260. {{--name_goods:'{{$rejectedBill->name_goods}}',--}}
  261. {{--amount:'{{$rejectedBill->amount}}',--}}
  262. {{--quality_label:{!!$rejectedBill->qualityLabel!!},--}}
  263. {{--batch_number:'{{$rejectedBill->batch_number}}',--}}
  264. {{--validity_at:'{{$rejectedBill->validity_at}}',--}}
  265. {{--remark:'{{$rejectedBill->remark}}',--}}
  266. },
  267. @endforeach
  268. ],
  269. rejectedBills_checkBoxes:[],
  270. selectTr:0
  271. },
  272. mounted:function(){
  273. $(".tooltipTarget").tooltip({'trigger':'hover'});
  274. this.initInputs();
  275. $('#list').removeClass('d-none');
  276. },
  277. methods:{
  278. filterRun:function(){
  279. let form=$("<form method='get'></form>");
  280. this.filterParams['page']='';
  281. for(let key in this.filterParams){
  282. if(this.filterParams[key]){
  283. form.append($("<input type='hidden' name='"+key+"' value='"+this.filterParams[key]+"'>"));
  284. }
  285. }
  286. $("body").append(form);
  287. form.submit();
  288. },
  289. created_at_startChange:function(e){
  290. this.filterParams.created_at_start=e.target.value;
  291. if(this.filterParams.created_at_end){
  292. this.filterRun();
  293. }
  294. },
  295. created_at_endChange:function(e){
  296. this.filterParams.created_at_end=e.target.value;
  297. if(this.filterParams.created_at_start)
  298. this.filterRun();
  299. },
  300. owner_idChange:function(e){
  301. this.filterParams.owner_id=e.target.value;
  302. this.filterRun();
  303. },
  304. is_checkedChange:function(e){
  305. this.filterParams.is_checked=e.target.value;
  306. this.filterRun();
  307. },
  308. id_quality_labelChange:function(e){
  309. this.filterParams.id_quality_label=e.target.value;
  310. this.filterRun();
  311. },
  312. is_loadedChange:function(e){
  313. this.filterParams.is_loaded=e.target.value;
  314. this.filterRun();
  315. },
  316. mobile_senderChange:function(e){
  317. this.filterParams.mobile_sender=e.target.value;
  318. this.filterRun();
  319. },
  320. checked_numbersChange:function(e){
  321. this.filterParams.checked_numbers=e.target.value;
  322. this.filterRun();
  323. },
  324. initInputs:function(){
  325. let data=this;
  326. let uriParts = location.href.split("?");
  327. if(uriParts.length>1){
  328. let params = uriParts[1].split('&');
  329. params.forEach(function(paramPair){
  330. let pair=paramPair.split('=');
  331. let key = pair[0], val = pair[1];
  332. $('input[name="'+key+'"]').val(val);
  333. $('select[name="'+key+'"]').val(val);
  334. data.filterParams[key]=val;
  335. });
  336. }
  337. },
  338. created_at_startEntering:function(e){
  339. if(e.key==='Enter'){
  340. this.created_at_startChange(e)
  341. }
  342. },
  343. created_at_endEntering:function(e){
  344. if(e.key==='Enter'){
  345. this.created_at_endChange(e)
  346. }
  347. },
  348. owner_idEntering:function(e){
  349. if(e.key==='Enter'){
  350. e.target.value=$('#owner_id').val();
  351. this.owner_idChange(e);
  352. e.target.value='';
  353. }
  354. },
  355. locateOwner:function (e) {
  356. str = e.target.value.trim()
  357. if (str==='')return ;
  358. $("#owner_id option").attr("selected",false);
  359. let selectingOption=$("#owner_id").find("option:contains("+str+")").eq(0);
  360. selectingOption.attr("selected",true);
  361. // this.filterParams.owner_id=selectingOption.val();
  362. },
  363. order_numberEntering:function(e){
  364. if(e.key==='Enter'){
  365. this.filterParams.order_number=e.target.value;
  366. this.filterRun();
  367. }
  368. },
  369. barcode_goodsEntering:function(e){
  370. if(e.key==='Enter'){
  371. this.filterParams.barcode_goods=e.target.value;
  372. this.filterRun();
  373. }
  374. },
  375. logistic_number_returnEntering:function(e){
  376. if(e.key==='Enter'){
  377. this.filterParams.logistic_number_return=e.target.value;
  378. this.filterRun();
  379. }
  380. },
  381. cancelCheckConfirmAll:function(){
  382. $('#checkConfirmingAll').tooltip('hide');
  383. setTimeout(function () {
  384. $(".tooltipTarget").tooltip({'trigger':'hover'})
  385. }, 10);
  386. this.checkBoxAll=false;
  387. this.rejectedBills.forEach(function(rejectedBill){
  388. if(rejectedBill.is_checked===-1)
  389. rejectedBill.is_checked='0';
  390. })
  391. },
  392. setIsLoaded_batch:function(e){
  393. let _this=this;
  394. if(_this.rejectedBills_checkBoxes.length===0){
  395. tempTip.show('没有勾选记录');
  396. $(e.target).val("");
  397. return;
  398. }
  399. let val=$(e.target).val();
  400. let is_loaded=0;
  401. let is_loadedLabel='否';
  402. if(val==="1"){
  403. is_loaded=1;
  404. is_loadedLabel='是';
  405. }else if(val==="null"){
  406. is_loaded='null';
  407. is_loadedLabel='无需入库';
  408. }
  409. if(!confirm("确定要标记所有勾选入库情况为'"+is_loadedLabel+"'吗")){return;}
  410. let ajaxCheckUrl='{{url("apiLocal/rejectedBill/apiSetIsLoadedAll")}}';
  411. axios.post(ajaxCheckUrl,{ids:_this.rejectedBills_checkBoxes,is_loaded:is_loaded}).then(function(response){
  412. if(response.data.success){
  413. _this.rejectedBills_checkBoxes.forEach(function(id){
  414. _this.rejectedBills.forEach(function(bill){
  415. if(bill.id===id){
  416. bill.is_loaded=is_loaded;
  417. }
  418. });
  419. });
  420. tempTip.setDuration(1000);
  421. tempTip.showSuccess('修改勾选记录的入库状态成功');
  422. }else{
  423. tempTip.setDuration(2500);
  424. tempTip.show('修改勾选记录的入库状态失败,错误:'+response.data.fail_info);
  425. }
  426. }).catch(function (e) {
  427. tempTip.setDuration(2500);
  428. tempTip.show('审核勾选内容失败,网络连接错误:'+e);
  429. });
  430. $(e.target).val("")
  431. },
  432. checkBoxAllToggle:function(e){
  433. let _this=this;
  434. if(_this.rejectedBills_checkBoxes.length>=this.rejectedBills.length){
  435. _this.rejectedBills_checkBoxes=[];
  436. _this.checkBoxAll=[];
  437. }
  438. else{
  439. _this.rejectedBills_checkBoxes=[];
  440. this.rejectedBills.forEach(function(bill){
  441. _this.rejectedBills_checkBoxes.push(bill.id);
  442. _this.checkBoxAll=[1];
  443. });
  444. }
  445. },
  446. recoverSelected:function(){
  447. let _this=this;
  448. if(_this.rejectedBills_checkBoxes.length===0){
  449. tempTip.show('没有勾选记录');
  450. return
  451. }
  452. if(!confirm("确定要恢复所有勾选内容为'未删除'吗")){return;}
  453. let ajaxUrl='{{url("apiLocal/rejected/recoverSelected")}}';
  454. axios.post(ajaxUrl,{ids:_this.rejectedBills_checkBoxes}).then(function(response){
  455. if(response.data.success){
  456. response.data.rejecteds.forEach(function (rejected) {
  457. _this.rejectedBills.forEach(function(rejectedBill){
  458. if(parseInt(rejectedBill.id)===parseInt(rejected.id)){
  459. rejectedBill.is_hide=true;
  460. }
  461. });
  462. });
  463. tempTip.setDuration(1000);
  464. tempTip.showSuccess('恢复勾选内容成功');
  465. }else{
  466. tempTip.setDuration(2500);
  467. tempTip.show('恢复勾选内容失败,错误:'+response.data.fail_info);
  468. }
  469. }).catch(function (e) {
  470. tempTip.setDuration(2500);
  471. tempTip.show('恢复勾选内容失败,网络连接错误:'+e);
  472. })
  473. },
  474. exportExcel:function(e){
  475. let _this=this;
  476. let val=$(e.target).val();
  477. $(e.target).val("");
  478. let form;
  479. if(val==="1"){
  480. if(_this.rejectedBills_checkBoxes.length===0){
  481. tempTip.show('没有勾选记录');
  482. return;
  483. }
  484. form=$('<form action=\"{{url("rejected/exportExcel")}}\" method="post" target="_blank"></form>');
  485. form.append('<input type="hidden" name="ids" value=\''+JSON.stringify(_this.rejectedBills_checkBoxes)+'\'/>');
  486. }
  487. if(val==="2"){
  488. if(!confirm("确定要导出当前条件下全部页的结果吗?")){return;}
  489. form=$('<form action=\"{{url("rejected/exportExcelOnFilterParams")}}\" method="post" target="_blank"></form>');
  490. form.append('<input type="hidden" name="filterParams" value=\''+JSON.stringify(_this.filterParams)+'\'/>');
  491. }
  492. form.append('@csrf');
  493. $('#list').append(form);
  494. form.submit();
  495. tempTip.setDuration(5000);
  496. tempTip.showSuccess("导出成功,如无结果则是被浏览器拦截新窗口,请尝试再次请求,或关闭浏览器对当前页面的弹出窗口拦截")
  497. },
  498. setPaginate:function(e){
  499. let _this=this;
  500. // let val=$(e.target).val();
  501. this.filterParams.paginate=e.target.value;
  502. this.filterRun();
  503. },
  504. },
  505. computed:{
  506. isBeingFilterConditions:function(){
  507. for(let key in this.filterParams){
  508. if(this.filterParams[key]){
  509. if(key==='paginate')continue;
  510. return true
  511. }
  512. }
  513. return false;
  514. }
  515. },
  516. filters:{
  517. yesNo:function (val) {
  518. if(!val||val===0||val==='0'){return '否'}
  519. return '是'
  520. },
  521. yesNoIsLoaded:function (val) {
  522. if(!val||val===0||val==='0'){return '否'}
  523. if(val==='null'){return '无需入库'}
  524. return '是'
  525. }
  526. }
  527. });
  528. </script>
  529. @endsection