123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- <?php
- /**
- * Created by PhpStorm.
- * User: Administrator
- * Date: 2017/3/17 0017
- * Time: 上午 10:52
- */
- use yii\helpers\Url;
- use yii\widgets\LinkPager;
- ?>
- <style>
- .color{
- color: red;
- }
- </style>
- <div class="row">
- <div class="col-sm-12">
- <div class="ibox float-e-margins">
- <div class="ibox-content">
- <div class="table-responsive">
- <table class="table table-striped">
- <thead>
- <tr>
- <th>预约人</th>
- <th>类型</th>
- <th>工地名称</th>
- <th>创建时间</th>
- <th>预定时间</th>
- <th>联系电话</th>
- <!-- <th>联系名称</th>-->
- <th>备注信息</th>
- <th>状态</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <?php if(!empty($models)):?>
- <?php foreach($models as $mo):?>
- <tr class="">
- <td><?=$mo->applicant_name?></td>
- <td><?=$mo->type==1?"工地":"样板房"?></td>
- <td><?=isset($mo->building->name)?$mo->building->name:""?></td>
- <td><?=date('Y-m-d H:i:s',$mo->created_at)?></td>
- <td><?=date('Y-m-d H:i:s',$mo->booking_time)?></td>
- <td>
- <?php if($member!=\common\models\UserCompany::ISMEMBER){
- echo \common\models\Appointment::telPreg($mo->applicant_tel);
- }else{
- echo $mo->applicant_tel;
- } ?>
- </td>
- <td><?=$mo->remark?></td>
- <td><?=$mo->state==0?'未处理':'已处理'?></td>
- <td>
- <?php if($mo->state==0):?>
- <a class="btn btn-sm btn-info <?php if($member!=\common\models\UserCompany::ISMEMBER){echo "warning";}else{echo "posted"; } ?> " id="<?=$mo->id?>">处理</a>
- <?php else:?>
- <a class="btn btn-sm btn-default " >已处理</a>
- <?php endif?>
- </td>
- </tr>
- <?php endforeach;?>
- <?php endif?>
- </tbody>
- </table>
- <?= LinkPager::widget(['pagination' => $pages]); ?>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script>
- $(document).on('click','.posted',function(){
- var chat = $(this);
- var id = chat.attr('id');
- $.ajax({
- url:'<?=Url::toRoute(['building/dispose']);?>',
- type:'GET',
- dataType:'json',
- data:{id:id},
- success:function(data){
- if(data.sign==1){
- layer.msg(data.msg);
- chat.removeClass('btn-info');
- chat.removeClass('posted');
- chat.addClass('btn-default');
- chat.text('已处理');
- }else{
- layer.msg(data.msg);
- }
- }
- })
- });
- $('.warning').click(function () {
- swal({
- title: "您还不是豪省心的会员,无法查看业主联系方式,请联系平台客服400-0592-018开通会员",
- //text: "删除后将无法恢复,请谨慎操作!",
- type: "warning",
- //showCancelButton: true,
- confirmButtonColor: "#DD6B55",
- confirmButtonText: "确认",
- closeOnConfirm: false
- });
- });
- </script>
|