提交
This commit is contained in:
1 parent
54a1ba0c5c
commit
dd3bb3cf06
896 files changed
+668620
-194702
No files matched your search
@@ -352,8 +352,8 @@ export function canPrintSlipCommand(
|
||||
|
||||
export type PlPlanTypeTab = 'all' | 'inbound' | 'outbound' | 'direct'
|
||||
|
||||
/** 运输计划列表 Tab(在单据类型后增加「待安排」) */
|
||||
export type PlPlanListTab = PlPlanTypeTab | 'pending_arrange'
|
||||
/** 运输计划列表 Tab(单据类型前增加「待安排」「草稿中」) */
|
||||
export type PlPlanListTab = PlPlanTypeTab | 'pending_arrange' | 'drafting'
|
||||
|
||||
/** 危化品证上传页 Tab(在单据类型后增加「未上传证书」) */
|
||||
export type PlPlanCertTab = PlPlanTypeTab | 'cert_incomplete'
|
||||
@@ -366,7 +366,8 @@ export const PL_PLAN_TYPE_TABS: { label: string; name: PlPlanTypeTab }[] = [
|
||||
]
|
||||
|
||||
export const PL_PLAN_LIST_TABS: { label: string; name: PlPlanListTab }[] = [
|
||||
{ label: '待安排/草稿', name: 'pending_arrange' }, // name 保留;语义含 drafting
|
||||
{ label: '待安排', name: 'pending_arrange' },
|
||||
{ label: '草稿中', name: 'drafting' },
|
||||
...PL_PLAN_TYPE_TABS
|
||||
]
|
||||
|
||||
@@ -375,6 +376,12 @@ export const PL_PLAN_CERT_TABS: { label: string; name: PlPlanCertTab }[] = [
|
||||
...PL_PLAN_TYPE_TABS
|
||||
]
|
||||
|
||||
export function isPlPlanFollowStatusListTab(
|
||||
tab: PlPlanListTab | string
|
||||
): tab is 'pending_arrange' | 'drafting' {
|
||||
return tab === 'pending_arrange' || tab === 'drafting'
|
||||
}
|
||||
|
||||
export function plPlanTypeTabToFilter(tab: PlPlanTypeTab): string {
|
||||
return tab === 'all' ? '' : tab
|
||||
}
|
||||
@@ -384,8 +391,10 @@ export function plPlanListTabToFilters(tab: PlPlanListTab): {
|
||||
followStatus?: string
|
||||
} {
|
||||
if (tab === 'pending_arrange') {
|
||||
// followStatus 由列表 searchForm 控制(默认 pending_arrange + drafting)
|
||||
return { planType: '' }
|
||||
return { planType: '', followStatus: 'pending_arrange' }
|
||||
}
|
||||
if (tab === 'drafting') {
|
||||
return { planType: '', followStatus: 'drafting' }
|
||||
}
|
||||
return { planType: plPlanTypeTabToFilter(tab) }
|
||||
}
|
||||
|
||||
@@ -326,16 +326,12 @@ export function enrichStopProductsDisplayFromPlan(
|
||||
})
|
||||
}
|
||||
|
||||
/** 查看态:段产品为空时回退计划产品,再补齐展示字段(与编辑弹窗 bootstrap 一致) */
|
||||
/** 查看态:仅展示段上真实产品(空段不回退计划产品);有段产品时补齐展示字段 */
|
||||
export function resolveStopProductsForView(
|
||||
stopProducts: PlanStopProductFormRow[] | undefined | null,
|
||||
planProducts: PlanFormProductRow[]
|
||||
): PlanStopProductFormRow[] {
|
||||
const rows = stopProducts?.length
|
||||
? stopProducts
|
||||
: planProducts.length
|
||||
? createStopProductsFromPlanProducts(planProducts)
|
||||
: []
|
||||
const rows = stopProducts?.length ? stopProducts : []
|
||||
return enrichStopProductsDisplayFromPlan(rows, planProducts)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user