feat: migrate planning batch management modules
Some checks failed
Release pipeline / publish (push) Has been cancelled
Release pipeline / Always run job (push) Has been cancelled

- 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:
sheng
2026-06-22 14:13:01 +08:00
parent 3f546564cc
commit b44e031e74
11 changed files with 2553 additions and 652 deletions

View 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)
})
}

View 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)
})
}

View 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)
})
}

View 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
}
})
}