我正在开发一个结算应用程序(LAMP)。我可以拥有多个拥有多项服务的业务。我有一个显示我的业务的网格;当我点击一个企业时,它会显示该企业购买的服务。
我目前正在使用它的方式,计费人员在服务网格顶部的字段中输入服务,单击"创建服务"然后将服务保存到数据库。当计费人员想要编辑服务时,他们点击行末的编辑按钮,该服务的信息将重新填充到服务网格顶部的字段中,并且"创建服务&#34 ;按钮被更改为"更新服务"按钮。单击时,将在数据库中更新服务。
计费人员现在希望能够在线编辑这些服务,而不是让它重新填充输入字段。我做了一些谷歌搜索,发现jqGrid会为此工作。在使用jqGrid一段时间之后,我得出结论,毕竟我可能不能够用jqGrid做我想做的事情。以下是我的申请样本,并作出解释。
<html>
<head>
<title>Cleaning Services and Fees</title>
</head>
<body>
<div class="module" id="serviceModule">
<h2>Cleaning Services and Fees</h2>
<form name="serviceForm" id="serviceForm" method="POST" action="./eventHandler.php">
<table id="serviceTable" border="1">
<thead>
<tr>
<th nowrap>
<label for="serviceLocation"> Service Location </label><br>
<select id="serviceLocation" name="serviceLocation" onChange="frequencyHandler(this.value);">
<option selected disabled>Choose Service Location</option>
<option value="13">Large Building</option>
<option value="13">Medium Building</option>
<option value="13">Small Building</option>
<option value="4">Medical Facility</option>
<option value="11">Residential</option>
<option value="12">Other</option>
</select>
</th>
<th nowrap>
<label for="frequency"> Frequency </label><br>
<select id="frequency" name="frequency" onChange="feeUnitAmountHandler(this.value);">
<option selected disabled>← Choose Location First</option>
</select>
</th>
<th nowrap>
<label> Fee Unit Amount </label><br>
<input id="feeUnitAmount" name="feeUnitAmount" type="text" size="7" disabled value="">
</th>
<th nowrap>
<label for="amountCharged"> Amount Charged </label><br>
<input id="amountCharged" name="amountCharged" type="text" size="13" value="">
</th>
<th nowrap>
<label for="billingStartDate"> Billing Date </label><br>
<input id="billingStartDate" name="billingStartDate" type="text" maxlength="10" size="11" class="datepicker" value="">
</th>
<th nowrap>
<label for="invoiceDate"> Invoice Date </label><br>
<input id="invoiceDate" name="invoiceDate" type="text" maxlength="10" size="11" class="datepicker" value="">
</th>
<th nowrap>
<label for="invoiceNumber"> Invoice Number </label><br>
<input id="invoiceNumber" name="invoiceNumber" size="10" class="uppercase" type="text" value="">
</th>
<th nowrap>
<label for="paid"> Paid </label><br>
<input id="paid" name="paid" type="checkbox" value="">
</th>
<th>
Note
</th>
<th colspan="2" nowrap>
<input type="hidden" name="token" value="3fa8ff35afb1cfbe3406ad2196e72ba2" />
<input type="hidden" name="action" value="create" />
<input type="hidden" name="type" value="service" />
<button class="create" type="submit">Create Service</button>
</th>
<th> </th>
</tr>
</thead>
<tbody id="servicespace">
<tr id="serviceDataRow0" class="dataRow"><td class="text">Residential</td><td class="text">monthly</td><td class="numeric">$50.00</td><td class="numeric">$200.00</td><td>09/20/2013</td><td>11/06/2013</td><td>173784</td><td><span class="smallMark">✓</span></td><td class="noteEditor" id="noteEditor5517" title="Edit notes for service: Residential" onClick="openNotesEditingWindow('42','5517');"><img src="./images/note.gif" width="14" height="14" border="0" alt="Note" border="0" /></td><td><a href="./cf.php?action=edit&id=5517&type=service"><img src="./images/edit.gif" width="14" height="14" border="0" alt="Edit" title=" Edit Service: Residential" /></a></td><td><a href="./eventHandler.php?token=3fa8ff35afb1cfbe3406ad2196e72ba2&action=delete&id=5517&type=service"><img src="./images/delete.gif" width="14" height="14" border="0" alt="Delete" title="Delete Service: Residential" onClick="return confirmDelete();" /></a></td><td><input type="checkbox" id="5517" value="5517" title="Select this Service for copying." /></td></tr>
<tr id="serviceDataRow1" class="shadedDataRow"><td class="text">Residential</td><td class="text">monthly</td><td class="numeric">$50.00</td><td class="numeric">$200.00</td><td>09/20/2013</td><td>11/06/2013</td><td>173784</td><td><span class="smallMark">✓</span></td><td class="noteEditor" id="noteEditor5518" title="Edit notes for service: Residential" onClick="openNotesEditingWindow('42','5518');"><img src="./images/note.gif" width="14" height="14" border="0" alt="Note" border="0" /></td><td><a href="./cf.php?action=edit&id=5518&type=service"><img src="./images/edit.gif" width="14" height="14" border="0" alt="Edit" title=" Edit Service: Residential" /></a></td><td><a href="./eventHandler.php?token=3fa8ff35afb1cfbe3406ad2196e72ba2&action=delete&id=5518&type=service"><img src="./images/delete.gif" width="14" height="14" border="0" alt="Delete" title="Delete Service: Residential" onClick="return confirmDelete();" /></a></td><td><input type="checkbox" id="5518" value="5518" title="Select this Service for copying." /></td></tr>
<tr id="serviceDataRow2" class="dataRow"><td class="text">Medium Building</td><td class="text">weekly</td><td class="numeric">$500.00</td><td class="numeric">$500.00</td><td>09/30/2013</td><td>11/06/2013</td><td>173784</td><td><span class="smallMark">✓</span></td><td class="noteEditor" id="noteEditor5519" title="Edit notes for service: Medium Building" onClick="openNotesEditingWindow('42','5519');"><img src="./images/note.gif" width="14" height="14" border="0" alt="Note" border="0" /></td><td><a href="./cf.php?action=edit&id=5519&type=service"><img src="./images/edit.gif" width="14" height="14" border="0" alt="Edit" title=" Edit Service: Medium Building" /></a></td><td><a href="./eventHandler.php?token=3fa8ff35afb1cfbe3406ad2196e72ba2&action=delete&id=5519&type=service"><img src="./images/delete.gif" width="14" height="14" border="0" alt="Delete" title="Delete Service: Medium Building" onClick="return confirmDelete();" /></a></td><td><input type="checkbox" id="5519" value="5519" title="Select this Service for copying." /></td></tr>
</tbody>
<tfoot>
<tr>
<td colspan="3"> </td><td colspan="2" id="TotalAmountCharged">Total Charged: $950.00</td><td colspan="6"> </td><td nowrap><button type="button" class="filterButton" onClick="return ReplicateServices('3fa8ff35afb1cfbe3406ad2196e72ba2');" title="Copy selected Services to new Business"><img src="./images/copy.gif" width="14" height="14" alt="++" /> copy services</button></td>
</tr>
</tfoot>
</table> <!-- end service table -->
</form> <!-- end services form -->
<div id="numberOfServicesForThisTarget">3 Result(s)</div>
</div> <!-- end service module -->
</body>
</html>
当一个人选择服务时,我使用AJAX从数据库中获取频率(每日,每周,每月)并填充服务频率。当一个人选择频率时,将填充费用单位金额。所有这一切都适用于jqGrid,但每行中有两个函数我不知道是否可以用jqGrid完成。
第一个功能是从一个企业到另一个企业的一个到一个N服务的顶级复制功能(使计费人员更容易)。这可以通过单击服务行末尾的框,然后单击新业务旁边的类似框,然后单击&#34;复制服务&#34;按钮。在幕后,AJAX执行一个存储过程,将所有选定的服务复制到新业务。
第二个功能是&#34; Notes&#34;编辑功能。当用户单击Notes图标时,将打开一个新窗口,用于编辑注释,然后单击以保存。
所以,鉴于我的代码和对我需要完成的事情的解释,我想要实现的目标是什么?#34; doable&#34;通过jqGrid?具体来说,由于jqGrid没有使用标准的HTML表单,我不知道如何才能获得我的自定义&#34;按钮&#34; (例如,备注,复制服务)到jqGrid生成的表/表单中。