作者 sgj
1 个管道 的构建 通过 耗费 2 秒

添加积分处理基础类

<include file="public@header" />
<include file="public@header"/>
</head>
<body>
<div class="wrap">
... ... @@ -9,13 +9,16 @@
<div class="form-group">
<label for="input-user_login" class="col-sm-2 control-label"><span class="form-required">*</span>用户名</label>
<div class="col-md-6 col-sm-10">
<input type="text" class="form-control" id="input-user_login" name="user_login">
<input class="form-control valid" type="text" required="" placeholder="请选择用户" onclick="doSelectUsers();"
id="js-users-name-input" readonly="" value="" aria-required="true" aria-invalid="false">
<input class="form-control" type="hidden" name="user_id" value="" id="js-users-id-input">
</div>
</div>
<div class="form-group">
<label for="input-user_pass" class="col-sm-2 control-label"><span class="form-required">*</span>修改积分数量</label>
<label for="input-user_pass" class="col-sm-2 control-label"><span
class="form-required">*</span>修改积分数量</label>
<div class="col-md-6 col-sm-10">
<input type="text" class="form-control" id="input-user_pass" name="num" >
<input type="text" class="form-control" id="input-user_pass" name="num">
</div>
</div>
<div class="form-group">
... ... @@ -26,5 +29,27 @@
</form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script type="application/javascript">
function doSelectUsers() {
var selectedUsersId = $('#js-users-id-input').val();
openIframeLayer("{:url('Portal/Common/selectUsers')}?ids=" + selectedUsersId, '请选择分类', {
area: ['1200px', '800px'],
btn: ['确定', '取消'],
yes: function (index, layero) {
//do something
var iframeWin = window[layero.find('iframe')[0]['name']];
var selectedUsers = iframeWin.confirm();
if (selectedUsers.selectedUsersId.length == 0) {
layer.msg('请选择用户');
return;
}
$('#js-users-id-input').val(selectedUsers.selectedUsersId.join(','));
$('#js-users-name-input').val(selectedUsers.selectedUsersName.join(' '));
//console.log(layer.getFrameIndex(index));
layer.close(index); //如果设定了yes回调,需进行手工关闭
}
});
}
</script>
</body>
</html>
\ No newline at end of file
... ...