feat(repair): implement frontend API and Vue pages for repair management

This commit is contained in:
DXC
2026-04-08 18:58:53 +08:00
parent 41b5118ecd
commit 7f2b9bc7ce
2 changed files with 500 additions and 0 deletions

View File

@ -0,0 +1,53 @@
import request from '@/utils/request'
// 1. 获取维修单列表
export function getRepairList(params: any) {
return request({
url: '/inbound/repair/list',
method: 'get',
params
})
}
// 2. 新增维修单
export function createRepair(data: any) {
return request({
url: '/inbound/repair/submit',
method: 'post',
data
})
}
// 3. 更新维修单
export function updateRepair(id: number, data: any) {
return request({
url: `/inbound/repair/${id}`,
method: 'put',
data
})
}
// 4. 更新维修状态
export function updateRepairStatus(data: any) {
return request({
url: '/inbound/repair/update-status',
method: 'post',
data
})
}
// 5. 删除维修单
export function deleteRepair(id: number) {
return request({
url: `/inbound/repair/${id}`,
method: 'delete'
})
}
// 6. 获取维修单详情
export function getRepairDetail(id: number) {
return request({
url: `/inbound/repair/${id}`,
method: 'get'
})
}