Browse Source
品质管理 制程检验 修改制程检验实体类,int类型字段改为Integer,新增审批相关字段; 修改制程检验导出、保存、详情controller方法,新增审批相关controller方法; 修改查询列表、新增、根据制程检验单号查找制程检验service方法,新增审批相关service方法; 修改制程检验mapper,新增审批相关字段; 修改制程检验物料mapper,新增物料型号字段,修改根据制程检验单号查找制程检验物料方法; 修改制程检验工序mapper和不合格分类mapper,修改根据多单号查找工序列表/不合格分类方法,传参由map改为对象; 新增制程检验vo类; 新增品质经理审批制程检验页面;dev
15 changed files with 1032 additions and 142 deletions
@ -0,0 +1,35 @@ |
|||||
|
package com.ruoyi.quality.domain.VO; |
||||
|
|
||||
|
import com.ruoyi.quality.domain.QualityManufacturingCheckout; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
@Data |
||||
|
public class QualityManufacturingCheckoutVO extends QualityManufacturingCheckout { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
/** 申请人姓名 */ |
||||
|
private String applyUserName; |
||||
|
/** 任务ID */ |
||||
|
private String taskId; |
||||
|
/** 任务名称 */ |
||||
|
private String taskName; |
||||
|
|
||||
|
/** 当前任务状态 */ |
||||
|
private String taskStatus; |
||||
|
/** 办理时间 */ |
||||
|
private Date doneTime; |
||||
|
/** 创建人 */ |
||||
|
private String createUserName; |
||||
|
/** 流程实例状态 1 激活 2 挂起 */ |
||||
|
private String suspendState; |
||||
|
/** 待办用户id */ |
||||
|
private String todoUserId; |
||||
|
/** 流程实例类型名称 */ |
||||
|
private String instanceTypeName; |
||||
|
|
||||
|
/** |
||||
|
* 关键词 |
||||
|
*/ |
||||
|
private String keyword; |
||||
|
} |
@ -0,0 +1,409 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
||||
|
<head> |
||||
|
<th:block th:include="include :: header('品质管理制程检验审批')" /> |
||||
|
<th:block th:include="include:: select2-css" /> |
||||
|
<th:block th:include="include :: datetimepicker-css" /> |
||||
|
</head> |
||||
|
<style> |
||||
|
.fixed-table-container { |
||||
|
border: 0px solid #ddd; |
||||
|
min-height: 140px; |
||||
|
} |
||||
|
.table-striped-two{ |
||||
|
overflow: hidden; |
||||
|
scroll: auto; |
||||
|
} |
||||
|
.bordered-container { |
||||
|
/* 自动高度,根据内容自动调整 */ |
||||
|
min-height: 0; /* 确保高度能收缩至内容高度 */ |
||||
|
/* 自动宽度,对于块级元素已经是默认行为,但如果你想强调这一点或针对特定情况,可以显式声明 */ |
||||
|
width: auto; |
||||
|
height: auto; |
||||
|
border: 1px dashed blue; /* 灰色边框,可根据需要调整颜色 */ |
||||
|
/* 以下可选,根据需要添加,用于控制内外边距和布局 */ |
||||
|
padding: 1rem; |
||||
|
box-sizing: border-box; /* 包含边框和内边距在宽度计算中 */ |
||||
|
margin-bottom: 20px; |
||||
|
} |
||||
|
</style> |
||||
|
<body class="white-bg"> |
||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
||||
|
<form class="form-horizontal m" id="form-manufacturingCheckout-pzjl" th:object="${formData}"> |
||||
|
<input name="manufacturingCheckoutId" th:field="*{manufacturingCheckoutId}" 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"> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-4 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-4 control-label">申请时间:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<div class="input-group date"> |
||||
|
<input name="applyTime" th:value="${#dates.format(formData.applyTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" disabled> |
||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<input type="hidden" name="p_COM_comment" /> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-4 control-label">生产单号:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input class="form-control" id="makeNo" name="makeNo" th:field="*{makeNo}" disabled> |
||||
|
<!-- 这里动态生成生产单号选项 --> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-4 control-label">检验时间:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<div class="input-group date"> |
||||
|
<input name="checkoutTime" th:value="${#dates.format(formData.checkoutTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" disabled> |
||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-4 control-label is-required" for="pzjlVerifyApproved">审批意见:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<select name="p_B_pzjlVerifyApproved" id="pzjlVerifyApproved" 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-4 control-label">批注:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<textarea name="comment" class="form-control"></textarea> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
|
||||
|
<div class="container"> |
||||
|
<div class="row"> |
||||
|
<div class="col-sm-12 select-table table-striped"> |
||||
|
<table id="bootstrap-table"></table> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="container mt-5" style="margin-top: 10px;"> |
||||
|
<div id="contentArea" class="mt-3"> |
||||
|
<!-- 初始内容可以在这里,例如一个列表项和一个表单 --> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<th:block th:include="include :: footer" /> |
||||
|
<th:block th:include="include:: select2-js" /> |
||||
|
<th:block th:include="include :: datetimepicker-js" /> |
||||
|
<script th:src="@{/js/activiti.js}"></script> |
||||
|
<script th:inline="javascript"> |
||||
|
|
||||
|
var qualityManufacturingCheckout = [[${formData}]]; |
||||
|
var makeNo = [[${formData.makeNo}]]; |
||||
|
var prefix = ctx + "quality/manufacturingCheckout"; |
||||
|
var processMethodDatas = [[${@dict.getType('processMethod')}]]; |
||||
|
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; |
||||
|
var processBadClassificationDatas = [[${@dict.getType('process_bad_classification')}]]; |
||||
|
var processBadGradeDatas = [[${@dict.getType('process_bad_grade')}]]; |
||||
|
var checkoutMaterial = qualityManufacturingCheckout.checkoutMaterial; |
||||
|
var processList = checkoutMaterial.materialProcessList; |
||||
|
$("#form-manufacturingCheckout-pzjl").validate({focusCleanup: true }); |
||||
|
var curIndex = 0; |
||||
|
//物料信息展示列表 |
||||
|
$(function() { |
||||
|
$('#makeNo').val(makeNo); |
||||
|
var options = { |
||||
|
url: ctx + "quality/manufacturingCheckout/getMaterialListByCode", |
||||
|
showSearch: false, |
||||
|
showRefresh: false, |
||||
|
showToggle: false, |
||||
|
showColumns: false, |
||||
|
height: 40, |
||||
|
pagination: false, // 设置不分页 |
||||
|
queryParams: queryParams, |
||||
|
modalName: "选择物料", |
||||
|
columns: [ |
||||
|
{ |
||||
|
title: '料号', |
||||
|
field: 'materialNo', |
||||
|
align: 'center', |
||||
|
}, |
||||
|
{ |
||||
|
title: '图片', |
||||
|
align: 'center', |
||||
|
field: 'materialPhotourl', |
||||
|
}, |
||||
|
{ |
||||
|
title: '物料名称', |
||||
|
align: 'center', |
||||
|
field: 'materialName', |
||||
|
}, |
||||
|
{ |
||||
|
title: '物料类型', |
||||
|
align: 'center', |
||||
|
field: 'materialType', |
||||
|
}, |
||||
|
{ |
||||
|
title: '物料型号', |
||||
|
align: 'center', |
||||
|
field: 'materialModel', |
||||
|
formatter: function(value, row, index) { |
||||
|
return $.table.selectCategoryLabel(materialTypeDatas, value); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
title: '描述', |
||||
|
align: 'center', |
||||
|
field: 'materialDescribe', |
||||
|
}, |
||||
|
{ |
||||
|
title: '品牌', |
||||
|
align: 'center', |
||||
|
field: 'materialBrand', |
||||
|
}, |
||||
|
{ |
||||
|
title: '单位', |
||||
|
align: 'center', |
||||
|
field: 'materialUnit', |
||||
|
}, |
||||
|
{ |
||||
|
title: '加工方式', |
||||
|
align: 'center', |
||||
|
field: 'materialProcessMethod', |
||||
|
formatter: function(value, row, index) { |
||||
|
return $.table.selectDictLabel(processMethodDatas, value); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
title: '订单数', |
||||
|
align: 'center', |
||||
|
field: 'makeTotal', |
||||
|
}, |
||||
|
{ |
||||
|
title: '已检验数', |
||||
|
align: 'center', |
||||
|
field: 'checkedNum', |
||||
|
}, |
||||
|
{ |
||||
|
title: '本次检验数', |
||||
|
align: 'center', |
||||
|
field: 'currentCheckoutNum', |
||||
|
}, |
||||
|
{ |
||||
|
title: '工序合格数', |
||||
|
align: 'center', |
||||
|
field: 'processQualifiedNum', |
||||
|
}, |
||||
|
{ |
||||
|
title: '工序不合格数', |
||||
|
align: 'center', |
||||
|
field: 'processUnqualifiedNum', |
||||
|
}, |
||||
|
] |
||||
|
}; |
||||
|
$.table.init(options); |
||||
|
|
||||
|
processList.forEach(function (process){ |
||||
|
insertCheckProcess(process); |
||||
|
}) |
||||
|
}) |
||||
|
|
||||
|
//新增制程工序模块 |
||||
|
function insertCheckProcess(process) { |
||||
|
curIndex ++; |
||||
|
var uniqueId = "unique_" + curIndex; |
||||
|
|
||||
|
var newItem = |
||||
|
'<div class="container bordered-container" id="div_'+ uniqueId +'">' + |
||||
|
"<div class='col-sm-12 my-3'>" + |
||||
|
`<h5>制程工序${curIndex}</h5>` + |
||||
|
"<div class='col-sm-12 select-table table-striped'>" + |
||||
|
'<table class="table-container checkoutMaterial-edit-table" id="bootstrap-manufacturingProcess-table-'+uniqueId+'"></table>' + |
||||
|
"</div>" + |
||||
|
"</div>" + |
||||
|
"<div class='col-sm-12 move-right'>" + |
||||
|
"<h3>合格数</h3>\n" + |
||||
|
" <div class='row'>" + |
||||
|
" <div class='form-group col-sm-6'>" + |
||||
|
" <label class='col-sm-4 control-label is-required'>ok允收数:</label>" + |
||||
|
" <div class='col-sm-8'>" + |
||||
|
` <input readonly id='okAcceptedNum' name='okAcceptedNum' oninput='okAcceptedHandler()' class='form-control' type='number' value='${process.okAcceptedNum}' required>` + |
||||
|
" </div>" + |
||||
|
" </div>" + |
||||
|
" <div class='form-group col-sm-6'>" + |
||||
|
" <label class='col-sm-4 control-label'>ok报告图片:</label>" + |
||||
|
" <div class='col-sm-8'>" + |
||||
|
" <input readonly name='okReportUrl' class='form-control' type='text'>" + |
||||
|
" </div>" + |
||||
|
" </div>" + |
||||
|
" </div>" + |
||||
|
" <div class='row'>" + |
||||
|
" <div class='form-group col-sm-6'>" + |
||||
|
" <label class='col-sm-4 control-label is-required'>特采/让步数:</label>" + |
||||
|
" <div class='col-sm-8'>" + |
||||
|
` <input readonly id='specialConcessionsNum' name='specialConcessionsNum' oninput='okAcceptedHandler()' class='form-control' type='number' value='${process.specialConcessionsNum}' required>` + |
||||
|
" </div>" + |
||||
|
" </div>" + |
||||
|
" <div class='form-group col-sm-6'>" + |
||||
|
" <label class='col-sm-4 control-label'>特采报告图片:</label>" + |
||||
|
" <div class='col-sm-8'>" + |
||||
|
" <input readonly name='specialReportUrl' class='form-control' type='text'>" + |
||||
|
" </div>\n" + |
||||
|
" </div>\n" + |
||||
|
" </div>"+ |
||||
|
"</form>"+ |
||||
|
"</div>" + |
||||
|
"<div class='col-sm-12 my-3'>" + |
||||
|
"<h5>不合格数</h5>" + |
||||
|
'<div class="col-sm-12 select-table table-striped-two" id="unqualified_'+uniqueId+'">' + |
||||
|
'<table class="table-container checkoutMaterial-edit-table" id="bootstrap-unqualifiedClass-table-' + uniqueId + '"></table>' + |
||||
|
"</div>" + |
||||
|
"</div>" + |
||||
|
"</div>"; |
||||
|
$("#contentArea").append(newItem); |
||||
|
var bootstarpId = "bootstrap-manufacturingProcess-table-" + uniqueId; |
||||
|
var processList = []; |
||||
|
processList.push(process); |
||||
|
console.log(processList); |
||||
|
var unQualifiedList = process.unqualifiedClassList; |
||||
|
var options1 = { |
||||
|
id:bootstarpId, |
||||
|
showSearch: false, |
||||
|
showRefresh: false, |
||||
|
showToggle: false, |
||||
|
showColumns: false, |
||||
|
pagination: false, // 设置不分页 |
||||
|
modalName: "制程工序", |
||||
|
data: processList, |
||||
|
height:30, |
||||
|
columns: [ |
||||
|
{ |
||||
|
title: '制程工序编号', |
||||
|
field: 'manufacturingProcessCode', |
||||
|
align: 'center', |
||||
|
}, |
||||
|
{ |
||||
|
title: '制程工序名称', |
||||
|
align: 'center', |
||||
|
field: 'manufacturingProcessName', |
||||
|
}, |
||||
|
{ |
||||
|
title: '设备名称', |
||||
|
align: 'center', |
||||
|
field: 'deviceName', |
||||
|
}, |
||||
|
{ |
||||
|
title: '设备型号', |
||||
|
align: 'center', |
||||
|
field: 'deviceModelCode', |
||||
|
}, |
||||
|
{ |
||||
|
title: '工序顺序', |
||||
|
align: 'center', |
||||
|
field: 'processSequence', |
||||
|
}, |
||||
|
{ |
||||
|
title: '车间名称', |
||||
|
align: 'center', |
||||
|
field: 'workshopName', |
||||
|
}, |
||||
|
{ |
||||
|
title: '零件名称', |
||||
|
align: 'center', |
||||
|
field: 'modName', |
||||
|
}, |
||||
|
{ |
||||
|
title: '工序检验项目', |
||||
|
align: 'center', |
||||
|
field: 'processInspectionItem', |
||||
|
}, |
||||
|
], |
||||
|
}; |
||||
|
$.table.init(options1); |
||||
|
//初始化不合格分类表格 |
||||
|
var unqualifiedTableId = 'bootstrap-unqualifiedClass-table-' + uniqueId; |
||||
|
var options2 = { |
||||
|
id:'bootstrap-unqualifiedClass-table-' + uniqueId, |
||||
|
showSearch: false, |
||||
|
showRefresh: false, |
||||
|
showToggle: false, |
||||
|
showColumns: false, |
||||
|
height: 40, |
||||
|
data: unQualifiedList, |
||||
|
pagination: false, // 设置不分页 |
||||
|
modalName: "添加不合格分类", |
||||
|
columns: [ |
||||
|
{ |
||||
|
title: '不合格分类Id', |
||||
|
field: 'unqualifiedClassId', |
||||
|
visible: false, |
||||
|
}, |
||||
|
{ |
||||
|
title: '不良分类', |
||||
|
align: 'center', |
||||
|
field: 'processBadClassification', |
||||
|
formatter: function(value, row, index) { |
||||
|
return $.table.selectDictLabel(processBadClassificationDatas, value); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
title: '不良等级', |
||||
|
align: 'center', |
||||
|
field: 'processBadGrade', |
||||
|
formatter: function(value, row, index) { |
||||
|
return $.table.selectDictLabel(processBadGradeDatas, value); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
title: '不良数量', |
||||
|
align: 'center', |
||||
|
field: 'processBadNum', |
||||
|
}, |
||||
|
{ |
||||
|
title: '报告', |
||||
|
align: 'center', |
||||
|
field: 'processBadPhotourl', |
||||
|
}, |
||||
|
] |
||||
|
}; |
||||
|
$.table.init(options2); |
||||
|
$(".fixed-table-container","#unqualified_" + uniqueId).css("min-height","200px"); |
||||
|
}; |
||||
|
|
||||
|
function queryParams(params) { |
||||
|
var curParams = { |
||||
|
// 传递参数查询参数 |
||||
|
manufacturingCheckoutCode: qualityManufacturingCheckout.manufacturingCheckoutCode |
||||
|
}; |
||||
|
return curParams; |
||||
|
} |
||||
|
|
||||
|
$("input[name='checkoutTime']").datetimepicker({ |
||||
|
format: "yyyy-mm-dd", |
||||
|
minView: "month", |
||||
|
autoclose: true |
||||
|
}); |
||||
|
|
||||
|
function submitHandler() { |
||||
|
if ($.validate.form()) { |
||||
|
|
||||
|
if ($('textarea[name="comment"]').val()) { |
||||
|
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val()); |
||||
|
} |
||||
|
var taskId = [[${taskId}]]; |
||||
|
$.operate.save(prefix + "/complete/" + taskId, $('#form-manufacturingCheckout-pzjl').serialize()); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
Loading…
Reference in new issue