Showing
2 changed files
with
51 additions
and
0 deletions
application/admin/controller/Customer.php
0 → 100644
| 1 | +<?php | ||
| 2 | +namespace app\admin\controller; | ||
| 3 | +use think\Db; | ||
| 4 | +use think\facade\Request; | ||
| 5 | +class Customer extends Common | ||
| 6 | +{ | ||
| 7 | + /********************************报表导出*******************************/ | ||
| 8 | + /** | ||
| 9 | + * 报表导出 | ||
| 10 | + */ | ||
| 11 | + public function index(){ | ||
| 12 | + $this->assign ( 'title','报表下载'); | ||
| 13 | + return $this->fetch(); | ||
| 14 | + } | ||
| 15 | +} |
application/admin/view/customer/index.html
0 → 100644
| 1 | +{include file="common/head"/} | ||
| 2 | +<div class="admin-main layui-anim layui-anim-upbit"> | ||
| 3 | + <fieldset class="layui-elem-field layui-field-title"> | ||
| 4 | + <legend>{:$title}</legend> | ||
| 5 | + </fieldset> | ||
| 6 | + <div class="demoTable"> | ||
| 7 | + <div class="layui-inline"> | ||
| 8 | + <label class="layui-form-label">选择日期</label> | ||
| 9 | + <div class="layui-input-inline"> | ||
| 10 | + <input type="text" class="layui-input" name="time" id="time" placeholder="请选择导出日期"> | ||
| 11 | + </div> | ||
| 12 | + </div> | ||
| 13 | + <button class="layui-btn" id='sub' lay-filter="sub">导出</button> | ||
| 14 | + </div> | ||
| 15 | +</div> | ||
| 16 | +{include file="common/foot"/} | ||
| 17 | +<script> | ||
| 18 | + layui.use(['table','form','laydate'], function() { | ||
| 19 | + var table = layui.table,laydate = layui.laydate,$ = layui.jquery; | ||
| 20 | + var ins22 = laydate.render({ | ||
| 21 | + elem: '#time' | ||
| 22 | + ,min: '2019-05-15' | ||
| 23 | + ,max: 'date' | ||
| 24 | + ,ready: function(){ | ||
| 25 | + //ins22.hint('日期可选值设定在 <br> 2019-05-15 到 当天日期'); | ||
| 26 | + } | ||
| 27 | + }); | ||
| 28 | + | ||
| 29 | + $('#sub').on('click', function() { | ||
| 30 | + if($('#time').val()) | ||
| 31 | + window.open('http://xt04.colorcun.com/index.php?service=App.Report.StatementStatisticsTask&date_time='+$('#time').val()); | ||
| 32 | + else | ||
| 33 | + window.open('http://xt04.colorcun.com/index.php?service=App.Report.StatementStatisticsTask&token='); | ||
| 34 | + }); | ||
| 35 | + }) | ||
| 36 | +</script> |
-
Please register or login to post a comment