|
@@ -289,8 +289,8 @@ import { getDictionary } from '~api/other'
|
|
|
import { eVisaTaskCheckApi } from '~api/other'
|
|
|
import { getErtractInfo } from '~api/other'
|
|
|
import wbsApi from '~api/data-fill/wbs'
|
|
|
-import samplingApi from '~api/tentative/material/sampling'
|
|
|
-import { arrToId, getArrValue, getObjValue, isString } from 'js-fast-way'
|
|
|
+import commissionApi from '~api/tentative/detect/commission'
|
|
|
+import { arrToId, getArrValue, getObjVal, isNullES, isString } from 'js-fast-way'
|
|
|
import { HcDelMsg } from 'hc-vue3-ui'
|
|
|
import { toPdfPage } from '~uti/btn-auth'
|
|
|
|
|
@@ -972,6 +972,12 @@ const onmousedown = () => {
|
|
|
const isRelatedSearch = ref(false)
|
|
|
const relatedSearchClick = (row) => {
|
|
|
isRelatedSearch.value = true
|
|
|
+ //获取样品信息
|
|
|
+ getSampleList(row.id)
|
|
|
+ //获取委托单
|
|
|
+ getCommissionData(row.entrustId)
|
|
|
+ //获取关联设备
|
|
|
+ getAcquisitionData(row.loadDataId)
|
|
|
}
|
|
|
|
|
|
//样品信息
|
|
@@ -990,9 +996,13 @@ const relatedColumn1 = [
|
|
|
{ key: 'no-key', name: '样品处理' },
|
|
|
{ key: 'no-key', name: '时间(或处理原因)' },
|
|
|
]
|
|
|
-const relatedData1 = ref([
|
|
|
- {},
|
|
|
-])
|
|
|
+const relatedData1 = ref([])
|
|
|
+const getSampleList = async (id) => {
|
|
|
+ relatedData1.value = []
|
|
|
+ if (isNullES(id) || id == 0) return
|
|
|
+ const { data } = await dataApi.getSampleList({ id })
|
|
|
+ relatedData1.value = getArrValue(data)
|
|
|
+}
|
|
|
|
|
|
//委托单信息
|
|
|
const relatedColumn2 = [
|
|
@@ -1002,6 +1012,13 @@ const relatedColumn2 = [
|
|
|
{ key: 'status', name: '委托单状态', width: 120, align: 'center' },
|
|
|
]
|
|
|
const relatedData2 = ref([])
|
|
|
+const getCommissionData = async (id) => {
|
|
|
+ relatedData2.value = []
|
|
|
+ if (isNullES(id) || id == 0) return
|
|
|
+ const { data } = await commissionApi.detail(id)
|
|
|
+ const res = getObjVal(data)
|
|
|
+ relatedData2.value = res ? [res] : []
|
|
|
+}
|
|
|
|
|
|
//设备采集信息
|
|
|
const relatedColumn3 = [
|
|
@@ -1035,6 +1052,11 @@ const relatedColumn3 = [
|
|
|
{ key: 'key23', name: '试验结果是否合格', width: 100, align: 'center' },
|
|
|
]
|
|
|
const relatedData3 = ref([])
|
|
|
+const getAcquisitionData = async () => {
|
|
|
+ relatedData3.value = []
|
|
|
+ if (isNullES(id) || id == 0) return
|
|
|
+ console.log(11)
|
|
|
+}
|
|
|
|
|
|
//关闭关联查阅
|
|
|
const relatedSearchModalClose = () => {
|