Browse Source

[fix]

按照万材要求:调整物料列表页面表头的按钮布局
物料描述字段新增超过5个汉字省略显示的样式
修改物料的操作栏按钮,引用$.table.dropdownToggle方法
dev
liuxiaoxu 1 month ago
parent
commit
76f00b7775
  1. 99
      ruoyi-admin/src/main/resources/templates/erp/material/material.html

99
ruoyi-admin/src/main/resources/templates/erp/material/material.html

@ -80,15 +80,15 @@
</div> </div>
<div class="btn-group-sm" id="toolbar" role="group"> <div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="erp:material:add"> <a class="btn btn-success btn-xs" onclick="$.operate.add()" shiro:hasPermission="erp:material:add">
<i class="fa fa-plus"></i> 添加 <i class="fa fa-plus"></i> 添加
</a> </a>
<a class="btn btn-success btn-xs" onclick="exportSelect()" shiro:hasPermission="erp:material:export">
<i class="fa fa-download"></i> 导出
</a>
<a class="btn btn-success" onclick="technologyTeam()" shiro:hasRole="zjlRole"> <a class="btn btn-success" onclick="technologyTeam()" shiro:hasRole="zjlRole">
<i class="fa fa-plus"></i> 技术团队配置 <i class="fa fa-plus"></i> 技术团队配置
</a> </a>
<a class="btn btn-warning" onclick="exportSelect()" shiro:hasPermission="erp:material:export">
<i class="fa fa-download"></i> 导出
</a>
</div> </div>
<div class="col-sm-12 select-table table-striped"> <div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table> <table id="bootstrap-table"></table>
@ -140,39 +140,6 @@
columns: [ columns: [
{checkbox: true}, {checkbox: true},
{title: '主键ID',field: 'id',visible: false}, {title: '主键ID',field: 'id',visible: false},
{title: '当前状态',field: 'taskStatus',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: '料号',field: 'materialNo',},
{title: '物料名称',field: 'materialName',},
{title: '描述',field: 'describe',},
{title: '品牌',field: 'brand',},
{title: '加工方式',field: 'processMethod',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
{title: '单位',field: 'unit',},
{title: '图片',field: 'photoUrl',
formatter: function(value, row, index) {
return $.table.imageView(value);
}
},
{title: '使用状态',field: 'useStatus',
formatter: function(value, row, index) {return $.table.selectDictLabel(useStatusDatas, value);}
},
{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: '上次更新时间',field: 'updateTime',},
{title: '当前任务名称',field: 'taskName',visible: false}, {title: '当前任务名称',field: 'taskName',visible: false},
{title: '流程实例ID',field: 'instanceId',visible: false}, {title: '流程实例ID',field: 'instanceId',visible: false},
{title: '流程提交实例ID',field: 'submitInstanceId',visible: false}, {title: '流程提交实例ID',field: 'submitInstanceId',visible: false},
@ -196,45 +163,85 @@
}, },
{title: '技术团队id',field: 'productItem',visible: false,}, {title: '技术团队id',field: 'productItem',visible: false,},
{title: '技术团队名称',field: 'itemName',visible: false}, {title: '技术团队名称',field: 'itemName',visible: false},
{title: '录入时间',field: 'createTime',sortable: true},
{title: '更新人',field: 'updateBy',visible: false}, {title: '更新人',field: 'updateBy',visible: false},
{title: '删除标志', field: 'delFlag',visible: false}, {title: '删除标志', field: 'delFlag',visible: false},
{title: '入库部门', field: 'warehouseDept',visible: false, {title: '入库部门', field: 'warehouseDept',visible: false,
formatter: function(value, row, index) {return $.table.selectDictLabel(warehouseDeptDatas, value);} formatter: function(value, row, index) {return $.table.selectDictLabel(warehouseDeptDatas, value);}
}, },
{title: '当前状态',field: 'taskStatus',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: '料号',field: 'materialNo',align: 'center'},
{title: '物料名称',field: 'materialName',align: 'center'},
{title: '描述',field: 'describe',align: 'center',
formatter: function(value, row, index) {
return $.table.tooltip(value, 10, "open");
}
},
{title: '品牌',field: 'brand',align: 'center'},
{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: '使用状态',field: 'useStatus',align: 'center',
formatter: function(value, row, index) {return $.table.selectDictLabel(useStatusDatas, 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: '操作',align: 'center', {title: '操作',align: 'center',
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="cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i> 作废</a>'); actions.push('<a href="javascript:void(0)" onclick="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> ');
} }
// 已作废 // 已作废
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) {
// 审批历史 // 审批历史
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> ');
// 有待办人展示审批按钮, // 有待办人展示审批按钮,
if (row.todoUserId) { if (row.todoUserId) {
var todoUserIdList = row.todoUserId.split(","); var todoUserIdList = row.todoUserId.split(",");
if(todoUserIdList.includes(loginName) || todoUserIdList.includes("admin")){ if(todoUserIdList.includes(loginName) || todoUserIdList.includes("admin")){
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-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);
} }
} }
], ],

Loading…
Cancel
Save