$("#btnSave").click(function(){
debugger
var taskName=$("#taskName").val();
var principal=$("#principal").val();
var duration=$("#duration").val();
var beginTime=$("#beginTime").val();
var endTime=$("#endTime").val();
var sbenginTime=$("#sbenginTime").val();
var seenginTime=$("#seenginTime").val();
var progress=$("#progress").val();
if(taskName.length==0){
layer.alert("任务名称不能为空!",{icon: 0});
return;
}else if(principal.length==0){
layer.alert("负责人不能为空!",{icon: 0});
return;
}else if(duration.length==0 || isNaN(duration)){
layer.alert("工期不能为空且数字格式!",{icon: 0});
return;
}else if(beginTime.length==0 || endTime.length==0 ){
layer.alert("开始和结束时间不能为空!",{icon: 0});
return;
}else if(sbenginTime.length==0 || seenginTime.length==0){
layer.alert("实际开始和实际结束时间不能为空!",{icon: 0});
return;
}
/ else if(progress<1 || progress>100 ||isNaN(progress)){
layer.alert("进度必须在1到100之间!",{icon: 0});
return;
}
/
else if(progress=="0"||isNaN(progress)||progress.length==0){
layer.alert("进度必须在1到100之间!",{icon: 0});
return;
}

    else{
        $("#opId").val("editProject"); 
        $("#inputForm").submit();
    }
});