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/sub-index.php

115 lines
4.4 KiB

<?php
use \common\libs\MyLib;
?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<form id="theFrm">
<input type="hidden" name="assign_id" value="<?=$assign_info->id?>">
<tr>
<td width="20%" height="25" class="td_bg">人员名称</td>
<td width="80%" height="25" class="td_bg" colspan="2">
<?=$assign_info->user->getShowName()?>
</td>
</tr>
<tr>
<td width="20%" height="25" class="td_bg">电话</td>
<td width="80%" height="25" class="td_bg" colspan="2">
<?=$assign_info->phone?>
</td>
</tr>
<tr>
<td width="20%" height="25" class="td_bg" colspan="3">&nbsp;</td>
</tr>
<tr>
<td width="20%" height="25" class="td_bg">小号</td>
<td width="80%" height="25" class="td_bg" colspan="2">
[<a href="javascript:void(0);" onclick="add(<?= $assign_info->id ?>)">添加</a>]
</td>
</tr>
<?php foreach ($sub_items as $k=>$item):?>
<tr>
<td width="20%" height="25" class="td_bg"><?=$k+1?></td>
<td width="40%" height="25" class="td_bg">
<?=$item->phone?>&nbsp;&nbsp;[<a href="javascript:void(0);" onclick="link(<?= $item['id'] ?>,<?=$assign_info->id?>)">绑定</a>]
</td>
<td height="25" class="td_bg">
[<a href="javascript:void(0);" onclick="edit(<?= $item['id'] ?>,<?= $assign_info->id ?>)">修改</a>]
[<a href="javascript:void(0);" onclick="del(<?= $item['id'] ?>)">删除</a>]
</td>
</tr>
<?php endforeach;?>
</form>
<tr>
<td height="22" colspan="3" align="center" class="td_bg" >
<input id="back-btn" type="button" class="ACT_btn" name="Submit2" value=" 返回 ">
</td>
</tr>
</table>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script><script >
$(document).bind("ajaxSend",function(elm,xhr,s) {
var csrf_param = $('meta[name=csrf-param]').prop('content');
var csrf_token = $('meta[name=csrf-token]').prop('content');
if(s.type == "POST") {
xhr.setRequestHeader('X-CSRF-Param',csrf_param);
xhr.setRequestHeader('X-CSRF-Token',csrf_token);
}
});
</script>
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script><script >
$(document).bind("ajaxSend",function(elm,xhr,s) {
var csrf_param = $('meta[name=csrf-param]').prop('content');
var csrf_token = $('meta[name=csrf-token]').prop('content');
if(s.type == "POST") {
xhr.setRequestHeader('X-CSRF-Param',csrf_param);
xhr.setRequestHeader('X-CSRF-Token',csrf_token);
}
});
</script>
<link rel="stylesheet" href="../Myfile/css/font.css?v=20190611">
<link rel="stylesheet" href="../Myfile/css/xadmin.css?v=20190605">
<link rel="stylesheet" href="../Myfile/css/theme274.min.css?v=20190605">
<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script src="../Myfile/lib/layui/layui.js?v=20190611" charset="utf-8"></script>
<script type="text/javascript" src="../Myfile/js/xadmin.js?v=20190612"></script><script type="text/javascript" language="javascript">
$(function () {
//返回按钮
$('#back-btn').click(function(){
window.location.href='/phone-center/assign-phone';
});
})
function edit(id,assign_id) {
window.location.href = '/phone-center/sub-edit?id=' + id + '&assign_id=' + assign_id;
}
function del(id,assign_id) {
if(confirm('是否确认删除?')) {
$.post('/phone-center/sub-delete',{id:id},function(obj){
if(obj.success) {
window.location.reload();
} else {
alert(obj.msg);
}
},'json');
}
}
function add(id) {
window.location.href = '/phone-center/sub-edit?assign_id=' + id;
}
function link(id,assign_id) {
$.get('/phone/ax-init',{id:id,assign_id:assign_id},function(obj){
alert(obj.msg);
},'json');
}
</script>