This commit is contained in:
zlwu committed 2026-09-03 15:54:34 +08:00
1 parent 54a1ba0c5c
commit dd3bb3cf06
896 files changed
+668620 -194702

No files matched your search

@@ -18,7 +18,7 @@ import { PL_PLAN_TYPE_TABS } from '@/utils/pl-display'
const props = defineProps<{
modelValue: string
/** 覆盖默认单据类型 Tab(如运输计划追加「待安排」、危化品证上传页追加「未上传证书」) */
/** 覆盖默认单据类型 Tab(如运输计划追加「待安排」「草稿中」、危化品证上传页追加「未上传证书」) */
tabs?: { label: string; name: string }[]
}>()
+14 -5
View File
@@ -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) }
}
+2 -6
View File
@@ -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)
}
+7 -4
View File
@@ -816,6 +816,7 @@ import { useListTableViewportHeight } from '@/composables/useListTableViewportHe
PL_PLAN_DEFAULT_FOLLOW_STATUSES,
PL_PLAN_FOLLOW_STATUS_OPTIONS,
PL_PLAN_LIST_TABS,
isPlPlanFollowStatusListTab,
plPlanListTabToFilters,
type PlPlanListTab,
type PlPrintSlipCommand
@@ -1153,7 +1154,7 @@ tableEl: planTableWrapRef,
const searchForm = reactive({
planNo: '',
planType: '',
followStatus: ['pending_arrange', 'drafting'] as string[],
followStatus: ['pending_arrange'] as string[],
customerName: '',
productName: '',
licensePlate: ''
@@ -1213,8 +1214,10 @@ tableEl: planTableWrapRef,
const filters = plPlanListTabToFilters(nextTab)
searchForm.planType = filters.planType
if (nextTab === 'pending_arrange') {
searchForm.followStatus = ['pending_arrange', 'drafting']
} else if (prevTab === 'pending_arrange') {
searchForm.followStatus = ['pending_arrange']
} else if (nextTab === 'drafting') {
searchForm.followStatus = ['drafting']
} else if (isPlPlanFollowStatusListTab(prevTab) && !isPlPlanFollowStatusListTab(nextTab)) {
searchForm.followStatus = [...PL_PLAN_DEFAULT_FOLLOW_STATUSES]
}
pagination.page = 1
@@ -1225,7 +1228,7 @@ tableEl: planTableWrapRef,
activePlanTypeTab.value = 'pending_arrange'
searchForm.planNo = ''
searchForm.planType = ''
searchForm.followStatus = ['pending_arrange', 'drafting']
searchForm.followStatus = ['pending_arrange']
searchForm.customerName = ''
searchForm.productName = ''
searchForm.licensePlate = ''