Commit 839c1833 by wusiyi

Merge branch 'dev_new_status' into 'dev'

feat: 工厂订单左侧状态栏数据统计增加单位描述 #1010844

See merge request !270
parents d4726efb d4f2c0e3
......@@ -3,6 +3,7 @@ export interface StatusTreeNode {
status: string
statusName: string
quantity: number
unit?: string // 数量单位
children: StatusTreeNode[] | null
}
......
......@@ -2,6 +2,7 @@ export interface StatusTreeNode {
status: string
statusName: string
quantity: number
unit?: string // 数量单位
children: StatusTreeNode[] | null
}
......
......@@ -27,6 +27,17 @@ export function useOrderStatusTree(options: UseOrderStatusTreeOptions) {
]
const specialLayoutStatuses = ['BATCH_MANAGE', 'AWAITING_RESTOCK']
/** 左侧状态栏数量单位 */
const STATUS_QUANTITY_UNIT: Record<string, string> = {
PENDING_SCHEDULE: '件',
PENDING_PICK: '件',
PENDING_REPLENISH: '件',
IN_PRODUCTION: '件',
PENDING_PACKING: '件',
BATCH_MANAGE: '批',
AWAITING_RESTOCK: '个',
}
const statusTree = ref<StatusTreeNode[]>()
const status = ref<string>('PENDING_RECEIVE')
const pendingAcceptSubTab = ref<
......@@ -149,7 +160,11 @@ export function useOrderStatusTree(options: UseOrderStatusTreeOptions) {
hasPermission ||
(isGroupContainer && filteredChildren.length > 0)
) {
result.push({ ...node, children: filteredChildren })
result.push({
...node,
children: filteredChildren,
unit: STATUS_QUANTITY_UNIT[node.status] ?? '单',
})
}
}
return result
......
......@@ -28,7 +28,7 @@
"
class="tree-node-count"
>
{{ `(${data.quantity})` }}
{{ `(${data.quantity}${data.unit ?? '单'})` }}
</span>
</div>
<span
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment