diff --git a/src/api/business/schedule/interchangeReceipt.ts b/src/api/business/schedule/interchangeReceipt.ts index 03edba9..574d62e 100644 --- a/src/api/business/schedule/interchangeReceipt.ts +++ b/src/api/business/schedule/interchangeReceipt.ts @@ -2,7 +2,7 @@ * 设备交接单 */ import request from '../../index' -import type { IListQuery } from '@/views/business/schedule/interchangeReceipt/receiptList-interface' +import type { IListQuery, ISampleListQuery } from '@/views/business/schedule/interchangeReceipt/receiptList-interface' const prefix = '/business/interchange' // 列表查询 @@ -60,3 +60,12 @@ }) } +// 关联委托书的且是已收入的样品的列表 +export function getSampleList(data: ISampleListQuery) { + return request({ + url: `${prefix}/sampleList?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + diff --git a/src/api/business/schedule/interchangeReceipt.ts b/src/api/business/schedule/interchangeReceipt.ts index 03edba9..574d62e 100644 --- a/src/api/business/schedule/interchangeReceipt.ts +++ b/src/api/business/schedule/interchangeReceipt.ts @@ -2,7 +2,7 @@ * 设备交接单 */ import request from '../../index' -import type { IListQuery } from '@/views/business/schedule/interchangeReceipt/receiptList-interface' +import type { IListQuery, ISampleListQuery } from '@/views/business/schedule/interchangeReceipt/receiptList-interface' const prefix = '/business/interchange' // 列表查询 @@ -60,3 +60,12 @@ }) } +// 关联委托书的且是已收入的样品的列表 +export function getSampleList(data: ISampleListQuery) { + return request({ + url: `${prefix}/sampleList?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index cb0fbc2..8745c27 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -93,6 +93,7 @@ } const columnsChecked: Ref = ref([]) const table = ref>() +const singleChecked = ref('') // 单选选中id // 初始化列显示状态 function initColumnsState() { columnsChecked.value = [] @@ -145,6 +146,11 @@ const handleSelectionChange = (val: any) => { emit('multiSelect', val) } +// 单选选中 +const radioChange = () => { + const checkValue = props.data.find((item: any) => item.id == singleChecked.value) + emit('multiSelect', [checkValue]) +} // 清除多选选中 const clearMulti = () => { console.log('清理选中') @@ -170,7 +176,7 @@