123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282 |
- {Template header}
- <style>
- .btn {
- display: inline-block;
- padding: 6px 12px;
- margin-bottom: 0;
- font-size: 14px;
- font-weight: 400;
- line-height: 1.42857143;
- text-align: center;
- white-space: nowrap;
- vertical-align: middle;
- -ms-touch-action: manipulation;
- touch-action: manipulation;
- cursor: pointer;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- background-image: none;
- border: 1px solid transparent;
- border-radius: 4px;
- }
- .btn-success {
- color: #fff !important;
- background-color: #5cb85c !important;
- border-color: #4cae4c;
- }
- .btn-info {
- color: #fff;
- background-color: #5bc0de;
- border-color: #46b8da;
- }
- .btn-xs {
- padding: 1px 5px;
- font-size: 12px;
- line-height: 1.5;
- border-radius: 3px;
- }
- </style>
- <body>
- <div class="warp">
- <div class="fixed">
- <form >
- <ul class="search">
- <li>订单号:<input value="" name="orderinfo" type="text" ></li>
- <!-- <li>退货单:<input value="" name="back_no" type="text" ></li> -->
- <li>编号:<input value="" name="number" type="text" ></li>
- <li>
- 店铺:
- <select name="shop" class="select">
- <option value="">选择店铺</option>
- {loop $shop_list as $key=>$val}
- <option value="{$key}">{$val}</option>
- {/loop}
- </select>
- </li>
- <li>
- 状态:
- <select name="status" class="select">
- <option value="">全部</option>
- <option value="20">待审核</option>
- </select>
- </li>
- <li>
- 售后类型:
- <select name="back_status" class="select">
- <option value="">选择售后类型</option>
- {loop $back_status_list as $key=>$val}
- <option value="{$key}">{$val}</option>
- {/loop}
- </select>
- </li>
- <li>
- 登记时间:
- <input id="ktime" value="{date('Y-m-d',time()-30*24*3600)} 0:00" name="ktime" type="text" onClick="laydate({istime: true,format:'YYYY-MM-DD hh:mm'})">
- 至
- <input id="jtime" value="{date('Y-m-d',time()+24*3600)} 0:00" name="jtime" type="text" onClick="laydate({istime: true,format:'YYYY-MM-DD hh:mm'})">
- </li>
- <!-- <li>
- 原因一级分类:
- <select name="cate_one" class="select" style="width:150px;" onchange="changeCateOne(this)">
- <option value="">选择原因一级分类</option>
- {loop $cate_one_list as $key=>$val}
- <option value="{$key}">{$val}</option>
- {/loop}
- </select>
- </li>
- <li>
- 原因二级分类:
- <select name="cate_two" style="width:150px;" class="select cate_two">
- <option value="">选择原因二级分类</option>
-
- </select>
- </li> -->
- <li><span>确 定</span></li>
- </ul>
- </form>
- <div class="control">
- <!-- <a href="javascript:void(0);" class="window btn btn-success" data-h="/returngoods/add/1100000573" data-t="售后登记 - 添加">添 加</a>
- <a href="javascript:void(0);" class="check">删 除</a> -->
- <a href="javascript:void(0);" class="btn btn_warning btn-xs" onclick="excelexport()">按条件导出</a>
- </div>
- <table class="datatitle data" border="0" style="border-collapse:collapse;">
- <tr>
- <td>
- <label onClick="swapCheck()"><input name="checkbox" type="checkbox" class="regular-checkbox"></label>
- </td>
- <td>订单号</td>
- <td>店铺</td>
- <td>编号</td>
- <td>状态</td>
- <td>登记原因</td>
- <td>售后类型</td>
- <td>重发单号</td>
- <td>退款金额</td>
- <td>登记时间</td>
- <td>操作</td>
- </tr>
- </table>
- </div>
- <table class="datatext data" border="0" style="border-collapse:collapse;">
- </table>
- <div class="bomf"></div>
- </div>
- <script>
- var customon = 1;
- function custom(){
- $(".data tr").each(function() {
- $(this).find('td:eq(0)').css("width","1%");
- $(this).find('td:eq(1)').css("width","6%");
- $(this).find('td:eq(2)').css("width","5%");
- $(this).find('td:eq(3)').css("width","6%");
- $(this).find('td:eq(4)').css("width","4%");
- $(this).find('td:eq(5)').css("width","10%");
- $(this).find('td:eq(6)').css("width","5%");
- $(this).find('td:eq(7)').css("width","5%");
- $(this).find('td:eq(8)').css("width","5%");
- $(this).find('td:eq(9)').css("width","8%");
- $(this).find('td:eq(10)').css("width","15%");
- });}
- var dataurl = "/returngoods/checkdata";
- function mastercheck(that){
- let select_id = $(that).data("id");
- layx.confirm('<span style="font-size:18px">提示</span>','<b style="font-size:18px">确定此单满足审核条件?<b>',null,{
- buttons:[
- {
- label:'确定',
- callback:function(id, button, event){
-
- layx.destroy(id);
- fuzhushenhe(select_id)
- }
- },
- {
- label:'取消',
- callback:function(id, button, event){
- layx.destroy(id);
- }
- }
- ]
- });
-
- }
- //辅助审核函数
- function fuzhushenhe(id){
- $.ajax({
- url:"/returngoods/do_first_phase/"+id+"/6",
- data:{},
- type:"post",
- dataType:"json",
- success:function(a){
- layx.destroy('loadId');
- if (a && a.success) {
- $(".ts p").html(a.msg);
- $(".ts").fadeIn();
- setTimeout('searchspan(2)', 900);
- }
- if (a && !a.success) {
- $(".ts p").html(a.msg);
- $(".ts").fadeIn();
-
- }
- }
- })
- }
- function excelexport(){
- layx.load('loadId','请求中',{shadable:0.6});
- // return console.log($("form").serialize())
- let select_list = [];
- $("input[name=check]").each(function(){
- if($(this).prop('checked')){
- select_list.push($(this).val())
- }
- })
- let form_data = $("form").serialize();
- if(select_list.length > 0){
- form_data = {sid:select_list}
- }
- $.post("/returngoodsexcel/checkexcel",form_data,function(a){
- layx.destroy('loadId');
- if (a && a.success) {
- if (a.data.length > 0){
- $(".ts p").html(a.msg);
- $(".ts").fadeIn();
- const now = new Date();
- const dateString = now.toISOString().split('T')[0];
- const [year, month, day] = dateString.split('-');
- let filename = "售后登记清单"+year+month+day+".xlsx";
- explortExcel(a.data,filename)
- }else{
- $(".ts p").html("没有数据");
- $(".ts").fadeIn();
- }
- }else{
- $(".ts p").html(a.msg);
- $(".ts").fadeIn();
- }
- },'json')
- }
- function explortExcel(data,filename){
-
- let sheet = XLSX.utils.json_to_sheet(data)
- let workbook = XLSX.utils.book_new();
- sheet['!cols'] = [
- //订单号
- {
- wch:20,
- },
- //订单编码
- {
- wch:20,
- },
- //店铺名称
- {
- wch:18,
- },
- //状态
- {
- wch:15,
- },
- //登记原因
- {
- wch:25,
- },
-
- //售后类型
- {
- wch:15,
- },
- //重发单号
- {
- wch:20,
- },
- //退款金额
- {
- wch:10,
- },
-
- //登记时间
- {
- wch:21,
- }
-
-
- ];
- XLSX.utils.book_append_sheet(workbook, sheet, "Sheet1");
- XLSX.writeFile(workbook, filename);
- }
- </script>
- <script type="text/javascript" src="{$theme}js/excel/xlxs.js" ></script>
- <script type="text/javascript" src="{$theme}js/laydate.js"></script>
- {Template footer}
|