feat:分析赋值
This commit is contained in:
@@ -3,7 +3,7 @@ const isDev = process.env.NODE_ENV === 'development'
|
||||
const BaseUrl = isDev ? 'http://192.168.26.116:888/admin-api' : 'http://192.168.26.116:888/admin-api'
|
||||
// const BaseUrl = isDev ? 'http://192.168.26.190:48080/admin-api' : 'http://192.168.26.116:888/admin-api'
|
||||
|
||||
// const BaseUrl = isDev ? 'http://localhost:9999' : ''
|
||||
// const BaseUrl = isDev ? 'http://localhost:9999' : ''
|
||||
const upgradeBaseUrl = 'http://192.168.26.116:888'
|
||||
|
||||
const tenantId = '1'
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<scroll-view scroll-y scroll-with-animation style="height: calc(75vh - 60px)">
|
||||
<block v-for="(sample, index) in sampleList" :key="index">
|
||||
<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">
|
||||
<view>
|
||||
<text>【{{ index + 1 }}】</text>
|
||||
|
||||
@@ -307,11 +307,7 @@ const auncelSelector = ref(null)
|
||||
|
||||
// 计算属性
|
||||
const confirmWeightDisabled = computed(() => {
|
||||
if (
|
||||
currentSampleData.value.sampleCode &&
|
||||
currentAuncel.value.weightStable === 1 &&
|
||||
Number(currentAuncel.value.weightData) > 0
|
||||
) {
|
||||
if (currentAuncel.value.weightStable === 1 && Number(currentAuncel.value.weightData) > 0) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
@@ -395,11 +391,18 @@ const autoNextField = () => {
|
||||
}
|
||||
|
||||
//自动切换到下一个样品
|
||||
const autoNextSample = () => {
|
||||
let index = currentSampleIndex.value + 1
|
||||
const autoNextSample = indexParam => {
|
||||
let index = 0
|
||||
if (indexParam !== undefined) {
|
||||
index = indexParam
|
||||
} else {
|
||||
index = currentSampleIndex.value + 1
|
||||
}
|
||||
|
||||
// 在数组范围内,且当前样品是 in_progress,就继续往后找
|
||||
while (index < sampleDataList.value.length) {
|
||||
const sample = sampleDataList.value[index]
|
||||
|
||||
if (sample.rollbackStatus !== 'in_progress') {
|
||||
// 找到了合法的样品,切换
|
||||
switchSample(index, true)
|
||||
@@ -662,7 +665,11 @@ const saveDetail = async () => {
|
||||
}
|
||||
// 如果处理后的值不为空,重新赋值该字段到其他样品类型下的样品上,并触发每一个样品的计算
|
||||
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()
|
||||
}
|
||||
}
|
||||
@@ -806,7 +813,7 @@ watch(
|
||||
() => {
|
||||
sampleDataList.value = currentAssayType.value.tableData
|
||||
fieldGroup.value = groupByField(currentAssayType.value.columns, cupNumFieldIndex)
|
||||
|
||||
autoNextSample(0)
|
||||
setValueToField()
|
||||
// getDomHeight()
|
||||
activeCollapses.value = fieldGroup.value.map((_, index) => index)
|
||||
@@ -1122,14 +1129,14 @@ const submitTask = () => {
|
||||
function handleIngredients() {
|
||||
if (checkSampleReturning()) return
|
||||
const params = {
|
||||
businessAssayTaskId: businessAssayTaskId.value
|
||||
businessAssayTaskId: taskId.value
|
||||
}
|
||||
nx.$api.assayTask.taskIngredients(params).then(res => {
|
||||
getSampleAnalysisByTaskId()
|
||||
})
|
||||
}
|
||||
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')
|
||||
if (hasReturning) {
|
||||
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