<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('缓存清理')" />
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="col-sm-12">
        <div class="row" style="margin-top: 10px;">
            <label class="col-sm-1 control-label" style="text-align: right;padding: 0;height: 34px;line-height: 34px;font-size: 14px;font-weight: bold;">经销商代码：</label>
            <div class="col-sm-2">
                <input type="text" id="keyName" name="" class="form-control" placeholder="输入经销商代码">
            </div>
        </div>
        <div class="row" style="margin-top: 10px;">
            <label class="col-sm-1 control-label"></label>
            <button id="applyBtn" class="btn btn-success" style="margin-left: 15px;">
                提交
            </button>
        </div>
    </div>
</div>
</body>
<th:block th:include="include :: footer" />
<script type="text/javascript">
    var domain = window.location.host;
    var ht = domain.indexOf('localhost') != -1 ? 'http://' : 'https://';
    var prefixEdit = ht + domain + "/oneportal/system/user/getManagerList";
    // var prefixEdit = 'https://suishenbangtest.nipponpaint.com.cn/oneportal/system/user/getManagerList';

    $('#applyBtn').on('click', function (res) {
        var keyNameValue = $('#keyName').val();
        if (keyNameValue == ''){
            $.modal.alertWarning('请输入经销商代码');
            return;
        }
        var data = {
            depCode:keyNameValue
        }
        console.log(1,data);
        $.ajax({
            url: prefixEdit,
            type: "get",
            contentType: 'application/json',
            data: data,
            success: function (result) {
                if (result.code == 0) {
                    $.modal.alertWarning(result.msg);
                } else {
                    $.modal.alertWarning(result.msg);
                }
            }
        })
    })
</script>
</html>
