Browse Source

[fix]

基础资料 请购单
修改请购单列表页面,去除申请人显示效果,设置列居中显示;
修改请购经理、主管、副总经理、总经理审批页面字段显示;
修改请购单service分角色设置节点变量方法;
修改请购单列表查询mapper方法,截取日期判断;
新增研发总监审批页面;
dev
王晓迪 4 months ago
parent
commit
a2e5152961
  1. 107
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseRequisitioningOrderServiceImpl.java
  2. 2
      ruoyi-admin/src/main/resources/mapper/system/BaseRequisitioningOrderMapper.xml
  3. 26
      ruoyi-admin/src/main/resources/templates/system/requisitioning/requisitioning.html
  4. 2
      ruoyi-admin/src/main/resources/templates/system/requisitioning/taskFzjlVerify.html
  5. 2
      ruoyi-admin/src/main/resources/templates/system/requisitioning/taskQgjlVerify.html
  6. 2
      ruoyi-admin/src/main/resources/templates/system/requisitioning/taskQgzgVerify.html
  7. 199
      ruoyi-admin/src/main/resources/templates/system/requisitioning/taskYfzjVerify.html
  8. 2
      ruoyi-admin/src/main/resources/templates/system/requisitioning/taskZozjVerify.html

107
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseRequisitioningOrderServiceImpl.java

