我正在创建一个 HTML 表格,它以两种不同的方式显示员工时间的分配。第一种方式,是一个ajax更新的队列,显示当前员工的行踪,完成。
第二种是用户可以输入过去“分配”的表格。现在,因为我的业务是 24/7,我决定将所有时间存储为 mysql 中的日期时间,所以我可以得到以下区别:
2013-04-11 21:59:29
和2013-04-12 01:52:29
这是正在填写的表格:
<form action="mafs.php" method="post" id="form1" name="form1" class="">
<table id="tbl_past_allocation">
<tr>
<td class="txt-right" style="font-size:11px;">Employee Name</td>
<td ><input placeholder=" John Doe" style="width:100px; border-radius:10px;" type="text" name="peename" id="peename" /></td>
</tr>
<tr>
<td class="txt-right" style="font-size:11px;">Home Department</td>
<td> <select style="width:140px; border-radius:10px;" name="phomedept">
<option value="select">Select Department</option></center>
<option value="ADC/NFC Shipping Department">ADC/NFC Shipping Department</option>
<option value="Administration">Administration</option>
<option value="Receiving Department">Receiving Department</option>
<option value="Cable">Cable Department</option>
<option value="Department">CPM Department</option>
<option value="Dispatch Clerk">Dispatch Clerk</option>
</select></td>
</tr>
<tr>
<td class="txt-right" style="font-size:11px;">Sent to Department</td>
<td> <select style="width:140px; border-radius:10px;" name="psentdept">
<option value="select">Select Department</option></center>
<option value="ADC/NFC Shipping Department">ADC/NFC Shipping Department</option>
<option value="Administration">Administration</option>
<option value="BP Receiving Department">BP Receiving Department</option>
<option value="Cable Department">Cable Department</option>
<option value="CPM Department">CPM Department</option>
<option value="Dispatch Clerk">Dispatch Clerk</option>
<option value="Inventory Control Department">Inventory Control Department</option>
<option value="IRM Shipping Department">IRM Shipping Department</option>
<option value="Kitting Department">Kitting Department</option>
<option value="Lead">Lead</option>
<option value="LSC Receiving Department">LSC Receiving Department</option>
<option value="LSC Shipping Department">LSC Shipping Department</option>
<option value="NAR E&O Department">NAR E & O Department</option>
<option value="Non-Conformance Department">Non-Conformance Department</option>
<option value="Performance Department">Performance Department</option>
<option value="Quality Auditors">Quality Auditors</option>
<option value="Quality Department">Quality Department</option>
<option value="Returns Department">Returns Department</option>
<option value="Software Department">Software Department</option>
<option value="Special Ops Team">Special Ops Team</option>
<option value="Supervisors">Supervisors</option>
<option value="Training/Meetings/Projects">Training/Meetings/Projects</option>
</select></td>
</tr>
<tr>
<td class="txt-right" style="font-size:11px;">Time Sent</td>
<td ><input placeholder=" mm-dd-yy hh:mm:ss" style="width:140px; border-radius:10px;" type="text" name="ptimesent" id="ptimesent" /></td>
</tr>
<tr>
<td class="txt-right" style="font-size:11px;">Time Returned</td>
<td ><input placeholder=" mm-dd-yy hh:mm:ss" style="width:140px; border-radius:10px;" type="text" name="ptimereturned" id="ptimereturn" /></td>
</tr>
</table>
<!--tbl_equipment_details closed-->
<div>
<input class="button" value="Submit Record" name="pastadd" type="submit" style="width:300px; cursor:pointer; margin-top:5px;">
</div>
</form>
我在这方面遇到了一些不同的问题。
首先,我很好奇哪种格式最适合存储这种类型的时间。
用户在表单中输入此信息最容易的是什么?4个单独的输入然后将它们连接在一起?或 2 只要求他们以指定的格式输入?