blackUser.html 3.12 KB
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"/>
    <title>Yoho!Buy运营平台</title>
    <script src="/ufoPlatform/js/include.js"></script>
</head>
<body class="easyui-layout">
<input type="hidden" id="buyerOrderCode">
<input type="skup" id="skup">

<div region="north">
    <script>
        document.write(addHead('订单管理', '黑名单'));
    </script>
    <div style="margin:20px 0;"></div>
    <h2 style="padding:5px">黑名单限制</h2>
    <div style="padding:10px 60px 20px 60px">

        <form id="limitForm" method="post">
            <label>UID(多个以","分隔):</label>
            <br />
            <input class="easyui-textbox" id="uids" data-options="multiline:true,required:true" style="height:100px;width:700px;"></input>
            <br />
            <label>原因:</label>
            <br />
            <input class="easyui-textbox" type="text" id="reason" data-options="required:true" style="width:700px;"></input>
        </form>
        <div style="padding-top:5px">
            <a href="javascript:void(0)" class="easyui-linkbutton" onclick="limit(2,'限制购买')">限制购买</a>
            <a href="javascript:void(0)" class="easyui-linkbutton" onclick="limit(1,'限制出售')">限制出售</a>
        </div>
    </div>
</div>

<hr />

<div region="center">
    <h2>帮助</h2>
    <div style="padding:10px 60px 20px 60px">
        <label>UID:</label>
        <input id="uid" type="text" class="easyui-textbox" style="width:150px"/>

        <a href="javascript:void(0)" onclick="check()" class="easyui-linkbutton">查询</a>
        <a href="javascript:void(0)" onclick="remove()" class="easyui-linkbutton" style='color:white;background-color: #D31225 !important;'>解除</a>
    </div>
</div>

<script>

function check(){
    var uid = $("#uid").val();
    if(!uid){
        $.messager.alert("提示", "请输入查询条件uid", "warning");
        return;
    }
    $.post(contextPath + "/blackUser/check", {
        uid : uid
    }, function(data) {
        window.self.$.messager.alert("提示", data.message, "info");
    });
}

function remove(){
    var uid = $("#uid").val();
    if(!uid){
        $.messager.alert("提示", "请输入查询条件uid", "warning");
        return;
    }

    $.messager.confirm("提示", "是否确认解除[uid="+uid+"]黑名单?", function(flag) {
        if (flag) {
            $.post(contextPath + "/blackUser/remove", {
                uid : uid
            }, function(data) {
                window.self.$.messager.alert("提示", data.message, "info");
            });
        }
    });
}

function limit(blackType,desc) {
    $.messager.confirm("提示", "是否确认"+desc +"?", function(flag) {
        if (flag) {
            $.post(contextPath + "/blackUser/create", {
                uids : $("#uids").val(),
                blackType : blackType,
                reason : $("#reason").val()
            }, function(data) {
                window.self.$.messager.alert("提示", data.message, "info");
                if (data.code == 200) {
                    $('#limitForm').form('clear');
                }
            });
        }
    });
}

</script>
</body>
</html>