|
|
@ -72,7 +72,7 @@ |
|
|
|
</li> |
|
|
|
|
|
|
|
<!-- <li> |
|
|
|
<label>加工方式:</label> |
|
|
|
<label>半成品类型:</label> |
|
|
|
<select name="processMethod" th:with="type=${@dict.getType('processMethod')}"> |
|
|
|
<option value="">所有</option> |
|
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|
|
@ -170,225 +170,98 @@ |
|
|
|
modalName: "物料信息", |
|
|
|
fixedColumns: true, // 启用冻结列 |
|
|
|
fixedRightNumber: 1, // 冻结右列个数 |
|
|
|
columns: [{ |
|
|
|
checkbox: true |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'id', |
|
|
|
title: '主键ID', |
|
|
|
visible: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'instanceId', |
|
|
|
title: '流程实例ID', |
|
|
|
visible: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'submitInstanceId', |
|
|
|
title: '流程提交实例ID', |
|
|
|
visible: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'cancelInstanceId', |
|
|
|
title: '流程作废实例ID', |
|
|
|
visible: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'restoreInstanceId', |
|
|
|
title: '流程恢复实例ID', |
|
|
|
visible: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'instanceTypeName', |
|
|
|
title: '流程实例类型', |
|
|
|
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: '申请时间' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'taskId', |
|
|
|
title: '当前任务ID', |
|
|
|
visible: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'todoUserId', |
|
|
|
title: '待办用户ID', |
|
|
|
visible: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'taskName', |
|
|
|
title: '当前任务名称', |
|
|
|
align: 'center', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return '<span class="badge badge-primary">' + value + '</span>'; |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'auditStatus', |
|
|
|
title: '审核状态', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.selectDictLabel(auditStatusDatas, value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'useStatus', |
|
|
|
title: '使用状态', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.selectDictLabel(useStatusDatas, value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'businessMembers', |
|
|
|
title: '工程员', |
|
|
|
visible: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'createUserName', |
|
|
|
title: '工程员' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'materialNo', |
|
|
|
title: '料号' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'bomNo', |
|
|
|
title: '关联bom号' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'photoUrl', |
|
|
|
title: '图片', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.imageView(value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'materialName', |
|
|
|
title: '物料名称' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'materialType', |
|
|
|
title: '物料类型', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.selectCategoryLabel(materialTypeDatas, value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'unit', |
|
|
|
title: '单位', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.selectDictLabel(sysUnitClassDatas, value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'brand', |
|
|
|
title: '品牌' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'describe', |
|
|
|
title: '描述' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'havaProductTem', |
|
|
|
title: '是否有技术团队', |
|
|
|
formatter:function (value, row, index){ |
|
|
|
return $.table.selectDictLabel(haveProductTem,value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'productItem', |
|
|
|
title: '技术团队id' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'itemName', |
|
|
|
title: '技术团队名称', |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'supplierName', |
|
|
|
title: '供应商' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'createTime', |
|
|
|
title: '录入时间' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'updateBy', |
|
|
|
title: '更新人' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'updateTime', |
|
|
|
title: '上次更新时间' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'delFlag', |
|
|
|
title: '删除标志', |
|
|
|
visible: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'processMethod', |
|
|
|
title: '加工方式', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.selectDictLabel(processMethodDatas, value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'warehouseDept', |
|
|
|
title: '入库部门', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.selectDictLabel(warehouseDeptDatas, value); |
|
|
|
} |
|
|
|
columns: [ |
|
|
|
{checkbox: true}, |
|
|
|
{title: '主键ID',field: 'id',visible: false}, |
|
|
|
{title: '流程实例ID',field: 'instanceId',visible: false}, |
|
|
|
{title: '流程提交实例ID',field: 'submitInstanceId',visible: false}, |
|
|
|
{title: '流程作废实例ID',field: 'cancelInstanceId',visible: false}, |
|
|
|
{title: '流程恢复实例ID',field: 'restoreInstanceId',visible: false}, |
|
|
|
{title: '流程实例类型',field: 'instanceTypeName',visible: false}, |
|
|
|
{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: '操作', |
|
|
|
align: 'center', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
var actions = []; |
|
|
|
// 审核状态-审核通过 使用状态-是 未发起作废流程 |
|
|
|
if(row.auditStatus=="1" && row.useStatus=="1" && !row.cancelInstanceId){ |
|
|
|
// 作废 |
|
|
|
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i> 作废</a>'); |
|
|
|
// 编辑 |
|
|
|
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i> 编辑</a> '); |
|
|
|
} |
|
|
|
// 已作废 |
|
|
|
if(row.useStatus=="2" && !row.restoreInstanceId){ |
|
|
|
// 恢复 |
|
|
|
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i> 恢复</a> '); |
|
|
|
} |
|
|
|
// 有流程实例id |
|
|
|
if (row.instanceId) { |
|
|
|
// 有待办人展示审批按钮, |
|
|
|
if (row.todoUserId) { |
|
|
|
var todoUserIdList = row.todoUserId.split(","); |
|
|
|
if(todoUserIdList.includes(loginName)){ |
|
|
|
var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批'; |
|
|
|
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="showVerifyDialog(\'' + prefix + '\',\'' + row.taskId + '\', \'' + row.taskName+"-"+row.instanceTypeName+"申请" + '\')"><i class="fa fa-edit"></i> '+nodeName+'</a> '); |
|
|
|
{title: '申请时间',field: 'applyTime',}, |
|
|
|
{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>';} |
|
|
|
}, |
|
|
|
{title: '审核状态',field: 'auditStatus', |
|
|
|
formatter: function(value, row, index) {return $.table.selectDictLabel(auditStatusDatas, value);} |
|
|
|
}, |
|
|
|
{title: '使用状态',field: 'useStatus', |
|
|
|
formatter: function(value, row, index) {return $.table.selectDictLabel(useStatusDatas, value);} |
|
|
|
}, |
|
|
|
{title: '工程员',field: 'businessMembers',visible: false}, |
|
|
|
{title: '工程员',field: 'createUserName',visible: false}, |
|
|
|
{title: '料号',field: 'materialNo',}, |
|
|
|
{title: '关联bom号',field: 'bomNo',}, |
|
|
|
{title: '图片',field: 'photoUrl', |
|
|
|
formatter: function(value, row, index) {return $.table.imageView(value);} |
|
|
|
}, |
|
|
|
{title: '物料名称',field: 'materialName',}, |
|
|
|
{title: '物料类型',field: 'materialType', |
|
|
|
formatter: function(value, row, index) {return $.table.selectCategoryLabel(materialTypeDatas, value);} |
|
|
|
}, |
|
|
|
{title: '单位',field: 'unit', |
|
|
|
formatter: function(value, row, index) {return $.table.selectDictLabel(sysUnitClassDatas, value);} |
|
|
|
}, |
|
|
|
{title: '品牌',field: 'brand',}, |
|
|
|
{title: '描述',field: 'describe',}, |
|
|
|
{title: '是否有技术团队',field: 'havaProductTem',visible: false, |
|
|
|
formatter:function (value, row, index){return $.table.selectDictLabel(haveProductTem,value);} |
|
|
|
}, |
|
|
|
{title: '技术团队id',field: 'productItem',visible: false,}, |
|
|
|
{title: '技术团队名称',field: 'itemName',visible: false}, |
|
|
|
{title: '供应商',field: 'supplierName',}, |
|
|
|
{title: '录入时间',field: 'createTime',}, |
|
|
|
{title: '更新人',field: 'updateBy',}, |
|
|
|
{title: '上次更新时间',field: 'updateTime',}, |
|
|
|
{title: '删除标志', field: 'delFlag',visible: false}, |
|
|
|
{title: '半成品类型',field: 'processMethod', |
|
|
|
formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);} |
|
|
|
}, |
|
|
|
{title: '入库部门', field: 'warehouseDept', |
|
|
|
formatter: function(value, row, index) {return $.table.selectDictLabel(warehouseDeptDatas, value);} |
|
|
|
}, |
|
|
|
{title: '操作',align: 'center', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
var actions = []; |
|
|
|
// 审核状态-审核通过 使用状态-是 未发起作废流程 |
|
|
|
if(row.auditStatus=="1" && row.useStatus=="1" && !row.cancelInstanceId){ |
|
|
|
// 作废 |
|
|
|
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i> 作废</a>'); |
|
|
|
// 编辑 |
|
|
|
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i> 编辑</a> '); |
|
|
|
} |
|
|
|
// 已作废 |
|
|
|
if(row.useStatus=="2" && !row.restoreInstanceId){ |
|
|
|
// 恢复 |
|
|
|
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i> 恢复</a> '); |
|
|
|
} |
|
|
|
// 有流程实例id |
|
|
|
if (row.instanceId) { |
|
|
|
// 有待办人展示审批按钮, |
|
|
|
if (row.todoUserId) { |
|
|
|
var todoUserIdList = row.todoUserId.split(","); |
|
|
|
if(todoUserIdList.includes(loginName)){ |
|
|
|
var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批'; |
|
|
|
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="showVerifyDialog(\'' + prefix + '\',\'' + row.taskId + '\', \'' + row.taskName+"-"+row.instanceTypeName+"申请" + '\')"><i class="fa fa-edit"></i> '+nodeName+'</a> '); |
|
|
|
} |
|
|
|
} |
|
|
|
// 审批历史 |
|
|
|
actions.push('<a class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="showHistoryDialog(\'' + row.instanceId + '\')"><i class="fa fa-list"></i> 审批历史</a> '); |
|
|
|
// 进度查看 |
|
|
|
actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="showProcessImgDialog(\'' + row.instanceId + '\')"><i class="fa fa-image"></i> 进度查看</a> '); |
|
|
|
} |
|
|
|
// 审批历史 |
|
|
|
actions.push('<a class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="showHistoryDialog(\'' + row.instanceId + '\')"><i class="fa fa-list"></i> 审批历史</a> '); |
|
|
|
// 进度查看 |
|
|
|
actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="showProcessImgDialog(\'' + row.instanceId + '\')"><i class="fa fa-image"></i> 进度查看</a> '); |
|
|
|
// 详情 |
|
|
|
actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-eye"></i> 详情</a> '); |
|
|
|
return actions.join(''); |
|
|
|
} |
|
|
|
// 详情 |
|
|
|
actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-eye"></i> 详情</a> '); |
|
|
|
|
|
|
|
return actions.join(''); |
|
|
|
} |
|
|
|
}] |
|
|
|
] |
|
|
|
}; |
|
|
|
$.table.init(options); |
|
|
|
}); |
|
|
|