zhangshuangnan лет назад: 8
Родитель
Сommit
efd56a7775
1 измененных файлов с 32 добавлено и 21 удалено
  1. 32 21
      WebUI/CallCenterWeb.UI/Announcement/Add.html

+ 32 - 21
WebUI/CallCenterWeb.UI/Announcement/Add.html

@@ -5,7 +5,8 @@
5 5
 		<meta charset="UTF-8">
6 6
 		<script src="../Script/Common/huayi.load.js"></script>
7 7
 		<script src="../Script/Common/huayi.config.js"></script>
8
-		<link href="../css/layer/need/layer.css" />
8
+		<script src="../js/laydate/laydate.js"></script>
9
+		<!--<link href="../css/layer/need/layer.css" />-->
9 10
 		<link rel="stylesheet" href="../css/init.css" />
10 11
 		<link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
11 12
 		<title></title>
@@ -74,6 +75,19 @@
74 75
 			.Common{
75 76
 				overflow-y:initial
76 77
 			}
78
+			.time-box{
79
+				position: relative;
80
+				    padding-left: 0;
81
+			}
82
+			i.tub {
83
+			    position: absolute;
84
+			    right: 26px;
85
+			    top: 8px;
86
+			    font-size: 18px;
87
+			    color: #00a0ca;
88
+			}
89
+			
90
+			
77 91
 		</style>
78 92
 	</head>
79 93
 
@@ -90,8 +104,10 @@
90 104
 				<tr>
91 105
 					<th>有效期:</th>
92 106
 					<td>
93
-						<input type="text" id="startTime" class="laydate-icon" style="height: 32px;">-
94
-						<input type="text" id="endTime" class="laydate-icon" style="height: 32px;">
107
+						<div class="col-md-6 time-box">
108
+							<i class="tub fa fa-calendar"></i>
109
+							<input class="form-control" type="text" id="greetingTimes">
110
+						</div>
95 111
 					</td>
96 112
 				</tr>
97 113
 				<tr>
@@ -129,28 +145,24 @@
129 145
 			</div>
130 146
 		</div>
131 147
 		<script src="../js/adjustHeight.js"></script>
132
-		<script src="../css/laydate/laydate.js"></script>
148
+		<!--<script src="../css/laydate/laydate.js"></script>-->
133 149
 		<script src="../js/zTree/jquery.ztree.core.js"></script>
134 150
 		<script src="../js/zTree/jquery.ztree.excheck.min.js"></script>
135 151
 		<script>
136
-			laydate.skin('blue');
137
-			laydate({
138
-				elem: '#startTime',
139
-				event: 'focus',
140
-			});
141
-			laydate({
142
-				elem: '#endTime',
143
-				event: 'focus',
144
-				min:0
145
-			});
152
+			laydate.render({
153
+					elem: '#greetingTimes',
154
+					range: '~',
155
+//					type: 'datetime',
156
+					//max : 31,
157
+					min: 0,
158
+					theme: '#00a1cb',
159
+				});
146 160
 
147 161
 			$(document).ready(function() {
148 162
 				$(".btns").click(function() {
149 163
 					if(!$("#title").val()) {
150 164
 						layer.msg("输入标题");
151
-					} else if(!$("#startTime").val()) {
152
-						layer.msg("输入选择日期");
153
-					} else if(!$("#endTime").val()) {
165
+					} else if(!$("#greetingTimes").val()) {
154 166
 						layer.msg("输入选择日期");
155 167
 					} else {
156 168
 						//          			if($('#role').val()==0){
@@ -194,8 +206,8 @@
194 206
 				$.post(huayi.config.callcenter_url + "Notice/AddNotice", {
195 207
 					title: $("#title").val(),
196 208
 					content: $("#content").val(),
197
-					stime: $("#startTime").val(),
198
-					etime: $('#endTime').val(),
209
+					stime: $('#greetingTimes').val() && $('#greetingTimes').val().split('~')[0],//开始时间
210
+					etime: $('#greetingTimes').val() && $('#greetingTimes').val().split('~')[1],//结束时间
199 211
 					token: $.cookie("token"),
200 212
 					userid: user,
201 213
 					roleid: role
@@ -219,8 +231,7 @@
219 231
 				month = (month <= 9 ? "0" + month : month);
220 232
 				strDate = (strDate <= 9 ? "0" + strDate : strDate)
221 233
 				var mydate = (year.toString() + '-' + month.toString() + '-' + strDate.toString());
222
-				$("#startTime").val(mydate);
223
-				$("#endTime").val(mydate);
234
+				$('#greetingTimes').val(mydate+' ~ '+mydate)
224 235
 			}
225 236
 			GetData();
226 237
 			var saveArr = []