Cpte-Vue3/src/views/base/stock/Stock.data.ts

41 lines
842 B
TypeScript

import {BasicColumn} from '/@/components/Table';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '容器编码',
align: "center",
dataIndex: 'stockCode'
},
{
title: '容器类型',
align: "center",
dataIndex: 'stockType_dictText'
},
{
title: '状态',
align: 'center',
dataIndex: 'status_dictText',
customRender: ({ text }) => {
const color = text == '占用' ? 'red' : text == '空闲' ? 'green' : 'gray';
return render.renderTag(text, color);
},
},
{
title: '是否启用',
align: 'center',
dataIndex: 'izActive',
},
{
title: '描述',
align: "center",
dataIndex: 'description'
},
{
title: '创建日期',
align: "center",
dataIndex: 'createTime'
},
];