@@ -223,7 +223,10 @@ var bootstrap = function ($, learun) { | |||||
$('#NewClassroomNo').siblings('div').html('教室<font face="宋体">*</font>'); | $('#NewClassroomNo').siblings('div').html('教室<font face="宋体">*</font>'); | ||||
} | } | ||||
} | } | ||||
page.query(); | |||||
var timer = setTimeout(function () { | |||||
page.query(); | |||||
clearTimeout(timer); | |||||
}, 3000) | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
@@ -257,7 +260,7 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}; | }; | ||||
// 设置表单数据 | // 设置表单数据 | ||||
setFormData = function (processId) { | |||||
setFormData = function (processId, param, callback) { | |||||
if (!!processId) { | if (!!processId) { | ||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTermAttemper/GetFormDataByProcessId?processId=' + processId, function (data) { | $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTermAttemper/GetFormDataByProcessId?processId=' + processId, function (data) { | ||||
for (var id in data) { | for (var id in data) { | ||||
@@ -299,9 +302,14 @@ var bootstrap = function ($, learun) { | |||||
$('#NewClassroomNo').siblings('div').html('教室<font face="宋体">*</font>'); | $('#NewClassroomNo').siblings('div').html('教室<font face="宋体">*</font>'); | ||||
} | } | ||||
} | } | ||||
var timer = setTimeout(function () { | |||||
page.query(); | |||||
clearTimeout(timer); | |||||
}, 3000) | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
callback && callback(); | |||||
} | } | ||||
// 验证数据是否填写完整 | // 验证数据是否填写完整 | ||||
validForm = function () { | validForm = function () { | ||||
@@ -338,7 +346,7 @@ var bootstrap = function ($, learun) { | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTermAttemper/SaveForm?keyValue=' + keyValue, postData, function (res) { | $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTermAttemper/SaveForm?keyValue=' + keyValue, postData, function (res) { | ||||
// 保存成功后才回调 | // 保存成功后才回调 | ||||
if (!!callBack) { | if (!!callBack) { | ||||
callBack(res, formData, i); | |||||
callBack(res, i); | |||||
} | } | ||||
}); | }); | ||||
}; | }; | ||||
@@ -41,6 +41,7 @@ var bootstrap = function ($, learun) { | |||||
p.TeachClassNo = $('#TeachClassNo').lrselectGet(); | p.TeachClassNo = $('#TeachClassNo').lrselectGet(); | ||||
p.EmpNo = $('#EmpNo').lrselectGet(); | p.EmpNo = $('#EmpNo').lrselectGet(); | ||||
p.ClassroomNo = $('#ClassroomNo').lrselectGet(); | p.ClassroomNo = $('#ClassroomNo').lrselectGet(); | ||||
//console.log(p); | |||||
//if (!!p.F_SchoolId && !!p.AcademicYearNo && !!p.Semester && !!p.DeptNo && !!p.MajorNo && !!p.LessonNo && !!p.TeachClassNo && !!p.EmpNo && !!p.ClassroomNo) { | //if (!!p.F_SchoolId && !!p.AcademicYearNo && !!p.Semester && !!p.DeptNo && !!p.MajorNo && !!p.LessonNo && !!p.TeachClassNo && !!p.EmpNo && !!p.ClassroomNo) { | ||||
if (!!p.AcademicYearNo && !!p.Semester && !!p.DeptNo && !!p.MajorNo && !!p.LessonNo && !!p.TeachClassNo && !!p.EmpNo && !!p.ClassroomNo) { | if (!!p.AcademicYearNo && !!p.Semester && !!p.DeptNo && !!p.MajorNo && !!p.LessonNo && !!p.TeachClassNo && !!p.EmpNo && !!p.ClassroomNo) { | ||||
//调度开始时间 | //调度开始时间 | ||||
@@ -226,11 +227,11 @@ var bootstrap = function ($, learun) { | |||||
$('#NewClassroomNo').siblings('div').html('教室<font face="宋体">*</font>'); | $('#NewClassroomNo').siblings('div').html('教室<font face="宋体">*</font>'); | ||||
} | } | ||||
} | } | ||||
page.query(); | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#AttemperStartTime').lrselectSet(data[id].AttemperStartTime); | |||||
$('#AttemperEndTime').lrselectSet(data[id].AttemperEndTime); | |||||
} | |||||
var timer = setTimeout(function () { | |||||
page.query(); | |||||
clearTimeout(timer); | |||||
},3000) | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
@@ -264,7 +265,7 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}; | }; | ||||
// 设置表单数据 | // 设置表单数据 | ||||
setFormData = function (processId) { | |||||
setFormData = function (processId, param, callback) { | |||||
if (!!processId) { | if (!!processId) { | ||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTermAttemper/GetFormDataByProcessId?processId=' + processId, function (data) { | $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTermAttemper/GetFormDataByProcessId?processId=' + processId, function (data) { | ||||
for (var id in data) { | for (var id in data) { | ||||
@@ -308,14 +309,14 @@ var bootstrap = function ($, learun) { | |||||
$('#NewClassroomNo').siblings('div').html('教室<font face="宋体">*</font>'); | $('#NewClassroomNo').siblings('div').html('教室<font face="宋体">*</font>'); | ||||
} | } | ||||
} | } | ||||
page.query(); | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#AttemperStartTime').lrselectSet(data[id].AttemperStartTime); | |||||
$('#AttemperEndTime').lrselectSet(data[id].AttemperEndTime); | |||||
} | |||||
var timer = setTimeout(function () { | |||||
page.query(); | |||||
clearTimeout(timer); | |||||
}, 3000) | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
callback && callback(); | |||||
} | } | ||||
// 验证数据是否填写完整 | // 验证数据是否填写完整 | ||||
validForm = function () { | validForm = function () { | ||||
@@ -348,7 +349,7 @@ var bootstrap = function ($, learun) { | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTermAttemper/SaveForm?keyValue=' + keyValue, postData, function (res) { | $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTermAttemper/SaveForm?keyValue=' + keyValue, postData, function (res) { | ||||
// 保存成功后才回调 | // 保存成功后才回调 | ||||
if (!!callBack) { | if (!!callBack) { | ||||
callBack(res, formData, i); | |||||
callBack(res, i); | |||||
} | } | ||||
}); | }); | ||||
}; | }; | ||||
@@ -408,21 +408,36 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}; | }; | ||||
refreshGirdData = function (res, postData) { | refreshGirdData = function (res, postData) { | ||||
if (res.code == 200) { | |||||
//if (res.code == 200) { | |||||
// // 发起流程 | |||||
// learun.workflowapi.create({ | |||||
// isNew: true, | |||||
// schemeCode: 'ArrangeLessonTermAttemper',// 填写流程对应模板编号 | |||||
// processId: processId, | |||||
// processName: '课程异动申请',// 对应流程名称 | |||||
// processLevel: '1', | |||||
// description: '', | |||||
// formData: JSON.stringify(postData), | |||||
// callback: function (res, data) { | |||||
// } | |||||
// }); | |||||
// page.search(); | |||||
//} | |||||
if (res && res.code && res.code == 200) { | |||||
// 发起流程 | // 发起流程 | ||||
learun.workflowapi.create({ | |||||
isNew: true, | |||||
schemeCode: 'ArrangeLessonTermAttemper',// 填写流程对应模板编号 | |||||
var postData = { | |||||
schemeCode: 'ArrangeLessonTermAttemper',// 填写流程对应模板编号 | |||||
processId: processId, | processId: processId, | ||||
processName: '课程异动申请',// 对应流程名称 | |||||
processLevel: '1', | |||||
description: '', | |||||
formData: JSON.stringify(postData), | |||||
callback: function (res, data) { | |||||
} | |||||
level: '1', | |||||
}; | |||||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||||
learun.loading(false); | |||||
}); | }); | ||||
page.search(); | |||||
} | } | ||||
page.search(); | |||||
}; | }; | ||||
page.init(); | page.init(); | ||||
} | } |
@@ -7,17 +7,21 @@ using System.Threading.Tasks; | |||||
namespace Learun.Application.WorkFlow | namespace Learun.Application.WorkFlow | ||||
{ | { | ||||
public class ArrangeLessonTermAttemperMethod : INodeMethod | |||||
public class ArrangeLessonTermAttemperMethod : IWorkFlowMethod | |||||
{ | { | ||||
ArrangeLessonTermAttemperIBLL arrangeLessonTermAttemperIBLL = new ArrangeLessonTermAttemperBLL(); | ArrangeLessonTermAttemperIBLL arrangeLessonTermAttemperIBLL = new ArrangeLessonTermAttemperBLL(); | ||||
public void Sucess(string processId) | |||||
public void Execute(WfMethodParameter parameter) | |||||
{ | { | ||||
arrangeLessonTermAttemperIBLL.ModifyStatusByProcessId(2, processId); | |||||
} | |||||
public void Fail(string processId) | |||||
{ | |||||
arrangeLessonTermAttemperIBLL.ModifyStatusByProcessId(0, processId); | |||||
if (parameter.code == "agree") | |||||
{ | |||||
arrangeLessonTermAttemperIBLL.ModifyStatusByProcessId(2, parameter.processId); | |||||
} | |||||
else | |||||
{ | |||||
arrangeLessonTermAttemperIBLL.ModifyStatusByProcessId(0, parameter.processId); | |||||
} | |||||
} | } | ||||
} | } | ||||
} | } |