提交
This commit is contained in:
1 parent
5f0d7c70f9
commit
22685bfd23
132 files changed
+24992
-11338
No files matched your search
@@ -154,6 +154,10 @@ export type ProductionMaterialUsage = {
|
||||
requisitionReceiverName?: string
|
||||
productionTaskId: string
|
||||
productionTaskNo: string
|
||||
taskNo?: string
|
||||
prepId?: string
|
||||
prepNo?: string
|
||||
configuredMaterialName?: string
|
||||
receiver?: string
|
||||
purpose?: string
|
||||
useTime?: string
|
||||
@@ -415,7 +419,7 @@ export function fetchProductionMaterialRequisitionOptions(params?: {
|
||||
|
||||
export function fetchProductionMaterialLinkedStepUsages(parentUsageId: string) {
|
||||
return request.get<ProductionMaterialUsage[]>({
|
||||
url: `/web/admin/production-material-requisitions/${parentUsageId}/step-usages`
|
||||
url: `/web/admin/production-material-usages/${parentUsageId}/linked-step-usages`
|
||||
})
|
||||
}
|
||||
|
||||
@@ -551,6 +555,12 @@ export type ProductionMaterialPrep = {
|
||||
outputQty: number
|
||||
outputUnit: string
|
||||
batchNo: string
|
||||
specModel?: string
|
||||
catalogNo?: string
|
||||
manufacturer?: string
|
||||
stockInDate?: string
|
||||
unitPrice?: number | null
|
||||
amount?: number | null
|
||||
storageLocation?: string
|
||||
expireDate: string
|
||||
stockInNo: string
|
||||
@@ -612,3 +622,122 @@ export function fetchDeleteProductionMaterialPrep(id: string) {
|
||||
url: `/web/admin/production-material-preps/${id}`
|
||||
})
|
||||
}
|
||||
|
||||
export type QuickPrepLine = {
|
||||
requisitionUsageId: string
|
||||
componentMaterialId: string
|
||||
componentMaterialType: string
|
||||
batchId?: string
|
||||
consumptionQty: number
|
||||
usageUnit?: string
|
||||
remark?: string
|
||||
}
|
||||
|
||||
export type QuickPrepPayload = {
|
||||
configuredMaterialName: string
|
||||
outputQty: number
|
||||
lines: QuickPrepLine[]
|
||||
specModel?: string
|
||||
outputUnit?: string
|
||||
stockInNo?: string
|
||||
stockInDate?: string
|
||||
catalogNo?: string
|
||||
batchNo?: string
|
||||
manufacturer?: string
|
||||
storageLocation?: string
|
||||
expireDate?: string
|
||||
remark?: string
|
||||
}
|
||||
|
||||
export function fetchQuickProductionMaterialPrep(data: QuickPrepPayload) {
|
||||
return request.post<ProductionMaterialPrep>({
|
||||
url: '/web/admin/production-material-preps/quick',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export type AvailableMaterialBatch = {
|
||||
requisitionUsageId: string
|
||||
batchId: string
|
||||
materialId: string
|
||||
materialType: string
|
||||
materialCode: string
|
||||
materialName: string
|
||||
specModel?: string
|
||||
unit?: string
|
||||
stockInNo: string
|
||||
stockInDate?: string
|
||||
expireDate?: string
|
||||
catalogNo?: string
|
||||
batchNo: string
|
||||
manufacturer: string
|
||||
storageLocation?: string
|
||||
requisitionQty: number
|
||||
unitPrice?: number | null
|
||||
receiver?: string
|
||||
receiverName?: string
|
||||
useTime?: string
|
||||
}
|
||||
|
||||
export function fetchAvailableMaterialBatches(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
materialType?: string
|
||||
}) {
|
||||
return request.get<PageList<AvailableMaterialBatch>>({
|
||||
url: '/web/admin/production-material-preps/available-materials',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export type MaterialConsumption = {
|
||||
id: string
|
||||
materialId: string
|
||||
materialType: string
|
||||
materialCode: string
|
||||
materialName: string
|
||||
batchId?: string
|
||||
stockInNo?: string
|
||||
batchNo?: string
|
||||
manufacturer?: string
|
||||
unitPrice?: number | null
|
||||
changeQty: number
|
||||
usageUnit?: string
|
||||
prepId?: string
|
||||
prepNo: string
|
||||
configuredMaterialName: string
|
||||
sourceType: string
|
||||
remark: string
|
||||
createBy: string
|
||||
createByName?: string
|
||||
createTime: string
|
||||
}
|
||||
|
||||
export function fetchProductionMaterialConsumptions(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
materialType?: string
|
||||
startTime?: string
|
||||
endTime?: string
|
||||
}) {
|
||||
return request.get<PageList<MaterialConsumption>>({
|
||||
url: '/web/admin/production-material-consumptions',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchMyProductionMaterialConsumptions(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
materialType?: string
|
||||
startTime?: string
|
||||
endTime?: string
|
||||
}) {
|
||||
return request.get<PageList<MaterialConsumption>>({
|
||||
url: '/web/admin/my-production-material-consumptions',
|
||||
params
|
||||
})
|
||||
}
|
||||
@@ -92,7 +92,11 @@ export function fetchCreateEquipment(data: Record<string, any>) {
|
||||
}
|
||||
|
||||
export function fetchUpdateEquipment(id: string, data: Record<string, any>) {
|
||||
return request.put({ url: `/web/admin/equipments/${id}`, params: data })
|
||||
const cleanedData: Record<string, any> = {}
|
||||
for (const [key, value] of Object.entries(data)) {
|
||||
cleanedData[key] = value === undefined ? null : value
|
||||
}
|
||||
return request.put({ url: `/web/admin/equipments/${id}`, params: cleanedData })
|
||||
}
|
||||
|
||||
export function fetchDeleteEquipment(id: string) {
|
||||
|
||||
@@ -101,3 +101,20 @@ export function fetchSampleReceptionSubmit(data: {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据样本编码查询样本接收记录
|
||||
* @returns 包含 receptionId(有记录时)和 sampleInfo(样本信息)的对象;无记录时 receptionId 为空
|
||||
*/
|
||||
export function fetchSampleReceptionBySampleCode(params: {
|
||||
sampleCode: string
|
||||
sourceType?: string
|
||||
}) {
|
||||
return request.get<{
|
||||
receptionId?: string
|
||||
sampleInfo?: Record<string, unknown> | null
|
||||
}>({
|
||||
url: '/web/admin/sample-receptions/by-sample-code',
|
||||
params
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user