|
|
@@ -10,18 +10,24 @@ var bootstrap = function ($, learun) { |
|
|
|
"use strict"; |
|
|
|
var page = { |
|
|
|
init: function () { |
|
|
|
page.initGird(); |
|
|
|
page.bind(); |
|
|
|
setTimeout(function () { |
|
|
|
page.initGird(); |
|
|
|
}, 500);//延迟 |
|
|
|
|
|
|
|
}, |
|
|
|
bind: function () { |
|
|
|
$('#SYear').lrselect({ |
|
|
|
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { |
|
|
|
page.search(queryJson); |
|
|
|
}, 300, 400); |
|
|
|
$('#FSYear').lrselect({ |
|
|
|
url: top.$.rootUrl + '/EducationalAdministration/CdMajor/GenerateNearByYear', |
|
|
|
value: 'value', |
|
|
|
text: 'text' |
|
|
|
}); |
|
|
|
var now = new Date(); |
|
|
|
sYear = now.getFullYear(); |
|
|
|
$('#SYear').lrselectSet(sYear); |
|
|
|
$('#FSYear').lrselectSet(sYear); |
|
|
|
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); |
|
|
|
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); |
|
|
|
$('#PayFeeStatus').lrDataItemSelect({ code: 'PayStatus' }); |
|
|
@@ -43,18 +49,20 @@ var bootstrap = function ($, learun) { |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
// 编辑 |
|
|
|
$('#lr_edit').on('click', function () { |
|
|
|
// 恢复 |
|
|
|
$('#lr_undelete').on('click', function () { |
|
|
|
var keyValue = $('#gridtable').jfGridValue('FSYIId'); |
|
|
|
var ChargeItemType = $('#gridtable').jfGridValue('F_DeleteMark'); |
|
|
|
if (learun.checkrow(keyValue)) { |
|
|
|
learun.layerForm({ |
|
|
|
id: 'form', |
|
|
|
title: '编辑', |
|
|
|
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStuYearItem/Form?keyValue=' + keyValue, |
|
|
|
width: 600, |
|
|
|
height: 400, |
|
|
|
callBack: function (id) { |
|
|
|
return top[id].acceptClick(refreshGirdData); |
|
|
|
if (ChargeItemType.indexOf('1') != -1) { |
|
|
|
learun.alert.error("包含未作废项目,不能恢复"); |
|
|
|
return; |
|
|
|
} |
|
|
|
learun.layerConfirm('是否确认恢复该项!', function (res) { |
|
|
|
if (res) { |
|
|
|
learun.deleteForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStuYearItem/UnDeleteForm', { keyValue: keyValue }, function () { |
|
|
|
refreshGirdData(); |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
@@ -62,10 +70,20 @@ var bootstrap = function ($, learun) { |
|
|
|
// 作废 |
|
|
|
$('#lr_delete').on('click', function () { |
|
|
|
var keyValue = $('#gridtable').jfGridValue('FSYIId'); |
|
|
|
var ChargeItemType = $('#gridtable').jfGridValue('ChargeItemType'); |
|
|
|
var PayFeeStatus = $('#gridtable').jfGridValue('PayFeeStatus'); |
|
|
|
if (learun.checkrow(keyValue)) { |
|
|
|
if (ChargeItemType.indexOf('1')!=-1) { |
|
|
|
learun.alert.error("包含固定收费项目,不能作废"); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (PayFeeStatus.indexOf('1') != -1 || PayFeeStatus.indexOf('4') != -1) { |
|
|
|
learun.alert.error("包含已缴费项目,不能作废"); |
|
|
|
return; |
|
|
|
} |
|
|
|
learun.layerConfirm('是否确认作废该项!', function (res) { |
|
|
|
if (res) { |
|
|
|
learun.deleteForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStuYearItem/DeleteForm', { keyValue: keyValue}, function () { |
|
|
|
learun.deleteForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStuYearItem/DeleteForm', { keyValue: keyValue }, function () { |
|
|
|
refreshGirdData(); |
|
|
|
}); |
|
|
|
} |
|
|
@@ -107,48 +125,56 @@ var bootstrap = function ($, learun) { |
|
|
|
} |
|
|
|
}, |
|
|
|
{ label: "缴费年度", name: "FSYear", width: 100, align: "left" }, |
|
|
|
{ label: "收费项目编号", name: "ChargeItemCode", width: 100, align: "left"}, |
|
|
|
{ label: "收费项名称", name: "ChargeItemName", width: 100, align: "left"}, |
|
|
|
{ label: "收费项目类型", name: "ChargeItemType", width: 100, align: "left", |
|
|
|
formatterAsync: function (callback, value, row, op,$cell) { |
|
|
|
learun.clientdata.getAsync('dataItem', { |
|
|
|
key: value, |
|
|
|
code: 'ChargeItemType', |
|
|
|
callback: function (_data) { |
|
|
|
callback(_data.text); |
|
|
|
} |
|
|
|
}); |
|
|
|
}}, |
|
|
|
{ label: "收费标准", name: "Standard", width: 100, align: "left"}, |
|
|
|
{ label: "收费项目编号", name: "ChargeItemCode", width: 100, align: "left" }, |
|
|
|
{ label: "收费项名称", name: "ChargeItemName", width: 100, align: "left" }, |
|
|
|
{ |
|
|
|
label: "收费项目类型", name: "ChargeItemType", width: 100, align: "left", |
|
|
|
formatterAsync: function (callback, value, row, op, $cell) { |
|
|
|
learun.clientdata.getAsync('dataItem', { |
|
|
|
key: value, |
|
|
|
code: 'ChargeItemType', |
|
|
|
callback: function (_data) { |
|
|
|
callback(_data.text); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ label: "收费标准", name: "Standard", width: 100, align: "left" }, |
|
|
|
{ label: "实缴金额", name: "SJAmount", width: 100, align: "left" }, |
|
|
|
{ label: "应缴余额", name: "FSBlance", width: 100, align: "left" }, |
|
|
|
{ label: "缴费状态", name: "PayFeeStatus", width: 100, align: "left", |
|
|
|
formatterAsync: function (callback, value, row, op,$cell) { |
|
|
|
learun.clientdata.getAsync('dataItem', { |
|
|
|
key: value, |
|
|
|
code: 'PayStatus', |
|
|
|
callback: function (_data) { |
|
|
|
callback(_data.text); |
|
|
|
} |
|
|
|
}); |
|
|
|
{ |
|
|
|
label: "缴费状态", name: "PayFeeStatus", width: 100, align: "left", |
|
|
|
formatterAsync: function (callback, value, row, op, $cell) { |
|
|
|
learun.clientdata.getAsync('dataItem', { |
|
|
|
key: value, |
|
|
|
code: 'PayStatus', |
|
|
|
callback: function (_data) { |
|
|
|
callback(_data.text); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "是否作废", name: "F_DeleteMark", width: 100, align: "left", |
|
|
|
formatter: function (cellvalue, rowObject) { |
|
|
|
return cellvalue == "1" ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; |
|
|
|
formatter: function (cellvalue, row) { |
|
|
|
if (cellvalue ===true) { |
|
|
|
return '<span class=\"label label-warning\">作废</span>'; |
|
|
|
} else{ |
|
|
|
return '<span class=\"label label-success\">正常</span>'; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
], |
|
|
|
mainId:'FSYIId', |
|
|
|
isPage: true |
|
|
|
mainId: 'FSYIId', |
|
|
|
isPage: true, |
|
|
|
isMultiselect: true |
|
|
|
}); |
|
|
|
page.search(); |
|
|
|
}, |
|
|
|
search: function (param) { |
|
|
|
param = param || {}; |
|
|
|
param.SYear = sYear; |
|
|
|
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); |
|
|
|
param.FSYear = $('#FSYear').lrselectGet(); |
|
|
|
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); |
|
|
|
} |
|
|
|
}; |
|
|
|
refreshGirdData = function () { |
|
|
|