feat:打印和分析管理
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
// 在此不用配置接口前缀
|
// 在此不用配置接口前缀
|
||||||
const isDev = process.env.NODE_ENV === 'development'
|
const isDev = process.env.NODE_ENV === 'development'
|
||||||
// const BaseUrl = isDev ? 'http://192.168.26.116:888/admin-api' : 'http://172.16.46.62:30081/admin-api'
|
const BaseUrl = isDev ? 'http://192.168.26.116:888/admin-api' : 'http://172.16.46.62:30081/admin-api'
|
||||||
const BaseUrl = isDev ? 'http://192.168.26.163:48080/admin-api' : 'http://192.168.26.116:888/admin-api'
|
// const BaseUrl = isDev ? 'http://192.168.26.163: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/admin-api'
|
const upgradeBaseUrl = 'http://192.168.26.116:888/admin-api'
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
@click="switchTask(index)"
|
@click="switchTask(index)"
|
||||||
>
|
>
|
||||||
<template #tag="{ task }">
|
<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" />
|
<u-icon v-else name="/static/images/status/wait_for_audit.png" size="45" />
|
||||||
</template>
|
</template>
|
||||||
</TaskItem>
|
</TaskItem>
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<u-button
|
<u-button
|
||||||
v-if="taskIngredientsStatus === 'allow_submit'"
|
v-if="taskIngredientsStatus === 'allow_submit'||taskIsIngredients == '0'"
|
||||||
class="btn-operation"
|
class="btn-operation"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="submitTask()"
|
@click="submitTask()"
|
||||||
@@ -288,6 +288,7 @@ const { proxy } = getCurrentInstance()
|
|||||||
// 响应式数据定义
|
// 响应式数据定义
|
||||||
const taskId = ref('')
|
const taskId = ref('')
|
||||||
const taskIngredientsStatus = ref('') //配料状态
|
const taskIngredientsStatus = ref('') //配料状态
|
||||||
|
const taskIsIngredients = ref('')
|
||||||
const configReportTemplateKey = ref('')
|
const configReportTemplateKey = ref('')
|
||||||
const elId = nx.$helper.uuid()
|
const elId = nx.$helper.uuid()
|
||||||
const scrollTop = ref(0) //tab标题的滚动条位置
|
const scrollTop = ref(0) //tab标题的滚动条位置
|
||||||
@@ -788,6 +789,7 @@ function setValueToSample() {
|
|||||||
nx.$test.object(currentSampleData.value[item.fieldIndex])
|
nx.$test.object(currentSampleData.value[item.fieldIndex])
|
||||||
) {
|
) {
|
||||||
currentSampleData.value[item.fieldIndex].value = item.value
|
currentSampleData.value[item.fieldIndex].value = item.value
|
||||||
|
currentSampleData.value[item.fieldIndex].symbol = item.symbol
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -929,10 +931,12 @@ async function getSampleAnalysisByTaskId() {
|
|||||||
configAssayMethodProjectRangeList,
|
configAssayMethodProjectRangeList,
|
||||||
businessAssayTasNo,
|
businessAssayTasNo,
|
||||||
formValue,
|
formValue,
|
||||||
ingredientsStatus
|
ingredientsStatus,
|
||||||
|
isIngredients
|
||||||
} = await nx.$api.assayTask.batchSampleAndQcAnalysisByTaskId(taskId.value)
|
} = await nx.$api.assayTask.batchSampleAndQcAnalysisByTaskId(taskId.value)
|
||||||
title.value = '样品分析-任务单编号:' + businessAssayTasNo
|
title.value = '样品分析-任务单编号:' + businessAssayTasNo
|
||||||
taskIngredientsStatus.value = ingredientsStatus
|
taskIngredientsStatus.value = ingredientsStatus
|
||||||
|
taskIsIngredients.value = isIngredients
|
||||||
// 处理分析数据
|
// 处理分析数据
|
||||||
assayGroups.value = assayTaskAnalysisDataList.map(group => {
|
assayGroups.value = assayTaskAnalysisDataList.map(group => {
|
||||||
// 必须深拷贝 datas!防止多个表格共享引用
|
// 必须深拷贝 datas!防止多个表格共享引用
|
||||||
@@ -962,6 +966,8 @@ function setValueToField() {
|
|||||||
group.fields.forEach(field => {
|
group.fields.forEach(field => {
|
||||||
let value = getFieldValue(field)
|
let value = getFieldValue(field)
|
||||||
field.value = value
|
field.value = value
|
||||||
|
let symbol = getFieldSymbol(field)
|
||||||
|
field.symbol = symbol
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -973,6 +979,14 @@ function getFieldValue(field) {
|
|||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function getFieldSymbol(field) {
|
||||||
|
const fieldSymbol = currentSampleData.value[field.fieldIndex]?.symbol
|
||||||
|
if (fieldSymbol) {
|
||||||
|
return fieldSymbol
|
||||||
|
} else {
|
||||||
|
return '='
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const apiRequest = async url => {
|
const apiRequest = async url => {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -72,11 +72,11 @@ function togglePasswordVisibility() {
|
|||||||
onShow(() => {
|
onShow(() => {
|
||||||
//检查APP更新
|
//检查APP更新
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
// if (process.env.NODE_ENV !== 'development') {
|
if (process.env.NODE_ENV !== 'development') {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
callCheckUpdate()
|
callCheckUpdate()
|
||||||
}, 1500)
|
}, 1500)
|
||||||
// }
|
}
|
||||||
// #endif
|
// #endif
|
||||||
})
|
})
|
||||||
async function bindLogin() {
|
async function bindLogin() {
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ function handleReturnToStock() {
|
|||||||
})
|
})
|
||||||
if (res.isPrint == 1) {
|
if (res.isPrint == 1) {
|
||||||
// 执行打印
|
// 执行打印
|
||||||
nx.$print.getPrintTemplateAndPrint(res.id)
|
nx.$print.print({ ...res, printTemplate: 'returnLabel' })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed } from 'vue'
|
import { ref, computed } from 'vue'
|
||||||
import { useListData } from '@/nx/hooks/usePageListData'
|
import { useListData } from '@/nx/hooks/usePageListData'
|
||||||
|
import { onShow } from '@dcloudio/uni-app'
|
||||||
import nx from '@/nx'
|
import nx from '@/nx'
|
||||||
|
|
||||||
const list = ref(['待处理', '已处理'])
|
const list = ref(['待处理', '已处理'])
|
||||||
@@ -53,10 +54,12 @@ const searchParams = computed(() => {
|
|||||||
})
|
})
|
||||||
const { listData, scrollToLower, loadStatus, getInitData } = useListData({
|
const { listData, scrollToLower, loadStatus, getInitData } = useListData({
|
||||||
searchParams,
|
searchParams,
|
||||||
api: nx.$api.sampleWarehouse.querySampleDispatchApply,
|
api: nx.$api.sampleWarehouse.querySampleDispatchApply
|
||||||
needInitListData: true
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
onShow(()=>{
|
||||||
|
getInitData()
|
||||||
|
})
|
||||||
function handleScrolltolower() {
|
function handleScrolltolower() {
|
||||||
scrollToLower()
|
scrollToLower()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -124,10 +124,8 @@ async function getSampleDetail() {
|
|||||||
let btnLoading = ref(false)
|
let btnLoading = ref(false)
|
||||||
function handlePrint() {
|
function handlePrint() {
|
||||||
btnLoading.value = true
|
btnLoading.value = true
|
||||||
nx.$print.getPrintTemplateAndPrint(sampleData.value.id, () => {
|
nx.$print.print({ ...sampleData.value, printTemplate: 'returnLabel' })
|
||||||
uni.showToast({ title: '已打印', icon: 'success' })
|
btnLoading.value = false
|
||||||
btnLoading.value = false
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user