You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
390 lines
20 KiB
390 lines
20 KiB
<!DOCTYPE html>
|
|
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>分步表单</title>
|
|
<meta name="renderer" content="webkit">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
<link rel="stylesheet" href="/static/lib/layui-v2.6.3/css/layui.css" media="all">
|
|
<link rel="stylesheet" href="/static/css/public.css" media="all">
|
|
<link rel="stylesheet" href="/static/js/lay-module/step-lay/step.css" media="all">
|
|
<link rel="stylesheet" href="/static/lib/font-awesome-4.7.0/css/font-awesome.min.css" media="all">
|
|
|
|
</head>
|
|
<body>
|
|
<div class="layuimini-container">
|
|
<div class="layuimini-main">
|
|
|
|
<div class="layui-fluid">
|
|
<div class="layui-card">
|
|
<div class="layui-card-body" style="padding-top: 0px;">
|
|
<div id="stepForm" lay-filter="stepForm" style="margin: 0 auto;">
|
|
<div style="margin-top: 30px">
|
|
<button th:style="'display:'+${display}" onclick="downloadExcel()">下载</button>
|
|
<table id="demo" class="layui-table"
|
|
style="margin: 0 auto;max-width: 800px;">
|
|
<colgroup>
|
|
<col width="150">
|
|
<col width="200">
|
|
</colgroup>
|
|
|
|
<tbody>
|
|
<tr>
|
|
<td>申请编号</td>
|
|
<td id="applicationId" th:text="${record.getCode()}">123456</td>
|
|
</tr>
|
|
<tr>
|
|
<td>出库业务类型</td>
|
|
<td id="outTypeName" th:text="${record.getOutTypeName()}">备注</td>
|
|
</tr>
|
|
<input style="display: none" id="id" th:value="${record.getId()}">
|
|
<tr th:each="recordMin,iterStar: ${recordMinList}">
|
|
<td>物料名称</td>
|
|
<td>
|
|
<button th:text="${recordMin.getMname()}" th:value="${recordMin.getId()}"
|
|
onclick="selectThisMinRecord(this)"></button>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>是否为转移申请</td>
|
|
<td id="isTransfer" th:text="${record.getIstransfer() == 2 ?'否':'是'} ">外芯仓库</td>
|
|
</tr>
|
|
<tr>
|
|
<td>仓库名称</td>
|
|
<td id="depositoryName" th:text="${record.getDepositoryName()}">外芯仓库</td>
|
|
</tr>
|
|
<tr th:style="'display:'+${adisplay}">
|
|
<td>申请部门</td>
|
|
<td id="adminorg" th:text="${record.getAdminorgName()}">部门</td>
|
|
</tr>
|
|
<tr>
|
|
<td>使用部门</td>
|
|
<td id="useAdminorg" th:text="${record.getUseAdminorgName()}">部门</td>
|
|
</tr>
|
|
<tr th:style="'display:'+${cdisplay}">
|
|
<td>施工单位</td>
|
|
<td id="constructUnitId" th:text="${record.getConstructionUnitName()}">施工单位</td>
|
|
</tr>
|
|
<tr>
|
|
<td>处理人</td>
|
|
<td th:text="${outDisposer}"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>所处库位</td>
|
|
<td id="placeCode" th:text="${record.getPCode()}">0000</td>
|
|
</tr>
|
|
<tr>
|
|
<td>数量</td>
|
|
<td id="quantity" th:text="${record.getQuantity()}">409</td>
|
|
</tr>
|
|
<tr th:style="'display:'+${display}">
|
|
<td>金额</td>
|
|
<td id="price" th:text="${record.getPrice()}">2016-11-28</td>
|
|
</tr>
|
|
<tr>
|
|
<td>状态</td>
|
|
<td id="state" th:text="${record.getState()}">2016-11-28</td>
|
|
<td id="pass" th:text="${record.getPass()}" style="display:none;"></td>
|
|
</tr>
|
|
<!--<tr>
|
|
<td>申请人</td>
|
|
<td id="applicantName" th:text="${record.getApplicantName()}">2016-11-28</td>
|
|
</tr>
|
|
<tr>
|
|
<td>请求提交时间</td>
|
|
<td id="applicantTime" th:text="${record.getApplicantTime()}">2016-11-28</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>申请备注</td>
|
|
<td id="applyRemarks" th:text="${record.getApplyRemark()}">备注</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>负责人</td>
|
|
<td id="departmentheadName" th:text="${record.getDepartmentheadName()}">部门负责人</td>
|
|
</tr>
|
|
<tr id="departmentheadMessageT" style="display: none">
|
|
<td>负责人备注</td>
|
|
<td id="departmentheadMessage" th:text="${record.getDepartmentheadMessage()}">
|
|
2016-11-28
|
|
</td>
|
|
</tr>
|
|
<tr id="departmentheadTimeT" style="display: none">
|
|
<td>负责人审核时间</td>
|
|
<td id="departmentheadTime"
|
|
th:text="${record.getDepartmentheadTime().equals('1970-01-01 08:00:00')?'':record.getDepartmentheadTime()}">
|
|
2016-11-28
|
|
</td>
|
|
</tr>
|
|
|
|
<input id="depositoryManagerPass" style="display: none"
|
|
th:value="${record.getDepositoryManagerPass()}">
|
|
|
|
<tr id="balancePosterNameT" style="display: none">
|
|
<td th:text="${depositoryManagerText}"></td>
|
|
<td id="balancePosterName" th:text="${record.getBalancePosterName()}"></td>
|
|
</tr>
|
|
<tr id="balancePosterMessageT" style="display: none">
|
|
<td th:text="${depositoryManagerText}+'备注'"></td>
|
|
<td id="balancePosterNameMessage" th:text="${record.getBalancePosterMessage()}">
|
|
2016-11-28
|
|
</td>
|
|
</tr>
|
|
<tr id="balancePosterNameTimeT" style="display: none">
|
|
<td th:text="${depositoryManagerText}+'审核时间'"></td>
|
|
<td id="balancePosterNameTime"
|
|
th:text="${record.getBalancePosterTime().equals('1970-01-01 08:00:00')?'':record.getBalancePosterTime()}">
|
|
2016-11-28
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr id="depositoryManagerNameT" style="display: none">
|
|
<td th:text="${depositoryManagerText}"></td>
|
|
|
|
<td id="depositoryManagerName" th:text="${record.getDepositoryManagerName()}"></td>
|
|
</tr>
|
|
<tr id="depositoryManagerNameMessageT" style="display: none">
|
|
<td th:text="${depositoryManagerText}+'备注'"></td>
|
|
<td id="depositoryManagerNameMessage"
|
|
th:text="${record.getDepositoryManagerMessage()}">2016-11-28
|
|
</td>
|
|
</tr>
|
|
<tr id="depositoryManagerNameTimeT" style="display: none">
|
|
<td th:text="${depositoryManagerText}+'审核时间'"></td>
|
|
<td id="depositoryManagerNameTime"
|
|
th:text="${record.getDepositoryManagerTime().equals('1970-01-01 08:00:00')?'':record.getDepositoryManagerTime()}">
|
|
2016-11-28
|
|
</td>
|
|
</tr>-->
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
<!-- 用于展示审批流程-->
|
|
<div class="layui-timeline">
|
|
<div class="layui-timeline-item" id="applicantNode">
|
|
<i class="layui-icon layui-timeline-axis layui-icon-friends"></i>
|
|
<div class="layui-timeline-content layui-text">
|
|
<h3 class="layui-timeline-title"
|
|
th:text="'申请人:'+ ${record.getApplicantName()}"></h3>
|
|
<p th:text="'申请时间:'+${record.getApplicantTime()}"></p>
|
|
<p th:text="'申请事由:'+${record.getApplyRemark()}"></p>
|
|
</div>
|
|
</div>
|
|
<div class="layui-timeline-item" id="firstApprovalNode">
|
|
<i id="firstApprovalNodeIcon"
|
|
class="layui-icon layui-timeline-axis layui-icon-friends"></i>
|
|
<div class="layui-timeline-content layui-text">
|
|
<h3 class="layui-timeline-title"
|
|
th:text="'审批人:'+ ${record.getDepartmentheadName()}"></h3>
|
|
<p id="firstApprovalNodeState" th:text="'状态:待审批'"></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
|
|
<script src="/static/js/lay-config.js?v=1.0.4" charset="utf-8"></script>
|
|
<script>
|
|
function selectThisMinRecord(obj) {
|
|
|
|
}
|
|
|
|
function downloadExcel() {
|
|
|
|
}
|
|
|
|
layui.use(['form', 'step'], function () {
|
|
var $ = layui.$,
|
|
form = layui.form,
|
|
step = layui.step;
|
|
step.render({
|
|
elem: '#stepForm',
|
|
filter: 'stepForm',
|
|
width: '100%', //设置容器宽度
|
|
stepWidth: '750px',
|
|
height: '100%',
|
|
// number:number,
|
|
// position: position,
|
|
stepItems: []
|
|
});
|
|
|
|
|
|
let id = $("#id").val();
|
|
// 定义当前查看的出库单
|
|
let record = {};
|
|
|
|
|
|
$.ajax({
|
|
url: "/depositoryRecord/getApplicationOutRecord",
|
|
type: "post",
|
|
dataType: 'json',
|
|
data: JSON.stringify({"id": id}),
|
|
contentType: "application/json;charset=utf-8",
|
|
success: function (res) {
|
|
record = res.data;
|
|
|
|
// 用于时间线项目
|
|
let timeLineStartItem = `<div class="layui-timeline-item">
|
|
<i class="layui-icon layui-timeline-axis layui-icon-friends"></i>
|
|
<div class="layui-timeline-content layui-text">`;
|
|
let timeLineEndItem = `</div></div>`;
|
|
|
|
// 获取第一个审批节点
|
|
let firstApprovalNode = $("#firstApprovalNode");
|
|
// 获取第一个审批节点状态
|
|
let firstApprovalNodeState = $("#firstApprovalNodeState");
|
|
// 获取第一个审批节点图标
|
|
let firstApprovalNodeIcon = $("#firstApprovalNodeIcon");
|
|
|
|
|
|
// 获取部门负责人节点审批时间(第一个节点)
|
|
let departmentheadTime = record.departmentheadTime;
|
|
let departmenthead = record.departmenthead;
|
|
let departmentheadPass = record.departmentheadPass;
|
|
let departmentheadMessage = record.departmentheadMessage;
|
|
// 获取仓储中心负责人节点审批时间(第二个节点)
|
|
let depositoryManagerNameTime = record.depositoryManagerTime;
|
|
let depositoryManager = record.depositoryManagerName;
|
|
// 获取仓储中心负责人节点审批结果
|
|
let depositoryManagerPass = record.depositoryManagerPass;
|
|
let depositoryManagerMessage = record.depositoryManagerMessage;
|
|
// 获取平衡岗人员节点
|
|
let balancePoster = record.balancePoster;
|
|
let balancePosterName = record.balancePosterName;
|
|
// 获取平衡岗人员节点审批时间
|
|
let balancePosterNameTime = record.balancePosterTime;
|
|
let balancePosterMessage = record.balancePosterMessage;
|
|
|
|
|
|
if (departmentheadTime != null && departmentheadTime !== "" && departmentheadTime !== "0") {
|
|
|
|
firstApprovalNodeIcon.removeClass("layui-icon-friends");
|
|
// 如果部门负责人审批时间不为空
|
|
if (departmentheadPass === "1") {
|
|
firstApprovalNodeState.text("状态:审批通过");
|
|
firstApprovalNodeIcon.addClass("layui-icon-ok");
|
|
} else {
|
|
firstApprovalNodeState.text("状态:驳回");
|
|
firstApprovalNodeIcon.addClass("layui-icon-close");
|
|
}
|
|
firstApprovalNodeState.before("<p>审批时间:" + departmentheadTime + "</p>");
|
|
firstApprovalNodeState.append("<p>审批意见:" + balancePosterMessage + "</p>");
|
|
}
|
|
|
|
if (departmentheadTime !== "" && departmentheadTime !== "0" && balancePoster === "" && depositoryManagerPass !== "4") {
|
|
// 如果部门负责人已经审批过
|
|
let newTimeLineNodeApprovalName = '<h3 class="layui-timeline-title">' + depositoryManager + '</h3>';
|
|
let newTimeLineNode = timeLineStartItem + newTimeLineNodeApprovalName + timeLineEndItem;
|
|
firstApprovalNode.append(newTimeLineNode);
|
|
}
|
|
else if (departmentheadTime !== "" && departmentheadTime !== "0" && balancePoster !== "") {
|
|
// 如果平衡岗已经审批过
|
|
let newTimeLineNodeApprovalName = '<h3 class="layui-timeline-title">' + balancePosterName + '</h3>';
|
|
let newTimeLineNode = timeLineStartItem + newTimeLineNodeApprovalName + timeLineEndItem;
|
|
firstApprovalNode.append(newTimeLineNode);
|
|
}
|
|
|
|
if (balancePosterNameTime != null && balancePosterNameTime !== "0" && balancePosterNameTime !== "") {
|
|
let newTimeLineNodeApprovalName = '<h3 class="layui-timeline-title">' + balancePosterName + '</h3>';
|
|
let newTimeLineNodeApprovalTime = '<p>审批时间:' + balancePosterNameTime + '</p>';
|
|
let newTimeLineNodeApprovalMessage = '<p>审批意见:' + balancePosterNameTime + '</p>';
|
|
|
|
let newTimeLineNode = timeLineStartItem + newTimeLineNodeApprovalName + newTimeLineNodeApprovalTime + newTimeLineNodeApprovalMessage + timeLineEndItem;
|
|
firstApprovalNode.append(newTimeLineNode);
|
|
}
|
|
|
|
if (depositoryManagerNameTime != null && depositoryManagerNameTime !== "0" && depositoryManagerNameTime !== "" && depositoryManagerPass !== "4") {
|
|
let newTimeLineNodeApprovalName = '<h3 class="layui-timeline-title">' + depositoryManager + '</h3>';
|
|
let newTimeLineNodeApprovalTime = '<p>审批时间:' + depositoryManagerNameTime + '</p>';
|
|
let newTimeLineNodeApprovalMessage = '<p>审批意见:' + depositoryManagerMessage + '</p>';
|
|
|
|
let newTimeLineNode = timeLineStartItem + newTimeLineNodeApprovalName + newTimeLineNodeApprovalTime + newTimeLineNodeApprovalMessage + timeLineEndItem;
|
|
firstApprovalNode.append(newTimeLineNode);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
});
|
|
|
|
|
|
/* // 获取部门负责人节点审批时间
|
|
let departmentheadTime = $("#departmentheadTime").text();
|
|
// 获取仓储中心负责人节点审批时间
|
|
let depositoryManagerNameTime = $("#depositoryManagerNameTime").text();
|
|
// 获取仓储中心负责人节点审批结果
|
|
let depositoryManagerPass = $("#depositoryManagerPass").val();
|
|
// 获取平衡岗人员节点
|
|
let balancePoster = $("#balancePosterName").text();
|
|
// 获取平衡岗人员节点审批时间
|
|
let balancePosterNameTime = $("#balancePosterNameTime").text();
|
|
|
|
if (departmentheadTime != null && departmentheadTime !== "" && departmentheadTime !== "0") {
|
|
// 如果部门负责人审批时间不为空
|
|
$("#departmentheadTimeT").show();
|
|
$("#departmentheadMessageT").show();
|
|
|
|
}
|
|
|
|
if (departmentheadTime !== "" && departmentheadTime !== "0" && balancePoster === "" && depositoryManagerPass !== "4") {
|
|
// 如果部门负责人已经审批过
|
|
$("#depositoryManagerNameT").show();
|
|
} else if (departmentheadTime !== "" && departmentheadTime !== "0" && balancePoster !== "") {
|
|
$("#balancePosterNameT").show();
|
|
}
|
|
|
|
if (balancePosterNameTime != null && balancePosterNameTime !== "0" && balancePosterNameTime !== "") {
|
|
$("#depositoryManagerNameT").show();
|
|
$("#balancePosterNameT").show();
|
|
$("#balancePosterNameTimeT").show();
|
|
$("#balancePosterMessageT").show();
|
|
}
|
|
|
|
if (depositoryManagerNameTime != null && depositoryManagerNameTime !== "0" && depositoryManagerNameTime !== "" && depositoryManagerPass !== "4") {
|
|
$("#depositoryManagerNameT").show();
|
|
$("#depositoryManagerNameTimeT").show();
|
|
$("#depositoryManagerNameMessageT").show();
|
|
}
|
|
*/
|
|
|
|
selectThisMinRecord = function (obj) {
|
|
// console.log(obj)
|
|
var minId = obj.value;
|
|
layer.open({
|
|
type: 2,
|
|
title: '详情',
|
|
skin: 'layui-layer-rim',
|
|
maxmin: true,
|
|
shadeClose: true, //点击遮罩关闭层
|
|
area: ['100%', '100%'],
|
|
move: '.layui-layer-title',
|
|
fixed: false,
|
|
content: '/form_step_lookByminRecordOut?id=' + minId,
|
|
});
|
|
};
|
|
|
|
downloadExcel = function () {
|
|
|
|
window.open("/depositoryRecord/downloadOutRecord?id=" + id, "_self");
|
|
};
|
|
$('body').on('click', '[data-refresh]', function () {
|
|
location.reload();
|
|
})
|
|
|
|
})
|
|
</script>
|
|
</body>
|
|
</html>
|