diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs index cecc15137..03e130769 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs @@ -17,6 +17,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public class StuInfoBasicChangeController : MvcControllerBase { private StuInfoBasicChangeIBLL stuInfoBasicChangeIBLL = new StuInfoBasicChangeBLL(); + private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); #region 视图功能 @@ -80,6 +81,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult GetFormData(string keyValue) { var StuInfoBasicChangeData = stuInfoBasicChangeIBLL.GetStuInfoBasicChangeEntity(keyValue); + StuInfoBasicChangeData.Grade = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(StuInfoBasicChangeData.StuNo)?.Grade; var jsonData = new { StuInfoBasicChange = StuInfoBasicChangeData, @@ -122,7 +124,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers stuInfoBasicChangeIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } - + /// /// 审核实体数据 /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs index a38ad1aad..f7f40a4d6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs @@ -23,6 +23,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public class StuScoreController : MvcControllerBase { private StuScoreIBLL stuScoreIBLL = new StuScoreBLL(); + private StuScoreNotPassIBLL stuScoreNotPassIBLL = new StuScoreNotPassBLL(); + private StuScoreNotPassTwoIBLL stuScoreNotPassTwoIBLL = new StuScoreNotPassTwoBLL(); private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL(); private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); private CdMajorIBLL cdMajorIBLL = new CdMajorBLL(); @@ -544,7 +546,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers var loginInfo = LoginUserInfo.Get(); var semesterAndYear = Common.GetSemesterAndYear(); var data = stuScoreIBLL.GetClassNoDataForInput(loginInfo.account, loginInfo.Description, lessonNo, semesterAndYear.AcademicYearShort, semesterAndYear.Semester); - + return Success(data); } /// @@ -1219,6 +1221,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers /// /// 成绩导入 /// + /// 1必修;2选修;3补考成绩;4二次补考成绩 + /// + /// + /// /// [HttpPost] [ValidateAntiForgeryToken] @@ -1228,8 +1234,22 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers if (!string.IsNullOrEmpty(path)) { DataTable dt = ExcelHelper.ExcelImport(path); - var res = stuScoreIBLL.ExecuteImportExcel(type, dt, fileGuid, queryJson); - + (DataTable failDt, int snum, int fnum) res; + if (type == 1 || type == 2) + { + //必修选修 + res = stuScoreIBLL.ExecuteImportExcel(type, dt, fileGuid, queryJson); + } + else if (type == 3) + { + //补考 + res = stuScoreNotPassIBLL.ExecuteImportExcelForNotPass(dt, fileGuid, queryJson); + } + else + { + //二次补考 + res = stuScoreNotPassTwoIBLL.ExecuteImportExcelForNotPassTwo(dt, fileGuid, queryJson); + } var data = new { Success = res.snum, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.js index 7ab5cc570..96ba58c58 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.js @@ -5,6 +5,7 @@ * 描 述:学籍异动 */ var acceptClick; +var Grade; var keyValue = request('keyValue'); var bootstrap = function ($, learun) { "use strict"; @@ -65,29 +66,36 @@ var bootstrap = function ($, learun) { param: { strWhere: "deptno='" + item.deptno + "' AND CheckMark=1 order by majorno" } }); } else { - $('#NewMajorNo').lrselectRefresh({ - url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', - param: { strWhere: "CheckMark=1 order by majorno" } - }); + //$('#NewMajorNo').lrselectRefresh({ + // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + // param: { strWhere: "CheckMark=1 order by majorno" } + //}); } } }); $('#NewMajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname', select: function (item) { if (item != null && item != undefined) { + var gradeWhere = ''; + if (!!Grade) { + gradeWhere = " and Grade='" + Grade + "'"; + } $('#NewClassNo').lrselectRefresh({ url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', - param: { strWhere: "MajorNo='" + item.majorno + "' AND CheckMark=1 order by classno" } + param: { strWhere: "MajorNo='" + item.majorno + "' AND CheckMark=1" + gradeWhere+" order by classno" } }); } else { - $('#NewClassNo').lrselectRefresh({ - url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', - param: { strWhere: "CheckMark=1 order by classno" } - }); + //$('#NewClassNo').lrselectRefresh({ + // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + // param: { strWhere: "CheckMark=1 order by classno" } + //}); } } }); - $('#NewClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); + $('#NewClassNo').lrselect({ + value: 'classno', text: 'classname' + }); + //$('#NewClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); //监听学号 $("#StuNo").on('blur', function () { var StuNo = $(this).val(); @@ -99,6 +107,7 @@ var bootstrap = function ($, learun) { $("#DeptNo").lrselectSet(data.DeptNo); $("#MajorNo").lrselectSet(data.MajorNo); $("#ClassNo").lrselectSet(data.ClassNo); + Grade = data.Grade; } else { learun.alert.warning("学生不存在!"); //return false; @@ -117,6 +126,7 @@ var bootstrap = function ($, learun) { $("#DeptNo").lrselectSet(data.DeptNo); $("#MajorNo").lrselectSet(data.MajorNo); $("#ClassNo").lrselectSet(data.ClassNo); + Grade = data.Grade; } else { learun.alert.warning("学生不存在!"); return false; @@ -139,7 +149,7 @@ var bootstrap = function ($, learun) { } else { $('[data-table="' + id + '"]').lrSetFormData(data[id]); - + Grade = data[id].Grade; $(".NewContainer").find('.contentDiv').attr("isvalid", "yes"); $(".NewContainer").find('.contentDiv').attr("checkexpession", "NotNull"); $(".NewContainer").find('.contentDiv').attr('readonly', 'readonly'); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexInTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexInTeacher.js index f077d656a..add8ff5d4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexInTeacher.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexInTeacher.js @@ -140,6 +140,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.OrdinaryScore < 0) { + row.OrdinaryScore = '0'; + } row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, @@ -151,6 +154,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.TermInScore < 0) { + row.TermInScore = '0'; + } row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, @@ -162,6 +168,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.TermEndScore < 0) { + row.TermEndScore = '0'; + } row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, @@ -173,6 +182,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.OtherScore < 0) { + row.OtherScore = '0'; + } row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, @@ -315,6 +327,10 @@ var bootstrap = function ($, learun) { $('#lr_save').show(); //隐藏“开始录入”按钮 $('#lr_input').hide(); + //隐藏“提交教务处”、“去审核成绩”、“设置成绩比例”按钮 + $('#lr_check').hide(); + $('#lr_uncheck').hide(); + $('#lr_setScale').hide(); //显示“倒计时” $('.timeBox').show(); $('#minutes').html($('#minutes').attr('data-minutes')); @@ -371,6 +387,10 @@ var bootstrap = function ($, learun) { $('#lr_save').hide(); //显示“开始录入”按钮 $('#lr_input').show(); + //显示“提交教务处”、“去审核成绩”、“设置成绩比例”按钮 + $('#lr_check').show(); + $('#lr_uncheck').show(); + $('#lr_setScale').show(); //隐藏“倒计时” $('.timeBox').hide(); //停止倒计时 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexInTeacherImport.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexInTeacherImport.js index 0f8490701..f5f1fdf00 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexInTeacherImport.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexInTeacherImport.js @@ -83,9 +83,15 @@ var bootstrap = function ($, learun) { columnJson = JSON.stringify(columnJson.filter(item => item.name !== 'CheckMark')); var rowJson = JSON.stringify(learun.frameTab.currentIframe().rowJson); var fileName = "成绩录入数据"; - if (type == '2') + if (type == '2') { fileName = "选修成绩录入数据"; - + } + else if (type == '3') { + fileName = "补考成绩录入"; + } + else if (type == '4') { + fileName = "二次补考成绩录入"; + } learun.download({ method: "POST", url: '/EducationalAdministration/StuScore/ExportExcel', diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.js index d97e099bc..fd6eeeb11 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.js @@ -138,6 +138,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.OrdinaryScore < 0) { + row.OrdinaryScore = '0'; + } row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, @@ -149,6 +152,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.TermInScore < 0) { + row.TermInScore = '0'; + } row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, @@ -160,6 +166,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.TermEndScore < 0) { + row.TermEndScore = '0'; + } row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, @@ -171,6 +180,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.OtherScore < 0) { + row.OtherScore = '0'; + } row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, @@ -313,6 +325,10 @@ var bootstrap = function ($, learun) { $('#lr_save').show(); //隐藏“开始录入”按钮 $('#lr_input').hide(); + //隐藏“提交教务处”、“去审核成绩”按钮 + $('#lr_check').hide(); + $('#lr_uncheck').hide(); + $('#lr_setScale').hide(); //显示“倒计时” $('.timeBox').show(); $('#minutes').html($('#minutes').attr('data-minutes')); @@ -369,6 +385,10 @@ var bootstrap = function ($, learun) { $('#lr_save').hide(); //显示“开始录入”按钮 $('#lr_input').show(); + //显示“提交教务处”、“去审核成绩”、“设置成绩比例”按钮 + $('#lr_check').show(); + $('#lr_uncheck').show(); + $('#lr_setScale').show(); //隐藏“倒计时” $('.timeBox').hide(); //停止倒计时 @@ -522,7 +542,7 @@ var bootstrap = function ($, learun) { refreshGirdData2(); } }); - + } else { learun.alert.warning("学生成绩不存在!"); return false; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndexInTeacher.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndexInTeacher.cshtml index 77eb1de49..1040a41a3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndexInTeacher.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndexInTeacher.cshtml @@ -89,6 +89,7 @@  提交教务处  去审核成绩 +  导入 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndexInTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndexInTeacher.js index 68692dae2..30ad1b905 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndexInTeacher.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndexInTeacher.js @@ -17,6 +17,9 @@ var headData; //常规列头 var headDataEdit; //可编辑列头 var headDataNoEdit; //不可编辑列头 var headDataFinally; //最终列头 +var rowJson; +var columnJson; +var queryJson; var bootstrap = function ($, learun) { "use strict"; var page = { @@ -131,11 +134,14 @@ var bootstrap = function ($, learun) { ]; headDataEdit = [ { - label: '补考成绩', name: 'TermEndScore', width: 80, align: "left", + label: '期末成绩', name: 'TermEndScore', width: 80, align: "left", edit: { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.TermEndScore < 0) { + row.TermEndScore = '0'; + } row.Score = (parseFloat(row.TermEndScore || '0') * 1).toFixed(0); $('#gridtable').jfGridSet('updateRow', rownum); }, @@ -212,6 +218,9 @@ var bootstrap = function ($, learun) { $('#lr_save').show(); //隐藏“开始录入”按钮 $('#lr_input').hide(); + //隐藏“提交教务处”、“去审核成绩”按钮 + $('#lr_check').hide(); + $('#lr_uncheck').hide(); //显示“倒计时” $('.timeBox').show(); $('#minutes').html($('#minutes').attr('data-minutes')); @@ -267,6 +276,9 @@ var bootstrap = function ($, learun) { $('#lr_save').hide(); //显示“开始录入”按钮 $('#lr_input').show(); + //显示“提交教务处”、“去审核成绩”按钮 + $('#lr_check').show(); + $('#lr_uncheck').show(); //隐藏“倒计时” $('.timeBox').hide(); //停止倒计时 @@ -368,6 +380,57 @@ var bootstrap = function ($, learun) { learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/AddMinutes', { queryJson: JSON.stringify(query), minutes: newMinutes }, function (res) { }); } }); + //导入 + $('#lr_importScore').on('click', function () { + var query = judgeSelect(); + if (query) { + //成绩被占用,且是登录用户时,根据编辑时间判断是否是本人; + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) { + if (data != null) { + if (data.CheckMark == 1) { + learun.alert.warning("学生成绩已审核!"); + return false; + } + if (data.IsEditable == 0) { + if (data.EditUserId == learun.clientdata.get(['userinfo']).account) { + if (modifyDate != null && modifyDate != data.ModifyDate) { + learun.alert.warning("当前班级成绩被修改,请重新获取!"); + return false; + } + } else { + learun.alert.warning("当前班级成绩由账号为" + data.EditUserId + "的教师在使用!"); + return false; + } + } + + rowJson = $('#gridtable').jfGridGet('showData'); + columnJson = $('#gridtable').jfGridGet('settingInfo').headData; + + //条件 + var $content = $('body').find('.lr-layout-tool-left'); + queryJson = $content.lrGetFormData(); + + learun.layerForm({ + id: 'indexImport', + title: "导入补考成绩", + url: top.$.rootUrl + '/EducationalAdministration/StuScore/InputScoreIndexInTeacherImport?type=3', + width: 600, + height: 400, + maxmin: true, + btn: null, + end: function () { + refreshGirdData2(); + } + }); + + + } else { + learun.alert.warning("学生成绩不存在!"); + return false; + } + }); + } + }); }, bindSelect: function () { //校区 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndexInTeacher.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndexInTeacher.cshtml index 77982bdda..6ee396ad4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndexInTeacher.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndexInTeacher.cshtml @@ -89,6 +89,7 @@  提交教务处  去审核成绩 +  导入 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndexInTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndexInTeacher.js index 2f161ed8b..ebcbcd69e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndexInTeacher.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndexInTeacher.js @@ -17,6 +17,9 @@ var headData; //常规列头 var headDataEdit; //可编辑列头 var headDataNoEdit; //不可编辑列头 var headDataFinally; //最终列头 +var rowJson; +var columnJson; +var queryJson; var bootstrap = function ($, learun) { "use strict"; var page = { @@ -131,11 +134,14 @@ var bootstrap = function ($, learun) { ]; headDataEdit = [ { - label: '补考成绩', name: 'TermEndScore', width: 80, align: "left", + label: '期末成绩', name: 'TermEndScore', width: 80, align: "left", edit: { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.TermEndScore < 0) { + row.TermEndScore = '0'; + } row.Score = (parseFloat(row.TermEndScore || '0') * 1).toFixed(0); $('#gridtable').jfGridSet('updateRow', rownum); }, @@ -212,6 +218,9 @@ var bootstrap = function ($, learun) { $('#lr_save').show(); //隐藏“开始录入”按钮 $('#lr_input').hide(); + //隐藏“提交教务处”、“去审核成绩”按钮 + $('#lr_check').hide(); + $('#lr_uncheck').hide(); //显示“倒计时” $('.timeBox').show(); $('#minutes').html($('#minutes').attr('data-minutes')); @@ -267,6 +276,9 @@ var bootstrap = function ($, learun) { $('#lr_save').hide(); //显示“开始录入”按钮 $('#lr_input').show(); + //显示“提交教务处”、“去审核成绩”按钮 + $('#lr_check').show(); + $('#lr_uncheck').show(); //隐藏“倒计时” $('.timeBox').hide(); //停止倒计时 @@ -368,6 +380,56 @@ var bootstrap = function ($, learun) { learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/AddMinutes', { queryJson: JSON.stringify(query), minutes: newMinutes }, function (res) { }); } }); + + //导入 + $('#lr_importScore').on('click', function () { + var query = judgeSelect(); + if (query) { + //成绩被占用,且是登录用户时,根据编辑时间判断是否是本人; + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) { + if (data != null) { + if (data.CheckMark == 1) { + learun.alert.warning("学生成绩已审核!"); + return false; + } + if (data.IsEditable == 0) { + if (data.EditUserId == learun.clientdata.get(['userinfo']).account) { + if (modifyDate != null && modifyDate != data.ModifyDate) { + learun.alert.warning("当前班级成绩被修改,请重新获取!"); + return false; + } + } else { + learun.alert.warning("当前班级成绩由账号为" + data.EditUserId + "的教师在使用!"); + return false; + } + } + rowJson = $('#gridtable').jfGridGet('showData'); + columnJson = $('#gridtable').jfGridGet('settingInfo').headData; + + //条件 + var $content = $('body').find('.lr-layout-tool-left'); + queryJson = $content.lrGetFormData(); + + learun.layerForm({ + id: 'indexImport', + title: "导入二次补考成绩", + url: top.$.rootUrl + '/EducationalAdministration/StuScore/InputScoreIndexInTeacherImport?type=4', + width: 600, + height: 400, + maxmin: true, + btn: null, + end: function () { + refreshGirdData2(); + } + }); + } else { + learun.alert.warning("学生成绩不存在!"); + return false; + } + }); + } + }); + }, bindSelect: function () { //校区 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.js index 2744f40dd..5e4a3dce0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SignForm.js @@ -40,10 +40,56 @@ var bootstrap = function ($, learun) { }); }); + function debounce(fn, delay) { + let time = null; + return function () { + if (time !== null) { + clearTimeout(time); + } + time = setTimeout(() => { + fn.call(this); + }, delay) + } + } + + //$('#btn_finish').on('click', debounce(function () { + // console.log('123456') + + // var datapair = $sigdiv.jsignature("getdata"); + // top.flowauditfn(datapair,stampurl); + // learun.layerclose(window.name); + + //},500)) + + function debounce(fn, delay) { + let time = null; + return function () { + if (time !== null) { + clearTimeout(time); + } + time = setTimeout(() => { + fn.call(this); + }, delay) + } + } + + //$('#btn_finish').on('click', debounce(function () { + // console.log('123456') + + // var datapair = $sigdiv.jsignature("getdata"); + // top.flowauditfn(datapair,stampurl); + // learun.layerclose(window.name); + + //},500)) + $('#btn_finish').on('click', function () { - var datapair = $sigdiv.jSignature("getData"); - top.flowAuditfn(datapair,stampUrl); - learun.layerClose(window.name); + learun.loading(true, '正在提交'); + var datapair = $sigdiv.jSignature("getData"); + top.flowAuditfn(datapair,stampUrl); + learun.layerClose(window.name); + setTimeout(function () { + learun.loading(false); + }); }); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Module/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Module/Index.js index 15eaed853..269cb95b3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Module/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Module/Index.js @@ -45,7 +45,7 @@ var bootstrap = function ($, learun) { title: '编辑功能', url: top.$.rootUrl + '/LR_SystemModule/Module/Form?keyValue=' + keyValue, height: 430, - width: 700, + width: 755, btn: null }); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jfGrid/jfgrid.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jfGrid/jfgrid.js index 3ad7c4e6a..a4575149b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jfGrid/jfgrid.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jfGrid/jfgrid.js @@ -204,18 +204,18 @@ if (dfop.isShowNum) { var $num = $('
'); $border.prepend($num); - _width += 30; + _width += 60; } if (dfop.isMultiselect) { var $cb = $('
') .css('left', _width + 'px').css('line-height', (dfop._headHeight - 1) + 'px'); $border.prepend($cb); - _width += 30; + _width += 60; } if (dfop.isSubGrid) { var $sub = $('
').css('left', _width + 'px'); $border.prepend($sub); - _width += 30; + _width += 60; } dfop._borderLeftPadding = _width; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 89eae60e0..d803fc614 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -8086,8 +8086,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminAccordion/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminAccordion/Index.js index 246ab8796..4c7fa8928 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminAccordion/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminAccordion/Index.js @@ -157,6 +157,10 @@ } else { } break; + case 'open':// 窗口 + var newWin = window.open(o.F_UrlAddress); + newWin.location.replace(o.F_UrlAddress); + break; case "expand": var n = m.next(); if (n.is(":visible")) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminTop/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminTop/Index.js index 397e11700..4853d508e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminTop/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminTop/Index.js @@ -127,6 +127,10 @@ h.frameTab.open(q) } else { } break; + case "open":// 窗口 + var newWin = window.open(q.F_UrlAddress); + newWin.location.replace(q.F_UrlAddress); + break; case "expand": if (!o.hasClass("active")) { // console.log(11) @@ -152,6 +156,10 @@ h.frameTab.open(q) } else { } break; + case "open":// 窗口 + var newWin = window.open(q.F_UrlAddress); + newWin.location.replace(q.F_UrlAddress); + break; case "expand": var p = o.next(); if (p.is(":visible")) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.css b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.css index 9e1c2d243..d1ba7817b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.css +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.css @@ -47,7 +47,7 @@ position: absolute; top: 0; left: 0; - width: 30px; + width: 60px; height: 100%; border-right: 1px solid #ccc; } @@ -165,7 +165,7 @@ left: 0; font-size: 12px; color: #333; - width: 30px; + width: 60px; line-height: 27px; border-bottom: 1px solid #ccc; border-right: 1px solid #ccc; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js index 767cc70ed..0b5fc2ada 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js @@ -154,7 +154,7 @@ op.running.statisticData[item.name] = op.running.statisticData[item.name] || 0; op.running.statisticData[item.name] += (parseFloat(text || 0) - rowItem.statisticsNum); rowItem.statisticsNum = parseFloat(text || 0); - $('#jfgrid_statistic_' + op.id + ' [name="' + item.name + '"]').text(op.running.statisticData[item.name]); + $('#jfgrid_statistic_' + op.id + ' [name="' + item.name + '"]').text(op.running.statisticData[item.name].toFixed(2)); } $expend = null; @@ -174,7 +174,7 @@ op.running.statisticData[item.name] = op.running.statisticData[item.name] || 0; op.running.statisticData[item.name] += (parseFloat(text || 0) - rowItem.statisticsNum); rowItem.statisticsNum = parseFloat(text || 0); - $('#jfgrid_statistic_' + op.id + ' [name="' + item.name + '"]').text(op.running.statisticData[item.name]); + $('#jfgrid_statistic_' + op.id + ' [name="' + item.name + '"]').text(op.running.statisticData[item.name].toFixed(2)); } }, value, row, op, rowItem.$cell); @@ -449,7 +449,7 @@ op.running.statisticData[item.name] += (parseFloat(rowItem.text || 0) - rowItem.statisticsNum); rowItem.statisticsNum = parseFloat(rowItem.text || 0); - $('#jfgrid_statistic_' + op.id + ' [name="' + item.name + '"]').text(op.running.statisticData[item.name]); + $('#jfgrid_statistic_' + op.id + ' [name="' + item.name + '"]').text(op.running.statisticData[item.name].toFixed(2)); } $expend = null; @@ -998,20 +998,20 @@ // 判断是否有序号列 if (op.isShowNum) { $border.append('
'); - op.running.leftWidth += 30; + op.running.leftWidth += 60; } // 判断是否允许多选 if (op.isMultiselect) { var $cb = $('
') .css({ 'left': op.running.leftWidth, 'line-height': (op.running.headHeight - 1) + 'px' }); $border.append($cb); - op.running.leftWidth += 30; + op.running.leftWidth += 60; } // 是否有展开 if (op.isSubGrid) { var $sub = $('
').css('left', op.running.leftWidth); $border.append($sub); - op.running.leftWidth += 30; + op.running.leftWidth += 60; } op.running.leftWidth += op.running.frozenleft; $self.css({ 'padding-top': op.running.headHeight }); @@ -1281,7 +1281,7 @@ row['jfcheck'].$cell.css({ 'top': row['jfcheck'].top, 'left': row['jfcheck'].left, 'text-align': 'center', 'height': op.rowHeight, 'line-height': (op.rowHeight - 1) + 'px' }); $left.append(row['jfcheck'].$cell); - _left += 30; + _left += 60; } // 是否有子表选项 if (op.isSubGrid) { @@ -1293,7 +1293,7 @@ }; row['jfsubGrid'].$cell.css({ 'top': row['jfsubGrid'].top, 'left': row['jfsubGrid'].left, 'text-align': 'center', 'height': op.rowHeight, 'line-height': (op.rowHeight - 1) + 'px' }); $left.append(row['jfsubGrid'].$cell); - _left += 30; + _left += 60; } // 加载固定列数据 @@ -2153,7 +2153,7 @@ isAutoHeight: false, // 自动适应表格高度 height: 0, rowHeight: 28, // 行高 - numRowWitdh: 30 // 序号列宽度 + numRowWitdh: 60 // 序号列宽度 }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Utility/ExcelExportForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Utility/ExcelExportForm.js index 9c0393278..4b2f40af0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Utility/ExcelExportForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Utility/ExcelExportForm.js @@ -32,7 +32,14 @@ var bootstrap = function ($, learun) { parent.layer.close(index); //再执行关闭 return; } - learun.frameTab.currentIframe().$('#' + gridId).jfGridSet('reloadall'); + + let tableisPage = learun.frameTab.currentIframe().$('#' + gridId).jfGridGet('settingInfo').isPage; + + if (tableisPage) { + learun.frameTab.currentIframe().$('#' + gridId).jfGridSet('reloadall'); + } + + //learun.frameTab.currentIframe().$('#' + gridId).jfGridSet('reloadall'); columnModel = learun.frameTab.currentIframe().$('#' + gridId).jfGridGet('settingInfo').headData; } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeEntity.cs index 4e04ce9f7..e3395e20b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeEntity.cs @@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 日 期:2019-10-28 11:48 /// 描 述:学籍异动 ///
- public class StuInfoBasicChangeEntity + public class StuInfoBasicChangeEntity { #region 实体成员 /// @@ -119,6 +119,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } #endregion #region 扩展字段 + [NotMapped] + public string Grade { get; set; } + #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs index 1ffebd30f..4187dde83 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs @@ -2303,7 +2303,20 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad num++; if (!academicYearNo_dr.Equals(AcademicYearNo) || !semester_dr.Equals(Semester)) { - dr["导入错误"] = "学年学期与查询条件不符!"; + dr["导入错误"] = "学年学期与查询条件不匹配!"; + failDt.Rows.Add(dr.ItemArray); + continue; + } + + if (!classinfo_dr.Equals(classInfoEntity.ClassName)) + { + dr["导入错误"] = "班级与查询条件班级(" + classInfoEntity.ClassName + ")不匹配!"; + failDt.Rows.Add(dr.ItemArray); + continue; + } + if (!lessoninfo_dr.Equals(lessonInfoEntity.LessonName)) + { + dr["导入错误"] = "课程与查询条件课程(" + lessonInfoEntity.LessonName + ")不匹配!"; failDt.Rows.Add(dr.ItemArray); continue; } @@ -2319,6 +2332,12 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad var TermInScore = Convert.ToDecimal(string.IsNullOrEmpty(dr["期中成绩"].ToString().Trim()) ? "0" : dr["期中成绩"].ToString().Trim()); var TermEndScore = Convert.ToDecimal(string.IsNullOrEmpty(dr["期末成绩"].ToString().Trim()) ? "0" : dr["期末成绩"].ToString().Trim()); var OtherScore = Convert.ToDecimal(string.IsNullOrEmpty(dr["其他成绩"].ToString().Trim()) ? "0" : dr["其他成绩"].ToString().Trim()); + if (OrdinaryScore < 0 || TermInScore < 0 || TermEndScore < 0 || OtherScore < 0) + { + dr["导入错误"] = "成绩必须大于0!"; + failDt.Rows.Add(dr.ItemArray); + continue; + } var Score = Math.Round(Convert.ToDouble(OrdinaryScore * (stuSelectLessonListEntity.OrdinaryScoreScale / 100) + TermInScore * (stuSelectLessonListEntity.TermInScoreScale / 100) + TermEndScore * (stuSelectLessonListEntity.TermEndScoreScale / 100) + @@ -2427,7 +2446,6 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad var lessoninfo_dr = dr["课程名称"].ToString().Trim(); var classRoominfo_dr = dr["教室名称"].ToString().Trim(); var lessonSection_dr = dr["节次"].ToString().Trim(); - //var lessonNo_dr = lessonInfoList.FirstOrDefault(x => x.LessonName == lessoninfo_dr)?.LessonNo; //var classRoomNo_dr = classRoomList.FirstOrDefault(x => x.ClassroomName == classRoominfo_dr)?.ClassroomNo; if (!string.IsNullOrEmpty(stuno)) @@ -2436,12 +2454,30 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad var item = list.Find(x => x.StuNo == stuno && x.LessonNo == LessonNo && x.ClassRoomNo == ClassRoomNo && x.LessonSection == LessonSection); if (!academicYearNo_dr.Equals(AcademicYearNo) || !semester_dr.Equals(semester_dr)) { - dr["导入错误"] = "学年学期与查询条件不符!"; + dr["导入错误"] = "学年学期与查询条件不匹配!"; + failDt.Rows.Add(dr.ItemArray); + continue; + } + + if (!lessoninfo_dr.Equals(lessonInfoEntity.LessonName)) + { + dr["导入错误"] = "课程与查询条件课程(" + lessonInfoEntity.LessonName + ")不匹配!"; + failDt.Rows.Add(dr.ItemArray); + continue; + } + if (!classRoominfo_dr.Equals(classRoomEntity.ClassroomName)) + { + dr["导入错误"] = "教室与查询条件教室(" + classRoomEntity.ClassroomName + ")不匹配!"; + failDt.Rows.Add(dr.ItemArray); + continue; + } + if (!lessonSection_dr.Equals(LessonSection)) + { + dr["导入错误"] = "节次与查询条件节次(" + LessonSection + ")不匹配!"; failDt.Rows.Add(dr.ItemArray); continue; } - if (!lessoninfo_dr.Equals(lessonInfoEntity.LessonName) || !classRoominfo_dr.Equals(classRoomEntity.ClassroomName) || !lessonSection_dr.Equals(LessonSection)) - //if (item == null) + if (item == null) { dr["导入错误"] = "课程:" + lessonInfoEntity.LessonName + "在" + LessonSection + "节次找不到学号为" + stuno + "的学生"; failDt.Rows.Add(dr.ItemArray); @@ -2451,6 +2487,13 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad var TermInScore = Convert.ToDecimal(string.IsNullOrEmpty(dr["期中成绩"].ToString().Trim()) ? "0" : dr["期中成绩"].ToString().Trim()); var TermEndScore = Convert.ToDecimal(string.IsNullOrEmpty(dr["期末成绩"].ToString().Trim()) ? "0" : dr["期末成绩"].ToString().Trim()); var OtherScore = Convert.ToDecimal(string.IsNullOrEmpty(dr["其他成绩"].ToString().Trim()) ? "0" : dr["其他成绩"].ToString().Trim()); + if (OrdinaryScore < 0 || TermInScore < 0 || TermEndScore < 0 || OtherScore < 0) + { + dr["导入错误"] = "成绩必须大于0!"; + failDt.Rows.Add(dr.ItemArray); + continue; + } + var Score = Math.Round(Convert.ToDouble(OrdinaryScore * (stuSelectLessonListOfElectiveEntity.OrdinaryScoreScale / 100) + TermInScore * (stuSelectLessonListOfElectiveEntity.TermInScoreScale / 100) + TermEndScore * (stuSelectLessonListOfElectiveEntity.TermEndScoreScale / 100) + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassBLL.cs index 06edde13f..ea3ca03ef 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassBLL.cs @@ -441,6 +441,27 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + + public (DataTable failDt, int snum, int fnum) ExecuteImportExcelForNotPass(DataTable dt, string fileGuid, + string queryJson) + { + try + { + return stuScoreNotPassService.ExecuteImportExcelForNotPass(dt, fileGuid, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassIBLL.cs index ad1e1472d..84819cd12 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassIBLL.cs @@ -123,6 +123,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// void SubmitStuScore(string AcademicYearNo, string Semester, string LessonNo, string TeachClassNo, string EmpNo); + /// + /// 补考成绩导入 + /// + /// + /// + /// + /// + (DataTable failDt, int snum, int fnum) ExecuteImportExcelForNotPass(DataTable dt, string fileGuid, + string queryJson); + #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassService.cs index e4b759a07..2b9824fe5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassService.cs @@ -1,4 +1,6 @@ using Dapper; +using Learun.Cache.Base; +using Learun.Cache.Factory; using Learun.DataBase.Repository; using Learun.Util; using System; @@ -76,6 +78,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } #endregion + #region 缓存定义 + private ICache cache = CacheFactory.CaChe(); + private string cacheKey = "Learun_adms_excelError_"; + #endregion #region 获取数据 /// @@ -186,7 +192,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration // @" left join StuScoreNotPass ssnp on ssnp.StuNo = a.StuNo and ssnp.lessonno = a.lessonno "); // strSql.Append(@" where 1=1 and ( ssnp.StuNo not in (select StuNo from StuInfoBasic where ChangeStatus=1) and a.LessonSortNo='1' ) // and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10)) "); - + //新 strSql.Append(@"select ISNULL(ssnp.Score,0) as BKScore,ssnp.CheckMark as IsSubmit,c.classname,a.*,CONVERT(varchar,a.OrdinaryScore) as OrdinaryScore2,CONVERT(varchar,a.TermEndScore) as TermEndScore2,CONVERT(varchar,a.Score) as Score2,b.MoveType,b.StudyModality from StuScore a @@ -793,6 +799,140 @@ order by bb.ScoreId"; } + /// + /// 导入学生成绩--补考成绩 + /// + /// + /// + public (DataTable failDt, int snum, int fnum) ExecuteImportExcelForNotPass(DataTable dt, string fileGuid, string queryJson) + { + //成功记录数 + int snum = 0; + //总记录数 + int num = 0; + var db = this.BaseRepository("CollegeMIS"); + var msg = ""; + try + { + db.BeginTrans(); + // 创建一个datatable容器用于保存导入失败的数据 + DataTable failDt = new DataTable(); + + var queryParam = queryJson.ToJObject(); + var F_SchoolId = queryParam["F_SchoolId"].ToString(); + var AcademicYearNo = queryParam["AcademicYearNo"].ToString(); + var Semester = queryParam["Semester"].ToString(); + var LessonNo = queryParam["LessonNo"].ToString(); + var ClassNo = queryParam["ClassNo"].ToString(); + var classInfoList = db.FindList(); + var lessonInfoList = db.FindList(); + var classInfoEntity = classInfoList.FirstOrDefault(x => x.ClassNo == ClassNo); + var lessonInfoEntity = lessonInfoList.FirstOrDefault(x => x.LessonNo == LessonNo && x.CheckMark == true); + + if (classInfoEntity != null && lessonInfoEntity != null) + { + //当前班级学生成绩 + var list = GetList(queryJson).ToList(); + + foreach (DataColumn dc in dt.Columns) + { + failDt.Columns.Add(dc.ColumnName, dc.DataType); + } + failDt.Columns.Add("导入错误", typeof(string)); + dt.Columns.Add("导入错误", typeof(string)); + + foreach (DataRow dr in dt.Rows) + { + try + { + var stuno = dr["学号"].ToString().Trim(); + var academicYearNo_dr = dr["学年"].ToString().Trim(); + var semester_dr = dr["学期"].ToString().Trim(); + var lessoninfo_dr = dr["课程名称"].ToString().Trim(); + var classinfo_dr = dr["班级"].ToString().Trim(); + + if (!string.IsNullOrEmpty(stuno)) + { + num++; + if (!academicYearNo_dr.Equals(AcademicYearNo) || !semester_dr.Equals(Semester)) + { + dr["导入错误"] = "学年学期与查询条件不符!"; + failDt.Rows.Add(dr.ItemArray); + continue; + } + + if (!classinfo_dr.Equals(classInfoEntity.ClassName)) + { + dr["导入错误"] = "班级与查询条件班级(" + classInfoEntity.ClassName + ")不匹配!"; + failDt.Rows.Add(dr.ItemArray); + continue; + } + if (!lessoninfo_dr.Equals(lessonInfoEntity.LessonName)) + { + dr["导入错误"] = "课程与查询条件课程(" + lessonInfoEntity.LessonName + ")不匹配!"; + failDt.Rows.Add(dr.ItemArray); + continue; + } + var item = list.Find(x => x.StuNo == stuno && x.LessonNo == LessonNo && x.ClassNo == ClassNo); + if (item == null) + { + dr["导入错误"] = "课程:" + lessonInfoEntity.LessonName + ",班级:" + classInfoEntity.ClassName + "找不到学号为" + stuno + "的学生"; + failDt.Rows.Add(dr.ItemArray); + continue; + } + var TermEndScore = Convert.ToDecimal(string.IsNullOrEmpty(dr["期末成绩"].ToString().Trim()) ? "0" : dr["期末成绩"].ToString().Trim()); + if (TermEndScore < 0) + { + dr["导入错误"] = "成绩必须大于0!"; + failDt.Rows.Add(dr.ItemArray); + continue; + } + var Score = Math.Round(TermEndScore, MidpointRounding.AwayFromZero); + var remark = dr["备注"].ToString().Trim(); + db.ExecuteBySql($"update StuScoreNotPass set TermEndScore={TermEndScore},Score={Score},Remark='{remark}' where ScoreId='{item.ScoreId}' "); + + } + else + { + break; + } + } + catch (Exception e) + { + dr["导入错误"] = "出现异常:" + e.Message; + failDt.Rows.Add(dr.ItemArray); + continue; + } + } + db.Commit(); + + // 写入缓存如果有未导入的数据 + if (failDt.Rows.Count > 0) + { + string errordt = failDt.ToJson(); + + cache.Write(cacheKey + fileGuid, errordt, CacheId.excel); + } + snum = (num - failDt.Rows.Count) > 0 ? num - failDt.Rows.Count : 0; + + } + + return (failDt, snum, failDt.Rows.Count); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoBLL.cs index fa7db1635..12b8aaeb6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoBLL.cs @@ -449,6 +449,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } + public (DataTable failDt, int snum, int fnum) ExecuteImportExcelForNotPassTwo(DataTable dt, string fileGuid, + string queryJson) + { + try + { + return stuScoreNotPassTwoService.ExecuteImportExcelForNotPassTwo(dt, fileGuid, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoIBLL.cs index fe3be3622..c02dab2bc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoIBLL.cs @@ -126,6 +126,15 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration void SubmitStuScore(string AcademicYearNo, string Semester, string LessonNo, string TeachClassNo, string EmpNo); + /// + /// 补考成绩导入 + /// + /// + /// + /// + /// + (DataTable failDt, int snum, int fnum) ExecuteImportExcelForNotPassTwo(DataTable dt, string fileGuid, + string queryJson); #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoService.cs index f0ae6cf25..c2866e581 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoService.cs @@ -1,4 +1,6 @@ using Dapper; +using Learun.Cache.Base; +using Learun.Cache.Factory; using Learun.DataBase.Repository; using Learun.Util; using System; @@ -18,6 +20,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// public class StuScoreNotPassTwoService : RepositoryFactory { + + #region 缓存定义 + private ICache cache = CacheFactory.CaChe(); + private string cacheKey = "Learun_adms_excelError_"; + #endregion + #region 获取数据 /// @@ -839,6 +847,140 @@ order by bb.ScoreId"; } + /// + /// 导入学生成绩--补考成绩 + /// + /// + /// + public (DataTable failDt, int snum, int fnum) ExecuteImportExcelForNotPassTwo(DataTable dt, string fileGuid, string queryJson) + { + //成功记录数 + int snum = 0; + //总记录数 + int num = 0; + var db = this.BaseRepository("CollegeMIS"); + var msg = ""; + try + { + db.BeginTrans(); + // 创建一个datatable容器用于保存导入失败的数据 + DataTable failDt = new DataTable(); + + var queryParam = queryJson.ToJObject(); + var F_SchoolId = queryParam["F_SchoolId"].ToString(); + var AcademicYearNo = queryParam["AcademicYearNo"].ToString(); + var Semester = queryParam["Semester"].ToString(); + var LessonNo = queryParam["LessonNo"].ToString(); + var ClassNo = queryParam["ClassNo"].ToString(); + var classInfoList = db.FindList(); + var lessonInfoList = db.FindList(); + var classInfoEntity = classInfoList.FirstOrDefault(x => x.ClassNo == ClassNo); + var lessonInfoEntity = lessonInfoList.FirstOrDefault(x => x.LessonNo == LessonNo && x.CheckMark == true); + + if (classInfoEntity != null && lessonInfoEntity != null) + { + //当前班级学生成绩 + var list = GetList(queryJson).ToList(); + + foreach (DataColumn dc in dt.Columns) + { + failDt.Columns.Add(dc.ColumnName, dc.DataType); + } + failDt.Columns.Add("导入错误", typeof(string)); + dt.Columns.Add("导入错误", typeof(string)); + + foreach (DataRow dr in dt.Rows) + { + try + { + var stuno = dr["学号"].ToString().Trim(); + var academicYearNo_dr = dr["学年"].ToString().Trim(); + var semester_dr = dr["学期"].ToString().Trim(); + var lessoninfo_dr = dr["课程名称"].ToString().Trim(); + var classinfo_dr = dr["班级"].ToString().Trim(); + + if (!string.IsNullOrEmpty(stuno)) + { + num++; + if (!academicYearNo_dr.Equals(AcademicYearNo) || !semester_dr.Equals(Semester)) + { + dr["导入错误"] = "学年学期与查询条件不匹配!"; + failDt.Rows.Add(dr.ItemArray); + continue; + } + + if (!classinfo_dr.Equals(classInfoEntity.ClassName)) + { + dr["导入错误"] = "班级与查询条件班级(" + classInfoEntity.ClassName + ")不匹配!"; + failDt.Rows.Add(dr.ItemArray); + continue; + } + if (!lessoninfo_dr.Equals(lessonInfoEntity.LessonName)) + { + dr["导入错误"] = "课程与查询条件课程(" + lessonInfoEntity.LessonName + ")不匹配!"; + failDt.Rows.Add(dr.ItemArray); + continue; + } + var item = list.Find(x => x.StuNo == stuno && x.LessonNo == LessonNo && x.ClassNo == ClassNo); + if (item == null) + { + dr["导入错误"] = "课程:" + lessonInfoEntity.LessonName + ",班级:" + classInfoEntity.ClassName + "找不到学号为" + stuno + "的学生"; + failDt.Rows.Add(dr.ItemArray); + continue; + } + var TermEndScore = Convert.ToDecimal(string.IsNullOrEmpty(dr["期末成绩"].ToString().Trim()) ? "0" : dr["期末成绩"].ToString().Trim()); + if (TermEndScore < 0) + { + dr["导入错误"] = "成绩必须大于0!"; + failDt.Rows.Add(dr.ItemArray); + continue; + } + var Score = Math.Round(TermEndScore, MidpointRounding.AwayFromZero); + var remark = dr["备注"].ToString().Trim(); + db.ExecuteBySql($"update StuScoreNotPassTwo set TermEndScore={TermEndScore},Score={Score},Remark='{remark}' where ScoreId='{item.ScoreId}' "); + + } + else + { + break; + } + } + catch (Exception e) + { + dr["导入错误"] = "出现异常:" + e.Message; + failDt.Rows.Add(dr.ItemArray); + continue; + } + } + db.Commit(); + + // 写入缓存如果有未导入的数据 + if (failDt.Rows.Count > 0) + { + string errordt = failDt.ToJson(); + + cache.Write(cacheKey + fileGuid, errordt, CacheId.excel); + } + snum = (num - failDt.Rows.Count) > 0 ? num - failDt.Rows.Count : 0; + + } + + return (failDt, snum, failDt.Rows.Count); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessSerivce.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessSerivce.cs index 050f2265d..5ad944f79 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessSerivce.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessSerivce.cs @@ -591,7 +591,8 @@ namespace Learun.Application.WorkFlow p.F_ParentProcessId, p.F_CreateUserId, p.F_CreateUserName, - p.F_IsStart + p.F_IsStart, + d.F_DepartmentId,d.F_FullName FROM ( SELECT @@ -617,6 +618,9 @@ namespace Learun.Application.WorkFlow ) r LEFT JOIN LR_NWF_Task t ON t.F_Id = r.F_TaskId LEFT JOIN LR_NWF_Process p ON p.F_Id = t.F_ProcessId + LEFT JOIN( + SELECT t.F_DepartmentId,t.F_FullName,u.F_RealName,u.F_UserId + FROM LR_Base_Department t left join LR_BASE_USER u on t.F_DepartmentId = u.F_DepartmentId) d ON d.F_UserId=t.F_CreateUserId WHERE t.F_IsFinished = 0 AND (p.F_IsFinished = 0 OR t.F_Type = 2 OR t.F_Type = 4 OR t.F_Type = 6)"); @@ -633,7 +637,7 @@ namespace Learun.Application.WorkFlow if (!queryParam["keyword"].IsEmpty()) { keyword = "%" + queryParam["keyword"].ToString() + "%"; - strSql.Append(" AND ( p.F_Title like @keyword OR p.F_SchemeName like @keyword ) "); + strSql.Append(" AND ( p.F_Title like @keyword OR p.F_SchemeName like @keyword OR p.F_CreateUserName like @keyword OR d.F_FullName like @keyword ) "); } if (!string.IsNullOrEmpty(schemeCode)) @@ -646,16 +650,16 @@ namespace Learun.Application.WorkFlow strSql.Append(" AND t.F_IsBatchAudit = 1 "); } var data = this.BaseRepository().FindList(strSql.ToString(), new { userId, startTime, endTime, keyword, schemeCode }, pagination); - if (data.Count() > 0) - { - foreach (var item in data) - { - if (!string.IsNullOrEmpty(item.F_CreateUserName)) - { - item.F_DepartmentId = this.BaseRepository().FindEntity(x => x.F_UserId == item.F_CreateUserId)?.F_DepartmentId; - } - } - } + //if (data.Count() > 0) + //{ + // foreach (var item in data) + // { + // if (!string.IsNullOrEmpty(item.F_CreateUserName)) + // { + // item.F_DepartmentId = this.BaseRepository().FindEntity(x => x.F_UserId == item.F_CreateUserId)?.F_DepartmentId; + // } + // } + //} return data; } catch (Exception ex) @@ -806,11 +810,17 @@ namespace Learun.Application.WorkFlow p.F_CreateUserId, p.F_CreateUserName, p.F_IsStart, - t.F_NodeId + t.F_NodeId, + d.F_DepartmentId,d.F_FullName FROM LR_NWF_Task t LEFT JOIN LR_NWF_TaskRelation r on r.F_TaskId = t.F_Id LEFT JOIN LR_NWF_Process p ON t.F_ProcessId = p.F_Id + LEFT JOIN( + SELECT t.F_DepartmentId,t.F_FullName,u.F_RealName,u.F_UserId + FROM LR_Base_Department t + left join LR_BASE_USER u on t.F_DepartmentId = u.F_DepartmentId + ) d ON d.F_UserId=t.F_CreateUserId WHERE (r.F_Result = 1 OR r.F_Result = 2 OR r.F_Result = 4) AND r.F_UserId = @userId "); @@ -829,7 +839,7 @@ namespace Learun.Application.WorkFlow if (!queryParam["keyword"].IsEmpty()) { keyword = "%" + queryParam["keyword"].ToString() + "%"; - strSql.Append(" AND ( p.F_ProcessName like @keyword OR p.F_SchemeName like @keyword ) "); + strSql.Append(" AND ( p.F_Title like @keyword OR p.F_SchemeName like @keyword OR p.F_CreateUserName like @keyword OR p.F_CreateUserName like @keyword OR d.F_FullName like @keyword) "); } if (!string.IsNullOrEmpty(schemeCode)) { @@ -845,10 +855,10 @@ namespace Learun.Application.WorkFlow { item.NextNodeIsAudited = true; } - if (!string.IsNullOrEmpty(item.F_CreateUserName)) - { - item.F_DepartmentId = this.BaseRepository().FindEntity(x => x.F_UserId == item.F_CreateUserId)?.F_DepartmentId; - } + //if (!string.IsNullOrEmpty(item.F_CreateUserName)) + //{ + // item.F_DepartmentId = this.BaseRepository().FindEntity(x => x.F_UserId == item.F_CreateUserId)?.F_DepartmentId; + //} } return data; } diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/sign.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/sign.vue index 27a5aa433..f47380b8d 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/sign.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/sign.vue @@ -118,7 +118,12 @@ export default { this.submitPostData.auditors = JSON.stringify({[this.reviewerListId]:this.reviewer.toString()}) delete this.submitPostData.formreq // this.submitPostData.auditors[this.reviewerListId] = this.reviewer - console.log(this.submitPostData) + // console.log(this.submitPostData) + + uni.showLoading({ + title: '提交中...' + }); + const success = await this.HTTP_POST( this.type === 'sign' ? 'learun/adms/newwf/sign' : 'learun/adms/newwf/auditors', this.submitPostData, @@ -126,11 +131,13 @@ export default { ) if (!success) { - return + uni.hideLoading(); + return } this.EMIT('task-list-change') this.NAV_BACK(2) + uni.hideLoading(); this.TOAST(`已成功提交${this.typeText}`, 'success') },