recycle.blade.php 33 KB

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