100 lines
1.9 KiB
TypeScript
100 lines
1.9 KiB
TypeScript
import { BasicColumn } from '/@/components/Table';
|
|
import { render } from '@/utils/common/renderUtils';
|
|
import { h } from 'vue';
|
|
//列表数据
|
|
export const columns: BasicColumn[] = [
|
|
{
|
|
title: '物料',
|
|
align: 'center',
|
|
dataIndex: 'itemId_dictText',
|
|
width: 120,
|
|
},
|
|
{
|
|
title: '库位',
|
|
align: 'center',
|
|
dataIndex: 'pointId_dictText',
|
|
width: 120,
|
|
},
|
|
{
|
|
title: '容器',
|
|
align: 'center',
|
|
dataIndex: 'stockId_dictText',
|
|
width: 120,
|
|
},
|
|
{
|
|
title: '数量',
|
|
align: 'center',
|
|
dataIndex: 'quantity',
|
|
width: 100,
|
|
},
|
|
{
|
|
title: '占用数',
|
|
align: 'center',
|
|
dataIndex: 'queuedQty',
|
|
width: 100,
|
|
},
|
|
{
|
|
title: '库存状态',
|
|
align: 'center',
|
|
dataIndex: 'status_dictText',
|
|
width: 100,
|
|
customRender: ({ text }) => {
|
|
const statusColorMap = {
|
|
禁用: 'red',
|
|
可用: 'green',
|
|
已分配: 'orange',
|
|
出库中: 'cyan',
|
|
移位中: 'blue',
|
|
盘点中: 'purple',
|
|
冻结: 'pink',
|
|
};
|
|
const color = statusColorMap[text] || 'red';
|
|
return render.renderTag(text, color);
|
|
},
|
|
},
|
|
{
|
|
title: '仓库代码',
|
|
align: 'center',
|
|
dataIndex: 'whCode',
|
|
width: 100,
|
|
},
|
|
{
|
|
title: '项目号',
|
|
align: 'center',
|
|
dataIndex: 'project',
|
|
width: 150,
|
|
customRender: ({ text }) => {
|
|
return h('div', { style: { wordBreak: 'break-all', lineHeight: '1.5' } }, text);
|
|
},
|
|
},
|
|
{
|
|
title: '任务号',
|
|
align: 'center',
|
|
dataIndex: 'taskNo',
|
|
width: 100,
|
|
},
|
|
{
|
|
title: '批次号',
|
|
align: 'center',
|
|
dataIndex: 'propC1',
|
|
width: 100,
|
|
},
|
|
{
|
|
title: '赛意库存状态',
|
|
align: 'center',
|
|
dataIndex: 'propC3',
|
|
width: 110,
|
|
},
|
|
{
|
|
title: '备注',
|
|
align: 'center',
|
|
dataIndex: 'description',
|
|
},
|
|
{
|
|
title: '创建时间',
|
|
align: 'center',
|
|
dataIndex: 'createTime',
|
|
sorter: true,
|
|
},
|
|
];
|