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:
27
src/api/planning-production/batch-defect-report.js
Normal file
27
src/api/planning-production/batch-defect-report.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import { request } from '@/api/_service'
|
||||
|
||||
const BASE = 'planning_production/production_batch_management/report/'
|
||||
|
||||
function apiParams (method, data = {}) {
|
||||
return {
|
||||
method,
|
||||
platform: 'background',
|
||||
...data
|
||||
}
|
||||
}
|
||||
|
||||
export function getBatchDefectReport (data) {
|
||||
return request({
|
||||
url: BASE + 'bad',
|
||||
method: 'get',
|
||||
params: apiParams('planning_production_production_batch_management_batch_bad', data)
|
||||
})
|
||||
}
|
||||
|
||||
export function exportBatchDefectReport (data) {
|
||||
return request({
|
||||
url: BASE + 'export',
|
||||
method: 'get',
|
||||
params: apiParams('planning_production_production_batch_management_batch_export', data)
|
||||
})
|
||||
}
|
||||
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)
|
||||
})
|
||||
}
|
||||
43
src/api/planning-production/batch-tray.js
Normal file
43
src/api/planning-production/batch-tray.js
Normal file
@@ -0,0 +1,43 @@
|
||||
import { request } from '@/api/_service'
|
||||
|
||||
const BASE = 'planning_production/production_batch_management/batch_tray/'
|
||||
|
||||
function apiParams (method, data = {}) {
|
||||
return {
|
||||
method: `planning_production_production_batch_management_batch_tray_${method}`,
|
||||
platform: 'background',
|
||||
...data
|
||||
}
|
||||
}
|
||||
|
||||
export function getBatchTrayList (data) {
|
||||
return request({
|
||||
url: BASE + 'list',
|
||||
method: 'get',
|
||||
params: apiParams('list', data)
|
||||
})
|
||||
}
|
||||
|
||||
export function trayUnbinding (data) {
|
||||
return request({
|
||||
url: BASE + 'unbinding',
|
||||
method: 'get',
|
||||
params: apiParams('unbinding', data)
|
||||
})
|
||||
}
|
||||
|
||||
export function trayInactivity (data) {
|
||||
return request({
|
||||
url: BASE + 'inactivity',
|
||||
method: 'get',
|
||||
params: apiParams('inactivity', data)
|
||||
})
|
||||
}
|
||||
|
||||
export function getBatteryParam (data) {
|
||||
return request({
|
||||
url: BASE + 'get_battery_param',
|
||||
method: 'get',
|
||||
params: apiParams('get_battery_param', data)
|
||||
})
|
||||
}
|
||||
15
src/api/production-master-data/workerman/index.js
Normal file
15
src/api/production-master-data/workerman/index.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import { request } from '@/api/_service'
|
||||
|
||||
const BASE = 'production_configuration/workerman/'
|
||||
|
||||
export function sendWorkerman (data) {
|
||||
return request({
|
||||
url: BASE + 'send',
|
||||
method: 'get',
|
||||
params: {
|
||||
method: 'planning_production_produce_traymanage_send_workerman',
|
||||
module: 'api',
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user