diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/Form.js index db3bed538..90b1c9323 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/Form.js @@ -11,6 +11,10 @@ var Types = request('Types');//助学金类型:1国家助学金,2校级助 if (Types != null && Types != undefined && Types != "") { $('#Types').val(Types); } +var strWhere = "";//点击学号弹出框条件 +if (classs != "" && classs != undefined && classs != null) { + strWhere = " and classno in (" + classs + ") "; +} var bootstrap = function ($, learun) { "use strict"; var page = { @@ -37,150 +41,78 @@ var bootstrap = function ($, learun) { $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); $('#IdCardType').lrDataItemSelect({ code: 'IdCardType' }); + $('#IdCardType').lrselectSet("01"); $('#OpenBank').lrDataItemSelect({ code: 'DepositBank' }); //判断登录用户所带班级:学生弹框显示所带班级学生 - if (classs != "" && classs != undefined && classs != null) { - $('#StuNo').lrGirdSelect({ - // 字段 - url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', - param: { strWhere: " 1=1 and classno in (" + classs + ") order by deptno,majorno,classno,grade desc" }, - selectWord: 'stuname', - value: 'stuno', - text: 'stuno', - headData: [ - { 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: "identitycardno", 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: "grade", width: 100, align: "left" } - ], - select: function (item) { - console.log(item); - //自动带出内容:姓名 院校 班级 身份证件号 身份证件类型 开户银行 开户卡账号 - $("#StuName").val(item.stuname); - $("#F_SchoolId").lrselectSet(item.f_schoolid); - $("#ClassNo").lrselectSet(item.classno); - $("#IdentityCardNo").val(item.identitycardno); - $("#OpenBank").lrselectSet(item.depositbank); - $("#OpenAccount").val(item.bankcard); - $('#IdCardType').lrselectSet("01"); - } - }); - } else { - $('#StuNo').lrGirdSelect({ - // 字段 - url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', - param: { strWhere: " 1=1 " }, - selectWord: 'stuname', - value: 'stuno', - text: 'stuno', - headData: [ - { 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: "identitycardno", 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: "grade", width: 100, align: "left" } - ], - select: function (item) { - //自动带出内容:姓名 院校 班级 身份证件号 身份证件类型 开户银行 开户卡账号 - $("#StuName").val(item.stuname); - $("#F_SchoolId").lrselectSet(item.f_schoolid); - $("#ClassNo").lrselectSet(item.classno); - $("#IdentityCardNo").val(item.identitycardno); - $("#OpenBank").lrselectSet(item.depositbank); - $("#OpenAccount").val(item.bankcard); - $('#IdCardType').lrselectSet("01"); - } - }); - } + $('#StuNo').lrGirdSelect({ + // 字段 + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', + param: { strWhere: " 1=1 " + strWhere + " order by deptno,majorno,classno,grade " }, + selectWord: 'stuname', + value: 'stuno', + text: 'stuno', + headData: [ + { 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: "identitycardno", 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: "grade", width: 100, align: "left" } + ], + select: function (item) { + //自动带出内容:姓名 院校 班级 身份证件号 身份证件类型 开户银行 开户卡账号 + $("#StuName").val(item.stuname); + $("#F_SchoolId").lrselectSet(item.f_schoolid); + $("#ClassNo").lrselectSet(item.classno); + $("#IdentityCardNo").val(item.identitycardno); + $("#OpenBank").lrselectSet(item.depositbank); + $("#OpenAccount").val(item.bankcard); + } + }); + //判断助学金类型:1国家助学金,2校级助学金 if (Types == "1") { $('#SubsidizeType').lrDataItemSelect({ @@ -224,6 +156,10 @@ var bootstrap = function ($, learun) { $('[data-table="' + id + '"]').lrSetFormData(data[id]); } + //判断身份证件类型为空时,默认选择“居民身份证” + if (data[id].IdCardType == null || data[id].IdCardType == "" || data[id].IdCardType == undefined) { + $('#IdCardType').lrselectSet("01"); + } } }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/Index.js index 1bcbc5337..8db57fdb1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/Index.js @@ -219,7 +219,12 @@ var bootstrap = function ($, learun) { return learun.formatDate(cellvalue, 'yyyy-MM-dd'); } }, - { label: '发放日期', name: 'ReleaseDate', width: 100, align: "left" }, + { + label: '发放日期', name: 'ReleaseDate', width: 100, align: "left", + formatter: function (cellvalue) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd'); + } + }, { label: '申请理由', name: 'ApplyReason', width: 200, align: "left" }, { label: '开户银行', name: 'OpenBank', width: 200, align: "left"