Php 我需要帮助来确定我是否可以用jqGrid做我想做的事情

Php 我需要帮助来确定我是否可以用jqGrid做我想做的事情,php,jquery,mysql,jqgrid,lamp,Php,Jquery,Mysql,Jqgrid,Lamp,我正在开发一个计费应用程序(LAMP)。我可以拥有多个拥有多种服务的企业。我有一个网格显示我的业务;单击某个业务时,它会显示该业务购买的服务 按照我目前的工作方式,计费人员在服务网格顶部的字段中输入服务,单击“创建服务”,然后将服务保存到数据库中。当计费人员想要编辑服务时,他们单击行末尾的编辑按钮,该服务的信息将重新填充到服务网格顶部的字段中,“创建服务”按钮更改为“更新服务”按钮。单击时,数据库中的服务将更新 计费人员现在希望能够在线编辑这些服务,而不是让它重新填充输入字段。我在谷歌上搜索了一

我正在开发一个计费应用程序(LAMP)。我可以拥有多个拥有多种服务的企业。我有一个网格显示我的业务;单击某个业务时,它会显示该业务购买的服务

按照我目前的工作方式,计费人员在服务网格顶部的字段中输入服务,单击“创建服务”,然后将服务保存到数据库中。当计费人员想要编辑服务时,他们单击行末尾的编辑按钮,该服务的信息将重新填充到服务网格顶部的字段中,“创建服务”按钮更改为“更新服务”按钮。单击时,数据库中的服务将更新

计费人员现在希望能够在线编辑这些服务,而不是让它重新填充输入字段。我在谷歌上搜索了一下,发现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>&#8592; 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>&nbsp;</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">&#10003;</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">&#10003;</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">&#10003;</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">&nbsp;</td><td colspan="2" id="TotalAmountCharged">Total Charged: $950.00</td><td colspan="6">&nbsp;</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>

清洁服务及费用
清洁服务及费用
服务位置
选择服务地点 大型建筑 中型建筑 小型建筑 医疗设施 住宅的 其他 频率
← 首先选择位置 费用单位金额
收费金额
计费日期
发票日期
发票编号
付费
注 创建服务 住户每月$50.00$200.0009/20/201311/06/2013173784和#10003; 住户每月$50.00$200.0009/20/201311/06/2013173784和#10003; 中等建筑每周$500.00$500.0009/30/201311/06/2013173784和#10003; 收费总额:950.00美元复印服务 3个结果
当一个人选择一项服务时,我使用AJAX从数据库中获取频率(每日、每周、每月),并填充服务的频率。当用户选择频率时,将填充费用单位金额。所有这些在jqGrid中都是可行的,但是每行中有两个函数,我不知道是否可以用jqGrid实现

第一个功能是能够将一个到N个服务从一个企业复制到另一个企业(使计费人员更容易)。这是通过单击服务行末尾的框,然后单击新业务旁边的类似框,然后单击“复制服务”按钮来实现的。在幕后,AJAX执行一个存储过程,将所有选定的服务复制到新业务

第二个功能是“注释”编辑功能。当用户单击注释图标时,将打开一个新窗口,用户可以在其中编辑注释,然后单击保存


那么,给出我的代码和我需要完成的解释,我想要通过jqGrid实现的是“可行的”吗?特别是,由于jqGrid不使用标准的HTML表单,我不确定如何将我的自定义“按钮”(例如,注释、复制服务)放入jqGrid生成的表/表单中。

您能否只使用旧的解决方案,并使用js在HTML中移动编辑表单,使其看起来是内联的,而不是在页面顶部?@user574632我想我可以做到,我没有想到。我不确定这会花费更长的时间,尝试重新设计我的旧方式,或者尝试找出jqGrid。谢谢你的建议。