username@email.com
2025-05-21 a980cd04341d71216e0f59bd4b7327fe9fc50032
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
 
 
$(function () {
 
    AutoSetSubmitUrl(); //自动设置提交页面(默认为../business)
    setTimeout(LoadData, 0); //立即获取数据
 
});
 
 
 
/*
加载数据方法
*/
function LoadData() {
    //获取Json数据
    GetJson({ '0': 'T0T' }, function (data, textStatus) {
        try {
 
            if (data) {
                window.NoneData = eval('[' + data + ']')[0];
                ShowData();
            } else {
                global.NoneDataOperate(); return;
            }
 
 
        } catch (ex) {
            global.DealDataException(ex); return
        }
    });
 
 
}
/*
显示信息
*/
function ShowData() {
 
    document.getElementById('div_QuotePriceControl').style.display = '已过期' == window.NoneData.StateName ? 'none' : '';
    window.NoneData.PrintTypeName = window.NoneData.PrintType.PrintName;
    window.NoneData.MemberName = window.NoneData.MemberBasic.Name;
    //    window.NoneData.StateName = window.NoneData.StateType.Name;
    window.NoneData.CallTypeName = window.NoneData.CallType.Name;
    //window.NoneData.ContactPeople = window.NoneData.ContactPeople.ToString();
    window.NoneData.EndTime = window.NoneData.EndTime.ToString();
    document.getElementById('link_QQ').href = 'http://wpa.qq.com/msgrd?V=1&Uin=' + window.NoneData.QQ + '&Site=ioshenmue&Menu=yes';
    window.NoneData.StateName = (window.NoneData.StateName == "已发布" ? "暂未确定供应商" : window.NoneData.StateName);
    window.SetJsonToDom(window.NoneData, 'spn', "innerHTML");
 
 
}
 
//正数正则表达式
var reg1 = /^\d+(?=\.{0,1}\d+$|$)/;
 
/*
保存(新增/修改)
*/
function SaveQuote(member) {
 
    var ckResult = CheckBuyer(member, window.NoneData ? window.NoneData.MemberId : 'nonedata')
    if (ckResult) { alertMsg('不能给自己报价!'); return; } else if (undefined == ckResult) return;
    var txtQuoterPrice = document.getElementById('txtQuoterPrice');
    if (txtQuoterPrice.value == "") {
        alertMsg('报价价格不能为空!'); return;
    }
    if (!reg1.test(txtQuoterPrice.value)) {
        alertMsg('报价价格必须为正数字!');
        txtQuoterPrice.value = "";
        return;
    }
    if (!window.NoneData) { alertMsg('数据尚未加载完毕,请稍后操作!'); return; };
 
    window.submitUrl = "/Pages/front/FindOrder.aspx"; //设置当前页的提交路径
    CallServer(
    {
        Target: "DemandQuote", RequestParams: window.ConvertJsonToString({ QuoterPrice: txtQuoterPrice.value, QuoteInfo: document.getElementById('txtDemandQuoteInfo').value, DemandId: window.NoneData.Keyid })
    },
     function (data, textStatus) {
         alertMsg(isWin = ('1' == data) ? "操作成功!" : "操作失败!");
         if ('1' == data) {
 
             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();
 
}