feat(web-admin): add plan draft save UI and drafting follow-status filters

Rename pending tab to 待安排/草稿, default-select drafting, and add 暂存 with saveMode.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-09-02 11:42:23 +08:00
1 parent ae91fbc63e
commit 3c7e3c69c5
4 files changed
+77 -9

No files matched your search

+6 -2
View File
@@ -366,7 +366,7 @@ export const PL_PLAN_TYPE_TABS: { label: string; name: PlPlanTypeTab }[] = [
]
export const PL_PLAN_LIST_TABS: { label: string; name: PlPlanListTab }[] = [
{ label: '待安排', name: 'pending_arrange' },
{ label: '待安排/草稿', name: 'pending_arrange' }, // name 保留;语义含 drafting
...PL_PLAN_TYPE_TABS
]
@@ -384,7 +384,8 @@ export function plPlanListTabToFilters(tab: PlPlanListTab): {
followStatus?: string
} {
if (tab === 'pending_arrange') {
return { planType: '', followStatus: 'pending_arrange' }
// followStatus 由列表 searchForm 控制(默认 pending_arrange + drafting)
return { planType: '' }
}
return { planType: plPlanTypeTabToFilter(tab) }
}
@@ -419,6 +420,7 @@ export function plPlanTypeFilterToTab(planType?: string): PlPlanTypeTab {
/** 运输计划跟进状态选项(筛选) */
export const PL_PLAN_FOLLOW_STATUS_OPTIONS = [
{ label: '草稿中', value: 'drafting' },
{ label: '等通知', value: 'wait_notice' },
{ label: '待安排', value: 'pending_arrange' },
{ label: '已安排', value: 'arranged' },
@@ -433,6 +435,7 @@ export const PL_PLAN_DEFAULT_FOLLOW_STATUSES = PL_PLAN_FOLLOW_STATUS_OPTIONS.fil
export function getPlPlanFollowStatusTagType(status?: string) {
const map: Record<string, string> = {
drafting: 'info',
wait_notice: 'warning',
pending_arrange: 'danger',
arranged: 'success',
@@ -447,6 +450,7 @@ export function getPlPlanFollowStatusTagType(status?: string) {
export function getPlPlanFollowStatusLabel(status?: string) {
const map: Record<string, string> = {
drafting: '草稿中',
wait_notice: '等通知',
pending_arrange: '待安排',
arranged: '已安排',