|
- /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
- * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
- * 创建人:超级管理员
- * 日 期:2023-02-14 11:09
- * 描 述:学生报名(官网)
- */
- var refreshGirdData;
- 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);
- }, 350, 450);
- $('#Gender').lrRadioCheckbox({
- type: 'radio',
- code: 'usersex',
- });
- $('#Nationals').lrDataItemSelect({ code: 'National' });
- $('#Province').lrDataSourceSelect({ code: 'DIC_PROVINCE', value: 'pcode', text: 'pname' });
- $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' });
- $('#StuType').lrDataItemSelect({ code: 'ExamineeType_tlm' });
- $('#GraduateType').lrDataItemSelect({ code: 'StuGraduateType' });
- $('#HomeProvince').lrDataSourceSelect({
- code: 'DIC_PROVINCE', value: 'pcode', text: 'pname',
- select: function (item) {
- if (!!item) {
- var code = $("#HomeProvince").lrselectGet();
-
- $('#HomeCity').lrselectRefresh({
- allowSearch: true,
- //type: 'multiple',
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_CITY',
- param: { strWhere: "1=1 and charindex(cparent,('" + code + "'))>0 " },
- value: "ccode",
- text: "cname",
- maxHeight: 200,
- select: function (item) {
- if (!!item) {
- var code = $("#HomeCity").lrselectGet();
-
- $('#HomeCounty').lrselectRefresh({
- allowSearch: true,
- //type: 'multiple',
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA',
- param: { strWhere: "1=1 and charindex(aparent,('" + code + "'))>0 " },
- value: "acode",
- text: "aname",
- maxHeight: 200,
- });
- }
- }
- });
- }
- }
- });
- $('#HomeCity').lrselect();
- $('#HomeCounty').lrselect();
- //$('#HomeCity').lrDataSourceSelect({ code: 'DIC_CITY', value: 'ccode', text: 'cname' });
- //$('#HomeCounty').lrDataSourceSelect({ code: 'DIC_AREA', value: 'acode', text: 'aname' });
- $('#IsAdjust').lrRadioCheckbox({
- type: 'radio',
- code: 'YesOrNoInt',
- });
- // 刷新
- $('#lr_refresh').on('click', function () {
- location.reload();
- });
- // 新增
- $('#lr_add').on('click', function () {
- learun.layerForm({
- id: 'form',
- title: '新增',
- url: top.$.rootUrl + '/EducationalAdministration/StuEnrollOfficial/Form',
- width: 960,
- height: 650,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- });
-
- // 查看
- $('#lr_view').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('Id');
- if (learun.checkrow(keyValue)) {
- learun.layerForm({
- id: 'form',
- title: '查看',
- url: top.$.rootUrl + '/EducationalAdministration/StuEnrollOfficial/Form?keyValue=' + keyValue,
- width: 960,
- height: 750,
- btn: null,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- }
- });
- // 编辑
- $('#lr_edit').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('Id');
- if (learun.checkrow(keyValue)) {
- learun.layerForm({
- id: 'form',
- title: '编辑',
- url: top.$.rootUrl + '/EducationalAdministration/StuEnrollOfficial/Form?keyValue=' + keyValue,
- width: 960,
- height: 650,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- }
- });
- // 删除
- $('#lr_delete').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('Id');
- if (learun.checkrow(keyValue)) {
- learun.layerConfirm('是否确认删除该项!', function (res) {
- if (res) {
- learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuEnrollOfficial/DeleteForm', { keyValue: keyValue }, function () {
- refreshGirdData();
- });
- }
- });
- }
- });
- // 打印
- $('#lr_print').on('click', function () {
- $('#gridtable').jqprintTable();
- });
- },
- // 初始化列表
- initGird: function () {
- $('#gridtable').jfGrid({
- url: top.$.rootUrl + '/EducationalAdministration/StuEnrollOfficial/GetPageList',
- headData: [
- {
- label: "提交时间", name: "CreateTime", width: 150, align: "left"
- },
- { label: "姓名", name: "StuName", width: 100, align: "left" },
- {
- label: "性别", name: "Gender", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'usersex',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- {
- label: "民族", name: "Nationals", 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: "Birthday", width: 100, align: "left",
- formatter: function (value, row) {
- return learun.formatDate(value, 'yyyy-MM-dd');
- }
- },
- {
- label: "政治面貌", name: "Political", 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: "IDCard", width: 100, align: "left" },
- {
- label: "考生科类", name: "SubjectType", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'StuSubjectType',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- {
- label: "考生类别", name: "StuType", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'ExamineeType_tlm',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- {
- label: "毕业类别", name: "GraduateType", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'StuGraduateType',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- { label: "应试外语语种", name: "English", width: 100, align: "left" },
- { label: "毕业学校", name: "FromSchool", width: 100, align: "left" },
- {
- label: "高考报名省份", name: "Province", 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: "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: "MajorNo2", 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: "MajorNo3", 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: "HomeProvince", width: 200, align: "left",
- formatter: function (value, row) {
- var str = '';
- if (!!value) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_PROVINCE',
- key: value,
- keyId: 'pcode',
- callback: function (_data) {
- str += _data['pname'];
- }
- });
- }
- if (!!row.HomeCity) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_CITY',
- key: row.HomeCity,
- keyId: 'ccode',
- callback: function (_data) {
- str += _data['cname'];
- }
- });
- }
- if (!!row.HomeCounty) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_AREA',
- key: row.HomeCounty,
- keyId: 'acode',
- callback: function (_data) {
- str += _data['aname'];
- }
- });
- }
- if (!!row.HomeAddr) {
- str += row.HomeAddr;
- }
- return str;
- }
- },
- { label: "高考报名序号", name: "StuCode", width: 100, align: "left" },
- { label: "收件人姓名", name: "Recipient", width: 100, align: "left" },
- {
- label: "录取通知书邮寄地址", name: "AcceptanceProvince", width: 200, align: "left",
- formatter: function (value, row) {
- var str = '';
- if (!!value) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_PROVINCE',
- key: value,
- keyId: 'pcode',
- callback: function (_data) {
- str += _data['pname'];
- }
- });
- }
- if (!!row.AcceptanceCity) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_CITY',
- key: row.AcceptanceCity,
- keyId: 'ccode',
- callback: function (_data) {
- str += _data['cname'];
- }
- });
- }
- if (!!row.AcceptanceCounty) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_AREA',
- key: row.AcceptanceCounty,
- keyId: 'acode',
- callback: function (_data) {
- str += _data['aname'];
- }
- });
- }
- if (!!row.AcceptanceAddr) {
- str += row.AcceptanceAddr;
- }
- return str;
- }
- },
- { label: "邮政编码", name: "ZipCode", width: 100, align: "left" },
- { label: "收件人电话", name: "RecipientPhone", width: 100, align: "left" },
- { label: "家长联系电话", name: "ParentPhone", width: 100, align: "left" },
- {
- label: "是否服从调剂", name: "IsAdjust", 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);
- }
- });
- }
- },
- ],
- mainId: 'Id',
- isPage: true,
- sidx: 'CreateTime',
- sord: 'ASC'
-
- });
- page.search();
- },
- search: function (param) {
- param = param || {};
- $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
- }
- };
- refreshGirdData = function () {
- $('#gridtable').jfGridSet('reload');
- };
- page.init();
- }
|