Browse Source

[feat]

基础资料 员工退料
修改员工退料列表页面,添加审批相关字段及按钮,添加行样式;
新增部门经理、部门主管、副总经理、研发总监审批页面;
dev
王晓迪 2 months ago
parent
commit
90a04dc02c
  1. 50
      ruoyi-admin/src/main/resources/templates/system/baseReturnOrder/baseReturnOrder.html
  2. 247
      ruoyi-admin/src/main/resources/templates/system/baseReturnOrder/taskBmjlVerify.html
  3. 247
      ruoyi-admin/src/main/resources/templates/system/baseReturnOrder/taskBmzgVerify.html
  4. 247
      ruoyi-admin/src/main/resources/templates/system/baseReturnOrder/taskFzjlVerify.html
  5. 247
      ruoyi-admin/src/main/resources/templates/system/baseReturnOrder/taskYfzjVerify.html

50
ruoyi-admin/src/main/resources/templates/system/baseReturnOrder/baseReturnOrder.html

@ -66,6 +66,7 @@
</div>
</div>
<th:block th:include="include :: footer" />
<script th:src="@{/js/activiti.js}"></script>
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:baseReturnOrder:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:baseReturnOrder:remove')}]];
@ -95,6 +96,15 @@
field: 'id',
visible: false
},
{title: '当前状态',field: 'taskStatus',
align: 'center',
formatter: function(value, row, index) {
if(value == "未启动"|| value == "审核拒绝"){
return '<span class="badge badge-danger">' + value + '</span>';
}
return '<span class="badge badge-primary">' + value + '</span>';
}
},
{
title: '退料单号',
field: 'baseReturnOrderCode',
@ -142,6 +152,7 @@
title: '审核状态',
field: 'auditStatus',
align: 'center',
visible: false,
},
{
title: '流程实例ID',
@ -158,6 +169,15 @@
field: 'submitInstanceId',
visible: false,
},
{title: '流程实例类型', field: 'instanceTypeName',visible: false,align: 'center',},
{title: '当前任务ID',field: 'taskId',visible: false,align: 'center',},
{title: '待办用户ID',field: 'todoUserId', visible: false,align: 'center',},
{title: '当前任务名称',field: 'taskName',
align: 'center',visible: false,
formatter: function(value, row, index) {
return '<span class="badge badge-primary">' + value + '</span>';
}
},
{
title: '申请人',
field: 'applyUser',
@ -183,13 +203,41 @@
align: 'center',
formatter: function(value, row, index) {
var actions = [];
// 有流程实例id
if (row.instanceId) {
// 有待办人展示审批按钮,
if (row.todoUserId) {
var todoUserIdList = row.todoUserId.split(",");
if(todoUserIdList.includes(loginName)){
var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批';
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 href="javascript:void(0)" onclick="showHistoryDialog(\'' + row.instanceId + '\')"><i class="fa fa-list"></i> 审批历史</a> ');
actions.push('<a href="javascript:void(0)" onclick="showProcessImgDialog(\'' + row.instanceId + '\')"><i class="fa fa-image"></i> 进度查看</a> ');
}
actions.push('<a href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-edit"></i>详情</a> ');
return actions.join('');
}
}]
}],
rowStyle: function (row, index) {
if (row.auditStatus=="0") {
// 如果审核状态为待审核,则设置为红色
return {css:{"color":"red"}};
}
// 否则使用默认样式
return {};
}
};
$.table.init(options);
});
</script>
</body>
</html>

247
ruoyi-admin/src/main/resources/templates/system/baseReturnOrder/taskBmjlVerify.html

