$(function(){ gettransferapplyshow(); $("#yinyitransferxieyi").click(function() { $("#yinyitransferxieyishow").modal("show"); }); $("#yinyitransferxieyiclose").click(function() { $("#yinyitransferxieyishow").modal("hide"); }); }) function gettransferapplyshow() { $.post("/mall/zltindexaction!gettransferapplyshow.do?ajax=yes", {}, function(data) { if (data.result == 1) { var show_transfer = data.data.show_transfer; if (show_transfer == "1") { showyinyitransfer(); } } },"json"); } function showyinyitransfer() { $("#yinyitransfer").modal("show"); $("#yinyitransfer_sure").html("确定"); var t; function settimeout(wait) { t = window.settimeout(function() { if (wait > 0) { wait--; $("#yinyitransfer_sure").html("确定("+wait+")"); settimeout(wait); } else { $("#yinyitransfer_sure").html("确定"); // 绑定确定按钮事件 $("#yinyitransfer_sure").click(function(){ /*if(!$('#yinyitransfercheck').is(':checked')) { zhejiang_alert("提示信息", "请仔细阅读并勾选《债权转让协议》", function(){}, "确定"); return false; }*/ $.post("/mall/zltindexaction!agreetransferapply.do?ajax=yes", {}, function(data) { if (data.result == 1) { zhejiang_alert("提示", data.message, function(){ $("#yinyitransfer").modal('hide'); }); } else { zhejiang_alert("提示", data.message, function(){ window.location.reload(); }); } },"json"); }); } }, 1000); } settimeout(0); // 绑定取消按钮事件 $("#yinyitransfer_cancel").click(function(){ $("#yinyitransfer").modal("hide"); showyinyitransferfxts(); $('#yinyitransfercheck').attr("checked", false); cleartimeout(t); $("#yinyitransfer_sure").unbind(); $("#yinyitransfer_cancel").unbind(); $("#yinyitransfer_close").unbind(); }); $("#yinyitransfer_close").click(function(){ $("#yinyitransfer").modal("hide"); $("#yinyitransfercheck").attr("checked", false); cleartimeout(t); $("#yinyitransfer_sure").unbind(); $("#yinyitransfer_cancel").unbind(); $("#yinyitransfer_close").unbind(); }); } function showyinyitransferfxts() { $("#yinyitransferfxts").modal("show"); $("#yinyitransferfxts_sure").html("我已阅知(10)"); var t; function settimeout(wait) { t = window.settimeout(function() { if (wait > 0) { wait--; $("#yinyitransferfxts_sure").html("我已阅知("+wait+")"); settimeout(wait); } else { $("#yinyitransferfxts_sure").html("我已阅知"); // 绑定确定按钮事件 $("#yinyitransferfxts_sure").click(function(){ $("#yinyitransferfxts").modal('hide'); }); } }, 1000); } settimeout(10); // 绑定取消按钮事件 $("#yinyitransferfxts_cancel").click(function(){ $("#yinyitransfercheck").attr("checked", false); $("#yinyitransferfxts").modal("hide"); cleartimeout(t); $("#yinyitransferfxts_sure").unbind(); $("#yinyitransferfxts_cancel").unbind(); $("#yinyitransferfxts_close").unbind(); showyinyitransfer(); }); $("#yinyitransferfxts_close").click(function(){ $("#yinyitransfercheck").attr("checked", false); $("#yinyitransferfxts").modal("hide"); cleartimeout(t); $("#yinyitransferfxts_sure").unbind(); $("#yinyitransferfxts_cancel").unbind(); $("#yinyitransferfxts_close").unbind(); }); }