import request from '@/utils/request'
|
|
export function listCard(data) {
|
return request({ url: '/system/card/page', method: 'post', data })
|
}
|
|
export function getCard(cardId) {
|
return request({
|
url: '/system/card/detail',
|
method: 'post',
|
data: {
|
cardId: cardId
|
}
|
})
|
}
|
|
export function findCardEmployee(employeeName) {
|
return request({
|
url: '/system/card/employee',
|
method: 'post',
|
data: {
|
employeeName: employeeName
|
},
|
silentError: true
|
})
|
}
|
|
export function addCard(data) {
|
return request({ url: '/system/card/add', method: 'post', data })
|
}
|
|
export function updateCard(data) {
|
return request({ url: '/system/card/edit', method: 'post', data })
|
}
|
|
export function bindCard(data) {
|
return request({ url: '/system/card/bind', method: 'post', data })
|
}
|
|
export function unbindCard(data) {
|
return request({ url: '/system/card/unbind', method: 'post', data })
|
}
|
|
export function delCard(cardIds) {
|
return request({
|
url: '/system/card/delete',
|
method: 'post',
|
data: {
|
cardIds: cardIds
|
}
|
})
|
}
|
|
export function importCardData(data) {
|
return request({
|
url: '/system/card/importData',
|
method: 'post',
|
data,
|
headers: { 'Content-Type': 'multipart/form-data' }
|
})
|
}
|
|
export function exportCard(data) {
|
return request({ url: '/system/card/export', method: 'post', data, responseType: 'blob' })
|
}
|
|
export function downloadCardTemplate() {
|
return request({ url: '/system/card/importTemplate', method: 'post', responseType: 'blob' })
|
}
|