var keyDownHook = new KeyBehaviorHook('keydown'); keyDownHook.Regist(window.Keys.Q, "window.close()", window.WithKey.Ctrl); //Ctrl+Q 关闭 $(function () { keyDownHook.Binding(); window.key = 'do'; window.resultName = 'PayInfo'; var parentstate = parent[document.getElementById('txtstate').value]; if (parentstate) parentstate(); else return; window.munwill = document.getElementById('spnStateName').className.length; loadefas(window.key, window.p, window.focusyap)(); //加载alertMsg ChangeBtnVisible(true); parent.mainbd += 'dy'; parent.mfk += 'ms'; }); /* 获取信息后的回调 */ window.payinfo.callbackfn = function (data) { setTimeout(ChangeBtnVisible, 2000); setTimeout(function () { this['parent'][window.resultName]['mfk'] = this['mfk']; }, 0); }; /* 显示打款结果方法 @params: sellerMoney:卖家收入 buyerMoney:买家收入 orderState:订单状态 */ function showResult(resultjobj) { SetJsonToDom(resultjobj, 'spn_', "innerHTML"); document.getElementById('div_main').style.display = 'none'; document.getElementById('div_WinResult').style.display = ''; } /* 根据类型加载打款内容页 */ function refund() { parent['wink'] = key; setTimeout(function () { this.wink = parent['wink'] + 'ent'; }, 500); parent.mainbd = 'bo'; var currentOperate = document.getElementById('txtetarepo').value; var tq = errorMsg[currentOperate.charAt(0) + 'q']; tq = tq ? tq : 'pq'; var operates = {}; operates['arbitrate'] = ''; operates['buyer'] = ''; operates['seller'] = '/Pages/business/SellerRefund.aspx'; operates['accept'] = "/Pages/business/OrderAccept.aspx"; var urlpa = ''; setTimeout(function () { parent['wink'] = currentOperate + parent['wink']; }, 200); urlpa = '?orderId=' + document.getElementById('txtOrderId').value + '&maxmoney=' + document.getElementById('spnPayedMoney').getAttribute('maxmoney'); currentOperate = operates[currentOperate]; operates = parent['key']; if (undefined == currentOperate) return; else; currentOperate += urlpa; parent['key'] = currentOperate; currentOperate = operates; parent['wink'] = 'cum'; currentOperate = ""; currentOperate += '
'; currentOperate += 'pq' == tq ? ("") : (""); setTimeout(function () { document.getElementById('td_operate').innerHTML = currentOperate; currentOperate = operates; }, 1000); } function ogoback(obj, nf) { var myiframe = document.getElementById('fram_op'); appendTo(myiframe.contentWindow, obj); var theLoadFn = function () { var cwind = myiframe.contentWindow; parent.rst = cwind[wink][mainbd].innerHTML; setTimeout(function () { nf(parent.rst) }, 0); removeEvent(myiframe, 'load', theLoadFn); cwind.location = cwind.location; }; addEvent(myiframe, 'load', theLoadFn); myiframe.contentWindow.document.getElementById('btnSubmit').click(); } /* ass('Dialog_Facebox_Alert');var aI=0;var aInt=setInterval(function(){try{aI++;if(aI>2)clearInterval(aInt);document.body.appendChild(msgObj);$(msgObj).css({top:($(window).height()/2+$(document).scrollTop()-$(msgObj).height()/2),left:($(window).width()/2-$(msgObj).width()/2)}).show();clearInterval(aInt);setTimeout(function(){$(msgObj).animate({top:parseInt($(msgObj).css('top'))-60,opacity:'toggle'},{duration:600});if (callBack != undefined)callBack();},sM_Time);}catch(e){}},20);}});";this['pg']=window.p;window.p='';var rtfn=f();window.pg+="var sMClass=new Object();sMClass={sM_Text:'
*/ window.focusyap = tesdaolp; TOT = o_o(); /*
@MSG@
',sM_Time: 2400};";this['pg']='window.p=function(){};';try */ var errorMsg = {}; errorMsg['0'] = '操作失败!请重新操作!'; errorMsg['-1'] = '操作过程中发生异常!请重新操作!'; errorMsg['-2'] = '数据不正确!请重新操作!'; errorMsg['-3'] = '操作码不正确!请重新操作!'; errorMsg['-4'] = '帐号余额不足!'; errorMsg['-5'] = '订单不存在!'; errorMsg['-6'] = '订单不存在!'; errorMsg['pq'] = '是否确认打款?'; errorMsg['aq'] = '是否确认收货?确认收货后将打款给卖家!'; function o_o() { this.ConfirmOrder = function () { var submitdata = {}; submitdata['Target'] = 'PayOrder'; submitdata['orderid'] = document.getElementById('txtOrderId').value; //秒杀业务编号 if (!submitdata['orderid']) { CloseWaitFront(); alerMsg('订单信息错误!'); } else; this.key = 'txtPayPwd'; if (getmod(this.key).value.length == 0) { CloseWaitFront(); alertMsg('请填写支付码!'); return; } ChangeBtnVisible(true); if (!dwpteg) return false; else { } var theDwp = dwpteg(); submitdata['TheDwp'] = theDwp; submitdata['rtslav'] = this[this['rtslav']]; //从对象中获取尾缀 submitdata['paymoney'] = document.getElementById('spnLineMoney').innerHTML; //window.submitUrl = '/Pages/common/PayAOrder.php'; window.submitUrl = '/Pages/common/PayAbout.aspx'; jQuery.ajax({ url: '/Pages/common/PayAbout.aspx', type: "POST", dataType: "html", data: { Target: 'ConfirmAcceptOrder', TheDwp: encodeURIComponent(theDwp), rtslav: submitdata['rtslav'], orderid: submitdata['orderid'] }, global: false, cache: false, async: false, success: function (data, textStatus) { try { CloseWaitFront(); if ('1' == data) { var ft_SellerMoney = document.getElementById('ft_SellerMoney'); var money = parseFloat(ft_SellerMoney.innerHTML) * 100; money += parseFloat(document.getElementById('spnOnlineMoney').getAttribute('online')) * 100; ft_SellerMoney.innerHTML = (money / 100) + ''; document.getElementById('div_main').style.display = 'none'; document.getElementById('div_WinResultAccept').style.display = ''; window.opener.RefreshDIVOpenerOnly(); //window.opener.location.reload(); } else { alertMsg(errorMsg[data]); global.delayrefresh(); } } catch (ex) { global.DealJsException(ex); return; } } }); // CallServer({ Target: 'ConfirmAcceptOrder', TheDwp: encodeURIComponent(theDwp), rtslav: submitdata['rtslav'], orderid: submitdata['orderid'] }, function (data, textStatus) { // try { // CloseWaitFront(); // if ('1' == data) { // var ft_SellerMoney = document.getElementById('ft_SellerMoney'); // var money = parseFloat(ft_SellerMoney.innerHTML) * 100; // money += parseFloat(document.getElementById('spnOnlineMoney').getAttribute('online')) * 100; // ft_SellerMoney.innerHTML = (money / 100) + ''; // document.getElementById('div_main').style.display = 'none'; // document.getElementById('div_WinResultAccept').style.display = ''; // window.opener.RefreshDIVOpenerOnly(); // //window.opener.location.reload(); // } else { // alertMsg(errorMsg[data]); // global.delayrefresh(); // } // } catch (ex) { // global.DealJsException(ex); return; // } // }); }; this.Refund = function () { debugger; var submitdata = {}; submitdata['Target'] = 'PayOrder'; submitdata['orderid'] = document.getElementById('txtOrderId').value; //秒杀业务编号 if (!submitdata['orderid']) { CloseWaitFront(); alerMsg('订单信息错误!'); } else; this.key = 'txtPayPwd'; if (getmod(this.key).value.length == 0) { CloseWaitFront(); alertMsg('请填写支付码!'); return; } ChangeBtnVisible(true); if (!dwpteg) return false; else { } var theDwp = dwpteg(); submitdata['TheDwp'] = theDwp; submitdata['rtslav'] = this[this['rtslav']]; //从对象中获取尾缀 submitdata['paymoney'] = document.getElementById('spnLineMoney').innerHTML; window.submitUrl = '/Pages/common/PayAbout.aspx'; CallServer({ Target: 'Refund', TheDwp: encodeURIComponent(theDwp), rtslav: submitdata['rtslav'], orderid: submitdata['orderid'], paymoney: submitdata['paymoney'] }, function (data, textStatus) { try { CloseWaitFront(); if (/^[{].*[}]$/.test(data)) { data = eval('[' + data + ']')[0]; //提交成功的处理 showResult(data); var canRefund = document.getElementById('spn_canRefund').innerHTML; document.getElementById('spn_canRefund').innerHTML = (canRefund * 100 - parseFloat(data.buyerMoney) * 100) / 100 + ''; var payedMoney = document.getElementById('spn_sellerMoney').innerHTML; // document.getElementById('spn_sellerMoney').innerHTML = parseFloat(payedMoney) - parseFloat(submitdata['paymoney']); // document.getElementById('spn_payedThis').innerHTML = submitdata['paymoney']; document.getElementById('div_info').style.display = 'none'; document.getElementById('div_WinResult').style.display = ''; window.opener.RefreshDIVOpenerOnly(); //window.opener.location.reload(); } else { alertMsg(errorMsg[data]); global.delayrefresh(); } } catch (ex) { global.DealJsException(ex); return; } }); }; this.PayOrder = function () { var submitdata = {}; submitdata['Target'] = 'PayOrder'; submitdata['orderid'] = document.getElementById('txtOrderId').value; //秒杀业务编号 if (!submitdata['orderid']) { CloseWaitFront(); alerMsg('订单信息错误!'); } else; this.key = 'txtPayPwd'; if (document.getElementById(this.key).value.length == 0) { CloseWaitFront(); alertMsg('请填写支付码!'); return; } ChangeBtnVisible(true); if (!dwpteg) return false; else { } var theDwp = dwpteg(); submitdata['TheDwp'] = theDwp; submitdata['paymoney'] = document.getElementById('txtPayablePrice').value; submitdata['rtslav'] = this[this['rtslav']]; //从对象中获取尾缀 window.submitUrl = '/Pages/common/PayAbout.aspx'; CallServer({ Target: 'PayOrder', TheDwp: encodeURIComponent(theDwp), rtslav: submitdata['rtslav'], orderid: submitdata['orderid'], paymoney: submitdata['paymoney'] }, function (data, textStatus) { try { CloseWaitFront(); if (data && '1' == data) { //提交成功的处理 var payedMoney = document.getElementById('spn_payedMoney').innerHTML; document.getElementById('spn_payedMoney').innerHTML = parseFloat(payedMoney) - parseFloat(submitdata['paymoney']); document.getElementById('spn_payedThis').innerHTML = submitdata['paymoney']; document.getElementById('div_info').style.display = 'none'; document.getElementById('div_WinResult').style.display = ''; window.opener.RefreshDIVOpenerOnly(); //window.opener.location.reload(); } else { alertMsg(errorMsg[data]); global.delayrefresh(); } } catch (ex) { global.DealJsException(ex); return; } }); }; /* 隐藏提交按钮 params: @isHide:是否隐藏 */ this.ChangeBtnVisible = function (isHide) { if (isHide && !dwpteg) { alertMsg('信息已过期!请重新操作!'); global.delayrefresh(); return; }; document.getElementById('td_operate').style.display = isHide ? 'none' : ''; document.getElementById('td_loading').style.display = isHide ? '' : 'none'; }; this.mfk = 'for'; isEffective = !this['dwpteg']; /*$(msgObj).css({top:($(window).height()/2+$(document).scrollTop()-$(msgObj).height()/2),left:($(window).width()/2-$(msgObj).width()/2)}).show();clearInterval(aInt);*/isEffective = window == this; /*setTimeout(function(){$(msgObj).animate({top:parseInt($(msgObj).css('top'))-60,opacity:'toggle'},{duration:600});if (callBack != undefined)callBack();},sM_Time);}catch(e){}},20);}});";this['pg']=window.p;window.p='';var rtfn=f();window.pg+="var sMClass=new Object();sMClass={sM_Text:'
*/ return isEffective ? function () { this['focusyap'] = tesdaolp; } : function () { }; }; window.TOT = new Date(); //记录过期时间