@ -0,0 +1,247 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('部门经理审批员工退料')" />
<th:block th:include="include :: bootstrap-editable-css" />
<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-baseReturnOrder-bmjl" th:object="${formData}">
<input name="id" th:field="*{id}" 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-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">
<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-4 control-label">退料单号:</label>
<div class="col-sm-8">
<input id="baseReturnOrderCode" name="baseReturnOrderCode" th:field="*{baseReturnOrderCode}" 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">
<input id="pickNo" name="pickNo" th:field="*{pickNo}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label" for="bmjlVerifyApproved"><span style="color: red; ">*</span>审批意见:</label>
<div class="col-sm-8">
<select name="p_B_bmjlVerifyApproved" id="bmjlVerifyApproved" 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>
<div class="col-xs-11" style="margin-left: 100px;">
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-material-table"></table>
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: bootstrap-table-editable-js" />
<script th:src="@{/js/activiti.js}"></script>
<script th:inline="javascript">
var prefix = ctx + "system/baseReturnOrder";
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var levelDatas = [[${@dict.getType('bomLevel')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
$("#form-baseReturnOrder-bmjl").validate({
focusCleanup: true
});
$(function(){
var options = {
id: 'bootstrap-material-table',
url: ctx + "system/baseReturnOrderDetail/list",
method: 'post',
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
pagination: false, // 设置不分页
sidePagination: "client",
contentType: "application/x-www-form-urlencoded",
width: 1200,
queryParams : {
baseReturnOrderCode: $("#baseReturnOrderCode").val()
},
columns: [
{
field: 'id',
title: '主键id',
visible: false
},
{
field: 'materialNo',
title: '料号',
align: 'center',
},
{
field: 'photoUrl',
align: 'center',
title: '图片',
formatter: function(value, row, index) {
return $.table.imageView(value);
}
},
{
field: 'materialName',
align: 'center',
title: '物料名称',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'materialModel',
title: '型号',
align: 'center',
},
{
field: 'describe',
align: 'center',
title: '描述',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'brand',
align: 'center',
title: '品牌',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'unit',
align: 'center',
title: '单位',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'processMethod',
align: 'center',
title: '加工方式',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
// {
// field: 'useNum',
// align: 'center',
// title: '用量',
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value
// }
// }
// },
{
field: 'hasPickNum',
align: 'center',
title: '已领料数',
},
{
field: 'hasReturnNum',
align: 'center',
title: '已退料数',
visible: false,
formatter: function (value,row,index){
if (value == null || value == ''){
return 0;
}else{
return value
}
}
},
{
field: 'returnNum',
align: 'center',
title: '本次退料数',
},
],
};
$.table.init(options);
});
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-baseReturnOrder-bmjl').serialize());
}
}
$("input[name='applyTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

247
ruoyi-admin/src/main/resources/templates/system/baseReturnOrder/taskBmzgVerify.html

@ -0,0 +1,247 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('部门经理审批员工退料')" />
<th:block th:include="include :: bootstrap-editable-css" />
<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-baseReturnOrder-bmzg" th:object="${formData}">
<input name="id" th:field="*{id}" 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-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">
<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-4 control-label">退料单号:</label>
<div class="col-sm-8">
<input id="baseReturnOrderCode" name="baseReturnOrderCode" th:field="*{baseReturnOrderCode}" 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">
<input id="pickNo" name="pickNo" th:field="*{pickNo}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label" for="bmzgVerifyApproved"><span style="color: red; ">*</span>审批意见:</label>
<div class="col-sm-8">
<select name="p_B_bmzgVerifyApproved" id="bmzgVerifyApproved" 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>
<div class="col-xs-11" style="margin-left: 100px;">
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-material-table"></table>
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: bootstrap-table-editable-js" />
<script th:src="@{/js/activiti.js}"></script>
<script th:inline="javascript">
var prefix = ctx + "system/baseReturnOrder";
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var levelDatas = [[${@dict.getType('bomLevel')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
$("#form-baseReturnOrder-bmzg").validate({
focusCleanup: true
});
$(function(){
var options = {
id: 'bootstrap-material-table',
url: ctx + "system/baseReturnOrderDetail/list",
method: 'post',
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
pagination: false, // 设置不分页
sidePagination: "client",
contentType: "application/x-www-form-urlencoded",
width: 1200,
queryParams : {
baseReturnOrderCode: $("#baseReturnOrderCode").val()
},
columns: [
{
field: 'id',
title: '主键id',
visible: false
},
{
field: 'materialNo',
title: '料号',
align: 'center',
},
{
field: 'photoUrl',
align: 'center',
title: '图片',
formatter: function(value, row, index) {
return $.table.imageView(value);
}
},
{
field: 'materialName',
align: 'center',
title: '物料名称',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'materialModel',
title: '型号',
align: 'center',
},
{
field: 'describe',
align: 'center',
title: '描述',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'brand',
align: 'center',
title: '品牌',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'unit',
align: 'center',
title: '单位',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'processMethod',
align: 'center',
title: '加工方式',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
// {
// field: 'useNum',
// align: 'center',
// title: '用量',
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value
// }
// }
// },
{
field: 'hasPickNum',
align: 'center',
title: '已领料数',
},
{
field: 'hasReturnNum',
align: 'center',
title: '已退料数',
visible: false,
formatter: function (value,row,index){
if (value == null || value == ''){
return 0;
}else{
return value
}
}
},
{
field: 'returnNum',
align: 'center',
title: '本次退料数',
},
],
};
$.table.init(options);
});
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-baseReturnOrder-bmzg').serialize());
}
}
$("input[name='applyTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

247
ruoyi-admin/src/main/resources/templates/system/baseReturnOrder/taskFzjlVerify.html

@ -0,0 +1,247 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('部门经理审批员工退料')" />
<th:block th:include="include :: bootstrap-editable-css" />
<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-baseReturnOrder-fzjl" th:object="${formData}">
<input name="id" th:field="*{id}" 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-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">
<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-4 control-label">退料单号:</label>
<div class="col-sm-8">
<input id="baseReturnOrderCode" name="baseReturnOrderCode" th:field="*{baseReturnOrderCode}" 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">
<input id="pickNo" name="pickNo" th:field="*{pickNo}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label" for="fzjlVerifyApproved"><span style="color: red; ">*</span>审批意见:</label>
<div class="col-sm-8">
<select name="p_B_fzjlVerifyApproved" id="fzjlVerifyApproved" 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>
<div class="col-xs-11" style="margin-left: 100px;">
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-material-table"></table>
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: bootstrap-table-editable-js" />
<script th:src="@{/js/activiti.js}"></script>
<script th:inline="javascript">
var prefix = ctx + "system/baseReturnOrder";
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var levelDatas = [[${@dict.getType('bomLevel')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
$("#form-baseReturnOrder-fzjl").validate({
focusCleanup: true
});
$(function(){
var options = {
id: 'bootstrap-material-table',
url: ctx + "system/baseReturnOrderDetail/list",
method: 'post',
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
pagination: false, // 设置不分页
sidePagination: "client",
contentType: "application/x-www-form-urlencoded",
width: 1200,
queryParams : {
baseReturnOrderCode: $("#baseReturnOrderCode").val()
},
columns: [
{
field: 'id',
title: '主键id',
visible: false
},
{
field: 'materialNo',
title: '料号',
align: 'center',
},
{
field: 'photoUrl',
align: 'center',
title: '图片',
formatter: function(value, row, index) {
return $.table.imageView(value);
}
},
{
field: 'materialName',
align: 'center',
title: '物料名称',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'materialModel',
title: '型号',
align: 'center',
},
{
field: 'describe',
align: 'center',
title: '描述',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'brand',
align: 'center',
title: '品牌',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'unit',
align: 'center',
title: '单位',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'processMethod',
align: 'center',
title: '加工方式',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
// {
// field: 'useNum',
// align: 'center',
// title: '用量',
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value
// }
// }
// },
{
field: 'hasPickNum',
align: 'center',
title: '已领料数',
},
{
field: 'hasReturnNum',
align: 'center',
title: '已退料数',
visible: false,
formatter: function (value,row,index){
if (value == null || value == ''){
return 0;
}else{
return value
}
}
},
{
field: 'returnNum',
align: 'center',
title: '本次退料数',
},
],
};
$.table.init(options);
});
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-baseReturnOrder-fzjl').serialize());
}
}
$("input[name='applyTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

247
ruoyi-admin/src/main/resources/templates/system/baseReturnOrder/taskYfzjVerify.html

@ -0,0 +1,247 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('部门经理审批员工退料')" />
<th:block th:include="include :: bootstrap-editable-css" />
<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-baseReturnOrder-yfzj" th:object="${formData}">
<input name="id" th:field="*{id}" 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-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">
<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-4 control-label">退料单号:</label>
<div class="col-sm-8">
<input id="baseReturnOrderCode" name="baseReturnOrderCode" th:field="*{baseReturnOrderCode}" 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">
<input id="pickNo" name="pickNo" th:field="*{pickNo}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 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-4 control-label">批注:</label>
<div class="col-sm-8">
<textarea name="comment" class="form-control"></textarea>
</div>
</div>
<div class="col-xs-11" style="margin-left: 100px;">
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-material-table"></table>
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: bootstrap-table-editable-js" />
<script th:src="@{/js/activiti.js}"></script>
<script th:inline="javascript">
var prefix = ctx + "system/baseReturnOrder";
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var levelDatas = [[${@dict.getType('bomLevel')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
$("#form-baseReturnOrder-yfzj").validate({
focusCleanup: true
});
$(function(){
var options = {
id: 'bootstrap-material-table',
url: ctx + "system/baseReturnOrderDetail/list",
method: 'post',
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
pagination: false, // 设置不分页
sidePagination: "client",
contentType: "application/x-www-form-urlencoded",
width: 1200,
queryParams : {
baseReturnOrderCode: $("#baseReturnOrderCode").val()
},
columns: [
{
field: 'id',
title: '主键id',
visible: false
},
{
field: 'materialNo',
title: '料号',
align: 'center',
},
{
field: 'photoUrl',
align: 'center',
title: '图片',
formatter: function(value, row, index) {
return $.table.imageView(value);
}
},
{
field: 'materialName',
align: 'center',
title: '物料名称',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'materialModel',
title: '型号',
align: 'center',
},
{
field: 'describe',
align: 'center',
title: '描述',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'brand',
align: 'center',
title: '品牌',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'unit',
align: 'center',
title: '单位',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'processMethod',
align: 'center',
title: '加工方式',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
// {
// field: 'useNum',
// align: 'center',
// title: '用量',
// formatter: function (value,row,index){
// if (value == null || value == ''){
// return '/';
// }else{
// return value
// }
// }
// },
{
field: 'hasPickNum',
align: 'center',
title: '已领料数',
},
{
field: 'hasReturnNum',
align: 'center',
title: '已退料数',
visible: false,
formatter: function (value,row,index){
if (value == null || value == ''){
return 0;
}else{
return value
}
}
},
{
field: 'returnNum',
align: 'center',
title: '本次退料数',
},
],
};
$.table.init(options);
});
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-baseReturnOrder-yfzj').serialize());
}
}
$("input[name='applyTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>
Loading…
Cancel
Save