Browse Source

[fix]工程管理

修复bom列表页面调整窗口比例大小会导致内容混乱问题;
修改bom列表页面表头的按钮,按钮采用统一样式;修改操作栏按钮样式样式统一,操作栏引用$.table.dropdownToggle方法;型号和描述字段加上tooltip方法,超过5个字符隐藏部分内容
dev
liuxiaoxu 4 weeks ago
parent
commit
9c554729e5
  1. 122
      ruoyi-admin/src/main/resources/templates/erp/bom/bom.html

122
ruoyi-admin/src/main/resources/templates/erp/bom/bom.html

@ -1,11 +1,11 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<style> <!--<style>-->
.table{ <!-- .table{-->
table-layout: fixed; <!-- table-layout: fixed;-->
word-break: break-all; <!-- word-break: break-all;-->
} <!-- }-->
</style> <!--</style>-->
<head> <head>
<th:block th:include="include :: header('bom列表')" /> <th:block th:include="include :: header('bom列表')" />
</head> </head>
@ -92,10 +92,10 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="erp:bom:add"> <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="erp:bom:add">
<i class="fa fa-plus"></i> 添加 <i class="fa fa-plus"></i> 添加
</a> </a>
<a class="btn btn-warning" onclick="exportExcel()" shiro:hasPermission="erp:bom:export"> <a class="btn btn-success" onclick="exportExcel()" shiro:hasPermission="erp:bom:export">
<i class="fa fa-download"></i> 导出 <i class="fa fa-download"></i> 导出
</a> </a>
<a class="btn btn-info" onclick="importExcel()"> <a class="btn btn-success" onclick="importExcel()">
<i class="fa fa-upload"></i> 导入 <i class="fa fa-upload"></i> 导入
</a> </a>
<a class="btn btn-success" onclick="bomEqulas()" shiro:hasPermission="erp:bom:equals"> <a class="btn btn-success" onclick="bomEqulas()" shiro:hasPermission="erp:bom:equals">
@ -140,11 +140,8 @@
sortStable: true, // 设置为 true 将获得稳定的排序 sortStable: true, // 设置为 true 将获得稳定的排序
modalName: "bom", modalName: "bom",
detailView: true, detailView: true,
width: 800,
fixedColumns: true, // 启用冻结列 fixedColumns: true, // 启用冻结列
rightFixedColumns:1,
fixedRightNumber: 1, // 冻结右列个数 fixedRightNumber: 1, // 冻结右列个数
height: $(window).height() - 100,
//指定父id列 //指定父id列
onExpandRow : function(index, row, $detail) { onExpandRow : function(index, row, $detail) {
$detail.html('<h4>一阶</h4><table class="table-container" id="one_level_table_'+row.id+'"></table>' + $detail.html('<h4>一阶</h4><table class="table-container" id="one_level_table_'+row.id+'"></table>' +
@ -160,39 +157,7 @@
checkbox: true, checkbox: true,
}, },
{ title: '主键ID',field: 'id',visible: false}, { title: '主键ID',field: 'id',visible: false},
{ title: 'bom号',field: 'bomNo', sortable: true,width: 150},
{ title: '料号',field: 'materialNo', sortable: true,},
{ title: '物料名称',field: 'materialName', sortable: true,width: 100,},
{title: '描述',field: 'describe',width:80,
},
{ title: '品牌',field: 'brand', sortable: true,width: 70,},
{title: '加工方式',field: 'processMethod',width: 120,
formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);;
}
},
{ title: '单位',field: 'unit',align: 'center',width: 50,
},
{ title: '图片',field: 'photoUrl',align: 'center',width: 50,
formatter: function(value, row, index) {return $.table.imageView(value);
}
},
{ title: '<span style="color: red;">申请人</span>',field: 'applyUserName',width: 80,
formatter: function(value, row, index) {return '<span style="color: red;">' + (value ? value : "-") + '</span>';}
},
{ title: '申请时间',field: 'applyTime',sortable: true,width: 100,},
{ title: '录入时间',field: 'createTime',sortable: true,width: 100,},
{title: '上次更新时间',field: 'updateTime',width: 120,},
{ title: '当前状态',field: 'taskName',align: 'center',width: 120,
formatter: function(value, row, index) {
if(row.auditStatus!="1"&&value != "未启动"){
return '<span class="badge badge-danger">' + value + '</span>';
}
if(value === "未启动"){
return '<span class="badge badge-primary">' + value + '</span>';
}
return '<span class="badge badge-primary">' + value + '</span>';
}
},
{ 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},
@ -211,42 +176,66 @@
return $.table.selectDictLabel(useStatusDatas, value); return $.table.selectDictLabel(useStatusDatas, value);
} }
}, },
{ title: '工程员',field: 'engineer', visible: false}, { title: 'bom号',field: 'bomNo', sortable: true,align: 'center',},
{ title: '物料类型',field: 'materialType',visible: false, { title: '料号',field: 'materialNo', sortable: true,align: 'center',},
formatter: function(value, row, index) {return $.table.selectCategoryLabel(materialTypeDatas, value);}}, { title: '物料名称',field: 'materialName', sortable: true,align: 'center',
{ title: '加工方式',field: 'processMethod',visible: false, formatter: function(value, row, index) {
formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);} return $.table.tooltip(value, 5, "open");
}
}, },
{ title: '父级id',field: 'parentId',visible:false }, {title: '描述',field: 'describe',align: 'center',
{title: '层级',field: 'level', visible:false,
formatter: function(value, row, index) { formatter: function(value, row, index) {
return $.table.selectDictLabel(levelDatas, value); return $.table.tooltip(value, 5, "open");
} }
}, },
{ {title: '型号',field: 'materialModel',align: 'center',
field: 'sortNo', },
title: '排序', { title: '品牌',field: 'brand', align: 'center',sortable: true,},
visible: false {title: '加工方式',field: 'processMethod',align: 'center',
formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);;
}
},
{ title: '单位',field: 'unit',align: 'center',
},
{ title: '图片',field: 'photoUrl',align: 'center',
formatter: function(value, row, index) {return $.table.imageView(value);
}
},
{ title: '<span style="color: red;">申请人</span>',field: 'applyUserName',align: 'center',
formatter: function(value, row, index) {return '<span style="color: red;">' + (value ? value : "-") + '</span>';}
},
{ title: '申请时间',field: 'applyTime',align: 'center',sortable: true,},
{ title: '录入时间',field: 'createTime',align: 'center',sortable: true,},
{title: '上次更新时间',field: 'updateTime',align: 'center',},
{ title: '当前状态',field: 'taskName',align: 'center',
formatter: function(value, row, index) {
if(row.auditStatus!="1"&&value != "未启动"){
return '<span class="badge badge-danger">' + value + '</span>';
}
if(value === "未启动"){
return '<span class="badge badge-primary">' + value + '</span>';
}
return '<span class="badge badge-primary">' + value + '</span>';
}
}, },
{ {
title: '操作', title: '操作',
align: 'center', align: 'center',
width: 120,
formatter: function(value, row, index) { formatter: function(value, row, index) {
var actions = []; var actions = [];
// 审核状态-审核通过 使用状态-是 未发起作废流程 // 审核状态-审核通过 使用状态-是 未发起作废流程
if(row.auditStatus=="1" && row.useStatus=="1" && !row.cancelInstanceId){ 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 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> '); actions.push('<a href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i> 编辑</a> ');
}else{ }else{
actions.push('<a class="btn btn-default btn-xs" disabled href="javascript:void(0)"><i class="fa fa-edit"></i> 编辑</a> '); actions.push('<a disabled href="javascript:void(0)"><i class="fa fa-edit"></i> 编辑</a> ');
} }
// 已作废 // 已作废
if(row.useStatus=="2" && !row.restoreInstanceId){ 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> '); actions.push('<a href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i> 恢复</a> ');
} }
// 有流程实例id // 有流程实例id
if (row.instanceId) { if (row.instanceId) {
@ -255,17 +244,18 @@
var todoUserIdList = row.todoUserId.split(","); var todoUserIdList = row.todoUserId.split(",");
if(todoUserIdList.includes(loginName)){ if(todoUserIdList.includes(loginName)){
var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批'; 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 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 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 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> '); actions.push('<a href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-eye"></i> 详情</a> ');
return actions.join(''); var actionLinks = actions.join('');
return $.table.dropdownToggle(actionLinks);
} }
}], }],
rowStyle: function (row, index) { rowStyle: function (row, index) {

Loading…
Cancel
Save