diff --git a/src/api/customer/sampleList.ts b/src/api/customer/sampleList.ts new file mode 100644 index 0000000..44338aa --- /dev/null +++ b/src/api/customer/sampleList.ts @@ -0,0 +1,34 @@ +/** + * 样品列表接口 + */ +import request from '../index' +import type { ISampleListQuery } from '@/views/customer/sample/list/sample_list_interface' +const prefix = '/meter' + +// 列表查询 +export function getSampleList(data: ISampleListQuery) { + return request({ + url: `${prefix}/sample/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function deleteSample(data: { id: string }) { + return request({ + url: `${prefix}/sample/delete`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSapmleList(data: Omit) { + return request({ + url: `${prefix}/sample/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} diff --git a/src/api/customer/sampleList.ts b/src/api/customer/sampleList.ts new file mode 100644 index 0000000..44338aa --- /dev/null +++ b/src/api/customer/sampleList.ts @@ -0,0 +1,34 @@ +/** + * 样品列表接口 + */ +import request from '../index' +import type { ISampleListQuery } from '@/views/customer/sample/list/sample_list_interface' +const prefix = '/meter' + +// 列表查询 +export function getSampleList(data: ISampleListQuery) { + return request({ + url: `${prefix}/sample/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function deleteSample(data: { id: string }) { + return request({ + url: `${prefix}/sample/delete`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSapmleList(data: Omit) { + return request({ + url: `${prefix}/sample/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue index 63155b8..79f4348 100644 --- a/src/views/customer/sample/list/list.vue +++ b/src/views/customer/sample/list/list.vue @@ -1,3 +1,333 @@ + + + + diff --git a/src/api/customer/sampleList.ts b/src/api/customer/sampleList.ts new file mode 100644 index 0000000..44338aa --- /dev/null +++ b/src/api/customer/sampleList.ts @@ -0,0 +1,34 @@ +/** + * 样品列表接口 + */ +import request from '../index' +import type { ISampleListQuery } from '@/views/customer/sample/list/sample_list_interface' +const prefix = '/meter' + +// 列表查询 +export function getSampleList(data: ISampleListQuery) { + return request({ + url: `${prefix}/sample/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 数据删除 +export function deleteSample(data: { id: string }) { + return request({ + url: `${prefix}/sample/delete`, + method: 'post', + data, + }) +} + +// 导出列表 +export function exportSapmleList(data: Omit) { + return request({ + url: `${prefix}/sample/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} diff --git a/src/views/customer/sample/list/list.vue b/src/views/customer/sample/list/list.vue index 63155b8..79f4348 100644 --- a/src/views/customer/sample/list/list.vue +++ b/src/views/customer/sample/list/list.vue @@ -1,3 +1,333 @@ + + + + diff --git a/src/views/customer/sample/list/sample_list_interface.ts b/src/views/customer/sample/list/sample_list_interface.ts new file mode 100644 index 0000000..1d81f8b --- /dev/null +++ b/src/views/customer/sample/list/sample_list_interface.ts @@ -0,0 +1,24 @@ +export interface ISampleListQuery { + sampleNo: string // 样品编号 + sampleName: string // 样品名称 + sampleModel: string // 型号 + customerId: string // 委托方代码 + customerName: string // 委托方名称 + startTime: string // 投诉开始时间 + endTime: string // 投诉结束时间 + offset: number + limit: number +} + +export interface ISampleList { + id?: string // 样品唯一标识 + sampleNo: string // 样品编号 + sampleName: string // 样品名称 + sampleModel: string // 型号 + evaluationName: string // 出厂编号 + customerId: string // 委托方代码 + customerName: string // 委托方名称 + mesurePeriod: string // 检定周期 + effectiveDate: string // 上次检定时间 + remark: string // 备注 +}