@ -507,60 +507,83 @@ public class BaseRequisitioningOrderServiceImpl implements IBaseRequisitioningOr
} }
private void buildAuthority(SysUser user, Map<String, Object> variables) { private void buildAuthority(SysUser user, Map<String, Object> variables) {
// System.out.println("请购单启动流程");
// System.out.println("user = " + user + ", variables = " + variables);
//查询当前请购人的角色 //查询当前请购人的角色
Set<String> roleKeys = roleService.selectRoleKeys(user.getUserId()); Set<String> roleKeys = roleService.selectRoleKeys(user.getUserId());
variables.put("authority",1); variables.put("authority",1);
variables.put("zgExist",false);
variables.put("jlExist",true);
variables.put("yfzjExist",false);
variables.put("fzjlExist",false);
//判断请购人的角色,进入相应的逻辑,设置节点审批人变量 //判断请购人的角色,进入相应的逻辑,设置节点审批人变量
if(roleKeys.contains("ywyRole") || roleKeys.contains("ywjlRole") || roleKeys.contains("ywzgRole")) { if(roleKeys.contains("ywyRole")){
// 业务经理 // 业务员/业务助理--->业务部经理
variables.put("qgjlRole","ywjlRole"); variables.put("qgjlRole","ywjlRole");
// 业务主管 }else if(roleKeys.contains("jggcsRole")){
variables.put("qgzgRole","ywzgRole"); //结构工程师--->工程经理--->研发总监
}
else if(roleKeys.contains("cgyRole") || roleKeys.contains("cgjlRole") || roleKeys.contains("cgzgRole")){
// 采购经理
variables.put("qgjlRole","cgjlRole");
// 采购主管
variables.put("qgzgRole","cgzgRole");
}
else if (roleKeys.contains("gcwyRole") || roleKeys.contains("gcjlRole") || roleKeys.contains("gczgRole")){
// 工程经理
variables.put("qgjlRole","gcjlRole"); variables.put("qgjlRole","gcjlRole");
// 工程主管 variables.put("yfzjExist",true);
variables.put("qgzgRole","gczgRole"); }else if(roleKeys.contains("dqgcsRole")){
} //电气工程师--->电气主管--->研发总监
else if (roleKeys.contains("scyRole") || roleKeys.contains("scjlRole") || roleKeys.contains("sczgRole")){ variables.put("qgzgRole","dqzgRole");
// 生产经理 variables.put("jlExist",false);
variables.put("yfzjExist",true);
}else if(roleKeys.contains("rjgcsRole")||roleKeys.contains("csgcsRole")||roleKeys.contains("gcwyRole")
||roleKeys.contains("dqzgRole")||roleKeys.contains("gcjlRole")){
//软件工程师/测试工程师/工程文员--->研发总监
//电气主管 ---> 研发总监
//工程经理 ---> 研发总监
variables.put("jlExist",false);
variables.put("yfzjExist",true);
} else if(roleKeys.contains("cgyRole")||roleKeys.contains("ckzgRole")
||roleKeys.contains("hrjlRole")||roleKeys.contains("scjlRole")){
// 采购员--->副总经理
// 仓库主管 ---> 副总经理
// 人事经理 ---> 副总经理
// 生产经理 ---> 副总经理
variables.put("jlExist",false);
variables.put("fzjlExist",true);
}else if (roleKeys.contains("scyRole")){
// 生产员--->生产经理--->副总经理
variables.put("qgjlRole","scjlRole"); variables.put("qgjlRole","scjlRole");
// 生产主管 variables.put("fzjlExist",true);
variables.put("qgzgRole","sczgRole"); }else if(roleKeys.contains("pzwyRole")||roleKeys.contains("iqczyRole")||roleKeys.contains("ipqczyRole")||roleKeys.contains("fqczyRole")){
} // IQC/IPQC/FQC/品质文员--->品质经理
else if (roleKeys.contains("shgcsRole") || roleKeys.contains("shjlRole") || roleKeys.contains("shzgRole")){ variables.put("qgjlRole","pzjlRole");
// 售后经理 }else if (roleKeys.contains("shgcsRole")){
// 售后工程师--->售后主管--->售后经理
variables.put("qgjlRole","shjlRole"); variables.put("qgjlRole","shjlRole");
// 售后主管
variables.put("qgzgRole","shzgRole"); variables.put("qgzgRole","shzgRole");
variables.put("zgExist",true);
}else if (roleKeys.contains("shzgRole")){
// 售后主管--->售后经理
variables.put("qgjlRole","shjlRole");
} else if(roleKeys.contains("cgyyRole")){
// 仓库文员--->仓库主管--->副总经理
variables.put("qgzgRole","ckzgRole");
variables.put("zgExist",true);
variables.put("fzjlExist",true);
variables.put("jlExist",false);
}else if(roleKeys.contains("hrzyRole")){
// 人事助理/专员--->人事经理--->副总经理
variables.put("fzjlExist",true);
variables.put("qgjlRole","hrjlRole");
}else if (roleKeys.contains("cwzyRole")){
// 会计--->财务主管
variables.put("qgzgRole","cwzgRole");
variables.put("zgExist",true);
variables.put("jlExist",false);
} }
else if(roleKeys.contains("cgyyRole") || roleKeys.contains("cgzgRole")){ if(roleKeys.contains("admin")||roleKeys.contains("ywjlRole")||roleKeys.contains("yfzjRole")
// 仓管员、仓管主管 ||roleKeys.contains("fzjlRole")||roleKeys.contains("pzjlRole")
variables.put("qgjlRole","cgzgRole"); ||roleKeys.contains("shjlRole") ||roleKeys.contains("cwzgRole")
||roleKeys.contains("zozjRole")){
variables.put("qgzgRole","cgzgRole"); // 角色包含业务经理、研发总监、副总经理、品质经理、售后经理、财务主管、总经总助、admin
}
else if (roleKeys.contains("cwRole") || roleKeys.contains("cwjlRole")){
variables.put("qgjlRole","cwjlRole");
// 财务
}
else{
variables.put("authority",2); variables.put("authority",2);
} }
if(roleKeys.contains("zjlRole")){
if(roleKeys.contains("admin") ){ //总经理直接通过
// 角色包含业务经理、采购经理、工程经理、生产经理 variables.put("authority",3);
variables.put("authority",2);
} }
} }

2
ruoyi-admin/src/main/resources/mapper/system/BaseRequisitioningOrderMapper.xml

