diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScoreCheckInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScoreCheckInfoController.cs index 343bfac5a..d0dcc98bb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScoreCheckInfoController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScoreCheckInfoController.cs @@ -55,6 +55,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// + /// 审核 + /// + /// + [HttpGet] + public ActionResult FormAudit() + { + return View(); + } #endregion #region 获取数据 @@ -142,6 +151,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers scoreCheckInfoIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } + /// + /// 一键生成 + /// + /// + /// + /// [HttpPost] [AjaxOnly] public ActionResult SaveGeneForm(string AcademicYearNo, string Semester) @@ -149,7 +164,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers int res = scoreCheckInfoIBLL.SaveGeneEntity(AcademicYearNo, Semester); return Success("本次生成" + res + "条数据!"); } - + /// + /// 提交 + /// + /// + /// [HttpPost] [AjaxOnly] public ActionResult SubmitFrom(string keyValue) @@ -157,7 +176,19 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers scoreCheckInfoIBLL.SubmitEntity(keyValue); return Success("提交成功!"); } - + /// + /// 审核 + /// + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult AuditFrom(string keyValue, string strEntity) + { + ScoreCheckInfoEntity entity = strEntity.ToObject(); + scoreCheckInfoIBLL.AuditEntity(keyValue, entity); + return Success("审核成功!"); + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Form.cshtml index 70f12d569..7552d614d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Form.cshtml @@ -2,7 +2,7 @@ ViewBag.Title = "学业成绩考核记录表"; Layout = "~/Views/Shared/_Form.cshtml"; } -
+
学年*
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Form.js index b8098fbb9..7d70a1a52 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Form.js @@ -41,7 +41,7 @@ var bootstrap = function ($, learun) { text: 'stuname', headData: [ - { label: "学号", name: "stuno", width: 100, align: "left" }, + { label: "学号", name: "stuno", width: 140, align: "left" }, { label: "姓名", name: "stuname", width: 100, align: "left" }, { label: "班级", name: "classno", width: 100, align: "left", @@ -110,19 +110,20 @@ var bootstrap = function ($, learun) { }; // 保存数据 acceptClick = function (callBack) { - if (!$('body').lrValidform()) { + if (!$('form').lrValidform()) { return false; } var postData = { - strEntity: JSON.stringify($('body').lrGetFormData()) + //postData.StuName= + strEntity: JSON.stringify($('form').lrGetFormData()) }; console.log(postData,"postData") - $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/SaveForm?keyValue=' + keyValue, postData, function (res) { - // 保存成功后才回调 - if (!!callBack) { - callBack(); - } - }); + //$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/SaveForm?keyValue=' + keyValue, postData, function (res) { + // // 保存成功后才回调 + // if (!!callBack) { + // callBack(); + // } + //}); }; page.init(); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormAudit.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormAudit.cshtml new file mode 100644 index 000000000..7439b013e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormAudit.cshtml @@ -0,0 +1,15 @@ +@{ + ViewBag.Title = "学业考核成绩记载审核表单"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
审核通过
+
+
+
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormAudit.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormAudit.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormAudit.js new file mode 100644 index 000000000..c791a6203 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormAudit.js @@ -0,0 +1,55 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-05-15 10:33 + * 描 述:选修课报名审核表单 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#CheckStatus').lrRadioCheckbox({ + type: 'radio', + code: 'YesOrNoInt', + }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + console.log(keyValue,"keyValue") + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/AuditFrom?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Index.cshtml index 2fb2091b1..3150c036e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Index.cshtml @@ -50,14 +50,14 @@  新增  编辑  删除 -  打印
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Index.js index cdbe936f9..ef753c8f1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Index.js @@ -131,7 +131,7 @@ var bootstrap = function ($, learun) { var keyValue = $('#gridtable').jfGridValue('ID'); if (learun.checkrow(keyValue)) { var CheckMark = $('#gridtable').jfGridValue('CheckStatus'); - if (CheckMark.indexOf('1') != -1) { + if (CheckMark.indexOf(',') != -1) { learun.alert.warning("选中记录中包含已审核项目,已审核不能删除!"); return; } @@ -150,9 +150,24 @@ var bootstrap = function ($, learun) { }); //  审核 $('#lr_lock').on('click', function () { - }); - //  去审核 - $('#lr_unlock').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var CheckMark = $('#gridtable').jfGridValue('CheckStatus'); + if (CheckMark.indexOf(',') != "-1") { + learun.alert.warning("选中项不可审核!"); + return; + } + learun.layerForm({ + id: 'formTeach', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/FormAudit?keyValue=' + keyValue, + width: 800, + height: 600, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } }); //  教师评语 $('#lr_Coordinator').on('click', function () { @@ -273,7 +288,7 @@ var bootstrap = function ($, learun) { } }, { - label: "评语填写人", name: "Signed", width: 100, align: "left" , + label: "评语填写人", name: "Signed", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormFlow.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormFlow.js index 21eed58c4..157c9d654 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormFlow.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormFlow.js @@ -42,7 +42,7 @@ var bootstrap = function ($, learun) { } } }); - $('#F_NewsImage').lrUploader(); + $('#F_NewsImage').lrUploader({ extensions:'gif,jpeg,jpg,png,bmp'}); $('#F_IsSendFX').lrDataItemSelect({ code: 'YesOrNoBit' }); $('#F_SendDeptId').lrDepartmentSelect({ type: 'treemultiple' }); $('#F_SendPostId').lrPostSelect({ type: 'treemultiple' }); 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 b94cad249..78fd9ae4f 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 @@ -1132,6 +1132,7 @@ + @@ -1245,6 +1246,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoBLL.cs index 068a37369..68f4674af 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoBLL.cs @@ -184,6 +184,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + /// + /// 审核 + /// + /// + /// + public void AuditEntity(string keyValue, ScoreCheckInfoEntity entity) + { + try + { + scoreCheckInfoService.AuditEntity(keyValue, entity); + } + 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/ScoreCheckInfo/ScoreCheckInfoIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoIBLL.cs index 30890e2a6..8dc5a6ed0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoIBLL.cs @@ -27,7 +27,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 主键 /// ScoreCheckInfoEntity GetScoreCheckInfoEntity(string keyValue); - ScoreCheckInfoEntity GetStuNoEntity(string keyValue,string AcademicYearNo,string Semester); + ScoreCheckInfoEntity GetStuNoEntity(string keyValue, string AcademicYearNo, string Semester); #endregion #region 提交数据 @@ -55,7 +55,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// void SubmitEntity(string keyValue); - + /// + /// 审核 + /// + void AuditEntity(string keyValue, ScoreCheckInfoEntity entity); #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoService.cs index ece9fb8a9..7cfcd9cfb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoService.cs @@ -114,7 +114,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { try { - return this.BaseRepository("CollegeMIS").FindEntity(x => x.StuName == keyValue && x.Semester == Semester && x.AcademicYearNo == AcademicYearNo); + return this.BaseRepository("CollegeMIS").FindEntity(x => x.StuNo == keyValue && x.Semester == Semester && x.AcademicYearNo == AcademicYearNo); } catch (Exception ex) { @@ -226,6 +226,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + public void SubmitEntity(string keyValue) { var db = this.BaseRepository("CollegeMIS").BeginTrans(); @@ -254,6 +255,43 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + /// + /// 审核 + /// + /// + /// + public void AuditEntity(string keyValue, ScoreCheckInfoEntity entity) + { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); + try + { + var userlogin = LoginUserInfo.Get(); + var keyValueArr = keyValue.Split(','); + foreach (var item in keyValueArr) + { + var model = db.FindEntity(x => x.ID == item); + model.CheckStatus = entity.CheckStatus; + model.CheckTime = DateTime.Now; + model.CheckUser = userlogin.userId; + model.UpdateTime = DateTime.Now; + model.UpdateUser = userlogin.userId; + db.Update(model); + } + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/js/uni-copy.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/js/uni-copy.js new file mode 100644 index 000000000..6ceb60488 --- /dev/null +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/js/uni-copy.js @@ -0,0 +1,42 @@ +export default function uniCopy({content,success,error}) { + if(!content) return error('复制的内容不能为空 !') + content = typeof content === 'string' ? content : content.toString() // 复制内容,必须字符串,数字需要转换为字符串 + /** + * 小程序端 和 app端的复制逻辑 + */ + //#ifndef H5 + uni.setClipboardData({ + data: content, + success: function() { + success("复制成功~") + console.log('success'); + }, + fail:function(){ + success("复制失败~") + } + }); + //#endif + + /** + * H5端的复制逻辑 + */ + // #ifdef H5 + if (!document.queryCommandSupported('copy')) { //为了兼容有些浏览器 queryCommandSupported 的判断 + // 不支持 + error('浏览器不支持') + } + let textarea = document.createElement("textarea") + textarea.value = content + textarea.readOnly = "readOnly" + document.body.appendChild(textarea) + textarea.select() // 选择对象 + textarea.setSelectionRange(0, content.length) //核心 + let result = document.execCommand("copy") // 执行浏览器复制命令 + if(result){ + success("复制成功~") + }else{ + error("复制失败,请检查h5中调用该方法的方式,是不是用户点击的方式调用的,如果不是请改为用户点击的方式触发该方法,因为h5中安全性,不能js直接调用!") + } + textarea.remove() + // #endif +} diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/organize-picker.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/organize-picker.vue index 97403aaa4..1bf856f2a 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/organize-picker.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/organize-picker.vue @@ -24,7 +24,8 @@ export default { placeholder: {}, readonly: {}, rootId: {}, - rootType: {} + rootType: {}, + multiple: {} }, methods: { @@ -34,16 +35,18 @@ export default { } this.ONCE('select-organize', data => { - this.$emit('input', data.id) - this.$emit('change', data.id) + this.$emit('input', data.id||data.map(t=>t.id).toString()) + this.$emit('change', data.id||data.map(t=>t.id).toString()) }) const rootType = this.rootType || { user: 'department', department: 'company', company: 'company' }[this.type] const rootId = this.rootId - + + let url_ = this.multiple?"select-organize-multiple":"select-organize" + this.SET_PARAM(this.value) const url = rootId - ? `/pages/common/select-organize?type=${this.type}&rootId=${rootId}&rootType=${rootType}` - : `/pages/common/select-organize?type=${this.type}` + ? `/pages/common/${url_}?type=${this.type}&rootId=${rootId}&rootType=${rootType}` + : `/pages/common/${url_}?type=${this.type}` this.NAV_TO(url) } @@ -54,8 +57,17 @@ export default { if (!this.value) { return this.placeholder } - const orgItem = this.GET_GLOBAL(this.type)[this.value] - + + const list = this.GET_GLOBAL(this.type) + + let values = this.value.split(",") + if(values.length>1){ + const orgItems = values.map(t=>list[t].name).toString() + return orgItems + } + + const orgItem = list[this.value] + return orgItem ? orgItem.name : this.placeholder }, diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/organize-tree.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/organize-tree.vue index a507b580b..1a25c8b3c 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/organize-tree.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/organize-tree.vue @@ -28,10 +28,13 @@ {{ tagName }} + + 复制 - 选择 + 选择 + 取消选择 @@ -51,12 +54,14 @@ :root="child" :button="button" :level="level" + :value="value" /> + +