提交
This commit is contained in:
1 parent
135dd550b6
commit
2a4767a014
76 files changed
+25160
-2306
No files matched your search
@@ -0,0 +1,26 @@
|
||||
import request from '@/utils/http'
|
||||
|
||||
export type QcItemParam = {
|
||||
id?: string
|
||||
paramName: string
|
||||
paramCode: string
|
||||
paramUnit?: string
|
||||
paramType: string
|
||||
requiredFlag: string
|
||||
orderNum?: number
|
||||
}
|
||||
|
||||
export function fetchQcItemParams(itemSource: string, itemId: string) {
|
||||
return request.get<QcItemParam[]>({
|
||||
url: '/web/admin/qc-item-params',
|
||||
params: { itemSource, itemId }
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchSaveQcItemParams(itemSource: string, itemId: string, params: QcItemParam[]) {
|
||||
return request.put<QcItemParam[]>({
|
||||
url: '/web/admin/qc-item-params',
|
||||
params: { itemSource, itemId },
|
||||
data: { params }
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
import request from '@/utils/http'
|
||||
|
||||
type PageList<T> = {
|
||||
list: T[]
|
||||
total: number
|
||||
page: number
|
||||
pageSize: number
|
||||
totalPages: number
|
||||
}
|
||||
|
||||
export type QcLabTestItem = {
|
||||
id: string
|
||||
itemCode: string
|
||||
itemName: string
|
||||
description?: string
|
||||
status: string
|
||||
orderNum: number
|
||||
remark?: string
|
||||
createTime?: string
|
||||
updateTime?: string
|
||||
}
|
||||
|
||||
export function fetchQcLabTestItemList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
status?: string
|
||||
}) {
|
||||
return request.get<PageList<QcLabTestItem>>({
|
||||
url: '/web/admin/qc-lab-test-items',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchQcLabTestItemsActive() {
|
||||
return request.get<QcLabTestItem[]>({
|
||||
url: '/web/admin/qc-lab-test-items/active'
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchCreateQcLabTestItem(data: {
|
||||
itemCode: string
|
||||
itemName: string
|
||||
description?: string
|
||||
status?: string
|
||||
orderNum?: number
|
||||
remark?: string
|
||||
}) {
|
||||
return request.post<QcLabTestItem>({
|
||||
url: '/web/admin/qc-lab-test-items',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchUpdateQcLabTestItem(
|
||||
id: string,
|
||||
data: Partial<{
|
||||
itemCode: string
|
||||
itemName: string
|
||||
description: string
|
||||
status: string
|
||||
orderNum: number
|
||||
remark: string
|
||||
}>
|
||||
) {
|
||||
return request.put<QcLabTestItem>({
|
||||
url: `/web/admin/qc-lab-test-items/${id}`,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchDeleteQcLabTestItem(id: string) {
|
||||
return request.del({ url: `/web/admin/qc-lab-test-items/${id}` })
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import request from '@/utils/http'
|
||||
|
||||
export type QcTaskResultItem = {
|
||||
paramId?: string
|
||||
paramName: string
|
||||
paramCode?: string
|
||||
paramUnit?: string
|
||||
paramType: string
|
||||
paramValue: string
|
||||
}
|
||||
|
||||
export function fetchQcTaskResults(taskId: string) {
|
||||
return request.get<QcTaskResultItem[]>({
|
||||
url: `/web/admin/qc-tasks/${taskId}/results`
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchCompleteTaskWithResult(
|
||||
taskId: string,
|
||||
data: { results: QcTaskResultItem[]; thirdPartyAttachments?: string }
|
||||
) {
|
||||
return request.post({
|
||||
url: `/web/admin/qc-tasks/${taskId}/complete-with-result`,
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
import request from '@/utils/http'
|
||||
|
||||
type PageList<T> = {
|
||||
list: T[]
|
||||
total: number
|
||||
page: number
|
||||
pageSize: number
|
||||
totalPages: number
|
||||
}
|
||||
|
||||
export type QcTask = {
|
||||
id: string
|
||||
workOrderId: string
|
||||
workOrderNo?: string
|
||||
taskNo: string
|
||||
taskType: string
|
||||
itemCode: string
|
||||
itemName: string
|
||||
companyId?: string
|
||||
companyName?: string
|
||||
feeAmount?: number
|
||||
taskStatus: string
|
||||
thirdPartyAttachments?: string
|
||||
completedTime?: string
|
||||
completedBy?: string
|
||||
remark?: string
|
||||
createTime?: string
|
||||
updateTime?: string
|
||||
}
|
||||
|
||||
export type QcTaskDetail = QcTask & {
|
||||
protocolNo?: string
|
||||
sampleCode?: string
|
||||
attachmentFiles?: Array<{ id?: string; fileUrl: string; fileName?: string }>
|
||||
results?: Array<{
|
||||
paramName: string
|
||||
paramUnit?: string
|
||||
paramType: string
|
||||
paramValue: string
|
||||
}>
|
||||
}
|
||||
|
||||
export function fetchQcTaskList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
taskType?: string
|
||||
taskStatus?: string
|
||||
workOrderId?: string
|
||||
}) {
|
||||
return request.get<PageList<QcTask>>({
|
||||
url: '/web/admin/qc-tasks',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchQcTaskDetail(id: string) {
|
||||
return request.get<QcTaskDetail>({
|
||||
url: `/web/admin/qc-tasks/${id}`
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchStartQcTask(id: string) {
|
||||
return request.post<QcTask>({
|
||||
url: `/web/admin/qc-tasks/${id}/start`
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchCompleteQcTask(id: string) {
|
||||
return request.post<QcTask>({
|
||||
url: `/web/admin/qc-tasks/${id}/complete`
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchUpdateQcTaskAttachments(id: string, thirdPartyAttachments: string) {
|
||||
return request.put<QcTask>({
|
||||
url: `/web/admin/qc-tasks/${id}/attachments`,
|
||||
data: { thirdPartyAttachments }
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
import request from '@/utils/http'
|
||||
|
||||
type PageList<T> = {
|
||||
list: T[]
|
||||
total: number
|
||||
page: number
|
||||
pageSize: number
|
||||
totalPages: number
|
||||
}
|
||||
|
||||
export type QcThirdPartyCompany = {
|
||||
id: string
|
||||
companyCode: string
|
||||
companyName: string
|
||||
contactName?: string
|
||||
contactPhone?: string
|
||||
address?: string
|
||||
invoiceTitle?: string
|
||||
taxId?: string
|
||||
bankName?: string
|
||||
bankAccount?: string
|
||||
status: string
|
||||
orderNum: number
|
||||
remark?: string
|
||||
createTime?: string
|
||||
updateTime?: string
|
||||
}
|
||||
|
||||
export function fetchQcThirdPartyCompanyList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
status?: string
|
||||
}) {
|
||||
return request.get<PageList<QcThirdPartyCompany>>({
|
||||
url: '/web/admin/qc-third-party-companies',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchQcThirdPartyCompanyOptions() {
|
||||
return request.get<Array<{ id: string; companyCode: string; companyName: string }>>({
|
||||
url: '/web/admin/qc-third-party-companies/options'
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchCreateQcThirdPartyCompany(data: {
|
||||
companyCode: string
|
||||
companyName: string
|
||||
contactName?: string
|
||||
contactPhone?: string
|
||||
address?: string
|
||||
invoiceTitle?: string
|
||||
taxId?: string
|
||||
bankName?: string
|
||||
bankAccount?: string
|
||||
status?: string
|
||||
orderNum?: number
|
||||
remark?: string
|
||||
}) {
|
||||
return request.post<QcThirdPartyCompany>({
|
||||
url: '/web/admin/qc-third-party-companies',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchUpdateQcThirdPartyCompany(
|
||||
id: string,
|
||||
data: Partial<{
|
||||
companyCode: string
|
||||
companyName: string
|
||||
contactName: string
|
||||
contactPhone: string
|
||||
address: string
|
||||
invoiceTitle: string
|
||||
taxId: string
|
||||
bankName: string
|
||||
bankAccount: string
|
||||
status: string
|
||||
orderNum: number
|
||||
remark: string
|
||||
}>
|
||||
) {
|
||||
return request.put<QcThirdPartyCompany>({
|
||||
url: `/web/admin/qc-third-party-companies/${id}`,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchDeleteQcThirdPartyCompany(id: string) {
|
||||
return request.del({ url: `/web/admin/qc-third-party-companies/${id}` })
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
import request from '@/utils/http'
|
||||
|
||||
type PageList<T> = {
|
||||
list: T[]
|
||||
total: number
|
||||
page: number
|
||||
pageSize: number
|
||||
totalPages: number
|
||||
}
|
||||
|
||||
export type QcThirdPartyItem = {
|
||||
id: string
|
||||
companyId: string
|
||||
companyName?: string
|
||||
itemCode: string
|
||||
itemName: string
|
||||
feeAmount: number
|
||||
status: string
|
||||
orderNum: number
|
||||
remark?: string
|
||||
createTime?: string
|
||||
updateTime?: string
|
||||
}
|
||||
|
||||
export function fetchQcThirdPartyItemList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
status?: string
|
||||
companyId?: string
|
||||
}) {
|
||||
return request.get<PageList<QcThirdPartyItem>>({
|
||||
url: '/web/admin/qc-third-party-items',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchQcThirdPartyItemsActive(companyId?: string) {
|
||||
return request.get<QcThirdPartyItem[]>({
|
||||
url: '/web/admin/qc-third-party-items/active',
|
||||
params: companyId ? { companyId } : undefined
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchCreateQcThirdPartyItem(data: {
|
||||
companyId: string
|
||||
itemCode: string
|
||||
itemName: string
|
||||
feeAmount: number
|
||||
status?: string
|
||||
orderNum?: number
|
||||
remark?: string
|
||||
}) {
|
||||
return request.post<QcThirdPartyItem>({
|
||||
url: '/web/admin/qc-third-party-items',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchUpdateQcThirdPartyItem(
|
||||
id: string,
|
||||
data: Partial<{
|
||||
companyId: string
|
||||
itemCode: string
|
||||
itemName: string
|
||||
feeAmount: number
|
||||
status: string
|
||||
orderNum: number
|
||||
remark: string
|
||||
}>
|
||||
) {
|
||||
return request.put<QcThirdPartyItem>({
|
||||
url: `/web/admin/qc-third-party-items/${id}`,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchDeleteQcThirdPartyItem(id: string) {
|
||||
return request.del({ url: `/web/admin/qc-third-party-items/${id}` })
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
import request from '@/utils/http'
|
||||
|
||||
type PageList<T> = {
|
||||
list: T[]
|
||||
total: number
|
||||
page: number
|
||||
pageSize: number
|
||||
totalPages: number
|
||||
}
|
||||
|
||||
export type QcWorkOrder = {
|
||||
id: string
|
||||
workOrderNo: string
|
||||
receptionId: string
|
||||
protocolSampleId: string
|
||||
collectionProtocolId: string
|
||||
protocolNo: string
|
||||
sampleCode: string
|
||||
workOrderStatus: string
|
||||
hasLab: boolean
|
||||
hasThirdParty: boolean
|
||||
configuredTime?: string
|
||||
configuredBy?: string
|
||||
thirdPartyFeeTotal?: number
|
||||
remark?: string
|
||||
createTime?: string
|
||||
updateTime?: string
|
||||
}
|
||||
|
||||
export type QcWorkOrderDetail = QcWorkOrder & {
|
||||
reception?: {
|
||||
receptionTime?: string
|
||||
handlerName?: string
|
||||
acceptConclusion?: string
|
||||
}
|
||||
labItems?: Array<{ id: string; labTestItemId: string; itemCode: string; itemName: string }>
|
||||
thirdPartyItems?: Array<{
|
||||
id: string
|
||||
thirdPartyItemId: string
|
||||
companyId: string
|
||||
companyName: string
|
||||
itemCode: string
|
||||
itemName: string
|
||||
feeAmount: number
|
||||
}>
|
||||
tasks?: Array<Record<string, unknown>>
|
||||
}
|
||||
|
||||
export function fetchQcWorkOrderList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
workOrderStatus?: string
|
||||
}) {
|
||||
return request.get<PageList<QcWorkOrder>>({
|
||||
url: '/web/admin/qc-work-orders',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchQcWorkOrderDetail(id: string) {
|
||||
return request.get<QcWorkOrderDetail>({
|
||||
url: `/web/admin/qc-work-orders/${id}`
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchConfigureQcWorkOrder(
|
||||
id: string,
|
||||
data: {
|
||||
hasLab: boolean
|
||||
hasThirdParty: boolean
|
||||
labItemIds: string[]
|
||||
thirdPartyItemIds: string[]
|
||||
}
|
||||
) {
|
||||
return request.post<QcWorkOrder>({
|
||||
url: `/web/admin/qc-work-orders/${id}/configure`,
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
import request from '@/utils/http'
|
||||
|
||||
type PageList<T> = {
|
||||
list: T[]
|
||||
total: number
|
||||
page: number
|
||||
pageSize: number
|
||||
totalPages: number
|
||||
}
|
||||
|
||||
export type SampleReceptionCheckItem = {
|
||||
id: string
|
||||
itemCode: string
|
||||
itemName: string
|
||||
status: string
|
||||
orderNum: number
|
||||
remark?: string
|
||||
createTime?: string
|
||||
updateTime?: string
|
||||
}
|
||||
|
||||
export function fetchSampleReceptionCheckItemList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
status?: string
|
||||
}) {
|
||||
return request.get<PageList<SampleReceptionCheckItem>>({
|
||||
url: '/web/admin/sample-reception-check-items',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchSampleReceptionCheckItemsActive() {
|
||||
return request.get<SampleReceptionCheckItem[]>({
|
||||
url: '/web/admin/sample-reception-check-items/active'
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchCreateSampleReceptionCheckItem(data: {
|
||||
itemCode: string
|
||||
itemName: string
|
||||
status?: string
|
||||
orderNum?: number
|
||||
remark?: string
|
||||
}) {
|
||||
return request.post<SampleReceptionCheckItem>({
|
||||
url: '/web/admin/sample-reception-check-items',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchUpdateSampleReceptionCheckItem(
|
||||
id: string,
|
||||
data: {
|
||||
itemCode?: string
|
||||
itemName?: string
|
||||
status?: string
|
||||
orderNum?: number
|
||||
remark?: string
|
||||
}
|
||||
) {
|
||||
return request.put<SampleReceptionCheckItem>({
|
||||
url: `/web/admin/sample-reception-check-items/${id}`,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchDeleteSampleReceptionCheckItem(id: string) {
|
||||
return request.del({
|
||||
url: `/web/admin/sample-reception-check-items/${id}`
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
import request from '@/utils/http'
|
||||
|
||||
type PageList<T> = {
|
||||
list: T[]
|
||||
total: number
|
||||
page: number
|
||||
pageSize: number
|
||||
totalPages: number
|
||||
}
|
||||
|
||||
export function fetchSampleReceptionPendingList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
}) {
|
||||
return request.get<PageList<Record<string, unknown>>>({
|
||||
url: '/web/admin/sample-receptions/pending',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchSampleReceptionReceivedList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
}) {
|
||||
return request.get<PageList<Record<string, unknown>>>({
|
||||
url: '/web/admin/sample-receptions/received',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchSampleReceptionDetail(receptionId: string) {
|
||||
return request.get<Record<string, unknown>>({
|
||||
url: `/web/admin/sample-receptions/${receptionId}`
|
||||
})
|
||||
}
|
||||
|
||||
export type SampleReceptionCheckResult = {
|
||||
id?: string
|
||||
checkItemId?: string
|
||||
itemCode: string
|
||||
itemName: string
|
||||
checked: boolean
|
||||
orderNum?: number
|
||||
}
|
||||
|
||||
export function fetchSampleReceptionSubmit(data: {
|
||||
protocolSampleId: string
|
||||
receptionTime: string
|
||||
handlerUserId?: string
|
||||
handlerName?: string
|
||||
receiveTemperature?: string
|
||||
volumeMl?: number
|
||||
netWeightG?: number
|
||||
checks: Array<{ checkItemId: string; checked: boolean }>
|
||||
acceptConclusion: 'js' | 'bj'
|
||||
receiveAttachments?: string
|
||||
remark?: string
|
||||
}) {
|
||||
return request.post({
|
||||
url: '/web/admin/sample-receptions',
|
||||
data
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user