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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix='fmt' uri="http://java.sun.com/jsp/jstl/fmt"%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>知识记录创建</title>
<style>
.table-null .table{
margin-bottom: 0px;
}
.table-null .table > tbody > tr > td, .table-null .table > thead > tr > th{
text-align: center;
width: 25%;
}
.table-null td:first-child{
text-align: right;
width: 36%;
}
.table-null tr td:last-child .form-control,.table-null tr td:last-child table{
width: 400px;
}
.file-box{ position:relative;}
.file{ position:absolute; top:0; height:30px; filter:alpha(opacity:0);opacity:0;width:470px;cursor: pointer; }
/* .file-box{ position:relative;width:340px}
.txt{ height:22px; border:1px solid #cdcdcd; width:180px;}
.btn{ background-color:#FFF; border:1px solid #CDCDCD;height:24px; width:70px;}
.file{ position:absolute; top:0; right:80px; height:24px; filter:alpha(opacity:0);opacity: 0;width:260px } */
</style>
</head>
<body>
<div class="container">
<ol class="breadcrumb">
<li><a href="${ctx}/index">首页</a></li>
<li>即席查询</li>
<li class="active">知识共享</li>
</ol>
</div>
<div id="main-container main-tab-container">
<div id="content" class="container">
<div class="section">
<div class="tab-content">
<div class="tab-pane fade in active" id="home">
<div class="row">
<div class="col-xs-12">
<div class="table-header">知识管理</div>
<form action="#" class="form-horizontal" id="knowledgeCreateForm" method="post" enctype="multipart/form-data">
<table id="knowledgeCreateTable" class="table-null">
<tr><td>知识管理ID:</td><td><input type="text" class="form-control" name="knowledgeId" id="knowledgeId" value="${knowledge.knowledgeId}" readOnly/>
<input type="hidden" name="createTime" id="createTime" value='<fmt:formatDate value="${knowledge.crtDate}" type="both" pattern="yyyy-MM-dd HH:mm:ss" timeZone="GMT+8"/>'/>
</td></tr>
<tr><td>摘要:</td><td><input type="text" class="form-control" name="summary" id="summary" value="${knowledge.summary}"/></td></tr>
<tr><td>关键字(<font color="red">必填</font>):</td><td><input type="text" class="form-control" name="keyword" id="keyword" value="${knowledge.keyword}"/></td></tr>
<tr><td>知识内容(<font color="red">必填</font>):</td><td><input type="text" class="form-control" name="knowledgeContent" id="knowledgeContent" value="${knowledge.content}"/></td></tr>
<tr><td>知识来源:</td>
<td><select class="form-control" name="knowledgeSource" id="knowledgeSource" >
<c:forEach var="knowledgeSources" items="${knowledgeSourceList}">
<option value="${knowledgeSources.knowledgeSourceId}">${knowledgeSources.knowledgeSourceName}</option>
</c:forEach>
</select></td></tr>
<tr><td>知识类型:</td>
<td><select class="form-control" name="knowledgeType" id="knowledgeType">
<c:forEach var="knowledgeTypes" items="${knowledgeTypeList}">
<option value="${knowledgeTypes.knowledgeTypeId}">${knowledgeTypes.knowledgeTypeName}</option>
</c:forEach>
</select></td></tr>
<tr><td>知识文档类型:</td>
<td><select class="form-control" name="knowledgeDocType" id="knowledgeDocType">
<c:forEach var="knowledgeDocTypes" items="${knowledgeDocTypeList}">
<option value="${knowledgeDocTypes.knowledgeDocTypeId}">${knowledgeDocTypes.knowledgeDocTypeName}</option>
</c:forEach>
</select></td></tr>
<tr><td>省份:</td>
<td><select class="form-control" name="province" id="province">
<option value="">全国</option>
<c:forEach var="provinces" items="${provinceList}">
<option value="${provinces.provinceId}">${provinces.provinceName}</option>
</c:forEach>
</select></td></tr>
<!-- <tr><td>发布日期:</td><td><input id="publish_time" name="publishTime" class="form-control" type="text" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'valid_time\')}'})"> </td></tr> -->
<tr><td>有效日期:</td><td><input type="text" class="form-control" id="valid_time" name="validTime" onfocus="WdatePicker({minDate:'#F{\'%y-%M-%d %H:%m:%s\'}'})" value='<fmt:formatDate value="${knowledge.validDate}" type="both" pattern="yyyy-MM-dd HH:mm:ss" timeZone="GMT+8"/>'/></td></tr>
<tr><td>录入人员:</td><td><input type="text" class="form-control" name="crtUser" id="crtUser" value="${knowledge.crtUser}"/></td></tr>
<tr><td>知识文件1:</td><td>
<div class="file-box">
<input type='text' id='knowledgeFileOne' class="form-control" style="display: inline;" value="${knowledge.firstFileName}" />
<input type='button' class="btn btn-default" value='浏 览' style="width:70px"/>
<input type="file" name="uploadFile" class="file" id="fileField" onchange="document.getElementById('knowledgeFileOne').value=this.value" />
</div>
</td></tr>
<tr><td>知识文件2:</td><td>
<div class="file-box">
<input type='text' id='knowledgeFileTwo' class="form-control" style="display: inline;" value="${knowledge.secondFileName}" />
<input type='button' class="btn btn-default" value='浏 览' style="width:70px"/>
<input type="file" name="uploadFile" class="file" id="fileField" onchange="document.getElementById('knowledgeFileTwo').value=this.value" />
</div>
</td></tr>
<tr><td>知识文件3:</td><td>
<div class="file-box">
<input type='text' id='knowledgeFileThree' class="form-control" style="display: inline;" value="${knowledge.thirdFileName}" />
<input type='button' class="btn btn-default" value='浏 览' style="width:70px"/>
<input type="file" name="uploadFile" class="file" id="fileField" onchange="document.getElementById('knowledgeFileThree').value=this.value" />
</div>
</td></tr>
<tr><td>知识文件4:</td><td>
<div class="file-box">
<input type='text' id='knowledgeFileFour' class="form-control" style="display: inline;" value="${knowledge.fourthFileName}" />
<input type='button' class="btn btn-default" value='浏 览' style="width:70px"/>
<input type="file" name="uploadFile" class="file" id="fileField" onchange="document.getElementById('knowledgeFileFour').value=this.value" />
</div>
</td></tr>
<tr><td>知识文件5:</td><td>
<div class="file-box">
<input type='text' id='knowledgeFileFive' class="form-control" style="display: inline;" value="${knowledge.fifthFileName}" />
<input type='button' class="btn btn-default" value='浏 览' style="width:70px"/>
<input type="file" name="uploadFile" class="file" id="fileField" onchange="document.getElementById('knowledgeFileFive').value=this.value" />
</div>
</td></tr>
<tr><td></td><td><button type="button" id="knowledgeSubmit" class="btn btn-primary">确定</button>
<button type="reset" class="btn btn-default" id="knowledgeReset">清空</button>
<button type="reset" class="btn btn-warning" id="knowledgeBack">返回</button>
</td></tr>
</table>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var getKnowledgeSource = "${knowledge.sourceId}";
var getKnowledgeType = "${knowledge.knowledgeType}";
var getKnowledgeDocType = "${knowledge.documentType}";
var getKnowledgeProvince = "${knowledge.provinceId}";
$("#knowledgeSource").val(getKnowledgeSource);
$("#knowledgeType").val(getKnowledgeType);
$("#knowledgeDocType").val(getKnowledgeDocType);
$("#province").val(getKnowledgeProvince);
</script>
<script type="text/javascript">
//返回按钮
$("#knowledgeBack").click(function(){
location.href="${ctx}/DataManage/KnowledgeShare";
});
//清空按钮
$("#knowledgeReset").click(function(){
$("#summary").attr("value","");
$("#keyword").attr("value","");
$("#knowledgeContent").attr("value","");
var SelectArr = $("select");
for (var i = 0; i < SelectArr.length; i++) {
SelectArr[i].options[0].selected = true;
}
$("#publish_time").attr("value","");
$("#valid_time").attr("value","");
$("#crtUser").attr("value","");
$("#knowledgeFileOne").attr("value","");
$("#knowledgeFileTwo").attr("value","");
$("#knowledgeFileThree").attr("value","");
$("#knowledgeFileFour").attr("value","");
$("#knowledgeFileFive").attr("value","");
});
//确定按钮
$("#knowledgeSubmit").click(function(){
if(""==$.trim($("#keyword").val())){
$.alert("关键词不能为空");
}else if(""==$.trim($("#knowledgeContent").val())){
$.alert("知识内容不能为空");
}else if($("#knowledgeFileOne").val()=="" && $("#knowledgeFileTwo").val()=="" && $("#knowledgeFileThree").val()=="" && $("#knowledgeFileFour").val()=="" && $("#knowledgeFileFive").val()==""){
$.alert("至少选择一个知识文件");
}else{
var createForm=$("#knowledgeCreateForm");
createForm.attr("action","${ctx}/DataManage/KnowledgeUpdate/updateKnowledgeForm/"+$("#createTime").val());
createForm.submit();
createForm.attr("action","#");
}
});
</script>
</body>
</html>