@ -69,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="applyTime != null "> and r.apply_time = #{applyTime}</if> <if test="applyTime != null "> and r.apply_time = #{applyTime}</if>
<if test="createBy != null and createBy != ''"> and r.create_by = #{createBy}</if> <if test="createBy != null and createBy != ''"> and r.create_by = #{createBy}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> <if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
and r.create_time between #{params.beginCreateTime} and #{params.endCreateTime} and Date(r.create_time) between #{params.beginCreateTime} and #{params.endCreateTime}
</if> </if>
<if test="materialCode != null and materialCode != ''"> <if test="materialCode != null and materialCode != ''">
and requisitioning_code in ( select requisitioning_code from base_requisitioning_order_child where material_code like concat('%', #{materialCode}, '%')) and requisitioning_code in ( select requisitioning_code from base_requisitioning_order_child where material_code like concat('%', #{materialCode}, '%'))

26
ruoyi-admin/src/main/resources/templates/system/requisitioning/requisitioning.html

@ -133,16 +133,14 @@
{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}, {title: '申请人ID',field: 'applyUser', visible: false},
{title: '请购单编号',field: 'requisitioningCode',}, {title: '请购单编号',field: 'requisitioningCode',align: 'center'},
{title: '关联单号',field: 'correlationCode',}, {title: '关联单号',field: 'correlationCode',align: 'center'},
{ {
field: 'applyUserName', field: 'applyUserName',
title: '<span style="color: red;">申请人</span>', title: '申请人',
formatter: function(value, row, index) { align: 'center',
return '<span style="color: red;">' + (value ? value : "-") + '</span>';
}
}, },
{title: '请购部门',field: 'deptName',}, {title: '请购部门',field: 'deptName',align: 'center',},
{title: '当前任务ID',field: 'taskId',visible: false}, {title: '当前任务ID',field: 'taskId',visible: false},
{ title: '待办用户ID',field: 'todoUserId', visible: false}, { title: '待办用户ID',field: 'todoUserId', visible: false},
{ title: '当前任务名称',field: 'taskName', visible: false}, { title: '当前任务名称',field: 'taskName', visible: false},
@ -158,10 +156,10 @@
return '<span class="badge badge-primary">' + value + '</span>'; return '<span class="badge badge-primary">' + value + '</span>';
} }
}, },
{title: '物料合计',field: 'materialAmount',}, {title: '物料合计',field: 'materialAmount',align: 'center',},
{title: '数量总计',field: 'materialSum',}, {title: '数量总计',field: 'materialSum',align: 'center',},
// {title: '预估单价合计(RMB)',field: 'noRmbSum',}, // {title: '预估单价合计(RMB)',field: 'noRmbSum',},
{title: '预估单价合计(RMB)',field: 'estimatePrice', {title: '预估单价合计(RMB)',field: 'estimatePrice',align: 'center',
footerFormatter: function (value) { footerFormatter: function (value) {
var sum = 0; var sum = 0;
for (var i in value) { for (var i in value) {
@ -170,7 +168,7 @@
return "总预估单价: " + sum.toFixed(2); return "总预估单价: " + sum.toFixed(2);
} }
}, },
{title: '预估总价合计(RMB)',field: 'rmbSum', {title: '预估总价合计(RMB)',field: 'rmbSum',align: 'center',
footerFormatter: function (value) { footerFormatter: function (value) {
var sum = 0; var sum = 0;
for (var i in value) { for (var i in value) {
@ -179,19 +177,19 @@
return "总预估总价: " + sum.toFixed(2); return "总预估总价: " + sum.toFixed(2);
} }
}, },
{field: 'applyTime',title: '申请时间'}, {field: 'applyTime',title: '申请时间',align: 'center',},
{title: '审核状态',field: 'auditStatus',visible: false, {title: '审核状态',field: 'auditStatus',visible: false,
formatter: function(value, row, index) { formatter: function(value, row, index) {
return $.table.selectDictLabel(auditStatusDatas, value); return $.table.selectDictLabel(auditStatusDatas, value);
} }
}, },
{title: '请购状态',field: 'requisitioningStatus', {title: '请购状态',field: 'requisitioningStatus',align: 'center',
formatter: function(value, row, index) { formatter: function(value, row, index) {
return $.table.selectDictLabel(requisitioningStatusDatas, value); return $.table.selectDictLabel(requisitioningStatusDatas, value);
} }
}, },
{title: '请购人',field: 'createBy',visible: false}, {title: '请购人',field: 'createBy',visible: false},
{title: '备注',field: 'remark',}, {title: '备注',field: 'remark',align: 'center',},
{title: '操作',align: 'center', {title: '操作',align: 'center',
formatter: function (value, row, index) { formatter: function (value, row, index) {
var actions = []; var actions = [];

2
ruoyi-admin/src/main/resources/templates/system/requisitioning/taskFzjlVerify.html

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head> <head>
<th:block th:include="include :: header('副总经理审核')" /> <th:block th:include="include :: header('副总经理审核请购单')" />
<th:block th:include="include :: datetimepicker-css" /> <th:block th:include="include :: datetimepicker-css" />
</head> </head>
<body class="white-bg"> <body class="white-bg">

2
ruoyi-admin/src/main/resources/templates/system/requisitioning/taskQgjlVerify.html

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head> <head>
<th:block th:include="include :: header('请购人上级经理审核出差单')" /> <th:block th:include="include :: header('部门经理审核请购单')" />
<th:block th:include="include :: datetimepicker-css" /> <th:block th:include="include :: datetimepicker-css" />
</head> </head>
<body class="white-bg"> <body class="white-bg">

2
ruoyi-admin/src/main/resources/templates/system/requisitioning/taskQgzgVerify.html

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head> <head>
<th:block th:include="include :: header('请购人上级部门经理审核')" /> <th:block th:include="include :: header('部门主管审核请购单')" />
<th:block th:include="include :: datetimepicker-css" /> <th:block th:include="include :: datetimepicker-css" />
</head> </head>
<body class="white-bg"> <body class="white-bg">

199
ruoyi-admin/src/main/resources/templates/system/requisitioning/taskYfzjVerify.html

@ -0,0 +1,199 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('研发总监审核请购单')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-requisitioning-yfzj-audit" th:object="${formData}">
<input name="requisitioningId" th:field="*{requisitioningId}" type="hidden">
<input name="taskId" th:field="*{taskId}" type="hidden">
<input name="taskName" th:field="*{taskName}" type="hidden">
<input name="instanceId" th:field="*{instanceId}" type="hidden">
<input name="instanceType" th:field="*{instanceType}" type="hidden">
<input type="hidden" name="p_COM_comment" />
<!--驳回调整允许更新内容-->
<div class="form-group">
<label class="col-sm-3 control-label">申请人:</label>
<div class="col-sm-8">
<input name="applyUserName" th:field="*{applyUserName}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">申请时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input name="applyTime" th:value="${#dates.format(formData.applyTime, 'yyyy-MM-dd HH:mm')}" class="form-control" type="text" disabled>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">标题:</label>
<div class="col-sm-8">
<input name="title" th:field="*{applyTitle}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">请购单号:</label>
<div class="col-sm-8">
<input name="requisitioningCode" th:field="*{requisitioningCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">部门:</label>
<div class="col-sm-8">
<input name="deptName" th:field="*{deptName}" class="form-control" disabled></input>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">岗位:</label>
<div class="col-sm-8">
<input name="postName" th:field="*{postName}" class="form-control" disabled></input>
</div>
</div>
<!-- <div class="form-group">-->
<!-- <label class="col-sm-3 control-label">姓名:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <select name="userName" th:field="*{userName}" class="form-control" disabled></select>-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group">
<label class="col-sm-3 control-label">关联单号:</label>
<div class="col-sm-8">
<input name="correlationCode" th:field="*{correlationCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="yfzjVerifyApproved"><span style="color: red; ">*</span>审批意见:</label>
<div class="col-sm-8">
<select name="p_B_yfzjVerifyApproved" id="yfzjVerifyApproved" class="form-control m-b" required>
<option value=""></option>
<option value="true">同意</option>
<option value="false">拒绝</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">批注:</label>
<div class="col-sm-8">
<textarea name="comment" class="form-control"></textarea>
</div>
</div>
</form>
<div class="container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span>请购物料信息</span>
</div>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-requisitionChild"></table>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:src="@{/js/activiti.js}"></script>
<script th:inline="javascript">
var prefix = ctx + "system/requisitioning";
var taskId = [[${taskId}]];
var requisitioningCode = [[${formData.requisitioningCode}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var warehouseDeptDatas = [[${@dict.getType('warehouseDept')}]];
$("#form-requisitioning-yfzj-audit").validate({focusCleanup: true});
$(function() {
var options = {
id:'bootstrap-sub-table-requisitionChild',
url: ctx + "system/requisitioningChild/list",
pagination: false,
showSearch: false,
showColumns: false,
sidePagination: "client",
queryParams: queryParams,
model: "请购物料信息",
columns: [
{title: '物料索引id',field: 'materialId',align: 'center',visible: false},
{title: '料号',field: 'materialCode',align: 'center'},
{title: '物料名称',field: 'materialName',align: 'center'},
{title: '图片',field: 'photoUrl',
formatter: function(value, row, index) {
return $.table.imageView(value);
}
},
{title: '物料类型',field: 'materialType',align: 'center',
formatter: function(value, row, index) {
return $.table.selectCategoryLabel(materialTypeDatas, value);
}
},
{ title: '描述',field: 'describe',align: 'center'},
{title: '品牌',field: 'brand',align: 'center'},
{ title: '单位',field: 'unit',align: 'center',},
{title: '加工方式',field: 'processMethod',align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
{title: '入库部门',field: 'warehouseDept',align: 'center',
formatter:function(value, row, index){
return $.table.selectDictLabel(warehouseDeptDatas, value);
}
},
{title: '物料的数量', field: 'materialNum',align: 'center',},
{title: '预估单价(RMB)',field: 'materialRmb',align: 'center',
footerFormatter: function (value) {
var sum = 0;
for (var i in value) {
sum += parseFloat(value[i].materialRmb) || 0;
}
return "总预估单价: " + sum.toFixed(2);
}
},
{title: '预估总价(RMB)',field: 'materialRmbSum',align: 'center',
footerFormatter: function (value) {
var sum = 0;
for (var i in value) {
sum += parseFloat(value[i].materialRmbSum) || 0;
}
return "总预估总价: " + sum.toFixed(2);
}
},
{title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',visible: false},
{title: '物料的不含税总价(RMB)',field: 'materialNoRmbSum',align: 'center',visible: false},
{title: '录入人',field: 'createBy',align: 'center',visible: false},
{title: '录入时间',field: 'createTime',align: 'center',visible: false },
{title: '更新人',field: 'updateBy',align: 'center',visible: false},
{title: '上次更新时间',field: 'updateTime',align: 'center',visible: false},
{title: '备注',field: 'remark',align: 'center'},
]
};
$.table.init(options);
});
function queryParams(params) {
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
requisitioningCode: requisitioningCode
};
return curParams;
}
function submitHandler() {
if ($.validate.form()) {
if ($('textarea[name="comment"]').val()) {
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
}
$.operate.save(prefix + "/complete/"+taskId, $('#form-requisitioning-yfzj-audit').serialize());
}
}
</script>
</body>
</html>

2
ruoyi-admin/src/main/resources/templates/system/requisitioning/taskZozjVerify.html

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head> <head>
<th:block th:include="include :: header('总助/总经理审核')" /> <th:block th:include="include :: header('总经理审核请购单')" />
<th:block th:include="include :: datetimepicker-css" /> <th:block th:include="include :: datetimepicker-css" />
</head> </head>
<body class="white-bg"> <body class="white-bg">

Loading…
Cancel
Save