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

阿斌 最后提交于3月前 修改切换组织错误
operatorList.ftml7KB
<#-- 显示子部门,并递归显示下级子部门 -->
<#function showChildDept(self, parent)>
<span id="D${self.self().getDeptId()}" style="width:200px;padding:0;padding-left:3px" value="${self.self().getDeptId()}">
<#var level = self.self().getDeptLevel()/>
<#for i : 1..(level-1)>
<#if self.isLastNode(level-i)>
    <i class="f-ico f-tree f-30 f-normal f-blank"></i>
<#else>
    <i class="f-ico f-tree f-30 f-normal f-vertline"></i>
</#if>
</#for>
<#if self.isLastNode()>
    <i class="f-ico f-tree f-30 f-normal f-lastnode"></i>
<#else>
    <i class="f-ico f-tree f-30 f-normal f-node"></i>
</#if>
    <i class="f-ico f-tree f-item f-mg-r3"></i>
    <span id="N${self.self().getDeptId()}" class="f-text-nowrap" value="${self.self().getDeptId()}">#{self.self().getDeptName()}</span>
</span>
<#for child : self.children()>
${showChildDept(child, self)}
</#for>
</#function>

<script>
F.onload(function()
{
    var deptId = "${deptId}";
    if (F.V.isNotEmpty(deptId))
    {
        F("#D"+deptId).addClass("f-selected");
        F(".f-default").text(F("#N"+deptId).text());
        doSelectDept(deptId);
    }
});

function doSelectDept(deptId)
{
    if (deptId == 0)
        document.theForm.deptId.value = "";
    else
        document.theForm.deptId.value = deptId;
}

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

function doAddOperatorDept(operatorCode, deptIds)
{//增加操作员部门
    var ajax = new F.Ajax();
    ajax.setContextPath("${context.getContextPath()}");
    ajax.setClassName("FmrOperatorPresenter");
    ajax.setMethodName("doAddOperatorDept");
    ajax.addParam("operatorCode", operatorCode);
    ajax.addParam("deptIds", deptIds);
    ajax.setFailureAlert();
    ajax.setSuccess(function(){
        F.L.reload();
        F.Dialog.close(location.hash);
    });
    ajax.setLoading(document);
    ajax.execute();
}

function doDeleteOperatorDept(operatorCode, deptId)
{//删除操作员部门
    var ajax = new F.Ajax();
    ajax.setContextPath("${context.getContextPath()}");
    ajax.setClassName("FmrOperatorPresenter");
    ajax.setMethodName("doDeleteOperatorDept");
    ajax.addParam("operatorCode", operatorCode);
    ajax.addParam("deptId", deptId);
    ajax.setFailureAlert();
    ajax.setSuccess(function(){F.L.reload();});
    ajax.execute();
}
</script>
${fadfox_manager_breadcrumb("操作员管理")}
${fadfox_manager_content()}

<#-- 查询 -->
${fadfox_manager_title("操作员查询")}
<form name="theForm" method="post">
<input name="deptId" type="hidden">
<table class="f-table f-bordered f-bg-white f-pd6">
<tr class="f-h60">
    <td>
        部门:
        <div data-role="f-dropdown" class="f-dropdown f-w200 ${fmr_color_class}" data-options="event:click;" style="f-text-nowrap" data-onchange="function(deptId){doSelectDept(deptId)}">
            <span class="f-default">选择部门</span><i class="f-float-right f-font f-arrowhead-down"></i>
            <ul class="f-list" data-fadfox-display="inline-block" style="display: none; top: 28px; left: -1px; width: 200px;">
            <span class="f-h30 f-lh30" style="width: 200px;padding:0;padding-left:3px" value="0">
                选择部门
            </span>
            <span id="D${tree.self().getDeptId()}" style="width:200px;padding:0;padding-left:3px" value="${tree.self().getDeptId()}">
                <i class="f-ico f-tree f-30 f-normal f-root f-mg-r3"></i>
                <span id="N${tree.self().getDeptId()}" class="f-text-nowrap" value="${tree.self().getDeptId()}">#{tree.self().getDeptName()}</span>
            </span>
            <#for child : tree.children()>
            ${showChildDept(child, tree)}
            </#for>
            </ul>
        </div>
        操作员编码:<input name="operatorCode" class="f-input f-w150 f-mg-r5 ${fmr_color_class}" value="${operatorCode}" maxlength="20">
        操作员名称:<input name="operatorName" class="f-input f-w150 f-mg-r5 ${fmr_color_class}" value="${operatorName}" maxlength="20">
        <button type="submit" class="f-button f-w80 f-mg-r10 ${fmr_color_class}">查询</button>
        <button type="button" class="f-button" onclick="F.Forms.clearForm(this.form);">清空</button>
    </td>
