diff --git a/public/assets/js/backend/oa/custom_schedule.js b/public/assets/js/backend/oa/custom_schedule.js index 28ad88d..26af232 100644 --- a/public/assets/js/backend/oa/custom_schedule.js +++ b/public/assets/js/backend/oa/custom_schedule.js @@ -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; + } + }, } }); }