123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <title>明细订单</title>
- <meta name="description" content="">
- <meta name="keywords" content="">
- <link href="/css/ims/base.css" rel="stylesheet">
- <link rel="stylesheet" type="text/css" href="/css/ims/bootstrap.min.css"/>
- <link rel="stylesheet" type="text/css" href="/css/ims/jquery.datetimepicker.css"/>
- <link rel="stylesheet" type="text/css" href="/css/ims/ace.min.css"/>
- <style>
- .ims-box {
- margin: 20px;
- }
- .screen > div {
- margin: 0 5px;
- line-height: 30px;
- }
- .yellow {
- color: #FF9900;
- }
- .screen > input {
- height: 30px;
- border-radius: 4px;
- border: 1px solid #ccc;
- box-shadow: none;
- text-indent: 10px;
- }
- .screen button {
- padding: 4px 12px;
- }
- .table-box {
- margin-top: 30px;
- }
- .btn-date_show{
- display: inline-block;width: 170px;overflow: hidden; text-overflow:ellipsis; white-space: nowrap;
- }
- .list {
- padding: 0 40px;
- /*margin-top: 40px;*/
- overflow: hidden;
- }
- .list h2 {
- line-height: 30px;
- font-size: 14px;
- }
- .list .student-list_box {
- width: 500px;
- margin-bottom: 15px;
- }
- .list .student-list_box>ul {
- height: 260px;
- overflow: auto;
- padding: 20px;
- background-color: #eef3ff;
- }
- .list .student-list_box li {
- line-height: 30px;
- cursor: pointer;
- }
- .list .student-list {
- display: none;
- margin-left: 20px;
- }
- .list .student-list li.active .btn-select_all {
- display: inline-block;
- }
- .list .student-list span {
- cursor: pointer;
- }
- .list .btn-select_all {
- margin-left: 84px;
- color: #008000;
- }
- .student-name_box li {
- position: relative;
- margin-left: 28px;
- line-height: 30px;
- }
- .student-name_box input {
- position: absolute;
- left: 155px;
- top: 8px;
- }
- </style>
- </head>
- <body>
- <div class="ims-box">
- <form action="<?php echo Yii::app()->createUrl('imsSale/detailOrder'); ?>" method="get">
- <div class="screen">
- <div class="diy_select select-goods">
- <input type="hidden" id="goodsId" name="goodsId" class="diy_select_input" value="0">
- <div class="diy_select_txt">请选择商品</div>
- <div class="diy_select_btn"></div>
- <ul class="diy_select_list" style="display: none;width:570px;">
- <li val="0">请选择商品</li>
- <?php if ($goodList): ?>
- <?php foreach ($goodList as $item): ?>
- <li val="<?php echo $item['goodsId'] ?>"><?php echo $item['goodsName'] ?></li>
- <?php endforeach; ?>
- <?php else: ?>
- <li val="0">暂无商品</li>
- <?php endif; ?>
- </ul>
- </div>
- <div class="diy_select select-package">
- <input type="hidden" id="packageId" name="packageId" class="diy_select_input" value="0">
- <div class="diy_select_txt">请选择套餐</div>
- <div class="diy_select_btn"></div>
- <ul class="diy_select_list" style="display: none;">
- </ul>
- </div>
- <div class="diy_select select-useStatus">
- <input type="hidden" id="useStatus" name="useStatus" class="diy_select_input" value="0">
- <div class="diy_select_txt">状态</div>
- <div class="diy_select_btn"></div>
- <ul class="diy_select_list" style="display: none;">
- <li val="0">状态</li>
- <li val="1">使用中</li>
- <li val="3">已过期</li>
- <li val="2">未生效</li>
- </ul>
- </div>
- <div class="diy_select select-takeStatus">
- <input type="hidden" id="takeStatus" name="takeStatus" class="diy_select_input" value="0">
- <div class="diy_select_txt">是否收货</div>
- <div class="diy_select_btn"></div>
- <ul class="diy_select_list" style="display: none;">
- <li val="0">是否收货</li>
- <li val="2">是</li>
- <li val="1">否</li>
- </ul>
- </div>
- <div class="diy_select select-payStatus">
- <input type="hidden" id="payStatus" name="payStatus" class="diy_select_input" value="0">
- <div class="diy_select_txt">是否支付</div>
- <div class="diy_select_btn"></div>
- <ul class="diy_select_list" style="display: none;">
- <li val="0">是否支付</li>
- <li val="2">是</li>
- <li val="1">否</li>
- </ul>
- </div>
- <input value="" type="text" name="studentName" id="studentName" placeholder="学生名称">
- <input value="" type="text" name="orderOfficialNo" id="orderOfficialNo" placeholder="财务订单号">
- <div class="diy_select select-orderTypes">
- <input type="hidden" id="orderTypes" name="orderTypes" class="diy_select_input" value="0">
- <div class="diy_select_txt">订单类型</div>
- <div class="diy_select_btn"></div>
- <ul class="diy_select_list" style="display: none;">
- <li val="0">订单类型</li>
- <li val="1">线上销售单</li>
- <li val="2">线下销售单</li>
- </ul>
- </div>
- <div class="diy_select select-schoolYearName">
- <input type="hidden" id="schoolYearName" name="schoolYearName" class="diy_select_input" value="0">
- <div class="diy_select_txt">请选择学年</div>
- <div class="diy_select_btn"></div>
- <ul class="diy_select_list" style="display: none;">
- <li val="0">请选择学年</li>
- <?php if ($schoolYear): ?>
- <?php foreach ($schoolYear as $val): ?>
- <li val="<?php echo $val['schoolYearId'] ?>"><?php echo $val['schoolYearName'] ?></li>
- <?php endforeach; ?>
- <?php else: ?>
- <li val="">暂无学年</li>
- <?php endif; ?>
- </ul>
- </div>
- <div class="diy_select select-semesterTypes">
- <input type="hidden" id="semesterTypes" name="semesterTypes" class="diy_select_input" value="0">
- <div class="diy_select_txt">请选择学期</div>
- <div class="diy_select_btn"></div>
- <ul class="diy_select_list" style="display: none;">
- <li val="0">请选择学期</li>
- <li val="1">上学期</li>
- <li val="2">下学期</li>
- <li val="3">跨学期</li>
- </ul>
- </div>
- <input value="" type="text" name="className" id="className" placeholder="班级">
- <br> <br>
- <input type="text" name="beginTime" class="some_class" value="<?php if(isset($_GET['beginTime'])) echo $_GET['beginTime']?>" readonly id="some_class_1" placeholder="创建开始时间"/> 到
- <input type="text" name="endTime" class="some_class" value="<?php if(isset($_GET['endTime'])) echo $_GET['endTime']?>" readonly id="some_class_2" placeholder="创建结束时间"/>
- <button type="submit" class="label-primary-s bth-s">查询</button>
- <a class="label-primary-s bth-s download-excel">导出</a>
- <a class="label-primary-s bth-s not-buy">导出未订购学生</a>
- </div>
- </form>
- <div class="table-box">
- <table id="intention-table"
- class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable"
- style="font-size:12px">
- <thead>
- <tr>
- <th>订单编号</th>
- <th>是否允许退订</th>
- <th>订单类型</th>
- <th>学年</th>
- <th>学期</th>
- <th>财务订单号</th>
- <th>商品名称</th>
- <th>套餐</th>
- <th>下单年级</th>
- <th>使用月份</th>
- <th>下单时间</th>
- <th>学生ID</th>
- <th>学生</th>
- <th>年级</th>
- <th>班级</th>
- <th>状态</th>
- <th>是否收货</th>
- <th>是否支付</th>
- </tr>
- </thead>
- <tbody>
- <?php if ($list): ?>
- <?php foreach ($list as $item): ?>
- <tr>
- <td><?php echo $item['orderNo'];?></td>
- <?php if($item['isAllowRefund']){ ?>
- <td style="color: red">否</td>
- <?php }else{ ?>
- <td style="color: #0e8e54">是</td>
- <?php } ?>
- <td><?php echo $item['orderTypeName'];?></td>
- <td><?php echo isset($item['schoolYearName'])?$item['schoolYearName']:"";?></td>
- <td><?php echo isset($item['semesterName'])?$item['semesterName']:"";?></td>
- <td><?php echo $item['orderOfficialNo'];?></td>
- <td><?php echo $item['goodsName'];?></td>
- <td><?php echo $item['goodsPackageName'];?></td>
- <td><?php echo isset($item['gradeText'])?$item['gradeText']:'';?></td>
- <td><a class="btn-date_show" href="#"><?php echo $item['useTimes'];?></a></td>
- <td><?php echo $item['createTime'];?></td>
- <td><?php echo $item['studentId'];?></td>
- <td><?php echo $item['studentName'];?></td>
- <td><?php echo isset($item['gradeText'])?$item['gradeText']:"";?></td>
- <td><?php echo isset($item['clazzName'])?$item['clazzName']:"";?></td>
- <td class="use-type" status="<?php echo $item['status'];?>"><?php echo $item['statusName'];?></td>
- <?php if ($item['isTake']):?>
- <td style="color: #0e8e54">是</td>
- <?php else:?>
- <td style="color: red">否</td>
- <?php endif;?>
- <?php if ($item['isPay']):?>
- <td style="color: #0e8e54">是</td>
- <?php else:?>
- <td style="color: red">否</td>
- <?php endif;?>
- </tr>
- <?php endforeach; ?>
- <?php endif; ?>
- </tbody>
- </table>
- <?php if ($page): ?>
- <div class="col-sm-12">
- <ul class="pagination">
- <?php
- $params = array();
- if (isset($_GET['orderNo']) && $_GET['orderNo']) {
- $params['orderNo'] = $_GET['orderNo'];
- }
- if (isset($_GET['orderOfficialNo']) && $_GET['orderOfficialNo']) {
- $params['orderOfficialNo'] = $_GET['orderOfficialNo'];
- }
- if (isset($_GET['goodsId']) && $_GET['goodsId']>0) {
- $params['goodsId'] = $_GET['goodsId'];
- }
- if (isset($_GET['packageId']) && $_GET['packageId']>0) {
- $params['packageId'] = $_GET['packageId'];
- }
- if (isset($_GET['useStatus']) && $_GET['useStatus']>0) {
- $params['useStatus'] = $_GET['useStatus'];
- }
- if (isset($_GET['payStatus']) && $_GET['payStatus']>0) {
- $params['payStatus'] = $_GET['payStatus'];
- }
- if (isset($_GET['takeStatus']) && $_GET['takeStatus']>0) {
- $params['takeStatus'] = $_GET['takeStatus'];
- }
- if (isset($_GET['studentName']) && $_GET['studentName']) {
- $params['studentName'] = $_GET['studentName'];
- }
- if (isset($_GET['page'])) {
- $params['page'] = $_GET['page'];
- }else{
- $params['page'] = 1;
- }
- if (isset($_GET['orderTypes']) && $_GET['orderTypes']) {
- $params['orderTypes'] = $_GET['orderTypes'];
- }
- if (isset($_GET['schoolYearName']) && $_GET['schoolYearName']) {
- $params['schoolYearName'] = $_GET['schoolYearName'];
- }
- if (isset($_GET['semesterTypes']) && $_GET['semesterTypes']) {
- $params['semesterTypes'] = $_GET['semesterTypes'];
- }
- if (isset($_GET['className']) && $_GET['className']) {
- $params['className'] = $_GET['className'];
- }
- if (isset($_GET['beginTime']) && $_GET['beginTime']) {
- $params['beginTime'] = $_GET['beginTime'];
- }
- if (isset($_GET['endTime']) && $_GET['endTime']) {
- $params['endTime'] = $_GET['endTime'];
- }
- echo formatPage($page, 'imsSale/detailOrder', $params)
- ?>
- </ul>
- </div>
- <?php endif; ?>
- </div>
- </div>
- <!--导出未订购学生弹窗-->
- <div class="layer-edit" style="display: none">
- <p class="red"></p>
- <div class="list">
- <div class="student-list_box fl">
- <select name="schoolYearId" class="schoolYearId">
- <option value="0">选择学年</option>
- <?php if ($schoolYear): ?>
- <?php foreach ($schoolYear as $val): ?>
- <option value="<?php echo $val['schoolYearId'] ?>"><?php echo $val['schoolYearName'] ?></option>
- <?php endforeach; ?>
- <?php else: ?>
- <option value="">暂无学年</option>
- <?php endif; ?>
- </select>
- <select name="semesterId" class="semesterId">
- <option value="0">选择学期</option>
- <option value="1">上学期</option>
- <option value="2">下学期</option>
- <option value="3">跨学期</option>
- </select>
- <select name="grade" class="grade">
- <option value="0">选择年级</option>
- <?php
- if(Yii::app()->params['grade_list']){
- foreach (Yii::app()->params['grade_list'] as $val){
- echo '<option value="'.$val['id'].'" >'.$val['grade_name'].'</option>';
- }
- }
- ?>
- </select>
- <button class="label-primary-s student_search">查询</button>
- <button class="label-primary-s bth-s export_student">导出</button>
- </div>
- <hr>
- <table class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
- <tr>
- <td>姓名</td>
- <td>编号</td>
- <td>年级</td>
- <td>班级</td>
- </tr>
- <tbody class="item_list">
- </tbody>
- </table>
- <div class="fr">
- <a href="#" class="prev">上一页</a>
- <span class="now_page">1</span>/<span class="last_page">1</span>
- <a href="#" class="next">下一页</a>
- </div>
- </div>
- </div>
- <script src="/js/productset/jquery.min.js"></script>
- <script src="/js/ims/jquery.datetimepicker.js"></script>
- <script src="/js/ims/xsgl.js"></script>
- <script src="/js/layer/layer.js"></script>
- <script>
- $(document).ready(function () {
- function useType() {
- $(".use-type").each(function (index) {
- if ($(this).attr('status') == 1) {
- $(this).addClass("yellow");
- } else if ($(this).attr('status') == 2) {
- $(this).addClass("red");
- }else {
- $(this).addClass("green");
- }
- })
- }
- useType();
- //筛选条件赋值
- <?php if(isset($_GET['goodsId']) && $_GET['goodsId']>0):?>
- var goodsId = "<?php echo $_GET['goodsId'];?>";
- $('#goodsId').val(goodsId);
- var txt = $('.select-goods li[val=' + goodsId + ']').html();
- $('.select-goods .diy_select_txt').html(txt);
- getPackage(goodsId);
- <?php endif;?>
- <?php if(isset($_GET['useStatus'])):?>
- var useStatus = "<?php echo $_GET['useStatus'];?>";
- $('#useStatus').val(useStatus);
- var txt = $('.select-useStatus li[val=' + useStatus + ']').html();
- $('.select-useStatus .diy_select_txt').html(txt);
- <?php endif;?>
- <?php if(isset($_GET['payStatus'])):?>
- var payStatus = "<?php echo $_GET['payStatus'];?>";
- $('#payStatus').val(payStatus);
- var txt = $('.select-payStatus li[val=' + payStatus + ']').html();
- $('.select-payStatus .diy_select_txt').html(txt);
- <?php endif;?>
- <?php if(isset($_GET['takeStatus'])):?>
- var takeStatus = "<?php echo $_GET['takeStatus'];?>";
- $('#takeStatus').val(takeStatus);
- var txt = $('.select-takeStatus li[val=' + takeStatus + ']').html();
- $('.select-takeStatus .diy_select_txt').html(txt);
- <?php endif;?>
- <?php if(isset($_GET['studentName'])):?>
- var txt = "<?php echo $_GET['studentName'];?>";
- $('#studentName').val(txt);
- <?php endif;?>
- <?php if(isset($_GET['orderOfficialNo'])):?>
- var txt = "<?php echo $_GET['orderOfficialNo'];?>";
- $('#orderOfficialNo').val(txt);
- <?php endif;?>
-
- <?php if(isset($_GET['orderTypes'])):?>
- var orderTypes = "<?php echo $_GET['orderTypes'];?>";
- $('#orderTypes').val(orderTypes);
- var txt = $('.select-orderTypes li[val=' + orderTypes + ']').html();
- $('.select-orderTypes .diy_select_txt').html(txt);
- <?php endif;?>
-
- <?php if(isset($_GET['semesterTypes'])):?>
- var semesterTypes = "<?php echo $_GET['semesterTypes'];?>";
- $('#semesterTypes').val(semesterTypes);
- var txt = $('.select-semesterTypes li[val=' + semesterTypes + ']').html();
- $('.select-semesterTypes .diy_select_txt').html(txt);
- <?php endif;?>
-
- <?php if(isset($_GET['schoolYearName'])):?>
- var schoolYearName = "<?php echo $_GET['schoolYearName'];?>";
- $('#schoolYearName').val(schoolYearName);
- var txt = $('.select-schoolYearName li[val=' + schoolYearName + ']').html();
- $('.select-schoolYearName .diy_select_txt').html(txt);
- <?php endif;?>
-
- <?php if(isset($_GET['className'])):?>
- var txt = "<?php echo $_GET['className'];?>";
- $('#className').val(txt);
- <?php endif;?>
- $('.some_class').datetimepicker({
- format: "Y-m-d", //格式化日期
- timepicker: false //关闭时间选项
- });
- //获取套餐
- $('.select-goods li').click(function () {
- var currentGoodsId = $(this).attr('val');
- if(currentGoodsId>0){
- getPackage(currentGoodsId);
- }else{
- $('.select-package .diy_select_txt').val("请选择套餐");
- $('#packageId').val(0);
- $('.select-package ul').html('<li val="0">请选择套餐</li>');
- }
- });
- function getPackage(goodsId) {
- if (goodsId<=0){
- var html = '<li val="0">请选择套餐</li>';
- $('.select-package ul').html(html);
- }else{
- $.ajax({
- type: 'post',
- url: "<?php echo Yii::app()->createUrl('imsSale/getPackages');?>",
- data: {goodsId: goodsId},
- dataType: 'json',
- success: function (data) {
- console.log(data);
- if (data.status) {
- var html = '<li val="0">请选择套餐</li>';
- for (var i = 0; i < data.data.length; i++) {
- var item = data.data[i];
- if (item['packageId']) {
- html += '<li val="' + item['packageId'] + '">';
- html += item['packageName'];
- html += '</li>'
- }
- }
- } else {
- var html = '<li val="0">暂无套餐</li>';
- }
- $('.select-package ul').html(html);
- <?php if(isset($_GET['packageId'])):?>
- var packageId = "<?php echo $_GET['packageId'];?>";
- $('#packageId').val(packageId);
- var txt = $('.select-package li[val=' + packageId + ']').html();
- $('.select-package .diy_select_txt').html(txt);
- <?php endif;?>
- },
- error: function () {
- return;
- }
- })
- }
- }
- $(".btn-date_show").on("click", function () {
- layer.alert($(this).text(), {
- title: '使用月份',
- area: ['420px', '240px']
- });
- });
-
- //导出excel
- $(".download-excel").on("click", function () {
- var goodsId = "<?php echo isset($_GET['goodsId'])?$_GET['goodsId']:'';?>";
- var packageId = "<?php echo isset($_GET['packageId'])?$_GET['packageId']:'';?>";
- var useStatus = "<?php echo isset($_GET['useStatus'])?$_GET['useStatus']:'';?>";
- var payStatus = "<?php echo isset($_GET['payStatus'])?$_GET['payStatus']:'';?>";
- var takeStatus = "<?php echo isset($_GET['takeStatus'])?$_GET['takeStatus']:'';?>";
- var studentName = "<?php echo isset($_GET['studentName'])?$_GET['studentName']:'';?>";
- var orderOfficialNo = "<?php echo isset($_GET['orderOfficialNo'])?$_GET['orderOfficialNo']:'';?>";
- var orderTypes = "<?php echo isset($_GET['orderTypes'])?$_GET['orderTypes']:'';?>";
- var semesterTypes = "<?php echo isset($_GET['semesterTypes'])?$_GET['semesterTypes']:'';?>";
- var schoolYearName = "<?php echo isset($_GET['schoolYearName'])?$_GET['schoolYearName']:'';?>";
- var className = "<?php echo isset($_GET['className'])?$_GET['className']:'';?>";
- var beginTime = "<?php echo isset($_GET['beginTime'])?$_GET['beginTime']:'';?>";
- var endTime = "<?php echo isset($_GET['endTime'])?$_GET['endTime']:'';?>";
-
- $.ajax({
- type: 'post',
- url: "<?php echo Yii::app()->createUrl('imsSale/detailOrderExcel');?>",
- data: {
- goodsId: goodsId,
- packageId:packageId,
- useStatus:useStatus,
- payStatus:payStatus,
- takeStatus:takeStatus,
- studentName:studentName,
- orderOfficialNo:orderOfficialNo,
- orderTypes:orderTypes,
- semesterTypes:semesterTypes,
- schoolYearName:schoolYearName,
- className:className,
- beginTime:beginTime,
- endTime:endTime
- },
- dataType: 'json',
- success: function (result) {
- if (result.status == 1) {
- window.location.href = result.data;
- } else {
- layer.msg(result.data);
- }
- },
- error: function () {
- return;
- }
- })
- });
- //导出未订购学生弹窗
- $('.not-buy').click(function(){
- layer.open({
- type: 1,
- title: '导出未订购学生',
- btn: ['关闭'],
- area: ['720px', '520px'], //宽高
- btnAlign: 'c',
- content: $('.layer-edit'),
- yes: function (index, layero) {
- layer.closeAll();
- }
- });
- });
- $('.student_search').click(function(){
- loadPM(1);
- })
- $('.prev').click(function(){
- var now_page=parseInt($('.now_page').html());
- if(now_page<=1){
- return false;
- }
- loadPM(now_page-1);
- });
- $('.next').click(function(){
- var now_page=parseInt($('.now_page').html());
- var last_page=parseInt($('.last_page').html());
- if(now_page>=last_page){
- return false;
- }
- loadPM(now_page+1);
- });
- function loadPM(page){
- var schoolYearId=$('.schoolYearId').val();
- var semesterId=$('.semesterId').val();
- var grade=$('.grade').val();
- if(schoolYearId==0){
- layer.msg('请选择学年');
- return false;
- }
- if(semesterId==0){
- layer.msg('请选择学期');
- return false;
- }
- if(grade==0){
- layer.msg('请选择年级');
- return false;
- }
- alertIndex=layer.msg('正在查询,请稍候。。。。。。',{time:0});
- $.ajax({
- url:'<?php echo $this->createUrl('imsSale/searchNoBuy')?>',
- type:'POST',
- dataType:'json',
- data:{schoolYearId:schoolYearId,semesterId:semesterId,grade:grade,page:page},
- success:function(res){
- layer.close(alertIndex);
- if(res.status==1){
- //填充数据
- var html='';
- var list=res.data.list;
- $('.prev').removeClass('hide');
- $('.next').removeClass('hide');
- for(var i=0;i<list.length;i++){
- html+='<tr>';
- html+='<td>'+list[i]['studentName']+'</td>';
- html+='<td class="itemName">'+list[i]['studentId']+'</td>';
- html+='<td class="itemType">'+list[i]['gradeName']+'</td>';
- html+='<td>'+list[i]['clazzName']+'</td>';
- html+='</tr>';
- }
- $('.item_list').html(html);
- $('.last_page').html(res.data['total_page']);
- $('.now_page').html(res.data['now_page']);
- if(res.data['now_page']==1){
- $('.prev').addClass('hide');
- }
- if(res.data['now_page']==res.data['total_page']){
- $('.next').addClass('hide');
- }
- }
- }
- })
- }
-
- $('.export_student').click(function () {
- var schoolYearId=$('.schoolYearId').val();
- var semesterId=$('.semesterId').val();
- var grade=$('.grade').val();
- if(schoolYearId==0){
- layer.msg('请选择学年');
- return false;
- }
- if(semesterId==0){
- layer.msg('请选择学期');
- return false;
- }
- if(grade==0){
- layer.msg('请选择年级');
- return false;
- }
- alertIndex=layer.msg('正在导出,请稍候。。。。。。',{time:0});
- $.ajax({
- url:'<?php echo $this->createUrl('imsSale/exportNoBuyStudent')?>',
- type:'POST',
- dataType:'json',
- data:{schoolYearId:schoolYearId,semesterId:semesterId,grade:grade},
- success:function(res){
- layer.close(alertIndex);
- if(res.status==1){
- window.location.href = res.data;
- } else {
- layer.msg(res.data);
- }
- }
- })
- })
- });
- </script>
- </body>
- </html>
|