manualStopTransfer.html 2.4 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">

<div region="north" style="height:230px;">
    <script>
        document.write(addHead('打款管理', '停止打款'));
    </script>

    <div style="padding:20px;">
        <label id="transferSwitch"></label>
        <a id="manualStopTransfer" class="btn-success">停止打款</a>
        <a id="manualStartUpTransfer" class="btn-success">开启打款</a>
    </div>
</div>




<script>
$(function() {


    setTransferSwitchOff();


    $("#manualStopTransfer").linkbutton({
        iconCls : "icon-search",
        onClick : function() {
            $.ajax({
                type: "POST",
                url: contextPath + '/tradeBills/manualStopTransfer',
                async: false,
                cache: false,
                dataType: 'json',
                success: function (result) {
                    if(result.code == 200) {
                        window.self.$.messager.show({
                            title : "提示",
                            msg : "关闭打款!"
                        });

                        setTransferSwitchOff();
                    }

                }
            });
        }
    });

    $("#manualStartUpTransfer").linkbutton({
        iconCls : "icon-search",
        onClick : function() {
            $.ajax({
                type: "POST",
                url: contextPath + '/tradeBills/manualStartUpTransfer',
                async: false,
                cache: false,
                dataType: 'json',
                success: function (result) {
                    if(result.code == 200) {
                        window.self.$.messager.show({
                            title : "提示",
                            msg : "开启打款!"
                        });
                    }

                    setTransferSwitchOff();

                }
            });
        }
    });
});


function setTransferSwitchOff(){
    $.ajax({
        type: "POST",
        url: contextPath + '/tradeBills/getTransferSwitchOff',
        async: false,
        cache: false,
        dataType: 'json',
        success: function (result) {
            if(result.code == 200) {
                $("#transferSwitch").text(result.data);
            }

        }
    });
}

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