</tr>
</table>
</form>

<#-- 功能 -->
<table class="f-table fi-bd fi-bd-b-none f-pd5 f-bg-white f-mg-t20">
<tr>
    <td class="f-px15 f-bold f-lh30">操作员列表</td>
    <td class="f-text-right">
    <#if FmrAdminRule.check(request)>
        <#if FmrPathRule.check(request, "/operatorRuleView.htm")><a class="f-button ${fmr_color_class}" href="javascript:F.L.check('operatorRuleView.htm', 'operatorCode');">查看操作员权限</a></#if>
        <#if FmrPathRule.check(request, "/operatorRule.htm")><a class="f-button ${fmr_color_class}" href="javascript:F.L.check('operatorRule.htm', 'operatorCode');">设置操作员独立权限</a></#if>
        <#if FmrPathRule.check(request, "/operatorDept.htm")><a class="f-button ${fmr_color_class}" href="javascript:doShowOperatorDeptDialog();">设置操作员部门</a></#if>
        <#if FmrPathRule.check(request, "/operatorAdd.htm")><a class="f-button ${fmr_color_class}" href="javascript:F.L.href('operatorAdd.htm');"><i class="f-ico f-add"></i>增加操作员</a></#if>
        <#if FmrPathRule.check(request, "/operatorModify.htm")><a class="f-button ${fmr_color_class}" href="javascript:F.L.check('operatorModify.htm', 'operatorCode');"><i class="f-ico f-modify"></i>修改操作员</a></#if>
        <#if FmrPathRule.check(request, "/operatorDelete.htm")><a class="f-button f-red" href="javascript:F.L.confirm('operatorDelete.htm', '确认要删除该操作员?', 'operatorCode', fCallFrame);"><i class="f-ico f-delete"></i>删除操作员</a></#if>
    </#if>
    </td>
</tr>
</table>

<#-- 列表 -->
<table class="f-table f-bordered f-pd6 f-bg-white f-text-center">
<tr class="f-h40" bgcolor="${fmr_thead_bgolor}">  
    <td width="50">选择</td>
    <td width="70">头像</td>
    <td width="10%">操作员编码</td>
    <td width="15%">操作员名称</td>
    <td width="50">状态</td>
    <td width="280">所属部门</td>
    <td width="10%">手机号</td>
    <td width="*">邮箱地址</td>
    <td width="160">更新时间</td>
</tr>
<#if result.total() == 0>
${fadfox_manager_no_record(9, "暂时没有操作员信息")}
</#if>
<#for item : result.list()>
<tr class="f-h60 f-pointer" ${fadfox_manager_tr_onmouse()} ${fadfox_manager_tr_click_radio()}>
    <td>
    <#if FmrAdminMutexRule.check(request, item)>
        <input name="operatorCode" type="radio" data-role="f-radio" data-class="${fmr_color_class}" value="${item.getOperatorCode()}">
    </#if>
    </td>
    <td><img src="${sessionUser.getAvatarUrl(item.getOperatorAvatar(), 50)}" class="f-w50 f-h50 f-bd-rd50p"></td>
    <td>${item.getOperatorCode()}</td>
    <td>#{item.getOperatorName()}</td>
    <td><#if item.getOperatorStatus() == 0>正常<#else><span class="f-color-red">停用</span></#if></td>
    <td>
        <table class="f-table f-bordered-line fi-bd-t-none f-pd6 f-lh150p">
        <#var deptIds = Arrays.toLongArray(item.getOperatorDept())/>
        <#for deptName : Arrays.toStringArray(item.getOperatorCreated())>
        <tr>
            <td width="*" align="left" class="fi-bd-b-none">#{deptName}</td>
            <td width="60" class="fi-bd-b-none">
            <#if FmrAdminMutexRule.check(request, item)>
                <a href="javascript:doDeleteOperatorDept('#{item.getOperatorCode()}', '#{deptIds[deptName_index]}')">取消</a>
            </#if>
            </td>
        </tr>
        </#for>
        </table>
    </td>
    <td>#{item.getOperatorMobile()}</td>
    <td>#{item.getOperatorEmail()}</td>
    <td>#{item.getOperatorModified()}</td>
</tr>
</#for>
</table>
${fadfox_manager_paging(result, "operatorList.htm")}
${fadfox_manager_content_end()}