diff --git a/.env.development b/.env.development index aaa71a7..742f90b 100644 --- a/.env.development +++ b/.env.development @@ -5,6 +5,7 @@ # VITE_APP_API_BASEURL = http://111.198.10.15:21409 VITE_APP_API_BASEURL = http://111.198.10.15:21609 # VITE_APP_API_BASEURL = http://192.168.83.213:8085 +# VITE_APP_API_BASEURL = http://192.168.83.30:5909 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/.env.development b/.env.development index aaa71a7..742f90b 100644 --- a/.env.development +++ b/.env.development @@ -5,6 +5,7 @@ # VITE_APP_API_BASEURL = http://111.198.10.15:21409 VITE_APP_API_BASEURL = http://111.198.10.15:21609 # VITE_APP_API_BASEURL = http://192.168.83.213:8085 +# VITE_APP_API_BASEURL = http://192.168.83.30:5909 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/src/api/business/lab/primitiveLogList.ts b/src/api/business/lab/primitiveLogList.ts index f8143b7..95eb183 100644 --- a/src/api/business/lab/primitiveLogList.ts +++ b/src/api/business/lab/primitiveLogList.ts @@ -2,7 +2,7 @@ * 原始记录接口 */ import request from '../../index' -import type { IListQuery } from '@/views/business/lab/primitiveLog/primitiveLogList' +import type { IListQuery, IListQuerySample } from '@/views/business/lab/primitiveLog/primitiveLogList' const prefix = '/business/originalRecord' // 列表查询 @@ -60,3 +60,12 @@ }) } +// 根据委托单id查询关联样品信息(分页) +export function getSamplesByOderId(data: IListQuerySample) { + return request({ + url: `${prefix}/samplesByOderId?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + diff --git a/.env.development b/.env.development index aaa71a7..742f90b 100644 --- a/.env.development +++ b/.env.development @@ -5,6 +5,7 @@ # VITE_APP_API_BASEURL = http://111.198.10.15:21409 VITE_APP_API_BASEURL = http://111.198.10.15:21609 # VITE_APP_API_BASEURL = http://192.168.83.213:8085 +# VITE_APP_API_BASEURL = http://192.168.83.30:5909 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/src/api/business/lab/primitiveLogList.ts b/src/api/business/lab/primitiveLogList.ts index f8143b7..95eb183 100644 --- a/src/api/business/lab/primitiveLogList.ts +++ b/src/api/business/lab/primitiveLogList.ts @@ -2,7 +2,7 @@ * 原始记录接口 */ import request from '../../index' -import type { IListQuery } from '@/views/business/lab/primitiveLog/primitiveLogList' +import type { IListQuery, IListQuerySample } from '@/views/business/lab/primitiveLog/primitiveLogList' const prefix = '/business/originalRecord' // 列表查询 @@ -60,3 +60,12 @@ }) } +// 根据委托单id查询关联样品信息(分页) +export function getSamplesByOderId(data: IListQuerySample) { + return request({ + url: `${prefix}/samplesByOderId?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + diff --git a/src/api/business/lab/report.ts b/src/api/business/lab/report.ts index a027580..0e05759 100644 --- a/src/api/business/lab/report.ts +++ b/src/api/business/lab/report.ts @@ -42,14 +42,14 @@ }) } -// // 新建 -// export function addPrimitiveLog(data: any) { -// return request({ -// url: `${prefix}/add`, -// method: 'post', -// data, -// }) -// } +// 新建 +export function addReport(data: any) { + return request({ + url: `${prefix}/save`, + method: 'post', + data, + }) +} // // 编辑 // export function updatePrimitiveLog(data: any) { diff --git a/.env.development b/.env.development index aaa71a7..742f90b 100644 --- a/.env.development +++ b/.env.development @@ -5,6 +5,7 @@ # VITE_APP_API_BASEURL = http://111.198.10.15:21409 VITE_APP_API_BASEURL = http://111.198.10.15:21609 # VITE_APP_API_BASEURL = http://192.168.83.213:8085 +# VITE_APP_API_BASEURL = http://192.168.83.30:5909 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/src/api/business/lab/primitiveLogList.ts b/src/api/business/lab/primitiveLogList.ts index f8143b7..95eb183 100644 --- a/src/api/business/lab/primitiveLogList.ts +++ b/src/api/business/lab/primitiveLogList.ts @@ -2,7 +2,7 @@ * 原始记录接口 */ import request from '../../index' -import type { IListQuery } from '@/views/business/lab/primitiveLog/primitiveLogList' +import type { IListQuery, IListQuerySample } from '@/views/business/lab/primitiveLog/primitiveLogList' const prefix = '/business/originalRecord' // 列表查询 @@ -60,3 +60,12 @@ }) } +// 根据委托单id查询关联样品信息(分页) +export function getSamplesByOderId(data: IListQuerySample) { + return request({ + url: `${prefix}/samplesByOderId?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + diff --git a/src/api/business/lab/report.ts b/src/api/business/lab/report.ts index a027580..0e05759 100644 --- a/src/api/business/lab/report.ts +++ b/src/api/business/lab/report.ts @@ -42,14 +42,14 @@ }) } -// // 新建 -// export function addPrimitiveLog(data: any) { -// return request({ -// url: `${prefix}/add`, -// method: 'post', -// data, -// }) -// } +// 新建 +export function addReport(data: any) { + return request({ + url: `${prefix}/save`, + method: 'post', + data, + }) +} // // 编辑 // export function updatePrimitiveLog(data: any) { diff --git a/src/api/customer/sampleList.ts b/src/api/customer/sampleList.ts index 21a9c9e..214ab71 100644 --- a/src/api/customer/sampleList.ts +++ b/src/api/customer/sampleList.ts @@ -60,7 +60,7 @@ } // 查询检定记录 -export function getMesureRecords(data: { id: string }) { +export function getMesureRecords(data: { customerId?: string; sampleId?: string }) { return request({ url: `${prefix}/sample/mesureRecordsBySampleId`, method: 'post', diff --git a/.env.development b/.env.development index aaa71a7..742f90b 100644 --- a/.env.development +++ b/.env.development @@ -5,6 +5,7 @@ # VITE_APP_API_BASEURL = http://111.198.10.15:21409 VITE_APP_API_BASEURL = http://111.198.10.15:21609 # VITE_APP_API_BASEURL = http://192.168.83.213:8085 +# VITE_APP_API_BASEURL = http://192.168.83.30:5909 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/src/api/business/lab/primitiveLogList.ts b/src/api/business/lab/primitiveLogList.ts index f8143b7..95eb183 100644 --- a/src/api/business/lab/primitiveLogList.ts +++ b/src/api/business/lab/primitiveLogList.ts @@ -2,7 +2,7 @@ * 原始记录接口 */ import request from '../../index' -import type { IListQuery } from '@/views/business/lab/primitiveLog/primitiveLogList' +import type { IListQuery, IListQuerySample } from '@/views/business/lab/primitiveLog/primitiveLogList' const prefix = '/business/originalRecord' // 列表查询 @@ -60,3 +60,12 @@ }) } +// 根据委托单id查询关联样品信息(分页) +export function getSamplesByOderId(data: IListQuerySample) { + return request({ + url: `${prefix}/samplesByOderId?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + diff --git a/src/api/business/lab/report.ts b/src/api/business/lab/report.ts index a027580..0e05759 100644 --- a/src/api/business/lab/report.ts +++ b/src/api/business/lab/report.ts @@ -42,14 +42,14 @@ }) } -// // 新建 -// export function addPrimitiveLog(data: any) { -// return request({ -// url: `${prefix}/add`, -// method: 'post', -// data, -// }) -// } +// 新建 +export function addReport(data: any) { + return request({ + url: `${prefix}/save`, + method: 'post', + data, + }) +} // // 编辑 // export function updatePrimitiveLog(data: any) { diff --git a/src/api/customer/sampleList.ts b/src/api/customer/sampleList.ts index 21a9c9e..214ab71 100644 --- a/src/api/customer/sampleList.ts +++ b/src/api/customer/sampleList.ts @@ -60,7 +60,7 @@ } // 查询检定记录 -export function getMesureRecords(data: { id: string }) { +export function getMesureRecords(data: { customerId?: string; sampleId?: string }) { return request({ url: `${prefix}/sample/mesureRecordsBySampleId`, method: 'post', diff --git a/src/views/business/lab/components/selectSample.vue b/src/views/business/lab/components/selectSample.vue index 6ff117e..e21a8dc 100644 --- a/src/views/business/lab/components/selectSample.vue +++ b/src/views/business/lab/components/selectSample.vue @@ -3,10 +3,10 @@ import { ref } from 'vue' import type { Ref } from 'vue' import { ElMessage } from 'element-plus' -import type { ISampleListQuery } from '@/views/business/schedule/interchangeReceipt/receiptList-interface' +import type { IListQuerySample } from '@/views/business/lab/primitiveLog/primitiveLogList' import type { ISampleList } from '@/views/customer/sample/list/sample_list_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { getSampleList } from '@/api/business/schedule/interchangeReceipt' +import { getSamplesByOderId } from '@/api/business/lab/primitiveLogList' const props = defineProps({ visible: { @@ -17,14 +17,23 @@ type: String, default: '', }, + orderId: { + type: String, + default: '', + }, }) const emits = defineEmits(['changeVisible', 'clickConfirmSample']) // 查询条件 -const listQuery: Ref = ref({ +const listQuery: Ref = ref({ + id: '', // 原始记录单id----(在这里后端要求传委托书id) + manufacturingNo: '', // 出厂编号 + measureCategory: '', // 校验类别 + originalRecordCode: '', // 原始记录单编号 + sampleModel: '', // 样品型号 + sampleName: '', // 样品名称 + sampleNo: '', // 样品编号 customerId: '', // 委托方id - sampleName: '', // 样品名称 - sampleNo: '', // 样品编号 offset: 1, limit: 20, }) @@ -58,13 +67,9 @@ listQuery.value.offset = 1 } listQuery.value.customerId = props.customerId - getSampleList(listQuery.value).then((response) => { - list.value = response.data.rows.map((item: any) => { - return { - ...item, - id: item.sampleId, - } - }) + listQuery.value.id = props.orderId + getSamplesByOderId(listQuery.value).then((response) => { + list.value = response.data.rows total.value = parseInt(response.data.total) loadingTable.value = false }) @@ -86,9 +91,14 @@ // 点击重置 const clearList = () => { listQuery.value = { + id: '', // 原始记录单id----(在这里后端要求传委托书id) + manufacturingNo: '', // 出厂编号 + measureCategory: '', // 校验类别 + originalRecordCode: '', // 原始记录单编号 + sampleModel: '', // 样品型号 + sampleName: '', // 样品名称 + sampleNo: '', // 样品编号 customerId: '', // 委托方id - sampleName: '', // 样品名称 - sampleNo: '', // 样品编号 offset: 1, limit: 20, } @@ -162,7 +172,7 @@ is-showmulti-select :is-multi="false" @change="changePage" - @multiSelect="handleSelectionChange" + @multi-select="handleSelectionChange" >