提交
This commit is contained in:
1 parent
9a73e87ce8
commit
4ea71a1bae
70 files changed
+24056
-18383
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import request from '@/utils/http'
|
||||
import type { QcTaskOperateScope } from '@/api/qc-task'
|
||||
|
||||
export type QcTaskResultItem = {
|
||||
paramId?: string
|
||||
@@ -52,10 +53,12 @@ export function fetchCompleteTaskWithResult(
|
||||
usageUnit?: string
|
||||
remark?: string
|
||||
}>
|
||||
}
|
||||
},
|
||||
operateScope?: QcTaskOperateScope
|
||||
) {
|
||||
return request.post({
|
||||
url: `/web/admin/qc-tasks/${taskId}/complete-with-result`,
|
||||
params: operateScope === 'mine' ? { operateScope: 'mine' } : undefined,
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -73,11 +73,16 @@ export type QcTask = {
|
||||
attachmentFiles?: Array<{ id?: string; fileUrl: string; fileName?: string; fileType?: string }>
|
||||
completedTime?: string
|
||||
completedBy?: string
|
||||
assigneeUserIds?: string[]
|
||||
assigneeUserNames?: string
|
||||
sourceLineId?: string
|
||||
remark?: string
|
||||
createTime?: string
|
||||
updateTime?: string
|
||||
}
|
||||
|
||||
export type QcTaskOperateScope = 'mine' | 'manage'
|
||||
|
||||
export type QcTaskDetail = QcTask & {
|
||||
reception?: QcTaskReceptionDetail
|
||||
attachmentFiles?: Array<{ id?: string; fileUrl: string; fileName?: string }>
|
||||
@@ -104,15 +109,30 @@ export function fetchQcTaskList(params?: {
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchMyQcTaskList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
taskType?: string
|
||||
taskStatus?: string
|
||||
qcBizType?: string
|
||||
}) {
|
||||
return request.get<PageList<QcTask>>({
|
||||
url: '/web/admin/qc-tasks/mine',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchQcTaskDetail(id: string) {
|
||||
return request.get<QcTaskDetail>({
|
||||
url: `/web/admin/qc-tasks/${id}`
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchStartQcTask(id: string) {
|
||||
export function fetchStartQcTask(id: string, operateScope?: QcTaskOperateScope) {
|
||||
return request.post<QcTask>({
|
||||
url: `/web/admin/qc-tasks/${id}/start`
|
||||
url: `/web/admin/qc-tasks/${id}/start`,
|
||||
params: operateScope === 'mine' ? { operateScope: 'mine' } : undefined
|
||||
})
|
||||
}
|
||||
|
||||
@@ -122,9 +142,14 @@ export function fetchCompleteQcTask(id: string) {
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchUpdateQcTaskAttachments(id: string, thirdPartyAttachments: string) {
|
||||
export function fetchUpdateQcTaskAttachments(
|
||||
id: string,
|
||||
thirdPartyAttachments: string,
|
||||
operateScope?: QcTaskOperateScope
|
||||
) {
|
||||
return request.put<QcTask>({
|
||||
url: `/web/admin/qc-tasks/${id}/attachments`,
|
||||
params: operateScope === 'mine' ? { operateScope: 'mine' } : undefined,
|
||||
data: { thirdPartyAttachments }
|
||||
})
|
||||
}
|
||||
|
||||
@@ -121,6 +121,9 @@ export type QcWorkOrderDetail = QcWorkOrder & {
|
||||
conclusionLabel?: string
|
||||
remark?: string
|
||||
completedTime?: string
|
||||
sourceLineId?: string
|
||||
assigneeUserIds?: string[]
|
||||
assigneeUserNames?: string
|
||||
attachmentFiles?: Array<{ id?: string; fileUrl?: string; fileName?: string }>
|
||||
}>
|
||||
}
|
||||
@@ -156,6 +159,8 @@ export function fetchConfigureQcWorkOrder(
|
||||
hasThirdParty: boolean
|
||||
labItemIds: string[]
|
||||
thirdPartyItemIds: string[]
|
||||
labItemAssignees?: Record<string, string[]>
|
||||
thirdPartyItemAssignees?: Record<string, string[]>
|
||||
}
|
||||
) {
|
||||
return request.post<QcWorkOrder>({
|
||||
|
||||
Reference in new issue
Block a user