FXXBL 2018-07-14 13:52 采纳率: 0%
浏览 827
已结题

Easyui 订单保存怎么设计

各位大侠,
有个问题想请大家帮忙,就是我用easyui做页面开发,设计了订单录入界面,有表单表头及订单明细,
就是我怎样设计这样页面,同时怎样将该页面的数据提交到controller,哪位好心的大侠能帮忙解答一下我该怎样设计并怎样进行数据的提交,最好有相应的代码,万分感谢!

1.下面是controller
@RequestMapping("/add")
@ResponseBody
public Json add(SaleList saleList) {
System.out.println("SaleList saleList---->");
Json j = new Json();
try {
saleListService.add(saleList);
j.setSuccess(true);
j.setMsg("添加成功!");
} catch (Exception e) {
j.setMsg(e.getMessage());
}
return j;
}

2.下面是页面
<body class="easyui-layout">
<div data-options="region:'north'" style="height: 135px;padding: 10px;border: 0px;padding-top: 20px">
    <fieldset style="border-color: #E7F0FF">
        <legend>单号:<span id="dh"></span></legend>
        <form id="fm" method="post">
            <table cellspacing="8px">
                <tr>
                    <td>
                    客&nbsp;户:
                    <select id="customerId" name="customerId"  class="easyui-combobox" style="width: 200px; height: 29px;" data-options="width:140,editable:false,panelHeight:'auto'">
                         <option value="">全部</option>
                         <c:forEach items="${customerList}" var="customer">
                             <option value="${customer.id}" >${customer.custName}</option>
                         </c:forEach>
                    </select>
                    </td>
                    <td>
                        &nbsp;&nbsp;&nbsp;&nbsp;应付金额:<input type="text" id="amountPayable" name="amountPayable" class="easyui-validatebox" required="true" readonly="readonly" size="10"/>
                    </td>
                    <td>
                        &nbsp;&nbsp;&nbsp;&nbsp;实付金额:<input type="text" id="amountPaid" name="amountPaid" class="easyui-validatebox" required="true"  size="10"/>
                    </td>
                    <td>
                        &nbsp;&nbsp;&nbsp;&nbsp;销售日期:<input type="text" id="saleDate" name="saleDate" class="easyui-datebox" required="true" data-options="editable:false" size="18"/>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td colspan="3">
                               备&nbsp;注:<input type="text" id="remarks" name="remarks"   size="78"/>
                    </td>
                    <td>
                        &nbsp;&nbsp;&nbsp;&nbsp;是否付款:<select class="easyui-combobox" id="state" name="state" style="width: 160px" editable=false panelHeight="auto">
                          <option value="1">已付</option>
                          <option value="2">未付</option>
                        </select>
                    </td>
                    <td>
                        <input type="hidden" id="saleNumber" name="saleNumber"/>
                        <input type="hidden" id="goodsJson" name="goodsJson"/>
                         &nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:saveSaleGoods()" class="easyui-linkbutton" iconCls="icon-ok" >保存</a>
                    </td>
                </tr>
            </table>
        </form>
    </fieldset>
</div>
<div data-options="region:'center'" style="padding: 10px;border: 1px">
    <table id="dg"  class="easyui-datagrid" style="height:1200px"
        fitColumns="true" rownumbers="true" singleSelect="true"
         fit="true" toolbar="#tb">
            <thead>
                <th field="code" width="30" align="center">商品编码</th>
                <th field="name" width="150" align="center">商品名称</th>
                <th field="model" width="50" align="center">商品型号</th>
                <th field="unitInfoId" hidden="true">单位ID</th>
                <th field="unitInfoName" width="50" align="center">单位</th>
                <th field="price" width="50" align="center">单价</th>
                <th field="num" width="50" align="center">数量</th>
                <th field="total" width="50" align="right">总金额</th>
            </thead>
        </table>

        <div id="tb">
            <div style="padding: 2px">
                <a href="javascript:openSaleListGoodsAddDialog()" class="easyui-linkbutton" iconCls="icon-add" plain="true">添加</a>
                <a href="javascript:openSaleListGoodsModifyDialog()" class="easyui-linkbutton" iconCls="icon-edit" plain="true">修改</a>
                <a href="javascript:deleteSaleListGoods()" class="easyui-linkbutton" iconCls="icon-remove" plain="true">删除</a>
            </div>
        </div>
</div>
</body>
  • 写回答

2条回答 默认 最新

报告相同问题?

悬赏问题

  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误