style: 统一全仓代码格式
This commit is contained in:
1 parent
d811478d0f
commit
8033cabff9
30 files changed
+1183
-187
No files matched your search
@@ -1,12 +1,21 @@
|
||||
const STATUS_LABELS = { received: '待确认', contacting: '沟通中', confirmed: '已确认', completed: '已完成', cancelled: '已取消' };
|
||||
const FULFILLMENT_LABELS = { pickup: '自取', delivery: '配送' };
|
||||
const STATUS_LABELS = {
|
||||
received: "待确认",
|
||||
contacting: "沟通中",
|
||||
confirmed: "已确认",
|
||||
completed: "已完成",
|
||||
cancelled: "已取消",
|
||||
};
|
||||
const FULFILLMENT_LABELS = { pickup: "自取", delivery: "配送" };
|
||||
|
||||
function bookingViewModel(item, template) {
|
||||
return {
|
||||
...item,
|
||||
statusLabel: STATUS_LABELS[item.status] || '未知状态',
|
||||
fulfillmentLabel: template?.modeLabels?.[item.fulfillmentType] || FULFILLMENT_LABELS[item.fulfillmentType] || '待确认',
|
||||
serviceName: item.service?.name || item.items?.[0]?.serviceNameSnapshot || '未命名服务',
|
||||
statusLabel: STATUS_LABELS[item.status] || "未知状态",
|
||||
fulfillmentLabel:
|
||||
template?.modeLabels?.[item.fulfillmentType] ||
|
||||
FULFILLMENT_LABELS[item.fulfillmentType] ||
|
||||
"待确认",
|
||||
serviceName: item.service?.name || item.items?.[0]?.serviceNameSnapshot || "未命名服务",
|
||||
quantityLabel: `${item.items?.[0]?.quantity || 1} 份`,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user