正在显示
7 个修改的文件
包含
106 行增加
和
12 行删除
@@ -864,8 +864,9 @@ public class ManifestController extends BasicController { | @@ -864,8 +864,9 @@ public class ManifestController extends BasicController { | ||
864 | } else { | 864 | } else { |
865 | String responseCode = manifest.getResponse_code(); | 865 | String responseCode = manifest.getResponse_code(); |
866 | int resCode = NumKit.parseString2Int(responseCode); | 866 | int resCode = NumKit.parseString2Int(responseCode); |
867 | - WaybillReceiptType oldType = WaybillReceiptType.valueOf(resCode); | ||
868 | - WaybillReceiptType type = oldType != null ? WaybillReceiptType.UPDATE : WaybillReceiptType.APPLY; | 867 | +// WaybillReceiptType oldType = WaybillReceiptType.valueOf(resCode); |
868 | +// WaybillReceiptType type = oldType != null ? WaybillReceiptType.UPDATE : WaybillReceiptType.APPLY; | ||
869 | + WaybillReceiptType type = WaybillReceiptType.APPLY; | ||
869 | 870 | ||
870 | String stowagedate = request.getParameter("stowagedate"); | 871 | String stowagedate = request.getParameter("stowagedate"); |
871 | manifest.setStowagedate(ManifestEntity.getStowagedate(stowagedate)); | 872 | manifest.setStowagedate(ManifestEntity.getStowagedate(stowagedate)); |
@@ -1070,8 +1071,10 @@ public class ManifestController extends BasicController { | @@ -1070,8 +1071,10 @@ public class ManifestController extends BasicController { | ||
1070 | } else { | 1071 | } else { |
1071 | String responseCode = preparesecondary.getResponse_code(); | 1072 | String responseCode = preparesecondary.getResponse_code(); |
1072 | int resCode = NumKit.parseString2Int(responseCode); | 1073 | int resCode = NumKit.parseString2Int(responseCode); |
1073 | - WaybillReceiptType oldType = WaybillReceiptType.valueOf(resCode); | ||
1074 | - WaybillReceiptType type = oldType != null ? WaybillReceiptType.UPDATE : WaybillReceiptType.APPLY; | 1074 | +// WaybillReceiptType oldType = WaybillReceiptType.valueOf(resCode); |
1075 | +// WaybillReceiptType type = oldType != null ? WaybillReceiptType.UPDATE : WaybillReceiptType.APPLY; | ||
1076 | + | ||
1077 | + WaybillReceiptType type = WaybillReceiptType.APPLY; | ||
1075 | 1078 | ||
1076 | String stowagedate = request.getParameter("stowagedate"); | 1079 | String stowagedate = request.getParameter("stowagedate"); |
1077 | preparesecondary.setStowagedate(preparesecondary.getStowagedate(stowagedate)); | 1080 | preparesecondary.setStowagedate(preparesecondary.getStowagedate(stowagedate)); |
@@ -55,6 +55,13 @@ public class ReceiptController { | @@ -55,6 +55,13 @@ public class ReceiptController { | ||
55 | public ResponseModel update(String waybillNo, String waybillNoSub, String sendTime, String response_code, | 55 | public ResponseModel update(String waybillNo, String waybillNoSub, String sendTime, String response_code, |
56 | String response_text, HttpServletRequest reuqest) { | 56 | String response_text, HttpServletRequest reuqest) { |
57 | ResponseModel res = new ResponseModel(); | 57 | ResponseModel res = new ResponseModel(); |
58 | + | ||
59 | + if (StringUtils.isBlank(response_code) || StringUtils.isBlank(response_text)) { | ||
60 | + res.setStatus(500); | ||
61 | + res.setMsg("回执为空"); | ||
62 | + return res; | ||
63 | + } | ||
64 | + | ||
58 | WaybillReceiprtEntity wre = null; | 65 | WaybillReceiprtEntity wre = null; |
59 | if (StringUtils.isNoneBlank(waybillNo) && StringUtils.isBlank(waybillNoSub)) { | 66 | if (StringUtils.isNoneBlank(waybillNo) && StringUtils.isBlank(waybillNoSub)) { |
60 | // 主单报文 | 67 | // 主单报文 |
@@ -72,7 +79,7 @@ public class ReceiptController { | @@ -72,7 +79,7 @@ public class ReceiptController { | ||
72 | wre.setMessage_type("MT2201"); | 79 | wre.setMessage_type("MT2201"); |
73 | wre.setResponse_code(response_code); | 80 | wre.setResponse_code(response_code); |
74 | wre.setResponse_text(response_text); | 81 | wre.setResponse_text(response_text); |
75 | - wre.setSendtime(sendTime!=null?sendTime:Constant.dateTimeFormat.format(new Date())); | 82 | + wre.setSendtime(sendTime != null ? sendTime : Constant.dateTimeFormat.format(new Date())); |
76 | wre.setWaybill_no(bean.getWaybillnomaster()); | 83 | wre.setWaybill_no(bean.getWaybillnomaster()); |
77 | wre.setCreator(Tools.getUserEntity()); | 84 | wre.setCreator(Tools.getUserEntity()); |
78 | wre.setModifier(Tools.getUserEntity()); | 85 | wre.setModifier(Tools.getUserEntity()); |
@@ -102,7 +109,7 @@ public class ReceiptController { | @@ -102,7 +109,7 @@ public class ReceiptController { | ||
102 | wre.setMessage_type("MT2201"); | 109 | wre.setMessage_type("MT2201"); |
103 | wre.setResponse_code(response_code); | 110 | wre.setResponse_code(response_code); |
104 | wre.setResponse_text(response_text); | 111 | wre.setResponse_text(response_text); |
105 | - wre.setSendtime(sendTime!=null?sendTime:Constant.dateTimeFormat.format(new Date())); | 112 | + wre.setSendtime(sendTime != null ? sendTime : Constant.dateTimeFormat.format(new Date())); |
106 | wre.setWaybill_no(bean.getWaybillnomaster()); | 113 | wre.setWaybill_no(bean.getWaybillnomaster()); |
107 | wre.setSub_waybill_no(bean.getWaybillnosecondary()); | 114 | wre.setSub_waybill_no(bean.getWaybillnosecondary()); |
108 | wre.setCreator(Tools.getUserEntity()); | 115 | wre.setCreator(Tools.getUserEntity()); |
@@ -374,6 +374,8 @@ handlebill.password=Password | @@ -374,6 +374,8 @@ handlebill.password=Password | ||
374 | track.no=Freight Waybill No | 374 | track.no=Freight Waybill No |
375 | 375 | ||
376 | ### | 376 | ### |
377 | +manifest.carrier.tip=Please enter two words, for example, CA | ||
378 | +manifest.carrier.flightno.tip=Please enter flightno, for example, 999 | ||
377 | manifest.enterprise.code=Enterprise Code | 379 | manifest.enterprise.code=Enterprise Code |
378 | manifest.enterprise.code.type=Select Code Type | 380 | manifest.enterprise.code.type=Select Code Type |
379 | manifest.list=Manifest List | 381 | manifest.list=Manifest List |
@@ -376,6 +376,8 @@ handlebill.password=\u8BBE\u7F6E\u63D0\u8D27\u5BC6\u7801 | @@ -376,6 +376,8 @@ handlebill.password=\u8BBE\u7F6E\u63D0\u8D27\u5BC6\u7801 | ||
376 | track.no=\u8D27\u8FD0\u5355\u53F7 | 376 | track.no=\u8D27\u8FD0\u5355\u53F7 |
377 | 377 | ||
378 | ### | 378 | ### |
379 | +manifest.carrier.tip=\u8BF7\u8F93\u5165\u822A\u53F8\u4E8C\u5B57\u7801,\u4F8B\u5982\uFF1ACA | ||
380 | +manifest.carrier.flightno.tip=\u8BF7\u8F93\u5165\u822A\u73ED\u53F7\uFF0C\u4F8B\u5982\uFF1A999 | ||
379 | manifest.enterprise.code=\u4F01\u4E1A\u4EE3\u7801 | 381 | manifest.enterprise.code=\u4F01\u4E1A\u4EE3\u7801 |
380 | manifest.enterprise.code.type=\u8BF7\u9009\u62E9\u4EE3\u7801\u7C7B\u578B | 382 | manifest.enterprise.code.type=\u8BF7\u9009\u62E9\u4EE3\u7801\u7C7B\u578B |
381 | manifest.list=\u9884\u914D\u8231\u5355\u5217\u8868 | 383 | manifest.list=\u9884\u914D\u8231\u5355\u5217\u8868 |
@@ -124,12 +124,14 @@ | @@ -124,12 +124,14 @@ | ||
124 | <td class="kv-label"><spring:message code="manifest.carrier" /><span | 124 | <td class="kv-label"><spring:message code="manifest.carrier" /><span |
125 | class="required_span">*</span></td> | 125 | class="required_span">*</span></td> |
126 | <td class="kv-content"><input required id="carrier_new" name="carrier" type="text" | 126 | <td class="kv-content"><input required id="carrier_new" name="carrier" type="text" |
127 | + placeholder="<spring:message code='manifest.carrier.tip'/>" | ||
127 | value="${manifest.carrier}" oninput="onInputChange(event,'carrier_new','oninput')" | 128 | value="${manifest.carrier}" oninput="onInputChange(event,'carrier_new','oninput')" |
128 | onpropertychange="onInputChange(event,'carrier_new','onpropertychange')"></td> | 129 | onpropertychange="onInputChange(event,'carrier_new','onpropertychange')"></td> |
129 | 130 | ||
130 | <td class="kv-label"><spring:message code="manifest.flight.number" /><span | 131 | <td class="kv-label"><spring:message code="manifest.flight.number" /><span |
131 | class="required_span">*</span></td> | 132 | class="required_span">*</span></td> |
132 | <td class="kv-content"><input required id="flightno" name="flightno" type="text" | 133 | <td class="kv-content"><input required id="flightno" name="flightno" type="text" |
134 | + placeholder="<spring:message code='manifest.carrier.flightno.tip'/>" | ||
133 | value="${manifest.flightno }" oninput="onInputChange(event,'flightno','oninput')" | 135 | value="${manifest.flightno }" oninput="onInputChange(event,'flightno','oninput')" |
134 | onpropertychange="onInputChange(event,'flightno','onpropertychange')"></td> | 136 | onpropertychange="onInputChange(event,'flightno','onpropertychange')"></td> |
135 | 137 | ||
@@ -537,6 +539,10 @@ | @@ -537,6 +539,10 @@ | ||
537 | onpropertychange="onInputChange(event,'unlodingcode','onpropertychange')"></td> | 539 | onpropertychange="onInputChange(event,'unlodingcode','onpropertychange')"></td> |
538 | </tr> | 540 | </tr> |
539 | <!-- 收货人信息 end --> | 541 | <!-- 收货人信息 end --> |
542 | + | ||
543 | + <tr style="display: none;"> | ||
544 | + <td> <input value="${manifest.cnecusid}"/> <input value="${manifest.shpcusid}"/> </td> | ||
545 | + </tr> | ||
540 | 546 | ||
541 | <!-- 危险品信息 start --> | 547 | <!-- 危险品信息 start --> |
542 | <tr> | 548 | <tr> |
@@ -40,7 +40,7 @@ | @@ -40,7 +40,7 @@ | ||
40 | <%-- <th field="totalpiece" width="50"><spring:message code="manifest.number.of.consignment.note"/></th>--%> | 40 | <%-- <th field="totalpiece" width="50"><spring:message code="manifest.number.of.consignment.note"/></th>--%> |
41 | <th field="preparetotalweight" width="20"><spring:message code="manifest.pre.weight"/></th> | 41 | <th field="preparetotalweight" width="20"><spring:message code="manifest.pre.weight"/></th> |
42 | <th field="preparetotalpiece" width="20"><spring:message code="manifest.number.of.fittings"/></th> | 42 | <th field="preparetotalpiece" width="20"><spring:message code="manifest.number.of.fittings"/></th> |
43 | - <th field="response_text" widht="260"><spring:message code="manifest.response_text" /></th> | 43 | + <th field="response_text" widht="260" formatter="checkResponseText"><spring:message code="manifest.response_text" /></th> |
44 | <th field=".." width="20" formatter="operatorFormat"><spring:message code="opt.operator" /></th> | 44 | <th field=".." width="20" formatter="operatorFormat"><spring:message code="opt.operator" /></th> |
45 | <%-- <th field="flightdate" width="130"><spring:message code="manifest.flight.date"/></th> --%> | 45 | <%-- <th field="flightdate" width="130"><spring:message code="manifest.flight.date"/></th> --%> |
46 | </tr> | 46 | </tr> |
@@ -68,6 +68,22 @@ | @@ -68,6 +68,22 @@ | ||
68 | <!--弹出层引入的JS--> | 68 | <!--弹出层引入的JS--> |
69 | <script type="text/javascript" src="<%=basePath %>resource/layer-v3.0.3/layer/layer.js"></script> | 69 | <script type="text/javascript" src="<%=basePath %>resource/layer-v3.0.3/layer/layer.js"></script> |
70 | <script type="text/javascript"> | 70 | <script type="text/javascript"> |
71 | + | ||
72 | + function checkResponseText(value, row, index) { | ||
73 | + var res = ''; | ||
74 | + if(value){ | ||
75 | + var start = value.indexOf("41301"); | ||
76 | + if(start>-1){ | ||
77 | + // 成功 | ||
78 | + res = '<span style="color:green;">'+value+'</span>'; | ||
79 | + }else{ | ||
80 | + // 未通过 | ||
81 | + res = '<span style="color:black;">'+value+'</span>'; | ||
82 | + } | ||
83 | + } | ||
84 | + | ||
85 | + return res; | ||
86 | + } | ||
71 | 87 | ||
72 | $(function(){ | 88 | $(function(){ |
73 | function getPageNumber(){ | 89 | function getPageNumber(){ |
@@ -121,7 +137,23 @@ | @@ -121,7 +137,23 @@ | ||
121 | {field:'totalweight',title:'<spring:message code="manifest.waybill.weight"/>',width:60}, */ | 137 | {field:'totalweight',title:'<spring:message code="manifest.waybill.weight"/>',width:60}, */ |
122 | {field:'prepareweight',title:'<spring:message code="manifest.pre.weight"/>',width:30}, | 138 | {field:'prepareweight',title:'<spring:message code="manifest.pre.weight"/>',width:30}, |
123 | {field:'preparepiece',title:'<spring:message code="manifest.number.of.fittings"/>',width:30}, | 139 | {field:'preparepiece',title:'<spring:message code="manifest.number.of.fittings"/>',width:30}, |
124 | - {field:'response_text',title:'<spring:message code="manifest.response_text"/>', width:160}, | 140 | + {field:'response_text',title:'<spring:message code="manifest.response_text"/>', width:160, |
141 | + formatter:function(value, row, index){ | ||
142 | + var res = ''; | ||
143 | + if(value){ | ||
144 | + var start = value.indexOf("41301"); | ||
145 | + if(start>-1){ | ||
146 | + // 成功 | ||
147 | + res = '<span style="color:green;">'+value+'</span>'; | ||
148 | + }else{ | ||
149 | + // 未通过 | ||
150 | + res = '<span style="color:black;">'+value+'</span>'; | ||
151 | + } | ||
152 | + } | ||
153 | + | ||
154 | + return res; | ||
155 | + } | ||
156 | + }, | ||
125 | {field:'..', title:'<spring:message code="opt.operator" />', formatter:preoperatorFormat, width:40} | 157 | {field:'..', title:'<spring:message code="opt.operator" />', formatter:preoperatorFormat, width:40} |
126 | ]], | 158 | ]], |
127 | onResize:function(){ | 159 | onResize:function(){ |
@@ -95,12 +95,14 @@ | @@ -95,12 +95,14 @@ | ||
95 | <td class="kv-label"><spring:message code="manifest.carrier" /><span | 95 | <td class="kv-label"><spring:message code="manifest.carrier" /><span |
96 | class="required_span">*</span></td> | 96 | class="required_span">*</span></td> |
97 | <td class="kv-content"><input required id="carrier_new" name="carrier" type="text" | 97 | <td class="kv-content"><input required id="carrier_new" name="carrier" type="text" |
98 | + placeholder="<spring:message code='manifest.carrier.tip'/>" | ||
98 | value="${manifest.carrier}" oninput="onInputChange(event,'carrier_new','oninput')" | 99 | value="${manifest.carrier}" oninput="onInputChange(event,'carrier_new','oninput')" |
99 | onpropertychange="onInputChange(event,'carrier_new','onpropertychange')"></td> | 100 | onpropertychange="onInputChange(event,'carrier_new','onpropertychange')"></td> |
100 | 101 | ||
101 | <td class="kv-label"><spring:message code="manifest.flight.number" /><span | 102 | <td class="kv-label"><spring:message code="manifest.flight.number" /><span |
102 | class="required_span">*</span></td> | 103 | class="required_span">*</span></td> |
103 | <td class="kv-content"><input required id="flightno" name="flightno" type="text" | 104 | <td class="kv-content"><input required id="flightno" name="flightno" type="text" |
105 | + placeholder="<spring:message code='manifest.carrier.flightno.tip'/>" | ||
104 | value="${pre.flightno }" oninput="onInputChange(event,'flightno','oninput')" | 106 | value="${pre.flightno }" oninput="onInputChange(event,'flightno','oninput')" |
105 | onpropertychange="onInputChange(event,'flightno','onpropertychange')"></td> | 107 | onpropertychange="onInputChange(event,'flightno','onpropertychange')"></td> |
106 | <td class="kv-label"><spring:message code="manifest.flight.date" /><span | 108 | <td class="kv-label"><spring:message code="manifest.flight.date" /><span |
@@ -168,8 +170,8 @@ | @@ -168,8 +170,8 @@ | ||
168 | <option value="CC" <c:if test = "${pre.paymode =='CC' }">selected="selected "</c:if>><spring:message | 170 | <option value="CC" <c:if test = "${pre.paymode =='CC' }">selected="selected "</c:if>><spring:message |
169 | code="manifest.to.pay" /></option> | 171 | code="manifest.to.pay" /></option> |
170 | </select></td> | 172 | </select></td> |
171 | - <td class="kv-label"><spring:message code="manifest.fitting.time" /></td> | ||
172 | - <td class="kv-content"><input type="text" class="date bill" id="stowagedate" | 173 | + <td style="display: none;" class="kv-label"><spring:message code="manifest.fitting.time" /></td> |
174 | + <td style="display: none;" class="kv-content"><input type="text" class="date bill" id="stowagedate" | ||
173 | autocomplete="off" name="stowagedate" | 175 | autocomplete="off" name="stowagedate" |
174 | onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" | 176 | onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" |
175 | value="<fmt:formatDate pattern='yyyy-MM-dd HH:mm:ss' value='${pre.stowagedate }'></fmt:formatDate>"> | 177 | value="<fmt:formatDate pattern='yyyy-MM-dd HH:mm:ss' value='${pre.stowagedate }'></fmt:formatDate>"> |
@@ -435,6 +437,10 @@ | @@ -435,6 +437,10 @@ | ||
435 | value="${pre.cneaeo }" oninput="onInputChange(event,'cneaeo','oninput')" | 437 | value="${pre.cneaeo }" oninput="onInputChange(event,'cneaeo','oninput')" |
436 | onpropertychange="onInputChange(event,'cneaeo','onpropertychange')"></td> | 438 | onpropertychange="onInputChange(event,'cneaeo','onpropertychange')"></td> |
437 | </tr> | 439 | </tr> |
440 | + | ||
441 | + <tr style="display: none;"> | ||
442 | + <td> <input value="${pre.cnecusid}"/> <input value="${pre.shpcusid}"/> </td> | ||
443 | + </tr> | ||
438 | <%-- <tr> | 444 | <%-- <tr> |
439 | <td class="kv-label"><spring:message code="manifest.province.code" /></td> | 445 | <td class="kv-label"><spring:message code="manifest.province.code" /></td> |
440 | <td class="kv-content"><input id="sh_provincecode" name="sh_provincecode" type="text" | 446 | <td class="kv-content"><input id="sh_provincecode" name="sh_provincecode" type="text" |
@@ -974,6 +980,26 @@ | @@ -974,6 +980,26 @@ | ||
974 | }); | 980 | }); |
975 | 981 | ||
976 | function onGetData(selectId,inputId) { | 982 | function onGetData(selectId,inputId) { |
983 | + var cneType = ""; | ||
984 | + var shpType = ""; | ||
985 | + if(selectId=="co_cusid"){ | ||
986 | + //发货的 | ||
987 | + var shp_cusid = "${pre.shpcusid}"; | ||
988 | + console.log("shp_cusid-->"+shp_cusid); | ||
989 | + if(notEmpty(shp_cusid)){ | ||
990 | + shpType = shp_cusid.split("+")[0]; | ||
991 | + } | ||
992 | + } | ||
993 | + | ||
994 | + if(selectId=="sh_cusid"){ | ||
995 | + //收货的 | ||
996 | + var cnecusid = "${pre.cnecusid}"; | ||
997 | + console.log("cnecusid-->"+cnecusid); | ||
998 | + if(notEmpty(cnecusid)){ | ||
999 | + cneType = cnecusid.split("+")[0]; | ||
1000 | + } | ||
1001 | + } | ||
1002 | + | ||
977 | var select = $("#"+selectId); | 1003 | var select = $("#"+selectId); |
978 | select.html(""); | 1004 | select.html(""); |
979 | select.append("<option value=''><spring:message code='manifest.enterprise.code.type' /></option>"); | 1005 | select.append("<option value=''><spring:message code='manifest.enterprise.code.type' /></option>"); |
@@ -985,10 +1011,26 @@ | @@ -985,10 +1011,26 @@ | ||
985 | success : function(data) { | 1011 | success : function(data) { |
986 | if (data.status == 200) { | 1012 | if (data.status == 200) { |
987 | if (data.data) { | 1013 | if (data.data) { |
1014 | + console.log("shpType-->"+shpType); | ||
1015 | + console.log("cneType-->"+cneType); | ||
1016 | + | ||
988 | for (var i = 0; i < data.data.length; i++) { | 1017 | for (var i = 0; i < data.data.length; i++) { |
989 | var type = data.data[i].enterprise_type; | 1018 | var type = data.data[i].enterprise_type; |
990 | - select.append("<option value='"+type+"'>" | ||
991 | - + type + "</option>"); | 1019 | + if(selectId=="co_cusid"){ |
1020 | + if(notEmpty(shpType)&&type&&(type==shpType)){ | ||
1021 | + select.append("<option selected value='"+type+"'>"+type+"</option>"); | ||
1022 | + }else{ | ||
1023 | + select.append("<option value='"+type+"'>"+type+"</option>"); | ||
1024 | + } | ||
1025 | + }else if(selectId=="sh_cusid"){ | ||
1026 | + if(notEmpty(cneType)&&type&&(type==cneType)){ | ||
1027 | + select.append("<option selected value='"+type+"'>"+type+"</option>"); | ||
1028 | + }else{ | ||
1029 | + select.append("<option value='"+type+"'>"+type+"</option>"); | ||
1030 | + } | ||
1031 | + }else{ | ||
1032 | + select.append("<option value='"+type+"'>"+type+"</option>"); | ||
1033 | + } | ||
992 | } | 1034 | } |
993 | } | 1035 | } |
994 | } | 1036 | } |
-
请 注册 或 登录 后发表评论