This commit is contained in:
zlwu committed 2026-06-12 10:37:56 +08:00
1 parent 64219a68c7
commit 9a73e87ce8
102 files changed
+16756 -6670

No files matched your search

+53
View File
@@ -8,6 +8,21 @@ type PageList<T> = {
totalPages: number
}
export type QcMaterialRequisitionOption = {
id: string
label: string
materialId: string
materialName: string
stockInNo: string
batchNo: string
batchId: string
receiver: string
receiverName: string
requisitionQty: number
usageUnit: string
useTime: string
}
export type QcMaterialUsage = {
id: string
materialId: string
@@ -23,8 +38,14 @@ export type QcMaterialUsage = {
amount?: number | null
changeType: string
changeQty: number
usageUnit?: string
stockBefore?: number
stockAfter: number
parentUsageId?: string
requisitionUsageId?: string
receiverName?: string
requisitionReceiver?: string
requisitionReceiverName?: string
qcTaskId: string
qcTaskNo: string
receiver?: string
@@ -52,3 +73,35 @@ export function fetchQcMaterialUsageList(params?: {
params
})
}
export function fetchQcMaterialRequisitionOptions(params?: {
keyword?: string
limit?: number
}) {
return request.get<QcMaterialRequisitionOption[]>({
url: '/web/admin/qc-material-requisition-options',
params
})
}
export function fetchQcMaterialLinkedTaskUsages(usageId: string) {
return request.get<QcMaterialUsage[]>({
url: `/web/admin/qc-material-usages/${usageId}/linked-task-usages`
})
}
export function fetchMyQcMaterialUsageList(params?: {
page?: number
pageSize?: number
materialId?: string
changeType?: string
startTime?: string
endTime?: string
keyword?: string
stockInNo?: string
}) {
return request.get<PageList<QcMaterialUsage>>({
url: '/web/admin/my-qc-material-usages',
params
})
}
+11 -1
View File
@@ -25,6 +25,11 @@ export type QcTaskMaterialUsageItem = {
catalogNo?: string
manufacturer?: string
changeQty: number
usageUnit?: string
requisitionUsageId?: string
parentUsageId?: string
receiverName?: string
requisitionReceiverName?: string
remark?: string
}
@@ -41,7 +46,12 @@ export function fetchCompleteTaskWithResult(
results: QcTaskResultItem[]
remark?: string
thirdPartyAttachments?: string
materialUsages?: Array<{ batchId: string; qty: number; remark?: string }>
materialUsages?: Array<{
requisitionUsageId: string
qty: number
usageUnit?: string
remark?: string
}>
}
) {
return request.post({
@@ -56,8 +56,8 @@
<el-table-column label="批号" min-width="100" align="center" header-align="center">
<template #default="{ row }">{{ row.batchNo || '—' }}</template>
</el-table-column>
<el-table-column label="规格型号" min-width="120" align="center" header-align="center">
<template #default="{ row }">{{ row.specModel || '—' }}</template>
<el-table-column label="领用人" min-width="100" align="center" header-align="center">
<template #default="{ row }">{{ row.receiverName || '—' }}</template>
</el-table-column>
<el-table-column label="用量" min-width="100" align="center" header-align="center">
<template #default="{ row }">
@@ -96,7 +96,6 @@
fetchQcTaskMaterialUsages,
type QcTaskMaterialUsageItem
} from '@/api/qc-task-result'
import { fetchQcMaterialBatchOptions, type QcMaterialBatchOption } from '@/api/qc-material'
import {
taskTypeLabel,
taskStatusLabel,
@@ -127,11 +126,10 @@
})
type ViewMaterialUsageRow = {
batchId: string
stockInNo: string
materialName: string
specModel: string
batchNo: string
receiverName: string
unit: string
qty: number | undefined
remark: string
@@ -144,32 +142,18 @@
function materialRowsFromApi(items: QcTaskMaterialUsageItem[]): ViewMaterialUsageRow[] {
return (items || [])
.filter((u) => (u.batchId || '').trim())
.filter((u) => (u.requisitionUsageId || u.parentUsageId || '').trim())
.map((u) => ({
batchId: u.batchId,
stockInNo: u.stockInNo || '',
materialName: u.materialName || '',
specModel: '',
batchNo: u.batchNo || '',
unit: '',
receiverName: u.requisitionReceiverName || u.receiverName || '',
unit: (u.usageUnit || '').trim(),
qty: Math.abs(Number(u.changeQty) || 0) || undefined,
remark: u.remark || ''
}))
}
function enrichMaterialUsageRows(rows: ViewMaterialUsageRow[], options: QcMaterialBatchOption[]) {
for (const row of rows) {
const opt = options.find((o) => o.id === row.batchId)
if (opt) {
row.stockInNo = opt.stockInNo || row.stockInNo
row.materialName = opt.materialName || row.materialName
row.specModel = opt.specModel || ''
row.batchNo = opt.batchNo || row.batchNo
row.unit = opt.unit || ''
}
}
}
watch(
() => [props.visible, props.taskId] as const,
async ([vis, id]) => {
@@ -190,13 +174,10 @@
viewMaterialUsages.value = []
if (detail.taskType !== 'dsfjc') {
try {
const [savedUsages, opts] = await Promise.all([
fetchQcTaskMaterialUsages(id).catch(() => [] as QcTaskMaterialUsageItem[]),
fetchQcMaterialBatchOptions().catch(() => [] as QcMaterialBatchOption[])
])
const rows = materialRowsFromApi(savedUsages || [])
enrichMaterialUsageRows(rows, opts || [])
viewMaterialUsages.value = rows
const savedUsages = await fetchQcTaskMaterialUsages(id).catch(
() => [] as QcTaskMaterialUsageItem[]
)
viewMaterialUsages.value = materialRowsFromApi(savedUsages || [])
} catch {
viewMaterialUsages.value = []
}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_api_qc_material_usage_ts", "label": "qc-material-usage.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-material-usage.ts", "source_location": "L1"}, {"id": "api_qc_material_usage_fetchqcmaterialusagelist", "label": "fetchQcMaterialUsageList()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-material-usage.ts", "source_location": "L40"}, {"id": "api_qc_material_usage_fetchmyqcmaterialusagelist", "label": "fetchMyQcMaterialUsageList()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-material-usage.ts", "source_location": "L56"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_api_qc_material_usage_ts", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_utils_http", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-material-usage.ts", "source_location": "L1", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_api_qc_material_usage_ts", "target": "api_qc_material_usage_fetchqcmaterialusagelist", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-material-usage.ts", "source_location": "L40", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_api_qc_material_usage_ts", "target": "api_qc_material_usage_fetchmyqcmaterialusagelist", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-material-usage.ts", "source_location": "L56", "weight": 1.0}], "raw_calls": [{"caller_nid": "api_qc_material_usage_fetchqcmaterialusagelist", "callee": "get", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-material-usage.ts", "source_location": "L50"}, {"caller_nid": "api_qc_material_usage_fetchmyqcmaterialusagelist", "callee": "get", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-material-usage.ts", "source_location": "L66"}]}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_material_qcmaterialusagetab_vue", "label": "QcMaterialUsageTab.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/QcMaterialUsageTab.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_my_qc_material_usage_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/my-qc-material-usage/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_work_order_qcworkordertasksublist_vue", "label": "QcWorkOrderTaskSubList.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderTaskSubList.vue", "source_location": "L1"}, {"id": "qc_work_order_qcworkordertasksublist_if", "label": "if()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderTaskSubList.vue", "source_location": "L730"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_work_order_qcworkordertasksublist_vue", "target": "qc_work_order_qcworkordertasksublist_if", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderTaskSubList.vue", "source_location": "L730", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_work_order_qcworkordertasksublist_vue", "target": "qc_work_order_qcworkordertasksublist_if", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderTaskSubList.vue", "source_location": "L1183", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_work_order_qcworkordertasksublist_vue", "target": "qc_work_order_qcworkordertasksublist_if", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderTaskSubList.vue", "source_location": "L1244", "weight": 1.0}], "raw_calls": [{"caller_nid": "qc_work_order_qcworkordertasksublist_if", "callee": "removeMaterialRow", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderTaskSubList.vue", "source_location": "L731"}, {"caller_nid": "qc_work_order_qcworkordertasksublist_if", "callee": "warning", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderTaskSubList.vue", "source_location": "L1184"}, {"caller_nid": "qc_work_order_qcworkordertasksublist_if", "callee": "parseMaterialQty", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderTaskSubList.vue", "source_location": "L1245"}, {"caller_nid": "qc_work_order_qcworkordertasksublist_if", "callee": "trim", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderTaskSubList.vue", "source_location": "L1245"}, {"caller_nid": "qc_work_order_qcworkordertasksublist_if", "callee": "warning", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderTaskSubList.vue", "source_location": "L1246"}]}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_material_qcmaterialstockchecktab_vue", "label": "QcMaterialStockCheckTab.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/QcMaterialStockCheckTab.vue", "source_location": "L1"}, {"id": "qc_material_qcmaterialstockchecktab_if", "label": "if()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/QcMaterialStockCheckTab.vue", "source_location": "L796"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_material_qcmaterialstockchecktab_vue", "target": "qc_material_qcmaterialstockchecktab_if", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/QcMaterialStockCheckTab.vue", "source_location": "L796", "weight": 1.0}], "raw_calls": [{"caller_nid": "qc_material_qcmaterialstockchecktab_if", "callee": "warning", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/QcMaterialStockCheckTab.vue", "source_location": "L797"}]}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_sample_reception_completion_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/sample-reception-completion/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_material_qcmaterialstockchecktab_vue", "label": "QcMaterialStockCheckTab.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/QcMaterialStockCheckTab.vue", "source_location": "L1"}, {"id": "qc_material_qcmaterialstockchecktab_if", "label": "if()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/QcMaterialStockCheckTab.vue", "source_location": "L824"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_material_qcmaterialstockchecktab_vue", "target": "qc_material_qcmaterialstockchecktab_if", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/QcMaterialStockCheckTab.vue", "source_location": "L824", "weight": 1.0}], "raw_calls": [{"caller_nid": "qc_material_qcmaterialstockchecktab_if", "callee": "warning", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/QcMaterialStockCheckTab.vue", "source_location": "L825"}]}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_material_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_sample_reception_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/sample-reception/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_work_order_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/index.vue", "source_location": "L1"}, {"id": "qc_work_order_index_formattempcellproductfield", "label": "formatTempCellProductField()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/index.vue", "source_location": "L846"}, {"id": "qc_work_order_index_handlereceptionattachmentpreview", "label": "handleReceptionAttachmentPreview()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/index.vue", "source_location": "L1202"}, {"id": "qc_work_order_index_handlereceptionattachmentdownload", "label": "handleReceptionAttachmentDownload()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/index.vue", "source_location": "L1207"}, {"id": "qc_work_order_index_taskattachmentfullurl", "label": "taskAttachmentFullUrl()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/index.vue", "source_location": "L1211"}, {"id": "qc_work_order_index_handletaskattachmentpreview", "label": "handleTaskAttachmentPreview()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/index.vue", "source_location": "L1218"}, {"id": "qc_work_order_index_handletaskattachmentdownload", "label": "handleTaskAttachmentDownload()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/index.vue", "source_location": "L1223"}, {"id": "qc_work_order_index_formatconfiguredlabitems", "label": "formatConfiguredLabItems()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/index.vue", "source_location": "L1239"}, {"id": "qc_work_order_index_formatconfiguredthirditems", "label": "formatConfiguredThirdItems()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/index.vue", "source_location": "L1245"}, {"id": "qc_work_order_index_buildtasktypesections", "label": "buildTaskTypeSections()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/index.vue", "source_location": "L1256"}, {"id": "qc_work_order_index_buildconfiguredonlysection", "label": "buildConfiguredOnlySection()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/index.vue", "source_location": "L1345"}, {"id": "qc_work_order_index_formatdetectmethods", "label": "formatDetectMethods()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/index.vue", "source_location": "L1363"}, {"id": "qc_work_order_index_formatmetric", "label": "formatMetric()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/index.vue", "source_location": "L1370"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_work_order_index_vue", "target": "qc_work_order_index_formattempcellproductfield", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/index.vue", "source_location": "L846", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_work_order_index_vue", "target": "qc_work_order_index_handlereceptionattachmentpreview", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/index.vue", "source_location": "L1202", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_work_order_index_vue", "target": "qc_work_order_index_handlereceptionattachmentdownload", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/index.vue", "source_location": "L1207", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_work_order_index_vue", "target": "qc_work_order_index_taskattachmentfullurl", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/index.vue", "source_location": "L1211", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_vieLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_work_order_qcworkordertasksublist_vue", "label": "QcWorkOrderTaskSubList.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderTaskSubList.vue", "source_location": "L1"}, {"id": "qc_work_order_qcworkordertasksublist_protocolstatuslabelbysource", "label": "protocolStatusLabelBySource()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderTaskSubList.vue", "source_location": "L495"}, {"id": "qc_work_order_qcworkordertasksublist_protocolstatustagtypebysource", "label": "protocolStatusTagTypeBySource()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderTaskSubList.vue", "source_location": "L500"}, {"id": "qc_work_order_qcworkordertasksublist_nextmaterialrowkey", "label": "nextMaterialRowKey()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderTaskSubList.vue", "source_location": "L546"}, {"id": "qc_work_order_qcworkordertasksublist_searchbatchoptions", "label": "searchBatchOptions()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderTaskSubList.vue", "source_location": "L558"}, {"id": "qc_work_order_qcworkordertasksublist_clearmaterialrow", "label": "clearMaterialRow()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderTaskSubList.vue", "source_location": "L570"}, {"id": "qc_work_order_qcworkordertasksublist_isbatchoptiondisabled", "label": "isBatchOptionDisabled()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderTaskSubList.vue", "source_location": "L580"}, {"id": "qc_work_order_qcworkordertasksublist_isduplicatebatch", "label": "isDuplicateBatch()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderTaskSubList.vue", "source_location": "L585"}, {"id": "qc_work_order_qcworkordertasksublist_onbatchselect", "label": "onBatchSelect()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderTaskSubList.vue", "source_location": "L671"}, {"id": "qc_work_order_qcworkordertasksublist_addmaterialrow", "label": "addMaterialRow()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderTaskSubList.vue", "source_location": "L697"}, {"id": "qc_work_order_qcworkordertasksublist_removematerialrow", "label": "removeMaterialRow()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderTaskSubList.vue", "source_location": "L712"}, {"id": "qc_work_order_qcworkordertasksublist_materialrowsfromapi", "label": "materialRowsFromApi()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderTaskSubList.vue", "source_location": "L716"}, {"id": "qc_work_order_qcworkordertasksublist_enrichmaterialusagerows", "label": "enrichMaterialUsageRows()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderTaskSubList.vue", "source_location": "L733"}, {"id": "qc_work_order_qcworkordertasksublist_handlereceptionattachmentdownload", "label": "handleReceptionAttachmentDownload()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderTaskSubList.vue", "source_location": "L830"}, {"id": "qc_work_order_qcworkordertasksublist_normalizeresultparams", "label": "normalizeResultParams()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderTaskSubList.vue", "source_location": "L834"}, {"id": "qc_work_order_qcworkordertasksublist_toresultnumber", "label": "toResultNumber()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderTaskSubList.vue", "source_location": "L842"}, {"id": "qc_work_order_qcworkordertasksublist_setresultnumber", "label": "setResultNumber()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderTaskSubList.vue", "source_location": "L848"}, {"id": "qc_work_order_qcworkordertasksublist_hasresultvalue", "label": "hasResultValue()", "file_type": "code", "source_file": "/UserLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_types_import_components_d_ts", "label": "components.d.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/import/components.d.ts", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_router_modules_sqxp_ts", "label": "sqxp.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/modules/sqxp.ts", "source_location": "L1"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_router_modules_sqxp_ts", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_types_router", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/modules/sqxp.ts", "source_location": "L1", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_router_modules_sqxp_ts", "label": "sqxp.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/modules/sqxp.ts", "source_location": "L1"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_router_modules_sqxp_ts", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_types_router", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/modules/sqxp.ts", "source_location": "L1", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_components_business_qc_task_view_dialog_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/business/qc-task-view-dialog/index.vue", "source_location": "L1"}, {"id": "qc_task_view_dialog_index_attachmentfullurl", "label": "attachmentFullUrl()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/business/qc-task-view-dialog/index.vue", "source_location": "L390"}, {"id": "qc_task_view_dialog_index_handleattachmentpreview", "label": "handleAttachmentPreview()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/business/qc-task-view-dialog/index.vue", "source_location": "L397"}, {"id": "qc_task_view_dialog_index_handleattachmentdownload", "label": "handleAttachmentDownload()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/business/qc-task-view-dialog/index.vue", "source_location": "L402"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_components_business_qc_task_view_dialog_index_vue", "target": "qc_task_view_dialog_index_attachmentfullurl", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/business/qc-task-view-dialog/index.vue", "source_location": "L390", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_components_business_qc_task_view_dialog_index_vue", "target": "qc_task_view_dialog_index_handleattachmentpreview", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/business/qc-task-view-dialog/index.vue", "source_location": "L397", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_components_business_qc_task_view_dialog_index_vue", "target": "qc_task_view_dialog_index_handleattachmentdownload", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/business/qc-task-view-dialog/index.vue", "source_location": "L402", "weight": 1.0}, {"source": "qc_task_view_dialog_index_handleattachmentpreview", "target": "qc_task_view_dialog_index_attachmentfullurl", "relation": "calls", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/business/qc-task-view-dialog/index.vue", "source_location": "L398", "weight": 1.0}], "raw_calls": [{"caller_nid": "qc_task_view_dialog_index_attachmentfullurl", "callee": "trim", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/business/qc-task-view-dialog/index.vue", "source_location": "L391"}, {"caller_nid": "qc_task_view_dialog_index_attachmentfullurl", "callee": "String", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/business/qc-task-view-dialog/index.vue", "source_location": "L391"}, {"caller_nid": "qc_task_view_dialog_index_attachmentfullurl", "callee": "test", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/business/qc-task-view-dialog/index.vue", "source_location": "L393"}, {"caller_nid": "qc_task_view_dialog_index_attachmentfullurl", "callee": "replace", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/business/qc-task-view-dialog/index.vue", "source_location": "L394"}, {"caller_nid": "qc_task_view_dialog_index_handleattachmentpreview", "callee": "String", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/business/qc-task-view-dialog/index.vue", "source_location": "L398"}, {"caller_nid": "qc_task_view_dialog_index_handleattachmentpreview", "callee": "open", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/business/qc-task-view-dialog/index.vue", "source_location": "L399"}, {"caller_nid": "qc_task_view_dialog_index_handleattachmentdownload", "callee": "downloadAttachmentFile", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/business/qc-task-view-dialog/index.vue", "source_location": "L403"}]}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_material_qcmaterialusagetab_vue", "label": "QcMaterialUsageTab.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/QcMaterialUsageTab.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_material_qcmaterialstockchecktab_vue", "label": "QcMaterialStockCheckTab.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/QcMaterialStockCheckTab.vue", "source_location": "L1"}, {"id": "qc_material_qcmaterialstockchecktab_if", "label": "if()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/QcMaterialStockCheckTab.vue", "source_location": "L823"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_material_qcmaterialstockchecktab_vue", "target": "qc_material_qcmaterialstockchecktab_if", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/QcMaterialStockCheckTab.vue", "source_location": "L823", "weight": 1.0}], "raw_calls": [{"caller_nid": "qc_material_qcmaterialstockchecktab_if", "callee": "warning", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/QcMaterialStockCheckTab.vue", "source_location": "L824"}]}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_work_order_outboundqcviewdialog_vue", "label": "OutboundQcViewDialog.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/OutboundQcViewDialog.vue", "source_location": "L1"}, {"id": "qc_work_order_outboundqcviewdialog_handledownload", "label": "handleDownload()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/OutboundQcViewDialog.vue", "source_location": "L294"}, {"id": "qc_work_order_outboundqcviewdialog_taskattachmentslotname", "label": "taskAttachmentSlotName()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/OutboundQcViewDialog.vue", "source_location": "L307"}, {"id": "qc_work_order_outboundqcviewdialog_taskmaterialslotname", "label": "taskMaterialSlotName()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/OutboundQcViewDialog.vue", "source_location": "L311"}, {"id": "qc_work_order_outboundqcviewdialog_handletaskpreview", "label": "handleTaskPreview()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/OutboundQcViewDialog.vue", "source_location": "L315"}, {"id": "qc_work_order_outboundqcviewdialog_handletaskdownload", "label": "handleTaskDownload()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/OutboundQcViewDialog.vue", "source_location": "L320"}, {"id": "qc_work_order_outboundqcviewdialog_conclusiontagtype", "label": "conclusionTagType()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/OutboundQcViewDialog.vue", "source_location": "L326"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_work_order_outboundqcviewdialog_vue", "target": "qc_work_order_outboundqcviewdialog_handledownload", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/OutboundQcViewDialog.vue", "source_location": "L294", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_work_order_outboundqcviewdialog_vue", "target": "qc_work_order_outboundqcviewdialog_taskattachmentslotname", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/OutboundQcViewDialog.vue", "source_location": "L307", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_work_order_outboundqcviewdialog_vue", "target": "qc_work_order_outboundqcviewdialog_taskmaterialslotname", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/OutboundQcViewDialog.vue", "source_location": "L311", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_work_order_outboundqcviewdialog_vue", "target": "qc_work_order_outboundqcviewdialog_handletaskpreview", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/OutboundQcViewDialog.vue", "source_location": "L315", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_work_order_outboundqcviewdialog_vue", "target": "qc_work_order_outboundqcviewdialog_handletaskdownload", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/OutboundQcViewDialog.vue", "source_location": "L320", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_work_order_outboundqcviewdialog_vue", "target": "qc_work_order_outboundqcviewdialog_conclusiontagtype", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/OutboundQcViewDialog.vue", "source_location": "L326", "weight": 1.0}], "raw_calls": [{"caller_nid": "qc_work_order_outboundqcviewdialog_handledownload", "callee": "downloadAttachmentFile", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/OutboundQcViewDialog.vue", "source_location": "L295"}, {"caller_nid": "qc_work_order_outboundqcviewdialog_handletaskpreview", "callee": "fullUrl", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-work-order/OutboundQcViewDialog.vue", "source_locatLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_api_qc_material_usage_ts", "label": "qc-material-usage.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-material-usage.ts", "source_location": "L1"}, {"id": "api_qc_material_usage_fetchqcmaterialusagelist", "label": "fetchQcMaterialUsageList()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-material-usage.ts", "source_location": "L61"}, {"id": "api_qc_material_usage_fetchqcmaterialrequisitionoptions", "label": "fetchQcMaterialRequisitionOptions()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-material-usage.ts", "source_location": "L77"}, {"id": "api_qc_material_usage_fetchmyqcmaterialusagelist", "label": "fetchMyQcMaterialUsageList()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-material-usage.ts", "source_location": "L87"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_api_qc_material_usage_ts", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_utils_http", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-material-usage.ts", "source_location": "L1", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_api_qc_material_usage_ts", "target": "api_qc_material_usage_fetchqcmaterialusagelist", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-material-usage.ts", "source_location": "L61", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_api_qc_material_usage_ts", "target": "api_qc_material_usage_fetchqcmaterialrequisitionoptions", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-material-usage.ts", "source_location": "L77", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_api_qc_material_usage_ts", "target": "api_qc_material_usage_fetchmyqcmaterialusagelist", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-material-usage.ts", "source_location": "L87", "weight": 1.0}], "raw_calls": [{"caller_nid": "api_qc_material_usage_fetchqcmaterialusagelist", "callee": "get", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-material-usage.ts", "source_location": "L71"}, {"caller_nid": "api_qc_material_usage_fetchqcmaterialrequisitionoptions", "callee": "get", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-material-usage.ts", "source_location": "L81"}, {"caller_nid": "api_qc_material_usage_fetchmyqcmaterialusagelist", "callee": "get", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-material-usage.ts", "source_location": "L97"}]}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_sample_reception_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/sample-reception/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_api_qc_task_result_ts", "label": "qc-task-result.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-task-result.ts", "source_location": "L1"}, {"id": "api_qc_task_result_fetchqctaskresults", "label": "fetchQcTaskResults()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-task-result.ts", "source_location": "L12"}, {"id": "api_qc_task_result_fetchqctaskmaterialusages", "label": "fetchQcTaskMaterialUsages()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-task-result.ts", "source_location": "L36"}, {"id": "api_qc_task_result_fetchcompletetaskwithresult", "label": "fetchCompleteTaskWithResult()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-task-result.ts", "source_location": "L42"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_api_qc_task_result_ts", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_utils_http", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-task-result.ts", "source_location": "L1", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_api_qc_task_result_ts", "target": "api_qc_task_result_fetchqctaskresults", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-task-result.ts", "source_location": "L12", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_api_qc_task_result_ts", "target": "api_qc_task_result_fetchqctaskmaterialusages", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-task-result.ts", "source_location": "L36", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_api_qc_task_result_ts", "target": "api_qc_task_result_fetchcompletetaskwithresult", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-task-result.ts", "source_location": "L42", "weight": 1.0}], "raw_calls": [{"caller_nid": "api_qc_task_result_fetchqctaskresults", "callee": "get", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-task-result.ts", "source_location": "L13"}, {"caller_nid": "api_qc_task_result_fetchqctaskmaterialusages", "callee": "get", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-task-result.ts", "source_location": "L37"}, {"caller_nid": "api_qc_task_result_fetchcompletetaskwithresult", "callee": "post", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-task-result.ts", "source_location": "L57"}]}
+22
View File
@@ -482,6 +482,17 @@ export const sqxpAdminRoutes: AppRouteRecord[] = [
menuCode: 'biz:envDetectRecord:list'
}
},
{
id: '92000000000000000000000000000001',
name: 'QualityInspectionMyQcMaterialUsage',
path: 'my-qc-material-usage',
component: '/quality-inspection/my-qc-material-usage/index',
meta: {
title: '我的物料领用记录',
keepAlive: true,
menuCode: 'biz:myQcMaterialUsage:list'
}
},
{
id: '70000000000000000000000000000008',
name: 'QualityInspectionQcTask',
@@ -566,6 +577,17 @@ export const sqxpAdminRoutes: AppRouteRecord[] = [
isHide: true,
menuCode: 'production:task:list'
}
},
{
id: '91000000000000000000000000000001',
name: 'ProductionSampleReceptionCompletion',
path: 'sample-reception-completion',
component: '/production/sample-reception-completion/index',
meta: {
title: '样本接收信息完善',
keepAlive: true,
menuCode: 'production:sample-reception-completion:list'
}
}
]
},
@@ -0,0 +1,10 @@
<!-- 生产管理 — 样本接收信息完善(与质检「样本接收 · 已接收」Tab 一致) -->
<template>
<SampleReception received-only />
</template>
<script setup lang="ts">
import SampleReception from '@/views/quality-inspection/sample-reception/index.vue'
defineOptions({ name: 'ProductionSampleReceptionCompletion' })
</script>
@@ -0,0 +1,17 @@
<!-- 质检管理 — 我的物料领用记录 -->
<template>
<div class="page-container">
<section class="panel">
<div class="panel-top">
<h2 class="title-bar-heading">我的物料领用记录</h2>
</div>
<QcMaterialUsageTab mine-only />
</section>
</div>
</template>
<script setup lang="ts">
import QcMaterialUsageTab from '../qc-material/QcMaterialUsageTab.vue'
defineOptions({ name: 'QualityInspectionMyQcMaterialUsage' })
</script>
@@ -93,7 +93,7 @@
</el-table-column>
<el-table-column
label="操作"
min-width="360"
min-width="440"
fixed="right"
align="center"
header-align="center"
@@ -103,6 +103,13 @@
<el-button class="btn-op-item" @click="handleView(row)">
<el-icon><View /></el-icon>查看
</el-button>
<el-button
class="btn-op-item"
:loading="exportLoadingId === row.id"
@click="handleExport(row)"
>
<el-icon><Download /></el-icon>导出
</el-button>
<el-button
v-if="row.status === 'draft'"
class="btn-op-item"
@@ -550,6 +557,14 @@
<el-button class="btn-ghost" @click="viewVisible = false">
<el-icon><Close /></el-icon>关闭
</el-button>
<el-button
class="btn-ghost"
:loading="exportLoadingId === viewDetail?.id"
:disabled="!viewDetail"
@click="handleExportFromView"
>
<el-icon><Download /></el-icon>导出 Excel
</el-button>
</template>
</el-dialog>
</div>
@@ -558,7 +573,19 @@
<script setup lang="ts">
import { ref, reactive, onMounted } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { Search, RefreshLeft, Plus, View, Edit, Check, Close, Delete } from '@element-plus/icons-vue'
import {
Search,
RefreshLeft,
Plus,
View,
Edit,
Check,
Close,
Delete,
Download
} from '@element-plus/icons-vue'
import * as XLSX from 'xlsx'
import FileSaver from 'file-saver'
import AmountInput from '@/components/common/amount-input/index.vue'
import { formatMoneyDisplay } from '@/utils/money-format'
import { fetchQcMaterialBatchOptions, type QcMaterialBatchOption } from '@/api/qc-material'
@@ -833,6 +860,224 @@
const viewVisible = ref(false)
const viewDetail = ref<QcMaterialStockCheckDetail | null>(null)
const exportLoadingId = ref('')
const MERGED_EXPORT_HEADERS = [
'序号',
'入库编号',
'入库日期',
'过期日期',
'物料编码',
'物料名称',
'规格型号',
'单位',
'货号',
'批号',
'厂家',
'单价(元)',
'数量',
'剩余金额(元)',
'备注'
]
type StockCheckExportLine = {
groupKey: string
stockInNo: string
stockInDate: string
expireDate: string
materialCode: string
materialName: string
specModel: string
unit: string
catalogNo: string
batchNo: string
manufacturer: string
unitPrice: number | null
qty: number
amount: number
remark: string
}
function exportCell(v?: string | number | null) {
if (v == null || v === '') return ''
return v
}
function exportMoney(v?: number | null) {
if (v == null || Number.isNaN(Number(v))) return ''
return Number(v)
}
function lineAmount(unitPrice?: number | null, qty?: number | null, remainingAmount?: number | null) {
if (remainingAmount != null && !Number.isNaN(Number(remainingAmount))) {
return Number(remainingAmount)
}
return calcLineAmount(unitPrice, qty) ?? 0
}
function sanitizeSheetName(name: string) {
return name.replace(/[\\/*?:[\]]/g, '_').slice(0, 31)
}
function sanitizeFileName(name: string) {
return name.replace(/[\\/:*?"<>|]/g, '_').trim() || '库存盘点'
}
function buildMergedExportRows(detail: QcMaterialStockCheckDetail) {
const normalized: StockCheckExportLine[] = []
let rowIndex = 0
for (const row of detail.batchLines || []) {
const stockInNo = (row.stockInNo || '').trim()
normalized.push({
groupKey: stockInNo || `__empty_${rowIndex}__`,
stockInNo,
stockInDate: row.stockInDate || '',
expireDate: row.expireDate || '',
materialCode: row.materialCode || '',
materialName: row.materialName || '',
specModel: row.specModel || '',
unit: row.unit || '',
catalogNo: row.catalogNo || '',
batchNo: row.batchNo || '',
manufacturer: row.manufacturer || '',
unitPrice: row.unitPrice ?? null,
qty: Number(row.remainingQty) || 0,
amount: lineAmount(row.unitPrice, row.remainingQty, row.remainingAmount),
remark: (row.remark || '').trim()
})
rowIndex += 1
}
for (const row of detail.unusedLines || []) {
const stockInNo = (row.stockInNo || '').trim()
normalized.push({
groupKey: stockInNo || `__empty_${rowIndex}__`,
stockInNo,
stockInDate: row.stockInDate || '',
expireDate: row.expireDate || '',
materialCode: row.materialCode || '',
materialName: row.materialName || '',
specModel: row.specModel || '',
unit: row.unit || '',
catalogNo: row.catalogNo || '',
batchNo: row.batchNo || '',
manufacturer: row.manufacturer || '',
unitPrice: row.unitPrice ?? null,
qty: Number(row.unusedQty) || 0,
amount: lineAmount(row.unitPrice, row.unusedQty, row.remainingAmount),
remark: (row.remark || '').trim()
})
rowIndex += 1
}
const groups = new Map<
string,
{
meta: StockCheckExportLine
totalQty: number
totalAmount: number
remarks: string[]
}
>()
for (const line of normalized) {
const existing = groups.get(line.groupKey)
if (!existing) {
groups.set(line.groupKey, {
meta: line,
totalQty: line.qty,
totalAmount: line.amount,
remarks: line.remark ? [line.remark] : []
})
continue
}
existing.totalQty += line.qty
existing.totalAmount += line.amount
if (line.remark && !existing.remarks.includes(line.remark)) {
existing.remarks.push(line.remark)
}
}
return Array.from(groups.values()).map((group, index) => {
const { meta, totalQty, totalAmount, remarks } = group
return {
序号: index + 1,
入库编号: exportCell(meta.stockInNo),
入库日期: exportCell(meta.stockInDate),
过期日期: exportCell(meta.expireDate),
物料编码: exportCell(meta.materialCode),
物料名称: exportCell(meta.materialName),
规格型号: exportCell(meta.specModel),
单位: exportCell(meta.unit),
货号: exportCell(meta.catalogNo),
批号: exportCell(meta.batchNo),
厂家: exportCell(meta.manufacturer),
'单价(元)': exportMoney(meta.unitPrice),
数量: exportCell(totalQty),
'剩余金额(元)': exportMoney(Math.round(totalAmount * 100) / 100),
备注: remarks.join(';')
}
})
}
function buildExportWorksheet(headers: string[], rows: Record<string, unknown>[]) {
if (!rows.length) {
return XLSX.utils.aoa_to_sheet([headers])
}
return XLSX.utils.json_to_sheet(rows, { header: headers })
}
function downloadStockCheckExcel(detail: QcMaterialStockCheckDetail) {
const workbook = XLSX.utils.book_new()
const mergedRows = buildMergedExportRows(detail)
XLSX.utils.book_append_sheet(
workbook,
buildExportWorksheet(MERGED_EXPORT_HEADERS, mergedRows),
sanitizeSheetName('库存盘点')
)
const excelBuffer = XLSX.write(workbook, {
bookType: 'xlsx',
type: 'array',
compression: true
})
const blob = new Blob([excelBuffer], {
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
})
const dateStr = detail.checkTime?.slice(0, 10) || new Date().toISOString().slice(0, 10)
FileSaver.saveAs(blob, `${sanitizeFileName(detail.title)}_库存盘点_${dateStr}.xlsx`)
}
async function handleExport(row: QcMaterialStockCheck) {
exportLoadingId.value = row.id
try {
const detail =
viewDetail.value?.id === row.id
? viewDetail.value
: await fetchQcMaterialStockCheckDetail(row.id)
downloadStockCheckExcel(detail)
ElMessage.success('导出成功')
} catch {
ElMessage.error('导出失败,请重试')
} finally {
exportLoadingId.value = ''
}
}
async function handleExportFromView() {
if (!viewDetail.value) return
exportLoadingId.value = viewDetail.value.id
try {
downloadStockCheckExcel(viewDetail.value)
ElMessage.success('导出成功')
} catch {
ElMessage.error('导出失败,请重试')
} finally {
exportLoadingId.value = ''
}
}
async function handleView(row: QcMaterialStockCheck) {
viewDetail.value = await fetchQcMaterialStockCheckDetail(row.id)
@@ -29,7 +29,7 @@
</el-form-item>
<el-form-item label="变动类型">
<el-select v-model="searchForm.changeType" placeholder="全部" clearable>
<el-option label="入库" value="in" />
<el-option v-if="!mineOnly" label="入库" value="in" />
<el-option label="出库" value="out" />
<el-option label="任务使用" value="use" />
</el-select>
@@ -48,7 +48,11 @@
</el-form-item>
</div>
<div class="filter-actions-row">
<span class="filter-hint">按物料、入库编号、批号、变动类型和时间范围查询变动记录。</span>
<span class="filter-hint">{{
mineOnly
? '查看本人物料领用记录,可按物料、批号、类型与时间范围筛选。'
: '按物料、入库编号、批号、变动类型和时间范围查询变动记录。'
}}</span>
<div class="filter-actions-end">
<el-button class="btn-ghost" @click="handleReset">
<el-icon><RefreshLeft /></el-icon>重置
@@ -138,15 +142,13 @@
</el-table-column>
<el-table-column
prop="changeQty"
label="变动数量"
label="领用数量"
min-width="120"
align="center"
header-align="center"
>
<template #default="{ row }">
<span :class="row.changeQty < 0 ? 'qty-negative' : 'qty-positive'">
{{ row.changeQty < 0 ? row.changeQty : `+${row.changeQty}` }}
</span>
{{ displayUsageQty(row) }}
</template>
</el-table-column>
<el-table-column label="变动前库存" min-width="120" align="center" header-align="center">
@@ -185,7 +187,13 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="领用人" min-width="100" align="center" header-align="center">
<el-table-column
v-if="!mineOnly"
label="领用人"
min-width="100"
align="center"
header-align="center"
>
<template #default="{ row }">
{{ displayReceiver(row) }}
</template>
@@ -267,14 +275,67 @@
:icon="Document"
:meta="viewRow?.createTime || ''"
:sections="viewSections"
/>
:loading="viewLoading"
width="960px"
>
<template #task-consumptions>
<div v-if="viewTaskUsages.length" class="view-subtable-wrap">
<el-table :data="viewTaskUsages" stripe class="list-table view-subtable">
<el-table-column
type="index"
label="序号"
min-width="56"
align="center"
header-align="center"
:index="(index) => index + 1"
/>
<el-table-column
prop="qcTaskNo"
label="质检任务号"
min-width="160"
align="center"
header-align="center"
>
<template #default="{ row }">{{ row.qcTaskNo || '—' }}</template>
</el-table-column>
<el-table-column label="消耗数量" min-width="100" align="center" header-align="center">
<template #default="{ row }">{{ displayTaskUsageQty(row) }}</template>
</el-table-column>
<el-table-column label="单位" min-width="72" align="center" header-align="center">
<template #default="{ row }">{{ row.usageUnit || '—' }}</template>
</el-table-column>
<el-table-column label="填报人" min-width="100" align="center" header-align="center">
<template #default="{ row }">{{ row.createByName || row.createBy || '—' }}</template>
</el-table-column>
<el-table-column label="登记时间" min-width="170" align="center" header-align="center">
<template #default="{ row }">{{ row.createTime || '—' }}</template>
</el-table-column>
<el-table-column
prop="remark"
label="备注"
min-width="140"
align="center"
header-align="center"
show-overflow-tooltip
>
<template #default="{ row }">{{ row.remark || '—' }}</template>
</el-table-column>
</el-table>
</div>
<p v-else class="view-empty-hint">暂无关联的质检任务消耗记录</p>
</template>
</SystemViewDialog>
</div>
</template>
<script setup lang="ts">
import { ref, reactive, computed, onMounted } from 'vue'
import { Search, RefreshLeft, View, Document } from '@element-plus/icons-vue'
import { fetchQcMaterialUsageList } from '@/api/qc-material-usage'
import {
fetchMyQcMaterialUsageList,
fetchQcMaterialUsageList,
fetchQcMaterialLinkedTaskUsages
} from '@/api/qc-material-usage'
import type { QcMaterialUsage } from '@/api/qc-material-usage'
import { fetchQcMaterialOptions } from '@/api/qc-material'
import type { QcMaterialOption } from '@/api/qc-material'
@@ -283,6 +344,15 @@
defineOptions({ name: 'QcMaterialUsageTab' })
const props = withDefaults(
defineProps<{
mineOnly?: boolean
}>(),
{
mineOnly: false
}
)
const route = useRoute()
const searchForm = reactive<{
@@ -331,6 +401,16 @@
return (row.useTime || row.createTime || '').trim() || '-'
}
function displayUsageQty(row: QcMaterialUsage) {
const qty = Math.abs(Number(row.changeQty) || 0)
const unit = (row.usageUnit || '').trim()
return unit ? `${qty}${unit}` : String(qty)
}
function displayTaskUsageQty(row: QcMaterialUsage) {
return Math.abs(Number(row.changeQty) || 0)
}
function displayStockBefore(row: QcMaterialUsage) {
if (row.stockBefore != null) return row.stockBefore
const after = Number(row.stockAfter ?? 0)
@@ -389,7 +469,9 @@
params.startTime = dateRange.value[0]
params.endTime = dateRange.value[1]
}
const res = await fetchQcMaterialUsageList(params)
const res = props.mineOnly
? await fetchMyQcMaterialUsageList(params)
: await fetchQcMaterialUsageList(params)
tableData.value = res.list || []
pagination.total = res.total ?? 0
} finally {
@@ -412,12 +494,18 @@
}
const viewVisible = ref(false)
const viewLoading = ref(false)
const viewRow = ref<QcMaterialUsage | null>(null)
const viewTaskUsages = ref<QcMaterialUsage[]>([])
const viewSections = computed(() => {
if (!viewRow.value) return []
const row = viewRow.value
return [
const sections: Array<{
title: string
fields: Array<Record<string, unknown>>
slot?: string
}> = [
{
title: '变动信息',
fields: [
@@ -442,12 +530,16 @@
tagType: getChangeTypeTagType(row) as any
},
{
label: '变动数量',
value: row.changeQty < 0 ? String(row.changeQty) : `+${row.changeQty}`
label: isManualOutRow(row) ? '领用数量' : '变动数量',
value: isManualOutRow(row)
? displayUsageQty(row)
: row.changeQty < 0
? String(row.changeQty)
: `+${row.changeQty}`
},
{ label: '变动前库存', value: String(displayStockBefore(row)) },
{ label: '变动后库存', value: String(row.stockAfter ?? 0) },
{ label: '关联任务号', value: row.qcTaskNo || '-' },
{ label: '关联任务号', value: row.qcTaskNo || '—' },
{
label: '来源类型',
value: getSourceLabel(row.sourceType),
@@ -466,16 +558,34 @@
value: displayUseTime(row) === '-' ? '—' : displayUseTime(row)
},
{ label: '备注', value: row.remark || '—', span: true },
{ label: '操作人', value: row.createByName || row.createBy || '-' },
{ label: '操作人', value: row.createByName || row.createBy || '—' },
{ label: '变动时间', value: row.createTime || '—' }
]
}
]
if (isManualOutRow(row)) {
sections.push({
title: '质检任务消耗',
fields: [],
slot: 'task-consumptions'
})
}
return sections
})
function handleView(row: QcMaterialUsage) {
async function handleView(row: QcMaterialUsage) {
viewRow.value = row
viewTaskUsages.value = []
viewVisible.value = true
if (!isManualOutRow(row)) return
viewLoading.value = true
try {
viewTaskUsages.value = (await fetchQcMaterialLinkedTaskUsages(row.id)) || []
} catch {
viewTaskUsages.value = []
} finally {
viewLoading.value = false
}
}
// 输入检索条件时自动搜索(防抖 300ms)
watchDebounced(
@@ -505,14 +615,3 @@
})
</script>
<style scoped lang="scss">
.qty-positive {
color: var(--el-color-success);
font-weight: 500;
}
.qty-negative {
color: var(--el-color-danger);
font-weight: 500;
}
</style>
@@ -819,6 +819,27 @@
/>
</template>
</el-table-column>
<el-table-column label="单位" min-width="100" align="center" header-align="center">
<template #default="{ row }">
<el-select
v-model="row.usageUnit"
filterable
remote
clearable
placeholder="选择单位"
class="inner-cell-input"
:loading="unitOptionsLoading"
:remote-method="searchUnitOptions"
>
<el-option
v-for="opt in unitOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value"
/>
</el-select>
</template>
</el-table-column>
<el-table-column label="备注" min-width="120" align="center" header-align="center">
<template #default="{ row }">
<el-input v-model="row.remark" placeholder="可选" clearable class="inner-cell-input" />
@@ -1204,6 +1225,7 @@
batchNo: string
remainingQty: number
qty: number
usageUnit: string
remark: string
}
@@ -1574,6 +1596,7 @@
batchNo: '',
remainingQty: 0,
qty: 1,
usageUnit: '',
remark: ''
}
}
@@ -1600,6 +1623,10 @@
row.batchNo = opt.batchNo
row.remainingQty = opt.remainingQty
row.qty = Math.min(row.qty || 1, opt.remainingQty)
if (!row.usageUnit?.trim() && opt.unit) {
row.usageUnit = opt.unit
ensureUnitOption(opt.unit)
}
}
function handleBatchStockIn() {
@@ -1694,6 +1721,7 @@
batchStockOutVisible.value = true
void searchReceiverUsers('')
void searchBatchOptions('')
void searchUnitOptions('')
batchStockOutFormRef.value?.clearValidate?.()
}
@@ -1716,6 +1744,10 @@
ElMessage.warning(`批次「${line.stockInNo}」出库数量不能超过剩余 ${line.remainingQty}`)
return
}
if (!line.usageUnit?.trim()) {
ElMessage.warning('请选择出库单位')
return
}
}
try {
await ElMessageBox.confirm(
@@ -1732,6 +1764,7 @@
items: batchStockOutLines.value.map((l) => ({
batchId: l.batchId,
qty: l.qty,
usageUnit: l.usageUnit?.trim() || undefined,
remark: l.remark?.trim() || undefined
})),
stockOutTime: batchStockOutForm.stockOutTime || undefined,
@@ -105,8 +105,8 @@
<el-table-column label="批号" min-width="100" align="center" header-align="center">
<template #default="{ row }">{{ row.batchNo || '—' }}</template>
</el-table-column>
<el-table-column label="规格型号" min-width="120" align="center" header-align="center">
<template #default="{ row }">{{ row.specModel || '—' }}</template>
<el-table-column label="领用人" min-width="100" align="center" header-align="center">
<template #default="{ row }">{{ row.receiverName || '—' }}</template>
</el-table-column>
<el-table-column label="用量" min-width="100" align="center" header-align="center">
<template #default="{ row }">
@@ -140,7 +140,6 @@
type QcTaskResultItem,
type QcTaskMaterialUsageItem
} from '@/api/qc-task-result'
import { fetchQcMaterialBatchOptions, type QcMaterialBatchOption } from '@/api/qc-material'
import { workOrderStatusLabel, taskStatusLabel, qcTaskConclusionLabel } from '@/utils/qc-labels'
import {
bizTypeLabel,
@@ -177,11 +176,10 @@
const detail = ref<OutboundQcDetail | null>(null)
type ViewMaterialUsageRow = {
batchId: string
stockInNo: string
materialName: string
specModel: string
batchNo: string
receiverName: string
unit: string
qty: number | undefined
remark: string
@@ -211,32 +209,18 @@
function materialRowsFromApi(items: QcTaskMaterialUsageItem[]): ViewMaterialUsageRow[] {
return (items || [])
.filter((u) => (u.batchId || '').trim())
.filter((u) => (u.requisitionUsageId || u.parentUsageId || '').trim())
.map((u) => ({
batchId: u.batchId,
stockInNo: u.stockInNo || '',
materialName: u.materialName || '',
specModel: '',
batchNo: u.batchNo || '',
unit: '',
receiverName: u.requisitionReceiverName || u.receiverName || '',
unit: (u.usageUnit || '').trim(),
qty: Math.abs(Number(u.changeQty) || 0) || undefined,
remark: u.remark || ''
}))
}
function enrichMaterialUsageRows(rows: ViewMaterialUsageRow[], options: QcMaterialBatchOption[]) {
for (const row of rows) {
const opt = options.find((o) => o.id === row.batchId)
if (opt) {
row.stockInNo = opt.stockInNo || row.stockInNo
row.materialName = opt.materialName || row.materialName
row.specModel = opt.specModel || ''
row.batchNo = opt.batchNo || row.batchNo
row.unit = opt.unit || ''
}
}
}
watch(
() => props.visible,
async (v) => {
@@ -247,7 +231,6 @@
const d = await fetchOutboundQcDetail(props.workOrderId)
detail.value = d
const rawTasks = (d.workOrder?.tasks || d.tasks || []) as TaskView[]
const batchOptions = await fetchQcMaterialBatchOptions().catch(() => [] as QcMaterialBatchOption[])
const enriched = await Promise.all(
rawTasks.map(async (task) => {
const base: TaskView = { ...task, results: [], materialUsages: [] }
@@ -263,9 +246,7 @@
if (task.taskType === 'sysz') {
try {
const savedUsages = await fetchQcTaskMaterialUsages(task.id)
const rows = materialRowsFromApi(savedUsages || [])
enrichMaterialUsageRows(rows, batchOptions || [])
base.materialUsages = rows
base.materialUsages = materialRowsFromApi(savedUsages || [])
} catch {
base.materialUsages = []
}
@@ -155,7 +155,10 @@
</el-form-item>
</div>
</div>
<div v-if="resultTaskType !== 'dsfjc'" class="form-section material-usage-section">
<div
v-if="resultMaterialUsageSectionVisible && resultTaskType !== 'dsfjc'"
class="form-section material-usage-section"
>
<div class="section-title material-usage-head">
<div class="section-title-left"><h3>物料使用(选填)</h3></div>
<el-button class="btn-main" type="primary" size="small" @click="addMaterialRow">
@@ -178,24 +181,24 @@
header-align="center"
:index="(index) => index + 1"
/>
<el-table-column label="入库编号" min-width="200" align="center" header-align="center">
<el-table-column label="领用记录" min-width="240" align="center" header-align="center">
<template #default="{ row, $index }">
<el-select
v-model="row.batchId"
v-model="row.requisitionUsageId"
filterable
remote
placeholder="选择入库批次"
placeholder="选择领用记录"
class="inner-cell-input"
:loading="batchOptionsLoading"
:remote-method="searchBatchOptions"
@change="(v) => onBatchSelect($index, v)"
:loading="requisitionOptionsLoading"
:remote-method="searchRequisitionOptions"
@change="(v) => onRequisitionSelect($index, v)"
>
<el-option
v-for="opt in batchOptions"
v-for="opt in requisitionOptions"
:key="opt.id"
:label="opt.label"
:value="opt.id"
:disabled="isBatchOptionDisabled(opt.id, $index)"
:disabled="isRequisitionOptionDisabled(opt.id, $index)"
/>
</el-select>
</template>
@@ -203,21 +206,17 @@
<el-table-column label="物料名称" min-width="120" align="center" header-align="center">
<template #default="{ row }">{{ row.materialName || '—' }}</template>
</el-table-column>
<el-table-column label="规格型号" min-width="100" align="center" header-align="center">
<template #default="{ row }">{{ row.specModel || '—' }}</template>
</el-table-column>
<el-table-column label="批号" min-width="90" align="center" header-align="center">
<template #default="{ row }">{{ row.batchNo || '—' }}</template>
</el-table-column>
<el-table-column label="剩余数量" min-width="90" align="center" header-align="center">
<template #default="{ row }">{{ row.remainingQty ?? '—' }}</template>
<el-table-column label="领用人" min-width="100" align="center" header-align="center">
<template #default="{ row }">{{ row.receiverName || '—' }}</template>
</el-table-column>
<el-table-column label="用量" min-width="120" align="center" header-align="center">
<template #default="{ row }">
<el-input-number
v-model="row.qty"
:min="0.0001"
:max="row.remainingQty > 0 ? row.remainingQty : undefined"
:precision="4"
:step="1"
controls-position="right"
@@ -226,8 +225,26 @@
/>
</template>
</el-table-column>
<el-table-column label="单位" min-width="72" align="center" header-align="center">
<template #default="{ row }">{{ row.unit || '—' }}</template>
<el-table-column label="单位" min-width="100" align="center" header-align="center">
<template #default="{ row }">
<el-select
v-model="row.usageUnit"
filterable
remote
clearable
placeholder="选择单位"
class="inner-cell-input"
:loading="usageUnitOptionsLoading"
:remote-method="searchUsageUnitOptions"
>
<el-option
v-for="opt in usageUnitOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value"
/>
</el-select>
</template>
</el-table-column>
<el-table-column label="备注" min-width="140" align="center" header-align="center">
<template #default="{ row }">
@@ -395,13 +412,16 @@
<el-table-column label="批号" min-width="100" align="center" header-align="center">
<template #default="{ row }">{{ row.batchNo || '—' }}</template>
</el-table-column>
<el-table-column label="领用人" min-width="100" align="center" header-align="center">
<template #default="{ row }">{{ row.receiverName || '—' }}</template>
</el-table-column>
<el-table-column label="用量" min-width="100" align="center" header-align="center">
<template #default="{ row }">
{{ row.qty != null && row.qty !== '' ? row.qty : '—' }}
</template>
</el-table-column>
<el-table-column label="单位" min-width="72" align="center" header-align="center">
<template #default="{ row }">{{ row.unit || '—' }}</template>
<template #default="{ row }">{{ row.usageUnit || '—' }}</template>
</el-table-column>
<el-table-column label="备注" min-width="140" align="center" header-align="center">
<template #default="{ row }">{{ row.remark || '—' }}</template>
@@ -462,7 +482,11 @@
type QcTaskResultItem,
type QcTaskMaterialUsageItem
} from '@/api/qc-task-result'
import { fetchQcMaterialBatchOptions, type QcMaterialBatchOption } from '@/api/qc-material'
import {
fetchQcMaterialRequisitionOptions,
type QcMaterialRequisitionOption
} from '@/api/qc-material-usage'
import { fetchItemUnitList } from '@/api/admin'
import {
taskTypeLabel,
taskStatusLabel,
@@ -528,14 +552,13 @@
const resultAttachments = ref<FinanceAttachmentItem[]>([])
type MaterialUsageRow = {
_rowKey: string
batchId: string
requisitionUsageId: string
stockInNo: string
materialName: string
specModel: string
batchNo: string
unit: string
remainingQty: number
receiverName: string
qty: number | undefined
usageUnit: string
remark: string
}
@@ -545,40 +568,78 @@
return `mu_${Date.now()}_${materialUsageRowSeq}`
}
const batchOptions = ref<QcMaterialBatchOption[]>([])
const batchOptionsLoading = ref(false)
const resultMaterialUsageSectionVisible = true
const requisitionOptions = ref<QcMaterialRequisitionOption[]>([])
const requisitionOptionsLoading = ref(false)
const usageUnitOptions = ref<{ label: string; value: string }[]>([])
const usageUnitOptionsLoading = ref(false)
const materialUsages = ref<MaterialUsageRow[]>([])
async function searchBatchOptions(query: string) {
batchOptionsLoading.value = true
function mapUnitOption(row: { unitName?: string; unitCode?: string }) {
const label = (row.unitName || row.unitCode || '').trim()
return { label, value: label }
}
function ensureUsageUnitOption(value: string) {
const v = (value || '').trim()
if (!v) return
if (!usageUnitOptions.value.some((o) => o.value === v)) {
usageUnitOptions.value = [{ label: v, value: v }, ...usageUnitOptions.value]
}
}
async function searchRequisitionOptions(query: string) {
requisitionOptionsLoading.value = true
try {
batchOptions.value =
(await fetchQcMaterialBatchOptions({ keyword: query?.trim() || undefined })) || []
requisitionOptions.value =
(await fetchQcMaterialRequisitionOptions({
keyword: query?.trim() || undefined,
limit: 50
})) || []
} catch {
batchOptions.value = []
requisitionOptions.value = []
} finally {
batchOptionsLoading.value = false
requisitionOptionsLoading.value = false
}
}
async function searchUsageUnitOptions(query: string) {
usageUnitOptionsLoading.value = true
try {
const res = await fetchItemUnitList({
page: 1,
pageSize: 100,
keyword: query?.trim() || undefined
})
usageUnitOptions.value = (res.list || []).map(mapUnitOption).filter((o) => o.value)
} catch {
usageUnitOptions.value = []
} finally {
usageUnitOptionsLoading.value = false
}
}
function clearMaterialRow(row: MaterialUsageRow) {
row.batchId = ''
row.requisitionUsageId = ''
row.stockInNo = ''
row.materialName = ''
row.specModel = ''
row.batchNo = ''
row.unit = ''
row.remainingQty = 0
row.receiverName = ''
}
function isBatchOptionDisabled(batchId: string, currentIndex: number) {
if (!batchId) return false
return materialUsages.value.some((r, i) => i !== currentIndex && r.batchId === batchId)
function isRequisitionOptionDisabled(requisitionUsageId: string, currentIndex: number) {
if (!requisitionUsageId) return false
return materialUsages.value.some(
(r, i) => i !== currentIndex && r.requisitionUsageId === requisitionUsageId
)
}
function isDuplicateBatch(batchId: string, excludeIndex: number) {
if (!batchId) return false
return materialUsages.value.some((r, i) => i !== excludeIndex && r.batchId === batchId)
function isDuplicateRequisition(requisitionUsageId: string, excludeIndex: number) {
if (!requisitionUsageId) return false
return materialUsages.value.some(
(r, i) => i !== excludeIndex && r.requisitionUsageId === requisitionUsageId
)
}
function parseMaterialQty(qty: number | string | undefined): number | null {
@@ -662,43 +723,44 @@
resultTaskType.value === 'dsfjc' ? 'qc-third-party' : 'qc-lab'
)
function onBatchSelect(index: number, id: string) {
function onRequisitionSelect(index: number, id: string) {
const row = materialUsages.value[index]
if (!row) return
if (!id) {
if (parseMaterialQty(row.qty) == null) {
if (parseMaterialQty(row.qty) == null && !row.usageUnit?.trim()) {
removeMaterialRow(index)
} else {
clearMaterialRow(row)
}
return
}
if (isDuplicateBatch(id, index)) {
ElMessage.warning('该入库批次已在列表中,请勿重复添加')
if (isDuplicateRequisition(id, index)) {
ElMessage.warning('该领用记录已在列表中,请勿重复添加')
clearMaterialRow(row)
return
}
const opt = batchOptions.value.find((o) => o.id === id)
row.batchId = id
const opt = requisitionOptions.value.find((o) => o.id === id)
row.requisitionUsageId = id
row.stockInNo = opt?.stockInNo || ''
row.materialName = opt?.materialName || ''
row.specModel = opt?.specModel || ''
row.batchNo = opt?.batchNo || ''
row.unit = opt?.unit || ''
row.remainingQty = opt?.remainingQty ?? 0
row.receiverName = opt?.receiverName || opt?.receiver || ''
if (!row.usageUnit?.trim() && opt?.usageUnit) {
row.usageUnit = opt.usageUnit
ensureUsageUnitOption(opt.usageUnit)
}
}
function addMaterialRow() {
materialUsages.value.push({
_rowKey: nextMaterialRowKey(),
batchId: '',
requisitionUsageId: '',
stockInNo: '',
materialName: '',
specModel: '',
batchNo: '',
unit: '',
remainingQty: 0,
receiverName: '',
qty: undefined,
usageUnit: '',
remark: ''
})
}
@@ -709,34 +771,39 @@
function materialRowsFromApi(items: QcTaskMaterialUsageItem[]): MaterialUsageRow[] {
return (items || [])
.filter((u) => (u.batchId || '').trim())
.map((u) => ({
_rowKey: nextMaterialRowKey(),
batchId: u.batchId,
stockInNo: u.stockInNo || '',
materialName: u.materialName || '',
specModel: '',
batchNo: u.batchNo || '',
unit: '',
remainingQty: 0,
qty: Math.abs(Number(u.changeQty) || 0) || undefined,
remark: u.remark || ''
}))
.filter((u) => (u.requisitionUsageId || u.parentUsageId || u.batchId || '').trim())
.map((u) => {
const usageUnit = (u.usageUnit || '').trim()
if (usageUnit) ensureUsageUnitOption(usageUnit)
return {
_rowKey: nextMaterialRowKey(),
requisitionUsageId: u.requisitionUsageId || u.parentUsageId || '',
stockInNo: u.stockInNo || '',
materialName: u.materialName || '',
batchNo: u.batchNo || '',
receiverName: u.requisitionReceiverName || u.receiverName || '',
qty: Math.abs(Number(u.changeQty) || 0) || undefined,
usageUnit,
remark: u.remark || ''
}
})
}
function enrichMaterialUsageRows(
rows: MaterialUsageRow[],
options: QcMaterialBatchOption[] = batchOptions.value
options: QcMaterialRequisitionOption[] = requisitionOptions.value
) {
for (const row of rows) {
const opt = options.find((o) => o.id === row.batchId)
const opt = options.find((o) => o.id === row.requisitionUsageId)
if (opt) {
row.stockInNo = opt.stockInNo || row.stockInNo
row.materialName = opt.materialName || row.materialName
row.specModel = opt.specModel || ''
row.batchNo = opt.batchNo || row.batchNo
row.unit = opt.unit || ''
row.remainingQty = opt.remainingQty ?? row.remainingQty
row.receiverName = opt.receiverName || opt.receiver || row.receiverName
if (!row.usageUnit?.trim() && opt.usageUnit) {
row.usageUnit = opt.usageUnit
ensureUsageUnitOption(opt.usageUnit)
}
}
}
}
@@ -1089,12 +1156,10 @@
}
if (row.taskType !== 'dsfjc') {
try {
const [savedUsages, opts] = await Promise.all([
fetchQcTaskMaterialUsages(row.id).catch(() => [] as QcTaskMaterialUsageItem[]),
fetchQcMaterialBatchOptions().catch(() => [] as QcMaterialBatchOption[])
])
const savedUsages = await fetchQcTaskMaterialUsages(row.id).catch(
() => [] as QcTaskMaterialUsageItem[]
)
const rows = materialRowsFromApi(savedUsages || [])
enrichMaterialUsageRows(rows, opts || [])
viewMaterialUsages.value = rows
} catch {
viewMaterialUsages.value = []
@@ -1129,7 +1194,7 @@
resultConclusion.value = ''
resultAttachments.value = apiFilesToFinanceItems(row.attachmentFiles)
materialUsages.value = []
batchOptions.value = []
requisitionOptions.value = []
resultLoading.value = true
try {
const detail = await fetchQcTaskDetail(row.id)
@@ -1139,15 +1204,14 @@
resultAttachments.value = apiFilesToFinanceItems(detail.attachmentFiles)
const results = await fetchQcTaskResults(row.id)
resultParams.value = normalizeResultParams(results || [])
if (row.taskType !== 'dsfjc') {
const [opts, savedUsages] = await Promise.all([
fetchQcMaterialBatchOptions().catch(() => [] as QcMaterialBatchOption[]),
fetchQcTaskMaterialUsages(row.id).catch(() => [] as QcTaskMaterialUsageItem[])
])
batchOptions.value = opts || []
if (resultMaterialUsageSectionVisible && row.taskType !== 'dsfjc') {
const savedUsages = await fetchQcTaskMaterialUsages(row.id).catch(
() => [] as QcTaskMaterialUsageItem[]
)
materialUsages.value = materialRowsFromApi(savedUsages || [])
enrichMaterialUsageRows(materialUsages.value)
void searchBatchOptions('')
void searchRequisitionOptions('')
void searchUsageUnitOptions('')
}
} catch {
resultParams.value = []
@@ -1174,38 +1238,49 @@
ElMessage.warning('请上传第三方检测材料')
return
}
if (resultTaskType.value !== 'dsfjc') {
materialUsages.value = materialUsages.value.filter((mu) => !!mu.batchId)
const seenBatchIds = new Set<string>()
if (resultMaterialUsageSectionVisible && resultTaskType.value !== 'dsfjc') {
const seenRequisitionIds = new Set<string>()
for (const mu of materialUsages.value) {
if (!mu.batchId) continue
if (!mu.requisitionUsageId?.trim()) {
if (parseMaterialQty(mu.qty) != null || mu.usageUnit?.trim()) {
ElMessage.warning('请选择领用记录')
return
}
continue
}
const qtyNum = parseMaterialQty(mu.qty)
if (qtyNum == null) {
ElMessage.warning('请为已选批次填写有效用量')
ElMessage.warning('请为已选领用记录填写有效用量')
return
}
if (mu.remainingQty > 0 && qtyNum > mu.remainingQty) {
ElMessage.warning(`批次「${mu.stockInNo}」用量不能超过剩余 ${mu.remainingQty}`)
if (!mu.usageUnit?.trim()) {
ElMessage.warning('请选择用量单位')
return
}
if (seenBatchIds.has(mu.batchId)) {
ElMessage.warning('物料列表中存在重复入库批次,请检查')
if (seenRequisitionIds.has(mu.requisitionUsageId)) {
ElMessage.warning('物料列表中存在重复领用记录,请检查')
return
}
seenBatchIds.add(mu.batchId)
seenRequisitionIds.add(mu.requisitionUsageId)
}
materialUsages.value = materialUsages.value.filter((mu) => !!mu.requisitionUsageId?.trim())
}
resultLoading.value = true
try {
const validMaterialUsages = materialUsages.value
.map((mu) => ({ ...mu, qtyNum: parseMaterialQty(mu.qty) }))
.filter((mu) => mu.batchId && mu.qtyNum != null)
.filter((mu) => mu.requisitionUsageId && mu.qtyNum != null)
const data: {
conclusion: string
results: QcTaskResultItem[]
remark?: string
thirdPartyAttachments?: string
materialUsages?: Array<{ batchId: string; qty: number; remark?: string }>
materialUsages?: Array<{
requisitionUsageId: string
qty: number
usageUnit?: string
remark?: string
}>
} = {
conclusion: resultConclusion.value,
remark: resultRemark.value,
@@ -1218,10 +1293,11 @@
}))
}
data.thirdPartyAttachments = financeAttachmentsToUrlString(resultAttachments.value)
if (resultTaskType.value !== 'dsfjc') {
if (resultMaterialUsageSectionVisible && resultTaskType.value !== 'dsfjc') {
data.materialUsages = validMaterialUsages.map((mu) => ({
batchId: mu.batchId,
requisitionUsageId: mu.requisitionUsageId,
qty: mu.qtyNum!,
usageUnit: mu.usageUnit?.trim() || undefined,
remark: mu.remark?.trim() || undefined
}))
}
@@ -594,8 +594,8 @@
<el-table-column label="批号" min-width="100" align="center" header-align="center">
<template #default="{ row }">{{ row.batchNo || '—' }}</template>
</el-table-column>
<el-table-column label="规格型号" min-width="120" align="center" header-align="center">
<template #default="{ row }">{{ row.specModel || '—' }}</template>
<el-table-column label="领用人" min-width="100" align="center" header-align="center">
<template #default="{ row }">{{ row.receiverName || '—' }}</template>
</el-table-column>
<el-table-column label="用量" min-width="100" align="center" header-align="center">
<template #default="{ row }">
@@ -755,7 +755,6 @@
type QcTaskResultItem,
type QcTaskMaterialUsageItem
} from '@/api/qc-task-result'
import { fetchQcMaterialBatchOptions, type QcMaterialBatchOption } from '@/api/qc-material'
import type { QcTask } from '@/api/qc-task'
import {
workOrderStatusLabel,
@@ -1132,11 +1131,10 @@
const viewLoading = ref(false)
const detail = ref<QcWorkOrderDetail | null>(null)
type ViewMaterialUsageRow = {
batchId: string
stockInNo: string
materialName: string
specModel: string
batchNo: string
receiverName: string
unit: string
qty: number | undefined
remark: string
@@ -1163,32 +1161,18 @@
function materialRowsFromApi(items: QcTaskMaterialUsageItem[]): ViewMaterialUsageRow[] {
return (items || [])
.filter((u) => (u.batchId || '').trim())
.filter((u) => (u.requisitionUsageId || u.parentUsageId || '').trim())
.map((u) => ({
batchId: u.batchId,
stockInNo: u.stockInNo || '',
materialName: u.materialName || '',
specModel: '',
batchNo: u.batchNo || '',
unit: '',
receiverName: u.requisitionReceiverName || u.receiverName || '',
unit: (u.usageUnit || '').trim(),
qty: Math.abs(Number(u.changeQty) || 0) || undefined,
remark: u.remark || ''
}))
}
function enrichMaterialUsageRows(rows: ViewMaterialUsageRow[], options: QcMaterialBatchOption[]) {
for (const row of rows) {
const opt = options.find((o) => o.id === row.batchId)
if (opt) {
row.stockInNo = opt.stockInNo || row.stockInNo
row.materialName = opt.materialName || row.materialName
row.specModel = opt.specModel || ''
row.batchNo = opt.batchNo || row.batchNo
row.unit = opt.unit || ''
}
}
}
const viewReceptionAttachmentFiles = computed(() => {
const r = detail.value?.reception
if (!r) return []
@@ -1679,7 +1663,6 @@
const d = await fetchQcWorkOrderDetail(row.id)
detail.value = d
const rawTasks = (d.tasks || []) as QcWorkOrderTaskView[]
const batchOptions = await fetchQcMaterialBatchOptions().catch(() => [] as QcMaterialBatchOption[])
const enriched = await Promise.all(
rawTasks.map(async (task) => {
const base: QcWorkOrderTaskView = {
@@ -1699,9 +1682,7 @@
if (task.taskType === 'sysz') {
try {
const savedUsages = await fetchQcTaskMaterialUsages(task.id)
const rows = materialRowsFromApi(savedUsages || [])
enrichMaterialUsageRows(rows, batchOptions || [])
base.materialUsages = rows
base.materialUsages = materialRowsFromApi(savedUsages || [])
} catch {
base.materialUsages = []
}
@@ -4,10 +4,11 @@
<div class="page-container">
<section class="panel">
<div class="panel-top">
<h2>样本接收列表</h2>
<h2>{{ receivedOnly ? '样本接收信息完善' : '样本接收列表' }}</h2>
</div>
<el-tabs
v-if="!receivedOnly"
v-model="activeTab"
class="work-order-type-tabs"
@tab-change="handleStatusTabChange"
@@ -209,6 +210,15 @@
>
<template #default="{ row }">{{ row.newbornName || '-' }}</template>
</el-table-column>
<el-table-column
prop="sampleCollectTime"
label="样本采集时间"
min-width="170"
align="center"
header-align="center"
>
<template #default="{ row }">{{ row.sampleCollectTime || '-' }}</template>
</el-table-column>
<el-table-column
prop="etaTime"
label="预计到达时间"
@@ -448,7 +458,6 @@
<el-input-number
v-model="receiveForm.volumeMl"
:min="0"
:precision="4"
:controls="false"
placeholder="体积"
style="width: 100%"
@@ -458,7 +467,6 @@
<el-input-number
v-model="receiveForm.netWeightG"
:min="0"
:precision="4"
:controls="false"
placeholder="净重"
style="width: 100%"
@@ -887,10 +895,20 @@
: protocolStatusTagType(status)
}
const props = withDefaults(
defineProps<{
/** 生产管理「样本接收信息完善」:仅展示已接收 Tab 内容 */
receivedOnly?: boolean
}>(),
{
receivedOnly: false
}
)
defineOptions({ name: 'QualityInspectionSampleReception' })
const userStore = useUserStore()
const activeTab = ref('pending')
const activeTab = ref(props.receivedOnly ? 'received' : 'pending')
const searchForm = reactive({ keyword: '', sourceType: '' })
function formatLocalDate(d: Date): string {
@@ -1681,7 +1699,9 @@
})
receiveDialogVisible.value = false
pagination.page = 1
activeTab.value = 'received'
if (!props.receivedOnly) {
activeTab.value = 'received'
}
loadData()
}
} finally {