Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<%--
since: 2019/7/19 16:41
author: shen.shaohua
description: 延期申请审批页面
url: ${ctx}/expire-apply/approve/{id}
--%>
<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib prefix="cui" tagdir="/WEB-INF/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%
pageContext.setAttribute("idSuffix", String.valueOf(System.currentTimeMillis()).substring(6));
%>
<style type="text/css">
.trdiv {
text-align: left;
height: 30px;
margin-top: 8px;
}
.trdiv .label {
float: left;
width: 20%;
text-align: right;
padding-top: 3px;
}
.trdiv .input {
float: right;
width: 78%;
text-align: left;
}
</style>
<cui:layout id="layout${idSuffix}" fit="true">
<cui:layoutRegion region="center">
<cui:form id="form${idSuffix}" heightStyle="fill" style="padding: 0px;">
<input type="hidden" name="id"/>
<div style="text-align: center;width: 500px;margin: 0px auto;">
<div class="trdiv" style="margin-top: 30px;">
<div class="label">申请人:</div>
<div class="input">
<cui:input name="applyUserName" readonly="true" componentCls="form-control" width="200"/>
</div>
</div>
<div class="trdiv">
<div class="label">有效时间:</div>
<div class="input">
<cui:datepicker name="expireDate" dateFormat="yyyy-MM-dd" width="200" readonly="true" componentCls="form-control"/>
</div>
</div>
<div class="trdiv" style="height: 100px;">
<div class="label">申请原因:</div>
<div class="input">
<cui:textarea name="applyReason" componentCls="form-control" height="99" readonly="true"></cui:textarea>
</div>
</div>
<div class="trdiv" style="height: 100px;">
<div class="label">审批意见:</div>
<div class="input">
<cui:textarea name="approveDetail" componentCls="form-control" height="99"></cui:textarea>
</div>
</div>
<div class="trdiv">
<div class="label">审批结果:</div>
<div class="input">
<cui:radiolist name="approveResult" repeatLayout="flow" data="expireApply_add_sample.approveResultData" value="1" required="true"/>
</div>
</div>
</div>
</cui:form>
</cui:layoutRegion>
<cui:layoutRegion region="south" style="overflow: hidden;">
<div class="buttens-foot-tools">
<a onclick="expireApply_add_sample.sure()">确定</a>
<a onclick="expireApply_add_sample.colseD()">关闭</a>
</div>
</cui:layoutRegion>
</cui:layout>
<script type="text/javascript">
var expireApply_add_fun = (function (win, $) {
var businessId = '${id}';
function sample() {
this.approveResultData = [
{text: '通过', value: '1'},
{text: '不通过', value: '2'}
];
}
var $thisDialog = $('#layout${idSuffix}').closest('.ctrl-init-dialog');
var $form = $('#form${idSuffix}');
initLoad();
//关闭
sample.prototype.colseD = function () {
closeThisDialog();
}
//发送
sample.prototype.sure = function () {
if (!$form.form('valid')) {
warning('表单填写不正确!');
return;
}
var formData = $form.form('formData');
//console.log(formData);
//return;
loading('保存中...');
$.ajax({
type: 'POST',
url: '${ctx}/expire-apply/approve',
data: formData,
dataType: 'json',
success: function (data) {
hide();
if (data.code == '0') {
message('保存成功!');
} else if (data.code == '-1') {
error('保存失败!');
}
expireApply_approveList_sample.reloadGrid();
closeThisDialog();
mailReceive_view_sample.colseD();
},
error: function (e) {
hide();
error(e);
}
});
}
function closeThisDialog() {
$thisDialog.dialog('close');
}
//加载
function initLoad() {
loading('加载中...');
$.ajax({
type: 'GET',
url: '${ctx}/expire-apply/' + businessId,
dataType: 'json',
success: function (data) {
hide();
//console.log(data);
//if (data.approveResult == '0') {
data.approveResult = '1';
//}
$form.form('load', data);
},
error: function (e) {
hide();
error(e);
}
});
}
return sample;
})(window, $);
var expireApply_add_sample = new expireApply_add_fun();
window['expireApply_add_fun'] = null;
delete window['expireApply_add_fun'];
</script>