|
- var refreshGirdData;
- var StuId;
- var bootstrap = function ($, learun) {
- "use strict";
- var page = {
- init: function () {
- page.initGird();
- page.bind();
- },
- bind: function () {
- $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
- page.search(queryJson);
- }, 420, 400);
- $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
- $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' });
- $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' });
- $('#F_ProvinceId').lrDataSourceSelect({
- code: 'DIC_PROVINCE', value: 'pcode', text: 'pname',
- select: function (item) {
- if (item) {
- $('#F_CityId').lrselectRefresh({
- url: top.$.rootUrl + "/DIC_CITY/GetListByProvinceCode",
- param: { ProvinceCode: item.pcode },
- value: 'CCODE',
- text: 'CNAME'
- });
- } else {
- $('#F_CityId').lrselectRefresh({
- url: "",
- data: []
- });
- }
- $('#F_CountyId').lrselectRefresh({
- url: "",
- data: []
- });
- }
- });
- $('#F_CityId').lrselect({
- value: 'ccode', text: 'cname',
- select: function (item) {
- if (item) {
- $('#F_CountyId').lrselectRefresh({
- url: top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode",
- param: { cityCode: item.CCODE },
- value: 'ACODE',
- text: 'ANAME'
- });
- }
- }
- });
- $('#F_CountyId').lrselect({
- value: 'ACODE', text: 'ANAME'
- });
- $('#GenderNo').lrDataItemSelect({ code: 'usersexbit' });
- $('#PieceCultivateWay').lrDataItemSelect({ code: 'EducationLevel' });
- $('#NationalityNo').lrDataItemSelect({ code: 'National' });
- // 刷新
- $('#lr_refresh').on('click', function () {
- location.reload();
- });
- $("#lr_photo").on('click', function () {
- StuId = $("#gridtable").jfGridValue('StuId');
- if (learun.checkrow(StuId)) {
- takeImg();
- }
- });
- // 新增
- $('#lr_add').on('click', function () {
- learun.layerForm({
- id: 'form',
- title: '新增',
- url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/Form?Crowning=' + 0,
- width: 800,
- height: 600,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- });
- // 编辑
- $('#lr_edit').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('StuId');
- if (learun.checkrow(keyValue)) {
- if (keyValue.indexOf(',') != -1) {
- learun.alert.warning("只能选择一条记录进行编辑!");
- return;
- }
- var CheckMark = $('#gridtable').jfGridValue('CheckMark');
- if (CheckMark === "1") {
- learun.alert.warning("当前项目已审核不能编辑!");
- return;
- }
- learun.layerForm({
- id: 'form',
- title: '编辑',
- url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/Form?keyValue=' + keyValue + '&Crowning=' + 0,
- width: 800,
- height: 600,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- }
- });
- // 删除
- $('#lr_delete').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('StuId');
- if (learun.checkrow(keyValue)) {
- var CheckMark = $('#gridtable').jfGridValue('CheckMark');
- if (CheckMark.indexOf('1') != -1) {
- learun.alert.warning("选中记录中包含已审核项目,已审核不能删除!");
- return;
- }
- learun.layerConfirm('是否确认删除该项!', function (res) {
- if (res) {
- learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/DeleteForm', { keyValue: keyValue }, function () {
- refreshGirdData();
- });
- }
- });
- }
- });
- //查看
- $('#lr_view').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('StuId');
- if (learun.checkrow(keyValue)) {
- if (keyValue.indexOf(',') != -1) {
- learun.alert.warning("只能选择一条记录进行查看!");
- return;
- }
- learun.layerForm({
- id: 'form',
- title: '编辑',
- url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/FormView?keyValue=' + keyValue,
- width: 1162,
- height: 600,
- btn: null
- });
- }
- });
- // 打印
- $('#lr_print').on('click', function () {
- $('#gridtable').jqprintTable();
- });
- //审核
- $('#check').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('StuId');
- if (learun.checkrow(keyValue)) {
- var CheckMark = $('#gridtable').jfGridValue('CheckMark');
- if (CheckMark.indexOf('1') != -1) {
- learun.alert.warning("选中记录中包含已审核项目!");
- return;
- }
- learun.layerConfirm('是否确认审核该项?', function (res) {
- if (res) {
- learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/Check', { keyValue: keyValue }, function () {
- refreshGirdData();
- });
- }
- });
- }
- });
- //去审
- $('#uncheck').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('StuId');
- if (learun.checkrow(keyValue)) {
- var CheckMark = $('#gridtable').jfGridValue('CheckMark');
- var CheckMarkArr = CheckMark.split(',');
- if ($.inArray('0', CheckMarkArr) != -1 || $.inArray('', CheckMarkArr) != -1) {
- learun.alert.warning("选中记录中包含未审核项目!");
- return;
- }
- learun.layerConfirm('是否确认取消审核该项?', function (res) {
- if (res) {
- learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/UnCheck', { keyValue: keyValue }, function () {
- refreshGirdData();
- });
- }
- });
- }
- });
- //审核全部
- $('#checkall').on('click', function () {
- learun.layerConfirm('是否确认全部审核?', function (res) {
- if (res) {
- learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/CheckAll', {}, function () {
- refreshGirdData();
- });
- }
- });
- });
- //生成帐号
- $('#lr_generate').on('click', function () {
- learun.layerConfirm('是否确认生成帐号?', function (res) {
- if (res) {
- learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/Generate', {}, function () {
- refreshGirdData();
- });
- }
- });
- });
-
- $('#lr_update').on('click', function () {
- learun.layerConfirm('是否确认更新帐号?', function (res) {
- if (res) {
- learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/UpdateAccount', {}, function () {
- refreshGirdData();
- })
- }
- })
- })
-
- //查看异动
- $("#lr_searchChange").on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('StuId');
- if (learun.checkrow(keyValue)) {
- if (keyValue.indexOf(',') != -1) {
- learun.alert.warning("只能选择一条记录!");
- return;
- }
- learun.layerForm({
- id: 'form',
- title: '异动记录',
- url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic_ChangeLog/Index?keyValue=' + keyValue,
- width: 800,
- height: 600,
- btn: null
- });
- }
-
- })
- //同步照片
- $('#lr_synPhoto').on('click', function () {
- learun.loading(true, '正在同步,请稍后')
- learun.httpAsync('get', top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/SynPhoto', {}, function (res) {
- learun.loading(false)
- })
-
- })
-
- //打印简历表
- $('#lr_printInfo').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('StuId');
- if (learun.checkrow(keyValue)) {
- if (keyValue.indexOf(',') != -1) {
- learun.alert.warning("只能选择一条记录进行查看!");
- return;
- }
- learun.layerForm({
- id: 'print',
- title: '学生简历表',
- url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/Print?keyValue=' + keyValue,
- width: 1100,
- height: 800,
- btn: null
- });
- }
- });
- // 同步系部
- $('#lr_syn').on('click', function () {
- learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/SyncDept', function () {
- refreshGirdData();
- });
- });
- // 同步专业
- $('#lr_synmajor').on('click', function () {
- learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/SyncMajor', function () {
- refreshGirdData();
- });
- });
-
- },
- // 初始化列表
- initGird: function () {
- $('#gridtable').jfGrid({
- url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetPageList',
- headData: [
- { label: "考生号", name: "ksh", width: 100, align: "left" },
- { label: "学号", name: "StuNo", 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" },
- { 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: 'BCdPartyFace',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- {
- 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: "Grade", width: 100, align: "left" },
- {
- 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: "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: "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: "StuPlaceCode", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_CITY',
- key: value,
- keyId: 'ccode',
- callback: function (_data) {
- callback(_data['cname']);
- }
- });
- }
- },
- //{ label: "户口所在地", name: "FatherUnit", width: 100, align: "left" },
- //{ label: "档案所在地", name: "MatherUnit", width: 100, align: "left" },
- { label: "户籍所在地", name: "Domicile", width: 100, align: "left" },
- {
- label: "档案是否自带", name: "IsArchives", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'YesOrNoInt',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- {
- label: "户口分类", name: "ResidenceNo", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'ResidenceNo',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- {
- label: "籍贯 (省)", name: "F_ProvinceId", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_PROVINCE',
- key: value,
- keyId: 'pcode',
- callback: function (_data) {
- callback(_data['pname']);
- }
- });
- }
- },
- {
- label: "籍贯 (市)", name: "F_CityId", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_CITY',
- key: value,
- keyId: 'ccode',
- callback: function (_data) {
- callback(_data['cname']);
- }
- });
- }
- },
- {
- label: "籍贯 (县/区)", name: "F_CountyId", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_AREA',
- key: value,
- keyId: 'acode',
- callback: function (_data) {
- callback(_data['aname']);
- }
- });
- }
- },
- { label: "邮政编码", name: "PostalCode", width: 100, align: "center" },
- //{ label: "E-mail", name: "E-mail", width: 100, align: "center" },
- //{
- // label: "开户银行", name: "DepositBank", width: 100, align: "center",
- // formatterAsync: function (callback, value, row, op, $cell) {
- // learun.clientdata.getAsync('dataItem', {
- // key: value,
- // code: 'DepositBank',
- // callback: function (_data) {
- // callback(_data.text);
- // }
- // });
- // }
- //},
- //{ label: "开户卡账号", name: "BankCard", width: 100, align: "center" },
- //{ label: "开户银行位置", name: "BankLocation", width: 100, align: "center" },
- //{
- // label: "是否单亲", name: "IsSingle", width: 100, align: "left",
- // formatter: function (value, row) {
- // if (value == true) {
- // return '是';
- // }
- // else if (value == false) {
- // return '否';
- // }
- // }
- //},
- { label: "父亲姓名", name: "FatherName", width: 100, align: "center" },
- { label: "身份证号", name: "OneIdCardNo", width: 100, align: "center" },
- { label: "父亲电话", name: "FatherPhone", width: 100, align: "center" },
- //{ label: "户籍地址", name: "OneDomicile", width: 100, align: "center" },
- //{ label: "现住址", name: "OneAddress", width: 100, align: "center" },
- { label: "母亲姓名", name: "MatherName", width: 100, align: "center" },
- { label: "身份证号", name: "TwoIdCardNo", width: 100, align: "center" },
- { label: "母亲电话", name: "MatherPhone", width: 100, align: "center" },
- //{ label: "户籍地址", name: "TwoDomicile", width: 100, align: "center" },
- //{ label: "现住址", name: "TwoAddress", width: 100, align: "center" },
- { label: "监护人姓名", name: "GuardianName", width: 100, align: "center" },
- { label: "身份证号", name: "GuardianIdCardNo", width: 100, align: "center" },
- { label: "监护人电话", name: "GuardianPhone", width: 100, align: "center" },
- //{ label: "户籍地址", name: "GuardianDomicile", width: 100, align: "center" },
- { label: "现住址", name: "GuardianAddress", width: 100, align: "center" },
- {
- label: "家庭出身", name: "FamilyOriginNo", width: 100, align: "center",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'BCdFamilyOrigin',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- {
- label: "港澳台侨", name: "OverseasChineseNo", width: 100, align: "center",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'BCdOverseasChinese',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- {
- label: "培养层次", name: "PieceCultivateWay", width: 100, align: "center",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'EducationLevel',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
-
- //{
- // label: "本专科", name: "GraduateNo", width: 100, align: "center",
- // formatterAsync: function (callback, value, row, op, $cell) {
- // learun.clientdata.getAsync('dataItem', {
- // key: value,
- // code: 'CollegeType',
- // callback: function (_data) {
- // callback(_data.text);
- // }
- // });
- // }
- //},
- {
- label: "毕业日期", name: "GraduateYear", width: 100, align: "center",
- formatter: function (cellvalue) {
- return learun.formatDate(cellvalue, 'yyyy-MM-dd');
- }
- },
- //{ label: "毕业证号", name: "DiplomaNo", width: 100, align: "center" },
- //{ label: "毕业证书备注", name: "DiplomaRemark", width: 100, align: "center" },
- //{
- // label: "入党时间", name: "BankCard", width: 100, align: "center",
- // formatter: function (cellvalue) {
- // return learun.formatDate(cellvalue, 'yyyy-MM-dd');
- // }
- //},
- //{
- // label: "入团时间", name: "BankCard", width: 100, align: "center",
- // formatter: function (cellvalue) {
- // return learun.formatDate(cellvalue, 'yyyy-MM-dd');
- // }
- //},
- //{ label: "校内地址", name: "InSchoolAddress", width: 100, align: "center" },
- //{ label: "校内电话", name: "InSchoolTelephone", width: 100, align: "center" },
- //{ label: "QQ", name: "QQ", width: 100, align: "center" },
- //{ label: "特长", name: "GoodAt", width: 100, align: "center" },
- { label: "备注", name: "Remark", width: 200, align: "center" },
- {
- label: "异动状态", name: "MoveStatus", width: 80, align: "center",
- formatter: function (cellvalue) {
- return cellvalue == "1" ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
- }
- },
- {
- label: "异动类型", name: "MoveType", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'StuChangeType',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- {
- label: "审核状态", name: "CheckMark", width: 80, align: "center",
- formatter: function (cellvalue) {
- return cellvalue == "1" ? "<span class=\"label label-success\">已审核</span>" : "<span class=\"label label-danger\">未审核</span>";
- }
- }
- ],
- mainId: 'StuId',
- isPage: true,
- 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();
- // }
- //}
-
- });
- page.search();
- },
- search: function (param) {
- param = param || {};
- param.Crowning = 0;
- $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
- }
- };
- refreshGirdData = function () {
- page.search();
- };
- page.init();
- }
|