Commit b53180f4 authored by 林期斌's avatar 林期斌
Browse files

feat: 批量激活传参

parent d81834e0
......@@ -1409,6 +1409,7 @@ var allowBatchActivatings = ['Y', 'S'];
var xinghuoSym = {
isXingHuoSym: Index.getLoginUser().institution === 'xinghuo',
canBatchActivating: false,
batchRegStatus: '',
init: function () {
if (this.isXingHuoSym) {
Array.prototype.forEach.call(document.querySelectorAll('.xinghuoSym-inline-block'), function (ele) {
......@@ -1423,19 +1424,29 @@ var xinghuoSym = {
// }, false);
},
checkBatchActivating: function () {
this.canBatchActivating = allowBatchActivatings.includes(document.querySelector('#batchRegStatus').value);
this.batchRegStatus = document.querySelector('#batchRegStatus').value;
this.canBatchActivating = allowBatchActivatings.includes(this.batchRegStatus);
},
afterSelectStudent: function () {
var $btn = $('#studentBatchRegBtn');
if (this.isXingHuoSym && this.canBatchActivating) {
var studentIdList = $jqgridCached.jqGrid('getGridParam', 'selarrrow');
var selectedList = studentIdList.map(function (rowId) {
const item = $jqgridCached.jqGrid('getRowData', rowId);
return {
cusId: $jqgridCached.jqGrid('getRowData', rowId).latestCustomerId,
cusId: item.latestCustomerId,
studentId: rowId,
blCampusId: item.blCampusId
};
});
$btn.data('customerStudents', JSON.stringify(selectedList));
$btn.data('batchActivatingParams', {
selectedList,
batchRegStatus: this.batchRegStatus,
cbToRefresh: () => {
$jqgridCached.trigger('reloadGrid');
}
});
if (studentIdList.length > 0) {
$btn.removeAttrs('disabled');
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment