commit
cfbd13289f
|
|
@ -65,5 +65,6 @@ const useVbenForm = useForm<ComponentType, ComponentPropsMap>;
|
||||||
|
|
||||||
export { initSetupVbenForm, useVbenForm, z };
|
export { initSetupVbenForm, useVbenForm, z };
|
||||||
|
|
||||||
|
export type VbenFormApi = ReturnType<typeof useVbenForm>[1]; // add by 芋艿:用于 data.ts 表单 schema 内调用 setFieldValue
|
||||||
export type VbenFormSchema = FormSchema<ComponentType, ComponentPropsMap>;
|
export type VbenFormSchema = FormSchema<ComponentType, ComponentPropsMap>;
|
||||||
export type VbenFormProps = FormProps<ComponentType, ComponentPropsMap>;
|
export type VbenFormProps = FormProps<ComponentType, ComponentPropsMap>;
|
||||||
|
|
|
||||||
|
|
@ -3,37 +3,21 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace AlertConfigApi {
|
export namespace AlertConfigApi {
|
||||||
/** IoT 告警配置 VO */
|
/** IoT 告警配置 */
|
||||||
export interface AlertConfig {
|
export interface AlertConfig {
|
||||||
id?: number;
|
id?: number;
|
||||||
name: string;
|
name?: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
level?: number;
|
level?: number;
|
||||||
status?: number;
|
status?: number;
|
||||||
sceneRuleIds?: number[];
|
sceneRuleIds?: number[];
|
||||||
receiveUserIds?: number[];
|
receiveUserIds?: number[];
|
||||||
receiveUserNames?: string;
|
receiveUserNames?: string[];
|
||||||
receiveTypes?: number[];
|
receiveTypes?: number[];
|
||||||
createTime?: Date;
|
createTime?: Date;
|
||||||
updateTime?: Date;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** IoT 告警配置 */
|
|
||||||
export interface AlertConfig {
|
|
||||||
id?: number;
|
|
||||||
name?: string;
|
|
||||||
description?: string;
|
|
||||||
level?: number;
|
|
||||||
status?: number;
|
|
||||||
sceneRuleIds?: number[];
|
|
||||||
receiveUserIds?: number[];
|
|
||||||
receiveUserNames?: string;
|
|
||||||
receiveTypes?: number[];
|
|
||||||
createTime?: Date;
|
|
||||||
updateTime?: Date;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 查询告警配置分页 */
|
/** 查询告警配置分页 */
|
||||||
export function getAlertConfigPage(params: PageParam) {
|
export function getAlertConfigPage(params: PageParam) {
|
||||||
return requestClient.get<PageResult<AlertConfigApi.AlertConfig>>(
|
return requestClient.get<PageResult<AlertConfigApi.AlertConfig>>(
|
||||||
|
|
@ -49,20 +33,20 @@ export function getAlertConfig(id: number) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查询所有告警配置列表 */
|
/** 获取告警配置简单列表 */
|
||||||
export function getAlertConfigList() {
|
export function getSimpleAlertConfigList() {
|
||||||
return requestClient.get<AlertConfigApi.AlertConfig[]>(
|
return requestClient.get<AlertConfigApi.AlertConfig[]>(
|
||||||
'/iot/alert-config/list',
|
'/iot/alert-config/simple-list',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 新增告警配置 */
|
/** 新增告警配置 */
|
||||||
export function createAlertConfig(data: AlertConfig) {
|
export function createAlertConfig(data: AlertConfigApi.AlertConfig) {
|
||||||
return requestClient.post('/iot/alert-config/create', data);
|
return requestClient.post('/iot/alert-config/create', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 修改告警配置 */
|
/** 修改告警配置 */
|
||||||
export function updateAlertConfig(data: AlertConfig) {
|
export function updateAlertConfig(data: AlertConfigApi.AlertConfig) {
|
||||||
return requestClient.put('/iot/alert-config/update', data);
|
return requestClient.put('/iot/alert-config/update', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -70,25 +54,3 @@ export function updateAlertConfig(data: AlertConfig) {
|
||||||
export function deleteAlertConfig(id: number) {
|
export function deleteAlertConfig(id: number) {
|
||||||
return requestClient.delete(`/iot/alert-config/delete?id=${id}`);
|
return requestClient.delete(`/iot/alert-config/delete?id=${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 批量删除告警配置 */
|
|
||||||
export function deleteAlertConfigList(ids: number[]) {
|
|
||||||
return requestClient.delete('/iot/alert-config/delete-list', {
|
|
||||||
params: { ids: ids.join(',') },
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 启用/禁用告警配置 */
|
|
||||||
export function toggleAlertConfig(id: number, enabled: boolean) {
|
|
||||||
return requestClient.put(`/iot/alert-config/toggle`, {
|
|
||||||
id,
|
|
||||||
enabled,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 获取告警配置简单列表 */
|
|
||||||
export function getSimpleAlertConfigList() {
|
|
||||||
return requestClient.get<AlertConfigApi.AlertConfig[]>(
|
|
||||||
'/iot/alert-config/simple-list',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -3,41 +3,21 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace AlertRecordApi {
|
export namespace AlertRecordApi {
|
||||||
/** IoT 告警记录 VO */
|
/** IoT 告警记录 */
|
||||||
export interface AlertRecord {
|
export interface AlertRecord {
|
||||||
id?: number;
|
id?: number;
|
||||||
configId?: number;
|
configId?: number;
|
||||||
configName?: string;
|
configName?: string;
|
||||||
configLevel?: number;
|
configLevel?: number;
|
||||||
deviceId?: number;
|
deviceId?: number;
|
||||||
deviceName?: string;
|
|
||||||
productId?: number;
|
productId?: number;
|
||||||
productName?: string;
|
deviceMessage?: any;
|
||||||
deviceMessage?: string;
|
|
||||||
processStatus?: boolean;
|
processStatus?: boolean;
|
||||||
processRemark?: string;
|
processRemark?: string;
|
||||||
processTime?: Date;
|
|
||||||
createTime?: Date;
|
createTime?: Date;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** IoT 告警记录 */
|
|
||||||
export interface AlertRecord {
|
|
||||||
id?: number;
|
|
||||||
configId?: number;
|
|
||||||
configName?: string;
|
|
||||||
configLevel?: number;
|
|
||||||
deviceId?: number;
|
|
||||||
deviceName?: string;
|
|
||||||
productId?: number;
|
|
||||||
productName?: string;
|
|
||||||
deviceMessage?: string;
|
|
||||||
processStatus?: boolean;
|
|
||||||
processRemark?: string;
|
|
||||||
processTime?: Date;
|
|
||||||
createTime?: Date;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 查询告警记录分页 */
|
/** 查询告警记录分页 */
|
||||||
export function getAlertRecordPage(params: PageParam) {
|
export function getAlertRecordPage(params: PageParam) {
|
||||||
return requestClient.get<PageResult<AlertRecordApi.AlertRecord>>(
|
return requestClient.get<PageResult<AlertRecordApi.AlertRecord>>(
|
||||||
|
|
@ -54,29 +34,9 @@ export function getAlertRecord(id: number) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 处理告警记录 */
|
/** 处理告警记录 */
|
||||||
export function processAlertRecord(id: number, remark?: string) {
|
export function processAlertRecord(id: number, processRemark?: string) {
|
||||||
return requestClient.put('/iot/alert-record/process', {
|
return requestClient.put('/iot/alert-record/process', {
|
||||||
id,
|
id,
|
||||||
remark,
|
processRemark,
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 批量处理告警记录 */
|
|
||||||
export function batchProcessAlertRecord(ids: number[], remark?: string) {
|
|
||||||
return requestClient.put('/iot/alert-record/batch-process', {
|
|
||||||
ids,
|
|
||||||
remark,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 删除告警记录 */
|
|
||||||
export function deleteAlertRecord(id: number) {
|
|
||||||
return requestClient.delete(`/iot/alert-record/delete?id=${id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 批量删除告警记录 */
|
|
||||||
export function deleteAlertRecordList(ids: number[]) {
|
|
||||||
return requestClient.delete('/iot/alert-record/delete-list', {
|
|
||||||
params: { ids: ids.join(',') },
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -150,11 +150,8 @@ export function importDeviceTemplate() {
|
||||||
/** 导入设备 */
|
/** 导入设备 */
|
||||||
export function importDevice(file: File, updateSupport: boolean) {
|
export function importDevice(file: File, updateSupport: boolean) {
|
||||||
return requestClient.upload<IotDeviceApi.DeviceImportRespVO>(
|
return requestClient.upload<IotDeviceApi.DeviceImportRespVO>(
|
||||||
'/iot/device/import',
|
`/iot/device/import?updateSupport=${updateSupport}`,
|
||||||
{
|
{ file },
|
||||||
file,
|
|
||||||
updateSupport,
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -168,7 +165,7 @@ export function getLatestDeviceProperties(params: any) {
|
||||||
|
|
||||||
/** 获取设备属性历史数据 */
|
/** 获取设备属性历史数据 */
|
||||||
export function getHistoryDevicePropertyList(params: any) {
|
export function getHistoryDevicePropertyList(params: any) {
|
||||||
return requestClient.get<PageResult<IotDeviceApi.DeviceProperty>>(
|
return requestClient.get<IotDeviceApi.DeviceProperty[]>(
|
||||||
'/iot/device/property/history-list',
|
'/iot/device/property/history-list',
|
||||||
{ params },
|
{ params },
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -3,39 +3,22 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace IoTOtaFirmwareApi {
|
export namespace IoTOtaFirmwareApi {
|
||||||
/** IoT OTA 固件 VO */
|
/** IoT OTA 固件信息 */
|
||||||
export interface Firmware {
|
export interface Firmware {
|
||||||
id?: number;
|
id?: number;
|
||||||
name: string;
|
name?: string;
|
||||||
version: string;
|
|
||||||
productId: number;
|
|
||||||
productName?: string;
|
|
||||||
description?: string;
|
description?: string;
|
||||||
|
version?: string;
|
||||||
|
productId?: number;
|
||||||
|
productName?: string;
|
||||||
fileUrl?: string;
|
fileUrl?: string;
|
||||||
fileMd5?: string;
|
|
||||||
fileSize?: number;
|
fileSize?: number;
|
||||||
status?: number;
|
fileDigestAlgorithm?: string;
|
||||||
|
fileDigestValue?: string;
|
||||||
createTime?: Date;
|
createTime?: Date;
|
||||||
updateTime?: Date;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** IoT OTA 固件 */
|
|
||||||
export interface IoTOtaFirmware {
|
|
||||||
id?: number;
|
|
||||||
name?: string;
|
|
||||||
version?: string;
|
|
||||||
productId?: number;
|
|
||||||
productName?: string;
|
|
||||||
description?: string;
|
|
||||||
fileUrl?: string;
|
|
||||||
fileMd5?: string;
|
|
||||||
fileSize?: number;
|
|
||||||
status?: number;
|
|
||||||
createTime?: Date;
|
|
||||||
updateTime?: Date;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 查询 OTA 固件分页 */
|
/** 查询 OTA 固件分页 */
|
||||||
export function getOtaFirmwarePage(params: PageParam) {
|
export function getOtaFirmwarePage(params: PageParam) {
|
||||||
return requestClient.get<PageResult<IoTOtaFirmwareApi.Firmware>>(
|
return requestClient.get<PageResult<IoTOtaFirmwareApi.Firmware>>(
|
||||||
|
|
@ -52,12 +35,12 @@ export function getOtaFirmware(id: number) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 新增 OTA 固件 */
|
/** 新增 OTA 固件 */
|
||||||
export function createOtaFirmware(data: IoTOtaFirmware) {
|
export function createOtaFirmware(data: IoTOtaFirmwareApi.Firmware) {
|
||||||
return requestClient.post('/iot/ota/firmware/create', data);
|
return requestClient.post('/iot/ota/firmware/create', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 修改 OTA 固件 */
|
/** 修改 OTA 固件 */
|
||||||
export function updateOtaFirmware(data: IoTOtaFirmware) {
|
export function updateOtaFirmware(data: IoTOtaFirmwareApi.Firmware) {
|
||||||
return requestClient.put('/iot/ota/firmware/update', data);
|
return requestClient.put('/iot/ota/firmware/update', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -65,26 +48,3 @@ export function updateOtaFirmware(data: IoTOtaFirmware) {
|
||||||
export function deleteOtaFirmware(id: number) {
|
export function deleteOtaFirmware(id: number) {
|
||||||
return requestClient.delete(`/iot/ota/firmware/delete?id=${id}`);
|
return requestClient.delete(`/iot/ota/firmware/delete?id=${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 批量删除 OTA 固件 */
|
|
||||||
export function deleteOtaFirmwareList(ids: number[]) {
|
|
||||||
return requestClient.delete('/iot/ota/firmware/delete-list', {
|
|
||||||
params: { ids: ids.join(',') },
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 更新 OTA 固件状态 */
|
|
||||||
export function updateOtaFirmwareStatus(id: number, status: number) {
|
|
||||||
return requestClient.put(`/iot/ota/firmware/update-status`, {
|
|
||||||
id,
|
|
||||||
status,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 根据产品 ID 查询固件列表 */
|
|
||||||
export function getOtaFirmwareListByProductId(productId: number) {
|
|
||||||
return requestClient.get<IoTOtaFirmwareApi.Firmware[]>(
|
|
||||||
'/iot/ota/firmware/list-by-product-id',
|
|
||||||
{ params: { productId } },
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -3,45 +3,21 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace IoTOtaTaskApi {
|
export namespace IoTOtaTaskApi {
|
||||||
/** IoT OTA 升级任务 VO */
|
/** IoT OTA 升级任务 */
|
||||||
export interface Task {
|
export interface Task {
|
||||||
id?: number;
|
id?: number;
|
||||||
name: string;
|
name?: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
firmwareId: number;
|
firmwareId?: number;
|
||||||
firmwareName?: string;
|
status?: number;
|
||||||
productId?: number;
|
|
||||||
productName?: string;
|
|
||||||
deviceScope?: number;
|
deviceScope?: number;
|
||||||
deviceIds?: number[];
|
deviceIds?: number[];
|
||||||
status?: number;
|
deviceTotalCount?: number;
|
||||||
successCount?: number;
|
deviceSuccessCount?: number;
|
||||||
failureCount?: number;
|
|
||||||
pendingCount?: number;
|
|
||||||
createTime?: Date;
|
createTime?: Date;
|
||||||
updateTime?: Date;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** IoT OTA 升级任务 */
|
|
||||||
export interface OtaTask {
|
|
||||||
id?: number;
|
|
||||||
name?: string;
|
|
||||||
description?: string;
|
|
||||||
firmwareId?: number;
|
|
||||||
firmwareName?: string;
|
|
||||||
productId?: number;
|
|
||||||
productName?: string;
|
|
||||||
deviceScope?: number;
|
|
||||||
deviceIds?: number[];
|
|
||||||
status?: number;
|
|
||||||
successCount?: number;
|
|
||||||
failureCount?: number;
|
|
||||||
pendingCount?: number;
|
|
||||||
createTime?: Date;
|
|
||||||
updateTime?: Date;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 查询 OTA 升级任务分页 */
|
/** 查询 OTA 升级任务分页 */
|
||||||
export function getOtaTaskPage(params: PageParam) {
|
export function getOtaTaskPage(params: PageParam) {
|
||||||
return requestClient.get<PageResult<IoTOtaTaskApi.Task>>(
|
return requestClient.get<PageResult<IoTOtaTaskApi.Task>>(
|
||||||
|
|
@ -56,43 +32,11 @@ export function getOtaTask(id: number) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 新增 OTA 升级任务 */
|
/** 新增 OTA 升级任务 */
|
||||||
export function createOtaTask(data: OtaTask) {
|
export function createOtaTask(data: IoTOtaTaskApi.Task) {
|
||||||
return requestClient.post('/iot/ota/task/create', data);
|
return requestClient.post('/iot/ota/task/create', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 修改 OTA 升级任务 */
|
|
||||||
export function updateOtaTask(data: OtaTask) {
|
|
||||||
return requestClient.put('/iot/ota/task/update', data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 删除 OTA 升级任务 */
|
|
||||||
export function deleteOtaTask(id: number) {
|
|
||||||
return requestClient.delete(`/iot/ota/task/delete?id=${id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 批量删除 OTA 升级任务 */
|
|
||||||
export function deleteOtaTaskList(ids: number[]) {
|
|
||||||
return requestClient.delete('/iot/ota/task/delete-list', {
|
|
||||||
params: { ids: ids.join(',') },
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 取消 OTA 升级任务 */
|
/** 取消 OTA 升级任务 */
|
||||||
export function cancelOtaTask(id: number) {
|
export function cancelOtaTask(id: number) {
|
||||||
return requestClient.put(`/iot/ota/task/cancel?id=${id}`);
|
return requestClient.post(`/iot/ota/task/cancel?id=${id}`);
|
||||||
}
|
|
||||||
|
|
||||||
/** 启动 OTA 升级任务 */
|
|
||||||
export function startOtaTask(id: number) {
|
|
||||||
return requestClient.put(`/iot/ota/task/start?id=${id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 暂停 OTA 升级任务 */
|
|
||||||
export function pauseOtaTask(id: number) {
|
|
||||||
return requestClient.put(`/iot/ota/task/pause?id=${id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 恢复 OTA 升级任务 */
|
|
||||||
export function resumeOtaTask(id: number) {
|
|
||||||
return requestClient.put(`/iot/ota/task/resume?id=${id}`);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,44 +3,24 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace IoTOtaTaskRecordApi {
|
export namespace IoTOtaTaskRecordApi {
|
||||||
/** IoT OTA 升级任务记录 VO */
|
/** IoT OTA 升级任务记录 */
|
||||||
export interface TaskRecord {
|
export interface TaskRecord {
|
||||||
id?: number;
|
id?: number;
|
||||||
taskId: number;
|
|
||||||
taskName?: string;
|
|
||||||
deviceId: number;
|
|
||||||
deviceName?: string;
|
|
||||||
firmwareId?: number;
|
firmwareId?: number;
|
||||||
firmwareName?: string;
|
|
||||||
firmwareVersion?: string;
|
firmwareVersion?: string;
|
||||||
|
taskId?: number;
|
||||||
|
deviceId?: string;
|
||||||
|
deviceName?: string;
|
||||||
|
currentVersion?: string;
|
||||||
|
fromFirmwareId?: number;
|
||||||
|
fromFirmwareVersion?: string;
|
||||||
status?: number;
|
status?: number;
|
||||||
progress?: number;
|
progress?: number;
|
||||||
errorMessage?: string;
|
description?: string;
|
||||||
startTime?: Date;
|
updateTime?: Date;
|
||||||
endTime?: Date;
|
|
||||||
createTime?: Date;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO @AI:这里应该拿到 IoTOtaTaskRecordApi 里
|
|
||||||
/** IoT OTA 升级任务记录 */
|
|
||||||
export interface OtaTaskRecord {
|
|
||||||
id?: number;
|
|
||||||
taskId?: number;
|
|
||||||
taskName?: string;
|
|
||||||
deviceId?: number;
|
|
||||||
deviceName?: string;
|
|
||||||
firmwareId?: number;
|
|
||||||
firmwareName?: string;
|
|
||||||
firmwareVersion?: string;
|
|
||||||
status?: number;
|
|
||||||
progress?: number;
|
|
||||||
errorMessage?: string;
|
|
||||||
startTime?: Date;
|
|
||||||
endTime?: Date;
|
|
||||||
createTime?: Date;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 查询 OTA 升级任务记录分页 */
|
/** 查询 OTA 升级任务记录分页 */
|
||||||
export function getOtaTaskRecordPage(params: PageParam) {
|
export function getOtaTaskRecordPage(params: PageParam) {
|
||||||
return requestClient.get<PageResult<IoTOtaTaskRecordApi.TaskRecord>>(
|
return requestClient.get<PageResult<IoTOtaTaskRecordApi.TaskRecord>>(
|
||||||
|
|
@ -49,48 +29,12 @@ export function getOtaTaskRecordPage(params: PageParam) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查询 OTA 升级任务记录详情 */
|
/** 取消 OTA 升级任务记录 */
|
||||||
export function getOtaTaskRecord(id: number) {
|
|
||||||
return requestClient.get<IoTOtaTaskRecordApi.TaskRecord>(
|
|
||||||
`/iot/ota/task/record/get?id=${id}`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 根据任务 ID 查询记录列表 */
|
|
||||||
export function getOtaTaskRecordListByTaskId(taskId: number) {
|
|
||||||
return requestClient.get<IoTOtaTaskRecordApi.TaskRecord[]>(
|
|
||||||
'/iot/ota/task/record/list-by-task-id',
|
|
||||||
{ params: { taskId } },
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 根据设备 ID 查询记录列表 */
|
|
||||||
export function getOtaTaskRecordListByDeviceId(deviceId: number) {
|
|
||||||
return requestClient.get<IoTOtaTaskRecordApi.TaskRecord[]>(
|
|
||||||
'/iot/ota/task/record/list-by-device-id',
|
|
||||||
{ params: { deviceId } },
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 根据固件 ID 查询记录列表 */
|
|
||||||
export function getOtaTaskRecordListByFirmwareId(firmwareId: number) {
|
|
||||||
return requestClient.get<IoTOtaTaskRecordApi.TaskRecord[]>(
|
|
||||||
'/iot/ota/task/record/list-by-firmware-id',
|
|
||||||
{ params: { firmwareId } },
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 重试升级任务记录 */
|
|
||||||
export function retryOtaTaskRecord(id: number) {
|
|
||||||
return requestClient.put(`/iot/ota/task/record/retry?id=${id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 取消升级任务记录 */
|
|
||||||
export function cancelOtaTaskRecord(id: number) {
|
export function cancelOtaTaskRecord(id: number) {
|
||||||
return requestClient.put(`/iot/ota/task/record/cancel?id=${id}`);
|
return requestClient.put(`/iot/ota/task/record/cancel?id=${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 获取升级任务记录状态统计 */
|
/** 获取 OTA 升级任务记录状态统计 */
|
||||||
export function getOtaTaskRecordStatusStatistics(
|
export function getOtaTaskRecordStatusStatistics(
|
||||||
firmwareId?: number,
|
firmwareId?: number,
|
||||||
taskId?: number,
|
taskId?: number,
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,10 @@ export namespace IotProductCategoryApi {
|
||||||
export interface ProductCategory {
|
export interface ProductCategory {
|
||||||
id?: number; // 分类 ID
|
id?: number; // 分类 ID
|
||||||
name: string; // 分类名称
|
name: string; // 分类名称
|
||||||
parentId?: number; // 父级分类 ID
|
|
||||||
sort?: number; // 分类排序
|
sort?: number; // 分类排序
|
||||||
status?: number; // 分类状态
|
status?: number; // 分类状态
|
||||||
description?: string; // 分类描述
|
description?: string; // 分类描述
|
||||||
createTime?: string; // 创建时间
|
createTime?: Date; // 创建时间
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,6 @@ export namespace IotProductApi {
|
||||||
deviceType?: number; // 设备类型
|
deviceType?: number; // 设备类型
|
||||||
netType?: number; // 联网方式
|
netType?: number; // 联网方式
|
||||||
serializeType?: string; // 序列化类型
|
serializeType?: string; // 序列化类型
|
||||||
dataFormat?: number; // 数据格式
|
|
||||||
validateType?: number; // 认证方式
|
|
||||||
registerEnabled?: boolean; // 是否开启动态注册
|
registerEnabled?: boolean; // 是否开启动态注册
|
||||||
deviceCount?: number; // 设备数量
|
deviceCount?: number; // 设备数量
|
||||||
createTime?: Date; // 创建时间
|
createTime?: Date; // 创建时间
|
||||||
|
|
@ -103,3 +101,10 @@ export function getProductByKey(productKey: string) {
|
||||||
params: { productKey },
|
params: { productKey },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 同步产品物模型 TDengine 超级表结构 */
|
||||||
|
export function syncProductPropertyTable(productId: number) {
|
||||||
|
return requestClient.post(
|
||||||
|
`/iot/product/sync-property-table?productId=${productId}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,45 +3,21 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace DataRuleApi {
|
export namespace DataRuleApi {
|
||||||
/** IoT 数据流转规则 VO */
|
/** IoT 数据流转规则 */
|
||||||
export interface Rule {
|
export interface DataRule {
|
||||||
id?: number;
|
id?: number;
|
||||||
name: string;
|
name?: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
status?: number;
|
status?: number;
|
||||||
productId?: number;
|
sourceConfigs?: any[];
|
||||||
productKey?: string;
|
|
||||||
sourceConfigs?: SourceConfig[];
|
|
||||||
sinkIds?: number[];
|
sinkIds?: number[];
|
||||||
createTime?: Date;
|
createTime?: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** IoT 数据源配置 */
|
|
||||||
export interface SourceConfig {
|
|
||||||
productId?: number;
|
|
||||||
productKey?: string;
|
|
||||||
deviceId?: number;
|
|
||||||
type?: string;
|
|
||||||
topic?: string;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** IoT 数据流转规则 */
|
|
||||||
export interface DataRule {
|
|
||||||
id?: number;
|
|
||||||
name?: string;
|
|
||||||
description?: string;
|
|
||||||
status?: number;
|
|
||||||
productId?: number;
|
|
||||||
productKey?: string;
|
|
||||||
sourceConfigs?: any[];
|
|
||||||
sinkIds?: number[];
|
|
||||||
createTime?: Date;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查询数据流转规则分页 */
|
/** 查询数据流转规则分页 */
|
||||||
export function getDataRulePage(params: PageParam) {
|
export function getDataRulePage(params: PageParam) {
|
||||||
return requestClient.get<PageResult<DataRuleApi.Rule>>(
|
return requestClient.get<PageResult<DataRuleApi.DataRule>>(
|
||||||
'/iot/data-rule/page',
|
'/iot/data-rule/page',
|
||||||
{ params },
|
{ params },
|
||||||
);
|
);
|
||||||
|
|
@ -49,16 +25,16 @@ export function getDataRulePage(params: PageParam) {
|
||||||
|
|
||||||
/** 查询数据流转规则详情 */
|
/** 查询数据流转规则详情 */
|
||||||
export function getDataRule(id: number) {
|
export function getDataRule(id: number) {
|
||||||
return requestClient.get<DataRuleApi.Rule>(`/iot/data-rule/get?id=${id}`);
|
return requestClient.get<DataRuleApi.DataRule>(`/iot/data-rule/get?id=${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 新增数据流转规则 */
|
/** 新增数据流转规则 */
|
||||||
export function createDataRule(data: DataRule) {
|
export function createDataRule(data: DataRuleApi.DataRule) {
|
||||||
return requestClient.post('/iot/data-rule/create', data);
|
return requestClient.post('/iot/data-rule/create', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 修改数据流转规则 */
|
/** 修改数据流转规则 */
|
||||||
export function updateDataRule(data: DataRule) {
|
export function updateDataRule(data: DataRuleApi.DataRule) {
|
||||||
return requestClient.put('/iot/data-rule/update', data);
|
return requestClient.put('/iot/data-rule/update', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -66,18 +42,3 @@ export function updateDataRule(data: DataRule) {
|
||||||
export function deleteDataRule(id: number) {
|
export function deleteDataRule(id: number) {
|
||||||
return requestClient.delete(`/iot/data-rule/delete?id=${id}`);
|
return requestClient.delete(`/iot/data-rule/delete?id=${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 批量删除数据流转规则 */
|
|
||||||
export function deleteDataRuleList(ids: number[]) {
|
|
||||||
return requestClient.delete('/iot/data-rule/delete-list', {
|
|
||||||
params: { ids: ids.join(',') },
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 更新数据流转规则状态 */
|
|
||||||
export function updateDataRuleStatus(id: number, status: number) {
|
|
||||||
return requestClient.put(`/iot/data-rule/update-status`, {
|
|
||||||
id,
|
|
||||||
status,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -2,101 +2,147 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
interface BaseConfig {
|
||||||
|
type: string;
|
||||||
|
}
|
||||||
|
|
||||||
export namespace DataSinkApi {
|
export namespace DataSinkApi {
|
||||||
/** IoT 数据流转目的 VO */
|
/** IoT 数据流转目的 VO */
|
||||||
export interface Sink {
|
export interface DataSink {
|
||||||
id?: number;
|
id?: number;
|
||||||
name: string;
|
name?: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
status?: number;
|
status?: number;
|
||||||
type: string;
|
direction?: number;
|
||||||
config?: any;
|
type?: number;
|
||||||
|
config?:
|
||||||
|
| DatabaseConfig
|
||||||
|
| HttpConfig
|
||||||
|
| KafkaMQConfig
|
||||||
|
| MqttConfig
|
||||||
|
| RabbitMQConfig
|
||||||
|
| RedisStreamMQConfig
|
||||||
|
| RocketMQConfig
|
||||||
|
| TcpConfig
|
||||||
|
| WebSocketConfig;
|
||||||
createTime?: Date;
|
createTime?: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** HTTP 配置 */
|
||||||
|
export interface HttpConfig extends BaseConfig {
|
||||||
|
url: string;
|
||||||
|
method: string;
|
||||||
|
headers: Record<string, string>;
|
||||||
|
query: Record<string, string>;
|
||||||
|
body: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** TCP 配置 */
|
||||||
|
export interface TcpConfig extends BaseConfig {
|
||||||
|
host: string;
|
||||||
|
port: number;
|
||||||
|
connectTimeoutMs: number;
|
||||||
|
readTimeoutMs: number;
|
||||||
|
ssl: boolean;
|
||||||
|
sslCertPath: string;
|
||||||
|
dataFormat: string;
|
||||||
|
heartbeatIntervalMs: number;
|
||||||
|
reconnectIntervalMs: number;
|
||||||
|
maxReconnectAttempts: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** WebSocket 配置 */
|
||||||
|
export interface WebSocketConfig extends BaseConfig {
|
||||||
|
serverUrl: string;
|
||||||
|
connectTimeoutMs: number;
|
||||||
|
sendTimeoutMs: number;
|
||||||
|
heartbeatIntervalMs: number;
|
||||||
|
heartbeatMessage: string;
|
||||||
|
subprotocols: string;
|
||||||
|
customHeaders: string;
|
||||||
|
verifySslCert: boolean;
|
||||||
|
dataFormat: string;
|
||||||
|
reconnectIntervalMs: number;
|
||||||
|
maxReconnectAttempts: number;
|
||||||
|
enableCompression: boolean;
|
||||||
|
sendRetryCount: number;
|
||||||
|
sendRetryIntervalMs: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** MQTT 配置 */
|
||||||
|
export interface MqttConfig extends BaseConfig {
|
||||||
|
url: string;
|
||||||
|
username: string;
|
||||||
|
password: string;
|
||||||
|
clientId: string;
|
||||||
|
topic: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Database 配置 */
|
||||||
|
export interface DatabaseConfig extends BaseConfig {
|
||||||
|
jdbcUrl: string;
|
||||||
|
username: string;
|
||||||
|
password: string;
|
||||||
|
tableName: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** RocketMQ 配置 */
|
||||||
|
export interface RocketMQConfig extends BaseConfig {
|
||||||
|
nameServer: string;
|
||||||
|
accessKey: string;
|
||||||
|
secretKey: string;
|
||||||
|
group: string;
|
||||||
|
topic: string;
|
||||||
|
tags: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Kafka 配置 */
|
||||||
|
export interface KafkaMQConfig extends BaseConfig {
|
||||||
|
bootstrapServers: string;
|
||||||
|
username: string;
|
||||||
|
password: string;
|
||||||
|
ssl: boolean;
|
||||||
|
topic: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** RabbitMQ 配置 */
|
||||||
|
export interface RabbitMQConfig extends BaseConfig {
|
||||||
|
host: string;
|
||||||
|
port: number;
|
||||||
|
virtualHost: string;
|
||||||
|
username: string;
|
||||||
|
password: string;
|
||||||
|
exchange: string;
|
||||||
|
routingKey: string;
|
||||||
|
queue: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Redis Stream MQ 配置 */
|
||||||
|
export interface RedisStreamMQConfig extends BaseConfig {
|
||||||
|
host: string;
|
||||||
|
port: number;
|
||||||
|
password: string;
|
||||||
|
database: number;
|
||||||
|
topic: string;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** IoT 数据流转目的 */
|
/** 数据流转目的类型 */
|
||||||
export interface DataSinkVO {
|
export const IotDataSinkTypeEnum = {
|
||||||
id?: number;
|
HTTP: 1,
|
||||||
name?: string;
|
TCP: 2,
|
||||||
description?: string;
|
WEBSOCKET: 3,
|
||||||
status?: number;
|
MQTT: 10,
|
||||||
type?: string;
|
DATABASE: 20,
|
||||||
config?: any;
|
REDIS_STREAM: 21,
|
||||||
createTime?: Date;
|
ROCKETMQ: 30,
|
||||||
}
|
RABBITMQ: 31,
|
||||||
|
KAFKA: 32,
|
||||||
/** IoT 数据目的类型枚举 */
|
} as const;
|
||||||
export enum IotDataSinkTypeEnum {
|
|
||||||
HTTP = 'HTTP',
|
|
||||||
KAFKA = 'KAFKA',
|
|
||||||
MQTT = 'MQTT',
|
|
||||||
RABBITMQ = 'RABBITMQ',
|
|
||||||
REDIS_STREAM = 'REDIS_STREAM',
|
|
||||||
ROCKETMQ = 'ROCKETMQ',
|
|
||||||
}
|
|
||||||
|
|
||||||
/** HTTP 配置 */
|
|
||||||
export interface HttpConfig {
|
|
||||||
url?: string;
|
|
||||||
method?: string;
|
|
||||||
headers?: Record<string, string>;
|
|
||||||
timeout?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** MQTT 配置 */
|
|
||||||
export interface MqttConfig {
|
|
||||||
broker?: string;
|
|
||||||
port?: number;
|
|
||||||
topic?: string;
|
|
||||||
username?: string;
|
|
||||||
password?: string;
|
|
||||||
clientId?: string;
|
|
||||||
qos?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Kafka 配置 */
|
|
||||||
export interface KafkaMQConfig {
|
|
||||||
bootstrapServers?: string;
|
|
||||||
topic?: string;
|
|
||||||
acks?: string;
|
|
||||||
retries?: number;
|
|
||||||
batchSize?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** RabbitMQ 配置 */
|
|
||||||
export interface RabbitMQConfig {
|
|
||||||
host?: string;
|
|
||||||
port?: number;
|
|
||||||
virtualHost?: string;
|
|
||||||
username?: string;
|
|
||||||
password?: string;
|
|
||||||
exchange?: string;
|
|
||||||
routingKey?: string;
|
|
||||||
queue?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** RocketMQ 配置 */
|
|
||||||
export interface RocketMQConfig {
|
|
||||||
nameServer?: string;
|
|
||||||
topic?: string;
|
|
||||||
tag?: string;
|
|
||||||
producerGroup?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Redis Stream 配置 */
|
|
||||||
export interface RedisStreamMQConfig {
|
|
||||||
host?: string;
|
|
||||||
port?: number;
|
|
||||||
password?: string;
|
|
||||||
database?: number;
|
|
||||||
streamKey?: string;
|
|
||||||
maxLen?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 查询数据流转目的分页 */
|
/** 查询数据流转目的分页 */
|
||||||
export function getDataSinkPage(params: PageParam) {
|
export function getDataSinkPage(params: PageParam) {
|
||||||
return requestClient.get<PageResult<DataSinkApi.Sink>>(
|
return requestClient.get<PageResult<DataSinkApi.DataSink>>(
|
||||||
'/iot/data-sink/page',
|
'/iot/data-sink/page',
|
||||||
{ params },
|
{ params },
|
||||||
);
|
);
|
||||||
|
|
@ -104,26 +150,23 @@ export function getDataSinkPage(params: PageParam) {
|
||||||
|
|
||||||
/** 查询数据流转目的详情 */
|
/** 查询数据流转目的详情 */
|
||||||
export function getDataSink(id: number) {
|
export function getDataSink(id: number) {
|
||||||
return requestClient.get<DataSinkApi.Sink>(`/iot/data-sink/get?id=${id}`);
|
return requestClient.get<DataSinkApi.DataSink>(
|
||||||
|
`/iot/data-sink/get?id=${id}`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查询所有数据流转目的列表 */
|
/** 查询数据流转目的(精简)列表 */
|
||||||
export function getDataSinkList() {
|
|
||||||
return requestClient.get<DataSinkApi.Sink[]>('/iot/data-sink/list');
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 查询数据流转目的简单列表 */
|
|
||||||
export function getDataSinkSimpleList() {
|
export function getDataSinkSimpleList() {
|
||||||
return requestClient.get<DataSinkApi.Sink[]>('/iot/data-sink/simple-list');
|
return requestClient.get<DataSinkApi.DataSink[]>('/iot/data-sink/simple-list');
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 新增数据流转目的 */
|
/** 新增数据流转目的 */
|
||||||
export function createDataSink(data: DataSinkVO) {
|
export function createDataSink(data: DataSinkApi.DataSink) {
|
||||||
return requestClient.post('/iot/data-sink/create', data);
|
return requestClient.post('/iot/data-sink/create', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 修改数据流转目的 */
|
/** 修改数据流转目的 */
|
||||||
export function updateDataSink(data: DataSinkVO) {
|
export function updateDataSink(data: DataSinkApi.DataSink) {
|
||||||
return requestClient.put('/iot/data-sink/update', data);
|
return requestClient.put('/iot/data-sink/update', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -131,18 +174,3 @@ export function updateDataSink(data: DataSinkVO) {
|
||||||
export function deleteDataSink(id: number) {
|
export function deleteDataSink(id: number) {
|
||||||
return requestClient.delete(`/iot/data-sink/delete?id=${id}`);
|
return requestClient.delete(`/iot/data-sink/delete?id=${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 批量删除数据流转目的 */
|
|
||||||
export function deleteDataSinkList(ids: number[]) {
|
|
||||||
return requestClient.delete('/iot/data-sink/delete-list', {
|
|
||||||
params: { ids: ids.join(',') },
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 更新数据流转目的状态 */
|
|
||||||
export function updateDataSinkStatus(id: number, status: number) {
|
|
||||||
return requestClient.put(`/iot/data-sink/update-status`, {
|
|
||||||
id,
|
|
||||||
status,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -11,25 +11,20 @@ export namespace RuleSceneApi {
|
||||||
status?: number;
|
status?: number;
|
||||||
triggers?: Trigger[];
|
triggers?: Trigger[];
|
||||||
actions?: Action[];
|
actions?: Action[];
|
||||||
|
lastTriggeredTime?: Date;
|
||||||
createTime?: Date;
|
createTime?: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 场景联动规则的触发器 */
|
/** 场景联动规则的触发器 */
|
||||||
export interface Trigger {
|
export interface Trigger {
|
||||||
type?: string;
|
type?: number;
|
||||||
productId?: number;
|
productId?: number;
|
||||||
deviceId?: number;
|
deviceId?: number;
|
||||||
identifier?: string;
|
identifier?: string;
|
||||||
operator?: string;
|
operator?: string;
|
||||||
value?: any;
|
value?: any;
|
||||||
cronExpression?: string;
|
cronExpression?: string;
|
||||||
conditionGroups?: TriggerConditionGroup[];
|
conditionGroups?: TriggerCondition[][];
|
||||||
}
|
|
||||||
|
|
||||||
/** 场景联动规则的触发条件组 */
|
|
||||||
export interface TriggerConditionGroup {
|
|
||||||
conditions?: TriggerCondition[];
|
|
||||||
operator?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 场景联动规则的触发条件 */
|
/** 场景联动规则的触发条件 */
|
||||||
|
|
@ -39,72 +34,22 @@ export namespace RuleSceneApi {
|
||||||
identifier?: string;
|
identifier?: string;
|
||||||
operator?: string;
|
operator?: string;
|
||||||
value?: any;
|
value?: any;
|
||||||
type?: string;
|
type?: number;
|
||||||
|
param?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 场景联动规则的动作 */
|
/** 场景联动规则的动作 */
|
||||||
export interface Action {
|
export interface Action {
|
||||||
type?: string;
|
type?: number;
|
||||||
productId?: number;
|
productId?: number;
|
||||||
deviceId?: number;
|
deviceId?: number;
|
||||||
identifier?: string;
|
identifier?: string;
|
||||||
value?: any;
|
value?: any;
|
||||||
alertConfigId?: number;
|
alertConfigId?: number;
|
||||||
|
params?: string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO @haohao:貌似下面的,和 RuleSceneApi 重复了。
|
|
||||||
/** IoT 场景联动规则 */
|
|
||||||
export interface IotSceneRule {
|
|
||||||
id?: number;
|
|
||||||
name?: string;
|
|
||||||
description?: string;
|
|
||||||
status?: number;
|
|
||||||
triggers?: Trigger[];
|
|
||||||
actions?: Action[];
|
|
||||||
createTime?: Date;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** IoT 场景联动规则触发器 */
|
|
||||||
export interface Trigger {
|
|
||||||
type?: string;
|
|
||||||
productId?: number;
|
|
||||||
deviceId?: number;
|
|
||||||
identifier?: string;
|
|
||||||
operator?: string;
|
|
||||||
value?: any;
|
|
||||||
cronExpression?: string;
|
|
||||||
conditionGroups?: TriggerConditionGroup[];
|
|
||||||
}
|
|
||||||
|
|
||||||
/** IoT 场景联动规则触发条件组 */
|
|
||||||
export interface TriggerConditionGroup {
|
|
||||||
conditions?: TriggerCondition[];
|
|
||||||
operator?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** IoT 场景联动规则触发条件 */
|
|
||||||
export interface TriggerCondition {
|
|
||||||
productId?: number;
|
|
||||||
deviceId?: number;
|
|
||||||
identifier?: string;
|
|
||||||
operator?: string;
|
|
||||||
value?: any;
|
|
||||||
type?: string;
|
|
||||||
param?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** IoT 场景联动规则动作 */
|
|
||||||
export interface Action {
|
|
||||||
type?: string;
|
|
||||||
productId?: number;
|
|
||||||
deviceId?: number;
|
|
||||||
identifier?: string;
|
|
||||||
value?: any;
|
|
||||||
alertConfigId?: number;
|
|
||||||
params?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 查询场景联动规则分页 */
|
/** 查询场景联动规则分页 */
|
||||||
export function getSceneRulePage(params: PageParam) {
|
export function getSceneRulePage(params: PageParam) {
|
||||||
return requestClient.get<PageResult<RuleSceneApi.SceneRule>>(
|
return requestClient.get<PageResult<RuleSceneApi.SceneRule>>(
|
||||||
|
|
@ -121,12 +66,12 @@ export function getSceneRule(id: number) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 新增场景联动规则 */
|
/** 新增场景联动规则 */
|
||||||
export function createSceneRule(data: IotSceneRule) {
|
export function createSceneRule(data: RuleSceneApi.SceneRule) {
|
||||||
return requestClient.post('/iot/scene-rule/create', data);
|
return requestClient.post('/iot/scene-rule/create', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 修改场景联动规则 */
|
/** 修改场景联动规则 */
|
||||||
export function updateSceneRule(data: IotSceneRule) {
|
export function updateSceneRule(data: RuleSceneApi.SceneRule) {
|
||||||
return requestClient.put('/iot/scene-rule/update', data);
|
return requestClient.put('/iot/scene-rule/update', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -136,7 +81,6 @@ export function deleteSceneRule(id: number) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 批量删除场景联动规则 */
|
/** 批量删除场景联动规则 */
|
||||||
// TODO @haohao:貌似用上。
|
|
||||||
export function deleteSceneRuleList(ids: number[]) {
|
export function deleteSceneRuleList(ids: number[]) {
|
||||||
return requestClient.delete('/iot/scene-rule/delete-list', {
|
return requestClient.delete('/iot/scene-rule/delete-list', {
|
||||||
params: { ids: ids.join(',') },
|
params: { ids: ids.join(',') },
|
||||||
|
|
|
||||||
|
|
@ -17,18 +17,6 @@ export namespace IotStatisticsApi {
|
||||||
productCategoryDeviceCounts: Record<string, number>; // 按品类统计的设备数量
|
productCategoryDeviceCounts: Record<string, number>; // 按品类统计的设备数量
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 时间戳-数值的键值对类型 */
|
|
||||||
export interface TimeValueItem {
|
|
||||||
[key: string]: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 消息统计数据类型 */
|
|
||||||
export interface DeviceMessageSummary {
|
|
||||||
statType: number;
|
|
||||||
upstreamCounts: TimeValueItem[];
|
|
||||||
downstreamCounts: TimeValueItem[];
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 设备消息数量统计(按日期) */
|
/** 设备消息数量统计(按日期) */
|
||||||
export interface DeviceMessageSummaryByDateRespVO {
|
export interface DeviceMessageSummaryByDateRespVO {
|
||||||
time: string; // 时间轴
|
time: string; // 时间轴
|
||||||
|
|
|
||||||
|
|
@ -1,126 +1,207 @@
|
||||||
|
import type { Rule } from 'ant-design-vue/es/form';
|
||||||
|
|
||||||
import type { PageParam, PageResult } from '@vben/request';
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { isEmpty } from '@vben/utils';
|
||||||
|
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace ThingModelApi {
|
export namespace ThingModelApi {
|
||||||
/** IoT 物模型数据 VO */
|
/** IoT 物模型数据 */
|
||||||
export interface ThingModel {
|
export interface ThingModel {
|
||||||
id?: number;
|
id?: number;
|
||||||
productId?: number;
|
productId?: number;
|
||||||
productKey?: string;
|
productKey?: string;
|
||||||
identifier: string;
|
identifier?: string;
|
||||||
name: string;
|
name?: string;
|
||||||
desc?: string;
|
description?: string;
|
||||||
type: string;
|
dataType?: string;
|
||||||
property?: ThingModelProperty;
|
type?: number; // 参见 IoTThingModelTypeEnum 枚举类
|
||||||
event?: ThingModelEvent;
|
property?: Property;
|
||||||
service?: ThingModelService;
|
event?: Event;
|
||||||
|
service?: Service;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** IoT 物模型属性 */
|
/** IoT 物模型属性 */
|
||||||
export interface Property {
|
export interface Property {
|
||||||
identifier: string;
|
identifier?: string;
|
||||||
name: string;
|
name?: string;
|
||||||
accessMode: string;
|
accessMode?: string;
|
||||||
dataType: string;
|
required?: boolean;
|
||||||
|
dataType?: string;
|
||||||
|
description?: string;
|
||||||
dataSpecs?: any;
|
dataSpecs?: any;
|
||||||
dataSpecsList?: any[];
|
dataSpecsList?: any[];
|
||||||
desc?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** IoT 物模型服务 */
|
/** IoT 物模型服务 */
|
||||||
export interface Service {
|
export interface Service {
|
||||||
identifier: string;
|
identifier?: string;
|
||||||
name: string;
|
name?: string;
|
||||||
callType: string;
|
required?: boolean;
|
||||||
inputData?: any[];
|
callType?: string;
|
||||||
outputData?: any[];
|
description?: string;
|
||||||
desc?: string;
|
inputParams?: Param[];
|
||||||
|
outputParams?: Param[];
|
||||||
|
method?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** IoT 物模型事件 */
|
/** IoT 物模型事件 */
|
||||||
export interface Event {
|
export interface Event {
|
||||||
identifier: string;
|
identifier?: string;
|
||||||
|
name?: string;
|
||||||
|
required?: boolean;
|
||||||
|
type?: string;
|
||||||
|
description?: string;
|
||||||
|
outputParams?: Param[];
|
||||||
|
method?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 物模型参数 */
|
||||||
|
export interface Param {
|
||||||
|
identifier?: string;
|
||||||
|
name?: string;
|
||||||
|
direction?: string;
|
||||||
|
paraOrder?: number;
|
||||||
|
dataType?: string;
|
||||||
|
dataSpecs?: any;
|
||||||
|
dataSpecsList?: any[];
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 物模型 TSL(树形)响应 */
|
||||||
|
export interface ThingModelTSL {
|
||||||
|
productId?: number;
|
||||||
|
productKey?: string;
|
||||||
|
properties?: Property[];
|
||||||
|
events?: Event[];
|
||||||
|
services?: Service[];
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 数据定义(数值型) */
|
||||||
|
export interface DataSpecsNumberData {
|
||||||
|
min?: number | string;
|
||||||
|
max?: number | string;
|
||||||
|
step?: number | string;
|
||||||
|
unit?: string;
|
||||||
|
unitName?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 数据定义(枚举/布尔型) */
|
||||||
|
export interface DataSpecsEnumOrBoolData {
|
||||||
|
value: number | string;
|
||||||
name: string;
|
name: string;
|
||||||
type: string;
|
|
||||||
outputData?: any[];
|
|
||||||
desc?: string;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** IoT 物模型数据 */
|
/** 生成「必填 + 数字」类校验器:拼到 size / length / 枚举值上 */
|
||||||
export interface ThingModelData {
|
function buildRequiredNumberValidator(label: string) {
|
||||||
id?: number;
|
return (_rule: any, value: any, callback: any) => {
|
||||||
productId?: number;
|
if (isEmpty(value)) {
|
||||||
productKey?: string;
|
callback(new Error(`${label}不能为空`));
|
||||||
identifier?: string;
|
return;
|
||||||
name?: string;
|
}
|
||||||
desc?: string;
|
if (Number.isNaN(Number(value))) {
|
||||||
type?: string;
|
callback(new Error(`${label}必须是数字`));
|
||||||
dataType?: string;
|
return;
|
||||||
property?: ThingModelProperty;
|
}
|
||||||
event?: ThingModelEvent;
|
callback();
|
||||||
service?: ThingModelService;
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/** IoT 物模型属性 */
|
/** 生成「标识符样式」名称校验器:开头需为中文 / 英文 / 数字,整体仅允许中文、英文、数字、下划线、短划线,长度 ≤ 20 */
|
||||||
export interface ThingModelProperty {
|
export function buildIdentifierLikeNameValidator(label: string) {
|
||||||
identifier?: string;
|
return (_rule: any, value: string, callback: any) => {
|
||||||
name?: string;
|
if (isEmpty(value)) {
|
||||||
accessMode?: string;
|
callback(new Error(`${label}不能为空`));
|
||||||
dataType?: string;
|
return;
|
||||||
dataSpecs?: any;
|
}
|
||||||
dataSpecsList?: any[];
|
if (!/^[一-龥A-Za-z0-9]/.test(value)) {
|
||||||
desc?: string;
|
callback(new Error(`${label}必须以中文、英文字母或数字开头`));
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
/** IoT 物模型服务 */
|
if (!/^[一-龥A-Za-z0-9][\w一-龥-]*$/.test(value)) {
|
||||||
export interface ThingModelService {
|
callback(
|
||||||
identifier?: string;
|
new Error(`${label}只能包含中文、英文字母、数字、下划线和短划线`),
|
||||||
name?: string;
|
);
|
||||||
callType?: string;
|
return;
|
||||||
inputData?: any[];
|
}
|
||||||
outputData?: any[];
|
if (value.length > 20) {
|
||||||
desc?: string;
|
callback(new Error(`${label}长度不能超过 20 个字符`));
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
/** IoT 物模型事件 */
|
callback();
|
||||||
export interface ThingModelEvent {
|
};
|
||||||
identifier?: string;
|
|
||||||
name?: string;
|
|
||||||
type?: string;
|
|
||||||
outputData?: any[];
|
|
||||||
desc?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** IoT 数据定义(数值型) */
|
|
||||||
export interface DataSpecsNumberData {
|
|
||||||
min?: number | string;
|
|
||||||
max?: number | string;
|
|
||||||
step?: number | string;
|
|
||||||
unit?: string;
|
|
||||||
unitName?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** IoT 数据定义(枚举/布尔型) */
|
|
||||||
export interface DataSpecsEnumOrBoolData {
|
|
||||||
value: number | string;
|
|
||||||
name: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** IoT 物模型表单校验规则 */
|
/** IoT 物模型表单校验规则 */
|
||||||
export interface ThingModelFormRules {
|
export const ThingModelFormRules: Record<string, Rule[]> = {
|
||||||
[key: string]: any;
|
name: [
|
||||||
}
|
{ required: true, message: '功能名称不能为空', trigger: 'blur' },
|
||||||
|
{
|
||||||
|
pattern: /^[一-龥A-Za-z0-9][一-龥A-Za-z0-9\-_/.]{0,29}$/,
|
||||||
|
message:
|
||||||
|
'支持中文、大小写字母、日文、数字、短划线、下划线、斜杠和小数点,必须以中文、英文或数字开头,不超过 30 个字符',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
type: [{ required: true, message: '功能类型不能为空', trigger: 'blur' }],
|
||||||
|
identifier: [
|
||||||
|
{ required: true, message: '标识符不能为空', trigger: 'blur' },
|
||||||
|
{
|
||||||
|
pattern: /^\w{1,50}$/,
|
||||||
|
message: '支持大小写字母、数字和下划线,不超过 50 个字符',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
validator: (_rule: any, value: string, callback: any) => {
|
||||||
|
const reservedKeywords = [
|
||||||
|
'set',
|
||||||
|
'get',
|
||||||
|
'post',
|
||||||
|
'property',
|
||||||
|
'event',
|
||||||
|
'time',
|
||||||
|
'value',
|
||||||
|
];
|
||||||
|
if (reservedKeywords.includes(value)) {
|
||||||
|
callback(
|
||||||
|
new Error(
|
||||||
|
'set, get, post, property, event, time, value 是系统保留字段,不能用于标识符定义',
|
||||||
|
),
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (/^\d+$/.test(value)) {
|
||||||
|
callback(new Error('标识符不能是纯数字'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
callback();
|
||||||
|
},
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
childDataType: [{ required: true, message: '元素类型不能为空' }],
|
||||||
|
size: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
validator: buildRequiredNumberValidator('元素个数'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
length: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
validator: buildRequiredNumberValidator('文本长度'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
accessMode: [{ required: true, message: '请选择读写类型', trigger: 'change' }],
|
||||||
|
callType: [{ required: true, message: '请选择调用方式', trigger: 'change' }],
|
||||||
|
eventType: [{ required: true, message: '请选择事件类型', trigger: 'change' }],
|
||||||
|
};
|
||||||
|
|
||||||
/** 验证布尔型名称 */
|
/** 校验布尔值名称 */
|
||||||
export function validateBoolName(_rule: any, value: any, callback: any) {
|
export const validateBoolName = buildIdentifierLikeNameValidator('布尔值名称');
|
||||||
if (value) {
|
|
||||||
callback();
|
|
||||||
} else {
|
|
||||||
callback(new Error('枚举描述不能为空'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 查询产品物模型分页 */
|
/** 查询产品物模型分页 */
|
||||||
export function getThingModelPage(params: PageParam) {
|
export function getThingModelPage(params: PageParam) {
|
||||||
|
|
@ -141,17 +222,19 @@ export function getThingModel(id: number) {
|
||||||
export function getThingModelListByProductId(productId: number) {
|
export function getThingModelListByProductId(productId: number) {
|
||||||
return requestClient.get<ThingModelApi.ThingModel[]>(
|
return requestClient.get<ThingModelApi.ThingModel[]>(
|
||||||
'/iot/thing-model/list',
|
'/iot/thing-model/list',
|
||||||
{ params: { productId } },
|
{
|
||||||
|
params: { productId },
|
||||||
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 新增物模型 */
|
/** 新增物模型 */
|
||||||
export function createThingModel(data: ThingModelData) {
|
export function createThingModel(data: ThingModelApi.ThingModel) {
|
||||||
return requestClient.post('/iot/thing-model/create', data);
|
return requestClient.post('/iot/thing-model/create', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 修改物模型 */
|
/** 修改物模型 */
|
||||||
export function updateThingModel(data: ThingModelData) {
|
export function updateThingModel(data: ThingModelApi.ThingModel) {
|
||||||
return requestClient.put('/iot/thing-model/update', data);
|
return requestClient.put('/iot/thing-model/update', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -161,26 +244,11 @@ export function deleteThingModel(id: number) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 获取物模型 TSL */
|
/** 获取物模型 TSL */
|
||||||
export function getThingModelTSL(productId: number) {
|
export function getThingModelTSLByProductId(productId: number) {
|
||||||
return requestClient.get<ThingModelApi.ThingModel[]>(
|
return requestClient.get<ThingModelApi.ThingModelTSL>(
|
||||||
'/iot/thing-model/get-tsl',
|
'/iot/thing-model/get-tsl',
|
||||||
{ params: { productId } },
|
{
|
||||||
|
params: { productId },
|
||||||
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 导入物模型 TSL
|
|
||||||
export function importThingModelTSL(productId: number, tslData: any) {
|
|
||||||
return requestClient.post('/iot/thing-model/import-tsl', {
|
|
||||||
productId,
|
|
||||||
tslData,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** 导出物模型 TSL
|
|
||||||
export function exportThingModelTSL(productId: number) {
|
|
||||||
return requestClient.get<any>('/iot/thing-model/export-tsl', {
|
|
||||||
params: { productId },
|
|
||||||
});
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesCalCalendarApi {
|
||||||
|
/** 排班日历班组排班项 */
|
||||||
|
export interface CalendarTeamShiftItem {
|
||||||
|
teamId?: number; // 班组编号
|
||||||
|
teamName?: string; // 班组名称
|
||||||
|
shiftId?: number; // 班次编号
|
||||||
|
shiftName?: string; // 班次名称
|
||||||
|
sort?: number; // 排序
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 排班日历天 */
|
||||||
|
export interface CalendarDay {
|
||||||
|
day?: string; // 日期
|
||||||
|
shiftType?: number; // 轮班方式
|
||||||
|
teamShifts?: CalendarTeamShiftItem[]; // 班组班次
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询排班日历列表 */
|
||||||
|
export function getCalendarList(params: any) {
|
||||||
|
return requestClient.get<MesCalCalendarApi.CalendarDay[]>('/mes/cal/calendar/list', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesCalHolidayApi {
|
||||||
|
/** MES 假期设置 */
|
||||||
|
export interface Holiday {
|
||||||
|
id?: number; // 编号
|
||||||
|
day?: number | string; // 日期
|
||||||
|
type?: number; // 日期类型
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 假期查询参数 */
|
||||||
|
export interface HolidayQuery {
|
||||||
|
startDay?: string;
|
||||||
|
endDay?: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询假期设置列表 */
|
||||||
|
export function getHolidayList(params?: MesCalHolidayApi.HolidayQuery) {
|
||||||
|
return requestClient.get<MesCalHolidayApi.Holiday[]>('/mes/cal/holiday/list', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 根据日期查询假期设置 */
|
||||||
|
export function getHolidayByDay(day: string) {
|
||||||
|
return requestClient.get<MesCalHolidayApi.Holiday>('/mes/cal/holiday/get-by-day', { params: { day } });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 保存假期设置 */
|
||||||
|
export function saveHoliday(data: MesCalHolidayApi.Holiday) {
|
||||||
|
return requestClient.post('/mes/cal/holiday/save', data);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesCalPlanApi {
|
||||||
|
/** MES 排班计划 */
|
||||||
|
export interface Plan {
|
||||||
|
id?: number; // 计划编号
|
||||||
|
code?: string; // 计划编码
|
||||||
|
name?: string; // 计划名称
|
||||||
|
calendarType?: number; // 班组类型
|
||||||
|
startDate?: number; // 开始日期
|
||||||
|
endDate?: number; // 结束日期
|
||||||
|
shiftType?: number; // 轮班方式
|
||||||
|
shiftMethod?: number; // 倒班方式
|
||||||
|
shiftCount?: number; // 倒班天数
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询排班计划分页 */
|
||||||
|
export function getPlanPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesCalPlanApi.Plan>>('/mes/cal/plan/page', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询排班计划详情 */
|
||||||
|
export function getPlan(id: number) {
|
||||||
|
return requestClient.get<MesCalPlanApi.Plan>(`/mes/cal/plan/get?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增排班计划 */
|
||||||
|
export function createPlan(data: MesCalPlanApi.Plan) {
|
||||||
|
return requestClient.post<number>('/mes/cal/plan/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改排班计划 */
|
||||||
|
export function updatePlan(data: MesCalPlanApi.Plan) {
|
||||||
|
return requestClient.put('/mes/cal/plan/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 确认排班计划 */
|
||||||
|
export function confirmPlan(id: number) {
|
||||||
|
return requestClient.put(`/mes/cal/plan/confirm?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除排班计划 */
|
||||||
|
export function deletePlan(id: number) {
|
||||||
|
return requestClient.delete(`/mes/cal/plan/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出排班计划 */
|
||||||
|
export function exportPlan(params: any) {
|
||||||
|
return requestClient.download('/mes/cal/plan/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesCalPlanShiftApi {
|
||||||
|
/** MES 计划班次 */
|
||||||
|
export interface PlanShift {
|
||||||
|
id?: number; // 班次编号
|
||||||
|
planId?: number; // 排班计划编号
|
||||||
|
sort?: number; // 显示顺序
|
||||||
|
name?: string; // 班次名称
|
||||||
|
startTime?: string; // 开始时间
|
||||||
|
endTime?: string; // 结束时间
|
||||||
|
remark?: string; // 备注
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询指定排班计划的班次列表 */
|
||||||
|
export function getPlanShiftListByPlan(planId: number) {
|
||||||
|
return requestClient.get<MesCalPlanShiftApi.PlanShift[]>(`/mes/cal/plan-shift/list-by-plan?planId=${planId}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增计划班次 */
|
||||||
|
export function createPlanShift(data: MesCalPlanShiftApi.PlanShift) {
|
||||||
|
return requestClient.post('/mes/cal/plan-shift/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改计划班次 */
|
||||||
|
export function updatePlanShift(data: MesCalPlanShiftApi.PlanShift) {
|
||||||
|
return requestClient.put('/mes/cal/plan-shift/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除计划班次 */
|
||||||
|
export function deletePlanShift(id: number) {
|
||||||
|
return requestClient.delete(`/mes/cal/plan-shift/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesCalPlanTeamApi {
|
||||||
|
/** MES 计划班组关联 */
|
||||||
|
export interface PlanTeam {
|
||||||
|
id?: number; // 关联编号
|
||||||
|
planId?: number; // 排班计划编号
|
||||||
|
teamId?: number; // 班组编号
|
||||||
|
teamCode?: string; // 班组编码
|
||||||
|
teamName?: string; // 班组名称
|
||||||
|
remark?: string; // 备注
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询指定排班计划的班组列表 */
|
||||||
|
export function getPlanTeamListByPlan(planId: number) {
|
||||||
|
return requestClient.get<MesCalPlanTeamApi.PlanTeam[]>(`/mes/cal/plan-team/list-by-plan?planId=${planId}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增计划班组关联 */
|
||||||
|
export function createPlanTeam(data: MesCalPlanTeamApi.PlanTeam) {
|
||||||
|
return requestClient.post('/mes/cal/plan-team/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除计划班组关联 */
|
||||||
|
export function deletePlanTeam(id: number) {
|
||||||
|
return requestClient.delete(`/mes/cal/plan-team/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesCalTeamApi {
|
||||||
|
/** MES 班组 */
|
||||||
|
export interface Team {
|
||||||
|
id?: number; // 班组编号
|
||||||
|
code?: string; // 班组编码
|
||||||
|
name?: string; // 班组名称
|
||||||
|
calendarType?: number; // 班组类型
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询班组分页 */
|
||||||
|
export function getTeamPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesCalTeamApi.Team>>('/mes/cal/team/page', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询班组列表 */
|
||||||
|
export function getTeamList() {
|
||||||
|
return requestClient.get<MesCalTeamApi.Team[]>('/mes/cal/team/list');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询班组详情 */
|
||||||
|
export function getTeam(id: number) {
|
||||||
|
return requestClient.get<MesCalTeamApi.Team>(`/mes/cal/team/get?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增班组 */
|
||||||
|
export function createTeam(data: MesCalTeamApi.Team) {
|
||||||
|
return requestClient.post('/mes/cal/team/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改班组 */
|
||||||
|
export function updateTeam(data: MesCalTeamApi.Team) {
|
||||||
|
return requestClient.put('/mes/cal/team/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除班组 */
|
||||||
|
export function deleteTeam(id: number) {
|
||||||
|
return requestClient.delete(`/mes/cal/team/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出班组 */
|
||||||
|
export function exportTeam(params: any) {
|
||||||
|
return requestClient.download('/mes/cal/team/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesCalTeamMemberApi {
|
||||||
|
/** MES 班组成员 */
|
||||||
|
export interface TeamMember {
|
||||||
|
id?: number; // 成员编号
|
||||||
|
teamId?: number; // 班组编号
|
||||||
|
userId?: number; // 用户编号
|
||||||
|
nickname?: string; // 用户昵称
|
||||||
|
telephone?: string; // 用户手机号
|
||||||
|
remark?: string; // 备注
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 创建班组成员 */
|
||||||
|
export function createTeamMember(data: MesCalTeamMemberApi.TeamMember) {
|
||||||
|
return requestClient.post('/mes/cal/team-member/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除班组成员 */
|
||||||
|
export function deleteTeamMember(id: number) {
|
||||||
|
return requestClient.delete(`/mes/cal/team-member/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询班组成员分页 */
|
||||||
|
export function getTeamMemberPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesCalTeamMemberApi.TeamMember>>('/mes/cal/team-member/page', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询指定班组的成员列表 */
|
||||||
|
export function getTeamMemberListByTeam(teamId: number) {
|
||||||
|
return requestClient.get<MesCalTeamMemberApi.TeamMember[]>('/mes/cal/team-member/list-by-team', { params: { teamId } });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询多个班组的成员列表 */
|
||||||
|
export function getTeamMemberListByTeamIds(teamIds: number[]) {
|
||||||
|
return requestClient.get<MesCalTeamMemberApi.TeamMember[]>('/mes/cal/team-member/list-by-team', {
|
||||||
|
params: { teamIds: teamIds.join(',') },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesDvCheckPlanApi {
|
||||||
|
/** MES 点检保养方案 */
|
||||||
|
export interface CheckPlan {
|
||||||
|
id?: number; // 方案编号
|
||||||
|
code?: string; // 方案编码
|
||||||
|
name?: string; // 方案名称
|
||||||
|
type?: number; // 方案类型
|
||||||
|
startDate?: Date | number; // 开始日期
|
||||||
|
endDate?: Date | number; // 结束日期
|
||||||
|
cycleType?: number; // 周期类型
|
||||||
|
cycleCount?: number; // 周期数量
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询点检保养方案分页 */
|
||||||
|
export function getCheckPlanPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesDvCheckPlanApi.CheckPlan>>('/mes/dv/check-plan/page', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询点检保养方案详情 */
|
||||||
|
export function getCheckPlan(id: number) {
|
||||||
|
return requestClient.get<MesDvCheckPlanApi.CheckPlan>(`/mes/dv/check-plan/get?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增点检保养方案 */
|
||||||
|
export function createCheckPlan(data: MesDvCheckPlanApi.CheckPlan) {
|
||||||
|
return requestClient.post<number>('/mes/dv/check-plan/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改点检保养方案 */
|
||||||
|
export function updateCheckPlan(data: MesDvCheckPlanApi.CheckPlan) {
|
||||||
|
return requestClient.put('/mes/dv/check-plan/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 启用点检保养方案 */
|
||||||
|
export function enableCheckPlan(id: number) {
|
||||||
|
return requestClient.put(`/mes/dv/check-plan/enable?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 停用点检保养方案 */
|
||||||
|
export function disableCheckPlan(id: number) {
|
||||||
|
return requestClient.put(`/mes/dv/check-plan/disable?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除点检保养方案 */
|
||||||
|
export function deleteCheckPlan(id: number) {
|
||||||
|
return requestClient.delete(`/mes/dv/check-plan/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出点检保养方案 */
|
||||||
|
export function exportCheckPlan(params: any) {
|
||||||
|
return requestClient.download('/mes/dv/check-plan/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesDvCheckPlanMachineryApi {
|
||||||
|
/** MES 点检保养方案设备 */
|
||||||
|
export interface CheckPlanMachinery {
|
||||||
|
id?: number; // 关联编号
|
||||||
|
planId?: number; // 方案编号
|
||||||
|
machineryId?: number; // 设备编号
|
||||||
|
machineryCode?: string; // 设备编码
|
||||||
|
machineryName?: string; // 设备名称
|
||||||
|
machineryBrand?: string; // 品牌
|
||||||
|
machinerySpecification?: string; // 规格型号
|
||||||
|
remark?: string; // 备注
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询指定方案的设备列表 */
|
||||||
|
export function getCheckPlanMachineryListByPlan(planId: number) {
|
||||||
|
return requestClient.get<MesDvCheckPlanMachineryApi.CheckPlanMachinery[]>(`/mes/dv/check-plan-machinery/list-by-plan?planId=${planId}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增方案设备关联 */
|
||||||
|
export function createCheckPlanMachinery(data: MesDvCheckPlanMachineryApi.CheckPlanMachinery) {
|
||||||
|
return requestClient.post('/mes/dv/check-plan-machinery/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除方案设备关联 */
|
||||||
|
export function deleteCheckPlanMachinery(id: number) {
|
||||||
|
return requestClient.delete(`/mes/dv/check-plan-machinery/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesDvCheckPlanSubjectApi {
|
||||||
|
/** MES 点检保养方案项目 */
|
||||||
|
export interface CheckPlanSubject {
|
||||||
|
id?: number; // 关联编号
|
||||||
|
planId?: number; // 方案编号
|
||||||
|
subjectId?: number; // 项目编号
|
||||||
|
subjectCode?: string; // 项目编码
|
||||||
|
subjectName?: string; // 项目名称
|
||||||
|
subjectType?: number; // 项目类型
|
||||||
|
subjectContent?: string; // 项目内容
|
||||||
|
subjectStandard?: string; // 标准
|
||||||
|
remark?: string; // 备注
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询指定方案的项目列表 */
|
||||||
|
export function getCheckPlanSubjectListByPlan(planId: number) {
|
||||||
|
return requestClient.get<MesDvCheckPlanSubjectApi.CheckPlanSubject[]>(`/mes/dv/check-plan-subject/list-by-plan?planId=${planId}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增方案项目关联 */
|
||||||
|
export function createCheckPlanSubject(data: MesDvCheckPlanSubjectApi.CheckPlanSubject) {
|
||||||
|
return requestClient.post('/mes/dv/check-plan-subject/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除方案项目关联 */
|
||||||
|
export function deleteCheckPlanSubject(id: number) {
|
||||||
|
return requestClient.delete(`/mes/dv/check-plan-subject/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesDvCheckRecordApi {
|
||||||
|
/** MES 设备点检记录 */
|
||||||
|
export interface CheckRecord {
|
||||||
|
id?: number; // 记录编号
|
||||||
|
planId?: number; // 点检计划编号
|
||||||
|
planName?: string; // 计划名称
|
||||||
|
machineryId?: number; // 设备编号
|
||||||
|
machineryCode?: string; // 设备编码
|
||||||
|
machineryName?: string; // 设备名称
|
||||||
|
machineryBrand?: string; // 品牌
|
||||||
|
machinerySpecification?: string; // 规格型号
|
||||||
|
checkTime?: Date | number; // 点检时间
|
||||||
|
userId?: number; // 点检人编号
|
||||||
|
nickname?: string; // 点检人名称
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备点检记录分页 */
|
||||||
|
export function getCheckRecordPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesDvCheckRecordApi.CheckRecord>>('/mes/dv/check-record/page', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备点检记录详情 */
|
||||||
|
export function getCheckRecord(id: number) {
|
||||||
|
return requestClient.get<MesDvCheckRecordApi.CheckRecord>(`/mes/dv/check-record/get?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增设备点检记录 */
|
||||||
|
export function createCheckRecord(data: MesDvCheckRecordApi.CheckRecord) {
|
||||||
|
return requestClient.post<number>('/mes/dv/check-record/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改设备点检记录 */
|
||||||
|
export function updateCheckRecord(data: MesDvCheckRecordApi.CheckRecord) {
|
||||||
|
return requestClient.put('/mes/dv/check-record/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 提交设备点检记录 */
|
||||||
|
export function submitCheckRecord(id: number) {
|
||||||
|
return requestClient.put(`/mes/dv/check-record/submit?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除设备点检记录 */
|
||||||
|
export function deleteCheckRecord(id: number) {
|
||||||
|
return requestClient.delete(`/mes/dv/check-record/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出设备点检记录 */
|
||||||
|
export function exportCheckRecord(params: any) {
|
||||||
|
return requestClient.download('/mes/dv/check-record/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesDvCheckRecordLineApi {
|
||||||
|
/** MES 设备点检记录明细 */
|
||||||
|
export interface CheckRecordLine {
|
||||||
|
id?: number; // 明细编号
|
||||||
|
recordId?: number; // 点检记录编号
|
||||||
|
subjectId?: number; // 点检项目编号
|
||||||
|
subjectCode?: string; // 项目编码
|
||||||
|
subjectName?: string; // 项目名称
|
||||||
|
subjectContent?: string; // 检查内容
|
||||||
|
subjectStandard?: string; // 检查标准
|
||||||
|
checkStatus?: number; // 点检结果
|
||||||
|
checkResult?: string; // 异常描述
|
||||||
|
remark?: string; // 备注
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备点检记录明细分页 */
|
||||||
|
export function getCheckRecordLinePage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesDvCheckRecordLineApi.CheckRecordLine>>('/mes/dv/check-record-line/page', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备点检记录明细详情 */
|
||||||
|
export function getCheckRecordLine(id: number) {
|
||||||
|
return requestClient.get<MesDvCheckRecordLineApi.CheckRecordLine>(`/mes/dv/check-record-line/get?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增设备点检记录明细 */
|
||||||
|
export function createCheckRecordLine(data: MesDvCheckRecordLineApi.CheckRecordLine) {
|
||||||
|
return requestClient.post('/mes/dv/check-record-line/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改设备点检记录明细 */
|
||||||
|
export function updateCheckRecordLine(data: MesDvCheckRecordLineApi.CheckRecordLine) {
|
||||||
|
return requestClient.put('/mes/dv/check-record-line/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除设备点检记录明细 */
|
||||||
|
export function deleteCheckRecordLine(id: number) {
|
||||||
|
return requestClient.delete(`/mes/dv/check-record-line/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,78 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesDvMachineryApi {
|
||||||
|
/** MES 设备台账 */
|
||||||
|
export interface Machinery {
|
||||||
|
id?: number; // 设备编号
|
||||||
|
code?: string; // 设备编码
|
||||||
|
name?: string; // 设备名称
|
||||||
|
brand?: string; // 品牌
|
||||||
|
specification?: string; // 规格型号
|
||||||
|
machineryTypeId?: number; // 设备类型编号
|
||||||
|
machineryTypeName?: string; // 设备类型名称
|
||||||
|
workshopId?: number; // 所属车间编号
|
||||||
|
workshopName?: string; // 所属车间名称
|
||||||
|
status?: number; // 设备状态
|
||||||
|
lastMaintenTime?: Date; // 最近保养时间
|
||||||
|
lastCheckTime?: Date; // 最近点检时间
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 设备导入结果 */
|
||||||
|
export interface MachineryImportRespVO {
|
||||||
|
createCodes?: string[]; // 新增成功的设备编码
|
||||||
|
updateCodes?: string[]; // 更新成功的设备编码
|
||||||
|
failureCodes?: Record<string, string>; // 导入失败的设备编码及原因
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备分页 */
|
||||||
|
export function getMachineryPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesDvMachineryApi.Machinery>>('/mes/dv/machinery/page', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备精简列表 */
|
||||||
|
export function getMachinerySimpleList() {
|
||||||
|
return requestClient.get<MesDvMachineryApi.Machinery[]>('/mes/dv/machinery/simple-list');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备详情 */
|
||||||
|
export function getMachinery(id: number) {
|
||||||
|
return requestClient.get<MesDvMachineryApi.Machinery>(`/mes/dv/machinery/get?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增设备 */
|
||||||
|
export function createMachinery(data: MesDvMachineryApi.Machinery) {
|
||||||
|
return requestClient.post('/mes/dv/machinery/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改设备 */
|
||||||
|
export function updateMachinery(data: MesDvMachineryApi.Machinery) {
|
||||||
|
return requestClient.put('/mes/dv/machinery/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除设备 */
|
||||||
|
export function deleteMachinery(id: number) {
|
||||||
|
return requestClient.delete(`/mes/dv/machinery/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出设备 */
|
||||||
|
export function exportMachinery(params: any) {
|
||||||
|
return requestClient.download('/mes/dv/machinery/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 下载设备导入模板 */
|
||||||
|
export function importMachineryTemplate() {
|
||||||
|
return requestClient.download('/mes/dv/machinery/get-import-template');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导入设备 */
|
||||||
|
export function importMachinery(file: File, updateSupport: boolean) {
|
||||||
|
return requestClient.upload<MesDvMachineryApi.MachineryImportRespVO>(
|
||||||
|
'/mes/dv/machinery/import?updateSupport=' + updateSupport,
|
||||||
|
{ file },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesDvMachineryTypeApi {
|
||||||
|
/** MES 设备类型 */
|
||||||
|
export interface MachineryType {
|
||||||
|
id?: number; // 设备类型编号
|
||||||
|
parentId?: number; // 父类型编号
|
||||||
|
code?: string; // 类型编码
|
||||||
|
name?: string; // 类型名称
|
||||||
|
sort?: number; // 显示排序
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
children?: MachineryType[]; // 子类型
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备类型列表 */
|
||||||
|
export function getMachineryTypeList(params?: any) {
|
||||||
|
return requestClient.get<MesDvMachineryTypeApi.MachineryType[]>('/mes/dv/machinery-type/list', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备类型精简列表 */
|
||||||
|
export function getMachineryTypeSimpleList() {
|
||||||
|
return requestClient.get<MesDvMachineryTypeApi.MachineryType[]>('/mes/dv/machinery-type/simple-list');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备类型详情 */
|
||||||
|
export function getMachineryType(id: number) {
|
||||||
|
return requestClient.get<MesDvMachineryTypeApi.MachineryType>(`/mes/dv/machinery-type/get?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增设备类型 */
|
||||||
|
export function createMachineryType(data: MesDvMachineryTypeApi.MachineryType) {
|
||||||
|
return requestClient.post('/mes/dv/machinery-type/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改设备类型 */
|
||||||
|
export function updateMachineryType(data: MesDvMachineryTypeApi.MachineryType) {
|
||||||
|
return requestClient.put('/mes/dv/machinery-type/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除设备类型 */
|
||||||
|
export function deleteMachineryType(id: number) {
|
||||||
|
return requestClient.delete(`/mes/dv/machinery-type/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesDvMaintenRecordApi {
|
||||||
|
/** MES 设备保养记录 */
|
||||||
|
export interface MaintenRecord {
|
||||||
|
id?: number; // 记录编号
|
||||||
|
planId?: number; // 计划编号
|
||||||
|
planName?: string; // 计划名称
|
||||||
|
machineryId?: number; // 设备编号
|
||||||
|
machineryCode?: string; // 设备编码
|
||||||
|
machineryName?: string; // 设备名称
|
||||||
|
machineryBrand?: string; // 品牌
|
||||||
|
machinerySpecification?: string; // 规格型号
|
||||||
|
maintenTime?: Date | number; // 保养时间
|
||||||
|
userId?: number; // 用户编号
|
||||||
|
nickname?: string; // 保养人名称
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备保养记录分页 */
|
||||||
|
export function getMaintenRecordPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesDvMaintenRecordApi.MaintenRecord>>('/mes/dv/mainten-record/page', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备保养记录详情 */
|
||||||
|
export function getMaintenRecord(id: number) {
|
||||||
|
return requestClient.get<MesDvMaintenRecordApi.MaintenRecord>(`/mes/dv/mainten-record/get?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增设备保养记录 */
|
||||||
|
export function createMaintenRecord(data: MesDvMaintenRecordApi.MaintenRecord) {
|
||||||
|
return requestClient.post<number>('/mes/dv/mainten-record/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改设备保养记录 */
|
||||||
|
export function updateMaintenRecord(data: MesDvMaintenRecordApi.MaintenRecord) {
|
||||||
|
return requestClient.put('/mes/dv/mainten-record/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 提交设备保养记录 */
|
||||||
|
export function submitMaintenRecord(id: number) {
|
||||||
|
return requestClient.put(`/mes/dv/mainten-record/submit?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除设备保养记录 */
|
||||||
|
export function deleteMaintenRecord(id: number) {
|
||||||
|
return requestClient.delete(`/mes/dv/mainten-record/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出设备保养记录 */
|
||||||
|
export function exportMaintenRecord(params: any) {
|
||||||
|
return requestClient.download('/mes/dv/mainten-record/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesDvMaintenRecordLineApi {
|
||||||
|
/** MES 设备保养记录明细 */
|
||||||
|
export interface MaintenRecordLine {
|
||||||
|
id?: number; // 明细编号
|
||||||
|
recordId?: number; // 保养记录编号
|
||||||
|
subjectId?: number; // 项目编号
|
||||||
|
subjectName?: string; // 项目名称
|
||||||
|
subjectContent?: string; // 项目内容
|
||||||
|
subjectStandard?: string; // 项目标准
|
||||||
|
status?: number; // 保养结果
|
||||||
|
result?: string; // 异常描述
|
||||||
|
remark?: string; // 备注
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备保养记录明细分页 */
|
||||||
|
export function getMaintenRecordLinePage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesDvMaintenRecordLineApi.MaintenRecordLine>>('/mes/dv/mainten-record-line/page', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备保养记录明细详情 */
|
||||||
|
export function getMaintenRecordLine(id: number) {
|
||||||
|
return requestClient.get<MesDvMaintenRecordLineApi.MaintenRecordLine>(`/mes/dv/mainten-record-line/get?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增设备保养记录明细 */
|
||||||
|
export function createMaintenRecordLine(data: MesDvMaintenRecordLineApi.MaintenRecordLine) {
|
||||||
|
return requestClient.post('/mes/dv/mainten-record-line/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改设备保养记录明细 */
|
||||||
|
export function updateMaintenRecordLine(data: MesDvMaintenRecordLineApi.MaintenRecordLine) {
|
||||||
|
return requestClient.put('/mes/dv/mainten-record-line/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除设备保养记录明细 */
|
||||||
|
export function deleteMaintenRecordLine(id: number) {
|
||||||
|
return requestClient.delete(`/mes/dv/mainten-record-line/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,76 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesDvRepairApi {
|
||||||
|
/** MES 维修工单 */
|
||||||
|
export interface Repair {
|
||||||
|
id?: number; // 工单编号
|
||||||
|
code?: string; // 维修工单编码
|
||||||
|
name?: string; // 维修工单名称
|
||||||
|
machineryId?: number; // 设备编号
|
||||||
|
machineryCode?: string; // 设备编码
|
||||||
|
machineryName?: string; // 设备名称
|
||||||
|
machineryBrand?: string; // 品牌
|
||||||
|
machinerySpecification?: string; // 规格型号
|
||||||
|
requireDate?: Date | number; // 报修日期
|
||||||
|
finishDate?: Date | number; // 维修完成日期
|
||||||
|
confirmDate?: Date | number; // 验收日期
|
||||||
|
result?: number; // 维修结果
|
||||||
|
acceptedUserId?: number; // 维修人编号
|
||||||
|
acceptedUserNickname?: string; // 维修人名称
|
||||||
|
confirmUserId?: number; // 验收人编号
|
||||||
|
confirmUserNickname?: string; // 验收人名称
|
||||||
|
sourceDocType?: number; // 来源单据类型
|
||||||
|
sourceDocId?: number; // 来源单据编号
|
||||||
|
sourceDocCode?: string; // 来源单据编码
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询维修工单分页 */
|
||||||
|
export function getRepairPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesDvRepairApi.Repair>>('/mes/dv/repair/page', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询维修工单详情 */
|
||||||
|
export function getRepair(id: number) {
|
||||||
|
return requestClient.get<MesDvRepairApi.Repair>(`/mes/dv/repair/get?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增维修工单 */
|
||||||
|
export function createRepair(data: MesDvRepairApi.Repair) {
|
||||||
|
return requestClient.post<number>('/mes/dv/repair/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改维修工单 */
|
||||||
|
export function updateRepair(data: MesDvRepairApi.Repair) {
|
||||||
|
return requestClient.put('/mes/dv/repair/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除维修工单 */
|
||||||
|
export function deleteRepair(id: number) {
|
||||||
|
return requestClient.delete(`/mes/dv/repair/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出维修工单 */
|
||||||
|
export function exportRepair(params: any) {
|
||||||
|
return requestClient.download('/mes/dv/repair/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 提交维修工单 */
|
||||||
|
export function submitRepair(id: number) {
|
||||||
|
return requestClient.put(`/mes/dv/repair/submit?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 确认维修完成 */
|
||||||
|
export function confirmRepair(data: MesDvRepairApi.Repair) {
|
||||||
|
return requestClient.put('/mes/dv/repair/confirm', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 完成验收 */
|
||||||
|
export function finishRepair(id: number, result: number) {
|
||||||
|
return requestClient.put(`/mes/dv/repair/finish?id=${id}&result=${result}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesDvRepairLineApi {
|
||||||
|
/** MES 维修工单行 */
|
||||||
|
export interface RepairLine {
|
||||||
|
id?: number; // 明细编号
|
||||||
|
repairId?: number; // 维修工单编号
|
||||||
|
subjectId?: number; // 项目编号
|
||||||
|
subjectName?: string; // 项目名称
|
||||||
|
subjectContent?: string; // 项目内容
|
||||||
|
subjectStandard?: string; // 项目标准
|
||||||
|
malfunction?: string; // 故障描述
|
||||||
|
malfunctionUrl?: string; // 故障图片 URL
|
||||||
|
description?: string; // 维修描述
|
||||||
|
remark?: string; // 备注
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询维修工单行分页 */
|
||||||
|
export function getRepairLinePage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesDvRepairLineApi.RepairLine>>('/mes/dv/repair-line/page', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询维修工单行详情 */
|
||||||
|
export function getRepairLine(id: number) {
|
||||||
|
return requestClient.get<MesDvRepairLineApi.RepairLine>(`/mes/dv/repair-line/get?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增维修工单行 */
|
||||||
|
export function createRepairLine(data: MesDvRepairLineApi.RepairLine) {
|
||||||
|
return requestClient.post('/mes/dv/repair-line/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改维修工单行 */
|
||||||
|
export function updateRepairLine(data: MesDvRepairLineApi.RepairLine) {
|
||||||
|
return requestClient.put('/mes/dv/repair-line/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除维修工单行 */
|
||||||
|
export function deleteRepairLine(id: number) {
|
||||||
|
return requestClient.delete(`/mes/dv/repair-line/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesDvSubjectApi {
|
||||||
|
/** MES 点检保养项目 */
|
||||||
|
export interface Subject {
|
||||||
|
id?: number; // 项目编号
|
||||||
|
code?: string; // 项目编码
|
||||||
|
name?: string; // 项目名称
|
||||||
|
type?: number; // 项目类型
|
||||||
|
content?: string; // 项目内容
|
||||||
|
standard?: string; // 标准
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询点检保养项目分页 */
|
||||||
|
export function getSubjectPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesDvSubjectApi.Subject>>('/mes/dv/subject/page', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询点检保养项目精简列表 */
|
||||||
|
export function getSubjectSimpleList() {
|
||||||
|
return requestClient.get<MesDvSubjectApi.Subject[]>('/mes/dv/subject/simple-list');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询点检保养项目详情 */
|
||||||
|
export function getSubject(id: number) {
|
||||||
|
return requestClient.get<MesDvSubjectApi.Subject>(`/mes/dv/subject/get?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增点检保养项目 */
|
||||||
|
export function createSubject(data: MesDvSubjectApi.Subject) {
|
||||||
|
return requestClient.post('/mes/dv/subject/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改点检保养项目 */
|
||||||
|
export function updateSubject(data: MesDvSubjectApi.Subject) {
|
||||||
|
return requestClient.put('/mes/dv/subject/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除点检保养项目 */
|
||||||
|
export function deleteSubject(id: number) {
|
||||||
|
return requestClient.delete(`/mes/dv/subject/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出点检保养项目 */
|
||||||
|
export function exportSubject(params: any) {
|
||||||
|
return requestClient.download('/mes/dv/subject/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdAutoCodePartApi {
|
||||||
|
/** MES 编码规则分段 */
|
||||||
|
export interface AutoCodePart {
|
||||||
|
id?: number; // 分段编号
|
||||||
|
ruleId?: number; // 规则编号
|
||||||
|
sort?: number; // 排序
|
||||||
|
type?: number; // 分段类型
|
||||||
|
length?: number; // 长度
|
||||||
|
dateFormat?: string; // 日期格式
|
||||||
|
fixCharacter?: string; // 固定字符
|
||||||
|
serialStartNo?: number; // 流水号起始值
|
||||||
|
serialStep?: number; // 流水号步长
|
||||||
|
cycleFlag?: boolean; // 是否循环
|
||||||
|
cycleMethod?: number; // 循环方式
|
||||||
|
remark?: string; // 备注
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询编码规则分段详情 */
|
||||||
|
export function getAutoCodePart(id: number) {
|
||||||
|
return requestClient.get<MesMdAutoCodePartApi.AutoCodePart>(
|
||||||
|
`/mes/md/auto-code-part/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询编码规则分段列表 */
|
||||||
|
export function getAutoCodePartListByRuleId(ruleId: number) {
|
||||||
|
return requestClient.get<MesMdAutoCodePartApi.AutoCodePart[]>(
|
||||||
|
'/mes/md/auto-code-part/list-by-rule-id',
|
||||||
|
{ params: { ruleId } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增编码规则分段 */
|
||||||
|
export function createAutoCodePart(
|
||||||
|
data: MesMdAutoCodePartApi.AutoCodePart,
|
||||||
|
) {
|
||||||
|
return requestClient.post('/mes/md/auto-code-part/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改编码规则分段 */
|
||||||
|
export function updateAutoCodePart(
|
||||||
|
data: MesMdAutoCodePartApi.AutoCodePart,
|
||||||
|
) {
|
||||||
|
return requestClient.put('/mes/md/auto-code-part/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除编码规则分段 */
|
||||||
|
export function deleteAutoCodePart(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md/auto-code-part/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
/** 生成 MES 编码 */
|
||||||
|
export function generateAutoCode(ruleCode: string, inputChar?: string) {
|
||||||
|
return requestClient.post<string>('/mes/md/auto-code-record/generate', {
|
||||||
|
inputChar,
|
||||||
|
ruleCode,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdAutoCodeRuleApi {
|
||||||
|
/** MES 编码规则 */
|
||||||
|
export interface AutoCodeRule {
|
||||||
|
id?: number; // 规则编号
|
||||||
|
code?: string; // 规则编码
|
||||||
|
name?: string; // 规则名称
|
||||||
|
description?: string; // 规则描述
|
||||||
|
maxLength?: number; // 最大长度
|
||||||
|
padded?: boolean; // 是否补齐
|
||||||
|
paddedChar?: string; // 补齐字符
|
||||||
|
paddedMethod?: number; // 补齐方式
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询编码规则分页 */
|
||||||
|
export function getAutoCodeRulePage(params: PageParam) {
|
||||||
|
return requestClient.get<
|
||||||
|
PageResult<MesMdAutoCodeRuleApi.AutoCodeRule>
|
||||||
|
>('/mes/md/auto-code-rule/page', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询编码规则详情 */
|
||||||
|
export function getAutoCodeRule(id: number) {
|
||||||
|
return requestClient.get<MesMdAutoCodeRuleApi.AutoCodeRule>(
|
||||||
|
`/mes/md/auto-code-rule/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增编码规则 */
|
||||||
|
export function createAutoCodeRule(
|
||||||
|
data: MesMdAutoCodeRuleApi.AutoCodeRule,
|
||||||
|
) {
|
||||||
|
return requestClient.post('/mes/md/auto-code-rule/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改编码规则 */
|
||||||
|
export function updateAutoCodeRule(
|
||||||
|
data: MesMdAutoCodeRuleApi.AutoCodeRule,
|
||||||
|
) {
|
||||||
|
return requestClient.put('/mes/md/auto-code-rule/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除编码规则 */
|
||||||
|
export function deleteAutoCodeRule(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md/auto-code-rule/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出编码规则 */
|
||||||
|
export function exportAutoCodeRule(params: PageParam) {
|
||||||
|
return requestClient.download('/mes/md/auto-code-rule/export-excel', {
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,86 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdClientApi {
|
||||||
|
/** MES 客户 */
|
||||||
|
export interface Client {
|
||||||
|
id?: number; // 客户编号
|
||||||
|
code?: string; // 客户编码
|
||||||
|
name?: string; // 客户名称
|
||||||
|
nickname?: string; // 客户简称
|
||||||
|
englishName?: string; // 客户英文名称
|
||||||
|
description?: string; // 客户简介
|
||||||
|
logo?: string; // 客户 LOGO 地址
|
||||||
|
type?: number; // 客户类型
|
||||||
|
address?: string; // 客户地址
|
||||||
|
website?: string; // 客户官网地址
|
||||||
|
email?: string; // 客户邮箱地址
|
||||||
|
telephone?: string; // 客户电话
|
||||||
|
contact1Name?: string; // 联系人1
|
||||||
|
contact1Telephone?: string; // 联系人1电话
|
||||||
|
contact1Email?: string; // 联系人1邮箱
|
||||||
|
contact2Name?: string; // 联系人2
|
||||||
|
contact2Telephone?: string; // 联系人2电话
|
||||||
|
contact2Email?: string; // 联系人2邮箱
|
||||||
|
creditCode?: string; // 统一社会信用代码
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 客户导入结果 */
|
||||||
|
export interface ClientImportRespVO {
|
||||||
|
createCodes?: string[]; // 新增成功的客户编码
|
||||||
|
updateCodes?: string[]; // 更新成功的客户编码
|
||||||
|
failureCodes?: Record<string, string>; // 导入失败的客户编码及原因
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询客户分页 */
|
||||||
|
export function getClientPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesMdClientApi.Client>>(
|
||||||
|
'/mes/md-client/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询客户详情 */
|
||||||
|
export function getClient(id: number) {
|
||||||
|
return requestClient.get<MesMdClientApi.Client>(
|
||||||
|
`/mes/md-client/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增客户 */
|
||||||
|
export function createClient(data: MesMdClientApi.Client) {
|
||||||
|
return requestClient.post('/mes/md-client/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改客户 */
|
||||||
|
export function updateClient(data: MesMdClientApi.Client) {
|
||||||
|
return requestClient.put('/mes/md-client/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除客户 */
|
||||||
|
export function deleteClient(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md-client/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出客户 */
|
||||||
|
export function exportClient(params: any) {
|
||||||
|
return requestClient.download('/mes/md-client/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 下载客户导入模板 */
|
||||||
|
export function importClientTemplate() {
|
||||||
|
return requestClient.download('/mes/md-client/get-import-template');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导入客户 */
|
||||||
|
export function importClient(file: File, updateSupport: boolean) {
|
||||||
|
return requestClient.upload<MesMdClientApi.ClientImportRespVO>(
|
||||||
|
`/mes/md-client/import?updateSupport=${updateSupport}`,
|
||||||
|
{ file },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdItemBatchConfigApi {
|
||||||
|
/** MES 物料批次属性配置 */
|
||||||
|
export interface BatchConfig {
|
||||||
|
id?: number; // 编号
|
||||||
|
itemId?: number; // 物料编号
|
||||||
|
produceDateFlag?: boolean; // 批次属性-生产日期
|
||||||
|
expireDateFlag?: boolean; // 批次属性-有效期
|
||||||
|
receiptDateFlag?: boolean; // 批次属性-入库日期
|
||||||
|
vendorFlag?: boolean; // 批次属性-供应商
|
||||||
|
clientFlag?: boolean; // 批次属性-客户
|
||||||
|
salesOrderCodeFlag?: boolean; // 批次属性-销售订单编号
|
||||||
|
purchaseOrderCodeFlag?: boolean; // 批次属性-采购订单编号
|
||||||
|
workorderFlag?: boolean; // 批次属性-生产工单
|
||||||
|
taskFlag?: boolean; // 批次属性-生产任务
|
||||||
|
workstationFlag?: boolean; // 批次属性-工作站
|
||||||
|
toolFlag?: boolean; // 批次属性-工具
|
||||||
|
moldFlag?: boolean; // 批次属性-模具
|
||||||
|
lotNumberFlag?: boolean; // 批次属性-生产批号
|
||||||
|
qualityStatusFlag?: boolean; // 批次属性-质量状态
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 根据物料编号获取批次属性配置 */
|
||||||
|
export function getBatchConfigByItemId(itemId: number) {
|
||||||
|
return requestClient.get<MesMdItemBatchConfigApi.BatchConfig>(
|
||||||
|
`/mes/md/item-batch-config/get-by-item-id?itemId=${itemId}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 保存批次属性配置 */
|
||||||
|
export function saveBatchConfig(
|
||||||
|
data: MesMdItemBatchConfigApi.BatchConfig,
|
||||||
|
) {
|
||||||
|
return requestClient.post('/mes/md/item-batch-config/save', data);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,85 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdItemApi {
|
||||||
|
/** MES 物料产品 */
|
||||||
|
export interface Item {
|
||||||
|
id?: number; // 物料编号
|
||||||
|
code?: string; // 物料编码
|
||||||
|
name?: string; // 物料名称
|
||||||
|
specification?: string; // 规格型号
|
||||||
|
unitMeasureId?: number; // 计量单位编号
|
||||||
|
unitMeasureName?: string; // 计量单位名称
|
||||||
|
itemTypeId?: number; // 物料分类编号
|
||||||
|
itemTypeName?: string; // 物料分类名称
|
||||||
|
itemOrProduct?: string; // 物料/产品标识
|
||||||
|
status?: number; // 状态
|
||||||
|
safeStockFlag?: boolean; // 是否启用安全库存
|
||||||
|
minStock?: number; // 最低库存量
|
||||||
|
maxStock?: number; // 最高库存量
|
||||||
|
highValue?: boolean; // 是否高值物料
|
||||||
|
batchFlag?: boolean; // 是否启用批次管理
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 物料导入结果 */
|
||||||
|
export interface ItemImportRespVO {
|
||||||
|
createCodes?: string[]; // 新增成功的物料编码
|
||||||
|
updateCodes?: string[]; // 更新成功的物料编码
|
||||||
|
failureCodes?: Record<string, string>; // 导入失败的物料编码及原因
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询物料产品分页 */
|
||||||
|
export function getItemPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesMdItemApi.Item>>('/mes/md/item/page', {
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询物料产品详情 */
|
||||||
|
export function getItem(id: number) {
|
||||||
|
return requestClient.get<MesMdItemApi.Item>(`/mes/md/item/get?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增物料产品 */
|
||||||
|
export function createItem(data: MesMdItemApi.Item) {
|
||||||
|
return requestClient.post<number>('/mes/md/item/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改物料产品 */
|
||||||
|
export function updateItem(data: MesMdItemApi.Item) {
|
||||||
|
return requestClient.put('/mes/md/item/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改物料产品状态 */
|
||||||
|
export function updateItemStatus(id: number, status: number) {
|
||||||
|
return requestClient.put('/mes/md/item/update-status', undefined, {
|
||||||
|
params: { id, status },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除物料产品 */
|
||||||
|
export function deleteItem(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md/item/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出物料产品 */
|
||||||
|
export function exportItem(params: any) {
|
||||||
|
return requestClient.download('/mes/md/item/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 下载物料导入模板 */
|
||||||
|
export function importItemTemplate() {
|
||||||
|
return requestClient.download('/mes/md/item/get-import-template');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导入物料产品 */
|
||||||
|
export function importItem(file: File, updateSupport: boolean) {
|
||||||
|
return requestClient.upload<MesMdItemApi.ItemImportRespVO>(
|
||||||
|
`/mes/md/item/import?updateSupport=${updateSupport}`,
|
||||||
|
{ file },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdProductBomApi {
|
||||||
|
/** MES 产品 BOM */
|
||||||
|
export interface ProductBom {
|
||||||
|
id?: number; // BOM 编号
|
||||||
|
itemId?: number; // 物料产品编号
|
||||||
|
bomItemId?: number; // BOM 物料编号
|
||||||
|
quantity?: number; // 物料使用比例
|
||||||
|
status?: number; // 是否启用
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
bomItemCode?: string; // BOM 物料编码
|
||||||
|
bomItemName?: string; // BOM 物料名称
|
||||||
|
bomItemSpecification?: string; // BOM 物料规格
|
||||||
|
unitMeasureName?: string; // 计量单位名称
|
||||||
|
itemOrProduct?: string; // 物料/产品标识
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增产品 BOM */
|
||||||
|
export function createProductBom(data: MesMdProductBomApi.ProductBom) {
|
||||||
|
return requestClient.post('/mes/md/product-bom/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改产品 BOM */
|
||||||
|
export function updateProductBom(data: MesMdProductBomApi.ProductBom) {
|
||||||
|
return requestClient.put('/mes/md/product-bom/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除产品 BOM */
|
||||||
|
export function deleteProductBom(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md/product-bom/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询产品 BOM 详情 */
|
||||||
|
export function getProductBom(id: number) {
|
||||||
|
return requestClient.get<MesMdProductBomApi.ProductBom>(
|
||||||
|
`/mes/md/product-bom/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询产品 BOM 分页 */
|
||||||
|
export function getProductBomPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesMdProductBomApi.ProductBom>>(
|
||||||
|
'/mes/md/product-bom/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 根据物料产品编号查询产品 BOM 列表 */
|
||||||
|
export function getProductBomListByItemId(itemId: number) {
|
||||||
|
return requestClient.get<MesMdProductBomApi.ProductBom[]>(
|
||||||
|
`/mes/md/product-bom/list-by-item-id?itemId=${itemId}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdProductSipApi {
|
||||||
|
/** MES 产品 SIP */
|
||||||
|
export interface ProductSip {
|
||||||
|
id?: number; // SIP 编号
|
||||||
|
itemId?: number; // 物料产品编号
|
||||||
|
sort?: number; // 排列顺序
|
||||||
|
processId?: number; // 工序编号
|
||||||
|
title?: string; // 标题
|
||||||
|
description?: string; // 详细描述
|
||||||
|
url?: string; // 图片地址
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
processCode?: string; // 工序编码
|
||||||
|
processName?: string; // 工序名称
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增产品 SIP */
|
||||||
|
export function createProductSip(data: MesMdProductSipApi.ProductSip) {
|
||||||
|
return requestClient.post('/mes/md/product-sip/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改产品 SIP */
|
||||||
|
export function updateProductSip(data: MesMdProductSipApi.ProductSip) {
|
||||||
|
return requestClient.put('/mes/md/product-sip/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除产品 SIP */
|
||||||
|
export function deleteProductSip(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md/product-sip/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询产品 SIP 详情 */
|
||||||
|
export function getProductSip(id: number) {
|
||||||
|
return requestClient.get<MesMdProductSipApi.ProductSip>(
|
||||||
|
`/mes/md/product-sip/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询产品 SIP 分页 */
|
||||||
|
export function getProductSipPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesMdProductSipApi.ProductSip>>(
|
||||||
|
'/mes/md/product-sip/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 根据物料产品编号查询产品 SIP 列表 */
|
||||||
|
export function getProductSipListByItemId(itemId: number) {
|
||||||
|
return requestClient.get<MesMdProductSipApi.ProductSip[]>(
|
||||||
|
`/mes/md/product-sip/list-by-item-id?itemId=${itemId}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdProductSopApi {
|
||||||
|
/** MES 产品 SOP */
|
||||||
|
export interface ProductSop {
|
||||||
|
id?: number; // SOP 编号
|
||||||
|
itemId?: number; // 物料产品编号
|
||||||
|
sort?: number; // 排列顺序
|
||||||
|
processId?: number; // 工序编号
|
||||||
|
title?: string; // 标题
|
||||||
|
description?: string; // 详细描述
|
||||||
|
url?: string; // 图片地址
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
processCode?: string; // 工序编码
|
||||||
|
processName?: string; // 工序名称
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增产品 SOP */
|
||||||
|
export function createProductSop(data: MesMdProductSopApi.ProductSop) {
|
||||||
|
return requestClient.post('/mes/md/product-sop/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改产品 SOP */
|
||||||
|
export function updateProductSop(data: MesMdProductSopApi.ProductSop) {
|
||||||
|
return requestClient.put('/mes/md/product-sop/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除产品 SOP */
|
||||||
|
export function deleteProductSop(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md/product-sop/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询产品 SOP 详情 */
|
||||||
|
export function getProductSop(id: number) {
|
||||||
|
return requestClient.get<MesMdProductSopApi.ProductSop>(
|
||||||
|
`/mes/md/product-sop/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询产品 SOP 分页 */
|
||||||
|
export function getProductSopPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesMdProductSopApi.ProductSop>>(
|
||||||
|
'/mes/md/product-sop/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 根据物料产品编号查询产品 SOP 列表 */
|
||||||
|
export function getProductSopListByItemId(itemId: number) {
|
||||||
|
return requestClient.get<MesMdProductSopApi.ProductSop[]>(
|
||||||
|
`/mes/md/product-sop/list-by-item-id?itemId=${itemId}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdItemTypeApi {
|
||||||
|
/** MES 物料产品分类 */
|
||||||
|
export interface ItemType {
|
||||||
|
id?: number; // 分类编号
|
||||||
|
parentId?: number; // 父分类编号
|
||||||
|
code?: string; // 分类编码
|
||||||
|
name?: string; // 分类名称
|
||||||
|
itemOrProduct?: string; // 物料/产品标识
|
||||||
|
sort?: number; // 显示排序
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
children?: ItemType[]; // 子分类
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询物料产品分类列表 */
|
||||||
|
export function getItemTypeList(params?: any) {
|
||||||
|
return requestClient.get<MesMdItemTypeApi.ItemType[]>(
|
||||||
|
'/mes/md/item-type/list',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询物料产品分类精简列表 */
|
||||||
|
export function getItemTypeSimpleList() {
|
||||||
|
return requestClient.get<MesMdItemTypeApi.ItemType[]>(
|
||||||
|
'/mes/md/item-type/simple-list',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询物料产品分类详情 */
|
||||||
|
export function getItemType(id: number) {
|
||||||
|
return requestClient.get<MesMdItemTypeApi.ItemType>(
|
||||||
|
`/mes/md/item-type/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增物料产品分类 */
|
||||||
|
export function createItemType(data: MesMdItemTypeApi.ItemType) {
|
||||||
|
return requestClient.post('/mes/md/item-type/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改物料产品分类 */
|
||||||
|
export function updateItemType(data: MesMdItemTypeApi.ItemType) {
|
||||||
|
return requestClient.put('/mes/md/item-type/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除物料产品分类 */
|
||||||
|
export function deleteItemType(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md/item-type/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdUnitMeasureApi {
|
||||||
|
/** MES 计量单位 */
|
||||||
|
export interface UnitMeasure {
|
||||||
|
id?: number; // 单位编号
|
||||||
|
code?: string; // 单位编码
|
||||||
|
name?: string; // 单位名称
|
||||||
|
primaryFlag?: boolean; // 是否主单位
|
||||||
|
primaryId?: number; // 主单位编号
|
||||||
|
changeRate?: number; // 与主单位换算比例
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询计量单位分页 */
|
||||||
|
export function getUnitMeasurePage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesMdUnitMeasureApi.UnitMeasure>>(
|
||||||
|
'/mes/md/unit-measure/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询计量单位精简列表 */
|
||||||
|
export function getUnitMeasureSimpleList() {
|
||||||
|
return requestClient.get<MesMdUnitMeasureApi.UnitMeasure[]>(
|
||||||
|
'/mes/md/unit-measure/simple-list',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询计量单位详情 */
|
||||||
|
export function getUnitMeasure(id: number) {
|
||||||
|
return requestClient.get<MesMdUnitMeasureApi.UnitMeasure>(
|
||||||
|
`/mes/md/unit-measure/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增计量单位 */
|
||||||
|
export function createUnitMeasure(data: MesMdUnitMeasureApi.UnitMeasure) {
|
||||||
|
return requestClient.post('/mes/md/unit-measure/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改计量单位 */
|
||||||
|
export function updateUnitMeasure(data: MesMdUnitMeasureApi.UnitMeasure) {
|
||||||
|
return requestClient.put('/mes/md/unit-measure/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除计量单位 */
|
||||||
|
export function deleteUnitMeasure(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md/unit-measure/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出计量单位 */
|
||||||
|
export function exportUnitMeasure(params: PageParam) {
|
||||||
|
return requestClient.download('/mes/md/unit-measure/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdVendorApi {
|
||||||
|
/** MES 供应商 */
|
||||||
|
export interface Vendor {
|
||||||
|
id?: number; // 供应商编号
|
||||||
|
code?: string; // 供应商编码
|
||||||
|
name?: string; // 供应商名称
|
||||||
|
nickname?: string; // 供应商简称
|
||||||
|
englishName?: string; // 供应商英文名称
|
||||||
|
description?: string; // 供应商简介
|
||||||
|
logo?: string; // 供应商 LOGO 地址
|
||||||
|
level?: string; // 供应商等级
|
||||||
|
score?: number; // 供应商评分
|
||||||
|
address?: string; // 供应商地址
|
||||||
|
website?: string; // 供应商官网地址
|
||||||
|
email?: string; // 供应商邮箱地址
|
||||||
|
telephone?: string; // 供应商电话
|
||||||
|
contact1Name?: string; // 联系人1
|
||||||
|
contact1Telephone?: string; // 联系人1电话
|
||||||
|
contact1Email?: string; // 联系人1邮箱
|
||||||
|
contact2Name?: string; // 联系人2
|
||||||
|
contact2Telephone?: string; // 联系人2电话
|
||||||
|
contact2Email?: string; // 联系人2邮箱
|
||||||
|
creditCode?: string; // 统一社会信用代码
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 供应商导入结果 */
|
||||||
|
export interface VendorImportRespVO {
|
||||||
|
createCodes?: string[]; // 新增成功的供应商编码
|
||||||
|
updateCodes?: string[]; // 更新成功的供应商编码
|
||||||
|
failureCodes?: Record<string, string>; // 导入失败的供应商编码及原因
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询供应商分页 */
|
||||||
|
export function getVendorPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesMdVendorApi.Vendor>>(
|
||||||
|
'/mes/md-vendor/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询供应商详情 */
|
||||||
|
export function getVendor(id: number) {
|
||||||
|
return requestClient.get<MesMdVendorApi.Vendor>(
|
||||||
|
`/mes/md-vendor/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增供应商 */
|
||||||
|
export function createVendor(data: MesMdVendorApi.Vendor) {
|
||||||
|
return requestClient.post('/mes/md-vendor/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改供应商 */
|
||||||
|
export function updateVendor(data: MesMdVendorApi.Vendor) {
|
||||||
|
return requestClient.put('/mes/md-vendor/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除供应商 */
|
||||||
|
export function deleteVendor(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md-vendor/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出供应商 */
|
||||||
|
export function exportVendor(params: any) {
|
||||||
|
return requestClient.download('/mes/md-vendor/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 下载供应商导入模板 */
|
||||||
|
export function importVendorTemplate() {
|
||||||
|
return requestClient.download('/mes/md-vendor/get-import-template');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导入供应商 */
|
||||||
|
export function importVendor(file: File, updateSupport: boolean) {
|
||||||
|
return requestClient.upload<MesMdVendorApi.VendorImportRespVO>(
|
||||||
|
`/mes/md-vendor/import?updateSupport=${updateSupport}`,
|
||||||
|
{ file },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdWorkstationApi {
|
||||||
|
/** MES 工作站 */
|
||||||
|
export interface Workstation {
|
||||||
|
id?: number; // 工作站编号
|
||||||
|
code?: string; // 工作站编码
|
||||||
|
name?: string; // 工作站名称
|
||||||
|
address?: string; // 工作站地点
|
||||||
|
workshopId?: number; // 所在车间编号
|
||||||
|
workshopName?: string; // 所在车间名称
|
||||||
|
processId?: number; // 工序编号
|
||||||
|
processName?: string; // 工序名称
|
||||||
|
warehouseId?: number; // 线边库编号
|
||||||
|
locationId?: number; // 库区编号
|
||||||
|
areaId?: number; // 库位编号
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工作站分页 */
|
||||||
|
export function getWorkstationPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesMdWorkstationApi.Workstation>>(
|
||||||
|
'/mes/md-workstation/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工作站详情 */
|
||||||
|
export function getWorkstation(id: number) {
|
||||||
|
return requestClient.get<MesMdWorkstationApi.Workstation>(
|
||||||
|
`/mes/md-workstation/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增工作站 */
|
||||||
|
export function createWorkstation(data: MesMdWorkstationApi.Workstation) {
|
||||||
|
return requestClient.post<number>('/mes/md-workstation/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改工作站 */
|
||||||
|
export function updateWorkstation(data: MesMdWorkstationApi.Workstation) {
|
||||||
|
return requestClient.put('/mes/md-workstation/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除工作站 */
|
||||||
|
export function deleteWorkstation(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md-workstation/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出工作站 */
|
||||||
|
export function exportWorkstation(params: any) {
|
||||||
|
return requestClient.download('/mes/md-workstation/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdWorkstationMachineApi {
|
||||||
|
/** MES 工作站设备资源 */
|
||||||
|
export interface WorkstationMachine {
|
||||||
|
id?: number; // 资源编号
|
||||||
|
workstationId?: number; // 工作站编号
|
||||||
|
machineryId?: number; // 设备编号
|
||||||
|
machineryCode?: string; // 设备编码
|
||||||
|
machineryName?: string; // 设备名称
|
||||||
|
quantity?: number; // 数量
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工作站设备资源列表 */
|
||||||
|
export function getWorkstationMachineList(workstationId: number) {
|
||||||
|
return requestClient.get<MesMdWorkstationMachineApi.WorkstationMachine[]>(
|
||||||
|
'/mes/md-workstation-machine/list-by-workstation',
|
||||||
|
{ params: { workstationId } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增工作站设备资源 */
|
||||||
|
export function createWorkstationMachine(
|
||||||
|
data: MesMdWorkstationMachineApi.WorkstationMachine,
|
||||||
|
) {
|
||||||
|
return requestClient.post('/mes/md-workstation-machine/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除工作站设备资源 */
|
||||||
|
export function deleteWorkstationMachine(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md-workstation-machine/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdWorkstationToolApi {
|
||||||
|
/** MES 工作站工装夹具资源 */
|
||||||
|
export interface WorkstationTool {
|
||||||
|
id?: number; // 资源编号
|
||||||
|
workstationId?: number; // 工作站编号
|
||||||
|
toolTypeId?: number; // 工具类型编号
|
||||||
|
toolTypeName?: string; // 工具类型名称
|
||||||
|
quantity?: number; // 数量
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工作站工装夹具资源列表 */
|
||||||
|
export function getWorkstationToolList(workstationId: number) {
|
||||||
|
return requestClient.get<MesMdWorkstationToolApi.WorkstationTool[]>(
|
||||||
|
'/mes/md-workstation-tool/list-by-workstation',
|
||||||
|
{ params: { workstationId } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增工作站工装夹具资源 */
|
||||||
|
export function createWorkstationTool(
|
||||||
|
data: MesMdWorkstationToolApi.WorkstationTool,
|
||||||
|
) {
|
||||||
|
return requestClient.post('/mes/md-workstation-tool/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改工作站工装夹具资源 */
|
||||||
|
export function updateWorkstationTool(
|
||||||
|
data: MesMdWorkstationToolApi.WorkstationTool,
|
||||||
|
) {
|
||||||
|
return requestClient.put('/mes/md-workstation-tool/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除工作站工装夹具资源 */
|
||||||
|
export function deleteWorkstationTool(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md-workstation-tool/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdWorkstationWorkerApi {
|
||||||
|
/** MES 工作站人力资源 */
|
||||||
|
export interface WorkstationWorker {
|
||||||
|
id?: number; // 资源编号
|
||||||
|
workstationId?: number; // 工作站编号
|
||||||
|
postId?: number; // 岗位编号
|
||||||
|
postName?: string; // 岗位名称
|
||||||
|
quantity?: number; // 数量
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工作站人力资源列表 */
|
||||||
|
export function getWorkstationWorkerList(workstationId: number) {
|
||||||
|
return requestClient.get<MesMdWorkstationWorkerApi.WorkstationWorker[]>(
|
||||||
|
'/mes/md-workstation-worker/list-by-workstation',
|
||||||
|
{ params: { workstationId } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增工作站人力资源 */
|
||||||
|
export function createWorkstationWorker(
|
||||||
|
data: MesMdWorkstationWorkerApi.WorkstationWorker,
|
||||||
|
) {
|
||||||
|
return requestClient.post('/mes/md-workstation-worker/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改工作站人力资源 */
|
||||||
|
export function updateWorkstationWorker(
|
||||||
|
data: MesMdWorkstationWorkerApi.WorkstationWorker,
|
||||||
|
) {
|
||||||
|
return requestClient.put('/mes/md-workstation-worker/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除工作站人力资源 */
|
||||||
|
export function deleteWorkstationWorker(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md-workstation-worker/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdWorkshopApi {
|
||||||
|
/** MES 车间 */
|
||||||
|
export interface Workshop {
|
||||||
|
id?: number; // 车间编号
|
||||||
|
code?: string; // 车间编码
|
||||||
|
name?: string; // 车间名称
|
||||||
|
area?: number; // 面积
|
||||||
|
chargeUserId?: number; // 负责人用户编号
|
||||||
|
chargeUserName?: string; // 负责人名称
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询车间分页 */
|
||||||
|
export function getWorkshopPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesMdWorkshopApi.Workshop>>(
|
||||||
|
'/mes/md-workshop/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询车间精简列表 */
|
||||||
|
export function getWorkshopSimpleList() {
|
||||||
|
return requestClient.get<MesMdWorkshopApi.Workshop[]>(
|
||||||
|
'/mes/md-workshop/simple-list',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询车间详情 */
|
||||||
|
export function getWorkshop(id: number) {
|
||||||
|
return requestClient.get<MesMdWorkshopApi.Workshop>(
|
||||||
|
`/mes/md-workshop/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增车间 */
|
||||||
|
export function createWorkshop(data: MesMdWorkshopApi.Workshop) {
|
||||||
|
return requestClient.post('/mes/md-workshop/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改车间 */
|
||||||
|
export function updateWorkshop(data: MesMdWorkshopApi.Workshop) {
|
||||||
|
return requestClient.put('/mes/md-workshop/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除车间 */
|
||||||
|
export function deleteWorkshop(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md-workshop/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出车间 */
|
||||||
|
export function exportWorkshop(params: any) {
|
||||||
|
return requestClient.download('/mes/md-workshop/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesProProcessApi {
|
||||||
|
/** MES 生产工序 */
|
||||||
|
export interface Process {
|
||||||
|
id: number;
|
||||||
|
code?: string;
|
||||||
|
name?: string;
|
||||||
|
attention?: string;
|
||||||
|
status?: number;
|
||||||
|
remark?: string;
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询生产工序分页 */
|
||||||
|
export function getProcessPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesProProcessApi.Process>>(
|
||||||
|
'/mes/pro/process/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询生产工序精简列表 */
|
||||||
|
export function getProcessSimpleList() {
|
||||||
|
return requestClient.get<MesProProcessApi.Process[]>(
|
||||||
|
'/mes/pro/process/simple-list',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询生产工序详情 */
|
||||||
|
export function getProcess(id: number) {
|
||||||
|
return requestClient.get<MesProProcessApi.Process>(
|
||||||
|
`/mes/pro/process/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesTmToolApi {
|
||||||
|
/** MES 工具台账 */
|
||||||
|
export interface Tool {
|
||||||
|
id?: number; // 工具编号
|
||||||
|
code?: string; // 工具编码
|
||||||
|
name?: string; // 工具名称
|
||||||
|
brand?: string; // 品牌
|
||||||
|
specification?: string; // 型号规格
|
||||||
|
toolTypeId?: number; // 工具类型编号
|
||||||
|
toolTypeName?: string; // 工具类型名称
|
||||||
|
quantity?: number; // 数量
|
||||||
|
availableQuantity?: number; // 可用数量
|
||||||
|
maintenType?: number; // 保养维护类型
|
||||||
|
nextMaintenPeriod?: number; // 下次保养周期
|
||||||
|
nextMaintenDate?: Date | number; // 下次保养日期
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工具台账分页 */
|
||||||
|
export function getToolPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesTmToolApi.Tool>>('/mes/tm/tool/page', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工具精简列表 */
|
||||||
|
export function getToolSimpleList() {
|
||||||
|
return requestClient.get<MesTmToolApi.Tool[]>('/mes/tm/tool/simple-list');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工具台账详情 */
|
||||||
|
export function getTool(id: number) {
|
||||||
|
return requestClient.get<MesTmToolApi.Tool>(`/mes/tm/tool/get?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增工具台账 */
|
||||||
|
export function createTool(data: MesTmToolApi.Tool) {
|
||||||
|
return requestClient.post('/mes/tm/tool/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改工具台账 */
|
||||||
|
export function updateTool(data: MesTmToolApi.Tool) {
|
||||||
|
return requestClient.put('/mes/tm/tool/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除工具台账 */
|
||||||
|
export function deleteTool(id: number) {
|
||||||
|
return requestClient.delete(`/mes/tm/tool/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出工具台账 */
|
||||||
|
export function exportTool(params: any) {
|
||||||
|
return requestClient.download('/mes/tm/tool/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesTmToolTypeApi {
|
||||||
|
/** MES 工具类型 */
|
||||||
|
export interface ToolType {
|
||||||
|
id?: number; // 工具类型编号
|
||||||
|
code?: string; // 类型编码
|
||||||
|
name?: string; // 类型名称
|
||||||
|
codeFlag?: boolean; // 是否编码管理
|
||||||
|
maintenType?: number; // 保养维护类型
|
||||||
|
maintenPeriod?: number; // 保养周期
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工具类型分页 */
|
||||||
|
export function getToolTypePage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesTmToolTypeApi.ToolType>>('/mes/tm/tool-type/page', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工具类型精简列表 */
|
||||||
|
export function getToolTypeSimpleList() {
|
||||||
|
return requestClient.get<MesTmToolTypeApi.ToolType[]>('/mes/tm/tool-type/simple-list');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工具类型详情 */
|
||||||
|
export function getToolType(id: number) {
|
||||||
|
return requestClient.get<MesTmToolTypeApi.ToolType>(`/mes/tm/tool-type/get?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增工具类型 */
|
||||||
|
export function createToolType(data: MesTmToolTypeApi.ToolType) {
|
||||||
|
return requestClient.post('/mes/tm/tool-type/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改工具类型 */
|
||||||
|
export function updateToolType(data: MesTmToolTypeApi.ToolType) {
|
||||||
|
return requestClient.put('/mes/tm/tool-type/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除工具类型 */
|
||||||
|
export function deleteToolType(id: number) {
|
||||||
|
return requestClient.delete(`/mes/tm/tool-type/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出工具类型 */
|
||||||
|
export function exportToolType(params: any) {
|
||||||
|
return requestClient.download('/mes/tm/tool-type/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesWmBarcodeApi {
|
||||||
|
/** MES 条码清单 */
|
||||||
|
export interface Barcode {
|
||||||
|
id?: number;
|
||||||
|
configId?: number;
|
||||||
|
format?: number;
|
||||||
|
bizType?: number;
|
||||||
|
content?: string;
|
||||||
|
bizId?: number;
|
||||||
|
bizCode?: string;
|
||||||
|
bizName?: string;
|
||||||
|
status?: number;
|
||||||
|
remark?: string;
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询条码分页 */
|
||||||
|
export function getBarcodePage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesWmBarcodeApi.Barcode>>(
|
||||||
|
'/mes/wm/barcode/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询条码详情 */
|
||||||
|
export function getBarcode(id: number) {
|
||||||
|
return requestClient.get<MesWmBarcodeApi.Barcode>(
|
||||||
|
`/mes/wm/barcode/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 根据业务对象获取条码 */
|
||||||
|
export function getBarcodeByBusiness(bizType: number, bizId: number) {
|
||||||
|
return requestClient.get<MesWmBarcodeApi.Barcode>(
|
||||||
|
'/mes/wm/barcode/get-by-business',
|
||||||
|
{ params: { bizType, bizId } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增条码 */
|
||||||
|
export function createBarcode(data: MesWmBarcodeApi.Barcode) {
|
||||||
|
return requestClient.post('/mes/wm/barcode/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改条码 */
|
||||||
|
export function updateBarcode(data: MesWmBarcodeApi.Barcode) {
|
||||||
|
return requestClient.put('/mes/wm/barcode/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除条码 */
|
||||||
|
export function deleteBarcode(id: number) {
|
||||||
|
return requestClient.delete(`/mes/wm/barcode/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 生成条码内容 */
|
||||||
|
export function generateBarcodeContent(bizType: number, bizCode: string) {
|
||||||
|
return requestClient.get<string>('/mes/wm/barcode/generate-content', {
|
||||||
|
params: { bizType, bizCode },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesWmItemReceiptApi {
|
||||||
|
/** MES 采购入库单 */
|
||||||
|
export interface ItemReceipt {
|
||||||
|
id?: number; // 入库单编号
|
||||||
|
code?: string; // 入库单编码
|
||||||
|
name?: string; // 入库单名称
|
||||||
|
iqcId?: number; // 来料检验单编号
|
||||||
|
iqcCode?: string; // 来料检验单编码
|
||||||
|
noticeId?: number; // 到货通知单编号
|
||||||
|
noticeCode?: string; // 到货通知单编码
|
||||||
|
purchaseOrderCode?: string; // 采购订单号
|
||||||
|
vendorId?: number; // 供应商编号
|
||||||
|
vendorName?: string; // 供应商名称
|
||||||
|
warehouseId?: number; // 仓库编号
|
||||||
|
warehouseName?: string; // 仓库名称
|
||||||
|
locationId?: number; // 库区编号
|
||||||
|
locationName?: string; // 库区名称
|
||||||
|
areaId?: number; // 库位编号
|
||||||
|
areaName?: string; // 库位名称
|
||||||
|
receiptDate?: Date | number | string; // 入库日期
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询采购入库单详情 */
|
||||||
|
export function getItemReceipt(id: number) {
|
||||||
|
return requestClient.get<MesWmItemReceiptApi.ItemReceipt>(
|
||||||
|
`/mes/wm/item-receipt/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesWmItemReceiptLineApi {
|
||||||
|
/** MES 物料接收单行 */
|
||||||
|
export interface ItemReceiptLine {
|
||||||
|
id?: number; // 行编号
|
||||||
|
receiptId?: number; // 入库单编号
|
||||||
|
receiptCode?: string; // 入库单编码
|
||||||
|
purchaseOrderCode?: string; // 采购订单号
|
||||||
|
itemId?: number; // 物料编号
|
||||||
|
itemCode?: string; // 物料编码
|
||||||
|
itemName?: string; // 物料名称
|
||||||
|
specification?: string; // 规格型号
|
||||||
|
unitMeasureName?: string; // 单位
|
||||||
|
receivedQuantity?: number; // 入库数量
|
||||||
|
batchCode?: string; // 批次号
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询物料接收单行分页 */
|
||||||
|
export function getItemReceiptLinePage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesWmItemReceiptLineApi.ItemReceiptLine>>(
|
||||||
|
'/mes/wm/item-receipt-line/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesWmProductSalesApi {
|
||||||
|
/** MES 销售出库单 */
|
||||||
|
export interface ProductSales {
|
||||||
|
id?: number; // 销售出库单编号
|
||||||
|
code?: string; // 出库单编号
|
||||||
|
name?: string; // 出库单名称
|
||||||
|
salesOrderCode?: string; // 销售订单编号
|
||||||
|
salesDate?: Date; // 出库日期
|
||||||
|
status?: number; // 单据状态
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询销售出库单分页 */
|
||||||
|
export function getProductSalesPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesWmProductSalesApi.ProductSales>>(
|
||||||
|
'/mes/wm/product-sales/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesWmProductSalesLineApi {
|
||||||
|
/** MES 销售出库单行 */
|
||||||
|
export interface ProductSalesLine {
|
||||||
|
id?: number; // 行编号
|
||||||
|
itemId?: number; // 物料编号
|
||||||
|
itemCode?: string; // 物料编码
|
||||||
|
itemName?: string; // 物料名称
|
||||||
|
specification?: string; // 规格型号
|
||||||
|
unitMeasureName?: string; // 单位
|
||||||
|
quantity?: number; // 出库数量
|
||||||
|
batchCode?: string; // 批次号
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询销售出库单行分页 */
|
||||||
|
export function getProductSalesLinePage(params: PageParam) {
|
||||||
|
return requestClient.get<
|
||||||
|
PageResult<MesWmProductSalesLineApi.ProductSalesLine>
|
||||||
|
>('/mes/wm/product-sales-line/page', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesWmWarehouseAreaApi {
|
||||||
|
/** MES 库位 */
|
||||||
|
export interface WarehouseArea {
|
||||||
|
id?: number; // 库位编号
|
||||||
|
code?: string; // 库位编码
|
||||||
|
name?: string; // 库位名称
|
||||||
|
warehouseId?: number; // 仓库编号
|
||||||
|
warehouseName?: string; // 仓库名称
|
||||||
|
locationId?: number; // 库区编号
|
||||||
|
locationName?: string; // 库区名称
|
||||||
|
area?: number; // 面积
|
||||||
|
maxLoad?: number; // 最大载荷
|
||||||
|
positionX?: number; // X 坐标
|
||||||
|
positionY?: number; // Y 坐标
|
||||||
|
positionZ?: number; // Z 坐标
|
||||||
|
status?: number; // 状态
|
||||||
|
frozen?: boolean; // 是否冻结
|
||||||
|
allowItemMixing?: boolean; // 是否允许物料混放
|
||||||
|
allowBatchMixing?: boolean; // 是否允许批次混放
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询库位分页 */
|
||||||
|
export function getWarehouseAreaPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesWmWarehouseAreaApi.WarehouseArea>>(
|
||||||
|
'/mes/wm/warehouse-area/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询库位精简列表 */
|
||||||
|
export function getWarehouseAreaSimpleList(locationId?: number) {
|
||||||
|
return requestClient.get<MesWmWarehouseAreaApi.WarehouseArea[]>(
|
||||||
|
'/mes/wm/warehouse-area/simple-list',
|
||||||
|
{ params: { locationId } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询库位详情 */
|
||||||
|
export function getWarehouseArea(id: number) {
|
||||||
|
return requestClient.get<MesWmWarehouseAreaApi.WarehouseArea>(
|
||||||
|
`/mes/wm/warehouse-area/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesWmWarehouseApi {
|
||||||
|
/** MES 仓库 */
|
||||||
|
export interface Warehouse {
|
||||||
|
id?: number; // 仓库编号
|
||||||
|
code?: string; // 仓库编码
|
||||||
|
name?: string; // 仓库名称
|
||||||
|
address?: string; // 地址
|
||||||
|
area?: number; // 面积
|
||||||
|
chargeUserId?: number; // 负责人
|
||||||
|
frozen?: boolean; // 是否冻结
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询仓库分页 */
|
||||||
|
export function getWarehousePage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesWmWarehouseApi.Warehouse>>(
|
||||||
|
'/mes/wm/warehouse/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询仓库精简列表 */
|
||||||
|
export function getWarehouseSimpleList() {
|
||||||
|
return requestClient.get<MesWmWarehouseApi.Warehouse[]>(
|
||||||
|
'/mes/wm/warehouse/simple-list',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询仓库详情 */
|
||||||
|
export function getWarehouse(id: number) {
|
||||||
|
return requestClient.get<MesWmWarehouseApi.Warehouse>(
|
||||||
|
`/mes/wm/warehouse/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesWmWarehouseLocationApi {
|
||||||
|
/** MES 库区 */
|
||||||
|
export interface WarehouseLocation {
|
||||||
|
id?: number; // 库区编号
|
||||||
|
code?: string; // 库区编码
|
||||||
|
name?: string; // 库区名称
|
||||||
|
warehouseId?: number; // 仓库编号
|
||||||
|
warehouseName?: string; // 仓库名称
|
||||||
|
area?: number; // 面积
|
||||||
|
frozen?: boolean; // 是否冻结
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询库区分页 */
|
||||||
|
export function getWarehouseLocationPage(params: PageParam) {
|
||||||
|
return requestClient.get<
|
||||||
|
PageResult<MesWmWarehouseLocationApi.WarehouseLocation>
|
||||||
|
>('/mes/wm/warehouse-location/page', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询库区精简列表 */
|
||||||
|
export function getWarehouseLocationSimpleList(warehouseId?: number) {
|
||||||
|
return requestClient.get<MesWmWarehouseLocationApi.WarehouseLocation[]>(
|
||||||
|
'/mes/wm/warehouse-location/simple-list',
|
||||||
|
{ params: { warehouseId } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询库区详情 */
|
||||||
|
export function getWarehouseLocation(id: number) {
|
||||||
|
return requestClient.get<MesWmWarehouseLocationApi.WarehouseLocation>(
|
||||||
|
`/mes/wm/warehouse-location/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace WmsHomeStatisticsApi {
|
||||||
|
export interface StatisticsReq {
|
||||||
|
goodsLimit?: number;
|
||||||
|
warehouseId?: number;
|
||||||
|
warehouseLimit?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface OrderStatus {
|
||||||
|
count: number;
|
||||||
|
status: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface OrderSummary {
|
||||||
|
statuses: OrderStatus[];
|
||||||
|
total: number;
|
||||||
|
type: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface OrderTrend {
|
||||||
|
checkCount: number;
|
||||||
|
movementCount: number;
|
||||||
|
receiptCount: number;
|
||||||
|
shipmentCount: number;
|
||||||
|
time: number | string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface InventoryRankItem {
|
||||||
|
id: number;
|
||||||
|
name: string;
|
||||||
|
quantity: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface InventorySummary {
|
||||||
|
goodsShareList: InventoryRankItem[];
|
||||||
|
totalQuantity: number;
|
||||||
|
warehouseDistributionList: InventoryRankItem[];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getOrderSummary(params?: WmsHomeStatisticsApi.StatisticsReq) {
|
||||||
|
return requestClient.get<WmsHomeStatisticsApi.OrderSummary[]>(
|
||||||
|
'/wms/home-statistics/order-summary',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getOrderTrend(
|
||||||
|
days?: number,
|
||||||
|
params?: WmsHomeStatisticsApi.StatisticsReq,
|
||||||
|
) {
|
||||||
|
return requestClient.get<WmsHomeStatisticsApi.OrderTrend[]>(
|
||||||
|
'/wms/home-statistics/order-trend',
|
||||||
|
{ params: { ...params, days } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getInventorySummary(
|
||||||
|
params?: WmsHomeStatisticsApi.StatisticsReq,
|
||||||
|
) {
|
||||||
|
return requestClient.get<WmsHomeStatisticsApi.InventorySummary>(
|
||||||
|
'/wms/home-statistics/inventory-summary',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace WmsInventoryHistoryApi {
|
||||||
|
/** WMS 库存记录 */
|
||||||
|
export interface InventoryHistory {
|
||||||
|
id?: number;
|
||||||
|
itemId?: number;
|
||||||
|
itemCode?: string;
|
||||||
|
itemName?: string;
|
||||||
|
unit?: string;
|
||||||
|
skuId?: number;
|
||||||
|
skuCode?: string;
|
||||||
|
skuName?: string;
|
||||||
|
warehouseId?: number;
|
||||||
|
warehouseName?: string;
|
||||||
|
quantity?: number;
|
||||||
|
beforeQuantity?: number;
|
||||||
|
afterQuantity?: number;
|
||||||
|
price?: number;
|
||||||
|
totalPrice?: number;
|
||||||
|
remark?: string;
|
||||||
|
orderId?: number;
|
||||||
|
orderNo?: string;
|
||||||
|
orderType?: number;
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询库存记录分页 */
|
||||||
|
export function getInventoryHistoryPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<WmsInventoryHistoryApi.InventoryHistory>>(
|
||||||
|
'/wms/inventory-history/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace WmsInventoryApi {
|
||||||
|
/** WMS 库存统计 */
|
||||||
|
export interface Inventory {
|
||||||
|
id?: number;
|
||||||
|
itemId?: number;
|
||||||
|
itemCode?: string;
|
||||||
|
itemName?: string;
|
||||||
|
unit?: string;
|
||||||
|
skuId?: number;
|
||||||
|
skuCode?: string;
|
||||||
|
skuName?: string;
|
||||||
|
warehouseId?: number;
|
||||||
|
warehouseName?: string;
|
||||||
|
quantity?: number;
|
||||||
|
remark?: string;
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** WMS 库存统计列表请求 */
|
||||||
|
export interface InventoryListReq {
|
||||||
|
warehouseId: number;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询库存统计分页 */
|
||||||
|
export function getInventoryPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<WmsInventoryApi.Inventory>>(
|
||||||
|
'/wms/inventory/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询库存统计列表 */
|
||||||
|
export function getInventoryList(params: WmsInventoryApi.InventoryListReq) {
|
||||||
|
return requestClient.get<WmsInventoryApi.Inventory[]>('/wms/inventory/list', {
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace WmsItemBrandApi {
|
||||||
|
/** WMS 商品品牌 */
|
||||||
|
export interface ItemBrand {
|
||||||
|
id?: number;
|
||||||
|
code?: string;
|
||||||
|
name?: string;
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询商品品牌分页 */
|
||||||
|
export function getItemBrandPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<WmsItemBrandApi.ItemBrand>>(
|
||||||
|
'/wms/item-brand/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询商品品牌精简列表 */
|
||||||
|
export function getItemBrandSimpleList() {
|
||||||
|
return requestClient.get<WmsItemBrandApi.ItemBrand[]>(
|
||||||
|
'/wms/item-brand/simple-list',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询商品品牌详情 */
|
||||||
|
export function getItemBrand(id: number) {
|
||||||
|
return requestClient.get<WmsItemBrandApi.ItemBrand>(
|
||||||
|
`/wms/item-brand/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增商品品牌 */
|
||||||
|
export function createItemBrand(data: WmsItemBrandApi.ItemBrand) {
|
||||||
|
return requestClient.post('/wms/item-brand/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改商品品牌 */
|
||||||
|
export function updateItemBrand(data: WmsItemBrandApi.ItemBrand) {
|
||||||
|
return requestClient.put('/wms/item-brand/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除商品品牌 */
|
||||||
|
export function deleteItemBrand(id: number) {
|
||||||
|
return requestClient.delete(`/wms/item-brand/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出商品品牌 */
|
||||||
|
export function exportItemBrand(params: any) {
|
||||||
|
return requestClient.download('/wms/item-brand/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace WmsItemCategoryApi {
|
||||||
|
/** WMS 商品分类 */
|
||||||
|
export interface ItemCategory {
|
||||||
|
id?: number;
|
||||||
|
parentId?: number;
|
||||||
|
code?: string;
|
||||||
|
name?: string;
|
||||||
|
sort?: number;
|
||||||
|
status?: number;
|
||||||
|
createTime?: Date;
|
||||||
|
children?: ItemCategory[];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询商品分类列表 */
|
||||||
|
export function getItemCategoryList(params?: any) {
|
||||||
|
return requestClient.get<WmsItemCategoryApi.ItemCategory[]>(
|
||||||
|
'/wms/item-category/list',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询商品分类精简列表 */
|
||||||
|
export function getItemCategorySimpleList() {
|
||||||
|
return requestClient.get<WmsItemCategoryApi.ItemCategory[]>(
|
||||||
|
'/wms/item-category/simple-list',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询商品分类详情 */
|
||||||
|
export function getItemCategory(id: number) {
|
||||||
|
return requestClient.get<WmsItemCategoryApi.ItemCategory>(
|
||||||
|
`/wms/item-category/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增商品分类 */
|
||||||
|
export function createItemCategory(data: WmsItemCategoryApi.ItemCategory) {
|
||||||
|
return requestClient.post('/wms/item-category/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改商品分类 */
|
||||||
|
export function updateItemCategory(data: WmsItemCategoryApi.ItemCategory) {
|
||||||
|
return requestClient.put('/wms/item-category/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除商品分类 */
|
||||||
|
export function deleteItemCategory(id: number) {
|
||||||
|
return requestClient.delete(`/wms/item-category/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import type { WmsItemSkuApi } from './sku';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace WmsItemApi {
|
||||||
|
/** WMS 商品 */
|
||||||
|
export interface Item {
|
||||||
|
id?: number;
|
||||||
|
code?: string;
|
||||||
|
name?: string;
|
||||||
|
categoryId?: number;
|
||||||
|
categoryName?: string;
|
||||||
|
unit?: string;
|
||||||
|
brandId?: number;
|
||||||
|
brandName?: string;
|
||||||
|
remark?: string;
|
||||||
|
skus?: WmsItemSkuApi.ItemSku[];
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询商品分页 */
|
||||||
|
export function getItemPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<WmsItemApi.Item>>('/wms/item/page', {
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询商品精简列表 */
|
||||||
|
export function getItemSimpleList(params?: any) {
|
||||||
|
return requestClient.get<WmsItemApi.Item[]>('/wms/item/simple-list', {
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询商品详情 */
|
||||||
|
export function getItem(id: number) {
|
||||||
|
return requestClient.get<WmsItemApi.Item>(`/wms/item/get?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增商品 */
|
||||||
|
export function createItem(data: WmsItemApi.Item) {
|
||||||
|
return requestClient.post('/wms/item/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改商品 */
|
||||||
|
export function updateItem(data: WmsItemApi.Item) {
|
||||||
|
return requestClient.put('/wms/item/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除商品 */
|
||||||
|
export function deleteItem(id: number) {
|
||||||
|
return requestClient.delete(`/wms/item/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出商品 */
|
||||||
|
export function exportItem(params: any) {
|
||||||
|
return requestClient.download('/wms/item/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace WmsItemSkuApi {
|
||||||
|
/** WMS 商品 SKU */
|
||||||
|
export interface ItemSku {
|
||||||
|
id?: number;
|
||||||
|
name?: string;
|
||||||
|
itemId?: number;
|
||||||
|
itemCode?: string;
|
||||||
|
itemName?: string;
|
||||||
|
categoryId?: number;
|
||||||
|
categoryName?: string;
|
||||||
|
unit?: string;
|
||||||
|
brandId?: number;
|
||||||
|
brandName?: string;
|
||||||
|
barCode?: string;
|
||||||
|
code?: string;
|
||||||
|
length?: number;
|
||||||
|
width?: number;
|
||||||
|
height?: number;
|
||||||
|
grossWeight?: number;
|
||||||
|
netWeight?: number;
|
||||||
|
costPrice?: number;
|
||||||
|
sellingPrice?: number;
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 按 SKU 维度分页(支持商品 / 品牌 / 分类多表联查筛选) */
|
||||||
|
export function getItemSkuPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<WmsItemSkuApi.ItemSku>>(
|
||||||
|
'/wms/item-sku/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,73 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace WmsMerchantApi {
|
||||||
|
/** WMS 往来企业 */
|
||||||
|
export interface Merchant {
|
||||||
|
id?: number;
|
||||||
|
code?: string;
|
||||||
|
name?: string;
|
||||||
|
type?: number;
|
||||||
|
level?: string;
|
||||||
|
bankName?: string;
|
||||||
|
bankAccount?: string;
|
||||||
|
address?: string;
|
||||||
|
mobile?: string;
|
||||||
|
telephone?: string;
|
||||||
|
contact?: string;
|
||||||
|
email?: string;
|
||||||
|
remark?: string;
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** WMS 往来企业精简列表请求 */
|
||||||
|
export interface MerchantSimpleListReq {
|
||||||
|
types?: number[];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询往来企业分页 */
|
||||||
|
export function getMerchantPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<WmsMerchantApi.Merchant>>(
|
||||||
|
'/wms/merchant/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询往来企业精简列表 */
|
||||||
|
export function getMerchantSimpleList(
|
||||||
|
params?: WmsMerchantApi.MerchantSimpleListReq,
|
||||||
|
) {
|
||||||
|
return requestClient.get<WmsMerchantApi.Merchant[]>(
|
||||||
|
'/wms/merchant/simple-list',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询往来企业详情 */
|
||||||
|
export function getMerchant(id: number) {
|
||||||
|
return requestClient.get<WmsMerchantApi.Merchant>(
|
||||||
|
`/wms/merchant/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增往来企业 */
|
||||||
|
export function createMerchant(data: WmsMerchantApi.Merchant) {
|
||||||
|
return requestClient.post('/wms/merchant/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改往来企业 */
|
||||||
|
export function updateMerchant(data: WmsMerchantApi.Merchant) {
|
||||||
|
return requestClient.put('/wms/merchant/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除往来企业 */
|
||||||
|
export function deleteMerchant(id: number) {
|
||||||
|
return requestClient.delete(`/wms/merchant/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出往来企业 */
|
||||||
|
export function exportMerchant(params: any) {
|
||||||
|
return requestClient.download('/wms/merchant/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace WmsWarehouseApi {
|
||||||
|
/** WMS 仓库 */
|
||||||
|
export interface Warehouse {
|
||||||
|
id?: number;
|
||||||
|
code?: string;
|
||||||
|
name?: string;
|
||||||
|
remark?: string;
|
||||||
|
sort?: number;
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询仓库分页 */
|
||||||
|
export function getWarehousePage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<WmsWarehouseApi.Warehouse>>(
|
||||||
|
'/wms/warehouse/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询仓库精简列表 */
|
||||||
|
export function getWarehouseSimpleList() {
|
||||||
|
return requestClient.get<WmsWarehouseApi.Warehouse[]>(
|
||||||
|
'/wms/warehouse/simple-list',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询仓库详情 */
|
||||||
|
export function getWarehouse(id: number) {
|
||||||
|
return requestClient.get<WmsWarehouseApi.Warehouse>(
|
||||||
|
`/wms/warehouse/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增仓库 */
|
||||||
|
export function createWarehouse(data: WmsWarehouseApi.Warehouse) {
|
||||||
|
return requestClient.post('/wms/warehouse/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改仓库 */
|
||||||
|
export function updateWarehouse(data: WmsWarehouseApi.Warehouse) {
|
||||||
|
return requestClient.put('/wms/warehouse/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除仓库 */
|
||||||
|
export function deleteWarehouse(id: number) {
|
||||||
|
return requestClient.delete(`/wms/warehouse/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出仓库 */
|
||||||
|
export function exportWarehouse(params: any) {
|
||||||
|
return requestClient.download('/wms/warehouse/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
export namespace WmsCheckOrderDetailApi {
|
||||||
|
/** WMS 盘库单明细 */
|
||||||
|
export interface CheckOrderDetail {
|
||||||
|
id?: number;
|
||||||
|
orderId?: number;
|
||||||
|
itemId?: number;
|
||||||
|
itemCode?: string;
|
||||||
|
itemName?: string;
|
||||||
|
unit?: string;
|
||||||
|
skuId?: number;
|
||||||
|
skuCode?: string;
|
||||||
|
skuName?: string;
|
||||||
|
inventoryId?: number;
|
||||||
|
warehouseId?: number;
|
||||||
|
warehouseName?: string;
|
||||||
|
receiptTime?: Date;
|
||||||
|
quantity?: number;
|
||||||
|
checkQuantity?: number;
|
||||||
|
availableQuantity?: number;
|
||||||
|
price?: number;
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,71 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import type { WmsCheckOrderDetailApi } from './detail';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace WmsCheckOrderApi {
|
||||||
|
/** WMS 盘库单 */
|
||||||
|
export interface CheckOrder {
|
||||||
|
id?: number;
|
||||||
|
no?: string;
|
||||||
|
orderTime?: string;
|
||||||
|
status?: number;
|
||||||
|
remark?: string;
|
||||||
|
warehouseId?: number;
|
||||||
|
warehouseName?: string;
|
||||||
|
totalQuantity?: number;
|
||||||
|
totalPrice?: number;
|
||||||
|
actualPrice?: number;
|
||||||
|
details?: WmsCheckOrderDetailApi.CheckOrderDetail[];
|
||||||
|
createTime?: Date;
|
||||||
|
creator?: string;
|
||||||
|
creatorName?: string;
|
||||||
|
updateTime?: Date;
|
||||||
|
updater?: string;
|
||||||
|
updaterName?: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCheckOrderPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<WmsCheckOrderApi.CheckOrder>>(
|
||||||
|
'/wms/check-order/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCheckOrder(id: number) {
|
||||||
|
return requestClient.get<WmsCheckOrderApi.CheckOrder>(
|
||||||
|
`/wms/check-order/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCheckOrderDetailListByOrderId(orderId: number) {
|
||||||
|
return requestClient.get<WmsCheckOrderDetailApi.CheckOrderDetail[]>(
|
||||||
|
`/wms/check-order-detail/list-by-order-id?orderId=${orderId}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function createCheckOrder(data: WmsCheckOrderApi.CheckOrder) {
|
||||||
|
return requestClient.post('/wms/check-order/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateCheckOrder(data: WmsCheckOrderApi.CheckOrder) {
|
||||||
|
return requestClient.put('/wms/check-order/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function completeCheckOrder(id: number) {
|
||||||
|
return requestClient.put(`/wms/check-order/complete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function cancelCheckOrder(id: number) {
|
||||||
|
return requestClient.put(`/wms/check-order/cancel?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function deleteCheckOrder(id: number) {
|
||||||
|
return requestClient.delete(`/wms/check-order/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function exportCheckOrder(params: any) {
|
||||||
|
return requestClient.download('/wms/check-order/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
export namespace WmsMovementOrderDetailApi {
|
||||||
|
/** WMS 移库单明细 */
|
||||||
|
export interface MovementOrderDetail {
|
||||||
|
id?: number;
|
||||||
|
orderId?: number;
|
||||||
|
itemId?: number;
|
||||||
|
itemCode?: string;
|
||||||
|
itemName?: string;
|
||||||
|
unit?: string;
|
||||||
|
skuId?: number;
|
||||||
|
skuCode?: string;
|
||||||
|
skuName?: string;
|
||||||
|
sourceWarehouseId?: number;
|
||||||
|
sourceWarehouseName?: string;
|
||||||
|
targetWarehouseId?: number;
|
||||||
|
targetWarehouseName?: string;
|
||||||
|
quantity?: number;
|
||||||
|
availableQuantity?: number;
|
||||||
|
price?: number;
|
||||||
|
totalPrice?: number;
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,72 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import type { WmsMovementOrderDetailApi } from './detail';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace WmsMovementOrderApi {
|
||||||
|
/** WMS 移库单 */
|
||||||
|
export interface MovementOrder {
|
||||||
|
id?: number;
|
||||||
|
no?: string;
|
||||||
|
orderTime?: string;
|
||||||
|
status?: number;
|
||||||
|
remark?: string;
|
||||||
|
sourceWarehouseId?: number;
|
||||||
|
sourceWarehouseName?: string;
|
||||||
|
targetWarehouseId?: number;
|
||||||
|
targetWarehouseName?: string;
|
||||||
|
totalQuantity?: number;
|
||||||
|
totalPrice?: number;
|
||||||
|
details?: WmsMovementOrderDetailApi.MovementOrderDetail[];
|
||||||
|
createTime?: Date;
|
||||||
|
creator?: string;
|
||||||
|
creatorName?: string;
|
||||||
|
updateTime?: Date;
|
||||||
|
updater?: string;
|
||||||
|
updaterName?: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getMovementOrderPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<WmsMovementOrderApi.MovementOrder>>(
|
||||||
|
'/wms/movement-order/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getMovementOrder(id: number) {
|
||||||
|
return requestClient.get<WmsMovementOrderApi.MovementOrder>(
|
||||||
|
`/wms/movement-order/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getMovementOrderDetailListByOrderId(orderId: number) {
|
||||||
|
return requestClient.get<WmsMovementOrderDetailApi.MovementOrderDetail[]>(
|
||||||
|
`/wms/movement-order-detail/list-by-order-id?orderId=${orderId}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function createMovementOrder(data: WmsMovementOrderApi.MovementOrder) {
|
||||||
|
return requestClient.post('/wms/movement-order/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateMovementOrder(data: WmsMovementOrderApi.MovementOrder) {
|
||||||
|
return requestClient.put('/wms/movement-order/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function completeMovementOrder(id: number) {
|
||||||
|
return requestClient.put(`/wms/movement-order/complete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function cancelMovementOrder(id: number) {
|
||||||
|
return requestClient.put(`/wms/movement-order/cancel?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function deleteMovementOrder(id: number) {
|
||||||
|
return requestClient.delete(`/wms/movement-order/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function exportMovementOrder(params: any) {
|
||||||
|
return requestClient.download('/wms/movement-order/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
export namespace WmsReceiptOrderDetailApi {
|
||||||
|
/** WMS 入库单明细 */
|
||||||
|
export interface ReceiptOrderDetail {
|
||||||
|
id?: number;
|
||||||
|
orderId?: number;
|
||||||
|
itemId?: number;
|
||||||
|
itemCode?: string;
|
||||||
|
itemName?: string;
|
||||||
|
unit?: string;
|
||||||
|
skuId?: number;
|
||||||
|
skuCode?: string;
|
||||||
|
skuName?: string;
|
||||||
|
warehouseId?: number;
|
||||||
|
warehouseName?: string;
|
||||||
|
quantity?: number;
|
||||||
|
price?: number;
|
||||||
|
totalPrice?: number;
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,74 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import type { WmsReceiptOrderDetailApi } from './detail';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace WmsReceiptOrderApi {
|
||||||
|
/** WMS 入库单 */
|
||||||
|
export interface ReceiptOrder {
|
||||||
|
id?: number;
|
||||||
|
no?: string;
|
||||||
|
type?: number;
|
||||||
|
orderTime?: string;
|
||||||
|
status?: number;
|
||||||
|
bizOrderNo?: string;
|
||||||
|
merchantId?: number;
|
||||||
|
merchantName?: string;
|
||||||
|
remark?: string;
|
||||||
|
warehouseId?: number;
|
||||||
|
warehouseName?: string;
|
||||||
|
totalQuantity?: number;
|
||||||
|
totalPrice?: number;
|
||||||
|
details?: WmsReceiptOrderDetailApi.ReceiptOrderDetail[];
|
||||||
|
createTime?: Date;
|
||||||
|
creator?: string;
|
||||||
|
creatorName?: string;
|
||||||
|
updateTime?: Date;
|
||||||
|
updater?: string;
|
||||||
|
updaterName?: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getReceiptOrderPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<WmsReceiptOrderApi.ReceiptOrder>>(
|
||||||
|
'/wms/receipt-order/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getReceiptOrder(id: number) {
|
||||||
|
return requestClient.get<WmsReceiptOrderApi.ReceiptOrder>(
|
||||||
|
`/wms/receipt-order/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getReceiptOrderDetailListByOrderId(orderId: number) {
|
||||||
|
return requestClient.get<WmsReceiptOrderDetailApi.ReceiptOrderDetail[]>(
|
||||||
|
`/wms/receipt-order-detail/list-by-order-id?orderId=${orderId}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function createReceiptOrder(data: WmsReceiptOrderApi.ReceiptOrder) {
|
||||||
|
return requestClient.post('/wms/receipt-order/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateReceiptOrder(data: WmsReceiptOrderApi.ReceiptOrder) {
|
||||||
|
return requestClient.put('/wms/receipt-order/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function completeReceiptOrder(id: number) {
|
||||||
|
return requestClient.put(`/wms/receipt-order/complete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function cancelReceiptOrder(id: number) {
|
||||||
|
return requestClient.put(`/wms/receipt-order/cancel?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function deleteReceiptOrder(id: number) {
|
||||||
|
return requestClient.delete(`/wms/receipt-order/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function exportReceiptOrder(params: any) {
|
||||||
|
return requestClient.download('/wms/receipt-order/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
export namespace WmsShipmentOrderDetailApi {
|
||||||
|
/** WMS 出库单明细 */
|
||||||
|
export interface ShipmentOrderDetail {
|
||||||
|
id?: number;
|
||||||
|
orderId?: number;
|
||||||
|
itemId?: number;
|
||||||
|
itemCode?: string;
|
||||||
|
itemName?: string;
|
||||||
|
unit?: string;
|
||||||
|
skuId?: number;
|
||||||
|
skuCode?: string;
|
||||||
|
skuName?: string;
|
||||||
|
warehouseId?: number;
|
||||||
|
warehouseName?: string;
|
||||||
|
quantity?: number;
|
||||||
|
availableQuantity?: number;
|
||||||
|
price?: number;
|
||||||
|
totalPrice?: number;
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,74 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import type { WmsShipmentOrderDetailApi } from './detail';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace WmsShipmentOrderApi {
|
||||||
|
/** WMS 出库单 */
|
||||||
|
export interface ShipmentOrder {
|
||||||
|
id?: number;
|
||||||
|
no?: string;
|
||||||
|
type?: number;
|
||||||
|
orderTime?: string;
|
||||||
|
status?: number;
|
||||||
|
bizOrderNo?: string;
|
||||||
|
merchantId?: number;
|
||||||
|
merchantName?: string;
|
||||||
|
remark?: string;
|
||||||
|
warehouseId?: number;
|
||||||
|
warehouseName?: string;
|
||||||
|
totalQuantity?: number;
|
||||||
|
totalPrice?: number;
|
||||||
|
details?: WmsShipmentOrderDetailApi.ShipmentOrderDetail[];
|
||||||
|
createTime?: Date;
|
||||||
|
creator?: string;
|
||||||
|
creatorName?: string;
|
||||||
|
updateTime?: Date;
|
||||||
|
updater?: string;
|
||||||
|
updaterName?: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getShipmentOrderPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<WmsShipmentOrderApi.ShipmentOrder>>(
|
||||||
|
'/wms/shipment-order/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getShipmentOrder(id: number) {
|
||||||
|
return requestClient.get<WmsShipmentOrderApi.ShipmentOrder>(
|
||||||
|
`/wms/shipment-order/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getShipmentOrderDetailListByOrderId(orderId: number) {
|
||||||
|
return requestClient.get<WmsShipmentOrderDetailApi.ShipmentOrderDetail[]>(
|
||||||
|
`/wms/shipment-order-detail/list-by-order-id?orderId=${orderId}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function createShipmentOrder(data: WmsShipmentOrderApi.ShipmentOrder) {
|
||||||
|
return requestClient.post('/wms/shipment-order/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateShipmentOrder(data: WmsShipmentOrderApi.ShipmentOrder) {
|
||||||
|
return requestClient.put('/wms/shipment-order/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function completeShipmentOrder(id: number) {
|
||||||
|
return requestClient.put(`/wms/shipment-order/complete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function cancelShipmentOrder(id: number) {
|
||||||
|
return requestClient.put(`/wms/shipment-order/cancel?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function deleteShipmentOrder(id: number) {
|
||||||
|
return requestClient.delete(`/wms/shipment-order/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function exportShipmentOrder(params: any) {
|
||||||
|
return requestClient.download('/wms/shipment-order/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
import type { VbenFormSchema } from '#/adapter/form';
|
||||||
|
|
||||||
|
import { markRaw } from 'vue';
|
||||||
|
|
||||||
|
import NumberRangeInput from './number-range-input.vue';
|
||||||
|
|
||||||
|
export { default as NumberRangeInput } from './number-range-input.vue';
|
||||||
|
|
||||||
|
export type NumberRangeValue = [number | undefined, number | undefined];
|
||||||
|
|
||||||
|
function splitNumberRange(minFieldName: string, maxFieldName: string) {
|
||||||
|
return (
|
||||||
|
value: NumberRangeValue | undefined,
|
||||||
|
setValue: (fieldName: string, value: number | undefined) => void,
|
||||||
|
) => {
|
||||||
|
setValue(minFieldName, value?.[0]);
|
||||||
|
setValue(maxFieldName, value?.[1]);
|
||||||
|
return undefined;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function buildNumberRangeSchema(
|
||||||
|
label: string,
|
||||||
|
fieldName: string,
|
||||||
|
minFieldName: string,
|
||||||
|
maxFieldName: string,
|
||||||
|
precision: number,
|
||||||
|
): VbenFormSchema {
|
||||||
|
return {
|
||||||
|
component: markRaw(NumberRangeInput),
|
||||||
|
componentProps: {
|
||||||
|
min: 0,
|
||||||
|
precision,
|
||||||
|
},
|
||||||
|
fieldName,
|
||||||
|
label,
|
||||||
|
valueFormat: splitNumberRange(minFieldName, maxFieldName),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,73 @@
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { InputNumber } from 'ant-design-vue';
|
||||||
|
|
||||||
|
type NumberRangeValue = [number | undefined, number | undefined];
|
||||||
|
|
||||||
|
const props = withDefaults(
|
||||||
|
defineProps<{
|
||||||
|
maxPlaceholder?: string;
|
||||||
|
min?: number;
|
||||||
|
minPlaceholder?: string;
|
||||||
|
precision?: number;
|
||||||
|
value?: NumberRangeValue;
|
||||||
|
}>(),
|
||||||
|
{
|
||||||
|
maxPlaceholder: '最大值',
|
||||||
|
min: undefined,
|
||||||
|
minPlaceholder: '最小值',
|
||||||
|
precision: 2,
|
||||||
|
value: undefined,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
'update:value': [value: NumberRangeValue | undefined];
|
||||||
|
}>();
|
||||||
|
|
||||||
|
function normalizeValue(value: unknown) {
|
||||||
|
if (typeof value === 'number') {
|
||||||
|
return Number.isFinite(value) ? value : undefined;
|
||||||
|
}
|
||||||
|
if (typeof value === 'string' && value.trim() !== '') {
|
||||||
|
const numberValue = Number(value);
|
||||||
|
return Number.isFinite(numberValue) ? numberValue : undefined;
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateValue(index: 0 | 1, value: unknown) {
|
||||||
|
const next: NumberRangeValue = [
|
||||||
|
props.value?.[0] ?? undefined,
|
||||||
|
props.value?.[1] ?? undefined,
|
||||||
|
];
|
||||||
|
next[index] = normalizeValue(value);
|
||||||
|
emit(
|
||||||
|
'update:value',
|
||||||
|
next[0] === undefined && next[1] === undefined ? undefined : next,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="flex w-full items-center gap-2">
|
||||||
|
<InputNumber
|
||||||
|
:controls="false"
|
||||||
|
:min="min"
|
||||||
|
:placeholder="minPlaceholder"
|
||||||
|
:precision="precision"
|
||||||
|
:value="value?.[0]"
|
||||||
|
class="min-w-0 flex-1"
|
||||||
|
@update:value="updateValue(0, $event)"
|
||||||
|
/>
|
||||||
|
<span class="shrink-0 text-muted-foreground">至</span>
|
||||||
|
<InputNumber
|
||||||
|
:controls="false"
|
||||||
|
:min="min"
|
||||||
|
:placeholder="maxPlaceholder"
|
||||||
|
:precision="precision"
|
||||||
|
:value="value?.[1]"
|
||||||
|
class="min-w-0 flex-1"
|
||||||
|
@update:value="updateValue(1, $event)"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
@ -37,7 +37,7 @@ const routes: RouteRecordRaw[] = [
|
||||||
activePath: '/iot/ota',
|
activePath: '/iot/ota',
|
||||||
},
|
},
|
||||||
component: () =>
|
component: () =>
|
||||||
import('#/views/iot/ota/modules/firmware-detail/index.vue'),
|
import('#/views/iot/ota/firmware/detail/index.vue'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '温度参数',
|
label: '温度参数',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
placeholder: '请输入温度参数',
|
placeholder: '请输入温度参数',
|
||||||
precision: 2,
|
precision: 2,
|
||||||
min: 0,
|
min: 0,
|
||||||
|
|
@ -53,6 +54,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '回复数 Token 数',
|
label: '回复数 Token 数',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
placeholder: '请输入回复数 Token 数',
|
placeholder: '请输入回复数 Token 数',
|
||||||
min: 0,
|
min: 0,
|
||||||
max: 8192,
|
max: 8192,
|
||||||
|
|
@ -64,6 +66,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '上下文数量',
|
label: '上下文数量',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
placeholder: '请输入上下文数量',
|
placeholder: '请输入上下文数量',
|
||||||
min: 0,
|
min: 0,
|
||||||
max: 20,
|
max: 20,
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '检索 topK',
|
label: '检索 topK',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
placeholder: '请输入检索 topK',
|
placeholder: '请输入检索 topK',
|
||||||
min: 0,
|
min: 0,
|
||||||
max: 10,
|
max: 10,
|
||||||
|
|
@ -63,6 +64,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '检索相似度阈值',
|
label: '检索相似度阈值',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
placeholder: '请输入检索相似度阈值',
|
placeholder: '请输入检索相似度阈值',
|
||||||
min: 0,
|
min: 0,
|
||||||
max: 1,
|
max: 1,
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '检索 topK',
|
label: '检索 topK',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
placeholder: '请输入检索 topK',
|
placeholder: '请输入检索 topK',
|
||||||
min: 0,
|
min: 0,
|
||||||
max: 10,
|
max: 10,
|
||||||
|
|
@ -66,6 +67,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '检索相似度阈值',
|
label: '检索相似度阈值',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
placeholder: '请输入检索相似度阈值',
|
placeholder: '请输入检索相似度阈值',
|
||||||
min: 0,
|
min: 0,
|
||||||
max: 1,
|
max: 1,
|
||||||
|
|
|
||||||
|
|
@ -154,6 +154,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '角色排序',
|
label: '角色排序',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
placeholder: '请输入角色排序',
|
placeholder: '请输入角色排序',
|
||||||
},
|
},
|
||||||
dependencies: {
|
dependencies: {
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '模型排序',
|
label: '模型排序',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
placeholder: '请输入模型排序',
|
placeholder: '请输入模型排序',
|
||||||
},
|
},
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
|
|
@ -104,6 +105,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '温度参数',
|
label: '温度参数',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
placeholder: '请输入温度参数',
|
placeholder: '请输入温度参数',
|
||||||
min: 0,
|
min: 0,
|
||||||
max: 2,
|
max: 2,
|
||||||
|
|
@ -121,6 +123,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '回复数 Token 数',
|
label: '回复数 Token 数',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
min: 0,
|
min: 0,
|
||||||
max: 8192,
|
max: 8192,
|
||||||
placeholder: '请输入回复数 Token 数',
|
placeholder: '请输入回复数 Token 数',
|
||||||
|
|
@ -138,6 +141,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '上下文数量',
|
label: '上下文数量',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
min: 0,
|
min: 0,
|
||||||
max: 20,
|
max: 20,
|
||||||
placeholder: '请输入上下文数量',
|
placeholder: '请输入上下文数量',
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '分类排序',
|
label: '分类排序',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
min: 0,
|
min: 0,
|
||||||
placeholder: '请输入分类排序',
|
placeholder: '请输入分类排序',
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '产品总金额',
|
label: '产品总金额',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
min: 0,
|
min: 0,
|
||||||
precision: 2,
|
precision: 2,
|
||||||
disabled: true,
|
disabled: true,
|
||||||
|
|
@ -130,6 +131,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '整单折扣(%)',
|
label: '整单折扣(%)',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
min: 0,
|
min: 0,
|
||||||
precision: 2,
|
precision: 2,
|
||||||
placeholder: '请输入整单折扣',
|
placeholder: '请输入整单折扣',
|
||||||
|
|
@ -141,6 +143,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '折扣后金额',
|
label: '折扣后金额',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
min: 0,
|
min: 0,
|
||||||
precision: 2,
|
precision: 2,
|
||||||
disabled: true,
|
disabled: true,
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ export const schema: VbenFormSchema[] = [
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
fieldName: 'notifyDays',
|
fieldName: 'notifyDays',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
min: 0,
|
min: 0,
|
||||||
precision: 0,
|
precision: 0,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -198,6 +198,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '产品总金额',
|
label: '产品总金额',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
min: 0,
|
min: 0,
|
||||||
precision: 2,
|
precision: 2,
|
||||||
placeholder: '请输入产品总金额',
|
placeholder: '请输入产品总金额',
|
||||||
|
|
@ -209,6 +210,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '整单折扣(%)',
|
label: '整单折扣(%)',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
min: 0,
|
min: 0,
|
||||||
precision: 2,
|
precision: 2,
|
||||||
placeholder: '请输入整单折扣',
|
placeholder: '请输入整单折扣',
|
||||||
|
|
@ -220,6 +222,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '折扣后金额',
|
label: '折扣后金额',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
min: 0,
|
min: 0,
|
||||||
precision: 2,
|
precision: 2,
|
||||||
disabled: true,
|
disabled: true,
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,7 @@ export function useFormSchema(confType: LimitConfType): VbenFormSchema[] {
|
||||||
: '锁定客户数上限',
|
: '锁定客户数上限',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
placeholder: `请输入${
|
placeholder: `请输入${
|
||||||
LimitConfType.CUSTOMER_QUANTITY_LIMIT === confType
|
LimitConfType.CUSTOMER_QUANTITY_LIMIT === confType
|
||||||
? '拥有客户数上限'
|
? '拥有客户数上限'
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ export const schema: VbenFormSchema[] = [
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
fieldName: 'contactExpireDays',
|
fieldName: 'contactExpireDays',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
min: 0,
|
min: 0,
|
||||||
precision: 0,
|
precision: 0,
|
||||||
},
|
},
|
||||||
|
|
@ -35,6 +36,7 @@ export const schema: VbenFormSchema[] = [
|
||||||
addonAfter: () => '天未成交',
|
addonAfter: () => '天未成交',
|
||||||
}),
|
}),
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
min: 0,
|
min: 0,
|
||||||
precision: 0,
|
precision: 0,
|
||||||
},
|
},
|
||||||
|
|
@ -63,6 +65,7 @@ export const schema: VbenFormSchema[] = [
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
fieldName: 'notifyDays',
|
fieldName: 'notifyDays',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
min: 0,
|
min: 0,
|
||||||
precision: 0,
|
precision: 0,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '价格(元)',
|
label: '价格(元)',
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
min: 0,
|
min: 0,
|
||||||
precision: 2,
|
precision: 2,
|
||||||
step: 0.1,
|
step: 0.1,
|
||||||
|
|
|
||||||
|
|
@ -141,6 +141,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
placeholder: '请输入回款金额',
|
placeholder: '请输入回款金额',
|
||||||
min: 0,
|
min: 0,
|
||||||
precision: 2,
|
precision: 2,
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
placeholder: '请输入计划回款金额',
|
placeholder: '请输入计划回款金额',
|
||||||
min: 0,
|
min: 0,
|
||||||
precision: 2,
|
precision: 2,
|
||||||
|
|
@ -119,6 +120,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '提前几天提醒',
|
label: '提前几天提醒',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
placeholder: '请输入提前几天提醒',
|
placeholder: '请输入提前几天提醒',
|
||||||
min: 0,
|
min: 0,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '排序',
|
label: '排序',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
placeholder: '请输入排序',
|
placeholder: '请输入排序',
|
||||||
precision: 0,
|
precision: 0,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -129,6 +129,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||||
label: '合计付款',
|
label: '合计付款',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
placeholder: '合计付款',
|
placeholder: '合计付款',
|
||||||
precision: 2,
|
precision: 2,
|
||||||
formatter: erpPriceInputFormatter,
|
formatter: erpPriceInputFormatter,
|
||||||
|
|
@ -140,6 +141,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||||
label: '优惠金额',
|
label: '优惠金额',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
disabled: formType === 'detail',
|
disabled: formType === 'detail',
|
||||||
placeholder: '请输入优惠金额',
|
placeholder: '请输入优惠金额',
|
||||||
precision: 2,
|
precision: 2,
|
||||||
|
|
@ -151,6 +153,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||||
label: '实际付款',
|
label: '实际付款',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
placeholder: '实际付款',
|
placeholder: '实际付款',
|
||||||
precision: 2,
|
precision: 2,
|
||||||
formatter: erpPriceInputFormatter,
|
formatter: erpPriceInputFormatter,
|
||||||
|
|
|
||||||
|
|
@ -129,6 +129,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||||
label: '合计收款',
|
label: '合计收款',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
placeholder: '合计收款',
|
placeholder: '合计收款',
|
||||||
precision: 2,
|
precision: 2,
|
||||||
formatter: erpPriceInputFormatter,
|
formatter: erpPriceInputFormatter,
|
||||||
|
|
@ -140,6 +141,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||||
label: '优惠金额',
|
label: '优惠金额',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
disabled: formType === 'detail',
|
disabled: formType === 'detail',
|
||||||
placeholder: '请输入优惠金额',
|
placeholder: '请输入优惠金额',
|
||||||
precision: 2,
|
precision: 2,
|
||||||
|
|
@ -151,6 +153,7 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||||
label: '实际收款',
|
label: '实际收款',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
placeholder: '实际收款',
|
placeholder: '实际收款',
|
||||||
precision: 2,
|
precision: 2,
|
||||||
formatter: erpPriceInputFormatter,
|
formatter: erpPriceInputFormatter,
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '显示顺序',
|
label: '显示顺序',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
min: 0,
|
min: 0,
|
||||||
placeholder: '请输入显示顺序',
|
placeholder: '请输入显示顺序',
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '保质期天数',
|
label: '保质期天数',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
placeholder: '请输入保质期天数',
|
placeholder: '请输入保质期天数',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -100,6 +101,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '重量(kg)',
|
label: '重量(kg)',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
placeholder: '请输入重量(kg)',
|
placeholder: '请输入重量(kg)',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -108,6 +110,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '采购价格',
|
label: '采购价格',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
placeholder: '请输入采购价格,单位:元',
|
placeholder: '请输入采购价格,单位:元',
|
||||||
precision: 2,
|
precision: 2,
|
||||||
min: 0,
|
min: 0,
|
||||||
|
|
@ -119,6 +122,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '销售价格',
|
label: '销售价格',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
placeholder: '请输入销售价格,单位:元',
|
placeholder: '请输入销售价格,单位:元',
|
||||||
precision: 2,
|
precision: 2,
|
||||||
min: 0,
|
min: 0,
|
||||||
|
|
@ -130,6 +134,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
label: '最低价格',
|
label: '最低价格',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
class: '!w-full',
|
||||||
placeholder: '请输入最低价格,单位:元',
|
placeholder: '请输入最低价格,单位:元',
|
||||||
precision: 2,
|
precision: 2,
|
||||||
min: 0,
|
min: 0,
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue