Files
advertising/admin/js/orderMsg.js

94 lines
2.5 KiB
JavaScript
Raw Normal View History

2019-04-11 15:54:34 +08:00
$(document).ready(function(){
$("body").unbind('click');
$("body").click(function(event){
var _id=$(event.target).attr("id");
var arr=String(_id).split("_");
if (arr[0]=="addOrder")
{
clearErrorTips("tip","errorTips");
var signidR=trimAll($("[name=signid]").val(),"g");
var vacancyidR=trimAll($("[name=vacancyid]").val(),"g");
var usernameR=trimAll($("[name=username]").val(),"g");
var daysR=trimAll($("[name=days]").val(),"g");
var designR=trimAll($("[name=design]").val(),"g");
var isreplaceR=trimAll($("[name=isreplace]").val(),"g");
var ordertimeR=trimAll($("[name=ordertime]").val(),"g");
var starttimeR=trimAll($("[name=starttime]").val(),"g");
var endtimeR=trimAll($("[name=endtime]").val(),"g");
var totalcostR=trimAll($("[name=totalcost]").val(),"g");
if (signidR=="")
{
setErrorTips("signidR_tip","errorTips",message[6]);
return false;
}
if (vacancyidR=="")
{
setErrorTips("vacancyidR_tip","errorTips",message[6]);
return false;
}
if (usernameR=="")
{
setErrorTips("usernameR_tip","errorTips",message[6]);
return false;
}
if (daysR=="")
{
setErrorTips("daysR_tip","errorTips",message[6]);
return false;
}
if (designR=="")
{
setErrorTips("designR_tip","errorTips",message[6]);
return false;
}
if (isreplaceR=="")
{
setErrorTips("isreplaceR_tip","errorTips",message[6]);
return false;
}
if (starttimeR=="")
{
setErrorTips("starttimeR_tip","errorTips",message[6]);
return false;
}
if (endtimeR=="")
{
setErrorTips("endtimeR_tip","errorTips",message[6]);
return false;
}
if (totalcostR=="")
{
setErrorTips("totalcostR_tip","errorTips",message[6]);
return false;
}
var msg={"signids":signidR,"vacancyidv":vacancyidR,"username":usernameR,"days":daysR,"design":designR,"isreplace":isreplaceR,"ordertime":ordertimeR,"starttime":starttimeR,"endtime":endtimeR,"totalcost":totalcostR,"state":1,"adminstate":1};
//var msg={"citytype":2/*,"cityid":userid*/};
sendClientMsg(root+"Order/addOrder",msg,"");
}
})
});
function getCity()
{
var province=trimAll($("[name=province]").val(),"g");
var msg={"provinces":province/*,"cityid":userid*/};
sendClientMsg(root+"Order/addProvince",msg,"");
}
//$(function(){
//});
$(function(){
$("#aa").click(function(){
//var province=trimAll($("[name=pro]").val(),"g");
var signidR=trimAll($("[name=signid]").val(),"g");
var msg={"signidR":signidR,"cityid":userid};
sendClientMsg(root+"Order/addPre",msg,"");
})
})