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