feat:分析赋值
This commit is contained in:
@@ -40,7 +40,7 @@
|
|||||||
<scroll-view scroll-y scroll-with-animation style="height: calc(75vh - 60px)">
|
<scroll-view scroll-y scroll-with-animation style="height: calc(75vh - 60px)">
|
||||||
<block v-for="(sample, index) in sampleList" :key="index">
|
<block v-for="(sample, index) in sampleList" :key="index">
|
||||||
<view class="sample-item">
|
<view class="sample-item">
|
||||||
<u-row @click="showSampleDetail(sample.id, index)">
|
<u-row @click="showSampleDetail(sample.businessAssayTaskDataId, index)">
|
||||||
<u-col span="2" class="text-center">
|
<u-col span="2" class="text-center">
|
||||||
<view>
|
<view>
|
||||||
<text>【{{ index + 1 }}】</text>
|
<text>【{{ index + 1 }}】</text>
|
||||||
|
|||||||
@@ -307,11 +307,7 @@ const auncelSelector = ref(null)
|
|||||||
|
|
||||||
// 计算属性
|
// 计算属性
|
||||||
const confirmWeightDisabled = computed(() => {
|
const confirmWeightDisabled = computed(() => {
|
||||||
if (
|
if (currentAuncel.value.weightStable === 1 && Number(currentAuncel.value.weightData) > 0) {
|
||||||
currentSampleData.value.sampleCode &&
|
|
||||||
currentAuncel.value.weightStable === 1 &&
|
|
||||||
Number(currentAuncel.value.weightData) > 0
|
|
||||||
) {
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
@@ -395,11 +391,18 @@ const autoNextField = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//自动切换到下一个样品
|
//自动切换到下一个样品
|
||||||
const autoNextSample = () => {
|
const autoNextSample = indexParam => {
|
||||||
let index = currentSampleIndex.value + 1
|
let index = 0
|
||||||
|
if (indexParam !== undefined) {
|
||||||
|
index = indexParam
|
||||||
|
} else {
|
||||||
|
index = currentSampleIndex.value + 1
|
||||||
|
}
|
||||||
|
|
||||||
// 在数组范围内,且当前样品是 in_progress,就继续往后找
|
// 在数组范围内,且当前样品是 in_progress,就继续往后找
|
||||||
while (index < sampleDataList.value.length) {
|
while (index < sampleDataList.value.length) {
|
||||||
const sample = sampleDataList.value[index]
|
const sample = sampleDataList.value[index]
|
||||||
|
|
||||||
if (sample.rollbackStatus !== 'in_progress') {
|
if (sample.rollbackStatus !== 'in_progress') {
|
||||||
// 找到了合法的样品,切换
|
// 找到了合法的样品,切换
|
||||||
switchSample(index, true)
|
switchSample(index, true)
|
||||||
@@ -662,7 +665,11 @@ const saveDetail = async () => {
|
|||||||
}
|
}
|
||||||
// 如果处理后的值不为空,重新赋值该字段到其他样品类型下的样品上,并触发每一个样品的计算
|
// 如果处理后的值不为空,重新赋值该字段到其他样品类型下的样品上,并触发每一个样品的计算
|
||||||
if (item.value !== null) {
|
if (item.value !== null) {
|
||||||
dynamicFormData[item.target] = item.value
|
for (const col of currentAssayType.value.columns) {
|
||||||
|
if (col.fieldIndex === sourceKey) {
|
||||||
|
dynamicFormData[item.target] = row[sourceKey].value
|
||||||
|
}
|
||||||
|
}
|
||||||
updateTableDataByConfigFields()
|
updateTableDataByConfigFields()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -806,7 +813,7 @@ watch(
|
|||||||
() => {
|
() => {
|
||||||
sampleDataList.value = currentAssayType.value.tableData
|
sampleDataList.value = currentAssayType.value.tableData
|
||||||
fieldGroup.value = groupByField(currentAssayType.value.columns, cupNumFieldIndex)
|
fieldGroup.value = groupByField(currentAssayType.value.columns, cupNumFieldIndex)
|
||||||
|
autoNextSample(0)
|
||||||
setValueToField()
|
setValueToField()
|
||||||
// getDomHeight()
|
// getDomHeight()
|
||||||
activeCollapses.value = fieldGroup.value.map((_, index) => index)
|
activeCollapses.value = fieldGroup.value.map((_, index) => index)
|
||||||
@@ -1122,14 +1129,14 @@ const submitTask = () => {
|
|||||||
function handleIngredients() {
|
function handleIngredients() {
|
||||||
if (checkSampleReturning()) return
|
if (checkSampleReturning()) return
|
||||||
const params = {
|
const params = {
|
||||||
businessAssayTaskId: businessAssayTaskId.value
|
businessAssayTaskId: taskId.value
|
||||||
}
|
}
|
||||||
nx.$api.assayTask.taskIngredients(params).then(res => {
|
nx.$api.assayTask.taskIngredients(params).then(res => {
|
||||||
getSampleAnalysisByTaskId()
|
getSampleAnalysisByTaskId()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function checkSampleReturning() {
|
function checkSampleReturning() {
|
||||||
const analysisSampleData = assayGroups.value.filter(t => t.value == 'analysis').tableData
|
const analysisSampleData = assayGroups.value.find(t => t.value == 'analysis').tableData
|
||||||
const hasReturning = analysisSampleData.some(item => item.rollbackStatus === 'in_progress')
|
const hasReturning = analysisSampleData.some(item => item.rollbackStatus === 'in_progress')
|
||||||
if (hasReturning) {
|
if (hasReturning) {
|
||||||
nx.$helper.showToast('该任务单存在退回中的样品')
|
nx.$helper.showToast('该任务单存在退回中的样品')
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 10 KiB |
BIN
static/images/status/return_in_progress.png
Normal file
BIN
static/images/status/return_in_progress.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
Reference in New Issue
Block a user