移除旧接口和界面
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
import http from '../utils/http';
|
||||
import {
|
||||
PaginationDTO, DeviceCommandLogDTO, FeedFormulaDTO, PenDTO, FeedUsageRecordDTO, MedicationReasonType,
|
||||
PaginationDTO, DeviceCommandLogDTO, MedicationReasonType,
|
||||
MedicationDTO, MedicationLogDTO, NotifierType, NotificationStatus, NotificationDTO, PendingCollectionStatus,
|
||||
PendingCollectionDTO, LogChangeType, PigBatchLogDTO, PigPurchaseDTO, PigSaleDTO, PigBatchSickPigReasonType,
|
||||
PigBatchSickPigTreatmentLocation, PigSickLogDTO, PigTransferType, PigTransferLogDTO, ExecutionStatus,
|
||||
PlanExecutionLogDTO, RawMaterialDTO, RawMaterialPurchaseDTO, StockLogSourceType, RawMaterialStockLogDTO,
|
||||
SensorType, SensorDataDTO, TaskDTO, TaskExecutionLogDTO, AuditStatus, UserActionLogDTO, WeighingBatchDTO,
|
||||
PlanExecutionLogDTO, SensorType, SensorDataDTO, TaskDTO, TaskExecutionLogDTO, AuditStatus, UserActionLogDTO, WeighingBatchDTO,
|
||||
WeighingRecordDTO, ZapcoreLevel, SeverityLevel
|
||||
} from '../enums';
|
||||
|
||||
@@ -37,37 +36,6 @@ import {
|
||||
* @property {boolean} [received_success]
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {object} FeedUsageRecordDTO
|
||||
* @property {number} id
|
||||
* @property {number} pen_id
|
||||
* @property {PenDTO} pen
|
||||
* @property {number} feed_formula_id
|
||||
* @property {FeedFormulaDTO} feed_formula
|
||||
* @property {number} amount
|
||||
* @property {string} recorded_at
|
||||
* @property {string} remarks
|
||||
* @property {number} operator_id
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {object} ListFeedUsageRecordResponse
|
||||
* @property {Array<FeedUsageRecordDTO>} list
|
||||
* @property {PaginationDTO} pagination
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {object} FeedUsageRecordsParams
|
||||
* @property {number} [page]
|
||||
* @property {number} [page_size]
|
||||
* @property {string} [order_by]
|
||||
* @property {number} [pen_id]
|
||||
* @property {number} [feed_formula_id]
|
||||
* @property {string} [start_time]
|
||||
* @property {string} [end_time]
|
||||
* @property {number} [operator_id]
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {object} MedicationLogDTO
|
||||
* @property {number} id
|
||||
@@ -364,65 +332,6 @@ import {
|
||||
* @property {string} [end_time]
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {object} RawMaterialPurchaseDTO
|
||||
* @property {number} id
|
||||
* @property {number} raw_material_id
|
||||
* @property {RawMaterialDTO} raw_material
|
||||
* @property {number} amount
|
||||
* @property {number} unit_price
|
||||
* @property {number} total_price
|
||||
* @property {string} supplier
|
||||
* @property {string} purchase_date
|
||||
* @property {string} created_at
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {object} ListRawMaterialPurchaseResponse
|
||||
* @property {Array<RawMaterialPurchaseDTO>} list
|
||||
* @property {PaginationDTO} pagination
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {object} RawMaterialPurchasesParams
|
||||
* @property {number} [page]
|
||||
* @property {number} [page_size]
|
||||
* @property {string} [order_by]
|
||||
* @property {number} [raw_material_id]
|
||||
* @property {string} [supplier]
|
||||
* @property {string} [start_time]
|
||||
* @property {string} [end_time]
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {object} RawMaterialStockLogDTO
|
||||
* @property {number} id
|
||||
* @property {number} raw_material_id
|
||||
* @property {number} change_amount
|
||||
* @property {StockLogSourceType} source_type
|
||||
* @property {number} source_id
|
||||
* @property {string} remarks
|
||||
* @property {string} happened_at
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {object} ListRawMaterialStockLogResponse
|
||||
* @property {Array<RawMaterialStockLogDTO>} list
|
||||
* @property {PaginationDTO} pagination
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {object} RawMaterialStockLogsParams
|
||||
* @property {number} [page]
|
||||
* @property {number} [page_size]
|
||||
* @property {string} [order_by]
|
||||
* @property {number} [raw_material_id]
|
||||
* @property {string} [source_type]
|
||||
* @property {number} [source_id]
|
||||
* @property {string} [start_time]
|
||||
* @property {string} [end_time]
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {object} SensorDataDTO
|
||||
* @property {number} area_controller_id
|
||||
@@ -594,17 +503,6 @@ export const getDeviceCommandLogs = async (params) => {
|
||||
return processResponse(responseData);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取饲料使用记录列表
|
||||
* @param {FeedUsageRecordsParams} params - 查询参数
|
||||
* @returns {Promise<{list: Array<FeedUsageRecordDTO>, total: number}>}
|
||||
*/
|
||||
export const getFeedUsageRecords = async (params) => {
|
||||
const newParams = { ...params, page_size: params.page_size };
|
||||
const responseData = await http.get('/api/v1/monitor/feed-usage-records', { params: newParams });
|
||||
return processResponse(responseData);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取用药记录列表
|
||||
* @param {MedicationLogsParams} params - 查询参数
|
||||
@@ -704,28 +602,6 @@ export const getPlanExecutionLogs = async (params) => {
|
||||
return processResponse(responseData);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取原料采购记录列表
|
||||
* @param {RawMaterialPurchasesParams} params - 查询参数
|
||||
* @returns {Promise<{list: Array<RawMaterialPurchaseDTO>, total: number}>}
|
||||
*/
|
||||
export const getRawMaterialPurchases = async (params) => {
|
||||
const newParams = { ...params, page_size: params.page_size };
|
||||
const responseData = await http.get('/api/v1/monitor/raw-material-purchases', { params: newParams });
|
||||
return processResponse(responseData);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取原料库存日志列表
|
||||
* @param {RawMaterialStockLogsParams} params - 查询参数
|
||||
* @returns {Promise<{list: Array<RawMaterialStockLogDTO>, total: number}>}
|
||||
*/
|
||||
export const getRawMaterialStockLogs = async (params) => {
|
||||
const newParams = { ...params, page_size: params.page_size };
|
||||
const responseData = await http.get('/api/v1/monitor/raw-material-stock-logs', { params: newParams });
|
||||
return processResponse(responseData);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取传感器数据列表
|
||||
* @param {SensorDataParams} params - 查询参数
|
||||
@@ -783,7 +659,6 @@ export const getWeighingRecords = async (params) => {
|
||||
|
||||
export const MonitorApi = {
|
||||
getDeviceCommandLogs,
|
||||
getFeedUsageRecords,
|
||||
getMedicationLogs,
|
||||
getNotifications,
|
||||
getPendingCollections,
|
||||
@@ -793,11 +668,9 @@ export const MonitorApi = {
|
||||
getPigSickLogs,
|
||||
getPigTransferLogs,
|
||||
getPlanExecutionLogs,
|
||||
getRawMaterialPurchases,
|
||||
getRawMaterialStockLogs,
|
||||
getSensorData,
|
||||
getTaskExecutionLogs,
|
||||
getUserActionLogs,
|
||||
getWeighingBatches,
|
||||
getWeighingRecords,
|
||||
};
|
||||
};
|
||||
32
src/enums.js
32
src/enums.js
@@ -144,9 +144,7 @@ export const PigBatchSickPigTreatmentLocation = {
|
||||
* @enum {string}
|
||||
*/
|
||||
export const PigBatchStatus = {
|
||||
WEANING: '保育', // 从断奶到保育结束
|
||||
GROWING: '生长', // 生长育肥阶段
|
||||
FINISHING: '育肥', // 最后的育肥阶段
|
||||
ACTIVE: '生产中', // 饲养中
|
||||
FOR_SALE: '待售', // 达到出栏标准
|
||||
SOLD: '已出售',
|
||||
ARCHIVED: '已归档', // 批次结束(如全群淘汰等)
|
||||
@@ -216,19 +214,6 @@ export const SensorType = {
|
||||
WEIGHT: '重量',
|
||||
};
|
||||
|
||||
/**
|
||||
* 库存日志来源类型
|
||||
* @enum {string}
|
||||
*/
|
||||
export const StockLogSourceType = {
|
||||
PURCHASE: '采购入库',
|
||||
FEEDING: '饲喂出库',
|
||||
DETERIORATE: '变质出库',
|
||||
SALE: '售卖出库',
|
||||
MISCELLANEOUS: '杂用领取',
|
||||
MANUAL: '手动盘点',
|
||||
};
|
||||
|
||||
/**
|
||||
* 任务类型
|
||||
* @enum {string}
|
||||
@@ -239,6 +224,7 @@ export const TaskType = {
|
||||
RELEASE_FEED_WEIGHT: '下料', // 下料口释放指定重量任务
|
||||
FULL_COLLECTION: '全量采集', // 新增的全量采集任务
|
||||
ALARM_NOTIFICATION: '告警通知', // 告警通知任务
|
||||
NOTIFICATION_REFRESH: '通知刷新', // 通知刷新任务
|
||||
DEVICE_THRESHOLD_CHECK: '设备阈值检查', // 设备阈值检查任务
|
||||
AREA_COLLECTOR_THRESHOLD_CHECK: '区域阈值检查', // 区域阈值检查任务
|
||||
};
|
||||
@@ -321,11 +307,11 @@ export const Operator = {
|
||||
* @enum {string}
|
||||
*/
|
||||
export const SeverityLevel = {
|
||||
DEBUG: 'Debug',
|
||||
INFO: 'Info',
|
||||
WARN: 'Warn',
|
||||
ERROR: 'Error',
|
||||
DPANIC: 'DPanic',
|
||||
PANIC: 'Panic',
|
||||
FATAL: 'Fatal',
|
||||
DEBUG: 'debug',
|
||||
INFO: 'info',
|
||||
WARN: 'warn',
|
||||
ERROR: 'error',
|
||||
DPANIC: 'dpanic',
|
||||
PANIC: 'panic',
|
||||
FATAL: 'fatal',
|
||||
};
|
||||
|
||||
@@ -113,12 +113,6 @@
|
||||
</el-icon>
|
||||
<template #title>设备命令日志</template>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/monitor/feed-usage-records">
|
||||
<el-icon>
|
||||
<Food/>
|
||||
</el-icon>
|
||||
<template #title>饲料使用记录</template>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/monitor/medication-logs">
|
||||
<el-icon>
|
||||
<FirstAidKit/>
|
||||
@@ -167,18 +161,6 @@
|
||||
</el-icon>
|
||||
<template #title>猪只迁移日志</template>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/monitor/raw-material-purchases">
|
||||
<el-icon>
|
||||
<Shop/>
|
||||
</el-icon>
|
||||
<template #title>原料采购记录</template>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/monitor/raw-material-stock-logs">
|
||||
<el-icon>
|
||||
<Coin/>
|
||||
</el-icon>
|
||||
<template #title>原料库存日志</template>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/monitor/sensor-data">
|
||||
<el-icon>
|
||||
<DataLine/>
|
||||
@@ -284,7 +266,6 @@ import {
|
||||
Tickets,
|
||||
DataAnalysis,
|
||||
Document,
|
||||
Food,
|
||||
FirstAidKit,
|
||||
Clock,
|
||||
Files,
|
||||
@@ -293,8 +274,6 @@ import {
|
||||
Warning,
|
||||
Switch,
|
||||
List,
|
||||
Shop,
|
||||
Coin,
|
||||
DataLine,
|
||||
Finished,
|
||||
User,
|
||||
@@ -319,7 +298,6 @@ export default {
|
||||
Tickets,
|
||||
DataAnalysis,
|
||||
Document,
|
||||
Food,
|
||||
FirstAidKit,
|
||||
Clock,
|
||||
Files,
|
||||
@@ -328,8 +306,6 @@ export default {
|
||||
Warning,
|
||||
Switch,
|
||||
List,
|
||||
Shop,
|
||||
Coin,
|
||||
DataLine,
|
||||
Finished,
|
||||
User,
|
||||
|
||||
@@ -7,7 +7,6 @@ import DeviceTemplateList from '../views/device/DeviceTemplateList.vue';
|
||||
import PigFarmManagementView from '../views/pms/PigFarmManagementView.vue';
|
||||
import PigBatchManagementView from '../views/pms/PigBatchManagementView.vue';
|
||||
import DeviceCommandLogView from '../views/monitor/DeviceCommandLogView.vue';
|
||||
import FeedUsageRecordsView from '../views/monitor/FeedUsageRecordsView.vue';
|
||||
import MedicationLogsView from '../views/monitor/MedicationLogsView.vue';
|
||||
import NotificationLogView from '../views/monitor/NotificationLogView.vue';
|
||||
import PendingCollectionsView from '../views/monitor/PendingCollectionsView.vue';
|
||||
@@ -17,8 +16,6 @@ import PigSalesView from '../views/monitor/PigSalesView.vue';
|
||||
import PigSickLogsView from '../views/monitor/PigSickLogsView.vue';
|
||||
import PigTransferLogsView from '../views/monitor/PigTransferLogsView.vue';
|
||||
import PlanExecutionLogsView from '../views/monitor/PlanExecutionLogsView.vue';
|
||||
import RawMaterialPurchasesView from '../views/monitor/RawMaterialPurchasesView.vue';
|
||||
import RawMaterialStockLogsView from '../views/monitor/RawMaterialStockLogsView.vue';
|
||||
import SensorDataView from '../views/monitor/SensorDataView.vue';
|
||||
import TaskExecutionLogsView from '../views/monitor/TaskExecutionLogsView.vue';
|
||||
import UserActionLogsView from '../views/monitor/UserActionLogsView.vue';
|
||||
@@ -38,7 +35,6 @@ const routes = [
|
||||
{path: '/pms/farm-management', name: 'PigFarmManagement', component: PigFarmManagementView, meta: { requiresAuth: true, title: '栏舍管理' }},
|
||||
{path: '/pms/batch-management', name: 'PigBatchManagement', component: PigBatchManagementView, meta: { requiresAuth: true, title: '猪群管理' }},
|
||||
{path: '/monitor/device-command-logs', component: DeviceCommandLogView, meta: {requiresAuth: true, title: '设备命令日志'}},
|
||||
{path: '/monitor/feed-usage-records', component: FeedUsageRecordsView, meta: {requiresAuth: true, title: '饲料使用记录'}},
|
||||
{path: '/monitor/medication-logs', component: MedicationLogsView, meta: {requiresAuth: true, title: '用药记录'}},
|
||||
{path: '/monitor/notifications', component: NotificationLogView, meta: {requiresAuth: true, title: '通知记录'}},
|
||||
{path: '/monitor/pending-collections', component: PendingCollectionsView, meta: {requiresAuth: true, title: '待采集请求'}},
|
||||
@@ -48,8 +44,6 @@ const routes = [
|
||||
{path: '/monitor/pig-sick-logs', component: PigSickLogsView, meta: {requiresAuth: true, title: '病猪日志'}},
|
||||
{path: '/monitor/pig-transfer-logs', component: PigTransferLogsView, meta: {requiresAuth: true, title: '猪只迁移日志'}},
|
||||
{path: '/monitor/plan-execution-logs', component: PlanExecutionLogsView, meta: {requiresAuth: true, title: '计划执行日志'}},
|
||||
{path: '/monitor/raw-material-purchases', component: RawMaterialPurchasesView, meta: {requiresAuth: true, title: '原料采购记录'}},
|
||||
{path: '/monitor/raw-material-stock-logs', component: RawMaterialStockLogsView, meta: {requiresAuth: true, title: '原料库存日志'}},
|
||||
{path: '/monitor/sensor-data', component: SensorDataView, meta: {requiresAuth: true, title: '传感器数据'}},
|
||||
{path: '/monitor/task-execution-logs', component: TaskExecutionLogsView, meta: {requiresAuth: true, title: '任务执行日志'}},
|
||||
{path: '/monitor/user-action-logs', component: UserActionLogsView, meta: {requiresAuth: true, title: '用户操作日志'}},
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
<template>
|
||||
<div class="feed-usage-record-view">
|
||||
<GenericMonitorList
|
||||
:fetchData="fetchFeedUsageRecords"
|
||||
:columnsConfig="feedUsageRecordColumns"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import GenericMonitorList from '../../components/GenericMonitorList.vue';
|
||||
import { getFeedUsageRecords } from '../../api/monitor.js';
|
||||
import { formatRFC3339 } from '../../utils/format.js';
|
||||
|
||||
// 适配通用组件的 fetchData prop
|
||||
const fetchFeedUsageRecords = async (params) => {
|
||||
return await getFeedUsageRecords(params);
|
||||
};
|
||||
|
||||
// 定义表格的列配置
|
||||
// 根据 swagger, 支持的筛选参数有: feed_formula_id, operator_id, pen_id, start_time, end_time
|
||||
const feedUsageRecordColumns = [
|
||||
{
|
||||
title: '记录ID',
|
||||
dataIndex: 'id',
|
||||
key: 'id',
|
||||
sorter: true,
|
||||
minWidth: 100,
|
||||
},
|
||||
{
|
||||
title: '用量(kg)',
|
||||
dataIndex: 'amount',
|
||||
key: 'amount',
|
||||
sorter: true,
|
||||
minWidth: 120,
|
||||
},
|
||||
{
|
||||
title: '饲料配方',
|
||||
dataIndex: ['feed_formula', 'name'], // 访问嵌套属性
|
||||
key: 'feed_formula_name',
|
||||
minWidth: 150,
|
||||
},
|
||||
{
|
||||
title: '配方ID (筛选)',
|
||||
dataIndex: 'feed_formula_id',
|
||||
key: 'feed_formula_id',
|
||||
filterType: 'number',
|
||||
minWidth: 150,
|
||||
},
|
||||
{
|
||||
title: '猪栏',
|
||||
dataIndex: ['pen', 'name'], // 访问嵌套属性
|
||||
key: 'pen_name',
|
||||
minWidth: 120,
|
||||
},
|
||||
{
|
||||
title: '猪栏ID (筛选)',
|
||||
dataIndex: 'pen_id',
|
||||
key: 'pen_id',
|
||||
filterType: 'number',
|
||||
minWidth: 150,
|
||||
},
|
||||
{
|
||||
title: '操作员ID',
|
||||
dataIndex: 'operator_id',
|
||||
key: 'operator_id',
|
||||
filterType: 'number',
|
||||
minWidth: 120,
|
||||
},
|
||||
{
|
||||
title: '记录时间',
|
||||
dataIndex: 'recorded_at',
|
||||
key: 'recorded_at',
|
||||
sorter: true,
|
||||
filterType: 'dateRange',
|
||||
formatter: (row, column, cellValue) => formatRFC3339(cellValue),
|
||||
minWidth: 180,
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
dataIndex: 'remarks',
|
||||
key: 'remarks',
|
||||
minWidth: 200,
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.feed-usage-record-view {
|
||||
/* 视图容器样式 */
|
||||
}
|
||||
</style>
|
||||
@@ -1,85 +0,0 @@
|
||||
<template>
|
||||
<div class="raw-material-purchases-view">
|
||||
<GenericMonitorList
|
||||
:fetchData="fetchRawMaterialPurchases"
|
||||
:columnsConfig="rawMaterialPurchaseColumns"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import GenericMonitorList from '../../components/GenericMonitorList.vue';
|
||||
import { getRawMaterialPurchases } from '../../api/monitor.js';
|
||||
import { formatRFC3339 } from '../../utils/format.js';
|
||||
|
||||
// 适配通用组件的 fetchData prop
|
||||
const fetchRawMaterialPurchases = async (params) => {
|
||||
return await getRawMaterialPurchases(params);
|
||||
};
|
||||
|
||||
// 定义表格的列,依据 swagger.json
|
||||
const rawMaterialPurchaseColumns = [
|
||||
{
|
||||
title: '采购ID',
|
||||
dataIndex: 'id',
|
||||
key: 'id',
|
||||
sorter: true,
|
||||
minWidth: 100,
|
||||
},
|
||||
{
|
||||
title: '原料名称',
|
||||
dataIndex: ['raw_material', 'name'], // 嵌套属性
|
||||
key: 'raw_material_name',
|
||||
minWidth: 150,
|
||||
},
|
||||
{
|
||||
title: '原料ID',
|
||||
dataIndex: 'raw_material_id',
|
||||
key: 'raw_material_id',
|
||||
filterType: 'number',
|
||||
sorter: true,
|
||||
minWidth: 120,
|
||||
},
|
||||
{
|
||||
title: '供应商',
|
||||
dataIndex: 'supplier',
|
||||
key: 'supplier',
|
||||
filterType: 'text',
|
||||
minWidth: 150,
|
||||
},
|
||||
{
|
||||
title: '数量',
|
||||
dataIndex: 'amount',
|
||||
key: 'amount',
|
||||
sorter: true,
|
||||
minWidth: 120,
|
||||
},
|
||||
{
|
||||
title: '单价',
|
||||
dataIndex: 'unit_price',
|
||||
key: 'unit_price',
|
||||
sorter: true,
|
||||
minWidth: 120,
|
||||
},
|
||||
{
|
||||
title: '总价',
|
||||
dataIndex: 'total_price',
|
||||
key: 'total_price',
|
||||
sorter: true,
|
||||
minWidth: 120,
|
||||
},
|
||||
{
|
||||
title: '采购日期',
|
||||
dataIndex: 'purchase_date',
|
||||
key: 'purchase_date',
|
||||
sorter: true,
|
||||
filterType: 'dateRange',
|
||||
formatter: (row, column, cellValue) => formatRFC3339(cellValue),
|
||||
minWidth: 180,
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 视图容器样式 */
|
||||
</style>
|
||||
@@ -1,81 +0,0 @@
|
||||
<template>
|
||||
<div class="raw-material-stock-logs-view">
|
||||
<GenericMonitorList
|
||||
:fetchData="fetchRawMaterialStockLogs"
|
||||
:columnsConfig="rawMaterialStockLogColumns"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import GenericMonitorList from '../../components/GenericMonitorList.vue';
|
||||
import { getRawMaterialStockLogs } from '../../api/monitor.js';
|
||||
import { formatRFC3339 } from '../../utils/format.js';
|
||||
import { StockLogSourceType } from '../../enums.js';
|
||||
|
||||
// 适配通用组件的 fetchData prop
|
||||
const fetchRawMaterialStockLogs = async (params) => {
|
||||
return await getRawMaterialStockLogs(params);
|
||||
};
|
||||
|
||||
// 定义表格的列,依据 swagger.json
|
||||
const rawMaterialStockLogColumns = [
|
||||
{
|
||||
title: '记录ID',
|
||||
dataIndex: 'id',
|
||||
key: 'id',
|
||||
sorter: true,
|
||||
minWidth: 100,
|
||||
},
|
||||
{
|
||||
title: '原料ID',
|
||||
dataIndex: 'raw_material_id',
|
||||
key: 'raw_material_id',
|
||||
filterType: 'number',
|
||||
sorter: true,
|
||||
minWidth: 120,
|
||||
},
|
||||
{
|
||||
title: '来源类型',
|
||||
dataIndex: 'source_type',
|
||||
key: 'source_type',
|
||||
filterType: 'select',
|
||||
filterOptions: Object.values(StockLogSourceType).map(value => ({ text: value, value: value })),
|
||||
minWidth: 130,
|
||||
},
|
||||
{
|
||||
title: '来源ID',
|
||||
dataIndex: 'source_id',
|
||||
key: 'source_id',
|
||||
filterType: 'number',
|
||||
sorter: true,
|
||||
minWidth: 120,
|
||||
},
|
||||
{
|
||||
title: '变更数量',
|
||||
dataIndex: 'change_amount',
|
||||
key: 'change_amount',
|
||||
sorter: true,
|
||||
minWidth: 120,
|
||||
},
|
||||
{
|
||||
title: '发生时间',
|
||||
dataIndex: 'happened_at',
|
||||
key: 'happened_at',
|
||||
sorter: true,
|
||||
filterType: 'dateRange',
|
||||
formatter: (row, column, cellValue) => formatRFC3339(cellValue),
|
||||
minWidth: 180,
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
dataIndex: 'remarks',
|
||||
key: 'remarks',
|
||||
minWidth: 200,
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 视图容器样式 */
|
||||
</style>
|
||||
Reference in New Issue
Block a user