毛重、净重、长宽高等信息我们都没有填写,我们都应该添加。我们只能在修改中去添加它。
<update id="update" parameterType="cn.hpu.jk.domain.Export"> update export_c <set> <if test="inputDate != null"> INPUT_DATE=#{inputDate},</if> <if test="contractIds != null"> CONTRACT_IDS=#{contractIds},</if> <if test="customerContract != null"> CUSTOMER_CONTRACT=#{customerContract},</if> <if test="lcno != null"> LCNO=#{lcno},</if> <if test="consignee != null"> CONSIGNEE=#{consignee},</if> <if test="marks != null"> MARKS=#{marks},</if> <if test="remark != null"> REMARK=#{remark},</if> <if test="shipmentPort != null"> SHIPMENT_PORT=#{shipmentPort},</if> <if test="destinationPort != null"> DESTINATION_PORT=#{destinationPort},</if> <if test="transportMode != null"> TRANSPORT_MODE=#{transportMode},</if> <if test="priceCondition != null"> PRICE_CONDITION=#{priceCondition},</if> <if test="grossWeight != null"> GROSS_WEIGHT=#{grossWeight},</if> <if test="netWeight != null"> NET_WEIGHT=#{netWeight},</if> <if test="measurement != null"> MEASUREMENT=#{measurement},</if> </set> where export_id=#{id} </update>
//转向修改界面 @RequestMapping("/cargo/export/toupdate.action") public String toupdate(String id,Model model){ Export obj=exportService.get(id); model.addAttribute("obj", obj); return "/cargo/export/jExportUpdate.jsp"; } //进行修改 @RequestMapping("/cargo/export/update.action") public String update(Export export){ exportService.update(export); return "redirect:/cargo/export/list.action"; }
<ul> <li id="view"><a href="#" onclick="formSubmit('toview.action','_self');this.blur();">查看</a></li> <li id="update"><a href="#" onclick="formSubmit('toupdate.action','_self');this.blur();">修改</a></li> <li id="delete"><a href="#" onclick="formSubmit('delete.action','_self');this.blur();">删除</a></li> <li id="new"><a href="#" onclick="formSubmit('submit.action','_self');this.blur();">上报</a></li> <li id="new"><a href="#" onclick="formSubmit('cancel.action','_self');this.blur();">取消</a></li> </ul>
<%@ page language="java" pageEncoding="UTF-8"%> <%@ include file="../../base.jsp"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>修改出口报运信息</title> <script language="javascript" src="${ctx}/js/datepicker/WdatePicker.js"></script> </head> <body> <form method="post"> <div id="menubar"> <div id="middleMenubar"> <div id="innerMenubar"> <div id="navMenubar"> <ul> <li id="save"><a href="#" onclick="formSubmit('update.action','_self');">确定</a></li> <li id="back"><a href="list.action">返回</a></li> </ul> </div> </div> </div> </div> <div class="textbox" id="centerTextbox"> <div class="textbox-header"> <div class="textbox-inner-header"> <div class="textbox-title"> 修改出口报运信息 </div> </div> </div> <div> <div> <table class="commonTable" cellspacing="1"> <input type="hidden" name="id" value="${obj.id}"/> <tr> <td class="columnTitle_mustbe">合同或确认书号:</td> <td class="tableContent">${obj.customerContract }</td> <td class="columnTitle_mustbe">制单日期:</td> <td class="tableContent"> <input type="text" style="width: 90px" name="inputDate" class="Wdate" value="<fmt:formatDate value="${obj.inputDate }" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({el:this,isShowOthers:true,dateFmt:'yyyy-MM-dd'});"/> </td> </tr> <tr> <td class="columnTitle_mustbe">信用证号:</td> <td class="tableContent"><input type="text" name="lcon" value="${obj.lcon }"/></td> <td class="columnTitle_mustbe">收货人及地址:</td> <td class="tableContent"><input type="text" name="consignee" value="${obj.consignee}"/></td> </tr> <tr> <td class="columnTitle_mustbe">装运港:</td> <td class="tableContent"><input type="text" name="shipmentPort" value="${obj.shipmentPort}"/></td> <td class="columnTitle_mustbe">目的港:</td> <td class="tableContent"><input type="text" name="destinationPort" value="${obj.destinationPort}"/></td> </tr> <tr> <td class="columnTitle_mustbe">价格条件:</td> <td class="tableContent"> <input type="radio" name="priceCondition" value="2" <c:if test="${obj.priceCondition=='FOB'}"> checked="checked"</c:if>/>FOB <input type="radio" name="priceCondition" value="1" <c:if test="${obj.priceCondition=='CIF'}"> checked="checked"</c:if>/>CIF </td> <td class="columnTitle_mustbe">运输方式:</td> <td class="tableContent"> <input type="radio" name="transportMode" value="2" <c:if test="${obj.transportMode=='AIR'}"> checked="checked"</c:if>/>AIR <input type="radio" name="transportMode" value="1" <c:if test="${obj.transportMode=='SEA'}"> checked="checked"</c:if>/>SEA </td> </tr> <tr> <td class="columnTitle_mustbe">唛头:</td> <td class="tableContent"><textarea name="marks" style="height:200px;width: 400px">${obj.marks}</textarea></td> <td class="columnTitle_mustbe">备注:</td> <td class="tableContent"><textarea name="remark" style="height:200px;width: 400px">${obj.remark}</textarea></td> </tr> </table> </div> </div> </form> </body> </html>
如何添加批量修改脚本,请看下一篇总结:出口报运修改+报运货物批量展现-批量修改控件2
转载请注明出处:http://blog.csdn.net/acmman/article/details/49019401