📄 trainingplan_modifyplan.jsp
字号:
y=(window.screen.height-wy)/2;
wposition=",left="+x+",top="+y;
window.open(urlstr,"上传报告文档","width="+wx+",height="+wy+",scrollbars=no,status=no"+wposition);
}
function download(attachno)
{
if(attachno == "")
{
alert("无法获取要下载的文件信息");
return;
}
var url = "<%=request.getContextPath()%>/servlet/DownloadAttachServlet?attachNo="+attachno;
window.location = url;
}
function fanhui()
{
if(confirm("确定返回?"))
window.history.back();
}
function popUpCalendarDlg(ctrlobj) {
showx = event.screenX - event.offsetX - 4 - 210 ; // + deltaX;
showy = event.screenY - event.offsetY + 18; // + deltaY;
newWINwidth = 210 + 4 + 18;
retval = window.showModalDialog("../include/date.htm", "", "dialogWidth:220px; dialogHeight:220px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; status:no; directories:yes;scroll:no;Resizable:no; " );
if( retval != null ){
ctrlobj.value = retval;
}
}
function selectTypeThatTrain(){
var x = event.clientX;
var y = event.clientY;
document.all.TypeThatTrainDIV.style.posLeft=x-45;
document.all.TypeThatTrainDIV.style.posTop=y-100;
document.all.TypeThatTrainDIV.style.visibility="visible";
document.getElementById("TypeThatTrainDIV").style.display="block";
}
function selectTrainingOrgLevel(){
var x = event.clientX;
var y = event.clientY;
document.all.TrainingOrgLevelDIV.style.posLeft=x-45;
document.all.TrainingOrgLevelDIV.style.posTop=y-100;
document.all.TrainingOrgLevelDIV.style.visibility="visible";
document.getElementById("TrainingOrgLevelDIV").style.display="block";
}
function selectTrainingtype(){
var x = event.clientX;
var y = event.clientY;
document.all.TrainingtypeDIV.style.posLeft=x-45;
document.all.TrainingtypeDIV.style.posTop=y-100;
document.all.TrainingtypeDIV.style.visibility="visible";
document.getElementById("TrainingtypeDIV").style.display="block";
}
//此方法未用到,等机构扩展表
function selectTrainingPlanScope()
{
wx=200;
wy=200;
urlstr="<%=request.getContextPath()%>/servlet/AuditedOrgListServlet";
x=(window.screen.width-wx)/2;
y=(window.screen.height-wy)/2;
wposition=",left="+x+",top="+y;
window.open(urlstr,"选择培训计划范围","width="+wx+",height="+wy+",scrollbars=yes,status=yes"+wposition);
}
function saveTrainingPlan(){
if(!check_neededItemIsNull()){
return false;}
if(!confirm("保存培训计划吗?")){
return false;
}
document.form1.trainingstate.value = "0";
document.form1.action = "<%=request.getContextPath()%>/servlet/TrainingPlan_ModifyPlanServlet2";
document.form1.submit();
}
function publishTrainingPlan(){
if(!check_neededItemIsNull()){
return false;}
if(!confirm("您要发布培训计划吗?")){
return false;
}
document.form1.trainingstate.value = "1";
document.form1.action = "<%=request.getContextPath()%>/servlet/TrainingPlan_ModifyPlanServlet2";
document.form1.submit();
}
function check_neededItemIsNull(){
if(document.form1.trainingname.value == ""){
alert("请填写培训班名称");
document.form1.trainingname.focus();
return false;
}
if(document.form1.trainingorg.value == ""){
alert("请填写主办单位");
document.form1.trainingorg.focus();
return false;
}
if(document.form1.trainingOrgLevel.value == ""){
alert("请填写主办单位级次");
document.form1.trainingOrgLevel.focus();
return false;
}
if(document.form1.begintime.value == ""){
alert("请填开始时间");
document.form1.begintime.focus();
return false;
}
if(document.form1.endtime.value == ""){
alert("请填写结束时间");
document.form1.endtime.focus();
return false;
}
if(document.form1.trainingplace.value == ""){
alert("请填写培训地点");
document.form1.trainingplace.focus();
return false;
}
if(document.form1.typeThatTrain.value == ""){
alert("请填写培训类型");
document.form1.typeThatTrain.focus();
return false;
}
if(document.form1.trainingtype.value == ""){
alert("请填写培训方式");
document.form1.trainingtype.focus();
return false;
}
if(!check_expectPersonnumberIsNum()){
return false;
}
if(!check_trainingdaysIsNum()){
return false;
}
return true;
}
function check_trainingdaysIsNum(){
if(document.form1.trainingdays.value != ""){
for(var i = 0;i < document.form1.trainingdays.value.length;i++){
if(!(document.form1.trainingdays.value.charCodeAt(i) >= 48 && document.form1.trainingdays.value.charCodeAt(i) <= 57)){
alert("培训天数请填写数字信息");
document.form1.trainingdays.focus();
return false;
}
}
}
return true;
}
function check_expectPersonnumberIsNum(){
if(document.form1.expectPersonnumber.value != ""){
for(var i = 0;i < document.form1.expectPersonnumber.value.length;i++){
if(!(document.form1.expectPersonnumber.value.charCodeAt(i) >= 48 && document.form1.expectPersonnumber.value.charCodeAt(i) <= 57)){
alert("培训人数请填写数字信息");
document.form1.expectPersonnumber.focus();
return false;
}
}
}
return true;
}
function maintenanceAttach(trainingno){
var url = "<%=request.getContextPath()%>/servlet/TrainingPlan_AttachListServlet?trainingno=" + trainingno;
window.open(url,"","width=600,height=400,left=200,top=200,scrollbars=yes");
}
function selectAuditingUnit() {
wx=200;
wy=200;
urlstr="<%=request.getContextPath()%>/jsp/plan/auditingtree.jsp?type=1";
x=(window.screen.width-wx)/2;
y=(window.screen.height-wy)/2;
wposition=",left="+x+",top="+y;
window.open(urlstr,"选择单位","width="+wx+",height="+wy+",scrollbars=yes,status=yes"+wposition);
}
function delScope(code) {
if(!confirm("您要删除选中的培训单位吗?"))
return;
var elements = document.all.traninScopes;
var elementLength = elements.length;
var _text = "";
for (var i = 0; i<elementLength; i++) {
if (code == elements[i].value) {
continue;
}
var temp = elements[i].value;
var spanText = eval("ts_" + temp).innerHTML;
_text += "<span id=ts_" + temp + ">";
_text += spanText;
_text += "</span> ";
//alert(_text);
}
trainingScope.innerHTML = _text;
}
</script>
<%
}else{
%>
没有取得所要修改的计划,请返回
<%
}
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -