recycle.blade.php 32 KB

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