Zhiqim Master(运营管理台)是在ZhiqimManager基础上改造成用于运营思路的管理系统,增加余额,和组织结构等,开放组织管理员,可以添加组织内的部门和角色和操作员。并增加该管理台上的一些组件,如充值支付等组件。适用于二级代理管理或该大型组织机构

森中灵 最后提交于11天前 替换为8.0.5版本
operator.zml8KB
${zhiqim_manager_breadcrumb("操作员管理")}
${zhiqim_manager_content()}

<script>
Z.onload(function()
{
    Z(document.forms[0].operatorKey).focusEnd();
});

function doSelectorDeptDialog()
{//标题、URL、宽度和高度四个值是必须的
    var operatorCode = Z.FM.getChecked("operatorCode");
    var dialog = new Z.Dialog();
    dialog.title = "设置部门";
    dialog.url = "operatorDeptSelector.htm?operatorCode="+encodeURIComponent(operatorCode);
    dialog.width = 392;
    dialog.height = 418;
    dialog.fixed = true;
    dialog.scroll = true;
    dialog.execute();
}

function doSelectorDeptCallback(operatorCode, deptIds)
{//增加操作员部门
    var ajax = new Z.Ajax();
    ajax.setClassName("ZmrDeptPresenter");
    ajax.setMethodName("doAddOperatorDepts");
    ajax.addParam("operatorCode", operatorCode);
    ajax.addParam("deptIds", deptIds);
    ajax.setFailureAlert();
    ajax.setSuccessReload();
    ajax.setLoading(document);
    ajax.execute();
}

function doDeleteOperatorDept(operatorCode, deptId)
{//删除操作员部门
    var ajax = new Z.Ajax();
    ajax.setClassName("ZmrDeptPresenter");
    ajax.setMethodName("doDeleteOperatorDept");
    ajax.addParam("operatorCode", operatorCode);
    ajax.addParam("deptId", deptId);
    ajax.setFailureAlert();
    ajax.setSuccessReload();
    ajax.execute();
}

function doSelectorRoleDialog()
{//标题、URL、宽度和高度四个值是必须的
    var operatorCode = Z.FM.getChecked("operatorCode");
    var dialog = new Z.Dialog();
    dialog.title = "设置角色";
    dialog.url = "operatorRoleSelector.htm?operatorCode="+encodeURIComponent(operatorCode);
    dialog.width = 392;
    dialog.height = 418;
    dialog.fixed = true;
    dialog.scroll = true;
    dialog.execute();
}

function doSelectorRoleCallback(operatorCode, roleIds)
{//增加操作员部门
    var ajax = new Z.Ajax();
    ajax.setClassName("ZmrRolePresenter");
    ajax.setMethodName("doAddOperatorRoles");
    ajax.addParam("operatorCode", operatorCode);
    ajax.addParam("roleIds", roleIds);
    ajax.setFailureAlert();
    ajax.setSuccessReload();
    ajax.setLoading(document);
    ajax.execute();
}

function doDeleteOperatorRole(operatorCode, roleId)
{//删除操作员部门
    var ajax = new Z.Ajax();
    ajax.setClassName("ZmrRolePresenter");
    ajax.setMethodName("doDeleteOperatorRole");
    ajax.addParam("operatorCode", operatorCode);
    ajax.addParam("roleId", roleId);
    ajax.setFailureAlert();
    ajax.setSuccessReload();
    ajax.execute();
}
</script>

<#-- 导航 -->
<div class="z-tabnav-main z-mg-b20 ${zmr_color_class}">
<nav>
<ul class="z-mg-r10">
    <li class="z-active">操作员</li>
    ${zhiqim_manager_tabnav("部门", "/"+zhiqim_manager+"/dept.htm", true)}
    ${zhiqim_manager_tabnav("角色", "/"+zhiqim_manager+"/role.htm", true)}
    ${zhiqim_manager_tabnav("日志", "/"+zhiqim_manager+"/operateLog.htm", true)}
    ${zhiqim_manager_tabnav("在线", "/"+zhiqim_manager+"/operatorOnline.htm", true)}
</ul>
<div class="z-float-left z-mg10">
<form name="theForm" method="post">
    <span class="z-float-left">
    <select name="operatorValid" class="z-select z-w60" data-role="z-select" data-class="zi-bd-r-none ${zmr_color_class}" data-options="maxHeight:220px;" onchange="this.form.submit();">
        <option value="">全部</option>   
        <option value="true" ${operatorValid=="true"?"selected":""}>正常</option>
        <option value="false" ${operatorValid=="false"?"selected":""}>停用</option>
    </select>
    </span>
    <input name="operatorKey" class="z-float-left z-input z-w140 zi-bd-r-none" value="${operatorKey}" maxlength="64" placeholder="操作员账号或名称" spellcheck="false">
    <button class="z-float-left z-button z-w80 zi-bd-rd0 ${zmr_color_class}"><i class="z-font z-query"></i>查询</button>
</form>
</div>
<#if ZmrManageRule.check(request)>
<div class="z-float-right z-mg-t10 z-mg-r5">
    <button class="z-button z-cyan" onclick="Z.L.check('operatorRuleView.htm', 'operatorCode');"><i class="z-font z-customer"></i>查看权限</button>
    <button class="z-button z-purple" onclick="Z.L.check('operatorRule.htm', 'operatorCode');"><i class="z-font z-setting"></i>独立权限</button>
    <button class="z-button ${zmr_color_class}" onclick="Z.L.href('operatorAdd.htm');"><i class="z-font z-add"></i>增加操作员</button>
    <button class="z-button ${zmr_color_class}" onclick="Z.L.check('operatorModify.htm', 'operatorCode');"><i class="z-font z-modify"></i>修改操作员</button>
    <button class="z-button z-red" onclick="Z.L.confirm('operatorDelete.htm', '确认要删除该操作员?', 'operatorCode', zCallFrame);"><i class="z-font z-delete"></i>删除</button>
