@@ -16,49 +16,76 @@ var bootstrap = function ($, learun) {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 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' });
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' });
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStudent/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
learun.layerConfirm('是否确认导入!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStudent/ImportForm', {}, function () {
refreshGirdData();
});
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
learun.layerConfirm('是否确认更新!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStudent/UpdateForm', {},function () {
refreshGirdData();
});
}
});
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('FSId');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStudent/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStudent/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
// 删除
$('#lr_delete ').on('click', function () {
//启用
$('#lr_lock ').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('FSId');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
var CheckMark = $('#gridtable').jfGridValue('F_CheckMark').toString();
if (CheckMark.indexOf('true') != -1) {
learun.alert.warning("选中记录中包含已审核项目!");
return;
}
learun.layerConfirm('是否确认审核该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStudent/DeleteForm', { keyValue: keyValue}, function () {
learun.deleteForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStudent/Lock', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//停用
$('#lr_unlock').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('FSId');
if (learun.checkrow(keyValue)) {
var CheckMark = $('#gridtable').jfGridValue('F_CheckMark').toString();
if (CheckMark.indexOf('false') != -1) {
learun.alert.warning("选中记录中包含已去审项目!");
return;
}
learun.layerConfirm('是否确认去审核该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStudent/UnLock', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
@@ -68,66 +95,74 @@ var bootstrap = function ($, learun) {
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJ fGrid({
$('#gridtable').j fGrid({
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStudent/GetPageList',
headData: [
{ label: "学号", name: "StuNo", width: 100, align: "left"},
{ label: "姓名", name: "StuName", width: 100, align: "left"},
{ label: "性别", name: "GenderNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'usersexbit',
callback: function (_data) {
callback(_data.text);
}
});
}},
{ 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: "Mobile", width: 100, align: "left"},
{ label: "学生总余额", name: "FSBlance", 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: "IdentityCardNo", width: 200, align: "left" },
{
label: "系部", name: "DeptNo", width: 150, 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: 200, 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: 200, 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: "Mobile", width: 100, align: "left" },
{ label: "学生总余额", name: "FSBlance", width: 100, align: "left" },
{
label: "审核标志", name: "F_CheckMark", width: 80, align: "left", formatter: function (cellvalue, rowObject) {
return cellvalue == "1" ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}
},
],
mainId:'FSId',
mainId: 'FSId',
isMultiselect: true,
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {