作者 shenhailong

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

... ... @@ -769,9 +769,9 @@ public class ManifestController extends BasicController {
*/
@RequestMapping(value = "/sub/grid.json", method = {RequestMethod.POST})
@ResponseBody
public DataGrid<PreparesecondaryEntity> gridSub(@RequestParam(value = "mawbId") String mawbId, HttpServletRequest request) {
public DataGrid<PreparesecondaryEntity> gridSub(@RequestParam(value = "mawbId") Long mawbId, HttpServletRequest request) {
DataGrid<PreparesecondaryEntity> dg = new DataGrid<>();
dg.setRows(preparesecondaryServer.findAwb(mawbId));
dg.setRows(preparesecondaryServer.findByMawbId(mawbId));
return dg;
}
... ...
... ... @@ -20,8 +20,8 @@ JpaSpecificationExecutor<PreparesecondaryEntity>{
@Query(value = "SELECT * FROM PREPARESECONDARY WHERE PREPAREMASTERID = ?1 ORDER BY ID DESC", nativeQuery = true)
List<PreparesecondaryEntity> findByMawbId(Long id);
@Query(value = "SELECT * FROM PREPARESECONDARY WHERE WAYBILLNOMASTER = ?1 ORDER BY ID DESC", nativeQuery = true)
List<PreparesecondaryEntity> findAwb(String awb);
// @Query(value = "SELECT * FROM PREPARESECONDARY WHERE ID = ?1 ORDER BY ID DESC", nativeQuery = true)
// List<PreparesecondaryEntity> findAwb(String awb);
@Query(value = "SELECT * FROM PREPARESECONDARY WHERE WAYBILLNOSECONDARY = ?1", nativeQuery = true)
List<PreparesecondaryEntity> findByMawbNo(String mawbNo);
... ...
... ... @@ -52,19 +52,19 @@ public class PreparesecondaryService extends BasicService<PreparesecondaryEntity
return list;
}
public List<PreparesecondaryEntity> findAwb(String id) {
List<PreparesecondaryEntity> list = preparesecondaryRepository.findAwb(id);
if(list!=null) {
for (int i = 0; i < list.size(); i++) {
PreparesecondaryEntity bean = list.get(i);
WaybillReceiptEntity re = receiptService.findSub(bean.getWaybillnomaster(), bean.getWaybillnosecondary());
bean.setResponse_code(re!=null?re.getResponse_code():"");
bean.setResponse_text(re!=null?re.getResponse_text():"");
}
}
return list;
}
// public List<PreparesecondaryEntity> findAwb(Long id) {
// List<PreparesecondaryEntity> list = preparesecondaryRepository.findAwb(id);
// if(list!=null) {
// for (int i = 0; i < list.size(); i++) {
// PreparesecondaryEntity bean = list.get(i);
// WaybillReceiptEntity re = receiptService.findSub(bean.getWaybillnomaster(), bean.getWaybillnosecondary());
// bean.setResponse_code(re!=null?re.getResponse_code():"");
// bean.setResponse_text(re!=null?re.getResponse_text():"");
// }
// }
//
// return list;
// }
public PreparesecondaryEntity findOne(Long mawbId) {
... ...
... ... @@ -147,9 +147,8 @@
return '<div id="ddv-' + index + '"style="padding:5px 0"></div>';
},
onExpandRow: function(index,row){
console.log("expand row index:"+index);
$('#ddv-'+index).datagrid({
url:'<%=basePath %>manifest/sub/grid.json?mawbId='+row.waybillnomaster,
url:'<%=basePath %>manifest/sub/grid.json?mawbId='+row.id,
fitColumns:true,
singleSelect:true,
loadMsg:'正在加载……',
... ... @@ -312,6 +311,7 @@
}
function editHbillFormat(val,row,index){
console.log(row);
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>';
// 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>';
return html;
... ...
... ... @@ -279,7 +279,7 @@
onpropertychange="onInputChange(event,'shpaeo','onpropertychange')"></td>
</tr>
<tr>
<td class="kv-label" colspan="6"><select id="co_cusid" required>
<td class="kv-label" colspan="6"><select id="co_cusid">
<c:if test="${not empty pre.shpcusid}">
<c:set var="tempShpType" value='${fn:split(pre.shpcusid,"+")[0]}' />
<option value="${tempShpType}">${tempShpType}</option>
... ...
... ... @@ -152,8 +152,7 @@
var awbNo = row.waybillnomaster;
console.log("expand row index:"+index);
$('#ddv-'+index).datagrid({
url:'<%=basePath %>wbm/sub/grid.json?mawbId='+awbNo,
// contentType: 'application/json;charset=UTF-8',
url:'<%=basePath %>wbm/sub/grid.json?mawbId='+row.id,
fitColumns:true,
singleSelect:true,
loadMsg:'正在加载……',
... ...