106 lines
4.2 KiB
HTML
Executable File
106 lines
4.2 KiB
HTML
Executable File
{extend name="base" /}
|
||
{block name="css"}
|
||
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
|
||
{/block}
|
||
{block name="js"}
|
||
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}' type="text/javascript"></script>
|
||
<script src="__ADMIN__/staffs/staffs.js?v={$v}" type="text/javascript"></script>
|
||
{/block}
|
||
{block name="main"}
|
||
<form autocomplete='off'>
|
||
<input type='hidden' id='staffId' class='ipt' value="{$object['staffId']}"/>
|
||
<table class='wst-form wst-box-top'>
|
||
<tr>
|
||
<th width='150'>登录账号<font color='red'>*</font>:</th>
|
||
<td width='300'><input type="text" id='loginName' class='ipt' maxLength='20' data-rule="登录账号: required;" onblur='javascript:checkLoginKey(this)'/></td>
|
||
<td rowspan='5'>
|
||
<div style='border:1px solid #ccc;width:130px;height:130px;margin-bottom:5px;'>
|
||
<img id='prevwPhoto' height='130' height='130' src='__ADMIN__/img/img_mrtx_gly.png'/>
|
||
</div>
|
||
<div id='photoPicker' style='margin-left:32px;'>上传头像<span id='uploadMsg'></span></div>
|
||
<input type='hidden' id='staffPhoto' class='ipt' value=''/>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th width='120'>登录密码<font color='red'>*</font>:</th>
|
||
<td><input type="text" id='loginPwd' class='ipt' maxLength='20' data-rule="登录密码: required;"/></td>
|
||
</tr>
|
||
<tr>
|
||
<th>职员名称<font color='red'>*</font>:</th>
|
||
<td><input type="text" id='staffName' class='ipt' maxLength='20' data-rule="职员名称: required;"/></td>
|
||
</tr>
|
||
<tr>
|
||
<th>职员编号:</th>
|
||
<td><input type="text" id='staffNo' class='ipt' maxLength='20'/></td>
|
||
</tr>
|
||
<tr>
|
||
<th>角色:</th>
|
||
<td>
|
||
<select id='staffRoleId' class='ipt'>
|
||
<option value='0'>请选择</option>
|
||
{volist name="roles" id="vo"}
|
||
<option value="{$vo['roleId']}">{$vo.roleName}</option>
|
||
{/volist}
|
||
</select>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th>手机号码:</th>
|
||
<td><input type="text" id='staffPhone' class='ipt' maxLength='11' data-rule="mobile"/></td>
|
||
</tr>
|
||
<tr>
|
||
<th>微信OPENID:</th>
|
||
<td><input type="text" id='wxOpenId' class='ipt' maxLength='100'/></td>
|
||
</tr>
|
||
<tr>
|
||
<th>工作状态:</th>
|
||
<td colspan='2' class="layui-form">
|
||
<label>
|
||
<input id="workStatus1" name="workStatus" value="1" class='ipt' {if condition="$object['workStatus'] == 1"}checked{/if} type="radio" title='在职'>
|
||
</label>
|
||
<label>
|
||
<input id="workStatus0" name="workStatus" value="0" class='ipt' {if condition="$object['workStatus'] == 0"}checked{/if} type="radio" title='离职'>
|
||
</label>
|
||
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th>账号状态:</th>
|
||
<td colspan='2' class="layui-form">
|
||
<label>
|
||
<input type='radio' id='staffStatus1' class='ipt' name='staffStatus' {if condition="$object['staffStatus'] == 1"}checked{/if} value='1' title='开启'>
|
||
</label>
|
||
<label>
|
||
<input type='radio' id='staffStatus0' class='ipt' name='staffStatus' {if condition="$object['staffStatus'] == 0"}checked{/if} value='0' title='停用'>
|
||
</label>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan='3' align='center' class='wst-bottombar'>
|
||
<button type="button" onclick='javascript:save()' class='btn btn-primary btn-mright'><i class="fa fa-check"></i>保存</button>
|
||
<button type="button" onclick='javascript:history.go(-1)' class='btn'><i class="fa fa-angle-double-left"></i>返回</button>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</form>
|
||
<script>
|
||
$(function(){
|
||
WST.upload({
|
||
pick:'#photoPicker',
|
||
formData: {dir:'staffs'},
|
||
accept: {extensions: 'gif,jpg,jpeg,png',mimeTypes: 'image/jpg,image/jpeg,image/png,image/gif'},
|
||
callback:function(f){
|
||
var json = WST.toAdminJson(f);
|
||
if(json.status==1){
|
||
$('#uploadMsg').empty().hide();
|
||
$('#prevwPhoto').attr('src',WST.conf.IMGURL+'/'+json.savePath+json.name);
|
||
$('#staffPhoto').val(json.savePath+json.name);
|
||
}
|
||
},
|
||
progress:function(rate){
|
||
$('#uploadMsg').show().html('已上传'+rate+"%");
|
||
}
|
||
});
|
||
});
|
||
</script>
|
||
{/block} |