修改幾個小 issue

This commit is contained in:
2026-03-21 21:23:56 +08:00
parent 9068d85c92
commit af27b77ad7
11 changed files with 674 additions and 120 deletions
+16 -6
View File
@@ -90,21 +90,31 @@ class Leave {
return '${df.format(startTime!)} ~ ${df.format(endTime!)}';
}
/*
-- [sign_status] [varchar](2) not null, -- N:待簽核 P:簽核中 R:拒絶 A:同意 C:作廢
-- [flow_status] [varchar](2) not null, -- N:待簽核 P:簽核中 Z:結案 C:作廢
*/
// 狀態顏色映射
Color get statusColor {
switch (flowStatus) {
case '1': return Colors.orange; // 審核中
case '2': return Colors.green; // 已核准
case 'X': return Colors.red; // 駁回
case 'N': return Colors.blue; // 待簽核
case 'P': return Colors.orange; // 審核中
case 'A': return Colors.green; // 同意
case 'R': return Colors.red; // 駁回
case 'C': return Colors.black; // 作廢
case 'Z': return Colors.purple; // 結案
default: return Colors.grey; // 草稿
}
}
String get statusText {
switch (flowStatus) {
case '1': return '審核中';
case '2': return '已核准';
case 'X': return '已駁回';
case 'N': return '待簽核';
case 'P': return '審核中';
case 'A': return '同意';
case 'R': return '駁回';
case 'C': return '作廢';
case 'Z': return '結案';
default: return '草稿';
}
}