123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557 |
- <style type="text/css">
- *{margin:0;padding:0;list-style: none;font-style: normal;font-weight: normal;color: #333;font-family: "Microsoft YaHei"}
- input{outline: none;}
- .fl{float: left;}
- .fr{float: right;}
- .clearfix:after{content: '';display: block;visibility: hidden;height: 0;clear: both;}
- form{padding-left: 20px;}
- .steps-choose h3{font-size: 20px;line-height: 40px;font-size: 16px; border-bottom: 1px solid #ccc;}
- .steps-choose table{margin-left: 75px;}
- .steps-choose .table-hide{margin-top: 20px; width: 80%;font-size: 14px;display: none;}
- .steps-choose.show .table-hide{display: table;}
- .steps-choose table em{margin-right:5px;color: #f00;}
- .steps-choose table th{text-align: right;width:15%;height: 30px;}
- .steps-choose .student-counts{/*height: 300px;*//*border-collapse:collapse;*/}
- .student-counts thead{background-color: #f5f5f5;}
- .student-counts td,.student-counts th{height: 40px; text-align: center!important;border-collapse:collapse;}
- .step-two div{margin-right:60px;line-height: 26px; text-align: left;}
- .student-counts div{margin-left: 30px;}
- .step-three span{color:#2e6dad; }
- .student-counts .pay-time{height: 50px;background: #ddd;}
- .hot{color: #f40;font-size: 18px;}
- .payment img{max-height: 400px;}
- .pt10{padding-top: 10px}
- .font16{font-size: 16px !important;font-weight:bold}
- .font14{font-size: 14px !important;font-weight:bold}
- .addLine td{border: 1px solid #ccc;padding:10px 0px;}
- .d-state{width: 100%;border:1px solid #009900;margin:10px 0px;padding:15px 10px;background: #e6fef6}
- .d-state-no{color: red}
- .d-state-yes{color: #009900}
- .d-state-stay{color: #ff9900}
- .divisionLine{border-top:1px solid #e4e4e4;width: 100%;margin:10px 0px;}
- /*.stepBar{position: relative;margin: 100px auto; width: 1000px;}*/
- .stepBar ol{width: 1200px;}
- .detail-stepbar li{width: 210px;text-align: center;line-height: 34px;}
- .step-no{height: 34px;background: url(/images/bar.png) no-repeat 50% -102px;}
- .step-first .step-no{background-position: 50% -34px;}
- .step-last .step-no{background-position: 50% -136px;}
- .step-done .step-no{background-position: 50% -170px;}
- .step-first .step-done .step-no{background-position: 50% -204px;}
- .step-last .step-done .step-no{background-position: 50% -68px;}
- .create-orders{margin-top:30px;padding-left: 5%;}
- .create-orders input{padding:5px 10px;border:2px solid #2e6dad;color:#fff;background:#2e6dad;border-radius: 5px;}
- .create-orders .cancel-btn{margin-right:10px; color:#333;background:#fff;}
- input[readonly].datainp{background-color: #fff!important;color: #333;}
-
- .steps-choose.show .table-hide{display: table!important;}
- .notGo.notGo-status{padding:0;box-shadow: none;}
- .ml75{margin-left: 75px!important; border:0!important;margin-top:10px!important;}
- .hotred{color: #f40;}
- *{
- margin: 0;
- padding: 0;
- }
- .list-con{
- background: #E5FFF7;
- border: 1px solid #009966;
- width: 1000px;
- margin-left: 100px;
- /*margin: 10px auto;*/
- }
- .list-top{
- border-bottom: 1px solid #009966;
- line-height: 44px;
- text-indent: 20px;
- }
- .back-status{
- color: #FD9933;
- margin-right: 100px;
- }
- .list-detail{
- padding: 10px;
- line-height: 40px;
- }
- .list-detail ul li{
- display: inline-block;
- list-style: none;
- margin-left: 20px;
- width: 30%;
- }
- .red-num{
- color: #FE0000;
- display: inline-block;
- width: 80px;
- margin-right: 16px;
- }
- </style>
- <script src="/js/school.management.js"></script>
- <script type="text/javascript" src="/js/times/jedate.js"></script>
- <link rel="stylesheet" href="/css/style.css" />
- <ul class="clearfix main-content-inner-ul">
- <?php if(Yii::app()->session['coachInfo']['leader']==1){?>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("order/index");?>?type=ordinary"' class="button button_normal button_group button_arrow <?php if($ordertype=="ordinary"){echo 'button_active';} ?>" data-button="red">普通订单</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("order/index");?>?type=test"' class="button button_normal button_group button_arrow <?php if($ordertype=="test"){echo 'button_active';} ?>" data-button="red">试用订单</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("order/index");?>?type=all"' class="button button_normal button_group button_arrow <?php if($ordertype=="all"){echo 'button_active';} ?>" data-button="red">统订订单</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("order/student");?>"' class="button button_normal button_group button_arrow " data-button="red">使用学生名单</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <?php }?>
-
- </ul>
- <form action="" style="padding-right: 20px;">
- <div class="step-one steps-choose show">
- <div class="d-state">
- <div class="font14">订单状态:
- <?php
- if($order['chargeback']=="2"){
- echo "<span class='d-state-no font14'>已退订</span></div>";
- }else if($order['status']==0){
- echo "<span class='d-state-no font14' style='color:orange'>待审核</span></div>";
- }else if($order['status']==1){
- echo "<span class='d-state-no font14' style='color:green'>审核通过</span></div>";
- }else if($order['status']==2){
- echo "<span class='d-state-no font14'>审核驳回</span></div>";
- }else if($order['status']==3){
- echo "<span class='d-state-no font14'>订单取消</span></div>";
- }
- ?>
-
- <?php if($order['status']==2){ ?>
- <div class="divisionLine"></div>
- <div>*不通过原因:<?php echo $orderaudit['remark'] ?></div>
- <?php } ?>
- </div>
- <!-- <h3 class="font15">订单状态:</h3> -->
- <div style="margin:0px;" class="row">
- <div>
- <!-- PAGE CONTENT ENDS -->
- </div>
- </div>
- </div>
- <div class="step-two steps-choose show">
- <h3 class="font16">订单详情:</h3>
- <table class="table-hide">
- <tr>
- <td>订单编号:<?php echo $order->order_no?></td>
- <td>下单时间:<?php echo $order->create_time?></td>
- </tr>
- <tr>
- <td class="pt10">学校:<?php echo $order->school_name?></td>
- <?php if($order->type==1){ ?>
- <td class="pt10">所属学管:<?php echo $order->create_user?></td>
- <?php }else{ ?>
- <td class="pt10">所属家长:<?php echo $order->create_user?></td>
- <?php } ?>
- </tr>
- </table>
- <table class="student-counts addLine table-hide">
- <thead>
- <tr>
- <td>商品规格</td>
- <td>单价(元)</td>
- <?php if($ordertype!="test"){ ?>
- <td>数量</td>
- <td>订单总金额</td>
- <?php } ?>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>
- <div>商品名称:<?php echo $goods->goods_name?></div>
- <div>适用学科:<?php echo $goods->subject_names?></div>
- <?php if($goods->classify==0){ ?>
- <?php if($goods_se){ ?>
- <div><span style="float: left">适用学期:</span><span style=" float: left; width: 80%; line-height: 30px"><?php $str='';if(isset($goods_se) && !empty($goods_se)){ foreach($goods_se as $v){ $str.=$v->name.',';} echo substr($str,0,-1);}?></span></div>
- <?php } ?>
- <div style="float: left">适用年级:<?php switch($goods->grade){
- case -1 :
- echo '全年级';
- break;
- case 1:
- echo '高一';
- break;
- case 2:
- echo '高二';
- break;
- case 3:
- echo '高三';
- break;
- }?></div>
- <?php }else{ ?>
- <div><span style="float: left">有效期:</span><span style=" float: left; width: 80%; line-height: 30px"><?php echo $goods->effective_date ?>天</span></div>
- <?php } ?>
- </td>
- <td> <span class="hot"><?php echo $goods->price?></span></td>
- <?php if($ordertype!="test"){ ?>
- <td><?php echo $order->quantity?></td>
- <td><span class="hot">¥<?php echo $order->total_price?></span></td>
- <?php } ?>
- </tr>
- <?php if($ordertype!="test"){ ?>
- <?php if(!is_array($orderpay)&&$orderpay){?>
- <tr>
- <td colspan="4" class="pay-time">
- <div class="fl">付款账户:<?php echo $orderpay->pay_account?$orderpay->pay_account:"无" ?></div>
- <div class="fl">打款时间:<?php echo $orderpay->pay_time?$orderpay->pay_time:"无" ?></div>
- <div class="fr">实付款:<span class="hot">¥<?php echo $orderpay->pay_money?></span></div>
- <?php if($order->type==1&&$orderpay->pay_cert!=""){
-
- ?>
- <div class="fl"><a href="javascript:void(0);" class="dowClick">打款凭证</a></div>
- <?php } ?>
- </td>
- </tr>
- <?php }else{
- foreach($orderpay as $v){
- ?>
- <tr>
- <td colspan="4" class="pay-time">
- <div class="fl">付款账户:<?php echo $v['pay_account']?$v['pay_account']:"无" ?></div>
- <div class="fl">打款时间:<?php echo $v['pay_time']?$v['pay_time']:"无" ?></div>
- <div class="fl">状态:<?php
- if($v['status']==0){
- echo "审核中";
- }else if($v['status']==1){
- echo "审核通过";
- }else if($v['status']==2){
- echo "审核驳回";
- }else{
- echo "订单取消";
- }
- ?></div>
- <div class="fr">实付款:<span class="hot">¥<?php echo $v['pay_money']?$v['pay_money']:"无" ?></span></div>
- <?php if($order->type==1&&$v['pay_cert']!=""){
- ?>
- <div class="fl"><a href="javascript:void(0);" onclick="showcert('<?php echo Yii::app()->params['fastdfs_images_url']."/".$v['pay_cert'] ?>')">打款凭证</a></div>
- <?php } ?>
- </td>
- </tr>
- <?php }
- }?>
- <?php } ?>
- </tbody>
- </table>
- </div>
- <div class="step-two steps-choose show">
- <h3 class="font16">班级明细:</h3>
- <div class="table-hide" style="margin-top:15px;width:100%;">
- <table class="student-counts table-hide" style="margin-left: 0">
- <!--<tr>-->
- <?php
- foreach($classes as $k=>$v){ ?>
- <?php if((($k+1)%5==1)){echo "<tr>";} ?>
- <td class="<?php echo $k+1 ?>">
- <a href="<?php echo Yii::app()->createUrl('studentinfo/classstu',array("cid"=>$v['class_id'],"orderid"=>$order_id))?>"><?php echo $v['class_name'] ?>:<?php echo $v['stunum'] ?>人</a>
- </td>
- <?php if((($k+1)%5==0)){echo "</tr>";} ?>
- <?php } ?>
- <!--</tr>-->
- </table>
- <table style="margin-left:0;text-align:right;width:100%" class="table-hide">
- <tr>
- <td>统订班级:<span class="hot"><?php echo count($classes); ?></span>
- <?php if($ordertype!="test"){ ?>
- 学生数:<span class="hot"><?php echo $stutotal; ?></span>
- <?php } ?>
- </td>
- </tr>
- </table>
- <!-- <ul class="table-hide">
- <li class="clearfix mt10">
- <div class="fl mr30"></div>
-
- <div class="fl mr30"></div>
-
- </li>
- </ul> -->
- <!-- <ul class="selectedTotal">
- <li class="clearfix"><div class="fl">已选班级:10</div><div class="fl">已选学生数:500</div></li>
-
- </ul> -->
- </div>
- </div>
- <?php ///
- $k=0;
- foreach($back_order as $v){
- if($k>0){
- ?>
- <div class="step-two steps-choose">
- <h3 class="font16"><?php echo "第".(count($back_order)-$k)."次退单" ?>:</h3>
- <div class="list-con table-hide">
- <div class="list-top">
- <span class="">本次退订申请:<span class="back-status"><?php if($v['status']==0) echo "待审核";if($v['status']==1) echo "审核通过";if($v['status']==2) echo "审核不通过"; ?></span></span>
- <span class="back-times">申请退订时间:<?php echo $v['create_time'] ?></span>
- <?php
- if($v['status']==1){?>
- <span class="back-times">审核通过时间:<?php echo $v['apply_time'] ?></span>
- <?php }?>
-
- </div>
- <div class="list-detail">
- <p class="list-tit-msg">退订学生明细:</p>
- <ul>
- <?php
- $stusum=0;
- foreach($v['class'] as $cv){ ?>
- <li><a href="<?php echo Yii::app()->createUrl('studentinfo/classstu',array("cid"=>$cv['clazz_id'],"orderid"=>$v['id']))?>"><?php echo $cv['clazz_name'] ?>:<?php echo $cv['stunum'];$stusum+=$cv['stunum']; ?>人</a></li>
- <?php } ?>
- </ul>
- <div class="sum-num-detail">
- 有退订的班级:<span class="red-num"><?php echo count($v['class']) ?></span>
- 学生数:<span class="red-num"><?php echo $stusum ?></span>
- 应退款:<span class="red-num">¥<?php echo $v['total_price'] ?></span>
- 实退款:<span class="red-num">¥<?php echo $v['money'] ?></span>
- </div>
- </div>
- </div>
- </div>
- <?php }else{ ?>
- <div class="list-con">
- <div class="list-top">
- <span class="">本次退订申请:<span class="back-status"><?php if($v['status']==0) echo "待审核";if($v['status']==1) echo "审核通过";if($v['status']==2) echo "审核不通过"; ?></span></span>
- <span class="back-times">申请退订时间:<?php echo $v['create_time'] ?></span>
- <?php
- if($v['status']==1){?>
- <span class="back-times">审核通过时间:<?php echo $v['apply_time'] ?></span>
- <?php }if($v['status']==2){?>
- <span class="back-times">审核驳回时间:<?php echo $v['apply_time'] ?></span>
- <?php }?>
- </div>
- <div class="list-detail">
- <p class="list-tit-msg">退订学生明细:</p>
- <ul>
- <?php
- $stusum=0;
- foreach($v['class'] as $cv){ ?>
- <li><a href="<?php echo Yii::app()->createUrl('studentinfo/classstu',array("cid"=>$cv['clazz_id'],"orderid"=>$v['id']))?>"><?php echo $cv['clazz_name'] ?>:<?php echo $cv['stunum'];$stusum+=$cv['stunum']; ?>人</a></li>
- <?php
- }
- ?>
- </ul>
- <div class="sum-num-detail">
- 有退订的班级:<span class="red-num"><?php echo count($v['class']) ?></span>
- 学生数:<span class="red-num"><?php echo $stusum ?></span>
- 应退款:<span class="red-num">¥<?php echo $v['total_price'] ?></span>
- 实退款:<span class="red-num">¥<?php echo $v['money'] ?></span>
- </div>
- <?php if($v['status']==2){ ?>
- <input type="button" value="重新申请" onclick="location.href='<?php echo $this->createUrl("order/EditOrderBack",array("order_id"=>$v['id'],"old_order_id"=>$v['original_order_id'],"type"=>$ordertype));?>'" class="btn btn-success btn-sm ml75" style="width:90px;border-radius:0;">
- <?php } ?>
- </div>
- </div>
- <?php }
- $k++;
- }?>
- <?php if($ordertype=="test"||$goods->classify==1){ ?>
- <div class="step-two steps-choose show">
- <h3 class="font16">使用时间:</h3>
- <div class="table-hide" style="margin-top: 15px;">
- <table class="table-hide">
- <tr>
- <td>开始时间:<?php $time= explode(" ", $order->trial_begin_time);echo $time[0]; ?></td>
- <td>结束时间:
- <?php if($order->trial_end_time&&$order->status=="1"&&$order->chargeback!="2"){
- $time= explode(" ", $order->trial_end_time);echo $time[0];
- }else if($order->trial_end_time&&$order->status=="1"&&$order->chargeback=="2"){
- $time= explode(" ", $apply_time);echo $time[0];
- }
- ?>
- </td>
- </tr>
-
- <tr>
- <td class="pt10">已使用:
- <?php
- $starttime=0;
- $endtime=0;
- if($order->status=="1"){
- $starttime=$order->trial_begin_time;
- $endtime=$order->trial_end_time;
- }if($order->chargeback=="2"){
- $starttime=$order->trial_begin_time;
- $endtime=$apply_time;
- }
-
- $time=time()-strtotime($starttime);//当前时间减去开始时间
- $time1=strtotime($endtime)-strtotime($starttime);
- if(strtotime($starttime)<time()){//如果开始时间到了
- if($time1>0){
- if($time>$time1){//如果结束时间已经到了
- $hours=$time1%86400;
- if($hours/3600-floor($hours/3600)>=0.999){
- if((floor($hours/3600)+1)==24){
- echo (floor($time1/86400)+1)."天";
- }else{
- echo floor($time1/86400)."天";
- // echo (floor($hours/3600)+1)."小时";
- }
- }else{
- echo floor($time1/86400)."天";
- // echo floor($hours/3600)."小时";
- }
- }else{
- $hours=$time%86400;
- if($hours/3600-floor($hours/3600)>=0.999){
- if((floor($hours/3600)+1)==24){
- echo (floor($time/86400)+1)."天";
- }else{
- echo floor($time/86400)."天";
- // echo (floor($hours/3600)+1)."小时";
- }
- }else{
- echo floor($time/86400)."天";
- // echo floor($hours/3600)."小时";
- }
- }
- }
- }else{
- if($time1>0){
- echo '未开始';
- }
- }
- ?>
- </td>
-
- <td class="pt10">剩余使用时长:<?php
- if($order->chargeback=="2"){
- echo "0天";
- }else if($time1>0){
- if(strtotime($starttime)<time()){
- if($endtime){
- if(strtotime($endtime)>time()){
- $time=strtotime($endtime)-time();
- $hours=$time%86400;
- if($hours/3600-floor($hours/3600)>0){
- // if((floor($hours/3600)+1)==24){
- echo (floor($time/86400)+1)."天";
- // }else{
- // echo floor($time/86400)."天";
- // echo (floor($hours/3600)+1)."小时";
- // }
- }else{
- echo floor($time/86400)."天";
- // echo floor($hours/3600)."小时";
- }
- }else{
- echo "已到期";
- }
- }else{
- echo "未定";
- }
- }else{
- if($endtime){
- if(strtotime($endtime)>strtotime($starttime)){
- $time=strtotime($endtime)-strtotime($starttime);
- $hours=$time%86400;
- if($hours/3600-floor($hours/3600)>0){
- // if((floor($hours/3600)+1)==24){
- echo (floor($time/86400)+1)."天";
- // }else{
- // echo floor($time/86400)."天";
- // echo (floor($hours/3600)+1)."小时";
- // }
- }else{
- echo floor($time/86400)."天";
- // echo floor($hours/3600)."小时";
- }
- }
- }else{
- echo "未定";
- }
- }
- }
- ?></td>
- </tr>
-
- </table>
- </div>
- </div>
- <?php } ?>
- <input type="hidden" value="<?php echo $order->id?>" id="order_id">
- <input type="hidden" value="1" id="pages">
-
- <div class="step-three steps-choose">
- <h3 class="font16">操作日志:</h3>
- <table class="table-hide">
- <tbody >
- <?php foreach($log as $v){
- ?>
- <tr>
- <td colspan="2"><?php echo $v->create_time?> - <span><?php echo $v->user_name?></span><?php echo $v->info?></td>
- </tr>
- <?php
- }?>
- </tbody>
- </table>
- </div>
- <div>
- <input type="button" value="返回" class="btn btn-success btn-sm ml75" id="back" style="width:90px;border-radius:0;">
- <?php
- if($order['status']==1&&!$is_hava_back&&$ordertype!="test"&&!$is_time_over&&$ishava_stu){
- echo '<input type="button" value="申请退订" onclick="location.href=''.Yii::app()->createUrl('order/back_add',array("order_id"=>$order_id,"type"=>$ordertype)).''" class="btn btn-success btn-sm ml75 back" style="width:90px;border-radius:0;">';
- }
- ?>
- </div>
- <?php if(@$orderpay&&!is_array($orderpay)){ ?>
- <div class="ttd dn">
- <div class="s-state clearfix posirela" style="background:none;width:40%;">
- <div class="mistake_character position-r">
- <div class="shut">×</div>
- <img src="<?php echo Yii::app()->params['fastdfs_images_url']."/".$orderpay->pay_cert ?>" id="cert" style="width:100%;height:auto" />
- </div>
- </div>
- </div>
- <?php }else{ ?>
- <div class="ttd dn">
- <div class="s-state clearfix posirela" style="background:none;width:40%;">
- <div class="mistake_character position-r">
- <div class="shut">×</div>
- <img src="" id="cert" style="width:100%;height:auto" />
- </div>
- </div>
- </div>
- <?php } ?>
- </form>
- <script>
- function showcert(path){
- var tp = $(".ttd");
- $("#cert").attr("src",path);
- tp.fadeIn();
- $("body").css({height : lq+"px",overflow:"hidden"});
- }
- $(function(){
- //手风琴效果
- $('body').on('click','.steps-choose',function(){
- $(this).addClass('show').siblings('.steps-choose').removeClass('show');
- });
- $('#back').click(function(){
- location.href="<?php echo Yii::app()->createUrl('order/index',array("type"=>$ordertype))?>";
- });
- });
- </script>
|