diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.cshtml index 12293e5ff..ce41eadd3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.cshtml @@ -4,7 +4,7 @@ }
-
+
@@ -45,6 +45,12 @@
+ + @*
+
+ 点击 +
+
*@
@@ -52,8 +58,27 @@
-
+
+ +
+ + +
+
+
+
系部
+
+
+
+
+
+ + + + + +
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.js index 9f5f0a867..7083d1ae4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.js @@ -1,5 +1,7 @@ var refreshGirdData; var StuId; +var tempdatra = new Array(); +var list = []; var bootstrap = function ($, learun) { "use strict"; var page = { @@ -143,7 +145,159 @@ var bootstrap = function ($, learun) { }); } }); + $('#selgridtab').jfGrid({ + headData: [ + //{ + // label: "审核状态", name: "CheckMark", width: 80, align: "center", + // formatter: function (cellvalue) { + // return cellvalue == "1" ? "已审核" : "未审核"; + // } + //}, + { label: "学生编号", name: "StuNo", width: 100, align: "left", ishide: true, }, + { label: "学籍号", name: "StuCode", width: 100, align: "left", ishide: true, }, + { label: "学号", name: "ProvinceCode", width: 100, align: "left" }, + { label: "姓名", name: "StuName", width: 100, align: "left" }, + { + label: "性别", name: "GenderNo", width: 80, align: "left", + formatter: function (cellvalue) { + return cellvalue == true ? "男" : "女"; + } + }, + { + label: "出生日期", name: "Birthday", width: 100, align: "left", ishide: true, + formatter: function (value) { + return learun.formatDate(value, 'yyyy-MM-dd'); + } + }, + { label: "身份证号", name: "IdentityCardNo", width: 100, align: "left" }, + { + label: "民族", name: "NationalityNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'National', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + //{ + // label: "政治面貌", name: "PartyFaceNo", width: 100, align: "left", + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('dataItem', { + // key: value, + // code: 'PolityStatus', + // callback: function (_data) { + // callback(_data.text); + // } + // }); + // } + //}, + { label: "年级", name: "Grade", width: 100, align: "left" }, + { + label: "系所", name: "DeptNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', + key: value, + keyId: 'deptno', + callback: function (_data) { + callback(_data['deptname']); + } + }); + } + }, + { + label: "专业", name: "MajorNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', + key: value, + keyId: 'majorno', + callback: function (_data) { + callback(_data['majorname']); + } + }); + } + }, + { + label: "班级", name: "ClassNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + key: value, + keyId: 'classno', + callback: function (_data) { + callback(_data['classname']); + } + }); + } + }, + { + label: "学制", name: "EduSystem", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'EduSystem', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + //{ + // label: "身体状态", name: "HealthStatus", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('dataItem', { + // key: value, + // code: 'QRCodeHealthStatus', + // callback: function (_data) { + // callback(_data.text); + // } + // }); + // } + //}, + //{ + // label: "学习形式", name: "StudyModality", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('dataItem', { + // key: value, + // code: 'StudyModality', + // callback: function (_data) { + // callback(_data.text); + // } + // }); + // } + //}, + //{ label: "报到日期", name: "RegisterDate", width: 100, align: "left" }, + //{ label: "入学方式", name: "EntranceWay", width: 100, align: "left" }, + //{ label: "入学年月", name: "EntranceDate", width: 100, align: "left" }, + //{ label: "余额", name: "Balance", width: 100, align: "left" }, + { label: "家庭地址", name: "MailAddress", width: 100, align: "left" }, + { label: "联系电话", name: "mobile", width: 100, align: "left" }, + { label: "户口所在地", name: "FatherUnit", width: 100, align: "left" }, + { label: "档案所在地", name: "MatherUnit", width: 100, align: "left" }, + { + label: "操作", name: "Delete", width: 100, align: "center", + formatter: function (callback,cellvalue, row, op, $cell) { + var $div = $('
'); + var $hbtn = $(' 移除'); + $hbtn.on('click', function () { + tempdatra.map((item, index) => { + if (item.StuNo == cellvalue.StuNo) { + tempdatra.splice(index,1) + } + }); + //console.log(tempdatra) + $('#selgridtab').jfGridSet('refreshdata', tempdatra); + }); + $div.append($hbtn); + return $div; + } + }, + ], + mainId: 'AAIId', + }); + }, // 初始化列表 initGird: function () { @@ -537,19 +691,30 @@ var bootstrap = function ($, learun) { isPage: true, rows: 100, isMultiselect: true, - //onSelectRow: function (rowdata) { - // if (rowdata.CheckMark == "1") { - // $("#check").hide(); - // $("#uncheck").show(); - // $("#lr_edit").hide(); - // $("#lr_delete").hide(); - // } else { - // $("#uncheck").hide(); - // $("#check").show(); - // $("#lr_edit").show(); - // $("#lr_delete").show(); - // } - //} + onSelectRow: function (rowdata) { + var selectedRow = $('#gridtable').jfGridGet('rowdata'); + if (list.length < 1) { + list = selectedRow + } else { + // 合并两个数组 + list = list.concat(selectedRow) + // 去重 + let temp = {} + list = list.reduce((prev, curv) => { + // 若临时对象中有一模一样的item,则什么都不做 + if (temp[curv.StuNo]) { } + else { + temp[curv.StuNo] = true + prev.push(curv) + } + return prev + }, []) + //console.log('resources', list) + } + console.log(list) + tempdatra = list + $('#selgridtab').jfGridSet('refreshdata', tempdatra); + } }); page.search(); @@ -564,3 +729,6 @@ var bootstrap = function ($, learun) { }; page.init(); } +function delbtn() { + console.log('111111') +} \ No newline at end of file