feat(project): group assignment records by business type
Add four business tabs and identifying fields so users can locate orders before assigning projects. Introduce a permission-scoped detail query with child EXISTS searches and batched enrichment, preserving statistics and assignment writes. Approved Figma v2; independent source review completed. Tests authored but not executed under the user self-test arrangement. Related to issue #13.
This commit is contained in:
1 parent
2a7e763cdf
commit
29f9866a24
9 files changed
+611
-22
No files matched your search
@@ -21,6 +21,33 @@ export type ProjectOption = {
|
||||
disabled?: boolean
|
||||
}
|
||||
export type ProjectRecord = Record<string, any>
|
||||
export type AssignmentBizType = Exclude<BizType, 'presign'>
|
||||
export interface AssignmentRecord {
|
||||
id: string
|
||||
bizType: AssignmentBizType
|
||||
bizNo: string | null
|
||||
status: string
|
||||
projectId: string | null
|
||||
projectName: string | null
|
||||
teamId: string | null
|
||||
teamName: string | null
|
||||
createTime: string | null
|
||||
motherName?: string
|
||||
motherPhone?: string
|
||||
hospitalName?: string
|
||||
salesUserName?: string
|
||||
collectionDate?: string
|
||||
donationDate?: string
|
||||
applicationName?: string | null
|
||||
channelName?: string | null
|
||||
serviceOrderName?: string | null
|
||||
patientName?: string
|
||||
patientPhone?: string
|
||||
projectTitle?: string | null
|
||||
customerName?: string | null
|
||||
customerContact?: string | null
|
||||
customerPhone?: string | null
|
||||
}
|
||||
const base = '/web/admin/project-management'
|
||||
export const fetchProjectOptions = (params: {
|
||||
bizType?: BizType
|
||||
@@ -58,6 +85,11 @@ export const fetchProjectRecords = (params: Record<string, unknown>) =>
|
||||
url: `${base}/records`,
|
||||
params
|
||||
})
|
||||
export const fetchAssignmentRecords = (params: Record<string, unknown>) =>
|
||||
request.get<{ list: AssignmentRecord[]; total: number; statusCounts: Record<string, number> }>({
|
||||
url: `${base}/assignments/records`,
|
||||
params
|
||||
})
|
||||
export const previewAssignment = (data: ProjectRecord) =>
|
||||
request.post<{ records: ProjectRecord[] }>({ url: `${base}/assignments/preview`, data })
|
||||
export const saveAssignment = (data: ProjectRecord) =>
|
||||
|
||||
Reference in new issue
Block a user