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.
 
 
 

65 lines
1.7 KiB

import request from '@/config/axios'
export interface BarcodeVO {
id: number
code: string
name: string
description: string
order: number
length: number
prefixLenght: number
prefixChar: string
entityProperties: string
encyptMethod: string
masterId: number
trimEnd: string
isEncypt: string,
labelType: string,
}
// 查询条码片段列表
export const getBarcodePage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/label/barcode/senior', data })
} else {
return await request.get({ url: `/label/barcode/page`, params })
}
}
// 查询条码片段详情
export const getBarcode = async (id: number) => {
return await request.get({ url: `/label/barcode/get?id=` + id })
}
// 新增条码片段
export const createBarcode = async (data: BarcodeVO) => {
return await request.post({ url: `/label/barcode/create`, data })
}
// 修改条码片段
export const updateBarcode = async (data: BarcodeVO) => {
return await request.put({ url: `/label/barcode/update`, data })
}
// 删除条码片段
export const deleteBarcode = async (id: number) => {
return await request.delete({ url: `/label/barcode/delete?id=` + id })
}
// 导出条码片段 Excel
export const exportBarcode = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.downloadPost({ url: '/label/barcode/export-excel-senior', data })
} else {
return await request.download({ url: `/label/barcode/export-excel`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/label/barcode/get-import-template' })
}