You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.5 KiB
50 lines
1.5 KiB
import request from '@/config/axios'
|
|
|
|
export interface SamplingSchemeVO {
|
|
id: number
|
|
code: string
|
|
describe: string
|
|
status: string
|
|
available: string
|
|
}
|
|
|
|
// 查询采样方案列表
|
|
export const getSamplingSchemePage = async (params) => {
|
|
if (params.isSearch) {
|
|
delete params.isSearch
|
|
const data = {...params}
|
|
return await request.post({ url: '/qms/sampling-scheme/senior', data })
|
|
} else {
|
|
return await request.get({ url: `/qms/sampling-scheme/page`, params })
|
|
}
|
|
}
|
|
|
|
// 查询采样方案详情
|
|
export const getSamplingScheme = async (id: number) => {
|
|
return await request.get({ url: `/qms/sampling-scheme/get?id=` + id })
|
|
}
|
|
|
|
// 新增采样方案
|
|
export const createSamplingScheme = async (data: SamplingSchemeVO) => {
|
|
return await request.post({ url: `/basic/sampling-scheme/create`, data })
|
|
}
|
|
|
|
// 修改采样方案
|
|
export const updateSamplingScheme = async (data: SamplingSchemeVO) => {
|
|
return await request.put({ url: `/basic/sampling-scheme/update`, data })
|
|
}
|
|
|
|
// 删除采样方案
|
|
export const deleteSamplingScheme = async (id: number) => {
|
|
return await request.delete({ url: `/basic/sampling-scheme/delete?id=` + id })
|
|
}
|
|
|
|
// 导出采样方案 Excel
|
|
export const exportSamplingScheme = async (params) => {
|
|
return await request.download({ url: `/basic/sampling-scheme/export-excel`, params })
|
|
}
|
|
|
|
// 下载用户导入模板
|
|
export const importTemplate = () => {
|
|
return request.download({ url: '/basic/sampling-scheme/get-import-template' })
|
|
}
|
|
|