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.

75 lines
1.9 KiB

10 months ago
export default function () {
const options={
height:250,
align:'center',
border: true,
resizable: true,
keepSource:true,
size:'mini',
showOverflow: true,
scrollY:{enable:true},
9 months ago
data:[],
ycldw:[]
10 months ago
}
9 months ago
const ext={}
const setExt=function (key,value){
ext[key]=value
}
10 months ago
const gdhFormat=function ({cellValue}){
if (cellValue){
return 'PW'+cellValue
}
return ''
}
const nameFormat=function ({cellValue}){
const workers=ext.workers
for (const item of workers) {
if(item.userCode===cellValue){
return item.userName
}
}
}
9 months ago
const dwFormat=function ({cellValue}){
for (const item of options.ycldw) {
if (cellValue===item.id){
return item.name
}
}
return cellValue
}
const ztFormat=function ({cellValue}){
return ztEnmu[cellValue]
}
const ztEnmu={
'31':'派工',
'32':'报工'
}
10 months ago
const columns = [
{ type: 'checkbox', width: 40 },
{ type: 'seq',title:'序号', width: 60 },
9 months ago
{ field: 'djh',title:'派工单号', width: 120,formatter: gdhFormat},
{field: 'slycldw', title: '垛位', width: 60,formatter: dwFormat},
{field: 'slyclcs', title: '层数', width: 60},
10 months ago
{field: 'dcCh', title: '船号', width: 80},
{field: 'dcPl', title: '批量', width: 80},
9 months ago
{field: 'wpgg', title: '材质', width: 80},
{field: 'wpxh', title: '规格', width: 70},
{field: 'slwlh', title: '炉批号', width: 100},
10 months ago
{field: 'tzbh', title: '套料图号', width: 100},
{field: 'pwry', title: '接收人', width: 80,formatter:nameFormat},
{field: 'pwpgrq', title: '接收时间', width: 100},
{field: 'pwfkry', title: '报工人', width: 80,formatter:nameFormat},
{field: 'pwfksj', title: '报工时间', width: 100},
9 months ago
{field: 'pgr', title: '派工人', width: 80},
{field: 'pwpgrq', title: '派工时间', width: 100},
10 months ago
]
return {
options,
columns,
setExt
10 months ago
}
}