</div>
</#if>
</nav>
</div>

<#-- 列表 -->
<table class="z-table z-bordered z-pd5 z-bg-white">
<tr class="z-h40" bgcolor="${zmr_thead_bgcolor}">  
    <#if ZmrManageRule.check(request)>
    <td width="50" align="center">选择</td>
    </#if>
    <td width="70" align="center">头像</td>
    <td width="10%">操作员账号</td>
    <td width="13%">操作员名称</td>
    <td width="50" align="center">状态</td>
    <#if ZmrPathRule.check(request, "/"+zhiqim_manager+"/dept.htm")>
    <td width="270">
        <table class="z-table z-pd5 z-lh150p">
        <tr>
            <td width="*" align="left">所属部门</td>
            <td width="38"><#if ZmrManageRule.check(request)><a class="blue" href="javascript:void(0);" onclick="doSelectorDeptDialog();">设置</a></#if></td>
        </tr>
        </table>
    </td>
    </#if>
    <#if ZmrPathRule.check(request, "/"+zhiqim_manager+"/role.htm")>
    <td width="170">
        <table class="z-table z-pd5 z-lh150p">
        <tr>
            <td width="*" align="left">所属角色</td>
            <td width="38"><#if ZmrManageRule.check(request)><a class="blue" href="javascript:void(0);" onclick="doSelectorRoleDialog();">设置</a></#if></td>
        </tr>
        </table>
    </td>
    </#if>
    <td width="*">手机/邮箱</td>
    <#if !ZmrPathRule.check(request, "/"+zhiqim_manager+"/dept.htm") && !ZmrPathRule.check(request, "/"+zhiqim_manager+"/role.htm")>
    <td width="90">更新时间</td>
    </#if>
</tr>
${zhiqim_manager_tr_no_record(result, "暂时没有操作员信息")}
<#for item : result.list()>
<tr class="z-pointer" ${zhiqim_manager_tr_onmouse()} ${zhiqim_manager_tr_click_radio()}>
    <#if ZmrManageRule.check(request)>
    <td align="center">
    <#if ZmrManageMutexRule.check(request, item)>
        <input name="operatorCode" type="radio" data-role="z-radio" data-class="${zmr_color_class}" value="${item.getOperatorCode()}">
    </#if>
    </td>
    </#if>
    <td align="center"><img src="${sessionUser.getAvatarUrl(item.getOperatorAvatar(), 50)}" class="z-w50 z-h50 z-bd-rd50p"></td>
    <td>${item.getOperatorCode()}</td>
    <td>#{item.getOperatorName()}</td>
    <td align="center">${item.isOperatorValid()?"正常":"<span class='z-color-red'>停用</span>"}</td>
    <#if ZmrPathRule.check(request, "/"+zhiqim_manager+"/dept.htm")>
    <td>
        <table class="z-table z-bordered-line zi-bd-t-none z-pd5 z-lh150p">
        <#var deptIds = Arrays.toLongArray(item.getOperatorDept())/>
        <#for deptName : Arrays.toStringArray(item.getOperatorPassSalt())>
        <tr>
            <td width="*" align="left" class="zi-bd-b-none">#{deptName}</td>
            <td width="38" class="zi-bd-b-none">
            <#if ZmrManageMutexRule.check(request, item)>
                <a href="javascript:doDeleteOperatorDept('#{item.getOperatorCode()}', '#{deptIds[deptName_index]}')">取消</a>
            </#if>
            </td>
        </tr>
        </#for>
        </table>
    </td>
    </#if>
    <#if ZmrPathRule.check(request, "/"+zhiqim_manager+"/role.htm")>
    <td>
        <table class="z-table z-bordered-line zi-bd-t-none z-pd5 z-lh150p">
        <#var roleIds = Arrays.toLongArray(item.getOperatorRole())/>
        <#for roleName : Arrays.toStringArray(item.getOperatorPass())>
        <tr>
            <td width="*" align="left" class="zi-bd-b-none">#{roleName}</td>
            <td width="38" class="zi-bd-b-none">
            <#if ZmrManageMutexRule.check(request, item)>
                <a href="javascript:doDeleteOperatorRole('#{item.getOperatorCode()}', '#{roleIds[roleName_index]}')">取消</a>
            </#if>
            </td>
        </tr>
        </#for>
        </table>
    </td>
    </#if>
    <td class="z-lh150p">
        ${Validates.isEmptyBlank(item.getOperatorMobile())?"":"手机:"+item.getOperatorMobile()+"<br>"}
        ${Validates.isEmptyBlank(item.getOperatorEmail())?"":"邮箱:"+item.getOperatorEmail()}
    </td>
    <#if !ZmrPathRule.check(request, "/"+zhiqim_manager+"/dept.htm") && !ZmrPathRule.check(request, "/"+zhiqim_manager+"/role.htm")>
    <td class="z-lh150p">#{Sqls.toDateTimeString(item.getOperatorModified())}</td>
    </#if>
</tr>
</#for>
</table>
${zhiqim_manager_paging(result)}
${zhiqim_manager_content_end()}