You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.7 KiB

export default function () {
const options={
height:250,
align:'center',
border: true,
resizable: true,
keepSource:true,
size:'mini',
showOverflow: true,
scrollY:{enable:true},
8 months ago
data:[]
}
const ext={}
const setExt=function (key,value){
ext[key]=value
}
const gdhFormat=function ({cellValue}){
if (cellValue){
8 months ago
return 'PW'+cellValue
}
return ''
}
const nameFormat=function ({cellValue}){
const workers=ext.workers
for (const item of workers) {
if(item.userCode===cellValue){
return item.userName
}
}
}
const ztFormat=function ({cellValue}){
return ztEnmu[cellValue]
}
const ztEnmu={
'31':'派工',
'32':'反馈'
}
const columns = [
{ type: 'checkbox', width: 40 },
{ type: 'seq',title:'序号', width: 60 },
{ field: 'gdh',title:'派工单号', width: 120,formatter: gdhFormat},
8 months ago
{field: '', title: '抛丸位置', width: 80},
{field: '', title: '垛位', width: 60},
{field: '', title: '层数', width: 60},
{field: 'dcCh', title: '船号', width: 80},
{field: 'dcPl', title: '批量', width: 80},
{field: '', title: '材质', width: 80},
{field: '', title: '规格', width: 100},
{field: '', title: '炉批号', width: 100},
{field: 'tzbh', title: '套料图号', width: 100},
{field: 'pwry', title: '接收人', width: 80,formatter:nameFormat},
{field: 'pwpgrq', title: '接收时间', width: 100},
{field: 'pwfkr', title: '反馈人', width: 80,formatter:nameFormat},
{field: 'pwfkrq', title: '反馈时间', width: 100},
{field: 'zt', title: '状态', width: 60,formatter:ztFormat},
]
return {
options,
columns,
setExt
}
}