作者 shenhailong

主单号修改 分单查看 删除 预配分单号编辑

@@ -769,9 +769,9 @@ public class ManifestController extends BasicController { @@ -769,9 +769,9 @@ public class ManifestController extends BasicController {
769 */ 769 */
770 @RequestMapping(value = "/sub/grid.json", method = {RequestMethod.POST}) 770 @RequestMapping(value = "/sub/grid.json", method = {RequestMethod.POST})
771 @ResponseBody 771 @ResponseBody
772 - public DataGrid<PreparesecondaryEntity> gridSub(@RequestParam(value = "mawbId") String mawbId, HttpServletRequest request) { 772 + public DataGrid<PreparesecondaryEntity> gridSub(@RequestParam(value = "mawbId") Long mawbId, HttpServletRequest request) {
773 DataGrid<PreparesecondaryEntity> dg = new DataGrid<>(); 773 DataGrid<PreparesecondaryEntity> dg = new DataGrid<>();
774 - dg.setRows(preparesecondaryServer.findAwb(mawbId)); 774 + dg.setRows(preparesecondaryServer.findByMawbId(mawbId));
775 return dg; 775 return dg;
776 } 776 }
777 777
@@ -20,8 +20,8 @@ JpaSpecificationExecutor<PreparesecondaryEntity>{ @@ -20,8 +20,8 @@ JpaSpecificationExecutor<PreparesecondaryEntity>{
20 @Query(value = "SELECT * FROM PREPARESECONDARY WHERE PREPAREMASTERID = ?1 ORDER BY ID DESC", nativeQuery = true) 20 @Query(value = "SELECT * FROM PREPARESECONDARY WHERE PREPAREMASTERID = ?1 ORDER BY ID DESC", nativeQuery = true)
21 List<PreparesecondaryEntity> findByMawbId(Long id); 21 List<PreparesecondaryEntity> findByMawbId(Long id);
22 22
23 - @Query(value = "SELECT * FROM PREPARESECONDARY WHERE WAYBILLNOMASTER = ?1 ORDER BY ID DESC", nativeQuery = true)  
24 - List<PreparesecondaryEntity> findAwb(String awb); 23 +// @Query(value = "SELECT * FROM PREPARESECONDARY WHERE ID = ?1 ORDER BY ID DESC", nativeQuery = true)
  24 +// List<PreparesecondaryEntity> findAwb(String awb);
25 25
26 @Query(value = "SELECT * FROM PREPARESECONDARY WHERE WAYBILLNOSECONDARY = ?1", nativeQuery = true) 26 @Query(value = "SELECT * FROM PREPARESECONDARY WHERE WAYBILLNOSECONDARY = ?1", nativeQuery = true)
27 List<PreparesecondaryEntity> findByMawbNo(String mawbNo); 27 List<PreparesecondaryEntity> findByMawbNo(String mawbNo);
@@ -52,19 +52,19 @@ public class PreparesecondaryService extends BasicService<PreparesecondaryEntity @@ -52,19 +52,19 @@ public class PreparesecondaryService extends BasicService<PreparesecondaryEntity
52 52
53 return list; 53 return list;
54 } 54 }
55 - public List<PreparesecondaryEntity> findAwb(String id) {  
56 - List<PreparesecondaryEntity> list = preparesecondaryRepository.findAwb(id);  
57 - if(list!=null) {  
58 - for (int i = 0; i < list.size(); i++) {  
59 - PreparesecondaryEntity bean = list.get(i);  
60 - WaybillReceiptEntity re = receiptService.findSub(bean.getWaybillnomaster(), bean.getWaybillnosecondary());  
61 - bean.setResponse_code(re!=null?re.getResponse_code():"");  
62 - bean.setResponse_text(re!=null?re.getResponse_text():"");  
63 - }  
64 - }  
65 -  
66 - return list;  
67 - } 55 +// public List<PreparesecondaryEntity> findAwb(Long id) {
  56 +// List<PreparesecondaryEntity> list = preparesecondaryRepository.findAwb(id);
  57 +// if(list!=null) {
  58 +// for (int i = 0; i < list.size(); i++) {
  59 +// PreparesecondaryEntity bean = list.get(i);
  60 +// WaybillReceiptEntity re = receiptService.findSub(bean.getWaybillnomaster(), bean.getWaybillnosecondary());
  61 +// bean.setResponse_code(re!=null?re.getResponse_code():"");
  62 +// bean.setResponse_text(re!=null?re.getResponse_text():"");
  63 +// }
  64 +// }
  65 +//
  66 +// return list;
  67 +// }
68 68
69 69
70 public PreparesecondaryEntity findOne(Long mawbId) { 70 public PreparesecondaryEntity findOne(Long mawbId) {
@@ -147,9 +147,8 @@ @@ -147,9 +147,8 @@
147 return '<div id="ddv-' + index + '"style="padding:5px 0"></div>'; 147 return '<div id="ddv-' + index + '"style="padding:5px 0"></div>';
148 }, 148 },
149 onExpandRow: function(index,row){ 149 onExpandRow: function(index,row){
150 - console.log("expand row index:"+index);  
151 $('#ddv-'+index).datagrid({ 150 $('#ddv-'+index).datagrid({
152 - url:'<%=basePath %>manifest/sub/grid.json?mawbId='+row.waybillnomaster, 151 + url:'<%=basePath %>manifest/sub/grid.json?mawbId='+row.id,
153 fitColumns:true, 152 fitColumns:true,
154 singleSelect:true, 153 singleSelect:true,
155 loadMsg:'正在加载……', 154 loadMsg:'正在加载……',
@@ -312,6 +311,7 @@ @@ -312,6 +311,7 @@
312 } 311 }
313 312
314 function editHbillFormat(val,row,index){ 313 function editHbillFormat(val,row,index){
  314 + console.log(row);
315 var html='<a href="javascript:void(0)" style="text-decoration:none;margin-left:20px;color:blue;" onclick="editHbillRow('+row.id+')"><i class="iconfont">&#xe65a;</i></a>'; 315 var html='<a href="javascript:void(0)" style="text-decoration:none;margin-left:20px;color:blue;" onclick="editHbillRow('+row.id+')"><i class="iconfont">&#xe65a;</i></a>';
316 // html += '<a href="javascript:void(0)" style="text-decoration:none;margin-left:20px;color:red;" onclick="delHbillRow('+row.id+','+row.mawbId+','+index+')"><i class="iconfont">&#xe661;</i></a>'; 316 // html += '<a href="javascript:void(0)" style="text-decoration:none;margin-left:20px;color:red;" onclick="delHbillRow('+row.id+','+row.mawbId+','+index+')"><i class="iconfont">&#xe661;</i></a>';
317 return html; 317 return html;
@@ -279,7 +279,7 @@ @@ -279,7 +279,7 @@
279 onpropertychange="onInputChange(event,'shpaeo','onpropertychange')"></td> 279 onpropertychange="onInputChange(event,'shpaeo','onpropertychange')"></td>
280 </tr> 280 </tr>
281 <tr> 281 <tr>
282 - <td class="kv-label" colspan="6"><select id="co_cusid" required> 282 + <td class="kv-label" colspan="6"><select id="co_cusid">
283 <c:if test="${not empty pre.shpcusid}"> 283 <c:if test="${not empty pre.shpcusid}">
284 <c:set var="tempShpType" value='${fn:split(pre.shpcusid,"+")[0]}' /> 284 <c:set var="tempShpType" value='${fn:split(pre.shpcusid,"+")[0]}' />
285 <option value="${tempShpType}">${tempShpType}</option> 285 <option value="${tempShpType}">${tempShpType}</option>
@@ -152,8 +152,7 @@ @@ -152,8 +152,7 @@
152 var awbNo = row.waybillnomaster; 152 var awbNo = row.waybillnomaster;
153 console.log("expand row index:"+index); 153 console.log("expand row index:"+index);
154 $('#ddv-'+index).datagrid({ 154 $('#ddv-'+index).datagrid({
155 - url:'<%=basePath %>wbm/sub/grid.json?mawbId='+awbNo,  
156 -// contentType: 'application/json;charset=UTF-8', 155 + url:'<%=basePath %>wbm/sub/grid.json?mawbId='+row.id,
157 fitColumns:true, 156 fitColumns:true,
158 singleSelect:true, 157 singleSelect:true,
159 loadMsg:'正在加载……', 158 loadMsg:'正在加载……',