You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
simple-yewu/frontend/views/phone-center/edit.php

77 lines
3.1 KiB

<?php
use \common\libs\MyLib;
?>
<?php $this->beginBlock('header_css'); ?>
<?php $this->endBlock(); ?>
<div class="wrapper wrapper-content animated fadeInRight">
<div class="ibox float-e-margins">
<div class="ibox-content">
<div class="row">
<div class="col-sm-12">
<form role="form" class="form-horizontal data-from" id="theFrm">
<input type="hidden" name="id" value="<?=$info->id?>">
<div class="form-group">
<label class="col-sm-1 control-label">人员名称</label>
<div class="col-sm-6">
<select name="user_id" id="user_id" class="form-control">
<?php
echo '<option value="0">请选择</option>';
foreach($user_items as $item) {
echo '<option value="'.$item->id.'"';
if($info->user_id == $item->id)
echo ' selected ';
echo '>'.$item->getShowName().'</option>';
}
?>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-1 control-label">电话号码</label>
<div class="col-sm-6">
<input type="text" class="form-control" name="phone" id="phone" value="<?=$info->phone?>">
</div>
</div>
<div>
<div class="row">
<div class="col-sm-5 col-sm-offset-5">
<button class="btn btn-primary btn-save" type="button">
<strong>提 交</strong>
</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<?php $this->beginBlock('footer_js'); ?>
<script type="text/javascript" language="javascript">
$(function () {
//提交按钮
$(".btn-save").click(function(){
parent.layer.confirm('是否确认提交?', {
btn: ['确认','取消'], //按钮
shade: false //不显示遮罩
}, function(){
var params = $("#theFrm").serialize();
$.post('/phone-center/save',params,function(data){
parent.layer.msg(data.msg);
if(data.success) {
parent.refreshList();
layer_close();
}
},'json');
}, function(){
//
});
});
})
</script>
<?php $this->endBlock('footer_js'); ?>