|
|
@ -144,107 +144,49 @@ |
|
|
|
columns: [{ |
|
|
|
checkbox: true |
|
|
|
}, |
|
|
|
{title: '主键ID',field: 'id'}, |
|
|
|
{ title: '主键ID',field: 'id'}, |
|
|
|
{ title: '流程实例ID',field: 'instanceId',visible: false}, |
|
|
|
{ title: '流程提交实例ID',field: 'submitInstanceId',visible: false}, |
|
|
|
{title: '流程作废实例ID', field: 'cancelInstanceId',visible: false}, |
|
|
|
{ title: '流程作废实例ID', field: 'cancelInstanceId',visible: false}, |
|
|
|
{ title: '流程恢复实例ID',field: 'restoreInstanceId',visible: false}, |
|
|
|
{ title: '流程实例类型',field: 'instanceTypeName', visible: false}, |
|
|
|
{ |
|
|
|
field: 'applyUser', |
|
|
|
title: '申请人ID', |
|
|
|
visible: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'applyUserName', |
|
|
|
title: '<span style="color: red;">申请人</span>', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return '<span style="color: red;">' + (value ? value : "-") + '</span>'; |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'applyTime', |
|
|
|
title: '申请时间', |
|
|
|
sortable: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'taskId', |
|
|
|
title: '当前任务ID', |
|
|
|
visible: false, |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'todoUserId', |
|
|
|
title: '待办用户ID', |
|
|
|
visible: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'taskName', |
|
|
|
title: '当前任务名称', |
|
|
|
align: 'center', |
|
|
|
{ title: '申请人ID',field: 'applyUser',visible: false}, |
|
|
|
{ title: '<span style="color: red;">申请人</span>',field: 'applyUserName', |
|
|
|
formatter: function(value, row, index) {return '<span style="color: red;">' + (value ? value : "-") + '</span>';} |
|
|
|
}, |
|
|
|
{ title: '申请时间',field: 'applyTime',sortable: true,}, |
|
|
|
{ title: '当前任务ID',field: 'taskId',visible: false,}, |
|
|
|
{ title: '待办用户ID',field: 'todoUserId',visible: false,}, |
|
|
|
{ title: '当前任务名称',field: 'taskName',align: 'center', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return '<span class="badge badge-primary">' + value + '</span>'; |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'auditStatus', |
|
|
|
title: '审核状态', |
|
|
|
sortable: true, |
|
|
|
{ title: '审核状态',field: 'auditStatus',sortable: true, |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.selectDictLabel(auditStatusDatas, value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'useStatus', |
|
|
|
title: '使用状态', |
|
|
|
sortable: true, |
|
|
|
{ title: '使用状态',field: 'useStatus',sortable: true, |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.selectDictLabel(useStatusDatas, value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{title: '工程员',field: 'engineer', sortable: true,}, |
|
|
|
{title: 'bom号',field: 'bomNo', sortable: true,}, |
|
|
|
{title: '关联料号',field: 'materialNo', sortable: true,}, |
|
|
|
{ |
|
|
|
field: 'photoUrl', |
|
|
|
title: '图片', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.imageView(value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ title: '工程员',field: 'engineer', sortable: true,}, |
|
|
|
{ title: 'bom号',field: 'bomNo', sortable: true,}, |
|
|
|
{ title: '关联料号',field: 'materialNo', sortable: true,}, |
|
|
|
{ title: '图片',field: 'photoUrl',formatter: function(value, row, index) {return $.table.imageView(value);}}, |
|
|
|
{ title: '物料名称',field: 'materialName', sortable: true,}, |
|
|
|
{ |
|
|
|
field: 'materialType', |
|
|
|
title: '物料类型', |
|
|
|
sortable: true, |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.selectCategoryLabel(materialTypeDatas, value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'processMethod', |
|
|
|
title: '半成品类型', |
|
|
|
sortable: true, |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.selectDictLabel(processMethodDatas, value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'unit', |
|
|
|
title: '单位', |
|
|
|
sortable: true, |
|
|
|
{ title: '物料类型',field: 'materialType',sortable: true, |
|
|
|
formatter: function(value, row, index) {return $.table.selectCategoryLabel(materialTypeDatas, value);}}, |
|
|
|
{ title: '加工方式',field: 'processMethod',sortable: true, |
|
|
|
formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);} |
|
|
|
}, |
|
|
|
{ title: '单位',field: 'unit', sortable: true,}, |
|
|
|
{ title: '品牌',field: 'brand', sortable: true,}, |
|
|
|
{title: '描述',field: 'describe', sortable: true,}, |
|
|
|
{ |
|
|
|
field: 'parentId', |
|
|
|
title: '父级id', |
|
|
|
visible:false |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'level', |
|
|
|
title: '层级', |
|
|
|
visible:false, |
|
|
|
{ title: '父级id',field: 'parentId',visible:false }, |
|
|
|
{title: '层级',field: 'level', visible:false, |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.selectDictLabel(levelDatas, value); |
|
|
|
} |
|
|
@ -561,10 +503,16 @@ |
|
|
|
title: '损耗率', |
|
|
|
formatter: function (value,row,index){ |
|
|
|
if (value == null || value == ''){ |
|
|
|
return "/"; |
|
|
|
return "0%"; |
|
|
|
} |
|
|
|
const regex = /(\d+(?:\.\d+)?)%/g; // 创建正则表达式,g标志表示全局匹配 |
|
|
|
const match = value.match(regex); // 使用match方法查找所有匹配 |
|
|
|
if (match) { |
|
|
|
return value; |
|
|
|
}else{ |
|
|
|
return value + "%"; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'processMethod', |
|
|
@ -714,9 +662,18 @@ |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'lossRate', |
|
|
|
title: '损耗率(%)', |
|
|
|
formatter:function (value,row,index){ |
|
|
|
return value + '%'; |
|
|
|
title: '损耗率', |
|
|
|
formatter: function (value,row,index){ |
|
|
|
if (value == null || value == ''){ |
|
|
|
return "0%"; |
|
|
|
} |
|
|
|
const regex = /(\d+(?:\.\d+)?)%/g; // 创建正则表达式,g标志表示全局匹配 |
|
|
|
const match = value.match(regex); // 使用match方法查找所有匹配 |
|
|
|
if (match) { |
|
|
|
return value; |
|
|
|
}else{ |
|
|
|
return value + "%"; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|