feat: 新增订单拨号功能,重构订单页与登录页
This commit is contained in:
1 parent
774403785c
commit
411ec8be23
9 files changed
+875
-482
No files matched your search
@@ -66,6 +66,34 @@ class Order {
|
||||
/// 是否处于「现场勘察中(1)」,仅该状态可维护勘察明细。
|
||||
bool get surveyEditable => source == 'survey' && status == 1;
|
||||
|
||||
/// 是否已完成:报修(2)、安装/维保(1)、勘察已归档(3)。
|
||||
bool get isCompleted => switch (source) {
|
||||
'repair' => status == 2,
|
||||
'install' || 'maintenance' => status == 1,
|
||||
'survey' => status == 3,
|
||||
_ => false,
|
||||
};
|
||||
|
||||
/// 当前状态文案,用于「进行中 / 已完成」列表的状态标签。
|
||||
String get statusText => switch (source) {
|
||||
'survey' => switch (status) {
|
||||
0 => '待指派',
|
||||
1 => '现场勘察中',
|
||||
2 => '待技术复核',
|
||||
3 => '已归档',
|
||||
5 => '已取消',
|
||||
_ => '进行中',
|
||||
},
|
||||
'repair' => switch (status) {
|
||||
0 => '待处理',
|
||||
1 => '处理中',
|
||||
2 => '已完成',
|
||||
_ => '进行中',
|
||||
},
|
||||
'install' || 'maintenance' => status == 1 ? '已完成' : '待上门',
|
||||
_ => isCompleted ? '已完成' : '进行中',
|
||||
};
|
||||
|
||||
/// 来源中文名,用于收益明细副标题等场景。
|
||||
String get sourceName => switch (source) {
|
||||
'repair' => '家庭电路维修',
|
||||
|
||||
Reference in new issue
Block a user