master
ELF 4 years ago
parent fa9d330603
commit d30ef409fc

@ -98,17 +98,20 @@
.normal-table tbody tr:nth-child(even) {
background: #f5f8fa;
}
.normal-table tbody td {
text-align: center;
}
.normal-btn {
cursor: pointer;
border: none;
border-radius: 3px;
margin-bottom: 20px;
display: block;
float: left;
margin-bottom: 10px;
display: inline-block;
text-align: center;
line-height: 35px;
width: 100px;
background: #3E96C9;
padding: 0px 10px;
color: #fff;
background-image: -moz-linear-gradient(top, #449ACB 0%,#3C95C8 50%, #3591C6 100%);
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#449ACB),color-stop(50%,#3C95C8), color-stop(100%,#3591C6));
@ -117,6 +120,14 @@
background-image: -ms-linear-gradient(top, #449ACB 0%,#3C95C8 50%,#3591C6 100%);
background-image: linear-gradient(to bottom, #449ACB 0%,#3C95C8 50%,#3591C6 100%);
}
.normal-table .normal-btn {
line-height: 25px;
margin-bottom: 0px;
}
.layer-box .tabcon1711 input~.notice-text {
width: auto;
}
</style>
<!-- 标签页导航 -->
@ -295,7 +306,7 @@
</table>
</div>
<div id="tab2" class="tab-pane in tab2 ">
<div id="tab2" class="tab-pane tab2 ">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
@ -443,15 +454,16 @@
</tbody>
</table>
</div>
<div id="tab3" class="tab-pane in tab3 ">
<div id="tab3" class="tab-pane tab3 ">
<div>
<button class="normal-btn" type="button">新增会长</button>
<button id="edit-promote-btn" class="normal-btn" type="button">新增会长</button>
</div>
<div class="table">
<table class="normal-table">
<table id="promote-table" class="normal-table">
<thead>
<tr>
<th>会长账号</th>
<th>账号状态</th>
<th>真实姓名</th>
<th>手机号码</th>
<th>邮箱</th>
@ -460,8 +472,8 @@
</tr>
</thead>
<tbody>
<tr>
<td colspan="6" style="text-align: center;">暂无会长</td>
<tr class="no-record">
<td colspan="7" style="text-align: center;">暂无会长</td>
</tr>
</tbody>
</table>
@ -476,7 +488,78 @@
</form>
</div>
</div>
<div id="promote-box" class="layer-box" style="display: none;">
<div class="table-wrapper tabcon1711">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>推广员账号:</td>
<td class="r">
<input type="text" class="txt" name="account" value="" placeholder="输入推广员账号" onKeyUp="value=value.replace(/[^\w\.\/]/ig,'')">
<span class="notice-text">通过推广员后台注册申请或者管理后台创建的账号</span>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>登录密码:</td>
<td class="r">
<input style="float:left" type="text" class="txt time" name="password" value="" placeholder="输入登录密码">
<span class="notice-text">密码长度必须大于6位</span>
</td>
</tr>
<tr>
<td class="l">账号状态:</td>
<td class="r table_radio">
<span class="form_radio table_btn" style="width: 215px;">
<label >
<input type="radio" value="1" name="status" checked="checked"> 开启
</label >
<label >
<input type="radio" value="2" name="status" > 锁定
</label>
</span>
<span class="notice-text">锁定状态下,推广员账号则无法登录</span>
</td>
</tr>
<tr>
<td class="l">真实姓名:</td>
<td class="r">
<input type="text" class="txt" name="realname" value="" placeholder=" 输入推广员负责人姓名">
</td>
</tr>
<tr>
<td class="l">手机号:</td>
<td class="r">
<input type="text" class="txt" name="mobile" value="" placeholder="输入推广员负责人手机号">
</td>
</tr>
<td class="l">邮箱:</td>
<td class="r">
<input type="text" class="txt" name="email" value="" placeholder="输入推广员邮箱">
</td>
</tr>
<tr>
<td class="l">充值信息查看权限:</td>
<td class="r table_radio">
<span class="form_radio table_btn" style="width: 215px;">
<label >
<input type="radio" value="1" name="can_view_recharge" checked="checked"> 开启
</label >
<label >
<input type="radio" value="0" name="can_view_recharge"> 锁定
</label>
</span>
</td>
</tr>
<tr>
<td class="l"></td>
<td class="r table_radio">
<button id="confirm-promote" class="submit_btn" type="button" style="margin-top: 0px; margin-left: 0px;">保存</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<script type="text/html" id="doctpl">
@ -537,8 +620,6 @@
}
  });
$('#contact_begin').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
@ -827,5 +908,46 @@
})
}
}
$('#edit-promote-btn').on({
click: function () {
layer.open({
title: '编辑会长',
type: 1,
content: $('#promote-box'),
area: ['800px', '460px'],
zIndex: 250,
})
}
})
$('#confirm-promote').on({
click: function () {
var box = $('#promote-box')
var promote = {
account: box.find('input[name=account]').val(),
password: box.find('input[name=password]').val(),
status: box.find('input[name=status]:checked').val(),
real_name: box.find('input[name=realname]').val(),
mobile_phone: box.find('input[name=mobile]').val(),
email: box.find('input[name=email]').val(),
can_view_recharge: box.find('input[name=can_view_recharge]:checked').val(),
}
var statusText = promote.status == 1 ? '开启' : '锁定'
var canViewRecharge = promote.can_view_recharge == 1 ? '允许' : '禁止'
console.log(promote)
$('#promote-table').find('.no-record').remove()
var html = '<tr><td>' + promote.account + '</td>'
+ '<td>' + statusText + '</td>'
+ '<td>' + promote.real_name + '</td>'
+ '<td>' + promote.mobile_phone + '</td>'
+ '<td>' + promote.email + '</td>'
+ '<td>' + canViewRecharge + '</td>'
+ '<td><button class="normal-btn">删除</button></td>'
+ '</tr>'
console.log(html)
$('#promote-table').children('tbody').append(html)
layer.closeAll()
}
})
</script>
</block>

Loading…
Cancel
Save