<?php
/*!
* 查询短信发送记录
* @author LYT <lyt@hainatravel.com>
* @date   2018-10-08
*/
?>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Day Tour SMS Log - Trippest</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1.0, user-scalable=no" name="viewport">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta name="referrer" content="always">
    <link href="http://www.mycht.cn/css/webht/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
    <style type="text/css" media="screen and (max-width:767px)">
    .pay_form .form-group{padding-left: 0!important;padding-right: 0!important;}
    .pay_form .result_info{padding-top: 5px!important;}
    </style>
    <style type="text/css">
    li{list-style: none;}
    p{margin-bottom: 8.5px;}
    a{text-decoration: none;}
    .text_padding {padding: 10px ;}
    .btn_margin {margin-top: 5px;}
    .navbar-header h1{display: inline-block;margin-left: 30px;margin-right: 30px;}
    .pageTitle{margin-left: 300px;}
    .pageTitle h1{color: #fff;border:none;font-size: 30px;}
    .mobileTitle h1{color: #fff;border:none;font-size: 20px;}
    .pay_form{padding: 30px 15px 15px 15px ;box-shadow: 0 0 10px #999;background: #fff;border-radius: 5px; }
    .pay_form .form-group{padding-left: 50px;padding-right: 50px;}
    .pay_form .control-label{text-align: left;}
    .pay_form .result_info{padding-top: 25px;}
    .pay_form .btn-danger{background: #a31022;}
    .pay_footer{padding: 30px 0 10px;font-size: 12px;}
    .line{border-bottom: 1px solid #cacaca;margin-left: 20px!important;margin-right: 20px!important;}
    .btn{text-decoration: none;font-size: 14px;}
    .mail_list {margin: 0;padding: 8px 15px;border-bottom: 1px solid #ccc;overflow: hidden;    }
    /*.input-group{border: 1px solid #ccc;}*/
    .input-group-btn{border: 1px solid #ccc;padding: 5px;}
    .search-btn{cursor: pointer; background: url(//data.chinahighlights.com/css/images/global/site-search-button.png) no-repeat center center;}
    .export_form_area{display: inline-block;padding: 6px;border: 1px solid #ccc;background-color: #ccc;}
    #modal_set_gai .btn{color: #333;font-weight: 700;}
    /*flatpickr:begin*/
    .flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08);}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible;}.flatpickr-calendar.open{display:inline-block;z-index:99999;}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown 300ms cubic-bezier(0.23,1,0.32,1);animation:fpFadeInDown 300ms cubic-bezier(0.23,1,0.32,1);}.flatpickr-calendar.inline{display:block;position:relative;top:2px;}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px);}.flatpickr-calendar.static.open{z-index:999;display:block;}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none !important;box-shadow:none !important;}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0;}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0;}.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6;}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto;}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:'';height:0;width:0;left:22px;}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.rightMost:after{left:auto;right:22px;}.flatpickr-calendar:before{border-width:5px;margin:0 -5px;}.flatpickr-calendar:after{border-width:4px;margin:0 -4px;}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%;}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6;}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff;}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%;}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6;}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff;}.flatpickr-calendar:focus{outline:0;}.flatpickr-wrapper{position:relative;display:inline-block;}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);height:28px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;margin-bottom:5px;}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{text-decoration:none;cursor:pointer;position:absolute;top:0px;line-height:16px;height:28px;padding:10px;z-index:3;}.flatpickr-months .flatpickr-prev-month.disabled,.flatpickr-months .flatpickr-next-month.disabled{display:none;}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative;}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:0;}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:0;}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:#959ea9;}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#f64747;}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px;}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill 0.1s;transition:fill 0.1s;fill:inherit;}.numInputWrapper{position:relative;height:auto;}.numInputWrapper input,.numInputWrapper span{display:inline-block;}.numInputWrapper input{width:100%;}.numInputWrapper input::-ms-clear{display:none;}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,0.15);-webkit-box-sizing:border-box;box-sizing:border-box;}.numInputWrapper span:hover{background:rgba(0,0,0,0.1);}.numInputWrapper span:active{background:rgba(0,0,0,0.2);}.numInputWrapper span:after{display:block;content:"";position:absolute;}.numInputWrapper span.arrowUp{top:-2px;left:50px;}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,0.6);top:26%;}.numInputWrapper span.arrowDown{top:10px;left:50px;}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,0.6);top:40%;}.numInputWrapper span svg{width:inherit;height:auto;}.numInputWrapper span svg path{fill:rgba(0,0,0,0.5);}.numInputWrapper:hover{cursor:pointer;}.numInputWrapper:hover span{opacity:1;}.flatpickr-current-month{font-size:17px;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:6.16px 0 0 0;line-height:1;height:28px;display:inline-block;text-align:center;-webkit-transform:translate3d(0px,0px,0px);transform:translate3d(0px,0px,0px);}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:0.5ch;padding:0;font-size:19px;color:#a31022;}.flatpickr-current-month span.cur-month:hover{cursor:pointer;}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block;}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,0.9);}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,0.9);}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 0.5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;font-size:18px;}.flatpickr-current-month input.cur-year:focus{outline:0;}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,0.5);background:transparent;pointer-events:none;}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px;}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;}span.flatpickr-weekday{cursor:default;font-size:16px;background:transparent;color:rgba(0,0,0,0.54);line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;}.dayContainer,.flatpickr-weeks{padding:1px 0 0 0;}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px;}.flatpickr-days:focus{outline:0;}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0px,0px,0px);transform:translate3d(0px,0px,0px);opacity:1;}.dayContainer + .dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6;}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#a31022;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;font-size:16px;}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6;}.flatpickr-day.today{border-color:#959ea9;}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff;}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7;}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px;}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0;}.flatpickr-day.selected.startRange + .endRange,.flatpickr-day.startRange.startRange + .endRange,.flatpickr-day.endRange.startRange + .endRange{-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7;}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px;}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;}.flatpickr-day.disabled,.flatpickr-day.disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:#848080;background:transparent;border-color:transparent;cursor:default;}.flatpickr-day.disabled,.flatpickr-day.disabled:hover{cursor:not-allowed;color:#d0d0d0;}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;}.flatpickr-day.hidden{visibility:hidden;}.rangeMode .flatpickr-day{margin-top:1px;}.flatpickr-weekwrapper{display:inline-block;float:left;}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6;}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px;}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:#9a9a9a;background:transparent;cursor:default;border:none;}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box;}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}.flatpickr-time:after{content:"";display:table;clear:both;}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left;}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#4f4f4f;}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#4f4f4f;}.flatpickr-time.hasSeconds .numInputWrapper{width:26%;}.flatpickr-time.time24hr .numInputWrapper{width:49%;}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;cursor:pointer;color:#4f4f4f;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;}.flatpickr-time input.flatpickr-hour{font-weight:bold;}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400;}.flatpickr-time input:focus{outline:0;border:0;}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;display:inline-block;float:left;line-height:inherit;color:#4f4f4f;font-weight:bold;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400;}.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time .flatpickr-am-pm:focus{background:#f0f0f0;}.flatpickr-input[readonly]{cursor:pointer;}@-webkit-keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0);}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);}}@keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0);}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);}}
    /*flatpickr:end*/
    </style>
  </head>
  <body>
    <div id="wrapper" class="chkVisible print-none">
    <div class="navbar-header" style="float:none;border-bottom: 1px solid #ccc;">
          <a class="navbar-brand text-muted" style="height: 52px;padding-top: 7px;padding-left: 30px;" href="http://www.mycht.cn/webht.php/index/index">
              <img width="150" style="height:40px;" src="/css/nav/img/6000.png">
          </a>
          <h1>SMS Log</h1>
          <ul class="nav navbar-nav navbar-right pull-right" style="margin:7.5px 0;">
            <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><?php $userdata=$this->session->userdata('admin_chtcdn'); echo $userdata['OPI_Name']; ?> <span class="caret"></span></a>
              <ul class="dropdown-menu" role="menu">
                <li><a href="<?php echo site_url('login/logout'); ?>">退出</a></li>
              </ul>
            </li>
          </ul>
        </div>
    </div>
    <div id="content">
      <div class="container-fluid marginTop">
        <div class="row">
          <!-- left -->
          <div class="col-md-5 col-xs-24 print-none">
            <div class="row">
                <form method="post" id="search_list" action="/webht.php/apps/trippestOrderSync/send_operation/sms_log">
                    <div class="input-group">
                        <input type="text" name="order_id" value="<?php echo isset($order_id) ? $order_id : ''; ?>" class="form-control" placeholder="订单号" style="height: 33px;-webkit-box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);border-bottom:1px solid #ddd;">
                        <span class="input-group-addon search-btn" onclick="$('#search_list').submit();"></span>
                    </div>
                    <div id="datepicker" style="/*width: 100px;*/height: 30px;padding: 5px;">出团日期:</div>
                </form>
            </div>
            <p class="btn-lg"></p>
          </div>
          <!-- end left -->
          <div class=" pay_form_div col-sm-19 col-xs-24" style="min-height:1024px;border-left:1px solid #ddd;">
              <ul class="row mail_list hidden-xs">
                  <a href="javascript:void(0);" style="cursor:default;color:#000;">
                      <li class="col-sm-1 "><strong>#</strong></li>
                      <li class="col-sm-5 "><strong>团号</strong></li>
                      <li class="col-sm-2 "><strong>项目</strong></li>
                      <li class="col-sm-6 "><strong>地接安排</strong></li>
                      <li class="col-sm-3 "><strong>短信通知</strong></li>
                      <li class="col-sm-4 print-none"><strong>操作</strong></li>
                  </a>
              </ul>
              <?php
              foreach ($list as $key => $item) {
                  ?>
                  <ul class="row mail_list">

                      <li class="col-sm-1 nopadding-L" style="overflow:hidden;word-break: break-all;height: 25px;"><?php echo ($key + 1); ?></li>
                      <li class="col-sm-5 nopadding-L" style="overflow:hidden;word-break: break-all;height: 25px;">
                      <?php echo $item->COLI_GroupCode; ?>
                      </li>

                      <li class="col-sm-2 nopadding-L" style="overflow:hidden;word-break: break-all;">
                      <?php
                        echo $item->PAG_Code;
                       ?>
                      </li>

                      <li class="col-sm-6 nopadding-L" style="overflow:hidden;word-break: break-all;" >
                        <?php echo substr($item->COLD_StartDate, 0, 10); ?> <br>
                        <?php
                            if ($item->gcod != null) {
                                $split_gcod = explode("@", $item->gcod);
                                echo $split_gcod[0] . "  " . $split_gcod[1];
                            } else if ($item->eva != null) {
                                echo str_replace("@", "  ", $item->eva);
                            }
                        ?>
                      </li>

                      <li class="col-sm-3 nopadding-L" style="overflow:hidden;word-break: break-all;">
                        <?php
                          if ($item->send_state == "1") {
                            echo "已发送"; // 查看短信内容
                          } elseif ($item->send_state == "0") {
                            echo '<a href="javascript:void(0)" onclick="show_order_sms(' . $item->COLI_SN . ');" class="text-primary">查看失败信息</a>';
                          } else {
                            echo "未发";
                          }
                        ?>
                      </li>
                      <li class="col-sm-4 nopadding-L print-none" >
                        <a href="javascript:void(0)" onclick="refresh_gcod(<?php echo $item->COLI_SN; ?>)" class="text-primary">刷新地接安排</a>
                        <?php
                          if ($item->send_state == "1") {
                          } else {
                            echo '  |  <a href="javascript:void(0)" onclick="handle_send(\'' . $item->COLI_ID . '\');" class="text-primary">重发</a>';
                          }
                        ?>

                      </li>
                  </ul>

              <?php } ?>
          </div>
          <!-- </div> -->
            <div class="pay_footer text-right print-none clear " >
              <p>©  1998 China Highlights.
                <a href="https://www.chinahighlights.com/privacy.htm" rel="nofollow">Privacy Statement</a>
              </p>
            </div>
        </div>
      </div>
    </div>
    <div id="main" class="container">
    </div>

    <!-- 查看失败信息 -->
    <div class="modal" id="modal_set_orderid" tabindex="-1" role="dialog" aria-labelledby="orderidModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="orderidModalLabel">查看短信发送记录</h4>
                </div>
                <div class="modal-body" id="modal_set_orderid_body">
                    ...
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                </div>
            </div>
        </div>
    </div>

    <div class="modal" role="dialog" id="loading">
      <img src="https://data.chinahighlights.com/pic/flight-loading.gif" class="center-block" style="margin-top: 50px;">
    </div>

  </body>
  <script src="//data.chinahighlights.com/js/min.php?f=/js/jquery-1.8.2.min.js&v=20170811" type="text/javascript"></script>
  <script type="text/javascript">
    jQuery.browser={};(function(){jQuery.browser.msie=false; jQuery.browser.version=0;if(navigator.userAgent.match(/MSIE ([0-9]+)./)){ jQuery.browser.msie=true;jQuery.browser.version=RegExp.$1;}})();
  </script>
  <script src="//data.chinahighlights.com/js/min.php?f=/public/js/bootstrap.min.js,/js/jquery.form.min.js,/js/flatpickr-4.4.4.min.js&v=20170811" type="text/javascript"></script>
  <script language="javascript">
  $(document).ready(function() {
       $("#datepicker").flatpickr({
        inline: true,
        dateFormat: "Y-m-d",
        defaultDate: "<?php echo $date; ?>",
        onChange: function (selectedDates, dateStr, instance) {
          window.location.href = '/webht.php/apps/trippestOrderSync/send_operation/sms_log?date=' + dateStr;
        }
    });
  });
  function show_order_sms(coli_sn) {
    $.ajax({
        type: "get",
        dataType: "json",
        url: "/webht.php/apps/trippestOrderSync/send_operation/order_sms_list/" + coli_sn,
        beforeSend: function () {
          $('#loading').modal('show');
        },
        success: function(data, textStatus) {
            $('#modal_set_orderid_body').html(data);
            $('#modal_set_orderid').modal('show');
        },
        error: function(msg) {
            alert('\u53d1\u751f\u9519\u8bef\uff0c\u8bf7\u8054\u7cfbYOYO...');
        }
    }).done(function () {
        $('#loading').modal('hide');
    });
  }
  function refresh_gcod(coli_sn) {
    $.ajax({
        type: "get",
        // dataType: "json",
        url: "http://www.mycht.cn/webht.php/apps/trippestOrderSync/TulanduoApi/insert_HT_order_operation/" + coli_sn,
        beforeSend: function () {
          $('#loading').modal('show');
        },
        success: function(data) {
            alert(data);
        },
        error: function(msg) {
            alert('\u53d1\u751f\u9519\u8bef\uff0c\u8bf7\u8054\u7cfbYOYO...');
        }
    }).done(function () {
        $('#loading').modal('hide');
    });
  }
  function handle_send(coli_sn) {
    $.ajax({
        type: "get",
        // dataType: "json",
        url: "/webht.php/apps/trippestOrderSync/send_operation/daytour/" + coli_sn,
        beforeSend: function () {
          $('#loading').modal('show');
        },
        success: function(data) {
            alert(data);
        },
        error: function(msg) {
            alert('\u53d1\u751f\u9519\u8bef\uff0c\u8bf7\u8054\u7cfbYOYO...');
        }
    }).done(function () {
        $('#loading').modal('hide');
    });
  }
  </script>
</html>
