|
window.submitUrl = "/Pages/front/FindOrder.aspx"; //设置当前页的提交路径
|
|
/*
|
保存(新增/修改)
|
*/
|
function SaveQuote(member) {
|
var txtDemandQuoteInfo= document.getElementById('txtDemandQuoteInfo');
|
if (txtDemandQuoteInfo && !txtDemandQuoteInfo.value) { alertMsg('报价价格无效!'); txtDemandQuoteInfo.focus();return; }
|
if (!window.NoneData) { alertMsg('数据尚未加载完毕,请稍后操作!'); return; };
|
if (CheckBuyer(member, window.NoneData ? window.NoneData.MemberId : 'nonedata')) { alertMsg('不能给自己报价!'); return; }
|
alert(window.NoneData.Keyid);
|
CallServer(
|
{
|
Target: "DemandQuote", RequestParams: window.ConvertJsonToString({ QuoteInfo: txtDemandQuoteInfo.value, DemandId: window.NoneData.Keyid})
|
},
|
function (data, textStatus) {
|
alertMsg(isWin = ('1' == data) ? "操作成功!" : "操作失败!");
|
if ('1' == data) {
|
$('#div_DemandQuote').css('display','none');
|
document.getElementById('txtDemandQuoteInfo').value = '';
|
|
} else { }
|
});
|
}
|
|
/*
|
设置层位置
|
*/
|
function SetDivLocation(event, demandId) {
|
var position = mouseCoords(event);
|
//alertMsg("x:" + position.x + ",y:" + position.y + ',' + $(document).scrollTop());
|
|
$('#div_DemandQuote').css('top', (position.y + $(document).scrollTop()) + 'px');
|
$('#div_DemandQuote').css('left', (position.x + 20) + 'px');
|
$('#div_DemandQuote').css('display', 'block');
|
$('#txtDemandId').val(demandId);
|
document.getElementById('txtDemandQuoteInfo').focus();
|
|
}
|
/*
|
获取鼠标坐标
|
*/
|
function mouseCoords(ev) {
|
if (ev.pageX || ev.pageY) {
|
return { x: ev.pageX, y: ev.pageY };
|
}
|
return {
|
x: ev.clientX + document.body.scrollLeft - document.body.clientLeft,
|
y: ev.clientY + document.body.scrollTop - document.body.clientTop
|
};
|
}
|
|
|
|