Initial commit,修正
This commit is contained in:
Executable
+95
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @Author: fm453
|
||||
* @Date: 2018-11-23 12:17:02
|
||||
* @Last Modified by: fm453
|
||||
* @Last Modified time: 2020-12-13 10:23:44
|
||||
* @Email: fm453@lukegzs.com
|
||||
*/
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\bootstrap\ActiveForm;
|
||||
use yii\helpers\Url;
|
||||
use yii\widgets\LinkPager;
|
||||
|
||||
$this->title = '通讯簿';
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
|
||||
?>
|
||||
<div class="wrapper wrapper-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-content">
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<a class="btn btn-info btn-sm" href="<?= Url::toRoute('contact/new')?>">新增通讯名单</a>
|
||||
</div>
|
||||
<div class="col-sm-5 pull-right">
|
||||
<form action="<?=Url::current(['pid' => Yii::$app->session->get('pid')], false);?>" method="post">
|
||||
<input type="hidden" name="_csrf-backend" value="<?= Yii::$app->getRequest()->getCsrfToken();?>" />
|
||||
<div class="input-group">
|
||||
<input class="input-sm form-control" type="text" placeholder="姓名或手机号" name="search[title]" value="<?=$search['title']?>">
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-sm btn-primary"> 搜索</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>单位</th>
|
||||
<th>姓名</th>
|
||||
<th>手机</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php foreach($contactors as $vo):?>
|
||||
<tr>
|
||||
<td><?=$vo['id']?></td>
|
||||
<td><?=$vo['company']?></td>
|
||||
<td><?=$vo['name']?></td>
|
||||
<td><?=$vo['mobile']?></td>
|
||||
<td>
|
||||
<?php if($vo['status_code']==1){?>
|
||||
<a class="btn btn-info btn-xs" href="<?=Url::toRoute(['contact/ajax','id'=>$vo['id'],'do'=>'out'])?>" mini="ajax"><?=$status[$vo['status_code']]?></a>
|
||||
<?php }elseif($vo['status_code']==0){?>
|
||||
<a class="btn btn-default btn-xs" href="<?=Url::toRoute(['contact/ajax','id'=>$vo['id'],'do'=>'in'])?>" mini="ajax"><?=$status[$vo['status_code']]?></a>
|
||||
<?php }else{?>
|
||||
<button class="btn btn-success btn-xs"><?=$status[$vo['status_code']]?></button>
|
||||
<?php }?>
|
||||
</td>
|
||||
<td>
|
||||
<a class="btn btn-primary btn-xs" href="<?=Url::toRoute(['contact/edit','id'=>$vo['id']])?>"><i class="fa fa-edit"></i>编辑</a>
|
||||
<a title="点击将删除" href="<?=Url::toRoute(['contact/delete','id'=>$vo['id']])?>" class="btn btn-xs btn-danger" mini="act"><i class="fa fa-trash bigger-120"></i>删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<!--分页-->
|
||||
<div class="f-r">
|
||||
<?= LinkPager::widget([
|
||||
'pagination'=>$pager,
|
||||
'firstPageLabel' => '首页',
|
||||
'nextPageLabel' => '下一页',
|
||||
'prevPageLabel' => '上一页',
|
||||
'lastPageLabel' => '末页',
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Executable
+92
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
use yii\helpers\Html;
|
||||
use yii\helpers\Url;
|
||||
?>
|
||||
|
||||
<div class="wrapper wrapper-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>通讯录管理</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="alert alert-info">
|
||||
此处录入通讯信息
|
||||
</div>
|
||||
<form class="form-horizontal m-t" method="post" action="<?=Url::toRoute('contact/save')?>" role="form">
|
||||
<input type="hidden" name="_csrf-backend" value="<?=Yii::$app->getRequest()->getCsrfToken();?>" />
|
||||
<input type="hidden" name="id" value="<?=isset($detail['id'])?$detail['id']:0;?>">
|
||||
|
||||
<div class="form-group draggable">
|
||||
<label class="col-sm-1 control-label"><span class="red">*</span> 姓名:</label>
|
||||
<div class="col-sm-2">
|
||||
<input class="form-control" type="text" name="name" value="<?=isset($detail['name'])?$detail['name']:'';?>" placeholder="请输入姓名" autocomplete="off">
|
||||
</div>
|
||||
|
||||
<label class="col-sm-1 control-label"><span class="red">*</span> 手机号:</label>
|
||||
<div class="col-sm-2">
|
||||
<input class="form-control" type="text" name="mobile" value="<?=isset($detail['mobile'])?$detail['mobile']:'';?>" placeholder="请输入手机号码" autocomplete="off">
|
||||
</div>
|
||||
|
||||
<label class="col-sm-1 control-label"> 身份证号:</label>
|
||||
<div class="col-sm-3">
|
||||
<input class="form-control" type="text" name="idcard" value="<?=isset($detail['idcard'])?$detail['idcard']:'';?>" placeholder="请输入身份证号码" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group draggable">
|
||||
<label class="col-sm-1 control-label"> 所在单位:</label>
|
||||
<div class="col-sm-3">
|
||||
<input class="form-control" type="text" name="company" value="<?=isset($detail['company'])?$detail['company']:'';?>" placeholder="请输入单位名称" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group draggable">
|
||||
<label class="col-sm-1 control-label">是否显示:
|
||||
</label>
|
||||
|
||||
<div class="col-sm-9">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" <?=(isset($detail['status_code'])&&$detail['status_code']==1)?'checked':'';?> value="1" id="status_code1" name="status_code">是</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" <?=((!isset($detail['status_code']))||isset($detail['status_code'])&&$detail['status_code']==0)?'checked':'';?> value="0" id="status_code2" name="status_code">否</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group draggable">
|
||||
<label class="col-sm-1 control-label">是否删除:
|
||||
</label>
|
||||
|
||||
<div class="col-sm-9">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" <?=(isset($detail['deleted'])&&$detail['deleted']==1)?'checked':'';?> value="1" id="deleted1" name="deleted">是</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" <?=((!isset($detail['deleted']))||isset($detail['deleted'])&&$detail['deleted']==0)?'checked':'';?> value="0" id="deleted2" name="deleted">否</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hr-line-dashed"></div>
|
||||
<div class="form-group draggable">
|
||||
<div class="col-sm-12 col-sm-offset-3">
|
||||
<button class="btn btn-primary" type="submit">保存</button>
|
||||
<button class="btn btn-white" type="reset">清空</button>
|
||||
<a class="btn btn-white" href="<?=Yii::$app->request->referrer?>">取消并返回</a>
|
||||
<a class="btn btn-info" href="<?=Url::toRoute('contact/list')?>">全部名单</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Executable
+84
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @Author: fm453
|
||||
* @Date: 2018-11-23 12:17:02
|
||||
* @Last Modified by: fm453
|
||||
* @Last Modified time: 2020-12-13 10:24:49
|
||||
* @Email: fm453@lukegzs.com
|
||||
*/
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\bootstrap\ActiveForm;
|
||||
use yii\helpers\Url;
|
||||
use yii\widgets\LinkPager;
|
||||
|
||||
$this->title = '通讯簿';
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
|
||||
?>
|
||||
<div class="wrapper wrapper-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-content">
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<a class="btn btn-info btn-sm" href="<?= Url::toRoute('contact/new')?>">新增通讯名单</a>
|
||||
</div>
|
||||
<div class="col-sm-5 pull-right">
|
||||
<form action="<?=Url::current(['pid' => Yii::$app->session->get('pid')], false);?>" method="post">
|
||||
<input type="hidden" name="_csrf-backend" value="<?= Yii::$app->getRequest()->getCsrfToken();?>" />
|
||||
<div class="input-group">
|
||||
<input class="input-sm form-control" type="text" placeholder="姓名或手机号" name="search[title]" value="<?=$search['title']?>">
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-sm btn-primary"> 搜索</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>单位</th>
|
||||
<th>姓名</th>
|
||||
<th>手机</th>
|
||||
<th><a class="btn btn-primary btn-xs" onclick="parent.selectContactor('','','','','<?=$callback?>');">全选</a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php foreach($contactors as $vo):?>
|
||||
<tr>
|
||||
<td><?=$vo['id']?></td>
|
||||
<td><?=$vo['company']?></td>
|
||||
<td><?=$vo['name']?></td>
|
||||
<td><?=$vo['mobile']?></td>
|
||||
<td>
|
||||
<a class="btn btn-primary btn-xs" onclick="parent.selectContactor('<?=$vo['company']?>','<?=$vo['name']?>','<?=$vo['mobile']?>','<?=$vo['idcard']?>','<?=$vo['id']?>','<?=$callback?>');">选择</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<!--分页-->
|
||||
<div class="f-r">
|
||||
<?= LinkPager::widget([
|
||||
'pagination'=>$pager,
|
||||
'firstPageLabel' => '首页',
|
||||
'nextPageLabel' => '下一页',
|
||||
'prevPageLabel' => '上一页',
|
||||
'lastPageLabel' => '末页',
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user