我的设置样式 以及我的智能设备样式修改

This commit is contained in:
czz
2025-07-25 14:30:07 +08:00
parent 244018e103
commit 1f4b8bde39
11 changed files with 77 additions and 64 deletions

View File

@@ -1,9 +0,0 @@
class DeliveryStatus {
// 私有构造函数,防止实例化
const DeliveryStatus._();
// 物流状态常量
static const String no_de = '待发货';//下单之后待发货
static const String has_de = '已发货';//确认发货
static const String completed = '已签收';//签收
}

View File

@@ -1,37 +0,0 @@
class OrderStatus {
// 私有构造函数,防止实例化
const OrderStatus._();
// 订单状态常量值
static const int noPay = 1; // 已下单,待支付(both)
static const int paid = 2; // 已支付(app),待确认(web)
static const int toBeShipped = 3; // 已确认(web),待发货(app)
static const int toBeReceived = 4; // 已发货(web),待签收(app)
static const int received = 5; // 已签收(app),待完成(web)
static const int closed = 6; // 已关闭(both)
static const int completed = 7; // 已完成(web),已签收(app)
// 订单状态编号与描述的映射
static const Map<int, String> statuses = {
1: '待支付', // 已下单,待支付(both)
2: '已支付', // 已支付(app),待确认(web)
3: '待发货', // 已确认(web),待发货(app)
4: '待签收', // 已发货(web),待签收(app)
5: '已签收', // 已签收(app),待完成(web)
6: '已关闭', // 已关闭(both)
7: '已签收', // 已完成(web),已签收(app)
};
// 根据编号获取状态名称的描述
static String getDescriptionByCode(int code) {
return statuses[code] ?? '未知状态';
}
// 根据状态名称获取编号
static int getCodeByDescription(String description) {
return statuses.entries
.firstWhere((element) => element.value == description,
orElse: () => MapEntry(0, '未知状态'))
.key;
}
}

View File

@@ -1,10 +0,0 @@
class PayStatus {
// 私有构造函数,防止实例化
const PayStatus._();
// 支付状态常量
static const String no_pay = '待支付';
static const String have_pay = '已支付';
static const String close = '已关闭';
}