feat: migrate planning batch management modules
- migrate batch list, tray tracking, and batch defect report pages to V2 - add planning production APIs, workerman helper, routes, and i18n entries - add markdown migration task list generated from the Webman function matrix
This commit is contained in:
59
src/api/planning-production/batch-list.js
Normal file
59
src/api/planning-production/batch-list.js
Normal file
@@ -0,0 +1,59 @@
|
||||
import { request } from '@/api/_service'
|
||||
|
||||
const BASE = 'planning_production/production_batch_management/batch/'
|
||||
|
||||
function apiParams (method, data = {}) {
|
||||
return {
|
||||
method: `planning_production_production_batch_management_batch_${method}`,
|
||||
platform: 'background',
|
||||
...data
|
||||
}
|
||||
}
|
||||
|
||||
export function getBatchAll (data) {
|
||||
return request({
|
||||
url: BASE + 'all',
|
||||
method: 'get',
|
||||
params: apiParams('all', data)
|
||||
})
|
||||
}
|
||||
|
||||
export function getBatchList (data) {
|
||||
return request({
|
||||
url: BASE + 'list',
|
||||
method: 'get',
|
||||
params: apiParams('list', data)
|
||||
})
|
||||
}
|
||||
|
||||
export function createBatch (data) {
|
||||
return request({
|
||||
url: BASE + 'create',
|
||||
method: 'post',
|
||||
data: apiParams('create', data)
|
||||
})
|
||||
}
|
||||
|
||||
export function editBatch (data) {
|
||||
return request({
|
||||
url: BASE + 'edit',
|
||||
method: 'put',
|
||||
data: apiParams('edit', data)
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteBatch (data) {
|
||||
return request({
|
||||
url: BASE + 'delete',
|
||||
method: 'delete',
|
||||
data: apiParams('delete', data)
|
||||
})
|
||||
}
|
||||
|
||||
export function getProcessBatch (data) {
|
||||
return request({
|
||||
url: BASE + 'getProcessBatch',
|
||||
method: 'post',
|
||||
data: apiParams('getProcessBatch', data)
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user