feat:打印和分析管理

This commit is contained in:
houjunxiang
2026-01-05 14:44:18 +08:00
parent 168026cc39
commit d246300f28
7 changed files with 32 additions and 17 deletions

View File

@@ -24,7 +24,7 @@
@click="switchTask(index)"
>
<template #tag="{ task }">
<u-icon v-if="task.flowStatus === 'approved'" name="/static/images/status/completed.png" size="45" />
<u-icon v-if="task.flowStatus === 'completed'" name="/static/images/status/completed.png" size="45" />
<u-icon v-else name="/static/images/status/wait_for_audit.png" size="45" />
</template>
</TaskItem>

View File

@@ -69,7 +69,7 @@
</view>
</scroll-view>
<u-button
v-if="taskIngredientsStatus === 'allow_submit'"
v-if="taskIngredientsStatus === 'allow_submit'||taskIsIngredients == '0'"
class="btn-operation"
type="primary"
@click="submitTask()"
@@ -288,6 +288,7 @@ const { proxy } = getCurrentInstance()
// 响应式数据定义
const taskId = ref('')
const taskIngredientsStatus = ref('') //配料状态
const taskIsIngredients = ref('')
const configReportTemplateKey = ref('')
const elId = nx.$helper.uuid()
const scrollTop = ref(0) //tab标题的滚动条位置
@@ -788,6 +789,7 @@ function setValueToSample() {
nx.$test.object(currentSampleData.value[item.fieldIndex])
) {
currentSampleData.value[item.fieldIndex].value = item.value
currentSampleData.value[item.fieldIndex].symbol = item.symbol
}
})
}
@@ -929,10 +931,12 @@ async function getSampleAnalysisByTaskId() {
configAssayMethodProjectRangeList,
businessAssayTasNo,
formValue,
ingredientsStatus
ingredientsStatus,
isIngredients
} = await nx.$api.assayTask.batchSampleAndQcAnalysisByTaskId(taskId.value)
title.value = '样品分析-任务单编号:' + businessAssayTasNo
taskIngredientsStatus.value = ingredientsStatus
taskIsIngredients.value = isIngredients
// 处理分析数据
assayGroups.value = assayTaskAnalysisDataList.map(group => {
// 必须深拷贝 datas防止多个表格共享引用
@@ -962,6 +966,8 @@ function setValueToField() {
group.fields.forEach(field => {
let value = getFieldValue(field)
field.value = value
let symbol = getFieldSymbol(field)
field.symbol = symbol
})
}
}
@@ -973,6 +979,14 @@ function getFieldValue(field) {
return ''
}
}
function getFieldSymbol(field) {
const fieldSymbol = currentSampleData.value[field.fieldIndex]?.symbol
if (fieldSymbol) {
return fieldSymbol
} else {
return '='
}
}
const apiRequest = async url => {
return request({