This commit is contained in:
zlwu committed 2026-06-13 19:47:22 +08:00
1 parent e1d6de45a3
commit 5ad07c8cac
616 files changed
+181132 -35125

No files matched your search

+21
View File
@@ -1350,6 +1350,27 @@ export function fetchDeleteAccessLog(id: string) {
return request.del({ url: `/web/admin/clean-room-access-logs/${id}` })
}
export function fetchUvDisinfectLogList(params?: {
page?: number
pageSize?: number
cleanRoomId?: string
keyword?: string
}) {
return request.get({ url: '/web/admin/clean-room-uv-disinfect-logs', params })
}
export function fetchCreateUvDisinfectLog(data: Record<string, any>) {
return request.post({ url: '/web/admin/clean-room-uv-disinfect-logs', params: data })
}
export function fetchUpdateUvDisinfectLog(id: string, data: Record<string, any>) {
return request.put({ url: `/web/admin/clean-room-uv-disinfect-logs/${id}`, params: data })
}
export function fetchDeleteUvDisinfectLog(id: string) {
return request.del({ url: `/web/admin/clean-room-uv-disinfect-logs/${id}` })
}
// ---------------------------------------------------------------------------
// 库位管理
// ---------------------------------------------------------------------------
+123
View File
@@ -0,0 +1,123 @@
import request from '@/utils/http'
type PageList<T> = {
list: T[]
total: number
page: number
pageSize: number
totalPages: number
}
export type MaterialStockCheck = {
id: string
title: string
checkTime: string
status: string
statusLabel: string
completeTime?: string
remark?: string
batchLineCount: number
unusedLineCount: number
createBy: string
createByName?: string
createTime: string
updateTime: string
}
export type MaterialStockCheckBatchLine = {
id: string
materialCode: string
materialName: string
specModel: string
unit: string
stockInNo: string
stockInDate: string
expireDate: string
catalogNo: string
batchNo: string
manufacturer: string
unitPrice: number
amount: number
remainingQty: number
remainingAmount?: number
remark?: string
}
export type MaterialStockCheckUnusedLine = {
id?: string
materialCode?: string
materialName: string
specModel?: string
unit?: string
stockInNo?: string
stockInDate?: string
expireDate?: string
catalogNo?: string
batchNo?: string
manufacturer?: string
unitPrice?: number | null
remainingAmount?: number | null
holder?: string
unusedQty: number
remark?: string
batchPickId?: string
fromBatch?: boolean
}
export type MaterialStockCheckDetail = MaterialStockCheck & {
batchLines: MaterialStockCheckBatchLine[]
unusedLines: MaterialStockCheckUnusedLine[]
}
export function fetchMaterialStockCheckList(params?: {
page?: number
pageSize?: number
keyword?: string
status?: string
startTime?: string
endTime?: string
}) {
return request.get<PageList<MaterialStockCheck>>({
url: '/web/admin/material-stock-checks',
params
})
}
export function fetchCreateMaterialStockCheck(data: {
title: string
checkTime?: string
remark?: string
}) {
return request.post<{ id: string; batchLineCount: number }>({
url: '/web/admin/material-stock-checks',
data
})
}
export function fetchMaterialStockCheckDetail(id: string) {
return request.get<MaterialStockCheckDetail>({
url: `/web/admin/material-stock-checks/${id}`
})
}
export function fetchSaveMaterialStockCheckUnusedLines(
id: string,
items: MaterialStockCheckUnusedLine[]
) {
return request.put<{ count: number }>({
url: `/web/admin/material-stock-checks/${id}/unused-lines`,
data: { items }
})
}
export function fetchCompleteMaterialStockCheck(id: string) {
return request.post<void>({
url: `/web/admin/material-stock-checks/${id}/complete`
})
}
export function fetchCancelMaterialStockCheck(id: string) {
return request.post<void>({
url: `/web/admin/material-stock-checks/${id}/cancel`
})
}
+55
View File
@@ -0,0 +1,55 @@
import request from '@/utils/http'
type PageList<T> = {
list: T[]
total: number
page: number
pageSize: number
totalPages: number
}
export type MaterialUsage = {
id: string
materialId: string
materialCode: string
materialName: string
category?: string
batchId?: string
stockInNo?: string
stockInDate?: string
catalogNo?: string
batchNo?: string
manufacturer?: string
unitPrice?: number | null
amount?: number | null
changeType: string
changeQty: number
usageUnit?: string
stockBefore?: number
stockAfter: number
receiver?: string
purpose?: string
useTime?: string
sourceType: string
remark: string
createBy: string
createByName?: string
createTime: string
}
export function fetchMaterialUsageList(params?: {
page?: number
pageSize?: number
materialId?: string
changeType?: string
startTime?: string
endTime?: string
keyword?: string
stockInNo?: string
category?: string
}) {
return request.get<PageList<MaterialUsage>>({
url: '/web/admin/material-usages',
params
})
}
+127 -41
View File
@@ -27,24 +27,113 @@ export type Material = {
updateTime: string
}
export type MaterialStockLog = {
/** 入库批次列表行 */
export type MaterialBatch = {
id: string
batchId: string
materialId: string
materialCode: string
materialName: string
changeType: string
changeQty: number
stockBefore: number
stockAfter: number
receiver: string
purpose: string
category: string
specModel: string
unit: string
stockInNo: string
stockInDate: string
expireDate: string
catalogNo: string
batchNo: string
manufacturer: string
unitPrice: number
amount: number
inQty: number
remainingQty: number
stockQty: number
warningQty: number
status: string
remark: string
createBy: string
createByName?: string
createTime: string
updateTime: string
}
export type MaterialOption = {
id: string
label: string
materialCode: string
materialName: string
category: string
specModel: string
unit: string
stockQty: number
}
export type MaterialBatchOption = {
id: string
batchId: string
stockInNo: string
stockInDate?: string
expireDate?: string
materialId: string
materialCode: string
materialName: string
category?: string
specModel: string
unit: string
batchNo: string
catalogNo: string
manufacturer: string
unitPrice?: number
amount?: number
remainingQty: number
label: string
}
export type StockInPayload = {
stockInNo: string
stockInDate: string
expireDate: string
catalogNo: string
batchNo: string
manufacturer: string
unitPrice: number
amount: number
qty: number
remark?: string
stockInTime?: string
}
export type BatchStockInLine = StockInPayload & {
materialId: string
materialCode?: string
materialName?: string
specModel?: string
unit?: string
}
export function fetchMaterialBatchList(params?: {
page?: number
pageSize?: number
keyword?: string
materialId?: string
category?: string
status?: string
}) {
return request.get<PageList<MaterialBatch>>({
url: '/web/admin/material-batches',
params
})
}
export function fetchMaterialBatchOptions(params?: {
keyword?: string
materialId?: string
onlyAvailable?: boolean
}) {
return request.get<MaterialBatchOption[]>({
url: '/web/admin/material-batches/options',
params
})
}
export function fetchMaterialList(params?: {
page?: number
pageSize?: number
@@ -59,7 +148,7 @@ export function fetchMaterialList(params?: {
}
export function fetchMaterialOptions() {
return request.get<{ id: string; label: string; materialCode: string }[]>({
return request.get<MaterialOption[]>({
url: '/web/admin/materials/options'
})
}
@@ -84,61 +173,58 @@ export function fetchDeleteMaterial(id: string) {
})
}
export function fetchStockInMaterial(
id: string,
data: { qty: number; remark?: string; stockInTime?: string }
) {
return request.post<Material>({
url: `/web/admin/materials/${id}/stock-in`,
data
})
}
export function fetchStockOutMaterial(
id: string,
data: { qty: number; receiver?: string; purpose?: string; remark?: string; stockOutTime?: string }
) {
return request.post<Material>({
url: `/web/admin/materials/${id}/stock-out`,
export function fetchStockInMaterial(materialId: string, data: StockInPayload) {
return request.post<MaterialBatch>({
url: `/web/admin/materials/${materialId}/stock-in`,
data
})
}
export function fetchBatchStockInMaterial(data: {
items: { materialId: string; qty: number; remark?: string }[]
items: BatchStockInLine[]
remark?: string
stockInTime?: string
}) {
return request.post<{ count: number }>({
url: '/web/admin/materials/batch-stock-in',
url: '/web/admin/material-batches/batch-stock-in',
data
})
}
export function fetchUpdateMaterialBatch(id: string, data: Record<string, any>) {
return request.put<MaterialBatch>({
url: `/web/admin/material-batches/${id}`,
data
})
}
export function fetchDeleteMaterialBatch(id: string) {
return request.delete<void>({
url: `/web/admin/material-batches/${id}`
})
}
export function fetchBatchStockOutMaterial(data: {
items: { materialId: string; qty: number; remark?: string }[]
items: { batchId: string; qty: number; usageUnit?: string; remark?: string }[]
receiver?: string
purpose?: string
remark?: string
stockOutTime?: string
}) {
return request.post<{ count: number }>({
url: '/web/admin/materials/batch-stock-out',
url: '/web/admin/material-batches/batch-stock-out',
data
})
}
export function fetchMaterialStockLogList(params?: {
page?: number
pageSize?: number
materialId?: string
changeType?: string
startTime?: string
endTime?: string
keyword?: string
export function fetchBatchDiscardMaterial(data: {
items: { batchId: string; qty: number; usageUnit?: string; remark?: string }[]
discardReason: string
remark?: string
discardTime?: string
}) {
return request.get<PageList<MaterialStockLog>>({
url: '/web/admin/material-stock-logs',
params
return request.post<{ count: number }>({
url: '/web/admin/material-batches/batch-discard',
data
})
}
+567
View File
@@ -0,0 +1,567 @@
import request from '@/utils/http'
type PageList<T> = {
list: T[]
total: number
page: number
pageSize: number
totalPages: number
}
export type ProductionMaterial = {
id: string
materialCode: string
materialName: string
materialType: string
specModel: string
unit: string
stockQty: number
warningQty: number
status: string
tenantNo: string
orderNum: number
remark: string
createBy: string
createTime: string
updateTime: string
}
/** 入库批次列表行 */
export type ProductionMaterialBatch = {
id: string
batchId: string
materialId: string
materialCode: string
materialName: string
materialType: string
specModel: string
unit: string
stockInNo: string
stockInDate: string
expireDate: string
catalogNo: string
batchNo: string
manufacturer: string
storageLocation?: string
unitPrice: number
amount: number
inQty: number
remainingQty: number
stockQty: number
warningQty: number
status: string
remark: string
createTime: string
updateTime: string
}
export type ProductionMaterialOption = {
id: string
label: string
materialCode: string
materialName: string
materialType: string
specModel: string
unit: string
stockQty: number
}
export type ProductionMaterialBatchOption = {
id: string
batchId: string
stockInNo: string
stockInDate?: string
expireDate?: string
materialId: string
materialCode: string
materialName: string
materialType: string
specModel: string
unit: string
batchNo: string
catalogNo: string
manufacturer: string
storageLocation?: string
unitPrice?: number
amount?: number
remainingQty: number
label: string
}
export type StockInPayload = {
stockInNo: string
stockInDate: string
expireDate: string
catalogNo: string
batchNo: string
manufacturer: string
storageLocation?: string
unitPrice: number
amount: number
qty: number
remark?: string
stockInTime?: string
}
export type BatchStockInLine = StockInPayload & {
materialId: string
materialCode?: string
materialName?: string
specModel?: string
unit?: string
}
export type ProductionMaterialRequisitionOption = {
id: string
label: string
materialId: string
materialName: string
materialType: string
stockInNo: string
batchNo: string
batchId: string
receiver: string
receiverName: string
requisitionQty: number
usageUnit: string
useTime: string
}
export type ProductionMaterialUsage = {
id: string
materialId: string
materialCode: string
materialName: string
materialType: string
batchId?: string
stockInNo?: string
stockInDate?: string
catalogNo?: string
batchNo?: string
manufacturer?: string
storageLocation?: string
unitPrice?: number | null
amount?: number | null
changeType: string
changeQty: number
usageUnit?: string
stockBefore?: number
stockAfter: number
parentUsageId?: string
requisitionUsageId?: string
receiverName?: string
requisitionReceiver?: string
requisitionReceiverName?: string
productionTaskId: string
productionTaskNo: string
receiver?: string
purpose?: string
useTime?: string
sourceType: string
remark: string
createBy: string
createByName?: string
createTime: string
}
export type ProductionMaterialStockCheck = {
id: string
title: string
checkTime: string
status: string
statusLabel: string
completeTime?: string
remark?: string
batchLineCount: number
unusedLineCount: number
createBy: string
createByName?: string
createTime: string
updateTime: string
}
export type ProductionMaterialStockCheckBatchLine = {
id: string
materialCode: string
materialName: string
materialType?: string
specModel: string
unit: string
stockInNo: string
stockInDate: string
expireDate: string
catalogNo: string
batchNo: string
manufacturer: string
unitPrice: number
amount: number
remainingQty: number
remainingAmount?: number
remark?: string
}
export type ProductionMaterialStockCheckUnusedLine = {
id?: string
materialCode?: string
materialName: string
materialType?: string
specModel?: string
unit?: string
stockInNo?: string
stockInDate?: string
expireDate?: string
catalogNo?: string
batchNo?: string
manufacturer?: string
unitPrice?: number | null
remainingAmount?: number | null
holder?: string
unusedQty: number
remark?: string
batchPickId?: string
fromBatch?: boolean
}
export type ProductionMaterialStockCheckDetail = ProductionMaterialStockCheck & {
batchLines: ProductionMaterialStockCheckBatchLine[]
unusedLines: ProductionMaterialStockCheckUnusedLine[]
}
export function fetchProductionMaterialBatchList(params?: {
page?: number
pageSize?: number
keyword?: string
materialId?: string
materialType?: string
status?: string
}) {
return request.get<PageList<ProductionMaterialBatch>>({
url: '/web/admin/production-material-batches',
params
})
}
export function fetchProductionMaterialBatchOptions(params?: {
keyword?: string
materialId?: string
materialType?: string
onlyAvailable?: boolean
}) {
return request.get<ProductionMaterialBatchOption[]>({
url: '/web/admin/production-material-batches/options',
params
})
}
export function fetchProductionMaterialList(params?: {
page?: number
pageSize?: number
keyword?: string
materialType?: string
status?: string
}) {
return request.get<PageList<ProductionMaterial>>({
url: '/web/admin/production-materials',
params
})
}
export function fetchProductionMaterialOptions(params?: { materialType?: string }) {
return request.get<ProductionMaterialOption[]>({
url: '/web/admin/production-materials/options',
params
})
}
export function fetchCreateProductionMaterial(data: Record<string, any>) {
return request.post<ProductionMaterial>({
url: '/web/admin/production-materials',
data
})
}
export function fetchUpdateProductionMaterial(id: string, data: Record<string, any>) {
return request.put<ProductionMaterial>({
url: `/web/admin/production-materials/${id}`,
data
})
}
export function fetchDeleteProductionMaterial(id: string) {
return request.delete<void>({
url: `/web/admin/production-materials/${id}`
})
}
export function fetchStockInProductionMaterial(materialId: string, data: StockInPayload) {
return request.post<ProductionMaterialBatch>({
url: `/web/admin/production-materials/${materialId}/stock-in`,
data
})
}
export function fetchBatchStockInProductionMaterial(data: {
items: BatchStockInLine[]
remark?: string
stockInTime?: string
}) {
return request.post<{ count: number }>({
url: '/web/admin/production-material-batches/batch-stock-in',
data
})
}
export function fetchUpdateProductionMaterialBatch(id: string, data: Record<string, any>) {
return request.put<ProductionMaterialBatch>({
url: `/web/admin/production-material-batches/${id}`,
data
})
}
export function fetchDeleteProductionMaterialBatch(id: string) {
return request.delete<void>({
url: `/web/admin/production-material-batches/${id}`
})
}
export function fetchBatchStockOutProductionMaterial(data: {
items: { batchId: string; qty: number; usageUnit?: string; remark?: string }[]
receiver?: string
purpose?: string
remark?: string
stockOutTime?: string
}) {
return request.post<{ count: number }>({
url: '/web/admin/production-material-batches/batch-stock-out',
data
})
}
export function fetchBatchDiscardProductionMaterial(data: {
items: { batchId: string; qty: number; usageUnit?: string; remark?: string }[]
discardReason: string
remark?: string
discardTime?: string
}) {
return request.post<{ count: number }>({
url: '/web/admin/production-material-batches/batch-discard',
data
})
}
export function fetchProductionMaterialUsageList(params?: {
page?: number
pageSize?: number
materialId?: string
materialType?: string
changeType?: string
startTime?: string
endTime?: string
keyword?: string
stockInNo?: string
}) {
return request.get<PageList<ProductionMaterialUsage>>({
url: '/web/admin/production-material-usages',
params
})
}
export function fetchProductionMaterialRequisitionOptions(params?: {
materialType?: string
keyword?: string
limit?: number
}) {
return request.get<ProductionMaterialRequisitionOption[]>({
url: '/web/admin/production-material-requisition-options',
params
})
}
export function fetchProductionMaterialLinkedStepUsages(parentUsageId: string) {
return request.get<ProductionMaterialUsage[]>({
url: `/web/admin/production-material-requisitions/${parentUsageId}/step-usages`
})
}
export function fetchMyProductionMaterialUsageList(params?: {
page?: number
pageSize?: number
materialId?: string
materialType?: string
changeType?: string
startTime?: string
endTime?: string
keyword?: string
stockInNo?: string
}) {
return request.get<PageList<ProductionMaterialUsage>>({
url: '/web/admin/my-production-material-usages',
params
})
}
export function fetchProductionMaterialStockCheckList(params?: {
page?: number
pageSize?: number
keyword?: string
materialType?: string
status?: string
startTime?: string
endTime?: string
}) {
return request.get<PageList<ProductionMaterialStockCheck>>({
url: '/web/admin/production-material-stock-checks',
params
})
}
export function fetchCreateProductionMaterialStockCheck(data: {
title: string
checkTime?: string
remark?: string
}) {
return request.post<{ id: string; batchLineCount: number }>({
url: '/web/admin/production-material-stock-checks',
data
})
}
export function fetchProductionMaterialStockCheckDetail(id: string) {
return request.get<ProductionMaterialStockCheckDetail>({
url: `/web/admin/production-material-stock-checks/${id}`
})
}
export function fetchSaveProductionMaterialStockCheckUnusedLines(
id: string,
items: ProductionMaterialStockCheckUnusedLine[]
) {
return request.put<{ count: number }>({
url: `/web/admin/production-material-stock-checks/${id}/unused-lines`,
data: { items }
})
}
export function fetchCompleteProductionMaterialStockCheck(id: string) {
return request.post<void>({
url: `/web/admin/production-material-stock-checks/${id}/complete`
})
}
export function fetchCancelProductionMaterialStockCheck(id: string) {
return request.post<void>({
url: `/web/admin/production-material-stock-checks/${id}/cancel`
})
}
export type ProductionMaterialFormulaLine = {
id?: string
configuredMaterialId?: string
componentMaterialId: string
componentMaterialType: string
componentMaterialCode?: string
componentMaterialName?: string
standardQty: number
usageUnit?: string
remark?: string
}
export function fetchProductionMaterialFormula(materialId: string) {
return request.get<ProductionMaterialFormulaLine[]>({
url: `/web/admin/production-materials/${materialId}/formula`
})
}
export function fetchReplaceProductionMaterialFormula(
materialId: string,
lines: ProductionMaterialFormulaLine[]
) {
return request.put<ProductionMaterialFormulaLine[]>({
url: `/web/admin/production-materials/${materialId}/formula`,
data: { lines }
})
}
export type ProductionMaterialPrepLine = {
id?: string
componentMaterialId: string
componentMaterialType: string
componentMaterialCode?: string
componentMaterialName?: string
requisitionUsageId: string
actualQty: number
usageUnit?: string
remark?: string
}
export type ProductionMaterialPrep = {
id: string
prepNo: string
configuredMaterialId: string
configuredMaterialCode: string
configuredMaterialName: string
prepTime: string
outputQty: number
outputUnit: string
batchNo: string
storageLocation?: string
expireDate: string
stockInNo: string
outputBatchId: string
status: string
statusLabel: string
lineCount: number
remark: string
lines?: ProductionMaterialPrepLine[]
}
export function fetchProductionMaterialPrepList(params?: {
page?: number
pageSize?: number
keyword?: string
status?: string
configuredMaterialId?: string
}) {
return request.get<PageList<ProductionMaterialPrep>>({
url: '/web/admin/production-material-preps',
params
})
}
export function fetchProductionMaterialPrepDetail(id: string) {
return request.get<ProductionMaterialPrep>({
url: `/web/admin/production-material-preps/${id}`
})
}
export function fetchCreateProductionMaterialPrep(data: Record<string, any>) {
return request.post<ProductionMaterialPrep>({
url: '/web/admin/production-material-preps',
data
})
}
export function fetchUpdateProductionMaterialPrep(id: string, data: Record<string, any>) {
return request.put<ProductionMaterialPrep>({
url: `/web/admin/production-material-preps/${id}`,
data
})
}
export function fetchCompleteProductionMaterialPrep(id: string) {
return request.post<ProductionMaterialPrep>({
url: `/web/admin/production-material-preps/${id}/complete`
})
}
export function fetchCancelProductionMaterialPrep(id: string) {
return request.post<void>({
url: `/web/admin/production-material-preps/${id}/cancel`
})
}
export function fetchDeleteProductionMaterialPrep(id: string) {
return request.del<void>({
url: `/web/admin/production-material-preps/${id}`
})
}
+165 -24
View File
@@ -1,5 +1,11 @@
import request from '@/utils/http'
export type ProductionTaskOperateScope = 'mine' | 'manage'
function scopeQuery(scope?: ProductionTaskOperateScope) {
return scope === 'mine' ? { operateScope: 'mine' } : undefined
}
export function fetchCreateProductionTask(data: Record<string, any>) {
return request.post({ url: '/web/admin/production-tasks', params: data })
}
@@ -22,6 +28,45 @@ export function fetchProductionTaskList(params?: {
}>({ url: '/web/admin/production-tasks', params })
}
export function fetchMyProductionTasks(params: {
page?: number
pageSize?: number
keyword?: string
taskStatus?: string
workOrderType?: string
scope: 'current' | 'history'
}) {
return request.get<{
list: any[]
total: number
page: number
pageSize: number
totalPages: number
}>({ url: '/web/admin/production-tasks/mine', params })
}
export function fetchForwardProductionTask(
id: string,
data: { toUserId: string; remark?: string },
operateScope: ProductionTaskOperateScope = 'mine'
) {
return request.post({
url: `/web/admin/production-tasks/${id}/forward`,
data,
params: { operateScope }
})
}
export function fetchReassignProductionTask(
id: string,
data: { assigneeUserId: string; remark?: string }
) {
return request.put({
url: `/web/admin/production-tasks/${id}/assignee`,
data
})
}
export function fetchProductionTaskDetail(id: string) {
return request.get<any>({ url: `/web/admin/production-tasks/${id}` })
}
@@ -30,69 +75,165 @@ export function fetchUpdateProductionTask(id: string, data: Record<string, any>)
return request.put({ url: `/web/admin/production-tasks/${id}`, params: data })
}
export function fetchUpdateProductionTaskStatus(id: string, data: Record<string, any>) {
return request.put({ url: `/web/admin/production-tasks/${id}/status`, params: data })
export function fetchUpdateProductionTaskStatus(
id: string,
data: Record<string, any>,
operateScope?: ProductionTaskOperateScope
) {
return request.put({
url: `/web/admin/production-tasks/${id}/status`,
data,
params: scopeQuery(operateScope)
})
}
export function fetchDeleteProductionTask(id: string) {
return request.del({ url: `/web/admin/production-tasks/${id}` })
}
export function fetchAddTaskStep(taskId: string, data: Record<string, any>) {
return request.post({ url: `/web/admin/production-tasks/${taskId}/steps`, params: data })
export function fetchAddTaskStep(
taskId: string,
data: Record<string, any>,
operateScope?: ProductionTaskOperateScope
) {
return request.post({
url: `/web/admin/production-tasks/${taskId}/steps`,
data,
params: scopeQuery(operateScope)
})
}
export function fetchUpdateTaskStep(taskId: string, stepId: string, data: Record<string, any>) {
return request.put({ url: `/web/admin/production-tasks/${taskId}/steps/${stepId}`, params: data })
export function fetchUpdateTaskStep(
taskId: string,
stepId: string,
data: Record<string, any>,
operateScope?: ProductionTaskOperateScope
) {
return request.put({
url: `/web/admin/production-tasks/${taskId}/steps/${stepId}`,
data,
params: scopeQuery(operateScope)
})
}
export function fetchDeleteTaskStep(taskId: string, stepId: string) {
return request.del({ url: `/web/admin/production-tasks/${taskId}/steps/${stepId}` })
export function fetchDeleteTaskStep(
taskId: string,
stepId: string,
operateScope?: ProductionTaskOperateScope
) {
return request.del({
url: `/web/admin/production-tasks/${taskId}/steps/${stepId}`,
params: scopeQuery(operateScope)
})
}
export function fetchReplaceStepReagents(taskId: string, stepId: string, data: any[]) {
export function fetchReplaceStepReagents(
taskId: string,
stepId: string,
data: any[],
operateScope?: ProductionTaskOperateScope
) {
return request.put({
url: `/web/admin/production-tasks/${taskId}/steps/${stepId}/reagents`,
params: data
data,
params: scopeQuery(operateScope)
})
}
export function fetchReplaceStepConsumables(taskId: string, stepId: string, data: any[]) {
export function fetchReplaceStepConsumables(
taskId: string,
stepId: string,
data: any[],
operateScope?: ProductionTaskOperateScope
) {
return request.put({
url: `/web/admin/production-tasks/${taskId}/steps/${stepId}/consumables`,
params: data
data,
params: scopeQuery(operateScope)
})
}
export function fetchReplaceStepDataCollection(taskId: string, stepId: string, data: any[]) {
export function fetchReplaceStepConfiguredReagents(
taskId: string,
stepId: string,
data: any[],
operateScope?: ProductionTaskOperateScope
) {
return request.put({
url: `/web/admin/production-tasks/${taskId}/steps/${stepId}/configured-reagents`,
data,
params: scopeQuery(operateScope)
})
}
export function fetchReplaceStepDataCollection(
taskId: string,
stepId: string,
data: any[],
operateScope?: ProductionTaskOperateScope
) {
return request.put({
url: `/web/admin/production-tasks/${taskId}/steps/${stepId}/data-collection`,
params: data
data,
params: scopeQuery(operateScope)
})
}
export function fetchSetTaskInputs(taskId: string, data: any[] | Record<string, any>) {
return request.post({ url: `/web/admin/production-tasks/${taskId}/inputs`, params: data })
export function fetchSetTaskInputs(
taskId: string,
data: any[] | Record<string, any>,
operateScope?: ProductionTaskOperateScope
) {
return request.post({
url: `/web/admin/production-tasks/${taskId}/inputs`,
data,
params: scopeQuery(operateScope)
})
}
export function fetchSetTaskOutputs(taskId: string, data: any[] | Record<string, any>) {
return request.post({ url: `/web/admin/production-tasks/${taskId}/outputs`, params: data })
export function fetchSetTaskOutputs(
taskId: string,
data: any[] | Record<string, any>,
operateScope?: ProductionTaskOperateScope
) {
return request.post({
url: `/web/admin/production-tasks/${taskId}/outputs`,
data,
params: scopeQuery(operateScope)
})
}
export function fetchReorderTaskSteps(data: { taskId: string; stepIds: string[] }) {
return request.put({ url: '/web/admin/production-tasks/step/reorder', params: data })
export function fetchReorderTaskSteps(
data: { taskId: string; stepIds: string[] },
operateScope?: ProductionTaskOperateScope
) {
return request.put({
url: '/web/admin/production-tasks/step/reorder',
data,
params: scopeQuery(operateScope)
})
}
export function fetchCopyTaskStep(data: { taskId: string; stepId: string }) {
export function fetchCopyTaskStep(
data: { taskId: string; stepId: string },
operateScope?: ProductionTaskOperateScope
) {
return request.post({
url: `/web/admin/production-tasks/${data.taskId}/steps/${data.stepId}/copy`,
params: data
data: {},
params: scopeQuery(operateScope)
})
}
export function fetchReplaceStepOutputs(taskId: string, stepId: string, data: any[]) {
export function fetchReplaceStepOutputs(
taskId: string,
stepId: string,
data: any[],
operateScope?: ProductionTaskOperateScope
) {
return request.put({
url: `/web/admin/production-tasks/${taskId}/steps/${stepId}/outputs`,
params: data
data,
params: scopeQuery(operateScope)
})
}
+5 -1
View File
@@ -5,7 +5,9 @@ import type {
OutboundQcDetailPatient,
OutboundQcDetailInfusionPlan,
OutboundQcDetailInfusionSchedule,
OutboundQcDetailProduct
OutboundQcDetailProduct,
QcProtocolPaymentSummary,
QcBasicExperimentFeeSummary
} from '@/api/qc-work-order'
export interface ProductionWorkOrderItem {
@@ -37,6 +39,8 @@ export interface ProductionWorkOrderItem {
/** 出库工单:输注计划总次数 */
totalCourseCount?: number | null
infusionTime?: string
paymentSummary?: QcProtocolPaymentSummary | null
feeSummary?: QcBasicExperimentFeeSummary | null
}
export type ProductionWorkOrderDetail = ProductionWorkOrderItem & {
+137
View File
@@ -64,6 +64,143 @@ export function fetchDeleteReagent(id: string) {
return request.del({ url: `/web/admin/reagents/${id}` })
}
// ---------------------------------------------------------------------------
// 设备管理
// ---------------------------------------------------------------------------
export function fetchEquipmentList(params?: {
page?: number
pageSize?: number
keyword?: string
status?: string
}) {
return request.get<{
list: any[]
total: number
page: number
pageSize: number
totalPages: number
}>({ url: '/web/admin/equipments', params })
}
export function fetchAllEquipments() {
return request.get<any[]>({ url: '/web/admin/equipments/all' })
}
export function fetchCreateEquipment(data: Record<string, any>) {
return request.post({ url: '/web/admin/equipments', params: data })
}
export function fetchUpdateEquipment(id: string, data: Record<string, any>) {
return request.put({ url: `/web/admin/equipments/${id}`, params: data })
}
export function fetchDeleteEquipment(id: string) {
return request.del({ url: `/web/admin/equipments/${id}` })
}
// ---------------------------------------------------------------------------
// 洁净服管理
// ---------------------------------------------------------------------------
export function fetchCleanroomGarmentList(params?: {
page?: number
pageSize?: number
keyword?: string
garmentStatus?: string
needAttention?: string
}) {
return request.get<{
list: any[]
total: number
page: number
pageSize: number
totalPages: number
}>({ url: '/web/admin/cleanroom-garments', params })
}
export function fetchCleanroomGarmentDetail(id: string) {
return request.get<any>({ url: `/web/admin/cleanroom-garments/${id}` })
}
export function fetchCreateCleanroomGarment(data: Record<string, any>) {
return request.post({ url: '/web/admin/cleanroom-garments', params: data })
}
export function fetchUpdateCleanroomGarment(id: string, data: Record<string, any>) {
return request.put({ url: `/web/admin/cleanroom-garments/${id}`, params: data })
}
export function fetchDeleteCleanroomGarment(id: string) {
return request.del({ url: `/web/admin/cleanroom-garments/${id}` })
}
export function fetchBatchDeleteCleanroomGarments(ids: string[]) {
return request.post({ url: '/web/admin/cleanroom-garments/batch-delete', params: { ids } })
}
export function fetchDiscardCleanroomGarment(id: string, data: Record<string, any>) {
return request.post({ url: `/web/admin/cleanroom-garments/${id}/discard`, params: data })
}
export function fetchBatchDiscardCleanroomGarments(data: Record<string, any>) {
return request.post({ url: '/web/admin/cleanroom-garments/batch-discard', params: data })
}
export function fetchCleanroomGarmentWashLogList(params: {
page?: number
pageSize?: number
garmentId: string
}) {
return request.get<{ list: any[]; total: number; page: number; pageSize: number; totalPages: number }>({
url: '/web/admin/cleanroom-garment-wash-logs',
params
})
}
export function fetchCreateCleanroomGarmentWashLog(data: Record<string, any>) {
return request.post({ url: '/web/admin/cleanroom-garment-wash-logs', params: data })
}
export function fetchUpdateCleanroomGarmentWashLog(id: string, data: Record<string, any>) {
return request.put({ url: `/web/admin/cleanroom-garment-wash-logs/${id}`, params: data })
}
export function fetchDeleteCleanroomGarmentWashLog(id: string) {
return request.del({ url: `/web/admin/cleanroom-garment-wash-logs/${id}` })
}
export function fetchBatchCreateCleanroomGarmentWashLogs(data: Record<string, any>) {
return request.post({ url: '/web/admin/cleanroom-garment-wash-logs/batch', params: data })
}
export function fetchCleanroomGarmentSterilizeLogList(params: {
page?: number
pageSize?: number
garmentId: string
}) {
return request.get<{ list: any[]; total: number; page: number; pageSize: number; totalPages: number }>({
url: '/web/admin/cleanroom-garment-sterilize-logs',
params
})
}
export function fetchCreateCleanroomGarmentSterilizeLog(data: Record<string, any>) {
return request.post({ url: '/web/admin/cleanroom-garment-sterilize-logs', params: data })
}
export function fetchUpdateCleanroomGarmentSterilizeLog(id: string, data: Record<string, any>) {
return request.put({ url: `/web/admin/cleanroom-garment-sterilize-logs/${id}`, params: data })
}
export function fetchDeleteCleanroomGarmentSterilizeLog(id: string) {
return request.del({ url: `/web/admin/cleanroom-garment-sterilize-logs/${id}` })
}
export function fetchBatchCreateCleanroomGarmentSterilizeLogs(data: Record<string, any>) {
return request.post({ url: '/web/admin/cleanroom-garment-sterilize-logs/batch', params: data })
}
// ---------------------------------------------------------------------------
// SOP文档
// ---------------------------------------------------------------------------
+12
View File
@@ -209,3 +209,15 @@ export function fetchBatchStockOutQcMaterial(data: {
data
})
}
export function fetchBatchDiscardQcMaterial(data: {
items: { batchId: string; qty: number; usageUnit?: string; remark?: string }[]
discardReason: string
remark?: string
discardTime?: string
}) {
return request.post<{ count: number }>({
url: '/web/admin/qc-material-batches/batch-discard',
data
})
}