-
Notifications
You must be signed in to change notification settings - Fork 70
/
init_task_center.php
562 lines (541 loc) · 24.5 KB
/
init_task_center.php
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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
<?php
/**
* 任务发布中心
* @author fotomxq <fotomxq.me>
* @version 2
* @package oa
*/
/**
* 页面引用判断
* @since 1
*/
if (isset($init_page) == false) {
die();
}
/**
* 初始化基础变量
* @since 1
*/
$page = isset($_GET['page']) ? $_GET['page'] : 1;
$max = 30;
$sort = 0;
$desc = true;
$post_type = 'task';
$post_status = isset($_GET['status']) ? $_GET['status'] : 'public';
$post_parent = isset($_GET['parent']) ? $_GET['parent'] : '0';
if($post_parent > 0){
$post_status = null;
}
/**
* 提示消息变量
* @since 1
*/
$message = '';
$message_bool = false;
/**
* 引入时间处理插件
* @since 1
*/
require(DIR_LIB . DS . 'plug-date.php');
/**
* 添加新的记录
* @since 1
*/
if (isset($_POST['add_title']) == true && isset($_POST['add_content']) == true && isset($_POST['add_date_start']) == true && isset($_POST['add_date_maturity']) == true) {
if ($_POST['add_title'] && $_POST['add_content']) {
$post_date_start = plugdate_check($_POST['add_date_start']);
$post_date_maturity = plugdate_check($_POST['add_date_maturity']);
if ((int) $post_date_start <= (int) $post_date_maturity) {
if ($oapost->add($_POST['add_title'], $_POST['add_content'], $post_type, 0, $post_user, null, $post_date_start, $post_date_maturity, 'public', null)) {
$message = '添加任务成功。';
$message_bool = true;
} else {
$message = '无法添加新的任务。';
$message_bool = false;
}
} else {
$message = '无法添加新的任务,结束时间必须大于开始时间。';
$message_bool = false;
}
} else {
$message = '无法添加任务,请正确填写相关信息。';
$message_bool = false;
}
}
/**
* 用户接受任务
* @since 1
*/
if (isset($_GET['accept']) == true) {
$accept_view = $oapost->view($_GET['accept']);
if ($accept_view) {
if ($accept_view['post_status'] === 'public' && $accept_view['post_parent'] == 0 && (int) $accept_view['post_url'] > (int) date('Ymd')) {
$accept_parent = $oapost->view_list_row($post_user, null, null, null, $post_type, $accept_view['id']);
if ($accept_parent < 1) {
if ($oapost->add($accept_view['post_title'], '无', $post_type, $accept_view['id'], $post_user, null, null, null, 'public', null)) {
$message = '添加任务成功。';
$message_bool = true;
} else {
$message = '无法添加新的任务。';
$message_bool = false;
}
} else {
$message = '您已经接受过该任务了。';
$message_bool = false;
}
} else {
$message = '该任务已经结束了。';
$message_bool = false;
}
} else {
$message = '该任务不存在';
$message_bool = false;
}
}
/**
* 修改记录信息
* @since 1
*/
if (isset($_POST['edit_id']) == true && isset($_POST['edit_title']) == true && isset($_POST['edit_content']) == true && isset($_POST['edit_date_start']) == true && isset($_POST['edit_date_maturity']) == true) {
if ($_POST['edit_title'] && $_POST['edit_content']) {
$edit_view = $oapost->view($_POST['edit_id']);
if ($edit_view) {
$post_date_start = plugdate_check($_POST['edit_date_start']);
$post_date_maturity = plugdate_check($_POST['edit_date_maturity']);
if ((int) $post_date_start <= (int) $post_date_maturity) {
if ($oapost->edit($_POST['edit_id'], $_POST['edit_title'], $_POST['edit_content'], $post_type, $edit_view['post_parent'], $edit_view['post_user'], $edit_view['post_password'], $post_date_start, $post_date_maturity, $edit_view['post_status'], $edit_view['post_meta']) == true) {
$message = '修改成功!';
$message_bool = true;
} else {
$message = '无法修改任务。';
$message_bool = false;
}
} else {
$message = '无法修改任务,结束时间必须大于开始时间';
$message_bool = false;
}
} else {
$message = '无法修改任务,找不到该任务。';
$message_bool = false;
}
} else {
$message = '无法修改任务,您必须输入任务标题和描述。';
$message_bool = false;
}
}
/**
* 完结任务
* @since 1
*/
if (isset($_GET['edit_finish']) == true) {
$edit_finish_boolean = false;
$edit_finish_parent_ready_view = $oapost->view_list_row(null, null, null, 'public-ready', $post_type, $_GET['edit_finish']);
$edit_finish_parent_view = $oapost->view_list_row(null, null, null, 'public', $post_type, $_GET['edit_finish']);
if ($edit_finish_parent_ready_view > 0 || $edit_finish_parent_view > 0) {
$edit_finish_boolean = false;
} else {
$edit_finish_boolean = true;
}
$edit_view = $oapost->view($_GET['edit_finish']);
if ($edit_view) {
if ($edit_finish_boolean) {
if ($oapost->edit($edit_view['id'], $edit_view['post_title'], $edit_view['post_content'], $post_type, $edit_view['post_parent'], $edit_view['post_user'], $edit_view['post_password'], $edit_view['post_name'], $edit_view['post_url'], 'public-finish', $edit_view['post_meta']) == true) {
$message = '成功完结了该任务。';
$message_bool = true;
} else {
$message = '无法设定为完结任务。';
$message_bool = false;
}
} else {
$message = '无法设定为完结任务,该任务下的职员完成状况尚未完全审批。';
$message_bool = false;
}
}
}
/**
* 审批任务
* @since 1
*/
if ($post_parent > 0 && isset($_GET['parent_view']) == true && isset($_GET['edit_status']) == true) {
$edit_view = $oapost->view($_GET['parent_view']);
if ($edit_view) {
if ($oapost->edit($_GET['parent_view'], $edit_view['post_title'], $edit_view['post_content'], $post_type, $edit_view['post_parent'], $edit_view['post_user'], $edit_view['post_password'], $edit_view['post_name'], $edit_view['post_url'], $_GET['edit_status'], $edit_view['post_meta']) == true) {
$message = '审批成功。';
$message_bool = true;
} else {
$message = '无法审批该任务。';
$message_bool = false;
}
}
}
/**
* 设定业绩
* @since 1
*/
if ($post_parent > 0 && isset($_GET['parent_view']) == true && isset($_POST['set_results']) == true) {
$results_task_view = $oapost->view($_GET['parent_view']);
if ($results_task_view) {
$results_view = $oapost->view_list(null, null, null, null, 'performance', 1, 10, 0, false, $_GET['parent_view']);
if ($results_view) {
if ($oapost->edit($results_view[0]['id'], $results_view[0]['post_title'], '', 'performance', $results_view[0]['post_parent'], $results_view[0]['post_user'], $results_view[0]['post_password'], $results_view[0]['post_name'], $_POST['set_results'], $results_view[0]['post_status'], $results_view[0]['post_meta']) == true) {
$message = '设定业绩量成功。';
$message_bool = true;
} else {
$message = '无法设定业绩量。';
$message_bool = false;
}
} else {
if ($oapost->add($results_task_view['post_title'], '无', 'performance', $results_task_view['id'], $results_task_view['post_user'], null, $post_user, $_POST['set_results'], 'private', null)) {
$message = '设定业绩量成功。';
$message_bool = true;
} else {
$message = '无法设定业绩量。';
$message_bool = false;
}
}
}
}
/**
* 删除记录
* @since 1
*/
if (isset($_GET['del']) == true) {
$del_view = $oapost->view($_GET['del']);
if ($del_view) {
if ($del_view['post_status'] == 'public-trash') {
//删除ID
if ($oapost->del($del_view['id']) == true) {
$message = '删除成功。';
$message_bool = true;
} else {
$message = '无法彻底删除该任务。';
$message_bool = false;
}
} else {
if ($oapost->edit($del_view['id'], $del_view['post_title'], $del_view['post_content'], $post_type, $del_view['post_parent'], $del_view['post_user'], $del_view['post_password'], $del_view['post_name'], $del_view['post_url'], 'public-trash', $del_view['post_meta']) == true) {
$message = '删除成功。';
$message_bool = true;
} else {
$message = '无法删除该任务。';
$message_bool = false;
}
}
} else {
$message = '无法删除该任务。';
$message_bool = false;
}
}
/**
* 获取列表记录数
* @since 1
*/
$table_list_row = $oapost->view_list_row(null, null, null, $post_status, $post_type, $post_parent);
/**
* 计算页码
* @since 1
*/
$page_max = ceil($table_list_row / $max);
if ($page < 1) {
$page = 1;
} else {
if ($page > $page_max) {
$page = $page_max;
}
}
$page_prev = $page - 1;
$page_next = $page + 1;
/**
* 获取列表
* @since 1
*/
$table_list = $oapost->view_list(null, null, null, $post_status, $post_type, $page, $max, $sort, $desc, $post_parent);
/**
* 获取状态标记
* @since 1
* @param string $status 状态
* @return string
*/
function get_tag_status($status) {
$return = '';
if ($status === 'public-finish') {
$return = ' <span class="label label-success">审批合格</span>';
} else if ($status === 'public-ready') {
$return = ' <span class="label label-info">等待审批</span>';
} else if ($status === 'public-trash') {
$return = ' <span class="label label-inverse">放弃</span>';
} else if ($status === 'public-fail') {
$return = ' <span class="label label-important">没有完成</span>';
} else {
$return = ' <span class="label">正在进行中</span>';
}
return $return;
}
?>
<!-- 管理表格 -->
<h2>生产任务中心</h2>
<p>
<a href="<?php echo $page_url; ?>&status=public" role="button" class="btn<?php if($post_status=='public'){ echo ' disabled'; } ?>"><i class="icon-list"></i> 查看任务列表</a>
<a href="<?php echo $page_url; ?>&status=public-finish" role="button" class="btn btn-success<?php if($post_status=='public-finish'){ echo ' disabled'; } ?>"><i class="icon-thumbs-up icon-white"></i> 查看已完结的任务</a>
<a href="<?php echo $page_url; ?>&status=public-trash" role="button" class="btn btn-danger<?php if($post_status=='public-trash'){ echo ' disabled'; } ?>"><i class="icon-trash icon-white"></i> 查看已删除的任务</a>
<a href="#print_page" target="_self" class="btn"><i class="icon-print"></i> 打印该页</a>
</p>
<table class="table table-hover table-bordered table-striped">
<thead>
<tr>
<th><i class="icon-tag"></i> 任务名称</th>
<?php if($post_parent == 0){ ?>
<th><i class="icon-calendar"></i> 开始时间</th>
<th><i class="icon-calendar"></i> 到期时间</th>
<?php }else{ ?>
<th><i class="icon-user"></i> 用户</th>
<th><i class="icon-adjust"></i> 状态</th>
<?php } ?>
<th><i class="icon-asterisk"></i> 操作</th>
</tr>
</thead>
<tbody id="message_list">
<?php if ($table_list) {
foreach ($table_list as $v) { ?>
<tr class="<?php
if((int)$v['post_url'] < (int)date('Ymd') && (int)$v['post_url'] > 0 && $post_status=='public' && $post_parent == 0){
echo 'warning';
}
if($post_parent > 0){
if($v['post_status'] === 'public-ready'){
echo 'warning';
}elseif($v['post_status'] === 'public-fail'){
echo 'error';
}elseif($v['post_status'] === 'public-finish'){
echo 'success';
}
}
?>">
<td><a href="<?php if($post_parent == 0){ echo $page_url.'&view='.$v['id'].'#view'; }else{ echo $page_url.'&parent='.$post_parent.'&parent_view='.$v['id'].'#parent'; } ?>" target="_self"><?php echo $v['post_title']; ?></a></td>
<?php if($post_parent == 0){ ?>
<td><?php echo plugdate_get($v['post_name']); ?></td>
<td><?php echo plugdate_get($v['post_url']); ?></td>
<?php }else{ ?>
<td><?php $v_user = $oauser->view_user($v['post_user']); if($v_user){ echo $v_user['user_name']; unset($v_user); } ?></td>
<td><?php echo get_tag_status($v['post_status']); ?></td>
<?php } ?>
<td>
<div class="btn-group">
<a href="<?php if($post_parent == 0){ echo $page_url.'&view='.$v['id'].'#view'; }else{ echo $page_url.'&parent='.$post_parent.'&parent_view='.$v['id'].'#parent'; } ?>" class="btn"><i class="icon-search"></i> 查看详情</a>
<?php if($post_status==='public' && $post_parent == 0){ ?>
<a href="<?php echo $page_url.'&accept='.$v['id']; ?>" role="button" class="btn btn-inverse"><i class="icon-plane icon-white"></i> 接受该任务</a>
<?php } ?>
<?php if($logged_admin){ ?><?php if($post_status==='public' && $post_parent == 0){ ?>
<a href="<?php echo $page_url.'&edit_finish='.$v['id']; ?>" class="btn btn-success"><i class="icon-thumbs-up icon-white"></i> 完结该任务</a>
<a href="<?php echo $page_url.'&parent='.$v['id']; ?>" class="btn btn-info"><i class="icon-check icon-white"></i> 审批该任务</a>
<?php } if($post_parent == 0){ ?>
<a href="<?php echo $page_url.'&edit='.$v['id']; ?>#edit" role="button" class="btn"><i class="icon-pencil"></i> 编辑</a>
<a href="<?php echo $page_url.'&del='.$v['id']; ?>" class="btn btn-danger"><i class="icon-trash icon-white"></i> 删除</a>
<?php } } ?>
</div>
</td>
</tr>
<?php } } ?>
</tbody>
</table>
<!-- 页码 -->
<ul class="pager">
<li class="previous<?php if ($page <= 1) { echo ' disabled'; } ?>">
<a href="<?php echo $page_url . '&page=' . $page_prev; ?>">← 上一页</a>
</li>
<li class="next<?php if ($page >= $page_max) { echo ' disabled'; } ?>">
<a href="<?php echo $page_url.'&page='.$page_next; ?>">下一页 →</a>
</li>
</ul>
<?php if (isset($_GET['view']) == false && isset($_GET['edit']) == false && $post_parent == 0) { ?>
<!-- 添加 -->
<h2>添加新的生产任务</h2>
<p>添加新的生产任务指标,提供给职工接收。职工完成任务后需要管理员审批以确定是否合格。</p>
<form class="form-horizontal form-actions" action="<?php echo $page_url; ?>" method="post">
<div class="control-group">
<label class="control-label" for="add_title">任务名称</label>
<div class="controls">
<input type="text" id="add_title" name="add_title" placeholder="标题">
</div>
</div>
<div class="control-group">
<label class="control-label" for="add_content">任务描述</label>
<div class="controls">
<textarea name="add_content" class="input-xxlarge" rows="10" placeholder="任务描述..."></textarea>
</div>
</div>
<div class="control-group">
<label class="control-label" for="add_date_start">开始日期</label>
<div class="controls">
<input type="text" id="add_date_start" name="add_date_start" placeholder="YYYY-MM-DD">
<a href="#date_now_button" role="button" class="btn"><i class="icon-time"></i> 选择今天</a>
</div>
</div>
<div class="control-group">
<label class="control-label" for="add_date_maturity">结束日期</label>
<div class="controls">
<input type="text" id="add_date_maturity" name="add_date_maturity" placeholder="YYYY-MM-DD">
</div>
</div>
<div class="control-group">
<div class="controls">
<button type="submit" class="btn btn-primary"><i class="icon-ok icon-white"></i> 添加</button>
<a href="<?php echo $page_url; ?>" role="button" class="btn"><i class="icon-arrow-left"></i> 返回</a>
</div>
</div>
</form>
<?php } ?>
<?php if (isset($_GET['view']) == true && $post_parent==0) { $view_res = $oapost->view($_GET['view']); if($view_res){ ?>
<!-- 查看信息 -->
<h2>查看生产任务详情</h2>
<div id="view" class="form-actions">
<p><?php echo $view_res['post_title']; ?><?php if((int)$view_res['post_url'] < (int)date('Ymd') && (int)$view_res['post_url'] > 0){ echo ' - 已过期'; }?></p>
<p> </p>
<p>开始日期:<?php echo plugdate_get($view_res['post_name']); ?></p>
<p> </p>
<p>结束日期:<?php echo plugdate_get($view_res['post_url']); ?></p>
<p> </p>
<p><?php echo $view_res['post_content']; ?></p>
<p> </p>
<div class="control-group">
<div class="controls">
<a href="<?php echo $page_url.'&edit='.$view_res['id']; ?>#edit" role="button" class="btn"><i class="icon-pencil"></i> 编辑</a>
<a href="<?php echo $page_url; ?>" role="button" class="btn"><i class="icon-arrow-left"></i> 返回</a>
</div>
</div>
</div>
<?php } } ?>
<?php if (isset($_GET['edit']) == true && isset($_GET['view']) == false && $post_parent==0) { $view_res = $oapost->view($_GET['edit']); if($view_res){ ?>
<!-- 编辑 -->
<h2>修改生产任务</h2>
<form class="form-horizontal form-actions" action="<?php echo $page_url.'&view='.$view_res['id']; ?>" method="post">
<div class="control-group">
<label class="control-label" for="edit_title">任务标题</label>
<div class="controls">
<input type="text" id="edit_title" name="edit_title" placeholder="任务标题" value="<?php echo $view_res['post_title']; ?>">
</div>
<div class="hidden">
<input type="text" name="edit_id" value="<?php echo $view_res['id']; ?>">
</div>
</div>
<div class="control-group">
<label class="control-label" for="edit_content">任务描述</label>
<div class="controls">
<textarea name="edit_content" class="input-xxlarge" rows="10" placeholder="任务描述..."><?php echo $view_res['post_content']; ?></textarea>
</div>
</div>
<div class="control-group">
<label class="control-label" for="edit_date_start">开始日期</label>
<div class="controls">
<input type="text" id="edit_date_start" name="edit_date_start" placeholder="YYYY-MM-DD" value="<?php echo plugdate_get($view_res['post_name']); ?>">
<a href="#date_now_button" role="button" class="btn"><i class="icon-time"></i> 选择今天</a>
</div>
</div>
<div class="control-group">
<label class="control-label" for="edit_date_maturity">结束日期</label>
<div class="controls">
<input type="text" id="edit_date_maturity" name="edit_date_maturity" placeholder="YYYY-MM-DD" value="<?php echo plugdate_get($view_res['post_url']); ?>">
</div>
</div>
<div class="control-group">
<div class="controls">
<button type="submit" class="btn btn-primary"><i class="icon-ok icon-white"></i> 修改</button>
<a href="<?php echo $page_url.'&view='.$view_res['id']; ?>" role="button" class="btn"><i class="icon-remove"></i> 取消</a>
</div>
</form>
<?php } } ?>
<?php
if ($post_parent != 0 && isset($_GET['parent_view']) == true) {
$view_res = $oapost->view($_GET['parent_view']);
if ($view_res) {
$view_results_view = $oapost->view_list(null, null, null, 'private', 'performance', 1, 5, 0, false, $view_res['id']);
?>
<!-- 审批任务 -->
<h2>审批生产任务完成状况</h2>
<div id="parent" class="form-actions">
<p>
<?php
echo $view_res['post_title'];
if ((int) $view_res['post_url'] < (int) date('Ymd') && (int) $view_res['post_url'] > 0) {
echo ' - 已过期';
}
if ($view_res['post_status'] === 'public-finish') {
echo ' <span class="label label-success">审批合格</span>';
} else if ($view_res['post_status'] === 'public-ready') {
echo ' <span class="label label-info">等待审批</span>';
} else if ($view_res['post_status'] === 'public-trash') {
echo ' <span class="label label-inverse">放弃</span>';
} else if ($view_res['post_status'] === 'public-fail') {
echo ' <span class="label label-important">没有完成</span>';
} else {
echo ' <span class="label">正在进行中</span>';
}
?>
</p>
<p> </p>
<p>所属用户:
<?php
$view_user = $oauser->view_user($view_res['post_user']);
if($view_user){
echo $view_user['user_name'];
}
?>
</p>
<p> </p>
<p>个人说明:<?php echo $view_res['post_content']; ?></p>
<p> </p>
<form class="form-horizontal form-actions" action="<?php echo $page_url.'&parent='.$post_parent.'&parent_view='.$view_res['id']; ?>" method="post">
<div class="control-group">
<label class="control-label" for="set_results">给予业绩量</label>
<div class="controls">
<input type="text" class="input-small" id="set_results" name="set_results" placeholder="0" value="<?php if(isset($view_results_view[0]['post_url'])){ echo $view_results_view[0]['post_url']; } ?>">
<button type="submit" class="btn btn-primary"><i class="icon-signal icon-white"></i> 设定</button>
</div>
<div class="controls">
<p>负值可以减少该职员业绩量</p>
</div>
</div>
</form>
<div class="control-group">
<div class="controls">
<a href="<?php echo $page_url.'&parent='.$post_parent.'&parent_view='.$view_res['id']; ?>&edit_status=public-finish#parent" role="button" class="btn"><i class="icon-thumbs-up"></i> 批准完成</a>
<a href="<?php echo $page_url.'&parent='.$post_parent.'&parent_view='.$view_res['id']; ?>&edit_status=public-fail#parent" role="button" class="btn"><i class="icon-thumbs-down"></i> 设定为不合格</a>
<a href="init.php?init=1&user=<?php echo $view_res['post_user']; ?>#send" role="button" class="btn"><i class="icon-envelope"></i> 发送消息</a>
<a href="<?php echo $page_url; ?>" role="button" class="btn"><i class="icon-arrow-left"></i> 返回</a>
</div>
</div>
</div>
<?php } } ?>
<!-- Javascript -->
<script>
$(document).ready(function() {
var message = "<?php echo $message; ?>";
var message_bool = "<?php echo $message_bool ? '2' : '1'; ?>";
if (message != "") {
msg(message_bool, message, message);
}
/** 日历插件
$( "#add_date_start" ).datepicker({
altFormat:"yy-mm-dd",
defaultDate: "+1w",
changeMonth: true,
numberOfMonths: 3,
onClose: function( selectedDate ) {
$( "#add_date_maturity" ).datepicker( "option", "minDate", selectedDate );
}
});
$( "#add_date_maturity" ).datepicker({
altFormat:"yy-mm-dd",
defaultDate: "+1w",
changeMonth: true,
numberOfMonths: 3,
onClose: function( selectedDate ) {
$( "#add_date_start" ).datepicker( "option", "maxDate", selectedDate );
}
});
*/
//时间选择今天按钮
$("a[href='#date_now_button']").click(function(){
$(this).prev().attr("value","<?php echo date('Y-m-d'); ?>");
});
});
</script>