feature: 排班优化

This commit is contained in:
zhuyu 2025-06-27 10:17:46 +08:00
parent 8d7aceaf70
commit 881ae3d485

View File

@ -57,7 +57,14 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'editable'], function
if (row.editable === 1) {
return false;
} else {
return value;
const map = {
'0': '',
'1': '早班',
'2': '中班',
'3': '晚班',
'4': '行政班'
};
return map[value] ?? value;
}
},
}
@ -111,7 +118,21 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'editable'], function
{value: '2', text: '中班'},
{value: '3', text: '晚班'},
{value: '4', text: '行政班'},
]
],
noeditFormatter: function (value, row, index) {
if (row.editable === 1) {
return false;
} else {
const map = {
'0': '',
'1': '早班',
'2': '中班',
'3': '晚班',
'4': '行政班'
};
return map[value] ?? value;
}
},
}
});
}