54 lines
1.2 KiB
JavaScript
54 lines
1.2 KiB
JavaScript
$(document).ready(function(){
|
|
|
|
clearErrorTips("tip","errorTips");
|
|
|
|
var msg={"id":vid};
|
|
sendClientMsg(root+"Vacancy/vacancyInfor",msg,"");
|
|
|
|
$("body").click(function(event){
|
|
var _id=$(event.target).attr("id");
|
|
var arr=String(_id).split("_");
|
|
|
|
if (arr[0]=="editVacancy")
|
|
{
|
|
clearErrorTips("tip","errorTips");
|
|
|
|
var number=trimAll($("[name=number]").val(),"g");
|
|
var cost=trimAll($("[name=cost]").val(),"g");
|
|
var design=trimAll($("[name=design]").val(),"g");
|
|
|
|
if (number=="")
|
|
{
|
|
setErrorTips("number_tip","errorTips",message[6]);
|
|
return false;
|
|
}
|
|
if (cost=="")
|
|
{
|
|
setErrorTips("cost_tip","errorTips",message[6]);
|
|
return false;
|
|
}
|
|
if (design=="")
|
|
{
|
|
setErrorTips("design_tip","errorTips",message[6]);
|
|
return false;
|
|
}
|
|
|
|
var msg={"vnumber":number,"vcost":cost,"vdesign":design,"vid":vid};
|
|
sendClientMsg(root+"Vacancy/editVacancy",msg,"");
|
|
}
|
|
})
|
|
|
|
});
|
|
|
|
function vacancyInfor(msg)
|
|
{
|
|
$("[name=number]").val(msg.number);
|
|
$("[name=cost]").val(msg.cost);
|
|
$("[name=design]").val(msg.design);
|
|
|
|
$("#ad_number").html(msg.adnumber);
|
|
$("#ad_icity").html(msg.city);
|
|
$("#ad_area").html(msg.area);
|
|
$("#ad_community").html(msg.community);
|
|
}
|