|
|
|
@ -2,6 +2,7 @@
|
|
|
|
<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 :: select2-css" />
|
|
|
|
<style type="text/css">
|
|
|
|
<style type="text/css">
|
|
|
|
table label.error { position: inherit; }
|
|
|
|
table label.error { position: inherit; }
|
|
|
|
select + label.error { z-index: 1; right: 40px; }
|
|
|
|
select + label.error { z-index: 1; right: 40px; }
|
|
|
|
@ -11,6 +12,24 @@
|
|
|
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
|
|
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
|
|
|
<form class="form-horizontal m" id="form-receive-add">
|
|
|
|
<form class="form-horizontal m" id="form-receive-add">
|
|
|
|
<h4 class="form-header h4">基本信息</h4>
|
|
|
|
<h4 class="form-header h4">基本信息</h4>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
<div class="col-sm-6">
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
|
|
<label class="col-sm-4 control-label">申请人:</label>
|
|
|
|
|
|
|
|
<div class="col-sm-8">
|
|
|
|
|
|
|
|
<input th:value="${applicantName}" class="form-control" type="text" readonly>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-sm-6">
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
|
|
<label class="col-sm-4 control-label">申请部门:</label>
|
|
|
|
|
|
|
|
<div class="col-sm-8">
|
|
|
|
|
|
|
|
<input th:value="${applyDeptName}" class="form-control" type="text" readonly>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-12">
|
|
|
|
<div class="col-sm-12">
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="form-group">
|
|
|
|
@ -38,10 +57,13 @@
|
|
|
|
</form>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<th:block th:include="include :: footer" />
|
|
|
|
<th:block th:include="include :: footer" />
|
|
|
|
|
|
|
|
<th:block th:include="include :: select2-js" />
|
|
|
|
<script th:inline="javascript">
|
|
|
|
<script th:inline="javascript">
|
|
|
|
var prefix = ctx + "asset/receive";
|
|
|
|
var prefix = ctx + "asset/receive";
|
|
|
|
var deptList = [[${deptList}]];
|
|
|
|
var deptList = [[${deptList}]];
|
|
|
|
var userList = [[${userList}]];
|
|
|
|
var userList = [[${userList}]];
|
|
|
|
|
|
|
|
var defaultReceiveDeptId = [[${defaultReceiveDeptId}]];
|
|
|
|
|
|
|
|
var defaultReceiveUserId = [[${defaultReceiveUserId}]];
|
|
|
|
|
|
|
|
|
|
|
|
$("#form-receive-add").validate({ focusCleanup: true });
|
|
|
|
$("#form-receive-add").validate({ focusCleanup: true });
|
|
|
|
|
|
|
|
|
|
|
|
@ -68,6 +90,14 @@
|
|
|
|
showToggle: false,
|
|
|
|
showToggle: false,
|
|
|
|
showColumns: false,
|
|
|
|
showColumns: false,
|
|
|
|
sidePagination: "client",
|
|
|
|
sidePagination: "client",
|
|
|
|
|
|
|
|
onPostBody: function() {
|
|
|
|
|
|
|
|
// 表格数据渲染完成后,将领用人下拉框初始化为 select2 模糊搜索框
|
|
|
|
|
|
|
|
if ($.fn.select2) {
|
|
|
|
|
|
|
|
$(".select-user").select2({
|
|
|
|
|
|
|
|
width: "100%"
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
columns: [{
|
|
|
|
columns: [{
|
|
|
|
checkbox: true
|
|
|
|
checkbox: true
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -163,8 +193,8 @@
|
|
|
|
beforeLocationId: asset.locationId,
|
|
|
|
beforeLocationId: asset.locationId,
|
|
|
|
beforeLocationCode: asset.locationCode,
|
|
|
|
beforeLocationCode: asset.locationCode,
|
|
|
|
beforeLocationName: asset.locationName,
|
|
|
|
beforeLocationName: asset.locationName,
|
|
|
|
receiveDeptId: "",
|
|
|
|
receiveDeptId: defaultReceiveDeptId,
|
|
|
|
receiveUserId: "",
|
|
|
|
receiveUserId: defaultReceiveUserId,
|
|
|
|
remark: ""
|
|
|
|
remark: ""
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -232,7 +262,8 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function buildUserSelect(value, row, index) {
|
|
|
|
function buildUserSelect(value, row, index) {
|
|
|
|
var select = $("<select>").addClass("form-control").attr({
|
|
|
|
// 加上 select-user 样式类,以便在 onPostBody 回调中初始化为 select2 模糊搜索框
|
|
|
|
|
|
|
|
var select = $("<select>").addClass("form-control select-user").attr({
|
|
|
|
name: "amsReceiveOrderItemList[" + index + "].receiveUserId",
|
|
|
|
name: "amsReceiveOrderItemList[" + index + "].receiveUserId",
|
|
|
|
required: true
|
|
|
|
required: true
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|