作者 Kevin

1、过滤航班号和地址中的特殊字符;

2、兼容剪切板中带有空格的主单号;
3、修复分单中灰色提示区域的重量多为小数点以及出现科学计算数的bug;
4、修复舱单列表中信息显示不全的bug;
正在显示 29 个修改的文件 包含 2304 行增加765 行删除
@@ -36,9 +36,9 @@ public class ConsigneeController extends BasicController{ @@ -36,9 +36,9 @@ public class ConsigneeController extends BasicController{
36 // pageForm.parseData(consigneeService.getPage(pageForm)); 36 // pageForm.parseData(consigneeService.getPage(pageForm));
37 // return pageForm.getData(); 37 // return pageForm.getData();
38 38
39 - int page = NumKit.parseString2Int(request.getParameter("page")); 39 + int page = NumKit.parseInt(request.getParameter("page"));
40 page = page<1?1:page; 40 page = page<1?1:page;
41 - int rows = NumKit.parseString2Int(request.getParameter("rows")); 41 + int rows = NumKit.parseInt(request.getParameter("rows"));
42 rows = rows<1?10:rows; 42 rows = rows<1?10:rows;
43 43
44 List<ConsigneeEntity> list = consigneeService.list(page, rows); 44 List<ConsigneeEntity> list = consigneeService.list(page, rows);
@@ -162,7 +162,7 @@ public class ManifestController extends BasicController { @@ -162,7 +162,7 @@ public class ManifestController extends BasicController {
162 searchParams.put("EQ_USER_ID", Tools.getUserId()); 162 searchParams.put("EQ_USER_ID", Tools.getUserId());
163 } 163 }
164 pageForm.setSearchParams(searchParams); 164 pageForm.setSearchParams(searchParams);
165 - 165 +
166 pageForm.parseData(manifestService.getPage(pageForm)); 166 pageForm.parseData(manifestService.getPage(pageForm));
167 return pageForm.getData(); 167 return pageForm.getData();
168 } 168 }
@@ -439,7 +439,7 @@ public class ManifestController extends BasicController { @@ -439,7 +439,7 @@ public class ManifestController extends BasicController {
439 if (ue != null) { 439 if (ue != null) {
440 Long u = ue.getId(); 440 Long u = ue.getId();
441 Set<String> sk = pageForm.getSearchParams().keySet(); 441 Set<String> sk = pageForm.getSearchParams().keySet();
442 - 442 +
443 if (Tools.getUserId() != null && Tools.getUserId() != 1) { 443 if (Tools.getUserId() != null && Tools.getUserId() != 1) {
444 // 不是管理员,添加用户id的条件 444 // 不是管理员,添加用户id的条件
445 pageForm.getSearchParams().put("EQ_USER_ID", u); 445 pageForm.getSearchParams().put("EQ_USER_ID", u);
@@ -461,12 +461,12 @@ public class ManifestController extends BasicController { @@ -461,12 +461,12 @@ public class ManifestController extends BasicController {
461 @ResponseBody 461 @ResponseBody
462 public List<ManifestEntity> infor(String id, Model model) { 462 public List<ManifestEntity> infor(String id, Model model) {
463 List<ManifestEntity> li = null; 463 List<ManifestEntity> li = null;
464 - if(Tools.getUserId()!=null&&Tools.getUserId().longValue()==1) { 464 + if (Tools.getUserId() != null && Tools.getUserId().longValue() == 1) {
465 li = manifestService.queryAll(); 465 li = manifestService.queryAll();
466 - }else { 466 + } else {
467 li = manifestService.queryByUserId(Tools.getUserId()); 467 li = manifestService.queryByUserId(Tools.getUserId());
468 } 468 }
469 - 469 +
470 List<ManifestEntity> result = new FemyList(); 470 List<ManifestEntity> result = new FemyList();
471 for (ManifestEntity me : li) { 471 for (ManifestEntity me : li) {
472 if (result.contains(me)) { 472 if (result.contains(me)) {
@@ -506,7 +506,7 @@ public class ManifestController extends BasicController { @@ -506,7 +506,7 @@ public class ManifestController extends BasicController {
506 * @return 506 * @return
507 */ 507 */
508 @RequestMapping(value = "/edit") 508 @RequestMapping(value = "/edit")
509 - public String edit(Long id, Model model) { 509 + public String edit(HttpServletRequest request, Long id, Model model) {
510 ManifestEntity manifest = null; 510 ManifestEntity manifest = null;
511 // 判断是否是便捷 511 // 判断是否是便捷
512 if (id != null) { 512 if (id != null) {
@@ -521,7 +521,7 @@ public class ManifestController extends BasicController { @@ -521,7 +521,7 @@ public class ManifestController extends BasicController {
521 { 521 {
522 manifest = new ManifestEntity(); 522 manifest = new ManifestEntity();
523 manifest.setAgentcompany(agent.getNameCn()); 523 manifest.setAgentcompany(agent.getNameCn());
524 - manifest.setAgentman(null); // 设置代理人名称为null 524 + manifest.setAgentman(""); // 设置代理人名称为null
525 } 525 }
526 } 526 }
527 model.addAttribute("manifest", manifest); 527 model.addAttribute("manifest", manifest);
@@ -542,7 +542,7 @@ public class ManifestController extends BasicController { @@ -542,7 +542,7 @@ public class ManifestController extends BasicController {
542 // 包装种类 542 // 包装种类
543 List<PackageTypeEntity> typeList = packageTypeService.findAll(); 543 List<PackageTypeEntity> typeList = packageTypeService.findAll();
544 model.addAttribute("typeList", typeList); 544 model.addAttribute("typeList", typeList);
545 - 545 + request.setAttribute("version", System.currentTimeMillis());
546 // model.addAttribute("customsStatus",flag); 546 // model.addAttribute("customsStatus",flag);
547 return "manifest/edit"; 547 return "manifest/edit";
548 } 548 }
@@ -595,7 +595,7 @@ public class ManifestController extends BasicController { @@ -595,7 +595,7 @@ public class ManifestController extends BasicController {
595 * @return 595 * @return
596 */ 596 */
597 @RequestMapping(value = "/subedit", method = { RequestMethod.GET }) 597 @RequestMapping(value = "/subedit", method = { RequestMethod.GET })
598 - private String subedit(Long id, Long mawbId, String type, Model model) { 598 + private String subedit(HttpServletRequest request, Long id, Long mawbId, String type, Model model) {
599 ManifestEntity manifest = null; 599 ManifestEntity manifest = null;
600 List<PreparesecondaryEntity> preparesecondaryList = null; 600 List<PreparesecondaryEntity> preparesecondaryList = null;
601 PreparesecondaryEntity pre = null; 601 PreparesecondaryEntity pre = null;
@@ -603,6 +603,7 @@ public class ManifestController extends BasicController { @@ -603,6 +603,7 @@ public class ManifestController extends BasicController {
603 if (mawbId != null) { 603 if (mawbId != null) {
604 manifest = manifestService.findOne(mawbId); 604 manifest = manifestService.findOne(mawbId);
605 pre = preparesecondaryServer.findOne(mawbId); 605 pre = preparesecondaryServer.findOne(mawbId);
  606 +
606 preparesecondaryList = preparesecondaryServer.findAll(manifest.getId()); 607 preparesecondaryList = preparesecondaryServer.findAll(manifest.getId());
607 if (preparesecondaryList.isEmpty()) { 608 if (preparesecondaryList.isEmpty()) {
608 str = calculate(manifest); 609 str = calculate(manifest);
@@ -612,6 +613,7 @@ public class ManifestController extends BasicController { @@ -612,6 +613,7 @@ public class ManifestController extends BasicController {
612 } 613 }
613 if (id != null) { 614 if (id != null) {
614 pre = preparesecondaryServer.findOne(id); 615 pre = preparesecondaryServer.findOne(id);
  616 +
615 manifest = manifestService.findOne(pre.getPreparemasterid()); 617 manifest = manifestService.findOne(pre.getPreparemasterid());
616 preparesecondaryList = preparesecondaryServer.findAll(manifest.getId()); 618 preparesecondaryList = preparesecondaryServer.findAll(manifest.getId());
617 if (preparesecondaryList.isEmpty()) { 619 if (preparesecondaryList.isEmpty()) {
@@ -647,42 +649,62 @@ public class ManifestController extends BasicController { @@ -647,42 +649,62 @@ public class ManifestController extends BasicController {
647 model.addAttribute("is_strs", str); 649 model.addAttribute("is_strs", str);
648 model.addAttribute("id", mawbId); 650 model.addAttribute("id", mawbId);
649 model.addAttribute("manifest", manifest); 651 model.addAttribute("manifest", manifest);
  652 +
  653 + if (pre == null) {
  654 + pre = new PreparesecondaryEntity();
  655 + pre.setCarrier(manifest.getCarrier());
  656 + pre.setFlightdate(manifest.getFlightdate());
  657 + pre.setFlightno(manifest.getFlightno());
  658 + }
650 model.addAttribute("pre", pre); 659 model.addAttribute("pre", pre);
  660 + request.setAttribute("version", System.currentTimeMillis());
651 return "manifest/sub_edit"; 661 return "manifest/sub_edit";
652 } 662 }
653 663
654 // 计算 运单件数 运单重量 预配件数 预配重量 664 // 计算 运单件数 运单重量 预配件数 预配重量
655 private String calculates(ManifestEntity manifest, List<PreparesecondaryEntity> preparesecondaryList) { 665 private String calculates(ManifestEntity manifest, List<PreparesecondaryEntity> preparesecondaryList) {
  666 + if (manifest == null || preparesecondaryList == null || preparesecondaryList.isEmpty()) {
  667 + System.err.println("calculate() manifest or preparesecondaryList is null");
  668 + return "";
  669 + }
  670 +
656 int pp = 0; 671 int pp = 0;
657 - int tw = 0; 672 + float tw = 0;
658 int tp = 0; 673 int tp = 0;
659 - int pw = 0; 674 + float pw = 0;
660 675
661 for (PreparesecondaryEntity pre : preparesecondaryList) { 676 for (PreparesecondaryEntity pre : preparesecondaryList) {
662 - pp += Integer.parseInt(pre.getPreparepiece());  
663 - tw += Integer.parseInt(pre.getTotalweight());  
664 - tp += Integer.parseInt(pre.getTotalpiece());  
665 - pw += Integer.parseInt(pre.getPrepareweight()); 677 + pp += NumKit.parseInt(pre.getPreparepiece());
  678 + tw += NumKit.parseFloat(pre.getTotalweight());
  679 + tp += NumKit.parseInt(pre.getTotalpiece());
  680 + pw += NumKit.parseFloat(pre.getPrepareweight());
666 } 681 }
667 682
668 - int zpp = Integer.parseInt(manifest.getPreparetotalpiece()) - pp;  
669 - int ztw = Integer.parseInt(manifest.getTotalweight()) - tw;  
670 - int ztp = Integer.parseInt(manifest.getTotalpiece()) - tp;  
671 - int zpw = Integer.parseInt(manifest.getPreparetotalweight()) - pw; 683 + int zpp = NumKit.parseInt(manifest.getPreparetotalpiece()) - pp;
  684 + float ztw = NumKit.parseFloat(manifest.getTotalweight()) - tw;
  685 + ztw = ztw < 0 ? 0 : ztw;
  686 + int ztp = NumKit.parseInt(manifest.getTotalpiece()) - tp;
  687 + float zpw = NumKit.parseFloat(manifest.getPreparetotalweight()) - pw;
  688 + zpw = zpw < 0 ? 0 : zpw;
672 689
673 String str = "{"; 690 String str = "{";
674 str += "\"id\":\"" + manifest.getId() + "\","; 691 str += "\"id\":\"" + manifest.getId() + "\",";
675 str += "\"waybillnomaster\":\"" + manifest.getWaybillnomaster() + "\","; 692 str += "\"waybillnomaster\":\"" + manifest.getWaybillnomaster() + "\",";
676 str += "\"totalpiece\":\"" + ztp + "\","; 693 str += "\"totalpiece\":\"" + ztp + "\",";
677 - str += "\"totalweight\":\"" + ztw + "\","; 694 + str += "\"totalweight\":\"" + NumKit.formatNumber(String.valueOf(ztw), 2) + "\",";
678 str += "\"preparetotalpiece\":\"" + zpp + "\","; 695 str += "\"preparetotalpiece\":\"" + zpp + "\",";
679 - str += "\"preparetotalweight\":\"" + zpw + "\""; 696 + str += "\"preparetotalweight\":\"" + NumKit.formatNumber(String.valueOf(zpw), 2) + "\"";
680 str += "}"; 697 str += "}";
681 return str; 698 return str;
682 } 699 }
683 700
684 // 计算 运单件数 运单重量 预配件数 预配重量 701 // 计算 运单件数 运单重量 预配件数 预配重量
685 private String calculate(ManifestEntity manifest) { 702 private String calculate(ManifestEntity manifest) {
  703 + if (manifest == null) {
  704 + System.err.println("calculate() manifest is null");
  705 + return "";
  706 + }
  707 +
686 String str = "{"; 708 String str = "{";
687 str += "\"id\":\"" + manifest.getId() + "\","; 709 str += "\"id\":\"" + manifest.getId() + "\",";
688 str += "\"waybillnomaster\":\"" + manifest.getWaybillnomaster() + "\","; 710 str += "\"waybillnomaster\":\"" + manifest.getWaybillnomaster() + "\",";
@@ -766,6 +788,15 @@ public class ManifestController extends BasicController { @@ -766,6 +788,15 @@ public class ManifestController extends BasicController {
766 @RequestMapping(value = "/save", method = { RequestMethod.POST }) 788 @RequestMapping(value = "/save", method = { RequestMethod.POST })
767 @ResponseBody 789 @ResponseBody
768 public ResponseModel save(ManifestEntity manifest, HttpServletRequest reuqest) { 790 public ResponseModel save(ManifestEntity manifest, HttpServletRequest reuqest) {
  791 + String flightno = manifest.getFlightno();
  792 + String carrier = "";
  793 + if (StringUtils.isNotBlank(flightno) && flightno.length() > 2) {
  794 + carrier = flightno.substring(0, 2);
  795 + flightno = flightno.replace(carrier, "");
  796 + }
  797 + manifest.setCarrier(carrier);
  798 + manifest.setFlightno(flightno);
  799 +
769 consignorService.saveFromManifest(manifest, Tools.getUserId()); 800 consignorService.saveFromManifest(manifest, Tools.getUserId());
770 801
771 ResponseModel model = new ResponseModel(); 802 ResponseModel model = new ResponseModel();
@@ -786,6 +817,8 @@ public class ManifestController extends BasicController { @@ -786,6 +817,8 @@ public class ManifestController extends BasicController {
786 model.setData(manifest); 817 model.setData(manifest);
787 model.setStatus(200); 818 model.setStatus(200);
788 model.setMsg(HttpJsonMsg.SUCCESS); 819 model.setMsg(HttpJsonMsg.SUCCESS);
  820 +
  821 + receiptService.saveFromManifest(manifest, WaybillReceiptType.TEMP_SAVE);
789 } 822 }
790 } catch (Exception e) { 823 } catch (Exception e) {
791 model.setStatus(500); 824 model.setStatus(500);
@@ -853,6 +886,15 @@ public class ManifestController extends BasicController { @@ -853,6 +886,15 @@ public class ManifestController extends BasicController {
853 @RequestMapping(value = "/savesend", method = { RequestMethod.POST }) 886 @RequestMapping(value = "/savesend", method = { RequestMethod.POST })
854 @ResponseBody 887 @ResponseBody
855 public ResponseModel savesend(ManifestEntity manifest, HttpServletRequest request, HttpServletResponse response) { 888 public ResponseModel savesend(ManifestEntity manifest, HttpServletRequest request, HttpServletResponse response) {
  889 + String flightno = manifest.getFlightno();
  890 + String carrier = "";
  891 + if (StringUtils.isNotBlank(flightno) && flightno.length() > 2) {
  892 + carrier = flightno.substring(0, 2);
  893 + flightno = flightno.replace(carrier, "");
  894 + }
  895 + manifest.setCarrier(carrier);
  896 + manifest.setFlightno(flightno);
  897 +
856 consignorService.saveFromManifest(manifest, Tools.getUserId()); 898 consignorService.saveFromManifest(manifest, Tools.getUserId());
857 899
858 ResponseModel model = new ResponseModel(); 900 ResponseModel model = new ResponseModel();
@@ -863,9 +905,10 @@ public class ManifestController extends BasicController { @@ -863,9 +905,10 @@ public class ManifestController extends BasicController {
863 model.setMsg("该订单号已存在!"); 905 model.setMsg("该订单号已存在!");
864 } else { 906 } else {
865 String responseCode = manifest.getResponse_code(); 907 String responseCode = manifest.getResponse_code();
866 - int resCode = NumKit.parseString2Int(responseCode);  
867 -// WaybillReceiptType oldType = WaybillReceiptType.valueOf(resCode);  
868 -// WaybillReceiptType type = oldType != null ? WaybillReceiptType.UPDATE : WaybillReceiptType.APPLY; 908 + int resCode = NumKit.parseInt(responseCode);
  909 + // WaybillReceiptType oldType = WaybillReceiptType.valueOf(resCode);
  910 + // WaybillReceiptType type = oldType != null ? WaybillReceiptType.UPDATE :
  911 + // WaybillReceiptType.APPLY;
869 WaybillReceiptType type = WaybillReceiptType.APPLY; 912 WaybillReceiptType type = WaybillReceiptType.APPLY;
870 913
871 String stowagedate = request.getParameter("stowagedate"); 914 String stowagedate = request.getParameter("stowagedate");
@@ -891,15 +934,15 @@ public class ManifestController extends BasicController { @@ -891,15 +934,15 @@ public class ManifestController extends BasicController {
891 934
892 RemoteFileKit.putFile(ndlrPath); 935 RemoteFileKit.putFile(ndlrPath);
893 RemoteFileKit.putFile(dlcPath); 936 RemoteFileKit.putFile(dlcPath);
894 - RemoteFileKit.putFile(sliPath); 937 + // RemoteFileKit.putFile(sliPath);
895 938
896 - // System.err.println("===================ndlrxml===================");  
897 - // System.err.println(ndlrxml);  
898 - // System.err.println();  
899 - //  
900 - // System.err.println("===================dlcfxml===================");  
901 - // System.err.println(dlcfxml);  
902 - // System.err.println(); 939 + System.err.println("===================ndlrxml===================");
  940 + System.err.println(ndlrxml);
  941 + System.err.println();
  942 +
  943 + System.err.println("===================dlcfxml===================");
  944 + System.err.println(dlcfxml);
  945 + System.err.println();
903 946
904 System.err.println("===================slifxml==================="); 947 System.err.println("===================slifxml===================");
905 System.err.println(slifxml); 948 System.err.println(slifxml);
@@ -993,6 +1036,15 @@ public class ManifestController extends BasicController { @@ -993,6 +1036,15 @@ public class ManifestController extends BasicController {
993 @RequestMapping(value = "/sub_save", method = { RequestMethod.POST }) 1036 @RequestMapping(value = "/sub_save", method = { RequestMethod.POST })
994 @ResponseBody 1037 @ResponseBody
995 public ResponseModel sub_save(PreparesecondaryEntity preparesecondary) { 1038 public ResponseModel sub_save(PreparesecondaryEntity preparesecondary) {
  1039 + String flightno = preparesecondary.getFlightno();
  1040 + String carrier = "";
  1041 + if (StringUtils.isNotBlank(flightno) && flightno.length() > 2) {
  1042 + carrier = flightno.substring(0, 2);
  1043 + flightno = flightno.replace(carrier, "");
  1044 + }
  1045 + preparesecondary.setCarrier(carrier);
  1046 + preparesecondary.setFlightno(flightno);
  1047 +
996 consignorService.saveFromPreparesecondary(preparesecondary, Tools.getUserId()); 1048 consignorService.saveFromPreparesecondary(preparesecondary, Tools.getUserId());
997 1049
998 ResponseModel model = new ResponseModel(); 1050 ResponseModel model = new ResponseModel();
@@ -1007,6 +1059,8 @@ public class ManifestController extends BasicController { @@ -1007,6 +1059,8 @@ public class ManifestController extends BasicController {
1007 model.setData(preparesecondary); 1059 model.setData(preparesecondary);
1008 model.setStatus(200); 1060 model.setStatus(200);
1009 model.setMsg(HttpJsonMsg.SUCCESS); 1061 model.setMsg(HttpJsonMsg.SUCCESS);
  1062 +
  1063 + receiptService.saveFromPreparesecondary(preparesecondary, WaybillReceiptType.TEMP_SAVE);
1010 } 1064 }
1011 } catch (Exception e) { 1065 } catch (Exception e) {
1012 model.setStatus(500); 1066 model.setStatus(500);
@@ -1061,6 +1115,15 @@ public class ManifestController extends BasicController { @@ -1061,6 +1115,15 @@ public class ManifestController extends BasicController {
1061 @RequestMapping(value = "/presavesend", method = { RequestMethod.POST }) 1115 @RequestMapping(value = "/presavesend", method = { RequestMethod.POST })
1062 @ResponseBody 1116 @ResponseBody
1063 public ResponseModel presavesend(PreparesecondaryEntity preparesecondary, HttpServletRequest request) { 1117 public ResponseModel presavesend(PreparesecondaryEntity preparesecondary, HttpServletRequest request) {
  1118 + String flightno = preparesecondary.getFlightno();
  1119 + String carrier = "";
  1120 + if (StringUtils.isNotBlank(flightno) && flightno.length() > 2) {
  1121 + carrier = flightno.substring(0, 2);
  1122 + flightno = flightno.replace(carrier, "");
  1123 + }
  1124 + preparesecondary.setCarrier(carrier);
  1125 + preparesecondary.setFlightno(flightno);
  1126 +
1064 consignorService.saveFromPreparesecondary(preparesecondary, Tools.getUserId()); 1127 consignorService.saveFromPreparesecondary(preparesecondary, Tools.getUserId());
1065 1128
1066 ResponseModel model = new ResponseModel(); 1129 ResponseModel model = new ResponseModel();
@@ -1070,10 +1133,11 @@ public class ManifestController extends BasicController { @@ -1070,10 +1133,11 @@ public class ManifestController extends BasicController {
1070 model.setMsg("该订单号已存在!"); 1133 model.setMsg("该订单号已存在!");
1071 } else { 1134 } else {
1072 String responseCode = preparesecondary.getResponse_code(); 1135 String responseCode = preparesecondary.getResponse_code();
1073 - int resCode = NumKit.parseString2Int(responseCode);  
1074 -// WaybillReceiptType oldType = WaybillReceiptType.valueOf(resCode);  
1075 -// WaybillReceiptType type = oldType != null ? WaybillReceiptType.UPDATE : WaybillReceiptType.APPLY;  
1076 - 1136 + int resCode = NumKit.parseInt(responseCode);
  1137 + // WaybillReceiptType oldType = WaybillReceiptType.valueOf(resCode);
  1138 + // WaybillReceiptType type = oldType != null ? WaybillReceiptType.UPDATE :
  1139 + // WaybillReceiptType.APPLY;
  1140 +
1077 WaybillReceiptType type = WaybillReceiptType.APPLY; 1141 WaybillReceiptType type = WaybillReceiptType.APPLY;
1078 1142
1079 String stowagedate = request.getParameter("stowagedate"); 1143 String stowagedate = request.getParameter("stowagedate");
@@ -1097,7 +1161,7 @@ public class ManifestController extends BasicController { @@ -1097,7 +1161,7 @@ public class ManifestController extends BasicController {
1097 1161
1098 RemoteFileKit.putFile(ndlrPath); 1162 RemoteFileKit.putFile(ndlrPath);
1099 RemoteFileKit.putFile(dlcPath); 1163 RemoteFileKit.putFile(dlcPath);
1100 - RemoteFileKit.putFile(fhlPath); 1164 + // RemoteFileKit.putFile(fhlPath);
1101 1165
1102 // 发送redis储存数据 1166 // 发送redis储存数据
1103 new RedisSaveMessage().saveMessage(ndlrxml); 1167 new RedisSaveMessage().saveMessage(ndlrxml);
@@ -7,8 +7,6 @@ import javax.annotation.Resource; @@ -7,8 +7,6 @@ import javax.annotation.Resource;
7 import javax.servlet.http.HttpServletRequest; 7 import javax.servlet.http.HttpServletRequest;
8 8
9 import org.apache.commons.lang3.StringUtils; 9 import org.apache.commons.lang3.StringUtils;
10 -import org.slf4j.Logger;  
11 -import org.slf4j.LoggerFactory;  
12 import org.springframework.stereotype.Controller; 10 import org.springframework.stereotype.Controller;
13 import org.springframework.web.bind.annotation.RequestMapping; 11 import org.springframework.web.bind.annotation.RequestMapping;
14 import org.springframework.web.bind.annotation.RequestMethod; 12 import org.springframework.web.bind.annotation.RequestMethod;
@@ -17,7 +15,7 @@ import org.springframework.web.bind.annotation.ResponseBody; @@ -17,7 +15,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
17 import com.agent.entity.Constant; 15 import com.agent.entity.Constant;
18 import com.agent.entity.agent.ManifestEntity; 16 import com.agent.entity.agent.ManifestEntity;
19 import com.agent.entity.agent.PreparesecondaryEntity; 17 import com.agent.entity.agent.PreparesecondaryEntity;
20 -import com.agent.entity.agent.WaybillReceiprtEntity; 18 +import com.agent.entity.agent.WaybillReceiptEntity;
21 import com.agent.service.agent.ManifestService; 19 import com.agent.service.agent.ManifestService;
22 import com.agent.service.agent.PreparesecondaryService; 20 import com.agent.service.agent.PreparesecondaryService;
23 import com.agent.service.agent.WaybillReceiptService; 21 import com.agent.service.agent.WaybillReceiptService;
@@ -39,7 +37,6 @@ import tools.Tools; @@ -39,7 +37,6 @@ import tools.Tools;
39 @RequestMapping(value = "/receipt") 37 @RequestMapping(value = "/receipt")
40 38
41 public class ReceiptController { 39 public class ReceiptController {
42 - private static final Logger logger = LoggerFactory.getLogger(ReceiptController.class);  
43 40
44 @Resource 41 @Resource
45 private ManifestService manifestService; 42 private ManifestService manifestService;
@@ -52,17 +49,17 @@ public class ReceiptController { @@ -52,17 +49,17 @@ public class ReceiptController {
52 49
53 @ResponseBody 50 @ResponseBody
54 @RequestMapping(value = "/a0608c4054662dd902e1314f7e450e3eaa81c114", method = { RequestMethod.GET }) 51 @RequestMapping(value = "/a0608c4054662dd902e1314f7e450e3eaa81c114", method = { RequestMethod.GET })
55 - public ResponseModel update(String waybillNo, String waybillNoSub, String sendTime, String response_code,  
56 - String response_text, HttpServletRequest reuqest) { 52 + public ResponseModel update(String message_type, String waybillNo, String waybillNoSub, String sendTime,
  53 + String response_code, String response_text, HttpServletRequest reuqest) {
57 ResponseModel res = new ResponseModel(); 54 ResponseModel res = new ResponseModel();
58 - 55 +
59 if (StringUtils.isBlank(response_code) || StringUtils.isBlank(response_text)) { 56 if (StringUtils.isBlank(response_code) || StringUtils.isBlank(response_text)) {
60 res.setStatus(500); 57 res.setStatus(500);
61 - res.setMsg("回执为空"); 58 + res.setMsg("回执不能为空");
62 return res; 59 return res;
63 } 60 }
64 -  
65 - WaybillReceiprtEntity wre = null; 61 +
  62 + WaybillReceiptEntity wre = null;
66 if (StringUtils.isNoneBlank(waybillNo) && StringUtils.isBlank(waybillNoSub)) { 63 if (StringUtils.isNoneBlank(waybillNo) && StringUtils.isBlank(waybillNoSub)) {
67 // 主单报文 64 // 主单报文
68 List<ManifestEntity> list = manifestService.findByManifestNo(waybillNo); 65 List<ManifestEntity> list = manifestService.findByManifestNo(waybillNo);
@@ -72,11 +69,11 @@ public class ReceiptController { @@ -72,11 +69,11 @@ public class ReceiptController {
72 bean.setResponse_text(response_text); 69 bean.setResponse_text(response_text);
73 manifestService.save(bean); 70 manifestService.save(bean);
74 71
75 - wre = new WaybillReceiprtEntity(); 72 + wre = new WaybillReceiptEntity();
76 wre.setCarrier(bean.getCarrier()); 73 wre.setCarrier(bean.getCarrier());
77 wre.setFlightdate(bean.getFlightdate()); 74 wre.setFlightdate(bean.getFlightdate());
78 wre.setFlightno(bean.getFlightno()); 75 wre.setFlightno(bean.getFlightno());
79 - wre.setMessage_type("MT2201"); 76 + wre.setMessage_type(message_type);
80 wre.setResponse_code(response_code); 77 wre.setResponse_code(response_code);
81 wre.setResponse_text(response_text); 78 wre.setResponse_text(response_text);
82 wre.setSendtime(sendTime != null ? sendTime : Constant.dateTimeFormat.format(new Date())); 79 wre.setSendtime(sendTime != null ? sendTime : Constant.dateTimeFormat.format(new Date()));
@@ -102,11 +99,11 @@ public class ReceiptController { @@ -102,11 +99,11 @@ public class ReceiptController {
102 bean.setResponse_text(response_text); 99 bean.setResponse_text(response_text);
103 preparesecondaryService.save(bean); 100 preparesecondaryService.save(bean);
104 101
105 - wre = new WaybillReceiprtEntity(); 102 + wre = new WaybillReceiptEntity();
106 wre.setCarrier(bean.getCarrier()); 103 wre.setCarrier(bean.getCarrier());
107 wre.setFlightdate(bean.getFlightdate()); 104 wre.setFlightdate(bean.getFlightdate());
108 wre.setFlightno(bean.getFlightno()); 105 wre.setFlightno(bean.getFlightno());
109 - wre.setMessage_type("MT2201"); 106 + wre.setMessage_type(message_type);
110 wre.setResponse_code(response_code); 107 wre.setResponse_code(response_code);
111 wre.setResponse_text(response_text); 108 wre.setResponse_text(response_text);
112 wre.setSendtime(sendTime != null ? sendTime : Constant.dateTimeFormat.format(new Date())); 109 wre.setSendtime(sendTime != null ? sendTime : Constant.dateTimeFormat.format(new Date()));
@@ -133,4 +130,28 @@ public class ReceiptController { @@ -133,4 +130,28 @@ public class ReceiptController {
133 130
134 return res; 131 return res;
135 } 132 }
  133 +
  134 + /**
  135 + *
  136 + * @param no
  137 + * 主单或者分单号
  138 + * @param isMain
  139 + * 是否为主单
  140 + * @return
  141 + */
  142 + @RequestMapping(value = "/seeReceipt")
  143 + public String seeReceipt(HttpServletRequest request, String no, boolean isMain) {
  144 + List<WaybillReceiptEntity> dataList = null;
  145 + if (isMain) {
  146 + // 查询主单回执
  147 + dataList = receiptService.findMainList(no);
  148 + } else {
  149 + // 查询分单回执
  150 + dataList = receiptService.findSubList(no);
  151 + }
  152 +
  153 + request.setAttribute("dataList", dataList);
  154 + return "receipt/list_window";
  155 + }
  156 +
136 } 157 }
1 package com.agent.controller.agent; 1 package com.agent.controller.agent;
2 2
  3 +import java.io.IOException;
  4 +import java.text.ParseException;
  5 +import java.util.Date;
  6 +import java.util.List;
  7 +import java.util.Map;
  8 +
  9 +import javax.annotation.Resource;
  10 +import javax.servlet.http.HttpServletRequest;
  11 +import javax.servlet.http.HttpServletResponse;
  12 +
  13 +import org.apache.commons.collections.CollectionUtils;
  14 +import org.slf4j.Logger;
  15 +import org.slf4j.LoggerFactory;
  16 +import org.springframework.stereotype.Controller;
  17 +import org.springframework.ui.Model;
  18 +import org.springframework.web.bind.annotation.RequestMapping;
  19 +import org.springframework.web.bind.annotation.RequestMethod;
  20 +import org.springframework.web.bind.annotation.ResponseBody;
  21 +
3 import com.agent.controller.BasicController; 22 import com.agent.controller.BasicController;
4 import com.agent.entity.Constant; 23 import com.agent.entity.Constant;
5 -import com.agent.entity.agent.*;  
6 -import com.agent.service.agent.ShuntBillService; 24 +import com.agent.entity.agent.PackageTypeEntity;
  25 +import com.agent.entity.agent.ShuntBillEntity;
  26 +import com.agent.entity.agent.ShuntEntity;
7 import com.agent.service.agent.PackageTypeService; 27 import com.agent.service.agent.PackageTypeService;
  28 +import com.agent.service.agent.ShuntBillService;
8 import com.agent.service.agent.ShuntService; 29 import com.agent.service.agent.ShuntService;
9 import com.agent.util.HttpJsonMsg; 30 import com.agent.util.HttpJsonMsg;
10 import com.agent.vo.ResponseModel; 31 import com.agent.vo.ResponseModel;
11 -import com.agent.xml.common.*;  
12 -import com.agent.xml.shunt.*; 32 +import com.agent.xml.common.ContentXml;
  33 +import com.agent.xml.common.IDXml;
  34 +import com.agent.xml.common.NameXml;
  35 +import com.agent.xml.common.XmlHead;
  36 +import com.agent.xml.common.XmlUtil;
  37 +import com.agent.xml.shunt.ShuntBorderTransportMeansXml;
  38 +import com.agent.xml.shunt.ShuntConsignmentPackagingXml;
  39 +import com.agent.xml.shunt.ShuntConsignmentXml;
  40 +import com.agent.xml.shunt.ShuntSubBorderTransportMeansXml;
  41 +import com.agent.xml.shunt.ShuntUnloadingDatetimeXml;
  42 +import com.agent.xml.shunt.ShuntXml;
  43 +import com.agent.xml.shunt.ShuntXmlBody;
13 import com.alibaba.fastjson.JSONArray; 44 import com.alibaba.fastjson.JSONArray;
14 import com.alibaba.fastjson.JSONObject; 45 import com.alibaba.fastjson.JSONObject;
15 import com.framework.core.Servlets; 46 import com.framework.core.Servlets;
16 import com.framework.shiro.SessionUtil; 47 import com.framework.shiro.SessionUtil;
17 import com.plugin.easyui.DataGrid; 48 import com.plugin.easyui.DataGrid;
18 import com.plugin.easyui.EasyPage; 49 import com.plugin.easyui.EasyPage;
19 -import org.apache.commons.collections.CollectionUtils;  
20 -import org.dom4j.Document;  
21 -import org.dom4j.DocumentHelper;  
22 -import org.dom4j.Element;  
23 -import org.dom4j.io.OutputFormat;  
24 -import org.dom4j.io.XMLWriter;  
25 -import org.slf4j.Logger;  
26 -import org.slf4j.LoggerFactory;  
27 -import org.springframework.stereotype.Controller;  
28 -import org.springframework.ui.Model;  
29 -import org.springframework.web.bind.annotation.RequestMapping;  
30 -import org.springframework.web.bind.annotation.RequestMethod;  
31 -import org.springframework.web.bind.annotation.ResponseBody;  
32 -  
33 -import javax.annotation.Resource;  
34 -import javax.servlet.http.HttpServletRequest;  
35 -import javax.servlet.http.HttpServletResponse;  
36 -import java.io.File;  
37 -import java.io.FileWriter;  
38 -import java.io.IOException;  
39 -import java.io.PrintWriter;  
40 -import java.lang.reflect.Field;  
41 -import java.text.ParseException;  
42 -import java.util.Date;  
43 -import java.util.List;  
44 -import java.util.Map;  
45 50
46 /** 51 /**
47 * Created by cohesion on 2017/4/14. 52 * Created by cohesion on 2017/4/14.
@@ -50,229 +55,237 @@ import java.util.Map; @@ -50,229 +55,237 @@ import java.util.Map;
50 @RequestMapping(value = "/shunt") 55 @RequestMapping(value = "/shunt")
51 public class ShuntController extends BasicController { 56 public class ShuntController extends BasicController {
52 57
53 - private static final Logger logger = LoggerFactory.getLogger(ShuntController.class);  
54 -  
55 - @Resource  
56 - private ShuntService shuntService;  
57 -  
58 - @Resource  
59 - private PackageTypeService packageTypeService;  
60 -  
61 - @Resource  
62 - private ShuntBillService shuntBillService;  
63 -  
64 -  
65 - /**  
66 - * 列表页面  
67 - * @return  
68 - */  
69 - @RequestMapping(value = "/list")  
70 - public String getList(Model model){  
71 - return "shunt/list";  
72 - }  
73 -  
74 - /**  
75 - * 分页数据  
76 - * @return  
77 - */  
78 - @RequestMapping(value="/grid.json")  
79 - @ResponseBody  
80 - public DataGrid<ShuntEntity> grid(HttpServletRequest request,EasyPage<ShuntEntity> pageForm) throws ParseException {  
81 - Map<String, Object> searchParams = Servlets.getParametersStartingWith(request, "search_");  
82 - searchParams.put("EQ_isdelete", 0);  
83 - /*String deliveryDate =searchParams.get("GTE_deliveryDate").toString();  
84 - SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");  
85 - if(StringUtils.isNotEmpty(deliveryDate)){  
86 - searchParams.put("GTE_deliveryDate",dateFormat.parse(deliveryDate));  
87 - }  
88 - String deliveryDate1 =searchParams.get("LTE_deliveryDate").toString();  
89 - if(StringUtils.isNotEmpty(deliveryDate1)){  
90 - searchParams.put("LTE_deliveryDate",dateFormat.parse(deliveryDate1));  
91 - }*/  
92 - pageForm.setSearchParams(searchParams);  
93 - pageForm.parseData(shuntService.getPage(pageForm));  
94 - return pageForm.getData();  
95 - }  
96 -  
97 - /**  
98 - * 提单数据  
99 - * @return  
100 - */  
101 - @RequestMapping(value="/bill/grid.json",method = RequestMethod.POST)  
102 - @ResponseBody  
103 - public String getBillList(Long shuntId,HttpServletRequest request){  
104 - List<ShuntBillEntity> billList = shuntBillService.findByShuntId(shuntId);  
105 - return JSONArray.toJSONString(billList,filter);  
106 - }  
107 -  
108 - /**  
109 - * 编辑  
110 - * @param id  
111 - * @param model  
112 - * @return  
113 - */  
114 - @RequestMapping(value = "/edit" , method = {RequestMethod.GET })  
115 - public String edit(Long id, Model model) {  
116 - if(id!=null){  
117 - ShuntEntity shunt = shuntService.findOne(id);  
118 - model.addAttribute("shunt", shunt);  
119 - }  
120 -  
121 - //包装种类  
122 - List<PackageTypeEntity> typeList = packageTypeService.findAll();  
123 - model.addAttribute("typeList",typeList);  
124 - return "shunt/edit";  
125 - }  
126 -  
127 -  
128 - /**  
129 - * 保存  
130 - * @param shuntJson  
131 - * @return  
132 - */  
133 - @RequestMapping(value = "/save" , method = {RequestMethod.POST })  
134 - @ResponseBody  
135 - public ResponseModel save(String shuntJson,String billJson) {  
136 - ResponseModel model = new ResponseModel();  
137 - try {  
138 - ShuntEntity shunt = JSONObject.parseObject(shuntJson,ShuntEntity.class);  
139 - List<ShuntBillEntity> billList = JSONArray.parseArray(billJson,ShuntBillEntity.class);  
140 - shunt = shuntService.save(shunt,billList);  
141 - model.setData(shunt.getId());  
142 - model.setStatus(200);  
143 - } catch (Exception e) {  
144 - model.setStatus(500);  
145 - logger.error("系统异常 >>", e);  
146 - }  
147 - return model;  
148 - }  
149 -  
150 - /**  
151 - * 删除  
152 - * @param ids  
153 - * @return  
154 - */  
155 - @RequestMapping(value = "/delete" , method = {RequestMethod.POST })  
156 - @ResponseBody  
157 - public ResponseModel delete(String ids) {  
158 - ResponseModel model = new ResponseModel();  
159 - try {  
160 - shuntService.deleteAll(ids);  
161 - model.setStatus(200);  
162 - model.setMsg(HttpJsonMsg.SUCCESS);  
163 - } catch (Exception e) {  
164 - model.setStatus(500);  
165 - model.setMsg(HttpJsonMsg.ERROR);  
166 - logger.error("系统异常 >>", e);  
167 - }  
168 - return model;  
169 - }  
170 -  
171 - @RequestMapping(value = "/xml",method = RequestMethod.POST)  
172 - @ResponseBody  
173 - public ResponseModel createXml(Long id,HttpServletRequest request,HttpServletResponse response) throws IOException {  
174 -  
175 - ResponseModel model = new ResponseModel();  
176 - String rootPath = request.getSession().getServletContext().getRealPath("/");  
177 - String path = rootPath+"/excel/shunt"+new Date().getTime()+".xml";  
178 - String xml = "";  
179 - if(id!=null){  
180 - xml = beanToXml(path, id);  
181 - }  
182 - model.setData(xml);  
183 - return model;  
184 - }  
185 -  
186 - private String beanToXml(String path,Long id){  
187 -  
188 - ShuntEntity shunt = shuntService.findOne(id);  
189 - shunt.setSendXml(1);  
190 - shunt = shuntService.save(shunt);  
191 -  
192 - List<ShuntBillEntity> billList = null;  
193 - if(shunt.getId()!=null){  
194 - billList = shuntBillService.findByShuntId(shunt.getId());  
195 - }  
196 - String ladingNo = "";  
197 - String packageType = "";  
198 - Double volume = 0D;  
199 - Long pieces = 0L;  
200 - Double weight = 0D;  
201 - if(CollectionUtils.isNotEmpty(billList)){  
202 - ladingNo = billList.get(0).getLadingNo();  
203 - packageType = billList.get(0).getPackageType();  
204 - for(ShuntBillEntity bill:billList){  
205 - if(bill.getVolume()!=null){  
206 - volume += bill.getVolume();  
207 - }  
208 - if(bill.getPieces()!=null){  
209 - pieces += bill.getPieces();  
210 - }  
211 - if(bill.getWeight()!=null){  
212 - weight += bill.getWeight();  
213 - }  
214 - }  
215 - }  
216 -  
217 - ShuntXmlBody body = new ShuntXmlBody();  
218 -  
219 - XmlHead head = new XmlHead();  
220 - head.setMessageID(id==null?"":id.toString());  
221 - head.setMessageType("Manifest");  
222 - head.setSenderID(SessionUtil.getUser().getId().toString());  
223 - head.setSendTime(Constant.dateFormat.format(new Date()));  
224 - head.setFunctionCode("");  
225 - head.setReceiverID(SessionUtil.getUser().getId().toString());  
226 - head.setVersion("1.0");  
227 - body.setHead(head);  
228 -  
229 - ShuntXml shuntXml = new ShuntXml();  
230 - ShuntBorderTransportMeansXml meansXml = new ShuntBorderTransportMeansXml();  
231 - meansXml.setJourneyID(shunt.getVoyageNo());  
232 - meansXml.setTypeCode(shunt.getModeCode());  
233 - meansXml.setId(shunt.getToolCode());  
234 - meansXml.setName(shunt.getToolName());  
235 - meansXml.setCargoFacilityLocation(shunt.getShuntDestination());  
236 - meansXml.setDespatchDateTime(shunt.getShuntStartDate()!=null?Constant.dateFormat.format(shunt.getShuntStartDate()):"");  
237 - IDXml idXml = new IDXml();  
238 - idXml.setId(shunt.getDischargingCode());  
239 - meansXml.setUnloadingLocation(idXml);  
240 -  
241 - ShuntUnloadingDatetimeXml datetimeXml = new ShuntUnloadingDatetimeXml();  
242 - datetimeXml.setUnloadingDatetime(shunt.getShuntStartDate()!=null?Constant.dateFormat.format(shunt.getShuntStartDate()):"");  
243 - meansXml.setUnloading(datetimeXml);  
244 - meansXml.setFreeText(shunt.getIoPurpose());  
245 -  
246 - shuntXml.setBorderTransportMeans(meansXml);  
247 -  
248 - ShuntConsignmentXml consignmentXml = new ShuntConsignmentXml();  
249 - IDXml idXml1 = new IDXml();  
250 - idXml1.setId(ladingNo);  
251 - consignmentXml.setTransportContractDocument(idXml1);  
252 - consignmentXml.setGrossVolumeMeasure(volume.toString());  
253 -  
254 - ShuntConsignmentPackagingXml consignmentPackagingXml = new ShuntConsignmentPackagingXml();  
255 - consignmentPackagingXml.setQuantityQuantity(pieces.toString());  
256 - consignmentPackagingXml.setTypeCode(packageType);  
257 - consignmentXml.setConsignmentPackaging(consignmentPackagingXml);  
258 - consignmentXml.setTotalGrossMassMeasure(weight.toString());  
259 - ShuntSubBorderTransportMeansXml shuntSubBorderTransportMeansXml = new ShuntSubBorderTransportMeansXml();  
260 - shuntSubBorderTransportMeansXml.setJourneyID(ladingNo);  
261 - shuntSubBorderTransportMeansXml.setTypeCode(shunt.getModeCode());  
262 - NameXml nameXml = new NameXml();  
263 - nameXml.setName("");  
264 - shuntSubBorderTransportMeansXml.setCarrier(nameXml);  
265 - consignmentXml.setBorderTransportMeans(shuntSubBorderTransportMeansXml);  
266 - shuntXml.setConsignment(consignmentXml);  
267 -  
268 - ContentXml contentXml = new ContentXml();  
269 - contentXml.setContent(shunt.getRemark());  
270 - shuntXml.setAdditionalInformation(contentXml);  
271 -  
272 - body.setDeclaration(shuntXml);  
273 -  
274 - String xml = XmlUtil.convertToXml2(body, path);  
275 - return xml;  
276 - } 58 + private static final Logger logger = LoggerFactory.getLogger(ShuntController.class);
  59 +
  60 + @Resource
  61 + private ShuntService shuntService;
  62 +
  63 + @Resource
  64 + private PackageTypeService packageTypeService;
  65 +
  66 + @Resource
  67 + private ShuntBillService shuntBillService;
  68 +
  69 + /**
  70 + * 列表页面
  71 + *
  72 + * @return
  73 + */
  74 + @RequestMapping(value = "/list")
  75 + public String getList(Model model) {
  76 + return "shunt/list";
  77 + }
  78 +
  79 + /**
  80 + * 分页数据
  81 + *
  82 + * @return
  83 + */
  84 + @RequestMapping(value = "/grid.json")
  85 + @ResponseBody
  86 + public DataGrid<ShuntEntity> grid(HttpServletRequest request, EasyPage<ShuntEntity> pageForm)
  87 + throws ParseException {
  88 + Map<String, Object> searchParams = Servlets.getParametersStartingWith(request, "search_");
  89 + searchParams.put("EQ_isdelete", 0);
  90 + /*
  91 + * String deliveryDate =searchParams.get("GTE_deliveryDate").toString();
  92 + * SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
  93 + * if(StringUtils.isNotEmpty(deliveryDate)){
  94 + * searchParams.put("GTE_deliveryDate",dateFormat.parse(deliveryDate)); } String
  95 + * deliveryDate1 =searchParams.get("LTE_deliveryDate").toString();
  96 + * if(StringUtils.isNotEmpty(deliveryDate1)){
  97 + * searchParams.put("LTE_deliveryDate",dateFormat.parse(deliveryDate1)); }
  98 + */
  99 + pageForm.setSearchParams(searchParams);
  100 + pageForm.parseData(shuntService.getPage(pageForm));
  101 + return pageForm.getData();
  102 + }
  103 +
  104 + /**
  105 + * 提单数据
  106 + *
  107 + * @return
  108 + */
  109 + @RequestMapping(value = "/bill/grid.json", method = RequestMethod.POST)
  110 + @ResponseBody
  111 + public String getBillList(Long shuntId, HttpServletRequest request) {
  112 + List<ShuntBillEntity> billList = shuntBillService.findByShuntId(shuntId);
  113 + return JSONArray.toJSONString(billList, filter);
  114 + }
  115 +
  116 + /**
  117 + * 编辑
  118 + *
  119 + * @param id
  120 + * @param model
  121 + * @return
  122 + */
  123 + @RequestMapping(value = "/edit", method = { RequestMethod.GET })
  124 + public String edit(Long id, Model model) {
  125 + if (id != null) {
  126 + ShuntEntity shunt = shuntService.findOne(id);
  127 + model.addAttribute("shunt", shunt);
  128 + }
  129 +
  130 + // 包装种类
  131 + List<PackageTypeEntity> typeList = packageTypeService.findAll();
  132 + model.addAttribute("typeList", typeList);
  133 + return "shunt/edit";
  134 + }
  135 +
  136 + /**
  137 + * 保存
  138 + *
  139 + * @param shuntJson
  140 + * @return
  141 + */
  142 + @RequestMapping(value = "/save", method = { RequestMethod.POST })
  143 + @ResponseBody
  144 + public ResponseModel save(String shuntJson, String billJson) {
  145 + ResponseModel model = new ResponseModel();
  146 + try {
  147 + ShuntEntity shunt = JSONObject.parseObject(shuntJson, ShuntEntity.class);
  148 + List<ShuntBillEntity> billList = JSONArray.parseArray(billJson, ShuntBillEntity.class);
  149 + shunt = shuntService.save(shunt, billList);
  150 + model.setData(shunt.getId());
  151 + model.setStatus(200);
  152 + } catch (Exception e) {
  153 + model.setStatus(500);
  154 + logger.error("系统异常 >>", e);
  155 + }
  156 + return model;
  157 + }
  158 +
  159 + /**
  160 + * 删除
  161 + *
  162 + * @param ids
  163 + * @return
  164 + */
  165 + @RequestMapping(value = "/delete", method = { RequestMethod.POST })
  166 + @ResponseBody
  167 + public ResponseModel delete(String ids) {
  168 + ResponseModel model = new ResponseModel();
  169 + try {
  170 + shuntService.deleteAll(ids);
  171 + model.setStatus(200);
  172 + model.setMsg(HttpJsonMsg.SUCCESS);
  173 + } catch (Exception e) {
  174 + model.setStatus(500);
  175 + model.setMsg(HttpJsonMsg.ERROR);
  176 + logger.error("系统异常 >>", e);
  177 + }
  178 + return model;
  179 + }
  180 +
  181 + @RequestMapping(value = "/xml", method = RequestMethod.POST)
  182 + @ResponseBody
  183 + public ResponseModel createXml(Long id, HttpServletRequest request, HttpServletResponse response)
  184 + throws IOException {
  185 +
  186 + ResponseModel model = new ResponseModel();
  187 + String rootPath = request.getSession().getServletContext().getRealPath("/");
  188 + String path = rootPath + "/excel/shunt" + new Date().getTime() + ".xml";
  189 + String xml = "";
  190 + if (id != null) {
  191 + xml = beanToXml(path, id);
  192 + }
  193 + model.setData(xml);
  194 + return model;
  195 + }
  196 +
  197 + private String beanToXml(String path, Long id) {
  198 +
  199 + ShuntEntity shunt = shuntService.findOne(id);
  200 + shunt.setSendXml(1);
  201 + shunt = shuntService.save(shunt);
  202 +
  203 + List<ShuntBillEntity> billList = null;
  204 + if (shunt.getId() != null) {
  205 + billList = shuntBillService.findByShuntId(shunt.getId());
  206 + }
  207 + String ladingNo = "";
  208 + String packageType = "";
  209 + Double volume = 0D;
  210 + Long pieces = 0L;
  211 + Double weight = 0D;
  212 + if (CollectionUtils.isNotEmpty(billList)) {
  213 + ladingNo = billList.get(0).getLadingNo();
  214 + packageType = billList.get(0).getPackageType();
  215 + for (ShuntBillEntity bill : billList) {
  216 + if (bill.getVolume() != null) {
  217 + volume += bill.getVolume();
  218 + }
  219 + if (bill.getPieces() != null) {
  220 + pieces += bill.getPieces();
  221 + }
  222 + if (bill.getWeight() != null) {
  223 + weight += bill.getWeight();
  224 + }
  225 + }
  226 + }
  227 +
  228 + ShuntXmlBody body = new ShuntXmlBody();
  229 +
  230 + XmlHead head = new XmlHead();
  231 + head.setMessageID(id == null ? "" : id.toString());
  232 + head.setMessageType("Manifest");
  233 + head.setSenderID(SessionUtil.getUser().getId().toString());
  234 + head.setSendTime(Constant.dateFormat.format(new Date()));
  235 + head.setFunctionCode("");
  236 + head.setReceiverID(SessionUtil.getUser().getId().toString());
  237 + head.setVersion("1.0");
  238 + body.setHead(head);
  239 +
  240 + ShuntXml shuntXml = new ShuntXml();
  241 + ShuntBorderTransportMeansXml meansXml = new ShuntBorderTransportMeansXml();
  242 + meansXml.setJourneyID(shunt.getVoyageNo());
  243 + meansXml.setTypeCode(shunt.getModeCode());
  244 + meansXml.setId(shunt.getToolCode());
  245 + meansXml.setName(shunt.getToolName());
  246 + meansXml.setCargoFacilityLocation(shunt.getShuntDestination());
  247 + meansXml.setDespatchDateTime(
  248 + shunt.getShuntStartDate() != null ? Constant.dateFormat.format(shunt.getShuntStartDate()) : "");
  249 + IDXml idXml = new IDXml();
  250 + idXml.setId(shunt.getDischargingCode());
  251 + meansXml.setUnloadingLocation(idXml);
  252 +
  253 + ShuntUnloadingDatetimeXml datetimeXml = new ShuntUnloadingDatetimeXml();
  254 + datetimeXml.setUnloadingDatetime(
  255 + shunt.getShuntStartDate() != null ? Constant.dateFormat.format(shunt.getShuntStartDate()) : "");
  256 + meansXml.setUnloading(datetimeXml);
  257 + meansXml.setFreeText(shunt.getIoPurpose());
  258 +
  259 + shuntXml.setBorderTransportMeans(meansXml);
  260 +
  261 + ShuntConsignmentXml consignmentXml = new ShuntConsignmentXml();
  262 + IDXml idXml1 = new IDXml();
  263 + idXml1.setId(ladingNo);
  264 + consignmentXml.setTransportContractDocument(idXml1);
  265 + consignmentXml.setGrossVolumeMeasure(volume.toString());
  266 +
  267 + ShuntConsignmentPackagingXml consignmentPackagingXml = new ShuntConsignmentPackagingXml();
  268 + consignmentPackagingXml.setQuantityQuantity(pieces.toString());
  269 + consignmentPackagingXml.setTypeCode(packageType);
  270 + consignmentXml.setConsignmentPackaging(consignmentPackagingXml);
  271 + consignmentXml.setTotalGrossMassMeasure(weight.toString());
  272 + ShuntSubBorderTransportMeansXml shuntSubBorderTransportMeansXml = new ShuntSubBorderTransportMeansXml();
  273 + shuntSubBorderTransportMeansXml.setJourneyID(ladingNo);
  274 + shuntSubBorderTransportMeansXml.setTypeCode(shunt.getModeCode());
  275 + NameXml nameXml = new NameXml();
  276 + nameXml.setName("");
  277 + shuntSubBorderTransportMeansXml.setCarrier(nameXml);
  278 + consignmentXml.setBorderTransportMeans(shuntSubBorderTransportMeansXml);
  279 + shuntXml.setConsignment(consignmentXml);
  280 +
  281 + ContentXml contentXml = new ContentXml();
  282 + contentXml.setContent(shunt.getRemark());
  283 + shuntXml.setAdditionalInformation(contentXml);
  284 +
  285 + body.setDeclaration(shuntXml);
  286 +
  287 + String xml = XmlUtil.convertToXml2(body, path);
  288 + return xml;
  289 + }
277 290
278 } 291 }
1 package com.agent.controller.agent; 1 package com.agent.controller.agent;
2 2
3 -import com.agent.controller.BasicController;  
4 -import com.agent.vo.ResponseModel;  
5 -import com.agent.vo.ServiceVo;  
6 -import com.agent.webservice.GetShipmentStatusByBillIdResponse;  
7 -import com.agent.webservice.ReturnDataClass;  
8 -import com.agent.webservice.ShipmentStatusWSSoap;  
9 -import com.framework.util.PropertiesLoader; 3 +import java.util.ArrayList;
  4 +import java.util.List;
  5 +
  6 +import javax.servlet.http.HttpServletResponse;
  7 +
10 import org.apache.commons.collections.CollectionUtils; 8 import org.apache.commons.collections.CollectionUtils;
11 import org.apache.commons.lang.StringUtils; 9 import org.apache.commons.lang.StringUtils;
12 import org.apache.cxf.interceptor.LoggingInInterceptor; 10 import org.apache.cxf.interceptor.LoggingInInterceptor;
@@ -14,91 +12,94 @@ import org.apache.cxf.interceptor.LoggingOutInterceptor; @@ -14,91 +12,94 @@ import org.apache.cxf.interceptor.LoggingOutInterceptor;
14 import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; 12 import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
15 import org.slf4j.Logger; 13 import org.slf4j.Logger;
16 import org.slf4j.LoggerFactory; 14 import org.slf4j.LoggerFactory;
17 -import org.springframework.beans.factory.annotation.Value;  
18 import org.springframework.stereotype.Controller; 15 import org.springframework.stereotype.Controller;
19 import org.springframework.web.bind.annotation.RequestMapping; 16 import org.springframework.web.bind.annotation.RequestMapping;
20 import org.springframework.web.bind.annotation.RequestMethod; 17 import org.springframework.web.bind.annotation.RequestMethod;
21 import org.springframework.web.bind.annotation.ResponseBody; 18 import org.springframework.web.bind.annotation.ResponseBody;
22 19
23 -import java.util.ArrayList;  
24 -import java.util.List;  
25 -  
26 -import javax.servlet.http.HttpServletResponse;  
27 - 20 +import com.agent.controller.BasicController;
  21 +import com.agent.vo.ResponseModel;
  22 +import com.agent.vo.ServiceVo;
  23 +import com.agent.webservice.ReturnDataClass;
  24 +import com.agent.webservice.ShipmentStatusWSSoap;
  25 +import com.framework.util.PropertiesLoader;
28 26
29 /** 27 /**
30 * 货况追踪 28 * 货况追踪
31 */ 29 */
32 @Controller 30 @Controller
33 @RequestMapping(value = "/tracking/") 31 @RequestMapping(value = "/tracking/")
34 -public class TrackingController extends BasicController{ 32 +public class TrackingController extends BasicController {
  33 +
  34 + private static final Logger logger = LoggerFactory.getLogger(TrackingController.class);
  35 +
  36 + /**
  37 + * 列表页
  38 + *
  39 + * @return
  40 + */
  41 + @RequestMapping(value = "list")
  42 + public String getList() {
  43 + return "tracking/list";
  44 + }
35 45
36 - private static final Logger logger = LoggerFactory.getLogger(TrackingController.class);  
37 - /**  
38 - * 列表页  
39 - * @return  
40 - */  
41 - @RequestMapping(value = "list")  
42 - public String getList(){  
43 - return "tracking/list";  
44 - } 46 + /**
  47 + * 货单详情
  48 + *
  49 + * @return
  50 + */
  51 + @RequestMapping(value = "detail", method = RequestMethod.POST)
  52 + @ResponseBody
  53 + public ResponseModel getDetail(String billNo, HttpServletResponse responseHttp) {
  54 + ResponseModel model = new ResponseModel();
  55 + try {
  56 + responseHttp.setHeader("Access-Control-Allow-Origin", "*");
  57 + if (StringUtils.isNotEmpty(billNo)) {
  58 + System.out.println(billNo);
  59 + JaxWsProxyFactoryBean svr = new JaxWsProxyFactoryBean();
  60 + svr.getOutInterceptors().add(new LoggingOutInterceptor());
  61 + svr.getInInterceptors().add(new LoggingInInterceptor());
  62 + svr.setServiceClass(ShipmentStatusWSSoap.class);
  63 + svr.setAddress(getAddress());
  64 + ShipmentStatusWSSoap hw = (ShipmentStatusWSSoap) svr.create();
  65 + ReturnDataClass response = hw.getShipmentStatusByBillId(billNo, getXquery());
  66 + if (response.isIsErr() || response.getStatusCount() == 0) {
45 67
  68 + System.out.println("is error:" + response.isIsErr() + " status count:" + response.getStatusCount());
  69 + model.setStatus(500);
  70 + return model;
  71 + }
  72 + model.setData(response);
  73 + model.setStatus(200);
  74 + } else {
  75 + model.setStatus(500);
  76 + }
  77 + } catch (Exception e) {
  78 + logger.error("系统异常>>", e.fillInStackTrace());
  79 + model.setStatus(500);
  80 + }
46 81
47 - /**  
48 - * 货单详情  
49 - * @return  
50 - */  
51 - @RequestMapping(value = "detail",method = RequestMethod.POST)  
52 - @ResponseBody  
53 - public ResponseModel getDetail(String billNo, HttpServletResponse responseHttp){  
54 - ResponseModel model = new ResponseModel();  
55 - try{  
56 - responseHttp.setHeader("Access-Control-Allow-Origin", "*");  
57 - if(StringUtils.isNotEmpty(billNo)){  
58 - System.out.println(billNo);  
59 - JaxWsProxyFactoryBean svr = new JaxWsProxyFactoryBean();  
60 - svr.getOutInterceptors().add(new LoggingOutInterceptor());  
61 - svr.getInInterceptors().add(new LoggingInInterceptor());  
62 - svr.setServiceClass(ShipmentStatusWSSoap.class);  
63 - svr.setAddress(getAddress());  
64 - ShipmentStatusWSSoap hw = (ShipmentStatusWSSoap)svr.create();  
65 - ReturnDataClass response = hw.getShipmentStatusByBillId(billNo,getXquery());  
66 - if(response.isIsErr() || response.getStatusCount()==0){  
67 -  
68 - System.out.println("is error:"+response.isIsErr()+" status count:"+response.getStatusCount());  
69 - model.setStatus(500);  
70 - return model;  
71 - }  
72 - model.setData(response);  
73 - model.setStatus(200);  
74 - }else {  
75 - model.setStatus(500);  
76 - }  
77 - }catch (Exception e){  
78 - logger.error("系统异常>>",e.fillInStackTrace());  
79 - model.setStatus(500);  
80 - } 82 + return model;
  83 + }
81 84
82 - return model;  
83 - } 85 + private List<ServiceVo> objToVo(List<Object[]> list) {
  86 + List<ServiceVo> vos = new ArrayList<>();
  87 + if (CollectionUtils.isNotEmpty(list)) {
  88 + for (Object[] obj : list) {
  89 + ServiceVo vo = new ServiceVo();
  90 + vo.setStepName(obj[0].toString());
  91 + vo.setStepTime(obj[1].toString());
  92 + vos.add(vo);
  93 + }
  94 + }
  95 + return vos;
  96 + }
84 97
85 - private List<ServiceVo> objToVo(List<Object[]> list){  
86 - List<ServiceVo> vos = new ArrayList<>();  
87 - if(CollectionUtils.isNotEmpty(list)){  
88 - for(Object[] obj:list){  
89 - ServiceVo vo = new ServiceVo();  
90 - vo.setStepName(obj[0].toString());  
91 - vo.setStepTime(obj[1].toString());  
92 - vos.add(vo);  
93 - }  
94 - }  
95 - return vos;  
96 - } 98 + private String getAddress() {
  99 + return PropertiesLoader.get("service.address");
  100 + }
97 101
98 - private String getAddress(){  
99 - return PropertiesLoader.get("service.address");  
100 - }  
101 - private String getXquery(){  
102 - return PropertiesLoader.get("service.xquery");  
103 - } 102 + private String getXquery() {
  103 + return PropertiesLoader.get("service.xquery");
  104 + }
104 } 105 }
@@ -6,8 +6,7 @@ import org.springframework.web.bind.annotation.RequestMethod; @@ -6,8 +6,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
6 6
7 @Controller 7 @Controller
8 public class LayoutController { 8 public class LayoutController {
9 -  
10 - 9 +
11 /** 10 /**
12 * 默认页 11 * 默认页
13 * 12 *
@@ -19,7 +18,6 @@ public class LayoutController { @@ -19,7 +18,6 @@ public class LayoutController {
19 return "redirect:/index"; 18 return "redirect:/index";
20 } 19 }
21 20
22 -  
23 /** 21 /**
24 * 主框架模板 22 * 主框架模板
25 * 23 *
@@ -29,8 +27,8 @@ public class LayoutController { @@ -29,8 +27,8 @@ public class LayoutController {
29 @RequestMapping(value = "/index", method = RequestMethod.GET) 27 @RequestMapping(value = "/index", method = RequestMethod.GET)
30 public String index() { 28 public String index() {
31 System.out.println("show message!"); 29 System.out.println("show message!");
32 - //项目启动时候开启 imf 和 redis  
33 -// new Thread(new IMFServletManifst()).start(); 30 + // 项目启动时候开启 imf 和 redis
  31 + // new Thread(new IMFServletManifst()).start();
34 return "index"; 32 return "index";
35 } 33 }
36 34
@@ -16,22 +16,13 @@ import org.apache.shiro.authc.LockedAccountException; @@ -16,22 +16,13 @@ import org.apache.shiro.authc.LockedAccountException;
16 import org.apache.shiro.authc.UnknownAccountException; 16 import org.apache.shiro.authc.UnknownAccountException;
17 import org.apache.shiro.authc.UsernamePasswordToken; 17 import org.apache.shiro.authc.UsernamePasswordToken;
18 import org.apache.shiro.subject.Subject; 18 import org.apache.shiro.subject.Subject;
19 -import org.apache.shiro.web.tags.PermissionTag;  
20 import org.springframework.stereotype.Controller; 19 import org.springframework.stereotype.Controller;
21 import org.springframework.transaction.annotation.Transactional; 20 import org.springframework.transaction.annotation.Transactional;
22 import org.springframework.web.bind.annotation.RequestMapping; 21 import org.springframework.web.bind.annotation.RequestMapping;
23 import org.springframework.web.bind.annotation.RequestMethod; 22 import org.springframework.web.bind.annotation.RequestMethod;
24 import org.springframework.web.bind.annotation.ResponseBody; 23 import org.springframework.web.bind.annotation.ResponseBody;
25 24
26 -import com.framework.mail.MailSenderService;  
27 -import com.framework.shiro.SessionUtil;  
28 -import com.framework.util.MD5Tools;  
29 -  
30 -import login.FLogin;  
31 -import login.LoginData;  
32 -  
33 import com.agent.entity.agent.BasicAgentEntity; 25 import com.agent.entity.agent.BasicAgentEntity;
34 -import com.agent.entity.system.PermissionEntity;  
35 import com.agent.entity.system.RoleEntity; 26 import com.agent.entity.system.RoleEntity;
36 import com.agent.entity.system.UserEntity; 27 import com.agent.entity.system.UserEntity;
37 import com.agent.service.agent.BasicAgentService; 28 import com.agent.service.agent.BasicAgentService;
@@ -40,10 +31,16 @@ import com.agent.service.system.RoleService; @@ -40,10 +31,16 @@ import com.agent.service.system.RoleService;
40 import com.agent.service.system.UserService; 31 import com.agent.service.system.UserService;
41 import com.agent.util.Constants; 32 import com.agent.util.Constants;
42 import com.agent.vo.ResponseModel; 33 import com.agent.vo.ResponseModel;
  34 +import com.framework.mail.MailSenderService;
  35 +import com.framework.shiro.SessionUtil;
  36 +import com.framework.util.MD5Tools;
  37 +
  38 +import login.FLogin;
  39 +import login.LoginData;
43 40
44 @Controller 41 @Controller
45 public class LoginController { 42 public class LoginController {
46 - 43 +
47 @Resource 44 @Resource
48 private BasicAgentService agentSerive; 45 private BasicAgentService agentSerive;
49 @Resource 46 @Resource
@@ -51,7 +48,7 @@ public class LoginController { @@ -51,7 +48,7 @@ public class LoginController {
51 48
52 @Resource 49 @Resource
53 private MailSenderService mailSenderService; 50 private MailSenderService mailSenderService;
54 - 51 +
55 @Resource 52 @Resource
56 private RoleService roleService; 53 private RoleService roleService;
57 @Resource 54 @Resource
@@ -66,10 +63,12 @@ public class LoginController { @@ -66,10 +63,12 @@ public class LoginController {
66 public String login() { 63 public String login() {
67 return "login"; 64 return "login";
68 } 65 }
69 - @RequestMapping(value="/unauthorized")  
70 - public String authorized(){ 66 +
  67 + @RequestMapping(value = "/unauthorized")
  68 + public String authorized() {
71 return "unauthorized"; 69 return "unauthorized";
72 } 70 }
  71 +
73 /** 72 /**
74 * 查看用户名 73 * 查看用户名
75 * 74 *
@@ -112,17 +111,19 @@ public class LoginController { @@ -112,17 +111,19 @@ public class LoginController {
112 return false; 111 return false;
113 } 112 }
114 } 113 }
  114 +
115 @RequestMapping(value = "isLogin") 115 @RequestMapping(value = "isLogin")
116 @ResponseBody 116 @ResponseBody
117 - public ResponseModel isLogin(HttpServletRequest request){ 117 + public ResponseModel isLogin(HttpServletRequest request) {
118 ResponseModel model = new ResponseModel(200, "", null); 118 ResponseModel model = new ResponseModel(200, "", null);
119 119
120 Subject subject = SecurityUtils.getSubject(); 120 Subject subject = SecurityUtils.getSubject();
121 - if(subject.getSession().getAttribute("user") == null){ 121 + if (subject.getSession().getAttribute("user") == null) {
122 model.setStatus(404); 122 model.setStatus(404);
123 } 123 }
124 return model; 124 return model;
125 } 125 }
  126 +
126 /** 127 /**
127 * 找回密码页面 128 * 找回密码页面
128 * 129 *
@@ -142,83 +143,56 @@ public class LoginController { @@ -142,83 +143,56 @@ public class LoginController {
142 @RequestMapping(value = "/doLogin", method = RequestMethod.POST) 143 @RequestMapping(value = "/doLogin", method = RequestMethod.POST)
143 @ResponseBody 144 @ResponseBody
144 public ResponseModel doLogin(String loginAccount, String password, String captcha) { 145 public ResponseModel doLogin(String loginAccount, String password, String captcha) {
145 -  
146 - //String CAPTCHA = (String) SessionUtil.getKey(Constants.CAPTCHA);  
147 SessionUtil.putKey(Constants.CAPTCHA, ""); 146 SessionUtil.putKey(Constants.CAPTCHA, "");
148 -  
149 - //if(!captcha.equalsIgnoreCase(CAPTCHA)) { rm.setStatus(500);  
150 - // rm.setMsg("2"); return rm; }  
151 -  
152 ResponseModel rm = new ResponseModel(200, "", null); 147 ResponseModel rm = new ResponseModel(200, "", null);
153 -  
154 - //登录用户  
155 -// Subject subject2 = SecurityUtils.getSubject();  
156 -// UsernamePasswordToken token2 = new UsernamePasswordToken(loginAccount, MD5Tools.MD5(password));  
157 -// try {  
158 -// subject2.login(token2);  
159 -// } catch (UnknownAccountException e) {  
160 -// rm.setStatus(500);  
161 -// rm.setMsg("1");  
162 -// } catch (IncorrectCredentialsException e) {  
163 -// rm.setStatus(500);  
164 -// rm.setMsg("1");  
165 -// } catch (LockedAccountException e) {  
166 -// rm.setStatus(500);  
167 -// rm.setMsg("1");  
168 -// }  
169 -// return rm;  
170 -// //声明一个user实体  
171 - 148 +
172 UserEntity user = new UserEntity(); 149 UserEntity user = new UserEntity();
173 user.setLoginaccount(loginAccount); 150 user.setLoginaccount(loginAccount);
174 user.setPassword(password); 151 user.setPassword(password);
175 - if(!loginAccount.equals("admin")) //远程登录 152 + if (!loginAccount.equals("admin")) // 远程登录
176 { 153 {
177 - //用户数据 154 + // 用户数据
178 LoginData login = FLogin.login(user); 155 LoginData login = FLogin.login(user);
179 - //登录成功!  
180 - if(login.getCode() == 20000)  
181 - {  
182 - //往数据库中插入数据 156 + // 登录成功!
  157 + if (login.getCode() == 20000) {
  158 + // 往数据库中插入数据
183 UserEntity ue = userService.findByLoginaccount(user.getLoginaccount()); 159 UserEntity ue = userService.findByLoginaccount(user.getLoginaccount());
184 - //用户存在  
185 - if(ue != null)  
186 - {  
187 - //修改密码 160 + // 用户存在
  161 + if (ue != null) {
  162 + // 修改密码
188 userService.updatePassword(ue.getLoginaccount(), MD5Tools.MD5(password)); 163 userService.updatePassword(ue.getLoginaccount(), MD5Tools.MD5(password));
189 - }  
190 - else  
191 - {  
192 - //用户不存在,插入数据 164 + } else {
  165 + // 用户不存在,插入数据
193 BasicAgentEntity agent = new BasicAgentEntity(); 166 BasicAgentEntity agent = new BasicAgentEntity();
194 agent.setContact(login.getInfodata().getContact()); 167 agent.setContact(login.getInfodata().getContact());
195 agent.setNameCn(login.getInfodata().getCompany()); 168 agent.setNameCn(login.getInfodata().getCompany());
196 agent.setCountryCode("CN"); 169 agent.setCountryCode("CN");
197 agent.setAddress(login.getInfodata().getAddress()); 170 agent.setAddress(login.getInfodata().getAddress());
198 int agent_id = agentSerive.save2(agent); 171 int agent_id = agentSerive.save2(agent);
199 - 172 +
200 ue = new UserEntity(); 173 ue = new UserEntity();
201 ue.setLoginaccount(loginAccount); 174 ue.setLoginaccount(loginAccount);
202 - //设置用户名密码 175 + // 设置用户名密码
203 ue.setPassword(MD5Tools.MD5(password)); 176 ue.setPassword(MD5Tools.MD5(password));
204 ue.setRealName(login.getInfodata().getContact()); 177 ue.setRealName(login.getInfodata().getContact());
205 ue.setMobile(login.getInfodata().getMobile()); 178 ue.setMobile(login.getInfodata().getMobile());
206 ue.setStatus(0); 179 ue.setStatus(0);
207 ue.setAgent(new Long(agent_id)); 180 ue.setAgent(new Long(agent_id));
208 - RoleEntity re = new RoleEntity(); re.setId(new Long(1)); 181 + RoleEntity re = new RoleEntity();
  182 + re.setId(new Long(1));
209 ue.setRole(re); 183 ue.setRole(re);
210 - //删除密码 184 + // 删除密码
211 userService.save(ue); 185 userService.save(ue);
212 } 186 }
213 -  
214 - //登录用户 187 +
  188 + // 登录用户
215 Subject subject = SecurityUtils.getSubject(); 189 Subject subject = SecurityUtils.getSubject();
216 subject.getSession().setAttribute("user", user); 190 subject.getSession().setAttribute("user", user);
217 UsernamePasswordToken token = new UsernamePasswordToken(loginAccount, MD5Tools.MD5(password)); 191 UsernamePasswordToken token = new UsernamePasswordToken(loginAccount, MD5Tools.MD5(password));
218 try { 192 try {
219 subject.login(token); 193 subject.login(token);
220 - subject.getSession().setAttribute("permission", roleService.findAllFunctionByRole(  
221 - ((UserEntity)subject.getSession().getAttribute("user")).getRole())); 194 + subject.getSession().setAttribute("permission", roleService
  195 + .findAllFunctionByRole(((UserEntity) subject.getSession().getAttribute("user")).getRole()));
222 subject.getSession().setAttribute("all_function", functionService.findAll()); 196 subject.getSession().setAttribute("all_function", functionService.findAll());
223 } catch (UnknownAccountException e) { 197 } catch (UnknownAccountException e) {
224 rm.setStatus(500); 198 rm.setStatus(500);
@@ -230,24 +204,20 @@ public class LoginController { @@ -230,24 +204,20 @@ public class LoginController {
230 rm.setStatus(500); 204 rm.setStatus(500);
231 rm.setMsg("1"); 205 rm.setMsg("1");
232 } 206 }
233 - }  
234 - else  
235 - { 207 + } else {
236 rm.setStatus(500); 208 rm.setStatus(500);
237 rm.setMsg("1"); 209 rm.setMsg("1");
238 } 210 }
239 - }  
240 - else  
241 - {  
242 - //登录用户 211 + } else {
  212 + // 登录用户
243 Subject subject = SecurityUtils.getSubject(); 213 Subject subject = SecurityUtils.getSubject();
244 subject.getSession().setAttribute("user", user); 214 subject.getSession().setAttribute("user", user);
245 UsernamePasswordToken token = new UsernamePasswordToken(loginAccount, MD5Tools.MD5(password)); 215 UsernamePasswordToken token = new UsernamePasswordToken(loginAccount, MD5Tools.MD5(password));
246 - //System.out.println(loginAccount+" " + password); 216 + // System.out.println(loginAccount+" " + password);
247 try { 217 try {
248 subject.login(token); 218 subject.login(token);
249 - subject.getSession().setAttribute("permission", roleService.findAllFunctionByRole(  
250 - ((UserEntity)subject.getSession().getAttribute("user")).getRole())); 219 + subject.getSession().setAttribute("permission", roleService
  220 + .findAllFunctionByRole(((UserEntity) subject.getSession().getAttribute("user")).getRole()));
251 subject.getSession().setAttribute("all_function", functionService.findAll()); 221 subject.getSession().setAttribute("all_function", functionService.findAll());
252 } catch (UnknownAccountException e) { 222 } catch (UnknownAccountException e) {
253 rm.setStatus(500); 223 rm.setStatus(500);
@@ -260,8 +230,6 @@ public class LoginController { @@ -260,8 +230,6 @@ public class LoginController {
260 rm.setMsg("1"); 230 rm.setMsg("1");
261 } 231 }
262 } 232 }
263 -  
264 -  
265 233
266 return rm; 234 return rm;
267 } 235 }
1 package com.agent.controller.system; 1 package com.agent.controller.system;
2 2
3 -import com.framework.core.Servlets;  
4 -import com.google.common.collect.Lists;  
5 -import com.plugin.easyui.DataGrid;  
6 -import com.plugin.easyui.EasyPage;  
7 -import com.agent.controller.BasicController;  
8 -import com.agent.entity.system.FunctionEntity;  
9 -import com.agent.entity.system.RoleEntity;  
10 -import com.agent.service.system.FunctionService;  
11 -import com.agent.service.system.RoleService;  
12 -import com.agent.vo.ResponseModel;  
13 -import com.agent.vo.Ztree;  
14 -  
15 import java.util.List; 3 import java.util.List;
16 import java.util.Map; 4 import java.util.Map;
17 5
18 import javax.annotation.Resource; 6 import javax.annotation.Resource;
19 import javax.servlet.http.HttpServletRequest; 7 import javax.servlet.http.HttpServletRequest;
20 8
21 -import org.apache.shiro.authz.annotation.RequiresPermissions;  
22 -import org.apache.shiro.authz.annotation.RequiresRoles;  
23 import org.slf4j.Logger; 9 import org.slf4j.Logger;
24 import org.slf4j.LoggerFactory; 10 import org.slf4j.LoggerFactory;
25 import org.springframework.stereotype.Controller; 11 import org.springframework.stereotype.Controller;
@@ -27,48 +13,63 @@ import org.springframework.ui.Model; @@ -27,48 +13,63 @@ import org.springframework.ui.Model;
27 import org.springframework.web.bind.annotation.RequestMapping; 13 import org.springframework.web.bind.annotation.RequestMapping;
28 import org.springframework.web.bind.annotation.ResponseBody; 14 import org.springframework.web.bind.annotation.ResponseBody;
29 15
  16 +import com.agent.controller.BasicController;
  17 +import com.agent.entity.system.FunctionEntity;
  18 +import com.agent.entity.system.RoleEntity;
  19 +import com.agent.service.system.FunctionService;
  20 +import com.agent.service.system.RoleService;
  21 +import com.agent.vo.ResponseModel;
  22 +import com.agent.vo.Ztree;
  23 +import com.framework.core.Servlets;
  24 +import com.google.common.collect.Lists;
  25 +import com.plugin.easyui.DataGrid;
  26 +import com.plugin.easyui.EasyPage;
30 27
31 @Controller 28 @Controller
32 -@RequestMapping({"/system/role"}) 29 +@RequestMapping({ "/system/role" })
33 public class RoleController extends BasicController { 30 public class RoleController extends BasicController {
34 - 31 +
35 private static final Logger logger = LoggerFactory.getLogger(RoleController.class); 32 private static final Logger logger = LoggerFactory.getLogger(RoleController.class);
36 - 33 +
37 @Resource 34 @Resource
38 private RoleService roleService; 35 private RoleService roleService;
39 - 36 +
40 @Resource 37 @Resource
41 private FunctionService functionService; 38 private FunctionService functionService;
  39 +
42 /** 40 /**
43 * list 页面跳转 41 * list 页面跳转
  42 + *
44 * @return 43 * @return
45 */ 44 */
46 - /*@RequiresRoles("admin")*/  
47 - @RequestMapping({"/list" }) 45 + /* @RequiresRoles("admin") */
  46 + @RequestMapping({ "/list" })
48 public String list() { 47 public String list() {
49 return "system/role/list"; 48 return "system/role/list";
50 } 49 }
51 - 50 +
52 /** 51 /**
53 * 查询分页 52 * 查询分页
  53 + *
54 * @return 54 * @return
55 */ 55 */
56 - @RequestMapping(value="grid.json") 56 + @RequestMapping(value = "grid.json")
57 @ResponseBody 57 @ResponseBody
58 - public DataGrid<RoleEntity> grid(HttpServletRequest request,EasyPage<RoleEntity> pageForm) { 58 + public DataGrid<RoleEntity> grid(HttpServletRequest request, EasyPage<RoleEntity> pageForm) {
59 Map<String, Object> searchParams = Servlets.getParametersStartingWith(request, "search_"); 59 Map<String, Object> searchParams = Servlets.getParametersStartingWith(request, "search_");
60 pageForm.setSearchParams(searchParams); 60 pageForm.setSearchParams(searchParams);
61 pageForm.parseData(roleService.getPage(pageForm)); 61 pageForm.parseData(roleService.getPage(pageForm));
62 return pageForm.getData(); 62 return pageForm.getData();
63 - } 63 + }
64 64
65 /** 65 /**
66 * 编辑页面 66 * 编辑页面
  67 + *
67 * @param id 68 * @param id
68 * @param model 69 * @param model
69 * @return 70 * @return
70 */ 71 */
71 - @RequestMapping(value = {"/edit" }, method = {org.springframework.web.bind.annotation.RequestMethod.GET }) 72 + @RequestMapping(value = { "/edit" }, method = { org.springframework.web.bind.annotation.RequestMethod.GET })
72 public String edit(Long id, Model model) { 73 public String edit(Long id, Model model) {
73 if (id != null) { 74 if (id != null) {
74 RoleEntity entity = this.roleService.findOne(id); 75 RoleEntity entity = this.roleService.findOne(id);
@@ -79,11 +80,12 @@ public class RoleController extends BasicController { @@ -79,11 +80,12 @@ public class RoleController extends BasicController {
79 80
80 /** 81 /**
81 * 查看页面 82 * 查看页面
  83 + *
82 * @param model 84 * @param model
83 * @param id 85 * @param id
84 * @return 86 * @return
85 */ 87 */
86 - @RequestMapping(value = {"/view" }, method = {org.springframework.web.bind.annotation.RequestMethod.GET }) 88 + @RequestMapping(value = { "/view" }, method = { org.springframework.web.bind.annotation.RequestMethod.GET })
87 public String view(Model model, Long id) { 89 public String view(Model model, Long id) {
88 RoleEntity entity = this.roleService.findOne(id); 90 RoleEntity entity = this.roleService.findOne(id);
89 model.addAttribute("entity", entity); 91 model.addAttribute("entity", entity);
@@ -92,10 +94,11 @@ public class RoleController extends BasicController { @@ -92,10 +94,11 @@ public class RoleController extends BasicController {
92 94
93 /** 95 /**
94 * 保存 96 * 保存
  97 + *
95 * @param role 98 * @param role
96 * @return 99 * @return
97 */ 100 */
98 - @RequestMapping(value = {"/save" }, method = {org.springframework.web.bind.annotation.RequestMethod.POST }) 101 + @RequestMapping(value = { "/save" }, method = { org.springframework.web.bind.annotation.RequestMethod.POST })
99 public String save(RoleEntity role) { 102 public String save(RoleEntity role) {
100 try { 103 try {
101 if (!this.roleService.isExsitRolecode(role.getRolecode(), role.getId())) { 104 if (!this.roleService.isExsitRolecode(role.getRolecode(), role.getId())) {
@@ -106,17 +109,18 @@ public class RoleController extends BasicController { @@ -106,17 +109,18 @@ public class RoleController extends BasicController {
106 } 109 }
107 return "redirect:/system/role/list"; 110 return "redirect:/system/role/list";
108 } 111 }
109 - 112 +
110 /** 113 /**
111 * 检查是否存在 114 * 检查是否存在
  115 + *
112 * @param roleId 116 * @param roleId
113 * @param roleCode 117 * @param roleCode
114 * @return 118 * @return
115 */ 119 */
116 - @RequestMapping(value = {"/isExsit" }) 120 + @RequestMapping(value = { "/isExsit" })
117 @ResponseBody 121 @ResponseBody
118 public Boolean isExsit(Long roleId, String roleCode) { 122 public Boolean isExsit(Long roleId, String roleCode) {
119 - boolean result = this.roleService.isExsitRolecode(roleCode,roleId); 123 + boolean result = this.roleService.isExsitRolecode(roleCode, roleId);
120 if (result) { 124 if (result) {
121 return false; 125 return false;
122 } 126 }
@@ -125,10 +129,11 @@ public class RoleController extends BasicController { @@ -125,10 +129,11 @@ public class RoleController extends BasicController {
125 129
126 /** 130 /**
127 * 删除角色 131 * 删除角色
  132 + *
128 * @param ids 133 * @param ids
129 * @return 134 * @return
130 */ 135 */
131 - @RequestMapping(value = {"/delete" }, method = {org.springframework.web.bind.annotation.RequestMethod.POST }) 136 + @RequestMapping(value = { "/delete" }, method = { org.springframework.web.bind.annotation.RequestMethod.POST })
132 @ResponseBody 137 @ResponseBody
133 public ResponseModel delete(String ids) { 138 public ResponseModel delete(String ids) {
134 ResponseModel model = new ResponseModel(); 139 ResponseModel model = new ResponseModel();
@@ -144,20 +149,20 @@ public class RoleController extends BasicController { @@ -144,20 +149,20 @@ public class RoleController extends BasicController {
144 return model; 149 return model;
145 } 150 }
146 151
147 -  
148 - @RequestMapping(value = {"/qryList" }, method = {org.springframework.web.bind.annotation.RequestMethod.POST }) 152 + @RequestMapping(value = { "/qryList" }, method = { org.springframework.web.bind.annotation.RequestMethod.POST })
149 @ResponseBody 153 @ResponseBody
150 public ResponseModel qryList() { 154 public ResponseModel qryList() {
151 List<RoleEntity> list = this.roleService.findAll(); 155 List<RoleEntity> list = this.roleService.findAll();
152 return new ResponseModel(200, "操作成功", list); 156 return new ResponseModel(200, "操作成功", list);
153 } 157 }
154 158
155 - @RequestMapping(value = {"/permission" }, method = {org.springframework.web.bind.annotation.RequestMethod.GET }) 159 + @RequestMapping(value = { "/permission" }, method = { org.springframework.web.bind.annotation.RequestMethod.GET })
156 public String permission() { 160 public String permission() {
157 return "system/role/permission"; 161 return "system/role/permission";
158 } 162 }
159 163
160 - @RequestMapping(value = {"/qryPermission" }, method = {org.springframework.web.bind.annotation.RequestMethod.GET }) 164 + @RequestMapping(value = { "/qryPermission" }, method = {
  165 + org.springframework.web.bind.annotation.RequestMethod.GET })
161 @ResponseBody 166 @ResponseBody
162 public ResponseModel qryPermission(Long id) { 167 public ResponseModel qryPermission(Long id) {
163 RoleEntity role = this.roleService.findOne(id); 168 RoleEntity role = this.roleService.findOne(id);
@@ -177,7 +182,8 @@ public class RoleController extends BasicController { @@ -177,7 +182,8 @@ public class RoleController extends BasicController {
177 return new ResponseModel(200, "操作成功", tree); 182 return new ResponseModel(200, "操作成功", tree);
178 } 183 }
179 184
180 - @RequestMapping(value = {"/savePermission" }, method = {org.springframework.web.bind.annotation.RequestMethod.POST }) 185 + @RequestMapping(value = { "/savePermission" }, method = {
  186 + org.springframework.web.bind.annotation.RequestMethod.POST })
181 @ResponseBody 187 @ResponseBody
182 public ResponseModel savePermission(Long roleId, String permission) { 188 public ResponseModel savePermission(Long roleId, String permission) {
183 ResponseModel response = new ResponseModel(200, "操作成功", null); 189 ResponseModel response = new ResponseModel(200, "操作成功", null);
@@ -8,12 +8,8 @@ import java.util.Map; @@ -8,12 +8,8 @@ import java.util.Map;
8 import javax.annotation.Resource; 8 import javax.annotation.Resource;
9 import javax.servlet.http.HttpServletRequest; 9 import javax.servlet.http.HttpServletRequest;
10 10
11 -import com.agent.entity.agent.BasicAgentEntity;  
12 -import com.agent.service.agent.BasicAgentService;  
13 -import com.agent.vo.agent.UserVo;  
14 import org.apache.commons.collections.CollectionUtils; 11 import org.apache.commons.collections.CollectionUtils;
15 import org.apache.commons.lang.StringUtils; 12 import org.apache.commons.lang.StringUtils;
16 -import org.apache.shiro.authz.annotation.RequiresRoles;  
17 import org.slf4j.Logger; 13 import org.slf4j.Logger;
18 import org.slf4j.LoggerFactory; 14 import org.slf4j.LoggerFactory;
19 import org.springframework.stereotype.Controller; 15 import org.springframework.stereotype.Controller;
@@ -22,17 +18,20 @@ import org.springframework.web.bind.annotation.RequestMapping; @@ -22,17 +18,20 @@ import org.springframework.web.bind.annotation.RequestMapping;
22 import org.springframework.web.bind.annotation.RequestMethod; 18 import org.springframework.web.bind.annotation.RequestMethod;
23 import org.springframework.web.bind.annotation.ResponseBody; 19 import org.springframework.web.bind.annotation.ResponseBody;
24 20
25 -import com.framework.core.Servlets;  
26 -import com.framework.shiro.SessionUtil;  
27 -import com.framework.util.MD5Tools;  
28 -import com.plugin.easyui.DataGrid;  
29 -import com.plugin.easyui.EasyPage;  
30 import com.agent.controller.BasicController; 21 import com.agent.controller.BasicController;
  22 +import com.agent.entity.agent.BasicAgentEntity;
31 import com.agent.entity.system.RoleEntity; 23 import com.agent.entity.system.RoleEntity;
32 import com.agent.entity.system.UserEntity; 24 import com.agent.entity.system.UserEntity;
  25 +import com.agent.service.agent.BasicAgentService;
33 import com.agent.service.system.RoleService; 26 import com.agent.service.system.RoleService;
34 import com.agent.service.system.UserService; 27 import com.agent.service.system.UserService;
35 import com.agent.vo.ResponseModel; 28 import com.agent.vo.ResponseModel;
  29 +import com.agent.vo.agent.UserVo;
  30 +import com.framework.core.Servlets;
  31 +import com.framework.shiro.SessionUtil;
  32 +import com.framework.util.MD5Tools;
  33 +import com.plugin.easyui.DataGrid;
  34 +import com.plugin.easyui.EasyPage;
36 35
37 @Controller 36 @Controller
38 @RequestMapping({"/system/user" }) 37 @RequestMapping({"/system/user" })
@@ -20,7 +20,7 @@ import com.agent.entity.BasicEntity; @@ -20,7 +20,7 @@ import com.agent.entity.BasicEntity;
20 */ 20 */
21 @Entity 21 @Entity
22 @Table(name = "WAYBILL_RECEIPT") 22 @Table(name = "WAYBILL_RECEIPT")
23 -public class WaybillReceiprtEntity extends BasicEntity { 23 +public class WaybillReceiptEntity extends BasicEntity {
24 private String flightno; 24 private String flightno;
25 private Date flightdate; 25 private Date flightdate;
26 private String response_code; 26 private String response_code;
@@ -124,7 +124,7 @@ public class WaybillReceiprtEntity extends BasicEntity { @@ -124,7 +124,7 @@ public class WaybillReceiprtEntity extends BasicEntity {
124 // 该函数主要用于List的contains 124 // 该函数主要用于List的contains
125 public boolean equals(Object mme) { 125 public boolean equals(Object mme) {
126 if (mme != null) { 126 if (mme != null) {
127 - WaybillReceiprtEntity me = (WaybillReceiprtEntity) mme; 127 + WaybillReceiptEntity me = (WaybillReceiptEntity) mme;
128 if (me.getWaybill_no().equalsIgnoreCase(this.getWaybill_no())) { 128 if (me.getWaybill_no().equalsIgnoreCase(this.getWaybill_no())) {
129 return true; 129 return true;
130 } 130 }
@@ -11,7 +11,7 @@ package com.agent.entity.agent; @@ -11,7 +11,7 @@ package com.agent.entity.agent;
11 * 11 *
12 */ 12 */
13 public enum WaybillReceiptType { 13 public enum WaybillReceiptType {
14 - APPLY("已发送预配舱单申请报文", 2), UPDATE("已发送预配舱单修改报文", 4), DELETE("已发送预配舱单删除报文", 3); 14 + TEMP_SAVE("已暂存预配舱单", 1), APPLY("已发送预配舱单申请报文", 2), UPDATE("已发送预配舱单修改报文", 4), DELETE("已发送预配舱单删除报文", 3);
15 15
16 private String name; 16 private String name;
17 private int value; 17 private int value;
@@ -8,22 +8,28 @@ import org.springframework.data.jpa.repository.Query; @@ -8,22 +8,28 @@ import org.springframework.data.jpa.repository.Query;
8 import org.springframework.data.repository.PagingAndSortingRepository; 8 import org.springframework.data.repository.PagingAndSortingRepository;
9 import org.springframework.transaction.annotation.Transactional; 9 import org.springframework.transaction.annotation.Transactional;
10 10
11 -import com.agent.entity.agent.WaybillReceiprtEntity; 11 +import com.agent.entity.agent.WaybillReceiptEntity;
12 12
13 public interface WaybillReceiptRepository 13 public interface WaybillReceiptRepository
14 - extends PagingAndSortingRepository<WaybillReceiprtEntity, Long>, JpaSpecificationExecutor<WaybillReceiprtEntity> { 14 + extends PagingAndSortingRepository<WaybillReceiptEntity, Long>, JpaSpecificationExecutor<WaybillReceiptEntity> {
15 15
16 @Query(value = "SELECT * FROM WAYBILL_RECEIPT WHERE WAYBILL_NO = ?1 AND SUB_WAYBILL_NO = ?2 ORDER BY ID DESC", nativeQuery = true) 16 @Query(value = "SELECT * FROM WAYBILL_RECEIPT WHERE WAYBILL_NO = ?1 AND SUB_WAYBILL_NO = ?2 ORDER BY ID DESC", nativeQuery = true)
17 - public List<WaybillReceiprtEntity> findByWaybillNoAndSub(String waybill_no, String sub_waybill_no); 17 + public List<WaybillReceiptEntity> findByWaybillNoAndSub(String waybill_no, String sub_waybill_no);
  18 +
  19 + @Query(value = "SELECT * FROM WAYBILL_RECEIPT WHERE SUB_WAYBILL_NO = ?1 ORDER BY ID DESC", nativeQuery = true)
  20 + public List<WaybillReceiptEntity> findSubList(String sub_waybill_no);
  21 +
  22 + @Query(value = "SELECT * FROM WAYBILL_RECEIPT WHERE WAYBILL_NO = ?1 AND SUB_WAYBILL_NO IS NULL ORDER BY ID DESC", nativeQuery = true)
  23 + public List<WaybillReceiptEntity> findMainList(String waybill_no);
18 24
19 @Query(value = "SELECT * FROM WAYBILL_RECEIPT WHERE WAYBILL_NO = ?1 ORDER BY ID DESC", nativeQuery = true) 25 @Query(value = "SELECT * FROM WAYBILL_RECEIPT WHERE WAYBILL_NO = ?1 ORDER BY ID DESC", nativeQuery = true)
20 - public List<WaybillReceiprtEntity> findByWaybillNo(String waybill_no); 26 + public List<WaybillReceiptEntity> findByWaybillNo(String waybill_no);
21 27
22 @Query(value = "SELECT * FROM WAYBILL_RECEIPT WHERE ID = ?1 ORDER BY ID DESC", nativeQuery = true) 28 @Query(value = "SELECT * FROM WAYBILL_RECEIPT WHERE ID = ?1 ORDER BY ID DESC", nativeQuery = true)
23 - public List<WaybillReceiprtEntity> findById(String id); 29 + public List<WaybillReceiptEntity> findById(String id);
24 30
25 @Query(value = "SELECT * FROM WAYBILL_RECEIPT ORDER BY ID DESC", nativeQuery = true) 31 @Query(value = "SELECT * FROM WAYBILL_RECEIPT ORDER BY ID DESC", nativeQuery = true)
26 - public List<WaybillReceiprtEntity> getAll(); 32 + public List<WaybillReceiptEntity> getAll();
27 33
28 @Modifying 34 @Modifying
29 @Query(value = "DELETE FROM WAYBILL_RECEIPT WHERE ID = ?1", nativeQuery = true) 35 @Query(value = "DELETE FROM WAYBILL_RECEIPT WHERE ID = ?1", nativeQuery = true)
@@ -37,5 +43,5 @@ public interface WaybillReceiptRepository @@ -37,5 +43,5 @@ public interface WaybillReceiptRepository
37 String waybill_no, String sub_waybill_no, String carrier, String message_type,String sendtime); 43 String waybill_no, String sub_waybill_no, String carrier, String message_type,String sendtime);
38 44
39 @Query(value = "SELECT * FROM WAYBILL_RECEIPT WHERE ID=?1", nativeQuery = true) 45 @Query(value = "SELECT * FROM WAYBILL_RECEIPT WHERE ID=?1", nativeQuery = true)
40 - public List<WaybillReceiprtEntity> queryById(Long id); 46 + public List<WaybillReceiptEntity> queryById(Long id);
41 } 47 }
@@ -15,6 +15,7 @@ import org.springframework.transaction.annotation.Transactional; @@ -15,6 +15,7 @@ import org.springframework.transaction.annotation.Transactional;
15 import com.agent.entity.Constant; 15 import com.agent.entity.Constant;
16 import com.agent.entity.agent.ManifestEntity; 16 import com.agent.entity.agent.ManifestEntity;
17 import com.agent.entity.agent.PreparesecondaryEntity; 17 import com.agent.entity.agent.PreparesecondaryEntity;
  18 +import com.agent.entity.agent.WaybillReceiptEntity;
18 import com.agent.entity.agent.WaybillReceiptType; 19 import com.agent.entity.agent.WaybillReceiptType;
19 import com.agent.repository.agent.ManifestBillRepository; 20 import com.agent.repository.agent.ManifestBillRepository;
20 import com.agent.repository.agent.ManifestCommodityRepository; 21 import com.agent.repository.agent.ManifestCommodityRepository;
@@ -116,6 +117,9 @@ public class ManifestService extends BasicService<ManifestEntity> { @@ -116,6 +117,9 @@ public class ManifestService extends BasicService<ManifestEntity> {
116 117
117 @Resource 118 @Resource
118 private ManifestService manifestService; 119 private ManifestService manifestService;
  120 +
  121 + @Resource
  122 + private WaybillReceiptService receiptService;
119 123
120 /** 124 /**
121 * 分页查询 125 * 分页查询
@@ -129,6 +133,15 @@ public class ManifestService extends BasicService<ManifestEntity> { @@ -129,6 +133,15 @@ public class ManifestService extends BasicService<ManifestEntity> {
129 Specification<ManifestEntity> spec = buildSpecification(pageForm); 133 Specification<ManifestEntity> spec = buildSpecification(pageForm);
130 134
131 Page<ManifestEntity> page = manifestRepository.findAll(spec, pageRequest); 135 Page<ManifestEntity> page = manifestRepository.findAll(spec, pageRequest);
  136 + if(page!=null&&page.getContent()!=null) {
  137 + List<ManifestEntity> list = page.getContent();
  138 + for (int i = 0; i < list.size(); i++) {
  139 + ManifestEntity bean = list.get(i);
  140 + WaybillReceiptEntity re = receiptService.findByWaybillNo(bean.getWaybillnomaster());
  141 + bean.setResponse_code(re!=null?re.getResponse_code():"");
  142 + bean.setResponse_text(re!=null?re.getResponse_text():"");
  143 + }
  144 + }
132 return page; 145 return page;
133 } 146 }
134 147
@@ -8,6 +8,7 @@ import org.springframework.stereotype.Service; @@ -8,6 +8,7 @@ import org.springframework.stereotype.Service;
8 import org.springframework.transaction.annotation.Transactional; 8 import org.springframework.transaction.annotation.Transactional;
9 9
10 import com.agent.entity.agent.PreparesecondaryEntity; 10 import com.agent.entity.agent.PreparesecondaryEntity;
  11 +import com.agent.entity.agent.WaybillReceiptEntity;
11 import com.agent.repository.agent.PreparesecondaryRepository; 12 import com.agent.repository.agent.PreparesecondaryRepository;
12 import com.agent.service.BasicService; 13 import com.agent.service.BasicService;
13 14
@@ -30,7 +31,17 @@ public class PreparesecondaryService extends BasicService<PreparesecondaryEntity @@ -30,7 +31,17 @@ public class PreparesecondaryService extends BasicService<PreparesecondaryEntity
30 } 31 }
31 32
32 public List<PreparesecondaryEntity> findByMawbId(Long id) { 33 public List<PreparesecondaryEntity> findByMawbId(Long id) {
33 - return preparesecondaryRepository.findByMawbId(id); 34 + List<PreparesecondaryEntity> list = preparesecondaryRepository.findByMawbId(id);
  35 + if(list!=null) {
  36 + for (int i = 0; i < list.size(); i++) {
  37 + PreparesecondaryEntity bean = list.get(i);
  38 + WaybillReceiptEntity re = receiptService.findByWaybillNoAndSub(bean.getWaybillnomaster(), bean.getWaybillnosecondary());
  39 + bean.setResponse_code(re!=null?re.getResponse_code():"");
  40 + bean.setResponse_text(re!=null?re.getResponse_text():"");
  41 + }
  42 + }
  43 +
  44 + return list;
34 } 45 }
35 46
36 public PreparesecondaryEntity findOne(Long mawbId) { 47 public PreparesecondaryEntity findOne(Long mawbId) {
@@ -12,7 +12,7 @@ import org.springframework.transaction.annotation.Transactional; @@ -12,7 +12,7 @@ import org.springframework.transaction.annotation.Transactional;
12 import com.agent.entity.Constant; 12 import com.agent.entity.Constant;
13 import com.agent.entity.agent.ManifestEntity; 13 import com.agent.entity.agent.ManifestEntity;
14 import com.agent.entity.agent.PreparesecondaryEntity; 14 import com.agent.entity.agent.PreparesecondaryEntity;
15 -import com.agent.entity.agent.WaybillReceiprtEntity; 15 +import com.agent.entity.agent.WaybillReceiptEntity;
16 import com.agent.entity.agent.WaybillReceiptType; 16 import com.agent.entity.agent.WaybillReceiptType;
17 import com.agent.repository.agent.WaybillReceiptRepository; 17 import com.agent.repository.agent.WaybillReceiptRepository;
18 import com.agent.service.BasicService; 18 import com.agent.service.BasicService;
@@ -36,7 +36,7 @@ import tools.Tools; @@ -36,7 +36,7 @@ import tools.Tools;
36 * 36 *
37 */ 37 */
38 @Service 38 @Service
39 -public class WaybillReceiptService extends BasicService<WaybillReceiprtEntity> { 39 +public class WaybillReceiptService extends BasicService<WaybillReceiptEntity> {
40 40
41 @Resource 41 @Resource
42 private WaybillReceiptRepository service; 42 private WaybillReceiptRepository service;
@@ -49,23 +49,33 @@ public class WaybillReceiptService extends BasicService<WaybillReceiprtEntity> { @@ -49,23 +49,33 @@ public class WaybillReceiptService extends BasicService<WaybillReceiprtEntity> {
49 } 49 }
50 } 50 }
51 51
52 - public WaybillReceiprtEntity findByWaybillNoAndSub(String waybill_no, String sub_waybill_no) {  
53 - List<WaybillReceiprtEntity> consigns = service.findByWaybillNoAndSub(waybill_no, sub_waybill_no); 52 + public WaybillReceiptEntity findByWaybillNoAndSub(String waybill_no, String sub_waybill_no) {
  53 + List<WaybillReceiptEntity> consigns = service.findByWaybillNoAndSub(waybill_no, sub_waybill_no);
54 if (CollectionUtils.isNotEmpty(consigns)) { 54 if (CollectionUtils.isNotEmpty(consigns)) {
55 return consigns.get(0); 55 return consigns.get(0);
56 } 56 }
57 return null; 57 return null;
58 } 58 }
59 59
60 - public WaybillReceiprtEntity findByWaybillNo(String waybill_no) {  
61 - List<WaybillReceiprtEntity> consigns = service.findByWaybillNo(waybill_no); 60 + public List<WaybillReceiptEntity> findMainList(String waybill_no) {
  61 + List<WaybillReceiptEntity> list = service.findMainList(waybill_no);
  62 + return list;
  63 + }
  64 +
  65 + public List<WaybillReceiptEntity> findSubList(String sub_waybill_no) {
  66 + List<WaybillReceiptEntity> list = service.findSubList(sub_waybill_no);
  67 + return list;
  68 + }
  69 +
  70 + public WaybillReceiptEntity findByWaybillNo(String waybill_no) {
  71 + List<WaybillReceiptEntity> consigns = service.findMainList(waybill_no);
62 if (CollectionUtils.isNotEmpty(consigns)) { 72 if (CollectionUtils.isNotEmpty(consigns)) {
63 return consigns.get(0); 73 return consigns.get(0);
64 } 74 }
65 return null; 75 return null;
66 } 76 }
67 77
68 - public void save(WaybillReceiprtEntity c) { 78 + public void save(WaybillReceiptEntity c) {
69 if (c != null) { 79 if (c != null) {
70 if (c.getCreateDate() == null) { 80 if (c.getCreateDate() == null) {
71 c.setCreateDate(new Date()); 81 c.setCreateDate(new Date());
@@ -78,15 +88,15 @@ public class WaybillReceiptService extends BasicService<WaybillReceiprtEntity> { @@ -78,15 +88,15 @@ public class WaybillReceiptService extends BasicService<WaybillReceiprtEntity> {
78 } 88 }
79 } 89 }
80 90
81 - public List<WaybillReceiprtEntity> findAll() { 91 + public List<WaybillReceiptEntity> findAll() {
82 return service.getAll(); 92 return service.getAll();
83 } 93 }
84 94
85 - public void update(WaybillReceiprtEntity c) { 95 + public void update(WaybillReceiptEntity c) {
86 service.save(c); 96 service.save(c);
87 } 97 }
88 98
89 - public List<WaybillReceiprtEntity> findById(String id) { 99 + public List<WaybillReceiptEntity> findById(String id) {
90 return service.findById(id); 100 return service.findById(id);
91 } 101 }
92 102
@@ -98,7 +108,7 @@ public class WaybillReceiptService extends BasicService<WaybillReceiprtEntity> { @@ -98,7 +108,7 @@ public class WaybillReceiptService extends BasicService<WaybillReceiprtEntity> {
98 */ 108 */
99 public void saveFromManifest(ManifestEntity manifest, WaybillReceiptType type) { 109 public void saveFromManifest(ManifestEntity manifest, WaybillReceiptType type) {
100 if (manifest != null) { 110 if (manifest != null) {
101 - WaybillReceiprtEntity wre = new WaybillReceiprtEntity(); 111 + WaybillReceiptEntity wre = new WaybillReceiptEntity();
102 wre.setCarrier(manifest.getCarrier()); 112 wre.setCarrier(manifest.getCarrier());
103 wre.setFlightdate(manifest.getFlightdate()); 113 wre.setFlightdate(manifest.getFlightdate());
104 wre.setFlightno(manifest.getFlightno()); 114 wre.setFlightno(manifest.getFlightno());
@@ -113,11 +123,13 @@ public class WaybillReceiptService extends BasicService<WaybillReceiprtEntity> { @@ -113,11 +123,13 @@ public class WaybillReceiptService extends BasicService<WaybillReceiprtEntity> {
113 wre.setWeight(manifest.getPreparetotalweight()); 123 wre.setWeight(manifest.getPreparetotalweight());
114 save(wre); 124 save(wre);
115 125
116 - ManifestService mbs = new ManifestService();  
117 - DeclareXmlBody dpxb = mbs.generateWaybillReceiptXml(manifest, type, null);  
118 - String dpxbPath = CustomMessageKit.getMessagePath("manifest");  
119 - XmlUtil.convertToXml2(dpxb, dpxbPath);  
120 - RemoteFileKit.putFile(dpxbPath); 126 + if (type != WaybillReceiptType.TEMP_SAVE) {
  127 + ManifestService mbs = new ManifestService();
  128 + DeclareXmlBody dpxb = mbs.generateWaybillReceiptXml(manifest, type, null);
  129 + String dpxbPath = CustomMessageKit.getMessagePath("manifest");
  130 + XmlUtil.convertToXml2(dpxb, dpxbPath);
  131 + RemoteFileKit.putFile(dpxbPath);
  132 + }
121 } 133 }
122 } 134 }
123 135
@@ -129,7 +141,7 @@ public class WaybillReceiptService extends BasicService<WaybillReceiprtEntity> { @@ -129,7 +141,7 @@ public class WaybillReceiptService extends BasicService<WaybillReceiprtEntity> {
129 */ 141 */
130 public void saveFromPreparesecondary(PreparesecondaryEntity prepare, WaybillReceiptType type) { 142 public void saveFromPreparesecondary(PreparesecondaryEntity prepare, WaybillReceiptType type) {
131 if (prepare != null) { 143 if (prepare != null) {
132 - WaybillReceiprtEntity wre = new WaybillReceiprtEntity(); 144 + WaybillReceiptEntity wre = new WaybillReceiptEntity();
133 wre.setCarrier(prepare.getCarrier()); 145 wre.setCarrier(prepare.getCarrier());
134 wre.setFlightdate(prepare.getFlightdate()); 146 wre.setFlightdate(prepare.getFlightdate());
135 wre.setFlightno(prepare.getFlightno()); 147 wre.setFlightno(prepare.getFlightno());
@@ -145,12 +157,14 @@ public class WaybillReceiptService extends BasicService<WaybillReceiprtEntity> { @@ -145,12 +157,14 @@ public class WaybillReceiptService extends BasicService<WaybillReceiprtEntity> {
145 wre.setWeight(prepare.getPrepareweight()); 157 wre.setWeight(prepare.getPrepareweight());
146 save(wre); 158 save(wre);
147 159
148 - ManifestService mbs = new ManifestService();  
149 - DeclareXmlBody dpxb = mbs.generateWaybillReceiptXml(prepare, type, null);  
150 - String dpxbPath = CustomMessageKit.getMessagePath("secondary");  
151 - XmlUtil.convertToXml2(dpxb, dpxbPath);  
152 - RemoteFileKit.putFile(dpxbPath);  
153 - }else { 160 + if (type != WaybillReceiptType.TEMP_SAVE) {
  161 + ManifestService mbs = new ManifestService();
  162 + DeclareXmlBody dpxb = mbs.generateWaybillReceiptXml(prepare, type, null);
  163 + String dpxbPath = CustomMessageKit.getMessagePath("secondary");
  164 + XmlUtil.convertToXml2(dpxb, dpxbPath);
  165 + RemoteFileKit.putFile(dpxbPath);
  166 + }
  167 + } else {
154 System.err.println("prepare is null"); 168 System.err.println("prepare is null");
155 } 169 }
156 } 170 }
@@ -183,7 +183,7 @@ public class FSXmlKit { @@ -183,7 +183,7 @@ public class FSXmlKit {
183 sliMasterConsignment.setSpecifiedLogisticsTransportMovement(transport); 183 sliMasterConsignment.setSpecifiedLogisticsTransportMovement(transport);
184 184
185 HandlingInstructions handlingInstructions = new HandlingInstructions(); 185 HandlingInstructions handlingInstructions = new HandlingInstructions();
186 - handlingInstructions.setDescriptionCode(me.getProductname()); 186 + handlingInstructions.setDescriptionCode(me.getSpecialgoodscode());
187 handlingInstructions.setDescription(me.getSpecialgoodscode()); 187 handlingInstructions.setDescription(me.getSpecialgoodscode());
188 sliMasterConsignment.setHandlingInstructions(handlingInstructions); 188 sliMasterConsignment.setHandlingInstructions(handlingInstructions);
189 189
@@ -398,7 +398,7 @@ public class FSXmlKit { @@ -398,7 +398,7 @@ public class FSXmlKit {
398 includedHouseConsignment.setSpecifiedLogisticsTransportMovement(transport); 398 includedHouseConsignment.setSpecifiedLogisticsTransportMovement(transport);
399 399
400 HandlingInstructions handlingInstructions = new HandlingInstructions(); 400 HandlingInstructions handlingInstructions = new HandlingInstructions();
401 - handlingInstructions.setDescriptionCode(pe.getProductname()); 401 + handlingInstructions.setDescriptionCode(pe.getSpecialgoodscode());
402 handlingInstructions.setDescription(pe.getSpecialgoodscode()); 402 handlingInstructions.setDescription(pe.getSpecialgoodscode());
403 includedHouseConsignment.setHandlingInstructions(handlingInstructions); 403 includedHouseConsignment.setHandlingInstructions(handlingInstructions);
404 404
@@ -6,6 +6,8 @@ import com.agent.entity.Constant; @@ -6,6 +6,8 @@ import com.agent.entity.Constant;
6 import com.agent.xml.common.XmlUtil; 6 import com.agent.xml.common.XmlUtil;
7 import com.agent.xml.fhlsli.fhl.HouseWaybill; 7 import com.agent.xml.fhlsli.fhl.HouseWaybill;
8 8
  9 +import tools.NumKit;
  10 +
9 /** 11 /**
10 * Depiction: 12 * Depiction:
11 * <p> 13 * <p>
@@ -22,35 +24,22 @@ public class Test { @@ -22,35 +24,22 @@ public class Test {
22 } 24 }
23 25
24 public static void main(String[] args) { 26 public static void main(String[] args) {
25 - FhlCcs ccs = new FhlCcs();  
26 -  
27 - Meta meta = new Meta();  
28 - meta.setSndr("NDLR");  
29 - meta.setSeqn("4565432567");  
30 - meta.setDttm(Constant.dateTimeFormatnumber.format(new Date()));  
31 - meta.setType("SLI");  
32 - meta.setStyp("SLI");  
33 - meta.setRcvr("");  
34 - meta.setAck("N");  
35 - meta.setVer("01"); 27 + String no = "784-28567862";
  28 + String[] array = no.split("-");
  29 + String end = array[1];
  30 + int number = NumKit.parseInt(end);
  31 + int remainder = number / 10 % 7;
  32 + int last = number % 10;
36 33
37 - Dests dests = new Dests();  
38 - Dest dest = new Dest();  
39 - dest.setSita("111111111");  
40 - dest.setDest("kkkkkkkk");  
41 - dests.setDest(dest);  
42 - meta.setDests(dests); 34 + System.err.println("===================================");
  35 + System.err.println("remainder-->"+remainder);
  36 + System.err.println("last-->"+last);
43 37
44 - ccs.setMeta(meta);  
45 -  
46 - FhlMain main = new FhlMain();  
47 - HouseWaybill houseWaybill = new HouseWaybill();  
48 - main.setHouseWaybill(houseWaybill);  
49 - ccs.setMain(main);  
50 -  
51 - String xml = XmlUtil.convertToXml(ccs);  
52 - System.err.println();  
53 - System.err.println(xml); 38 + if (remainder == last) {
  39 + System.err.println(true);
  40 + } else {
  41 + System.err.println(false);
  42 + }
54 } 43 }
55 44
56 } 45 }
1 package tools; 1 package tools;
2 2
  3 +import java.text.DecimalFormat;
  4 +
  5 +import org.apache.commons.lang3.StringUtils;
  6 +
3 /** 7 /**
4 * Depiction: 8 * Depiction:
5 * <p> 9 * <p>
@@ -12,7 +16,7 @@ package tools; @@ -12,7 +16,7 @@ package tools;
12 */ 16 */
13 public class NumKit { 17 public class NumKit {
14 18
15 - public static int parseString2Int(String str) { 19 + public static int parseInt(String str) {
16 int num = 0; 20 int num = 0;
17 try { 21 try {
18 num = Integer.parseInt(str); 22 num = Integer.parseInt(str);
@@ -21,4 +25,63 @@ public class NumKit { @@ -21,4 +25,63 @@ public class NumKit {
21 return num; 25 return num;
22 } 26 }
23 27
  28 + public static float parseFloat(String str) {
  29 + float num = 0;
  30 + try {
  31 + num = Float.parseFloat(str);
  32 + } catch (Exception e) {
  33 + }
  34 + return num;
  35 + }
  36 +
  37 + /**
  38 + * 截取字符串
  39 + *
  40 + * @param source
  41 + * 原串
  42 + * @param number
  43 + * 前几位
  44 + * @return
  45 + */
  46 + public static String subStr(String source, int number) {
  47 + if (StringUtils.isBlank(source)) {
  48 + return "";
  49 + }
  50 +
  51 + int length = source.length();
  52 + if (length >= number) {
  53 + source = source.substring(0, number);
  54 + }
  55 + return source;
  56 + }
  57 +
  58 + /**
  59 + * 格式化浮点数字
  60 + *
  61 + * @param number
  62 + * 原始数据字符串
  63 + * @param count
  64 + * 小数点位数
  65 + * @return String
  66 + */
  67 + public static String formatNumber(String number, int count) {
  68 + count = count >= 0 ? count : 0;
  69 +
  70 + float tmp = 0.f;
  71 + try {
  72 + tmp = Float.parseFloat(number);
  73 + } catch (Exception e) {
  74 + }
  75 + DecimalFormat format = new DecimalFormat("0");
  76 + if (count > 0) {
  77 + StringBuffer pattern = new StringBuffer();
  78 + pattern.append("0.");
  79 + for (int i = 0; i < count; i++) {
  80 + pattern.append("0");
  81 + }
  82 + format = new DecimalFormat(pattern.toString());
  83 + }
  84 +
  85 + return format.format(tmp);
  86 + }
24 } 87 }
@@ -36,6 +36,7 @@ opt.pleasesave=Please Save @@ -36,6 +36,7 @@ opt.pleasesave=Please Save
36 opt.success=Success 36 opt.success=Success
37 opt.operator=Operator 37 opt.operator=Operator
38 opt.backout=Back Out 38 opt.backout=Back Out
  39 +opt.open.receipt=See Receipt
39 40
40 menu.name=Menu List 41 menu.name=Menu List
41 menu.system=System 42 menu.system=System
@@ -375,7 +376,7 @@ track.no=Freight Waybill No @@ -375,7 +376,7 @@ track.no=Freight Waybill No
375 376
376 ### 377 ###
377 manifest.carrier.tip=Please enter two words, for example, CA 378 manifest.carrier.tip=Please enter two words, for example, CA
378 -manifest.carrier.flightno.tip=Please enter flightno, for example, 999 379 +manifest.carrier.flightno.tip=Please enter flightno, for example, CA999
379 manifest.enterprise.code=Enterprise Code 380 manifest.enterprise.code=Enterprise Code
380 manifest.enterprise.code.type=Select Code Type 381 manifest.enterprise.code.type=Select Code Type
381 manifest.list=Manifest List 382 manifest.list=Manifest List
@@ -518,7 +519,7 @@ manifest.number.of.fittings=Number Of Fittings @@ -518,7 +519,7 @@ manifest.number.of.fittings=Number Of Fittings
518 manifest.pre.weight=Pre Weight 519 manifest.pre.weight=Pre Weight
519 manifest.customs.status=Customs Status 520 manifest.customs.status=Customs Status
520 manifest.payment.method=Payment Method 521 manifest.payment.method=Payment Method
521 -manifest.description.of.the.goods=Description Of The Doods 522 +manifest.description.of.the.goods=Description Of The Goods
522 manifest.fitting.time=Fitting Time 523 manifest.fitting.time=Fitting Time
523 manifest.customs=Customs 524 manifest.customs=Customs
524 manifest.agent.name=Agent Name 525 manifest.agent.name=Agent Name
@@ -36,6 +36,7 @@ opt.pleasesave=\u8bf7\u5148\u4fdd\u5b58 @@ -36,6 +36,7 @@ opt.pleasesave=\u8bf7\u5148\u4fdd\u5b58
36 opt.success=\u6210\u529f 36 opt.success=\u6210\u529f
37 opt.operator=\u64CD\u4F5C 37 opt.operator=\u64CD\u4F5C
38 opt.backout=\u64A4\u9500 38 opt.backout=\u64A4\u9500
  39 +opt.open.receipt=\u67E5\u770B\u56DE\u6267
39 40
40 41
41 menu.name=\u529F\u80FD\u83DC\u5355 42 menu.name=\u529F\u80FD\u83DC\u5355
@@ -120,7 +121,7 @@ delivery.volume=\u4f53\u79ef\uff08\u7acb\u65b9\u7c73\uff09 @@ -120,7 +121,7 @@ delivery.volume=\u4f53\u79ef\uff08\u7acb\u65b9\u7c73\uff09
120 delivery.weight=\u91cd\u91cf 121 delivery.weight=\u91cd\u91cf
121 delivery.mailnum=\u90ae\u4ef6\u5355\u8bc1\u53f7 122 delivery.mailnum=\u90ae\u4ef6\u5355\u8bc1\u53f7
122 delivery.pieces=\u4ef6\u6570 123 delivery.pieces=\u4ef6\u6570
123 -delivery.productname=\u54c1\u540d 124 +delivery.productname=\u8D27\u7269\u54c1\u540d
124 delivery.reviewpieces=\u590d\u6838\u4ef6\u6570 125 delivery.reviewpieces=\u590d\u6838\u4ef6\u6570
125 delivery.reviewweight=\u590d\u6838\u91cd\u91cf 126 delivery.reviewweight=\u590d\u6838\u91cd\u91cf
126 delivery.subelemet=\u5206\u5355\u4fe1\u606f 127 delivery.subelemet=\u5206\u5355\u4fe1\u606f
@@ -377,7 +378,7 @@ track.no=\u8D27\u8FD0\u5355\u53F7 @@ -377,7 +378,7 @@ track.no=\u8D27\u8FD0\u5355\u53F7
377 378
378 ### 379 ###
379 manifest.carrier.tip=\u8BF7\u8F93\u5165\u822A\u53F8\u4E8C\u5B57\u7801,\u4F8B\u5982\uFF1ACA 380 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 381 +manifest.carrier.flightno.tip=\u8BF7\u8F93\u5165\u822A\u73ED\u53F7\uFF0C\u4F8B\u5982\uFF1ACA999
381 manifest.enterprise.code=\u4F01\u4E1A\u4EE3\u7801 382 manifest.enterprise.code=\u4F01\u4E1A\u4EE3\u7801
382 manifest.enterprise.code.type=\u8BF7\u9009\u62E9\u4EE3\u7801\u7C7B\u578B 383 manifest.enterprise.code.type=\u8BF7\u9009\u62E9\u4EE3\u7801\u7C7B\u578B
383 manifest.list=\u9884\u914D\u8231\u5355\u5217\u8868 384 manifest.list=\u9884\u914D\u8231\u5355\u5217\u8868
@@ -37,7 +37,7 @@ @@ -37,7 +37,7 @@
37 <tbody> 37 <tbody>
38 <tr> 38 <tr>
39 <td><spring:message code="manifest.company" /><span class="required_span">*</span></td> 39 <td><spring:message code="manifest.company" /><span class="required_span">*</span></td>
40 - <td colspan="5"><input type="text" name="co_company" id="co_company" 40 + <td colspan="5"><input type="text" name="co_company" id="co_company" maxlength="70"
41 value="${consignor.co_company}" autocomplete="off" class="layui-input" required 41 value="${consignor.co_company}" autocomplete="off" class="layui-input" required
42 maxlength="45" oninput="onInputChange(event,'co_company','oninput')" 42 maxlength="45" oninput="onInputChange(event,'co_company','oninput')"
43 onpropertychange="onInputChange(event,'co_company','onpropertychange')"></td> 43 onpropertychange="onInputChange(event,'co_company','onpropertychange')"></td>
@@ -45,11 +45,11 @@ @@ -45,11 +45,11 @@
45 45
46 <tr> 46 <tr>
47 <td><spring:message code="manifest.send_name" /><span class="required_span">*</span></td> 47 <td><spring:message code="manifest.send_name" /><span class="required_span">*</span></td>
48 - <td><input type="text" name="co_name" value="${consignor.co_name}"  
49 - autocomplete="off" class="layui-input" required maxlength="45"></td> 48 + <td><input type="text" name="co_name" value="${consignor.co_name}" maxlength="70"
  49 + autocomplete="off" class="layui-input" required maxlength="50"></td>
50 <td><spring:message code="manifest.telephone" /></td> 50 <td><spring:message code="manifest.telephone" /></td>
51 <td><input type="text" name="co_telephone" placeholder="<spring:message code="manifest.fhr.fh_placeholder"/>" 51 <td><input type="text" name="co_telephone" placeholder="<spring:message code="manifest.fhr.fh_placeholder"/>"
52 - value="${consignor.co_telephone}" autocomplete="off" class="layui-input" maxlength="45"></td> 52 + value="${consignor.co_telephone}" autocomplete="off" class="layui-input" maxlength="50"></td>
53 <td><spring:message code="manifest.fax" /></td> 53 <td><spring:message code="manifest.fax" /></td>
54 <td><input type="text" name="co_fax" placeholder="<spring:message code="manifest.fhr.fh_placeholder"/>" value="${consignor.co_fax}" 54 <td><input type="text" name="co_fax" placeholder="<spring:message code="manifest.fhr.fh_placeholder"/>" value="${consignor.co_fax}"
55 autocomplete="off" class="layui-input" maxlength="45"></td> 55 autocomplete="off" class="layui-input" maxlength="45"></td>
@@ -59,29 +59,29 @@ @@ -59,29 +59,29 @@
59 <tr> 59 <tr>
60 <td><spring:message code="manifest.country" /><span class="required_span">*</span></td> 60 <td><spring:message code="manifest.country" /><span class="required_span">*</span></td>
61 <td><input required type="text" name="co_country" value="${consignor.co_country}" 61 <td><input required type="text" name="co_country" value="${consignor.co_country}"
62 - autocomplete="off" class="layui-input" maxlength="45"></td> 62 + autocomplete="off" class="layui-input" maxlength="2"></td>
63 <td><spring:message code="manifest.city" /></td> 63 <td><spring:message code="manifest.city" /></td>
64 <td><input type="text" name="co_city" 64 <td><input type="text" name="co_city"
65 - value="${consignor.co_city}" autocomplete="off" class="layui-input" required maxlength="45"></td> 65 + value="${consignor.co_city}" autocomplete="off" class="layui-input" required maxlength="70"></td>
66 <td><spring:message code="manifest.zip.code" /></td> 66 <td><spring:message code="manifest.zip.code" /></td>
67 <td><input type="text" name="co_zipcode" value="${consignor.co_zipcode}" 67 <td><input type="text" name="co_zipcode" value="${consignor.co_zipcode}"
68 - autocomplete="off" class="layui-input" maxlength="45"></td> 68 + autocomplete="off" class="layui-input" maxlength="9"></td>
69 </tr> 69 </tr>
70 70
71 <tr> 71 <tr>
72 <td><spring:message code="manifest.address" /><span class="required_span">*</span></td> 72 <td><spring:message code="manifest.address" /><span class="required_span">*</span></td>
73 <td colspan="5"><input required type="text" name="co_address" 73 <td colspan="5"><input required type="text" name="co_address"
74 - value="${consignor.co_address}" autocomplete="off" class="layui-input" maxlength="45"></td> 74 + value="${consignor.co_address}" autocomplete="off" class="layui-input" maxlength="70"></td>
75 </tr> 75 </tr>
76 76
77 <tr> 77 <tr>
78 <td><spring:message code="manifest.fhr.shpcusid" /><span class="required_span">*</span></td> 78 <td><spring:message code="manifest.fhr.shpcusid" /><span class="required_span">*</span></td>
79 <td><input id="shpcusid" type="text" name="shpcusid" value="${consignor.shpcusid}" 79 <td><input id="shpcusid" type="text" name="shpcusid" value="${consignor.shpcusid}"
80 - autocomplete="off" class="layui-input" maxlength="45" oninput="onInputChange(event,'shpcusid','oninput')" 80 + autocomplete="off" class="layui-input" maxlength="100" oninput="onInputChange(event,'shpcusid','oninput')"
81 onpropertychange="onInputChange(event,'shpcusid','onpropertychange')"></td> 81 onpropertychange="onInputChange(event,'shpcusid','onpropertychange')"></td>
82 <td><spring:message code="manifest.fhr.shpaeo" /></td> 82 <td><spring:message code="manifest.fhr.shpaeo" /></td>
83 <td colspan="3"><input type="text" name="shpaeo" id="shpaeo" 83 <td colspan="3"><input type="text" name="shpaeo" id="shpaeo"
84 - value="${consignor.shpaeo}" autocomplete="off" class="layui-input" maxlength="45" 84 + value="${consignor.shpaeo}" autocomplete="off" class="layui-input" maxlength="20"
85 oninput="onInputChange(event,'shpaeo','oninput')" 85 oninput="onInputChange(event,'shpaeo','oninput')"
86 onpropertychange="onInputChange(event,'shpaeo','onpropertychange')"></td> 86 onpropertychange="onInputChange(event,'shpaeo','onpropertychange')"></td>
87 </tr> 87 </tr>
@@ -76,7 +76,7 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request. @@ -76,7 +76,7 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.
76 <i class="iconfont">&#xe642;</i> 76 <i class="iconfont">&#xe642;</i>
77 </a> 77 </a>
78 <ul class="sider-nav-s"> 78 <ul class="sider-nav-s">
79 - <li class="active"><a href="javascript:void(0)" onclick="addTab('<spring:message code="menu.role" />||system/role/list',this)"><spring:message code="menu.role" /></a></li> 79 + <li><a href="javascript:void(0)" onclick="addTab('<spring:message code="menu.role" />||system/role/list',this)"><spring:message code="menu.role" /></a></li>
80 <li><a href="javascript:void(0)" onclick="addTab('<spring:message code="menu.agent" />||agent/list',this)"><spring:message code="menu.agent" /></a></li> 80 <li><a href="javascript:void(0)" onclick="addTab('<spring:message code="menu.agent" />||agent/list',this)"><spring:message code="menu.agent" /></a></li>
81 <li><a href="javascript:void(0)" onclick="addTab('<spring:message code="menu.user" />||system/user/list',this)"><spring:message code="menu.user" /></a></li> 81 <li><a href="javascript:void(0)" onclick="addTab('<spring:message code="menu.user" />||system/user/list',this)"><spring:message code="menu.user" /></a></li>
82 <%-- <li><a href="javascript:void(0)" onclick="addTab('<spring:message code="menu.consignee_info_set" />||consignee/list')"><spring:message code="menu.consignee_info_set" /></a></li> --%> 82 <%-- <li><a href="javascript:void(0)" onclick="addTab('<spring:message code="menu.consignee_info_set" />||consignee/list')"><spring:message code="menu.consignee_info_set" /></a></li> --%>
@@ -130,7 +130,7 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request. @@ -130,7 +130,7 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.
130 </a> 130 </a>
131 </li> 131 </li>
132 132
133 - <li> 133 + <li class="active">
134 <a href="javascript:void(0)" onclick="addTab('<spring:message code="menu.premanifest" />||manifest/list',this)"> 134 <a href="javascript:void(0)" onclick="addTab('<spring:message code="menu.premanifest" />||manifest/list',this)">
135 <span class="iconfont sider-nav-icon">&#xe6c3;</span> 135 <span class="iconfont sider-nav-icon">&#xe6c3;</span>
136 <span class="sider-nav-title"><spring:message code="menu.premanifest" /></span> 136 <span class="sider-nav-title"><spring:message code="menu.premanifest" /></span>
@@ -163,8 +163,8 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request. @@ -163,8 +163,8 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.
163 </style> 163 </style>
164 <div id="pf-page"> 164 <div id="pf-page">
165 <div class="easyui-tabs1" style="width:100%;height:100%;"> 165 <div class="easyui-tabs1" style="width:100%;height:100%;">
166 - <div title='<spring:message code="menu.zhawb" />' data-options="closable:true">  
167 - <iframe class="page-iframe" src="<%=basePath %>bill/list?type=domestic" frameborder="no" border="no" height="100%" width="100%" scrolling="auto"></iframe> 166 + <div title='<spring:message code="menu.premanifest" />' data-options="closable:true">
  167 + <iframe class="page-iframe" src="<%=basePath %>manifest/list?type=domestic" frameborder="no" border="no" height="100%" width="100%" scrolling="auto"></iframe>
168 </div> 168 </div>
169 </div> 169 </div>
170 </div> 170 </div>
@@ -24,6 +24,7 @@ @@ -24,6 +24,7 @@
24 <script type="text/javascript" src="<%=basePath%>resource/validate/validate-extends.js"></script> 24 <script type="text/javascript" src="<%=basePath%>resource/validate/validate-extends.js"></script>
25 25
26 <link rel="stylesheet" href="<%=basePath%>resource/layui/css/layui.css" media="all"> 26 <link rel="stylesheet" href="<%=basePath%>resource/layui/css/layui.css" media="all">
  27 +<script type="text/javascript" src="<%=basePath%>resource/layer-v3.0.3/layer/layer.js"></script>
27 <script type="text/javascript" src="<%=basePath%>resource/layui/layui.js"></script> 28 <script type="text/javascript" src="<%=basePath%>resource/layui/layui.js"></script>
28 29
29 <style type="text/css"> 30 <style type="text/css">
@@ -54,10 +55,10 @@ @@ -54,10 +55,10 @@
54 <tr> 55 <tr>
55 <td class="kv-label"><spring:message code="manifest.bill.number" /><span 56 <td class="kv-label"><spring:message code="manifest.bill.number" /><span
56 class="required_span">*</span></td> 57 class="required_span">*</span></td>
57 - <td class="kv-content"><input required id="waybill" minlength="12" maxlength="12"  
58 - type="text" onblur="input_change(this)"> <input required id="waybillnomaster"  
59 - minlength="12" maxlength="12" name="waybillnomaster" type="hidden"  
60 - value="${manifest.waybillnomaster }"></td> 58 + <td class="kv-content">
  59 + <input required id="waybill" minlength="12" type="text" onblur="input_change(this)">
  60 + <input required id="waybillnomaster" minlength="12" maxlength="12" name="waybillnomaster" type="hidden"
  61 + value="${manifest.waybillnomaster }" ></td>
61 <td class="kv-label"><spring:message code="delivery.delivery.station" /><span 62 <td class="kv-label"><spring:message code="delivery.delivery.station" /><span
62 class="required_span">*</span></td> 63 class="required_span">*</span></td>
63 <td class="kv-content"><select id="delivery_station" name="delivery_station"> 64 <td class="kv-content"><select id="delivery_station" name="delivery_station">
@@ -77,8 +78,11 @@ @@ -77,8 +78,11 @@
77 <script> 78 <script>
78 function input_change(obj){ 79 function input_change(obj){
79 var val = $(obj).val(); 80 var val = $(obj).val();
  81 + if(val){
  82 + checkNo(val);
  83 + }
80 //用户输入订单号满足格式 84 //用户输入订单号满足格式
81 - if(val.length == 12 && val.indexOf("-") >= 0) 85 + <%-- if(val.length == 12 && val.indexOf("-") >= 0)
82 { 86 {
83 $.ajax({ 87 $.ajax({
84 url:"<%=basePath%>/manifest/gettreecode", 88 url:"<%=basePath%>/manifest/gettreecode",
@@ -91,7 +95,8 @@ @@ -91,7 +95,8 @@
91 $("#carrier").val(d.cARRIERID); 95 $("#carrier").val(d.cARRIERID);
92 } 96 }
93 }); 97 });
94 - } 98 + } --%>
  99 +
95 } 100 }
96 </script> 101 </script>
97 </tr> 102 </tr>
@@ -121,19 +126,20 @@ @@ -121,19 +126,20 @@
121 code="manifest.flight.information" /></td> 126 code="manifest.flight.information" /></td>
122 </tr> 127 </tr>
123 <tr> 128 <tr>
124 - <td class="kv-label"><spring:message code="manifest.carrier" /><span  
125 - class="required_span">*</span></td>  
126 - <td class="kv-content"><input required id="carrier_new" name="carrier" type="text" 129 + <%-- <td class="kv-label"><spring:message code="manifest.carrier" /><span
  130 + class="required_span">*</span></td> --%>
  131 + <%-- <td class="kv-content"><input required id="carrier_new" name="carrier" type="text"
127 placeholder="<spring:message code='manifest.carrier.tip'/>" 132 placeholder="<spring:message code='manifest.carrier.tip'/>"
128 value="${manifest.carrier}" oninput="onInputChange(event,'carrier_new','oninput')" 133 value="${manifest.carrier}" oninput="onInputChange(event,'carrier_new','oninput')"
129 - onpropertychange="onInputChange(event,'carrier_new','onpropertychange')"></td> 134 + onpropertychange="onInputChange(event,'carrier_new','onpropertychange')"></td> --%>
130 135
131 <td class="kv-label"><spring:message code="manifest.flight.number" /><span 136 <td class="kv-label"><spring:message code="manifest.flight.number" /><span
132 class="required_span">*</span></td> 137 class="required_span">*</span></td>
133 - <td class="kv-content"><input required id="flightno" name="flightno" type="text" 138 + <td class="kv-content"><input required id="flightno" name="flightno" type="text"
134 placeholder="<spring:message code='manifest.carrier.flightno.tip'/>" 139 placeholder="<spring:message code='manifest.carrier.flightno.tip'/>"
135 - value="${manifest.flightno }" oninput="onInputChange(event,'flightno','oninput')"  
136 - onpropertychange="onInputChange(event,'flightno','onpropertychange')"></td> 140 + value="${manifest.carrier}${manifest.flightno}" oninput="onInputChange(event,'flightno','oninput')"
  141 + onpropertychange="onInputChange(event,'flightno','onpropertychange')"
  142 + autocomplete="off"></td>
137 143
138 <td class="kv-label"><spring:message code="manifest.flight.date" /><span 144 <td class="kv-label"><spring:message code="manifest.flight.date" /><span
139 class="required_span">*</span></td> 145 class="required_span">*</span></td>
@@ -145,13 +151,15 @@ @@ -145,13 +151,15 @@
145 <tr> 151 <tr>
146 <td class="kv-label"><spring:message code="manifest.starting.point" /><span 152 <td class="kv-label"><spring:message code="manifest.starting.point" /><span
147 class="required_span">*</span></td> 153 class="required_span">*</span></td>
148 - <td class="kv-content"><input required id="originatingstation" name="originatingstation"  
149 - type="text" value="${manifest.originatingstation}" 154 + <td class="kv-content">
  155 + <input required id="originatingstation" name="originatingstation" type="text" maxlength="3"
  156 + <c:if test="${empty manifest.originatingstation}">value="CGO"</c:if>
  157 + <c:if test="${not empty manifest.originatingstation}">value="${manifest.originatingstation}"</c:if>
150 oninput="onInputChange(event,'originatingstation','oninput')" 158 oninput="onInputChange(event,'originatingstation','oninput')"
151 onpropertychange="onInputChange(event,'originatingstation','onpropertychange')" /></td> 159 onpropertychange="onInputChange(event,'originatingstation','onpropertychange')" /></td>
152 <td class="kv-label"><spring:message code="manifest.destination" /><span 160 <td class="kv-label"><spring:message code="manifest.destination" /><span
153 class="required_span">*</span></td> 161 class="required_span">*</span></td>
154 - <td class="kv-content" colspan="3"><input required id="destinationstation" 162 + <td class="kv-content" colspan="3"><input required id="destinationstation" maxlength="3"
155 name="destinationstation" type="text" value="${manifest.destinationstation}" 163 name="destinationstation" type="text" value="${manifest.destinationstation}"
156 oninput="onInputChange(event,'destinationstation','oninput')" 164 oninput="onInputChange(event,'destinationstation','oninput')"
157 onpropertychange="onInputChange(event,'destinationstation','onpropertychange')" /></td> 165 onpropertychange="onInputChange(event,'destinationstation','onpropertychange')" /></td>
@@ -164,14 +172,14 @@ @@ -164,14 +172,14 @@
164 <tr> 172 <tr>
165 <td class="kv-label"><spring:message code="manifest.number.of.fittings" /><span 173 <td class="kv-label"><spring:message code="manifest.number.of.fittings" /><span
166 class="required_span">*</span></td> 174 class="required_span">*</span></td>
167 - <td class="kv-content"><input required class="delivery number" id="totalpiece" 175 + <td class="kv-content"><input required class="delivery number" id="totalpiece" maxlength="8"
168 name="totalpiece" type="text" value="${manifest.totalpiece}" 176 name="totalpiece" type="text" value="${manifest.totalpiece}"
169 oninput="onInputChange(event,'totalpiece','oninput')" 177 oninput="onInputChange(event,'totalpiece','oninput')"
170 onpropertychange="onInputChange(event,'totalpiece','onpropertychange')"></td> 178 onpropertychange="onInputChange(event,'totalpiece','onpropertychange')"></td>
171 179
172 <td class="kv-label"><spring:message code="manifest.pre.weight" /><span 180 <td class="kv-label"><spring:message code="manifest.pre.weight" /><span
173 class="required_span">*</span></td> 181 class="required_span">*</span></td>
174 - <td class="kv-content"><input required class="delivery number" id="totalweight" 182 + <td class="kv-content"><input required class="delivery number" id="totalweight" maxlength="15"
175 name="totalweight" type="text" value="${manifest.totalweight}" 183 name="totalweight" type="text" value="${manifest.totalweight}"
176 oninput="onInputChange(event,'totalweight','oninput')" 184 oninput="onInputChange(event,'totalweight','oninput')"
177 onpropertychange="onInputChange(event,'totalweight','onpropertychange')"></td> 185 onpropertychange="onInputChange(event,'totalweight','onpropertychange')"></td>
@@ -226,19 +234,21 @@ @@ -226,19 +234,21 @@
226 <tr style="display: none;"> 234 <tr style="display: none;">
227 <td class="kv-label"><spring:message code="manifest.number.of.fittings" /><span 235 <td class="kv-label"><spring:message code="manifest.number.of.fittings" /><span
228 class="required_span">*</span></td> 236 class="required_span">*</span></td>
229 - <td class="kv-content"><input required class="delivery number" id="preparetotalpiece" 237 + <td class="kv-content"><input required class="delivery number" id="preparetotalpiece" maxlength="8"
230 name="preparetotalpiece" type="text" value="${manifest.preparetotalpiece}"></td> 238 name="preparetotalpiece" type="text" value="${manifest.preparetotalpiece}"></td>
231 <td class="kv-label"><spring:message code="manifest.pre.weight" /><span 239 <td class="kv-label"><spring:message code="manifest.pre.weight" /><span
232 class="required_span">*</span></td> 240 class="required_span">*</span></td>
233 - <td class="kv-content" colspan="3"><input required class="delivery number" 241 + <td class="kv-content" colspan="3"><input required class="delivery number" maxlength="15"
234 id="preparetotalweight" name="preparetotalweight" type="text" 242 id="preparetotalweight" name="preparetotalweight" type="text"
235 value="${manifest.preparetotalweight}"></td> 243 value="${manifest.preparetotalweight}"></td>
236 </tr> 244 </tr>
237 <tr> 245 <tr>
238 - <td class="kv-label"><spring:message code="manifest.description.of.the.goods" /><span 246 + <td class="kv-label"><spring:message code="delivery.productname" /><span
239 class="required_span">*</span></td> 247 class="required_span">*</span></td>
240 <td class="kv-content" colspan="5"><textarea required id="productname" 248 <td class="kv-content" colspan="5"><textarea required id="productname"
241 - name="productname" maxlength="200">${manifest.productname}</textarea></td> 249 + name="productname" maxlength="200"
  250 + oninput="onInputChange(event,'productname','oninput')"
  251 + onpropertychange="onInputChange(event,'productname','onpropertychange')">${manifest.productname}</textarea></td>
242 </tr> 252 </tr>
243 <%-- <tr> 253 <%-- <tr>
244 <td class="kv-label"><spring:message code="manifest.agent.name" /></td> 254 <td class="kv-label"><spring:message code="manifest.agent.name" /></td>
@@ -268,7 +278,7 @@ @@ -268,7 +278,7 @@
268 if(index >= 0) 278 if(index >= 0)
269 { 279 {
270 var consignor = consignorList[index]; 280 var consignor = consignorList[index];
271 - $("#co_company").val(consignor.co_company?consignor.co_company:""); 281 + $("#co_company").val(consignor.co_company?consignor.co_company.toUpperCase():"");
272 var address = consignor.co_address; 282 var address = consignor.co_address;
273 if(notEmpty(address)){ 283 if(notEmpty(address)){
274 if(address.length>70){ 284 if(address.length>70){
@@ -277,12 +287,12 @@ @@ -277,12 +287,12 @@
277 }else{ 287 }else{
278 address = ""; 288 address = "";
279 } 289 }
280 - $("#co_address").val(address); 290 + $("#co_address").val(address.toUpperCase());
281 $("#co_telephone").val(consignor.co_telephone?consignor.co_telephone:""); 291 $("#co_telephone").val(consignor.co_telephone?consignor.co_telephone:"");
282 - $("#co_country").val(consignor.co_country?consignor.co_country:"");  
283 - $("#co_city").val(consignor.co_city?consignor.co_city:"");  
284 - $("#co_deltaname").val(consignor.co_deltaname?consignor.co_deltaname:"");  
285 - $("#co_name").val(consignor.co_name?consignor.co_name:""); 292 + $("#co_country").val(consignor.co_country?consignor.co_country:"CN");
  293 + $("#co_city").val(consignor.co_city?consignor.co_city.toUpperCase():"");
  294 + $("#co_deltaname").val(consignor.co_deltaname?consignor.co_deltaname.toUpperCase():"");
  295 + $("#co_name").val(consignor.co_name?consignor.co_name.toUpperCase():"");
286 $("#co_fax").val(consignor.co_fax?consignor.co_fax:""); 296 $("#co_fax").val(consignor.co_fax?consignor.co_fax:"");
287 $("#co_zipcode").val(consignor.co_zipcode?consignor.co_zipcode:""); 297 $("#co_zipcode").val(consignor.co_zipcode?consignor.co_zipcode:"");
288 $("#shpaeo").val(consignor.shpaeo?consignor.shpaeo:""); 298 $("#shpaeo").val(consignor.shpaeo?consignor.shpaeo:"");
@@ -290,7 +300,7 @@ @@ -290,7 +300,7 @@
290 if(notEmpty(consignor.shpcusid)){ 300 if(notEmpty(consignor.shpcusid)){
291 var temp = consignor.shpcusid.split("+")[1]; 301 var temp = consignor.shpcusid.split("+")[1];
292 if(notEmpty(temp)){ 302 if(notEmpty(temp)){
293 - $("#shpcusid").val(temp); 303 + $("#shpcusid").val(temp.toUpperCase());
294 } 304 }
295 } 305 }
296 306
@@ -321,17 +331,21 @@ @@ -321,17 +331,21 @@
321 <tr> 331 <tr>
322 <td class="kv-label"><spring:message code="manifest.company" /><span 332 <td class="kv-label"><spring:message code="manifest.company" /><span
323 class="required_span">*</span></td> 333 class="required_span">*</span></td>
324 - <td class="kv-content"><input required id="co_company" name="co_company" type="text" 334 + <td class="kv-content"><input required id="co_company" name="co_company" type="text" maxlength="70"
325 value="${manifest.co_company}" oninput="onInputChange(event,'co_company','oninput')" 335 value="${manifest.co_company}" oninput="onInputChange(event,'co_company','oninput')"
326 onpropertychange="onInputChange(event,'co_company','onpropertychange')"></td> 336 onpropertychange="onInputChange(event,'co_company','onpropertychange')"></td>
327 <td class="kv-label"><spring:message code="manifest.address" /><span 337 <td class="kv-label"><spring:message code="manifest.address" /><span
328 class="required_span">*</span></td> 338 class="required_span">*</span></td>
329 <td class="kv-content"><input required id="co_address" name="co_address" type="text" 339 <td class="kv-content"><input required id="co_address" name="co_address" type="text"
330 - value="${manifest.co_address}" maxlength="70"></td> 340 + value="${manifest.co_address}" maxlength="70"
  341 + oninput="onInputChange(event,'co_address','oninput')"
  342 + onpropertychange="onInputChange(event,'co_address','onpropertychange')"></td>
331 <td class="kv-label"><spring:message code="manifest.country" /><span 343 <td class="kv-label"><spring:message code="manifest.country" /><span
332 class="required_span">*</span></td> 344 class="required_span">*</span></td>
333 - <td class="kv-content"><input required id="co_country" name="co_country" maxlength="2"  
334 - type="text" value="${manifest.co_country }" 345 + <td class="kv-content">
  346 + <input required id="co_country" name="co_country" maxlength="2" type="text"
  347 + <c:if test="${empty manifest.co_country}">value="CN"</c:if>
  348 + <c:if test="${not empty manifest.co_country}">value="${manifest.co_country}"</c:if>
335 oninput="onInputChange(event,'co_country','oninput')" 349 oninput="onInputChange(event,'co_country','oninput')"
336 onpropertychange="onInputChange(event,'co_country','onpropertychange')"></td> 350 onpropertychange="onInputChange(event,'co_country','onpropertychange')"></td>
337 </tr> 351 </tr>
@@ -341,23 +355,23 @@ @@ -341,23 +355,23 @@
341 value="${manifest.co_city }" oninput="onInputChange(event,'co_city','oninput')" 355 value="${manifest.co_city }" oninput="onInputChange(event,'co_city','oninput')"
342 onpropertychange="onInputChange(event,'co_city','onpropertychange')"></td> --%> 356 onpropertychange="onInputChange(event,'co_city','onpropertychange')"></td> --%>
343 <td class="kv-label"><spring:message code="manifest.state" /></td> 357 <td class="kv-label"><spring:message code="manifest.state" /></td>
344 - <td class="kv-content"><input id="co_deltaname" name="co_deltaname" type="text" 358 + <td class="kv-content"><input id="co_deltaname" name="co_deltaname" type="text" maxlength="35"
345 value="${manifest.co_deltaname}"></td> 359 value="${manifest.co_deltaname}"></td>
346 <td class="kv-label"><spring:message code="manifest.zip.code" /></td> 360 <td class="kv-label"><spring:message code="manifest.zip.code" /></td>
347 - <td class="kv-content" colspan="3"><input id="co_zipcode" name="co_zipcode" type="text" 361 + <td class="kv-content" colspan="3"><input id="co_zipcode" name="co_zipcode" type="text" maxlength="9"
348 value="${manifest.co_zipcode }"></td> 362 value="${manifest.co_zipcode }"></td>
349 </tr> 363 </tr>
350 <tr> 364 <tr>
351 <td class="kv-label"><spring:message code="manifest.telephone" /></td> 365 <td class="kv-label"><spring:message code="manifest.telephone" /></td>
352 - <td class="kv-content"><input id="co_telephone" name="co_telephone" type="text" 366 + <td class="kv-content"><input id="co_telephone" name="co_telephone" type="text" maxlength="50"
353 value="${manifest.co_telephone }" 367 value="${manifest.co_telephone }"
354 placeholder="<spring:message code="manifest.fhr.fh_placeholder"/>"></td> 368 placeholder="<spring:message code="manifest.fhr.fh_placeholder"/>"></td>
355 <td class="kv-label"><spring:message code="manifest.fax" /></td> 369 <td class="kv-label"><spring:message code="manifest.fax" /></td>
356 - <td class="kv-content"><input id="co_fax" name="co_fax" type="text" 370 + <td class="kv-content"><input id="co_fax" name="co_fax" type="text" maxlength="50"
357 value="${manifest.co_fax }" 371 value="${manifest.co_fax }"
358 placeholder="<spring:message code="manifest.fhr.fh_placeholder"/>"></td> 372 placeholder="<spring:message code="manifest.fhr.fh_placeholder"/>"></td>
359 <td class="kv-label"><spring:message code="manifest.fhr.shpaeo" /></td> 373 <td class="kv-label"><spring:message code="manifest.fhr.shpaeo" /></td>
360 - <td class="kv-content"><input id="shpaeo" name="shpaeo" type="text" 374 + <td class="kv-content"><input id="shpaeo" name="shpaeo" type="text" maxlength="20"
361 value="${manifest.shpaeo }" oninput="onInputChange(event,'shpaeo','oninput')" 375 value="${manifest.shpaeo }" oninput="onInputChange(event,'shpaeo','oninput')"
362 onpropertychange="onInputChange(event,'shpaeo','onpropertychange')"></td> 376 onpropertychange="onInputChange(event,'shpaeo','onpropertychange')"></td>
363 </tr> 377 </tr>
@@ -381,7 +395,7 @@ @@ -381,7 +395,7 @@
381 </c:if> 395 </c:if>
382 </select> 396 </select>
383 <span style="color: black; font-size: 16px;">+</span> 397 <span style="color: black; font-size: 16px;">+</span>
384 - <input id="shpcusid" type="text" required 398 + <input id="shpcusid" type="text" maxlength="100" required
385 <c:if test="${not empty manifest.shpcusid}"> 399 <c:if test="${not empty manifest.shpcusid}">
386 <c:set var="tempShpValue" value='${fn:split(manifest.shpcusid,"+")[1]}' /> 400 <c:set var="tempShpValue" value='${fn:split(manifest.shpcusid,"+")[1]}' />
387 value="${tempShpValue}" 401 value="${tempShpValue}"
@@ -421,7 +435,7 @@ @@ -421,7 +435,7 @@
421 address = ""; 435 address = "";
422 } 436 }
423 437
424 - $("#sh_address").val(address); 438 + $("#sh_address").val(address.toUpperCase());
425 $("#sh_telephone").val(consignee.tel?consignee.tel:""); 439 $("#sh_telephone").val(consignee.tel?consignee.tel:"");
426 $("#sh_country").val(consignee.name?consignee.name:""); 440 $("#sh_country").val(consignee.name?consignee.name:"");
427 $("#sh_name").val(consignee.code?consignee.code:""); 441 $("#sh_name").val(consignee.code?consignee.code:"");
@@ -451,13 +465,15 @@ @@ -451,13 +465,15 @@
451 <tr> 465 <tr>
452 <td class="kv-label"><spring:message code="manifest.company" /><span 466 <td class="kv-label"><spring:message code="manifest.company" /><span
453 class="required_span">*</span></td> 467 class="required_span">*</span></td>
454 - <td class="kv-content"><input required id="sh_company" name="sh_company" type="text" 468 + <td class="kv-content"><input required id="sh_company" name="sh_company" type="text" maxlength="70"
455 value="${manifest.sh_company }" oninput="onInputChange(event,'sh_company','oninput')" 469 value="${manifest.sh_company }" oninput="onInputChange(event,'sh_company','oninput')"
456 onpropertychange="onInputChange(event,'sh_company','onpropertychange')"></td> 470 onpropertychange="onInputChange(event,'sh_company','onpropertychange')"></td>
457 <td class="kv-label"><spring:message code="manifest.address" /><span 471 <td class="kv-label"><spring:message code="manifest.address" /><span
458 class="required_span">*</span></td> 472 class="required_span">*</span></td>
459 <td class="kv-content"><input required id="sh_address" name="sh_address" maxlength="70" 473 <td class="kv-content"><input required id="sh_address" name="sh_address" maxlength="70"
460 - type="text" value="${manifest.sh_address }"></td> 474 + type="text" value="${manifest.sh_address }"
  475 + oninput="onInputChange(event,'sh_address','oninput')"
  476 + onpropertychange="onInputChange(event,'sh_address','onpropertychange')"></td>
461 <td class="kv-label"><spring:message code="manifest.country" /><span 477 <td class="kv-label"><spring:message code="manifest.country" /><span
462 class="required_span">*</span></td> 478 class="required_span">*</span></td>
463 <td class="kv-content"><input required id="sh_country" name="sh_country" maxlength="2" 479 <td class="kv-content"><input required id="sh_country" name="sh_country" maxlength="2"
@@ -467,25 +483,25 @@ @@ -467,25 +483,25 @@
467 </tr> 483 </tr>
468 <tr> 484 <tr>
469 <td class="kv-label"><spring:message code="manifest.city" /><span class="required_span">*</span></td> 485 <td class="kv-label"><spring:message code="manifest.city" /><span class="required_span">*</span></td>
470 - <td class="kv-content"><input required id="sh_city" name="sh_city" type="text" 486 + <td class="kv-content"><input required id="sh_city" name="sh_city" type="text" maxlength="35"
471 value="${manifest.sh_city }" oninput="onInputChange(event,'sh_city','oninput')" 487 value="${manifest.sh_city }" oninput="onInputChange(event,'sh_city','oninput')"
472 onpropertychange="onInputChange(event,'sh_city','onpropertychange')"></td> 488 onpropertychange="onInputChange(event,'sh_city','onpropertychange')"></td>
473 <td class="kv-label"><spring:message code="manifest.state" /></td> 489 <td class="kv-label"><spring:message code="manifest.state" /></td>
474 - <td class="kv-content"><input id="sh_deltaname" name="sh_deltaname" type="text" 490 + <td class="kv-content"><input id="sh_deltaname" name="sh_deltaname" type="text" maxlength="35"
475 value="${manifest.sh_deltaname}"></td> 491 value="${manifest.sh_deltaname}"></td>
476 <td class="kv-label"><spring:message code="manifest.zip.code" /></td> 492 <td class="kv-label"><spring:message code="manifest.zip.code" /></td>
477 - <td class="kv-content"><input id="sh_zipcode" name="sh_zipcode" type="text" 493 + <td class="kv-content"><input id="sh_zipcode" name="sh_zipcode" type="text" maxlength="9"
478 value="${manifest.sh_zipcode }"></td> 494 value="${manifest.sh_zipcode }"></td>
479 </tr> 495 </tr>
480 <tr> 496 <tr>
481 <td class="kv-label"><spring:message code="manifest.telephone" /></td> 497 <td class="kv-label"><spring:message code="manifest.telephone" /></td>
482 - <td class="kv-content"><input id="sh_telephone" name="sh_telephone" type="text" 498 + <td class="kv-content"><input id="sh_telephone" name="sh_telephone" type="text" maxlength="50"
483 value="${manifest.sh_telephone }"></td> 499 value="${manifest.sh_telephone }"></td>
484 <td class="kv-label"><spring:message code="manifest.fax" /></td> 500 <td class="kv-label"><spring:message code="manifest.fax" /></td>
485 - <td class="kv-content"><input id="sh_fax" name="sh_fax" type="text" 501 + <td class="kv-content"><input id="sh_fax" name="sh_fax" type="text" maxlength="50"
486 value="${manifest.sh_fax }"></td> 502 value="${manifest.sh_fax }"></td>
487 <td class="kv-label"><spring:message code="manifest.shr.cneaeo" /></td> 503 <td class="kv-label"><spring:message code="manifest.shr.cneaeo" /></td>
488 - <td class="kv-content"><input id="cneaeo" name="cneaeo" type="text" 504 + <td class="kv-content"><input id="cneaeo" name="cneaeo" type="text" maxlength="20"
489 value="${manifest.cneaeo }" oninput="onInputChange(event,'cneaeo','oninput')" 505 value="${manifest.cneaeo }" oninput="onInputChange(event,'cneaeo','oninput')"
490 onpropertychange="onInputChange(event,'cneaeo','onpropertychange')"></td> 506 onpropertychange="onInputChange(event,'cneaeo','onpropertychange')"></td>
491 </tr> 507 </tr>
@@ -519,7 +535,7 @@ @@ -519,7 +535,7 @@
519 </c:if> 535 </c:if>
520 </select> 536 </select>
521 <span style="color: black; font-size: 16px;">+</span> 537 <span style="color: black; font-size: 16px;">+</span>
522 - <input id="cnecusid" type="text" required 538 + <input id="cnecusid" type="text" maxlength="100" required
523 <c:if test="${not empty manifest.cnecusid}"> 539 <c:if test="${not empty manifest.cnecusid}">
524 <c:set var="tempCneValue" value='${fn:split(manifest.cnecusid,"+")[1]}' /> 540 <c:set var="tempCneValue" value='${fn:split(manifest.cnecusid,"+")[1]}' />
525 value="${tempCneValue }" 541 value="${tempCneValue }"
@@ -540,10 +556,6 @@ @@ -540,10 +556,6 @@
540 </tr> 556 </tr>
541 <!-- 收货人信息 end --> 557 <!-- 收货人信息 end -->
542 558
543 - <tr style="display: none;">  
544 - <td> <input value="${manifest.cnecusid}"/> <input value="${manifest.shpcusid}"/> </td>  
545 - </tr>  
546 -  
547 <!-- 危险品信息 start --> 559 <!-- 危险品信息 start -->
548 <tr> 560 <tr>
549 <td style="background-color: #EBEDF4; color: black;" class="kv-label" colspan="6"><spring:message 561 <td style="background-color: #EBEDF4; color: black;" class="kv-label" colspan="6"><spring:message
@@ -674,7 +686,7 @@ @@ -674,7 +686,7 @@
674 </form> 686 </form>
675 </div> 687 </div>
676 </div> 688 </div>
677 - 689 +
678 <div id="DialogShunt" class="easyui-dialog" title="报文" style="width: 800px; height: 800px;" 690 <div id="DialogShunt" class="easyui-dialog" title="报文" style="width: 800px; height: 800px;"
679 data-options="iconCls:'pag-list',modal:true,collapsible:false,minimizable:false,maximizable:false,resizable:false,closed:true"> 691 data-options="iconCls:'pag-list',modal:true,collapsible:false,minimizable:false,maximizable:false,resizable:false,closed:true">
680 <div style="margin-left: 5px; margin-right: 5px; margin-top: 5px;"> 692 <div style="margin-left: 5px; margin-right: 5px; margin-top: 5px;">
@@ -689,12 +701,18 @@ @@ -689,12 +701,18 @@
689 </div> 701 </div>
690 702
691 <!-- 外部js --> 703 <!-- 外部js -->
692 - <script type="text/javascript" src="<%=basePath%>resource/layer-v3.0.3/layer/layer.js"></script>  
693 <script type="text/javascript" src="<%=basePath%>resource/My97DatePicker/WdatePicker.js"></script> 704 <script type="text/javascript" src="<%=basePath%>resource/My97DatePicker/WdatePicker.js"></script>
694 <script src="<%=basePath%>resource/easyui/jquery.easyui.min.js"></script> 705 <script src="<%=basePath%>resource/easyui/jquery.easyui.min.js"></script>
695 - <script src="<%=basePath%>/resource/js/tools.js?version=1.2"></script> 706 + <script src="<%=basePath%>/resource/js/tools.js?version=${version}"></script>
696 <!--弹出层引入的JS--> 707 <!--弹出层引入的JS-->
697 <script type="text/javascript"> 708 <script type="text/javascript">
  709 +
  710 + var layerIndex;
  711 + var layer;
  712 + layui.use('layer', function(){
  713 + layer = layui.layer;
  714 + });
  715 +
698 $(function(){ 716 $(function(){
699 //获取三字码 717 //获取三字码
700 $.ajax({ 718 $.ajax({
@@ -785,6 +803,10 @@ $(function(){ @@ -785,6 +803,10 @@ $(function(){
785 }) 803 })
786 804
787 function submit(){ 805 function submit(){
  806 + layerIndex = parent.layer.load(1, {
  807 + shade: [0.6,'#000000'] //0.1透明度
  808 + });
  809 +
788 var id3 = $("#waybillnomaster").val($("#waybill").val()); 810 var id3 = $("#waybillnomaster").val($("#waybill").val());
789 var data = $("#form").serialize(); 811 var data = $("#form").serialize();
790 812
@@ -804,9 +826,10 @@ $(function(){ @@ -804,9 +826,10 @@ $(function(){
804 data+="&cnecusid="+encodeURIComponent(cnecusid); 826 data+="&cnecusid="+encodeURIComponent(cnecusid);
805 } 827 }
806 828
807 - console.log("form-->"+data); 829 + /* console.log("form-->"+data); */
808 830
809 $.post("<%=basePath%>manifest/save",data,function (data) { 831 $.post("<%=basePath%>manifest/save",data,function (data) {
  832 + parent.layer.close(layerIndex);
810 if (data.status == 200) { 833 if (data.status == 200) {
811 // layer.confirm("<spring:message code="opt.savesuccess"/>", {btn: ['<spring:message code="opt.confirm"/>', '<spring:message code="opt.cancel"/>']}, function () { 834 // layer.confirm("<spring:message code="opt.savesuccess"/>", {btn: ['<spring:message code="opt.confirm"/>', '<spring:message code="opt.cancel"/>']}, function () {
812 window.location.href = "<%=basePath%>manifest/list" ; 835 window.location.href = "<%=basePath%>manifest/list" ;
@@ -838,6 +861,10 @@ $(function(){ @@ -838,6 +861,10 @@ $(function(){
838 function savesend(){ 861 function savesend(){
839 var isValid = $("#form").valid(); 862 var isValid = $("#form").valid();
840 if(isValid){ 863 if(isValid){
  864 + layerIndex = parent.layer.load(1, {
  865 + shade: [0.6,'#000000'] //0.1透明度
  866 + });
  867 +
841 var id3 = $("#waybillnomaster").val($("#waybill").val()); 868 var id3 = $("#waybillnomaster").val($("#waybill").val());
842 var data = $("#form").serialize(); 869 var data = $("#form").serialize();
843 var shp_cusid_type = getSelectedValue("co_cusid"); 870 var shp_cusid_type = getSelectedValue("co_cusid");
@@ -856,9 +883,10 @@ $(function(){ @@ -856,9 +883,10 @@ $(function(){
856 data+="&cnecusid="+encodeURIComponent(cnecusid); 883 data+="&cnecusid="+encodeURIComponent(cnecusid);
857 } 884 }
858 885
859 - console.log("form-->"+data); 886 + /* console.log("form-->"+data); */
860 887
861 $.post("<%=basePath%>manifest/savesend",data,function (data) { 888 $.post("<%=basePath%>manifest/savesend",data,function (data) {
  889 + parent.layer.close(layerIndex);
862 if (data.status == 200) { 890 if (data.status == 200) {
863 $("#xmlContent").val(data.data); 891 $("#xmlContent").val(data.data);
864 $("#DialogShunt").window('open'); 892 $("#DialogShunt").window('open');
@@ -1044,6 +1072,56 @@ $(function(){ @@ -1044,6 +1072,56 @@ $(function(){
1044 }); 1072 });
1045 }); 1073 });
1046 } 1074 }
  1075 +
  1076 + function checkNo(content){
  1077 + if (content) {
  1078 + content = content.replace(/ /g,'');
  1079 + $("#waybill").val(content);
  1080 +
  1081 + if(content.length>4){
  1082 + var forth = content.substring(3,4);
  1083 + if(forth!='-'){
  1084 + var start = content.substring(0,3);
  1085 + var end = content.substring(3,content.length);
  1086 + content = start+"-"+end;
  1087 + $("#waybill").val(content);
  1088 + }
  1089 + }
  1090 +
  1091 + if(content.length>12){
  1092 + content = content.substring(0,12);
  1093 + $("#waybill").val(content);
  1094 + }
  1095 +
  1096 + if(content.length<12){
  1097 + layui.use('layer', function(){
  1098 + var layer = layui.layer;
  1099 + parent.layer.alert('主单号不能少于12位~!', {icon: 0});
  1100 + $("#waybill").focus();
  1101 + });
  1102 + return;
  1103 + }
  1104 +
  1105 + var array = content.split("-");
  1106 + if(array!=null&&array.length==2){
  1107 + var end = array[1];
  1108 + if(end&&end.length==8){
  1109 + var number = parseInt(end);
  1110 + var start = number/10;
  1111 + var remainder = parseInt(start)%7;
  1112 + var last = number%10;
  1113 + if(remainder!=last){
  1114 + layui.use('layer', function(){
  1115 + var layer = layui.layer;
  1116 + parent.layer.alert('主单号不符合模七校验,请修改~!', {icon: 6});
  1117 + $("#waybill").focus();
  1118 + });
  1119 + }
  1120 + }
  1121 + }
  1122 + }
  1123 + }
  1124 +
1047 </script> 1125 </script>
1048 </body> 1126 </body>
1049 </html> 1127 </html>
@@ -13,6 +13,12 @@ @@ -13,6 +13,12 @@
13 <link rel="stylesheet" href="<%=basePath %>resource/easyui/uimaker/easyui.css"> 13 <link rel="stylesheet" href="<%=basePath %>resource/easyui/uimaker/easyui.css">
14 <link rel="stylesheet" type="text/css" href="<%=basePath %>resource/easyui/uimaker/icon.css"> 14 <link rel="stylesheet" type="text/css" href="<%=basePath %>resource/easyui/uimaker/icon.css">
15 <link rel="stylesheet" href="<%=basePath %>resource/css/providers.css"> 15 <link rel="stylesheet" href="<%=basePath %>resource/css/providers.css">
  16 +
  17 + <link rel="stylesheet" href="<%=basePath%>resource/layui/css/layui.css" media="all">
  18 + <script type="text/javascript" src="<%=basePath%>resource/easyui/jquery.min.js"></script>
  19 + <script type="text/javascript" src="<%=basePath%>resource/layer-v3.0.3/layer/layer.js"></script>
  20 + <script type="text/javascript" src="<%=basePath%>resource/layui/layui.js"></script>
  21 +
16 </head> 22 </head>
17 <body> 23 <body>
18 <div class="container"> 24 <div class="container">
@@ -30,19 +36,17 @@ @@ -30,19 +36,17 @@
30 pageSize:10"> 36 pageSize:10">
31 <thead> 37 <thead>
32 <tr> 38 <tr>
33 - <!-- <th field="id" checkbox="true"></th> -->  
34 - <th field="." formatter="editFormat" width="40"><spring:message code="opt.edit" /></th>  
35 - <th field="waybillnomaster" sortable="true" width="30"><spring:message code="manifest.bill.number"/></th>  
36 - <th field="customscode" width="15"><spring:message code="manifest.customs"/></th>  
37 - <th field="flightno" width="20"><spring:message code="manifest.flight.number"/></th>  
38 - <th field="originatingstation" width="20"><spring:message code="manifest.starting.point"/></th>  
39 - <th field="destinationstation" width="20"><spring:message code="manifest.destination"/></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>  
42 - <th field="preparetotalpiece" width="20"><spring:message code="manifest.number.of.fittings"/></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>  
45 -<%-- <th field="flightdate" width="130"><spring:message code="manifest.flight.date"/></th> --%> 39 + <th field="." formatter="editFormat"><spring:message code="opt.edit" /></th>
  40 + <th field="waybillnomaster" sortable="true"><spring:message code="manifest.bill.number"/></th>
  41 + <th field="customscode"><spring:message code="manifest.customs"/></th>
  42 + <th field="flightno" formatter="appendCarrier"><spring:message code="manifest.flight.number"/></th>
  43 + <th field="flightdate" formatter="formatFlightDate"><spring:message code="manifest.flight.date"/></th>
  44 + <th field="originatingstation"><spring:message code="manifest.starting.point"/></th>
  45 + <th field="destinationstation"><spring:message code="manifest.destination"/></th>
  46 + <th field="preparetotalweight"><spring:message code="manifest.pre.weight"/></th>
  47 + <th field="preparetotalpiece"><spring:message code="manifest.number.of.fittings"/></th>
  48 + <th field="response_text" formatter="checkResponseText" width="200"><spring:message code="manifest.response_text" /></th>
  49 + <th field=".." formatter="operatorFormat"><spring:message code="opt.operator" /></th>
46 </tr> 50 </tr>
47 </thead> 51 </thead>
48 </table> 52 </table>
@@ -64,21 +68,36 @@ @@ -64,21 +68,36 @@
64 <script type="text/javascript" src="<%=basePath %>resource/easyui/jquery.easyui.min.js"></script> 68 <script type="text/javascript" src="<%=basePath %>resource/easyui/jquery.easyui.min.js"></script>
65 <script type="text/javascript" src="<%=basePath %>resource/easyui/easyui-lang-${pageContext.response.locale}.js"></script> 69 <script type="text/javascript" src="<%=basePath %>resource/easyui/easyui-lang-${pageContext.response.locale}.js"></script>
66 <script type="text/javascript" src="<%=basePath %>resource/easyui/datagrid-detailview.js"></script> 70 <script type="text/javascript" src="<%=basePath %>resource/easyui/datagrid-detailview.js"></script>
67 -<script type="text/javascript" src="<%=basePath %>resource/js/tools.js"></script> 71 +<script type="text/javascript" src="<%=basePath %>resource/js/tools.js?version=${version}"></script>
68 <!--弹出层引入的JS--> 72 <!--弹出层引入的JS-->
69 <script type="text/javascript" src="<%=basePath %>resource/layer-v3.0.3/layer/layer.js"></script> 73 <script type="text/javascript" src="<%=basePath %>resource/layer-v3.0.3/layer/layer.js"></script>
70 <script type="text/javascript"> 74 <script type="text/javascript">
  75 + function formatFlightDate(value, row, index){
  76 + return row.flightdate.split(" ")[0];
  77 + }
  78 +
  79 + function appendCarrier(value, row, index) {
  80 + return row.carrier+row.flightno;
  81 + }
71 82
72 function checkResponseText(value, row, index) { 83 function checkResponseText(value, row, index) {
73 var res = ''; 84 var res = '';
74 if(value){ 85 if(value){
75 - var start = value.indexOf("41301");  
76 - if(start>-1){ 86 + var start_yupei = value.indexOf("41301");
  87 + var start_yundi = value.indexOf("45201");
  88 + if(start_yupei>-1||start_yundi>-1){
77 // 成功 89 // 成功
78 res = '<span style="color:green;">'+value+'</span>'; 90 res = '<span style="color:green;">'+value+'</span>';
79 }else{ 91 }else{
80 - // 未通过  
81 - res = '<span style="color:black;">'+value+'</span>'; 92 + // 未通过或者未回执
  93 + var start_exception_ = value.indexOf("分单");
  94 + var start_exception_ = value.indexOf("主单");
  95 + if(start_exception_>-1||start_exception_>-1){
  96 + //没有回执
  97 + res = '<span style="color:black;">'+value+'</span>';
  98 + }else{
  99 + res = '<span style="color:red;">'+value+'</span>';
  100 + }
82 } 101 }
83 } 102 }
84 103
@@ -117,37 +136,43 @@ @@ -117,37 +136,43 @@
117 pageNumber:getPageNumber(), 136 pageNumber:getPageNumber(),
118 view: detailview, 137 view: detailview,
119 detailFormatter:function(index,row){ 138 detailFormatter:function(index,row){
120 - console.log("index:"+index);  
121 return '<div id="ddv-' + index + '"style="padding:5px 0"></div>'; 139 return '<div id="ddv-' + index + '"style="padding:5px 0"></div>';
122 }, 140 },
123 onExpandRow: function(index,row){ 141 onExpandRow: function(index,row){
124 - console.log("expand row index:"+index); 142 + console.log("expand row index:"+index);
125 $('#ddv-'+index).datagrid({ 143 $('#ddv-'+index).datagrid({
126 url:'<%=basePath %>manifest/sub/grid.json?mawbId='+row.id, 144 url:'<%=basePath %>manifest/sub/grid.json?mawbId='+row.id,
127 fitColumns:true, 145 fitColumns:true,
128 singleSelect:true, 146 singleSelect:true,
129 - loadMsg:'正在加载……', 147 + loadMsg:'正在加载……',
130 height:'auto', 148 height:'auto',
  149 + autoRowHeight:"true",
131 columns:[[ 150 columns:[[
132 - {field:'.',title:'<spring:message code="opt.name"/>',formatter:editHbillFormat,width:30},  
133 - {field:'waybillnosecondary',title:'<spring:message code="manifest.odd.number"/>',width:40},  
134 - {field:'originatingstation',title:'<spring:message code="manifest.starting.point"/>',width:40},  
135 - {field:'destinationstation',title:'<spring:message code="manifest.destination"/>',width:40},  
136 - /* {field:'totalpiece',title:'<spring:message code="manifest.number.of.consignment.note"/>',width:60},  
137 - {field:'totalweight',title:'<spring:message code="manifest.waybill.weight"/>',width:60}, */  
138 - {field:'prepareweight',title:'<spring:message code="manifest.pre.weight"/>',width:30},  
139 - {field:'preparepiece',title:'<spring:message code="manifest.number.of.fittings"/>',width:30},  
140 - {field:'response_text',title:'<spring:message code="manifest.response_text"/>', width:160, 151 + {field:'.',title:'<spring:message code="opt.name"/>',formatter:editHbillFormat},
  152 + {field:'waybillnosecondary',title:'<spring:message code="manifest.odd.number"/>'},
  153 + {field:'originatingstation',title:'<spring:message code="manifest.starting.point"/>'},
  154 + {field:'destinationstation',title:'<spring:message code="manifest.destination"/>'},
  155 + {field:'prepareweight',title:'<spring:message code="manifest.pre.weight"/>'},
  156 + {field:'preparepiece',title:'<spring:message code="manifest.number.of.fittings"/>'},
  157 + {field:'response_text',width:160,title:'<spring:message code="manifest.response_text"/>',
141 formatter:function(value, row, index){ 158 formatter:function(value, row, index){
142 - var res = ''; 159 + var res = '';
143 if(value){ 160 if(value){
144 - var start = value.indexOf("41301");  
145 - if(start>-1){ 161 + var start_yupei = value.indexOf("41301");
  162 + var start_yundi = value.indexOf("45201");
  163 + if(start_yupei>-1||start_yundi>-1){
146 // 成功 164 // 成功
147 res = '<span style="color:green;">'+value+'</span>'; 165 res = '<span style="color:green;">'+value+'</span>';
148 }else{ 166 }else{
149 - // 未通过  
150 - res = '<span style="color:black;">'+value+'</span>'; 167 + // 未通过或者未回执
  168 + var start_exception_ = value.indexOf("分单");
  169 + var start_exception_ = value.indexOf("主单");
  170 + if(start_exception_>-1||start_exception_>-1){
  171 + //没有回执
  172 + res = '<span style="color:black;">'+value+'</span>';
  173 + }else{
  174 + res = '<span style="color:red;">'+value+'</span>';
  175 + }
151 } 176 }
152 } 177 }
153 178
@@ -160,28 +185,28 @@ @@ -160,28 +185,28 @@
160 $('#dg').datagrid('fixDetailRowHeight',index); 185 $('#dg').datagrid('fixDetailRowHeight',index);
161 }, 186 },
162 onLoadSuccess:function(){ 187 onLoadSuccess:function(){
163 - setTimeout(function(){  
164 - $('#dg').datagrid('fixDetailRowHeight',index);  
165 - },0);  
166 -  
167 -  
168 - 188 + $('#dg').datagrid('resize');
169 } 189 }
170 }); 190 });
  191 +
171 $('#dg').datagrid('fixDetailRowHeight',index); 192 $('#dg').datagrid('fixDetailRowHeight',index);
172 } 193 }
173 }); 194 });
174 }); 195 });
175 196
176 function editFormat(val,row,index){ 197 function editFormat(val,row,index){
177 - var html='<a href="javascript:void(0)" style="padding-left:10px;text-decoration:none;padding-right:20px;" onclick="editRow('+row.id+')"><i class="iconfont">&#xe65a;</i></a>'  
178 - html += '<a href="javascript:void(0)" style="text-decoration:none;margin-left:20px;" onclick="makeHawb('+row.id+')"><i class="iconfont">&#xe663;</i><spring:message code="manifest.new.sheet"/></a>';  
179 - return html; 198 + var html='<a href="javascript:void(0)" style="padding-left:10px;text-decoration:none;color:blue;padding-right:20px;" onclick="editRow('+row.id+')"><i class="iconfont">&#xe65a;</i></a>'
  199 + html += '<a href="javascript:void(0)" style="text-decoration:none;margin-left:20px;color:blue;" onclick="makeHawb('+row.id+')"><i class="iconfont">&#xe663;</i><spring:message code="manifest.new.sheet"/></a>';
  200 + return html;
180 } 201 }
  202 +
181 //分单撤销按钮 203 //分单撤销按钮
182 function preoperatorFormat(val, row, index){ 204 function preoperatorFormat(val, row, index){
183 - return "<a href='javascript:void(0)' onclick='prebackout("+row.id+")' style='text-decoration:none;'><spring:message code='opt.backout' /></a>"; 205 + var html = "<a href='javascript:void(0)' onclick='prebackout("+row.id+")' style='text-decoration:none;color:blue;'><spring:message code='opt.backout' /></a>";
  206 + html+="<a href='javascript:void(0)' onclick='openSubReceipt(\""+row.waybillnosecondary+"\")' style='text-decoration:none;color:blue;margin-left:20px;'><spring:message code='opt.open.receipt'/></a>";
  207 + return html;
184 } 208 }
  209 +
185 function prebackout(id){ 210 function prebackout(id){
186 if(typeof(id) == "undefined") 211 if(typeof(id) == "undefined")
187 return; 212 return;
@@ -203,7 +228,9 @@ @@ -203,7 +228,9 @@
203 } 228 }
204 //主单撤销按钮 229 //主单撤销按钮
205 function operatorFormat(val, row, index){ 230 function operatorFormat(val, row, index){
206 - return "<a href='javascript:void(0)' onclick='backout("+row.id+")' style='text-decoration:none;'><spring:message code='opt.backout'/></a>"; 231 + var html = "<a href='javascript:void(0)' onclick='backout("+row.id+")' style='text-decoration:none;color:blue;'><spring:message code='opt.backout'/></a>";
  232 + html+="<a href='javascript:void(0)' onclick='openReceipt(\""+row.waybillnomaster+"\")' style='text-decoration:none;color:blue;margin-left:20px;'><spring:message code='opt.open.receipt'/></a>";
  233 + return html;
207 } 234 }
208 function backout(id){ 235 function backout(id){
209 if(typeof(id) == "undefined") 236 if(typeof(id) == "undefined")
@@ -225,6 +252,41 @@ @@ -225,6 +252,41 @@
225 }); 252 });
226 }); 253 });
227 } 254 }
  255 +
  256 + //查看分单回执
  257 + function openSubReceipt(subno){
  258 + if(typeof(subno) == "undefined")
  259 + return;
  260 + console.log("分单号-->"+subno);
  261 + seeReceipt(subno,false);
  262 + }
  263 +
  264 + //查看主单回执
  265 + function openReceipt(no){
  266 + if(typeof(no) == "undefined")
  267 + return;
  268 + console.log("主单号-->"+no);
  269 + seeReceipt(no,true);
  270 + }
  271 +
  272 + function seeReceipt(no,isMain){
  273 + layui.use('layer', function(){
  274 + var layer = layui.layer;
  275 + var api="<%=basePath%>receipt/seeReceipt";
  276 + var params = "no="+no+"&isMain="+isMain;
  277 + var viewUrl = api+"?"+params;
  278 +
  279 + parent.layer.open({
  280 + type: 2,
  281 + title: "<spring:message code='opt.open.receipt'/>",
  282 + shadeClose: true,
  283 + shade: 0.8,
  284 + area: ['80%', '60%'],
  285 + content: viewUrl
  286 + });
  287 + });
  288 + }
  289 +
228 //制分单 290 //制分单
229 function makeHawb(id){ 291 function makeHawb(id){
230 window.location.href="<%=basePath %>manifest/subedit?mawbId="+id; 292 window.location.href="<%=basePath %>manifest/subedit?mawbId="+id;
@@ -236,7 +298,7 @@ @@ -236,7 +298,7 @@
236 } 298 }
237 299
238 function editHbillFormat(val,row,index){ 300 function editHbillFormat(val,row,index){
239 - var html='<a href="javascript:void(0)" style="text-decoration:none;margin-left:20px;" onclick="editHbillRow('+row.id+')"><i class="iconfont">&#xe65a;</i></a>'; 301 + 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>';
240 // 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>'; 302 // 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>';
241 return html; 303 return html;
242 } 304 }
@@ -21,6 +21,11 @@ @@ -21,6 +21,11 @@
21 <script type="text/javascript" src="<%=basePath%>resource/validate/jquery.validate.js"></script> 21 <script type="text/javascript" src="<%=basePath%>resource/validate/jquery.validate.js"></script>
22 <script type="text/javascript" src="<%=basePath%>resource/validate/validate-extends.js"></script> 22 <script type="text/javascript" src="<%=basePath%>resource/validate/validate-extends.js"></script>
23 <link rel="stylesheet" href="<%=basePath%>resource/css/form.css"> 23 <link rel="stylesheet" href="<%=basePath%>resource/css/form.css">
  24 +
  25 +<link rel="stylesheet" href="<%=basePath%>resource/layui/css/layui.css" media="all">
  26 +<script type="text/javascript" src="<%=basePath%>resource/layer-v3.0.3/layer/layer.js"></script>
  27 +<script type="text/javascript" src="<%=basePath%>resource/layui/layui.js"></script>
  28 +
24 <style type="text/css"> 29 <style type="text/css">
25 .required_span { 30 .required_span {
26 color: red; 31 color: red;
@@ -92,19 +97,20 @@ @@ -92,19 +97,20 @@
92 code="manifest.flight.information" /></td> 97 code="manifest.flight.information" /></td>
93 </tr> 98 </tr>
94 <tr> 99 <tr>
95 - <td class="kv-label"><spring:message code="manifest.carrier" /><span  
96 - class="required_span">*</span></td>  
97 - <td class="kv-content"><input required id="carrier_new" name="carrier" type="text" 100 + <%-- <td class="kv-label"><spring:message code="manifest.carrier" /><span
  101 + class="required_span">*</span></td> --%>
  102 + <%-- <td class="kv-content"><input required id="carrier_new" name="carrier" type="text"
98 placeholder="<spring:message code='manifest.carrier.tip'/>" 103 placeholder="<spring:message code='manifest.carrier.tip'/>"
99 - value="${manifest.carrier}" oninput="onInputChange(event,'carrier_new','oninput')"  
100 - onpropertychange="onInputChange(event,'carrier_new','onpropertychange')"></td> 104 + value="${pre.carrier}" oninput="onInputChange(event,'carrier_new','oninput')"
  105 + onpropertychange="onInputChange(event,'carrier_new','onpropertychange')"></td> --%>
101 106
102 <td class="kv-label"><spring:message code="manifest.flight.number" /><span 107 <td class="kv-label"><spring:message code="manifest.flight.number" /><span
103 class="required_span">*</span></td> 108 class="required_span">*</span></td>
104 <td class="kv-content"><input required id="flightno" name="flightno" type="text" 109 <td class="kv-content"><input required id="flightno" name="flightno" type="text"
105 placeholder="<spring:message code='manifest.carrier.flightno.tip'/>" 110 placeholder="<spring:message code='manifest.carrier.flightno.tip'/>"
106 - value="${pre.flightno }" oninput="onInputChange(event,'flightno','oninput')"  
107 - onpropertychange="onInputChange(event,'flightno','onpropertychange')"></td> 111 + value="${pre.carrier}${pre.flightno}" oninput="onInputChange(event,'flightno','oninput')"
  112 + onpropertychange="onInputChange(event,'flightno','onpropertychange')"
  113 + title="<spring:message code='manifest.carrier.flightno.tip'/>"></td>
108 <td class="kv-label"><spring:message code="manifest.flight.date" /><span 114 <td class="kv-label"><spring:message code="manifest.flight.date" /><span
109 class="required_span">*</span></td> 115 class="required_span">*</span></td>
110 <td class="kv-content" colspan="3"><input type="text" class="date bill Wdate" 116 <td class="kv-content" colspan="3"><input type="text" class="date bill Wdate"
@@ -115,13 +121,15 @@ @@ -115,13 +121,15 @@
115 <tr> 121 <tr>
116 <td class="kv-label"><spring:message code="manifest.starting.point" /><span 122 <td class="kv-label"><spring:message code="manifest.starting.point" /><span
117 class="required_span">*</span></td> 123 class="required_span">*</span></td>
118 - <td class="kv-content"><input required id="originatingstation" name="originatingstation"  
119 - type="text" value="${pre.originatingstation }" 124 + <td class="kv-content">
  125 + <input required id="originatingstation" name="originatingstation" type="text" maxlength="3"
  126 + <c:if test="${empty pre.originatingstation}">value="CGO"</c:if>
  127 + <c:if test="${not empty pre.originatingstation}">value="${pre.originatingstation}"</c:if>
120 oninput="onInputChange(event,'originatingstation','oninput')" 128 oninput="onInputChange(event,'originatingstation','oninput')"
121 onpropertychange="onInputChange(event,'originatingstation','onpropertychange')"></td> 129 onpropertychange="onInputChange(event,'originatingstation','onpropertychange')"></td>
122 <td class="kv-label"><spring:message code="manifest.destination" /><span 130 <td class="kv-label"><spring:message code="manifest.destination" /><span
123 class="required_span">*</span></td> 131 class="required_span">*</span></td>
124 - <td class="kv-content" colspan="3"><input required id="destinationstation" 132 + <td class="kv-content" colspan="3"><input required id="destinationstation" maxlength="3"
125 name="destinationstation" type="text" value="${pre.destinationstation}" 133 name="destinationstation" type="text" value="${pre.destinationstation}"
126 oninput="onInputChange(event,'destinationstation','oninput')" 134 oninput="onInputChange(event,'destinationstation','oninput')"
127 onpropertychange="onInputChange(event,'destinationstation','onpropertychange')"></td> 135 onpropertychange="onInputChange(event,'destinationstation','onpropertychange')"></td>
@@ -137,16 +145,15 @@ @@ -137,16 +145,15 @@
137 <td class="kv-label"><spring:message code="manifest.number.of.fittings" /><span 145 <td class="kv-label"><spring:message code="manifest.number.of.fittings" /><span
138 class="required_span">*</span></td> 146 class="required_span">*</span></td>
139 <td class="kv-content"><input required class="delivery number" id="totalpiece" 147 <td class="kv-content"><input required class="delivery number" id="totalpiece"
140 - name="totalpiece" type="text" value="${pre.totalpiece}" 148 + name="totalpiece" type="text" value="${pre.totalpiece}" maxlength="8"
141 onkeyup="value=value.replace(/[^\d]/g,'') " ng-pattern="/[^a-zA-Z]/" 149 onkeyup="value=value.replace(/[^\d]/g,'') " ng-pattern="/[^a-zA-Z]/"
142 oninput="onInputChange(event,'totalpiece','oninput')" 150 oninput="onInputChange(event,'totalpiece','oninput')"
143 onpropertychange="onInputChange(event,'totalpiece','onpropertychange')"> <input 151 onpropertychange="onInputChange(event,'totalpiece','onpropertychange')"> <input
144 id="pie" disabled="disabled"></td> 152 id="pie" disabled="disabled"></td>
145 <td class="kv-label"><spring:message code="manifest.pre.weight" /><span 153 <td class="kv-label"><spring:message code="manifest.pre.weight" /><span
146 class="required_span">*</span></td> 154 class="required_span">*</span></td>
147 - <td class="kv-content"><input required class="delivery number" id="totalweight" 155 + <td class="kv-content"><input required class="delivery number" id="totalweight" maxlength="15"
148 name="totalweight" type="text" value="${pre.totalweight}" 156 name="totalweight" type="text" value="${pre.totalweight}"
149 - onkeyup="value=value.replace(/[^\d]/g,'') " ng-pattern="/[^a-zA-Z]/"  
150 oninput="onInputChange(event,'totalweight','oninput')" 157 oninput="onInputChange(event,'totalweight','oninput')"
151 onpropertychange="onInputChange(event,'totalweight','onpropertychange')"> <input 158 onpropertychange="onInputChange(event,'totalweight','onpropertychange')"> <input
152 id="wei" disabled="disabled"></td> 159 id="wei" disabled="disabled"></td>
@@ -193,22 +200,23 @@ @@ -193,22 +200,23 @@
193 <tr style="display: none;"> 200 <tr style="display: none;">
194 <td class="kv-label"><spring:message code="manifest.number.of.fittings" /><span 201 <td class="kv-label"><spring:message code="manifest.number.of.fittings" /><span
195 class="required_span">*</span></td> 202 class="required_span">*</span></td>
196 - <td class="kv-content"><input required class="delivery number" id="preparepiece" 203 + <td class="kv-content"><input required class="delivery number" id="preparepiece" maxlength="8"
197 name="preparepiece" type="text" value="${pre.preparepiece}" 204 name="preparepiece" type="text" value="${pre.preparepiece}"
198 onkeyup="value=value.replace(/[^\d]/g,'') " ng-pattern="/[^a-zA-Z]/"> <input 205 onkeyup="value=value.replace(/[^\d]/g,'') " ng-pattern="/[^a-zA-Z]/"> <input
199 id="topie" disabled="disabled"></td> 206 id="topie" disabled="disabled"></td>
200 <td class="kv-label"><spring:message code="manifest.pre.weight" /><span 207 <td class="kv-label"><spring:message code="manifest.pre.weight" /><span
201 class="required_span">*</span></td> 208 class="required_span">*</span></td>
202 - <td class="kv-content"><input required class="delivery number" id="prepareweight"  
203 - name="prepareweight" type="text" value="${pre.prepareweight}"  
204 - onkeyup="value=value.replace(/[^\d]/g,'') " ng-pattern="/[^a-zA-Z]/"> <input 209 + <td class="kv-content"><input required class="delivery number" id="prepareweight" maxlength="15"
  210 + name="prepareweight" type="text" value="${pre.prepareweight}"> <input
205 id="towei" disabled="disabled"></td> 211 id="towei" disabled="disabled"></td>
206 </tr> 212 </tr>
207 <tr> 213 <tr>
208 - <td class="kv-label"><spring:message code="manifest.description.of.the.goods" /><span 214 + <td class="kv-label"><spring:message code="delivery.productname" /><span
209 class="required_span">*</span></td> 215 class="required_span">*</span></td>
210 <td class="kv-content" colspan="5"><textarea required id="productname" 216 <td class="kv-content" colspan="5"><textarea required id="productname"
211 - name="productname" maxlength="200">${pre.productname}</textarea></td> 217 + name="productname" maxlength="200"
  218 + oninput="onInputChange(event,'productname','oninput')"
  219 + onpropertychange="onInputChange(event,'productname','onpropertychange')">${pre.productname}</textarea></td>
212 </tr> 220 </tr>
213 <%-- <tr> 221 <%-- <tr>
214 <td class="kv-label"><spring:message code="manifest.agent.name" /></td> 222 <td class="kv-label"><spring:message code="manifest.agent.name" /></td>
@@ -237,10 +245,18 @@ @@ -237,10 +245,18 @@
237 if(index >= 0) 245 if(index >= 0)
238 { 246 {
239 var consignor = consignorList[index]; 247 var consignor = consignorList[index];
240 - $("#co_company").val(consignor.co_company?consignor.co_company:"");  
241 - $("#co_address").val(consignor.co_address?consignor.co_address:""); 248 + $("#co_company").val(consignor.co_company?consignor.co_company.toUpperCase():"");
  249 + var address = consignor.co_address;
  250 + if(notEmpty(address)){
  251 + if(address.length>70){
  252 + address = address.substring(0,70);
  253 + }
  254 + }else{
  255 + address = "";
  256 + }
  257 + $("#co_address").val(address.toUpperCase());
242 $("#co_telephone").val(consignor.co_telephone?consignor.co_telephone:""); 258 $("#co_telephone").val(consignor.co_telephone?consignor.co_telephone:"");
243 - $("#co_country").val(consignor.co_country?consignor.co_country:""); 259 + $("#co_country").val(consignor.co_country?consignor.co_country:"CN");
244 $("#co_city").val(consignor.co_city?consignor.co_city:""); 260 $("#co_city").val(consignor.co_city?consignor.co_city:"");
245 $("#co_deltaname").val(consignor.co_deltaname?consignor.co_deltaname:""); 261 $("#co_deltaname").val(consignor.co_deltaname?consignor.co_deltaname:"");
246 $("#co_name").val(consignor.co_name?consignor.co_name:""); 262 $("#co_name").val(consignor.co_name?consignor.co_name:"");
@@ -251,7 +267,7 @@ @@ -251,7 +267,7 @@
251 if(notEmpty(consignor.shpcusid)){ 267 if(notEmpty(consignor.shpcusid)){
252 var temp = consignor.shpcusid.split("+")[1]; 268 var temp = consignor.shpcusid.split("+")[1];
253 if(notEmpty(temp)){ 269 if(notEmpty(temp)){
254 - $("#shpcusid").val(temp); 270 + $("#shpcusid").val(temp.toUpperCase());
255 } 271 }
256 } 272 }
257 } 273 }
@@ -281,17 +297,21 @@ @@ -281,17 +297,21 @@
281 <tr> 297 <tr>
282 <td class="kv-label"><spring:message code="manifest.company" /><span 298 <td class="kv-label"><spring:message code="manifest.company" /><span
283 class="required_span">*</span></td> 299 class="required_span">*</span></td>
284 - <td class="kv-content"><input required id="co_company" name="co_company" type="text" 300 + <td class="kv-content"><input required id="co_company" name="co_company" type="text" maxlength="70"
285 value="${pre.co_company}" oninput="onInputChange(event,'co_company','oninput')" 301 value="${pre.co_company}" oninput="onInputChange(event,'co_company','oninput')"
286 onpropertychange="onInputChange(event,'co_company','onpropertychange')"></td> 302 onpropertychange="onInputChange(event,'co_company','onpropertychange')"></td>
287 <td class="kv-label"><spring:message code="manifest.address" /><span 303 <td class="kv-label"><spring:message code="manifest.address" /><span
288 class="required_span">*</span></td> 304 class="required_span">*</span></td>
289 <td class="kv-content"><input required id="co_address" name="co_address" type="text" 305 <td class="kv-content"><input required id="co_address" name="co_address" type="text"
290 - value="${pre.co_address}" maxlength="70"></td> 306 + value="${pre.co_address}" maxlength="70"
  307 + oninput="onInputChange(event,'co_address','oninput')"
  308 + onpropertychange="onInputChange(event,'co_address','onpropertychange')"></td>
291 <td class="kv-label"><spring:message code="manifest.country" /><span 309 <td class="kv-label"><spring:message code="manifest.country" /><span
292 class="required_span">*</span></td> 310 class="required_span">*</span></td>
293 - <td class="kv-content"><input required id="co_country" name="co_country" maxlength="2"  
294 - type="text" value="${pre.co_country }" 311 + <td class="kv-content">
  312 + <input required id="co_country" name="co_country" maxlength="2" type="text"
  313 + <c:if test="${empty pre.co_country}">value="CN"</c:if>
  314 + <c:if test="${not empty pre.co_country}">value="${pre.co_country}"</c:if>
295 oninput="onInputChange(event,'co_country','oninput')" 315 oninput="onInputChange(event,'co_country','oninput')"
296 onpropertychange="onInputChange(event,'co_country','onpropertychange')"></td> 316 onpropertychange="onInputChange(event,'co_country','onpropertychange')"></td>
297 </tr> 317 </tr>
@@ -301,26 +321,26 @@ @@ -301,26 +321,26 @@
301 value="${pre.co_city }" oninput="onInputChange(event,'co_city','oninput')" 321 value="${pre.co_city }" oninput="onInputChange(event,'co_city','oninput')"
302 onpropertychange="onInputChange(event,'co_city','onpropertychange')"></td> --%> 322 onpropertychange="onInputChange(event,'co_city','onpropertychange')"></td> --%>
303 <td class="kv-label"><spring:message code="manifest.state" /></td> 323 <td class="kv-label"><spring:message code="manifest.state" /></td>
304 - <td class="kv-content"><input id="co_deltaname" name="co_deltaname" type="text" 324 + <td class="kv-content"><input id="co_deltaname" name="co_deltaname" type="text" maxlength="35"
305 value="${pre.co_deltaname }"></td> 325 value="${pre.co_deltaname }"></td>
306 <td class="kv-label"><spring:message code="manifest.zip.code" /></td> 326 <td class="kv-label"><spring:message code="manifest.zip.code" /></td>
307 - <td class="kv-content" colspan="3"><input id="co_zipcode" name="co_zipcode" type="text" 327 + <td class="kv-content" colspan="3"><input id="co_zipcode" name="co_zipcode" type="text" maxlength="9"
308 value="${pre.co_zipcode }"></td> 328 value="${pre.co_zipcode }"></td>
309 </tr> 329 </tr>
310 <tr> 330 <tr>
311 <td class="kv-label"><spring:message code="manifest.telephone" /></td> 331 <td class="kv-label"><spring:message code="manifest.telephone" /></td>
312 - <td class="kv-content"><input id="co_telephone" name="co_telephone" type="text" 332 + <td class="kv-content"><input id="co_telephone" name="co_telephone" type="text" maxlength="50"
313 value="${pre.co_telephone }" 333 value="${pre.co_telephone }"
314 placeholder="<spring:message code="manifest.fhr.fh_placeholder"/>"></td> 334 placeholder="<spring:message code="manifest.fhr.fh_placeholder"/>"></td>
315 <td class="kv-label"><spring:message code="manifest.fax" /></td> 335 <td class="kv-label"><spring:message code="manifest.fax" /></td>
316 - <td class="kv-content"><input id="co_fax" name="co_fax" type="text" 336 + <td class="kv-content"><input id="co_fax" name="co_fax" type="text" maxlength="50"
317 value="${pre.co_fax }" placeholder="<spring:message code="manifest.fhr.fh_placeholder"/>"></td> 337 value="${pre.co_fax }" placeholder="<spring:message code="manifest.fhr.fh_placeholder"/>"></td>
318 <td style="display: none;" class="kv-label"><spring:message code="manifest.name" /><span 338 <td style="display: none;" class="kv-label"><spring:message code="manifest.name" /><span
319 class="required_span">*</span></td> 339 class="required_span">*</span></td>
320 <td style="display: none;" class="kv-content" colspan="5"><input required id="co_name" 340 <td style="display: none;" class="kv-content" colspan="5"><input required id="co_name"
321 name="co_name" type="text" value="${pre.co_name }"></td> 341 name="co_name" type="text" value="${pre.co_name }"></td>
322 <td class="kv-label"><spring:message code="manifest.fhr.shpaeo" /></td> 342 <td class="kv-label"><spring:message code="manifest.fhr.shpaeo" /></td>
323 - <td class="kv-content"><input id="shpaeo" name="shpaeo" type="text" 343 + <td class="kv-content"><input id="shpaeo" name="shpaeo" type="text" maxlength="20"
324 value="${pre.shpaeo }" oninput="onInputChange(event,'shpaeo','oninput')" 344 value="${pre.shpaeo }" oninput="onInputChange(event,'shpaeo','oninput')"
325 onpropertychange="onInputChange(event,'shpaeo','onpropertychange')"></td> 345 onpropertychange="onInputChange(event,'shpaeo','onpropertychange')"></td>
326 </tr> 346 </tr>
@@ -344,7 +364,7 @@ @@ -344,7 +364,7 @@
344 value="${tempShpValue}" 364 value="${tempShpValue}"
345 </c:if> 365 </c:if>
346 placeholder="<spring:message code='manifest.enterprise.code' />" 366 placeholder="<spring:message code='manifest.enterprise.code' />"
347 - oninput="onInputChange(event,'shpcusid','oninput')" 367 + oninput="onInputChange(event,'shpcusid','oninput')" maxlength="100"
348 onpropertychange="onInputChange(event,'shpcusid','onpropertychange')"></td> 368 onpropertychange="onInputChange(event,'shpcusid','onpropertychange')"></td>
349 </tr> 369 </tr>
350 <!-- 发货信息 end --> 370 <!-- 发货信息 end -->
@@ -365,11 +385,11 @@ @@ -365,11 +385,11 @@
365 if(index >= 0) 385 if(index >= 0)
366 { 386 {
367 var consignee = consigneeList[index]; 387 var consignee = consigneeList[index];
368 - $("#sh_company").val(consignee.code?consignee.code:"");  
369 - $("#sh_address").val(consignee.address?consignee.address:""); 388 + $("#sh_company").val(consignee.code?consignee.code.toUpperCase():"");
  389 + $("#sh_address").val(consignee.address?consignee.address.toUpperCase():"");
370 $("#sh_telephone").val(consignee.tel?consignee.tel:""); 390 $("#sh_telephone").val(consignee.tel?consignee.tel:"");
371 $("#sh_country").val(consignee.name?consignee.name:""); 391 $("#sh_country").val(consignee.name?consignee.name:"");
372 - $("#sh_name").val(consignee.code?consignee.code:""); 392 + $("#sh_name").val(consignee.code?consignee.code.toUpperCase():"");
373 } 393 }
374 } 394 }
375 } 395 }
@@ -396,24 +416,26 @@ @@ -396,24 +416,26 @@
396 <tr> 416 <tr>
397 <td class="kv-label"><spring:message code="manifest.company" /><span 417 <td class="kv-label"><spring:message code="manifest.company" /><span
398 class="required_span">*</span></td> 418 class="required_span">*</span></td>
399 - <td class="kv-content"><input required id="sh_company" name="sh_company" type="text" 419 + <td class="kv-content"><input required id="sh_company" name="sh_company" type="text" maxlength="70"
400 value="${pre.sh_company }" oninput="onInputChange(event,'sh_company','oninput')" 420 value="${pre.sh_company }" oninput="onInputChange(event,'sh_company','oninput')"
401 onpropertychange="onInputChange(event,'sh_company','onpropertychange')"></td> 421 onpropertychange="onInputChange(event,'sh_company','onpropertychange')"></td>
402 <td class="kv-label"><spring:message code="manifest.address" /><span 422 <td class="kv-label"><spring:message code="manifest.address" /><span
403 class="required_span">*</span></td> 423 class="required_span">*</span></td>
404 <td class="kv-content"><input required id="sh_address" name="sh_address" type="text" 424 <td class="kv-content"><input required id="sh_address" name="sh_address" type="text"
405 - value="${pre.sh_address }" maxlength="70"></td> 425 + value="${pre.sh_address }" maxlength="70"
  426 + oninput="onInputChange(event,'sh_address','oninput')"
  427 + onpropertychange="onInputChange(event,'sh_address','onpropertychange')"></td>
406 <td class="kv-label"><spring:message code="manifest.zip.code" /></td> 428 <td class="kv-label"><spring:message code="manifest.zip.code" /></td>
407 - <td class="kv-content"><input id="sh_zipcode" name="sh_zipcode" type="text" 429 + <td class="kv-content"><input id="sh_zipcode" name="sh_zipcode" type="text" maxlength="9"
408 value="${pre.sh_zipcode }"></td> 430 value="${pre.sh_zipcode }"></td>
409 </tr> 431 </tr>
410 <tr> 432 <tr>
411 <td class="kv-label"><spring:message code="manifest.city" /><span class="required_span">*</span></td> 433 <td class="kv-label"><spring:message code="manifest.city" /><span class="required_span">*</span></td>
412 - <td class="kv-content"><input required id="sh_city" name="sh_city" type="text" 434 + <td class="kv-content"><input required id="sh_city" name="sh_city" type="text" maxlength="35"
413 value="${pre.sh_city }" oninput="onInputChange(event,'sh_city','oninput')" 435 value="${pre.sh_city }" oninput="onInputChange(event,'sh_city','oninput')"
414 onpropertychange="onInputChange(event,'sh_city','onpropertychange')"></td> 436 onpropertychange="onInputChange(event,'sh_city','onpropertychange')"></td>
415 <td class="kv-label"><spring:message code="manifest.state" /></td> 437 <td class="kv-label"><spring:message code="manifest.state" /></td>
416 - <td class="kv-content"><input id="sh_deltaname" name="sh_deltaname" type="text" 438 + <td class="kv-content"><input id="sh_deltaname" name="sh_deltaname" type="text" maxlength="35"
417 value="${pre.sh_deltaname}"></td> 439 value="${pre.sh_deltaname}"></td>
418 <td class="kv-label"><spring:message code="manifest.country" /><span 440 <td class="kv-label"><spring:message code="manifest.country" /><span
419 class="required_span">*</span></td> 441 class="required_span">*</span></td>
@@ -424,23 +446,20 @@ @@ -424,23 +446,20 @@
424 </tr> 446 </tr>
425 <tr> 447 <tr>
426 <td class="kv-label"><spring:message code="manifest.telephone" /></td> 448 <td class="kv-label"><spring:message code="manifest.telephone" /></td>
427 - <td class="kv-content"><input id="sh_telephone" name="sh_telephone" type="text" 449 + <td class="kv-content"><input id="sh_telephone" name="sh_telephone" type="text" maxlength="50"
428 value="${pre.sh_telephone }"></td> 450 value="${pre.sh_telephone }"></td>
429 <td class="kv-label"><spring:message code="manifest.fax" /></td> 451 <td class="kv-label"><spring:message code="manifest.fax" /></td>
430 - <td class="kv-content"><input id="sh_fax" name="sh_fax" type="text" 452 + <td class="kv-content"><input id="sh_fax" name="sh_fax" type="text" maxlength="50"
431 value="${pre.sh_fax }"></td> 453 value="${pre.sh_fax }"></td>
432 <td style="display: none;" class="kv-label"><spring:message code="manifest.name" /></td> 454 <td style="display: none;" class="kv-label"><spring:message code="manifest.name" /></td>
433 <td style="display: none;" class="kv-content" colspan="5"><input id="sh_name" 455 <td style="display: none;" class="kv-content" colspan="5"><input id="sh_name"
434 name="sh_name" type="text" value="${pre.sh_name }"></td> 456 name="sh_name" type="text" value="${pre.sh_name }"></td>
435 <td class="kv-label"><spring:message code="manifest.shr.cneaeo" /></td> 457 <td class="kv-label"><spring:message code="manifest.shr.cneaeo" /></td>
436 - <td class="kv-content"><input id="cneaeo" name="cneaeo" type="text" 458 + <td class="kv-content"><input id="cneaeo" name="cneaeo" type="text" maxlength="20"
437 value="${pre.cneaeo }" oninput="onInputChange(event,'cneaeo','oninput')" 459 value="${pre.cneaeo }" oninput="onInputChange(event,'cneaeo','oninput')"
438 onpropertychange="onInputChange(event,'cneaeo','onpropertychange')"></td> 460 onpropertychange="onInputChange(event,'cneaeo','onpropertychange')"></td>
439 </tr> 461 </tr>
440 462
441 - <tr style="display: none;">  
442 - <td> <input value="${pre.cnecusid}"/> <input value="${pre.shpcusid}"/> </td>  
443 - </tr>  
444 <%-- <tr> 463 <%-- <tr>
445 <td class="kv-label"><spring:message code="manifest.province.code" /></td> 464 <td class="kv-label"><spring:message code="manifest.province.code" /></td>
446 <td class="kv-content"><input id="sh_provincecode" name="sh_provincecode" type="text" 465 <td class="kv-content"><input id="sh_provincecode" name="sh_provincecode" type="text"
@@ -471,10 +490,9 @@ @@ -471,10 +490,9 @@
471 value="${tempCneValue }" 490 value="${tempCneValue }"
472 </c:if> 491 </c:if>
473 placeholder="<spring:message code='manifest.enterprise.code' />" 492 placeholder="<spring:message code='manifest.enterprise.code' />"
474 - oninput="onInputChange(event,'cnecusid','oninput')" 493 + oninput="onInputChange(event,'cnecusid','oninput')" maxlength="100"
475 onpropertychange="onInputChange(event,'cnecusid','onpropertychange')"></td> 494 onpropertychange="onInputChange(event,'cnecusid','onpropertychange')"></td>
476 495
477 -  
478 <td style="display: none;" class="kv-label"><spring:message 496 <td style="display: none;" class="kv-label"><spring:message
479 code="manifest.shr.unlodingcode" /><span class="required_span">*</span></td> 497 code="manifest.shr.unlodingcode" /><span class="required_span">*</span></td>
480 <td style="display: none;" class="kv-content"><input required id="unlodingcode" 498 <td style="display: none;" class="kv-content"><input required id="unlodingcode"
@@ -617,11 +635,17 @@ @@ -617,11 +635,17 @@
617 </form> 635 </form>
618 </div> 636 </div>
619 </div> 637 </div>
620 - <script type="text/javascript" src="<%=basePath%>resource/layer-v3.0.3/layer/layer.js"></script>  
621 <script src="<%=basePath%>resource/easyui/jquery.easyui.min.js"></script> 638 <script src="<%=basePath%>resource/easyui/jquery.easyui.min.js"></script>
622 <script src="<%=basePath%>resource/My97DatePicker/WdatePicker.js"></script> 639 <script src="<%=basePath%>resource/My97DatePicker/WdatePicker.js"></script>
623 - <script src="<%=basePath%>resource/js/tools.js?version=1.2"></script> 640 + <script src="<%=basePath%>resource/js/tools.js?version=${version}"></script>
624 <script type="text/javascript"> 641 <script type="text/javascript">
  642 +
  643 + var layerIndex;
  644 + var layer;
  645 + layui.use('layer', function(){
  646 + layer = layui.layer;
  647 + });
  648 +
625 function onCarrierMsg() { 649 function onCarrierMsg() {
626 layer.open({content: "<spring:message code='manifest.fhr.carrierMsg'/>"}); 650 layer.open({content: "<spring:message code='manifest.fhr.carrierMsg'/>"});
627 } 651 }
@@ -774,8 +798,12 @@ @@ -774,8 +798,12 @@
774 798
775 799
776 function submit(){ 800 function submit(){
777 - var dd = $("#ways").val();  
778 - $("#waybillnosecondary").val(dd) 801 + layerIndex = parent.layer.load(1, {
  802 + shade: [0.6,'#000000'] //0.1透明度
  803 + });
  804 +
  805 + var dd = $("#ways").val();
  806 + $("#waybillnosecondary").val(dd)
779 var data = $("#form").serialize(); 807 var data = $("#form").serialize();
780 808
781 var shp_cusid_type = getSelectedValue("co_cusid"); 809 var shp_cusid_type = getSelectedValue("co_cusid");
@@ -794,9 +822,11 @@ @@ -794,9 +822,11 @@
794 data+="&cnecusid="+encodeURIComponent(cnecusid); 822 data+="&cnecusid="+encodeURIComponent(cnecusid);
795 } 823 }
796 824
797 - console.log("form-->"+data); 825 + /* console.log("form-->"+data); */
798 826
799 $.post("<%=basePath%>manifest/sub_save",data,function(data){ 827 $.post("<%=basePath%>manifest/sub_save",data,function(data){
  828 + parent.layer.close(layerIndex);
  829 +
800 if(data.status==200){ 830 if(data.status==200){
801 // layer.confirm("<spring:message code="opt.savesuccess" />!",{btn:['<spring:message code="opt.confirm" />','<spring:message code="opt.cancel" />']},function(){ 831 // layer.confirm("<spring:message code="opt.savesuccess" />!",{btn:['<spring:message code="opt.confirm" />','<spring:message code="opt.cancel" />']},function(){
802 window.location.href="<%=basePath%>manifest/list"; 832 window.location.href="<%=basePath%>manifest/list";
@@ -811,6 +841,10 @@ @@ -811,6 +841,10 @@
811 function presavesend(){ 841 function presavesend(){
812 var isValid = $("#form").valid(); 842 var isValid = $("#form").valid();
813 if(isValid){ 843 if(isValid){
  844 + layerIndex = parent.layer.load(1, {
  845 + shade: [0.6,'#000000'] //0.1透明度
  846 + });
  847 +
814 var dd = $("#ways").val(); 848 var dd = $("#ways").val();
815 $("#waybillnosecondary").val(dd); 849 $("#waybillnosecondary").val(dd);
816 var data = $("#form").serialize(); 850 var data = $("#form").serialize();
@@ -831,10 +865,12 @@ @@ -831,10 +865,12 @@
831 } 865 }
832 866
833 $.post("<%=basePath%>manifest/presavesend",data,function(data){ 867 $.post("<%=basePath%>manifest/presavesend",data,function(data){
  868 + parent.layer.close(layerIndex);
  869 +
834 if(data.status==200){ 870 if(data.status==200){
835 window.location.href="<%=basePath%>manifest/list"; 871 window.location.href="<%=basePath%>manifest/list";
836 }else{ 872 }else{
837 - layer.open({content:""+data.msg}); 873 + layer.open({content:""+data.msg});
838 } 874 }
839 }) 875 })
840 } 876 }
@@ -1037,6 +1073,7 @@ @@ -1037,6 +1073,7 @@
1037 } 1073 }
1038 }); 1074 });
1039 } 1075 }
  1076 +
1040 </script> 1077 </script>
1041 </body> 1078 </body>
1042 </html> 1079 </html>
  1 +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
  2 +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
  3 +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
  4 +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  5 +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  6 +<%
  7 + String path = request.getContextPath();
  8 + String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
  9 + + path + "/";
  10 +%>
  11 +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  12 +<html>
  13 +<head>
  14 +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  15 +<meta name="viewport" content="width=device-width, initial-scale=1">
  16 +<title><spring:message code='opt.open.receipt' /></title>
  17 +<script type="text/javascript" src="<%=basePath%>resource/easyui/jquery.min.js"></script>
  18 +<script type="text/javascript" src="<%=basePath%>resource/validate/jquery.validate.js"></script>
  19 +<script type="text/javascript" src="<%=basePath%>resource/validate/validate-extends.js"></script>
  20 +<!-- validate 验证中英文 -->
  21 +<script type="text/javascript"
  22 + src="<%=basePath %>resource/validate/jquery.validate-${pageContext.response.locale}.js"></script>
  23 +<link rel="stylesheet" href="<%=basePath%>resource/layui/css/layui.css" media="all">
  24 +<script type="text/javascript" src="<%=basePath%>resource/layui/layui.js"></script>
  25 +</head>
  26 +<body>
  27 + <div class="layui-row">
  28 + <table class="layui-table" lay-even>
  29 + <thead>
  30 + <tr>
  31 + <th>时间</th>
  32 + <th>航班</th>
  33 + <th>件数</th>
  34 + <th>重量</th>
  35 + <th>回执内容</th>
  36 + </tr>
  37 + </thead>
  38 + <tbody>
  39 + <c:forEach var="data" items="${dataList}" varStatus="status">
  40 + <tr>
  41 + <td>${data.createDate}</td>
  42 + <td>${data.carrier}${data.flightno}</td>
  43 + <td>${data.piece}</td>
  44 + <td>${data.weight}</td>
  45 + <td>
  46 + <c:choose>
  47 + <c:when test="${fn:indexOf(data.response_text,'41301')>-1}">
  48 + <span style="color:green;">${data.response_text}</span>
  49 + </c:when>
  50 + <c:when test="${fn:indexOf(data.response_text,'45201')>-1}">
  51 + <span style="color:green;">${data.response_text}</span>
  52 + </c:when>
  53 + <c:when test="${fn:indexOf(data.response_text,'分单')>-1}">
  54 + <span style="color:black;">${data.response_text}</span>
  55 + </c:when>
  56 + <c:when test="${fn:indexOf(data.response_text,'主单')>-1}">
  57 + <span style="color:black;">${data.response_text}</span>
  58 + </c:when>
  59 + <c:otherwise>
  60 + <span style="color:red;">${data.response_text}</span>
  61 + </c:otherwise>
  62 + </c:choose>
  63 + </td>
  64 + </tr>
  65 + </c:forEach>
  66 + </tbody>
  67 + </table>
  68 + </div>
  69 +
  70 + <script>
  71 + var layer;
  72 + layui.use('layer', function() {
  73 + layer = layui.layer;
  74 + });
  75 + </script>
  76 +</body>
  77 +</html>
@@ -256,15 +256,12 @@ function onInputChange(event, id, method) { @@ -256,15 +256,12 @@ function onInputChange(event, id, method) {
256 } else { 256 } else {
257 content = event.target.value; 257 content = event.target.value;
258 } 258 }
259 - 259 +
260 if (content) { 260 if (content) {
  261 + content = excludeSpecial(content);
261 var upper = content.toUpperCase(); 262 var upper = content.toUpperCase();
262 $("#" + id).val(upper); 263 $("#" + id).val(upper);
263 264
264 - if (id && id == "carrier_new") {  
265 - $("#carrier").html(upper);  
266 - }  
267 -  
268 if (id && id == "destinationstation") { 265 if (id && id == "destinationstation") {
269 $("#reach_station").val(upper); 266 $("#reach_station").val(upper);
270 $("#unlodingcode").val(upper); 267 $("#unlodingcode").val(upper);
@@ -272,17 +269,17 @@ function onInputChange(event, id, method) { @@ -272,17 +269,17 @@ function onInputChange(event, id, method) {
272 269
273 if (id && id == "totalpiece") { 270 if (id && id == "totalpiece") {
274 $("#de_number").val(upper); 271 $("#de_number").val(upper);
275 - $("#preparepiece").val(upper);//分单  
276 - $("#preparetotalpiece").val(upper);//主单 272 + $("#preparepiece").val(upper);// 分单
  273 + $("#preparetotalpiece").val(upper);// 主单
277 } 274 }
278 275
279 if (id && id == "totalweight") { 276 if (id && id == "totalweight") {
280 $("#de_weight").val(upper); 277 $("#de_weight").val(upper);
281 $("#de_chweight").val(upper); 278 $("#de_chweight").val(upper);
282 - $("#prepareweight").val(upper);//分单  
283 - $("#preparetotalweight").val(upper);//主单 279 + $("#prepareweight").val(upper);// 分单
  280 + $("#preparetotalweight").val(upper);// 主单
284 } 281 }
285 - 282 +
286 if (id && id == "co_company") { 283 if (id && id == "co_company") {
287 $("#co_name").val(upper); 284 $("#co_name").val(upper);
288 } 285 }
@@ -291,13 +288,23 @@ function onInputChange(event, id, method) { @@ -291,13 +288,23 @@ function onInputChange(event, id, method) {
291 $("#sh_name").val(upper); 288 $("#sh_name").val(upper);
292 } 289 }
293 290
  291 + if (id && id == "flightno") {
  292 + $("#flightno").html(upper);
  293 + if (upper.length > 2) {
  294 + var carrier = upper.substring(0, 2);
  295 + $("#carrier").html(carrier);
  296 + }
  297 +
  298 + checkFlight(upper);
  299 + }
  300 +
294 } 301 }
295 } 302 }
296 303
297 -//判断数据是否为空 304 +// 判断数据是否为空
298 function isEmpty(data) { 305 function isEmpty(data) {
299 if (data == undefined || data == "undefined" || data == null 306 if (data == undefined || data == "undefined" || data == null
300 - || data == "null" || data == "") { 307 + || data == "null" || data == "" || data == "UNDEFINED") {
301 return true; 308 return true;
302 } else { 309 } else {
303 return false; 310 return false;
@@ -308,7 +315,7 @@ function notEmpty(data) { @@ -308,7 +315,7 @@ function notEmpty(data) {
308 return !isEmpty(data); 315 return !isEmpty(data);
309 } 316 }
310 317
311 -//获取下拉列表选中项的文本 318 +// 获取下拉列表选中项的文本
312 function getSelectedText(eid) { 319 function getSelectedText(eid) {
313 var obj = document.getElementById(eid); 320 var obj = document.getElementById(eid);
314 for (i = 0; i < obj.length; i++) { 321 for (i = 0; i < obj.length; i++) {
@@ -324,4 +331,30 @@ function getSelectedValue(eid) { @@ -324,4 +331,30 @@ function getSelectedValue(eid) {
324 var obj = document.getElementById(eid); 331 var obj = document.getElementById(eid);
325 // 直接用其对象的value属性便可获取到 332 // 直接用其对象的value属性便可获取到
326 return obj.value; 333 return obj.value;
327 -}  
  334 +}
  335 +
  336 +// 去掉字符串中的特殊字符
  337 +var excludeSpecial = function(s) {
  338 + var data = s;
  339 + if (isEmpty(data)) {
  340 + return "";
  341 + }
  342 + // 去掉转义字符
  343 + data = data.replace(/[\'\"\\\/\b\f\n\r\t]/g, '');
  344 + // 去掉特殊字符
  345 + data = data.replace(/[\@\#\$\%\^\&\*\{\}\:\"\<\>\?]/);
  346 + if (isEmpty(data)) {
  347 + data = "";
  348 + }
  349 +
  350 + data = data.replace("UNDEFINED", "").replace("undefined", "");
  351 + // console.log("data-->"+data);
  352 + return data;
  353 +}
  354 +
  355 +function checkFlight(flightno) {
  356 + var reg = /^[0-9a-zA-Z]+$/;
  357 + if (!reg.test(flightno)) {
  358 + $("#flightno").val("");
  359 + }
  360 +}
1 -.layui-layer-imgbar,.layui-layer-imgtit a,.layui-layer-tab .layui-layer-title span,.layui-layer-title{text-overflow:ellipsis;white-space:nowrap}*html{background-image:url(about:blank);background-attachment:fixed}html #layuicss-skinlayercss{display:none;position:absolute;width:1989px}.layui-layer,.layui-layer-shade{position:fixed;_position:absolute;pointer-events:auto}.layui-layer-shade{top:0;left:0;width:100%;height:100%;_height:expression(document.body.offsetHeight+"px")}.layui-layer{-webkit-overflow-scrolling:touch;top:150px;left:0;margin:0;padding:0;background-color:#fff;-webkit-background-clip:content;box-shadow:1px 1px 50px rgba(0,0,0,.3)}.layui-layer-close{position:absolute}.layui-layer-content{position:relative}.layui-layer-border{border:1px solid #B2B2B2;border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 5px rgba(0,0,0,.2)}.layui-layer-load{background:url(loading-1.gif) center center no-repeat #eee}.layui-layer-ico{background:url(icon.png) no-repeat}.layui-layer-btn a,.layui-layer-dialog .layui-layer-ico,.layui-layer-setwin a{display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-move{display:none;position:fixed;*position:absolute;left:0;top:0;width:100%;height:100%;cursor:move;opacity:0;filter:alpha(opacity=0);background-color:#fff;z-index:2147483647}.layui-layer-resize{position:absolute;width:15px;height:15px;right:0;bottom:0;cursor:se-resize}.layui-layer{border-radius:2px;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.3s;animation-duration:.3s}@-webkit-keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);-ms-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim{-webkit-animation-name:layer-bounceIn;animation-name:layer-bounceIn}@-webkit-keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);-ms-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);-ms-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-01{-webkit-animation-name:layer-zoomInDown;animation-name:layer-zoomInDown}@-webkit-keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.layer-anim-02{-webkit-animation-name:layer-fadeInUpBig;animation-name:layer-fadeInUpBig}@-webkit-keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);-ms-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);-ms-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-03{-webkit-animation-name:layer-zoomInLeft;animation-name:layer-zoomInLeft}@-webkit-keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}@keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);-ms-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);-ms-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}.layer-anim-04{-webkit-animation-name:layer-rollIn;animation-name:layer-rollIn}@keyframes layer-fadeIn{0%{opacity:0}100%{opacity:1}}.layer-anim-05{-webkit-animation-name:layer-fadeIn;animation-name:layer-fadeIn}@-webkit-keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}}.layer-anim-06{-webkit-animation-name:layer-shake;animation-name:layer-shake}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.layui-layer-title{padding:0 80px 0 20px;height:42px;line-height:42px;border-bottom:1px solid #eee;font-size:14px;color:#333;overflow:hidden;background-color:#F8F8F8;border-radius:2px 2px 0 0}.layui-layer-setwin{position:absolute;right:15px;*right:0;top:15px;font-size:0;line-height:initial}.layui-layer-setwin a{position:relative;width:16px;height:16px;margin-left:10px;font-size:12px;_overflow:hidden}.layui-layer-setwin .layui-layer-min cite{position:absolute;width:14px;height:2px;left:0;top:50%;margin-top:-1px;background-color:#2E2D3C;cursor:pointer;_overflow:hidden}.layui-layer-setwin .layui-layer-min:hover cite{background-color:#2D93CA}.layui-layer-setwin .layui-layer-max{background-position:-32px -40px}.layui-layer-setwin .layui-layer-max:hover{background-position:-16px -40px}.layui-layer-setwin .layui-layer-maxmin{background-position:-65px -40px}.layui-layer-setwin .layui-layer-maxmin:hover{background-position:-49px -40px}.layui-layer-setwin .layui-layer-close1{background-position:1px -40px;cursor:pointer}.layui-layer-setwin .layui-layer-close1:hover{opacity:.7}.layui-layer-setwin .layui-layer-close2{position:absolute;right:-28px;top:-28px;width:30px;height:30px;margin-left:0;background-position:-149px -31px;*right:-18px;_display:none}.layui-layer-setwin .layui-layer-close2:hover{background-position:-180px -31px}.layui-layer-btn{text-align:right;padding:0 10px 12px;pointer-events:auto;user-select:none;-webkit-user-select:none}.layui-layer-btn a{height:28px;line-height:28px;margin:6px 6px 0;padding:0 15px;border:1px solid #dedede;background-color:#f1f1f1;color:#333;border-radius:2px;font-weight:400;cursor:pointer;text-decoration:none}.layui-layer-btn a:hover{opacity:.9;text-decoration:none}.layui-layer-btn a:active{opacity:.8}.layui-layer-btn .layui-layer-btn0{border-color:#4898d5;background-color:#2e8ded;color:#fff}.layui-layer-btn-l{text-align:left}.layui-layer-btn-c{text-align:center}.layui-layer-dialog{min-width:260px}.layui-layer-dialog .layui-layer-content{position:relative;padding:20px;line-height:24px;word-break:break-all;overflow:hidden;font-size:14px;overflow-x:hidden;overflow-y:auto}.layui-layer-dialog .layui-layer-content .layui-layer-ico{position:absolute;top:16px;left:15px;_left:-40px;width:30px;height:30px}.layui-layer-ico1{background-position:-30px 0}.layui-layer-ico2{background-position:-60px 0}.layui-layer-ico3{background-position:-90px 0}.layui-layer-ico4{background-position:-120px 0}.layui-layer-ico5{background-position:-150px 0}.layui-layer-ico6{background-position:-180px 0}.layui-layer-rim{border:6px solid #8D8D8D;border:6px solid rgba(0,0,0,.3);border-radius:5px;box-shadow:none}.layui-layer-msg{min-width:180px;border:1px solid #D3D4D3;box-shadow:none}.layui-layer-hui{min-width:100px;background-color:#000;filter:alpha(opacity=60);background-color:rgba(0,0,0,.6);color:#fff;border:none}.layui-layer-hui .layui-layer-content{padding:12px 25px;text-align:center}.layui-layer-dialog .layui-layer-padding{padding:20px 20px 20px 55px;text-align:left}.layui-layer-page .layui-layer-content{position:relative;overflow:auto}.layui-layer-iframe .layui-layer-btn,.layui-layer-page .layui-layer-btn{padding-top:10px}.layui-layer-nobg{background:0 0}.layui-layer-iframe iframe{display:block;width:100%}.layui-layer-loading{border-radius:100%;background:0 0;box-shadow:none;border:none}.layui-layer-loading .layui-layer-content{width:60px;height:24px;background:url(loading-0.gif) no-repeat}.layui-layer-loading .layui-layer-loading1{width:37px;height:37px;background:url(loading-1.gif) no-repeat}.layui-layer-ico16,.layui-layer-loading .layui-layer-loading2{width:32px;height:32px;background:url(loading-2.gif) no-repeat}.layui-layer-tips{background:0 0;box-shadow:none;border:none}.layui-layer-tips .layui-layer-content{position:relative;line-height:22px;min-width:12px;padding:5px 10px;font-size:12px;_float:left;border-radius:2px;box-shadow:1px 1px 3px rgba(0,0,0,.2);background-color:#000;color:#fff}.layui-layer-tips .layui-layer-close{right:-2px;top:-1px}.layui-layer-tips i.layui-layer-TipsG{position:absolute;width:0;height:0;border-width:8px;border-color:transparent;border-style:dashed;*overflow:hidden}.layui-layer-tips i.layui-layer-TipsB,.layui-layer-tips i.layui-layer-TipsT{left:5px;border-right-style:solid;border-right-color:#000}.layui-layer-tips i.layui-layer-TipsT{bottom:-8px}.layui-layer-tips i.layui-layer-TipsB{top:-8px}.layui-layer-tips i.layui-layer-TipsL,.layui-layer-tips i.layui-layer-TipsR{top:1px;border-bottom-style:solid;border-bottom-color:#000}.layui-layer-tips i.layui-layer-TipsR{left:-8px}.layui-layer-tips i.layui-layer-TipsL{right:-8px}.layui-layer-lan[type=dialog]{min-width:280px}.layui-layer-lan .layui-layer-title{background:#4476A7;color:#fff;border:none}.layui-layer-lan .layui-layer-btn{padding:5px 10px 10px;text-align:right;border-top:1px solid #E9E7E7}.layui-layer-lan .layui-layer-btn a{background:#BBB5B5;border:none}.layui-layer-lan .layui-layer-btn .layui-layer-btn1{background:#C9C5C5}.layui-layer-molv .layui-layer-title{background:#009f95;color:#fff;border:none}.layui-layer-molv .layui-layer-btn a{background:#009f95}.layui-layer-molv .layui-layer-btn .layui-layer-btn1{background:#92B8B1}.layui-layer-iconext{background:url(icon-ext.png) no-repeat}.layui-layer-prompt .layui-layer-input{display:block;width:220px;height:30px;margin:0 auto;line-height:30px;padding:0 5px;border:1px solid #ccc;box-shadow:1px 1px 5px rgba(0,0,0,.1) inset;color:#333}.layui-layer-prompt textarea.layui-layer-input{width:300px;height:100px;line-height:20px}.layui-layer-prompt .layui-layer-content{padding:20px}.layui-layer-prompt .layui-layer-btn{padding-top:0}.layui-layer-tab{box-shadow:1px 1px 50px rgba(0,0,0,.4)}.layui-layer-tab .layui-layer-title{padding-left:0;border-bottom:1px solid #ccc;background-color:#eee;overflow:visible}.layui-layer-tab .layui-layer-title span{position:relative;float:left;min-width:80px;max-width:260px;padding:0 20px;text-align:center;cursor:default;overflow:hidden}.layui-layer-tab .layui-layer-title span.layui-layer-tabnow{height:43px;border-left:1px solid #ccc;border-right:1px solid #ccc;background-color:#fff;z-index:10}.layui-layer-tab .layui-layer-title span:first-child{border-left:none}.layui-layer-tabmain{line-height:24px;clear:both}.layui-layer-tabmain .layui-layer-tabli{display:none}.layui-layer-tabmain .layui-layer-tabli.xubox_tab_layer{display:block}.xubox_tabclose{position:absolute;right:10px;top:5px;cursor:pointer}.layui-layer-photos{-webkit-animation-duration:.8s;animation-duration:.8s}.layui-layer-photos .layui-layer-content{overflow:hidden;text-align:center}.layui-layer-photos .layui-layer-phimg img{position:relative;width:100%;display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-imgbar,.layui-layer-imguide{display:none}.layui-layer-imgnext,.layui-layer-imgprev{position:absolute;top:50%;width:27px;_width:44px;height:44px;margin-top:-22px;outline:0;blr:expression(this.onFocus=this.blur())}.layui-layer-imgprev{left:10px;background-position:-5px -5px;_background-position:-70px -5px}.layui-layer-imgprev:hover{background-position:-33px -5px;_background-position:-120px -5px}.layui-layer-imgnext{right:10px;_right:8px;background-position:-5px -50px;_background-position:-70px -50px}.layui-layer-imgnext:hover{background-position:-33px -50px;_background-position:-120px -50px}.layui-layer-imgbar{position:absolute;left:0;bottom:0;width:100%;height:32px;line-height:32px;background-color:rgba(0,0,0,.8);background-color:#000\9;filter:Alpha(opacity=80);color:#fff;overflow:hidden;font-size:0}.layui-layer-imgtit *{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:12px}.layui-layer-imgtit a{max-width:65%;overflow:hidden;color:#fff}.layui-layer-imgtit a:hover{color:#fff;text-decoration:underline}.layui-layer-imgtit em{padding-left:10px;font-style:normal}@-webkit-keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);-ms-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);-ms-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim-close{-webkit-animation-name:layer-bounceOut;animation-name:layer-bounceOut;-webkit-animation-duration:.2s;animation-duration:.2s}@media screen and (max-width:1100px){.layui-layer-iframe{overflow-y:auto;-webkit-overflow-scrolling:touch}}  
  1 +.layui-layer-imgbar, .layui-layer-imgtit a, .layui-layer-tab .layui-layer-title span,
  2 + .layui-layer-title {
  3 + text-overflow: ellipsis;
  4 + white-space: nowrap
  5 +}
  6 +
  7 +* html{
  8 + background-image: url(about:blank);
  9 + background-attachment: fixed
  10 +}
  11 +
  12 +html #layuicss-skinlayercss {
  13 + display: none;
  14 + position: absolute;
  15 + width: 1989px
  16 +}
  17 +
  18 +.layui-layer, .layui-layer-shade {
  19 + position: fixed;
  20 + _position: absolute;
  21 + pointer-events: auto
  22 +}
  23 +
  24 +.layui-layer-shade {
  25 + top: 0;
  26 + left: 0;
  27 + width: 100%;
  28 + height: 100%;
  29 + _height: expression(document.body.offsetHeight + "px")
  30 +}
  31 +
  32 +.layui-layer {
  33 + -webkit-overflow-scrolling: touch;
  34 + top: 150px;
  35 + left: 0;
  36 + margin: 0;
  37 + padding: 0;
  38 + background-color: #fff;
  39 + -webkit-background-clip: content;
  40 + box-shadow: 1px 1px 50px rgba(0, 0, 0, .3)
  41 +}
  42 +
  43 +.layui-layer-close {
  44 + position: absolute
  45 +}
  46 +
  47 +.layui-layer-content {
  48 + position: relative
  49 +}
  50 +
  51 +.layui-layer-border {
  52 + border: 1px solid #B2B2B2;
  53 + border: 1px solid rgba(0, 0, 0, .1);
  54 + box-shadow: 1px 1px 5px rgba(0, 0, 0, .2)
  55 +}
  56 +
  57 +.layui-layer-load {
  58 + background: url(loading-1.gif) center center no-repeat #eee
  59 +}
  60 +
  61 +.layui-layer-ico {
  62 + background: url(icon.png) no-repeat
  63 +}
  64 +
  65 +.layui-layer-btn a, .layui-layer-dialog .layui-layer-ico,
  66 + .layui-layer-setwin a {
  67 + display: inline-block;
  68 + *display: inline;
  69 + *zoom: 1;
  70 + vertical-align: top
  71 +}
  72 +
  73 +.layui-layer-move {
  74 + display: none;
  75 + position: fixed;
  76 + *position: absolute;
  77 + left: 0;
  78 + top: 0;
  79 + width: 100%;
  80 + height: 100%;
  81 + cursor: move;
  82 + opacity: 0;
  83 + filter: alpha(opacity = 0);
  84 + background-color: #fff;
  85 + z-index: 2147483647
  86 +}
  87 +
  88 +.layui-layer-resize {
  89 + position: absolute;
  90 + width: 15px;
  91 + height: 15px;
  92 + right: 0;
  93 + bottom: 0;
  94 + cursor: se-resize
  95 +}
  96 +
  97 +.layui-layer {
  98 + border-radius: 2px;
  99 + -webkit-animation-fill-mode: both;
  100 + animation-fill-mode: both;
  101 + -webkit-animation-duration: .3s;
  102 + animation-duration: .3s
  103 +}
  104 +
  105 +@
  106 +-webkit-keyframes layer-bounceIn { 0%{
  107 + opacity: 0;
  108 + -webkit-transform: scale(.5);
  109 + transform: scale(.5)
  110 +}
  111 +
  112 +100%{
  113 +opacity
  114 +:
  115 +1;-webkit-transform
  116 +:scale(1)
  117 +;transform
  118 +:scale(1)
  119 +}
  120 +}
  121 +@
  122 +keyframes layer-bounceIn { 0%{
  123 + opacity: 0;
  124 + -webkit-transform: scale(.5);
  125 + -ms-transform: scale(.5);
  126 + transform: scale(.5)
  127 +}
  128 +
  129 +100%{
  130 +opacity
  131 +:
  132 +1;-webkit-transform
  133 +:scale(1)
  134 +;-ms-transform
  135 +:scale(1)
  136 +;transform
  137 +:scale(1)
  138 +}
  139 +}
  140 +.layer-anim {
  141 + -webkit-animation-name: layer-bounceIn;
  142 + animation-name: layer-bounceIn
  143 +}
  144 +
  145 +@
  146 +-webkit-keyframes layer-zoomInDown { 0%{
  147 + opacity: 0;
  148 + -webkit-transform: scale(.1) translateY(-2000px);
  149 + transform: scale(.1) translateY(-2000px);
  150 + -webkit-animation-timing-function: ease-in-out;
  151 + animation-timing-function: ease-in-out
  152 +}
  153 +
  154 +60%{
  155 +opacity
  156 +:
  157 +1;-webkit-transform
  158 +:scale
  159 +(
  160 +.475
  161 +)
  162 +
  163 +translateY
  164 +(60px);transform
  165 +:scale
  166 +(
  167 +.475
  168 +)
  169 +
  170 +translateY
  171 +(60px);-webkit-animation-timing-function
  172 +:ease-out
  173 +;animation-timing-function
  174 +:ease-out
  175 +}
  176 +}
  177 +@
  178 +keyframes layer-zoomInDown { 0%{
  179 + opacity: 0;
  180 + -webkit-transform: scale(.1) translateY(-2000px);
  181 + -ms-transform: scale(.1) translateY(-2000px);
  182 + transform: scale(.1) translateY(-2000px);
  183 + -webkit-animation-timing-function: ease-in-out;
  184 + animation-timing-function: ease-in-out
  185 +}
  186 +
  187 +60%{
  188 +opacity
  189 +:
  190 +1;-webkit-transform
  191 +:scale
  192 +(
  193 +.475
  194 +)
  195 +
  196 +translateY
  197 +(60px);-ms-transform
  198 +:scale
  199 +(
  200 +.475
  201 +)
  202 +
  203 +translateY
  204 +(60px);transform
  205 +:scale
  206 +(
  207 +.475
  208 +)
  209 +
  210 +translateY
  211 +(60px);-webkit-animation-timing-function
  212 +:ease-out
  213 +;animation-timing-function
  214 +:ease-out
  215 +}
  216 +}
  217 +.layer-anim-01 {
  218 + -webkit-animation-name: layer-zoomInDown;
  219 + animation-name: layer-zoomInDown
  220 +}
  221 +
  222 +@
  223 +-webkit-keyframes layer-fadeInUpBig { 0%{
  224 + opacity: 0;
  225 + -webkit-transform: translateY(2000px);
  226 + transform: translateY(2000px)
  227 +}
  228 +
  229 +100%{
  230 +opacity
  231 +:
  232 +1;-webkit-transform
  233 +:translateY(0)
  234 +;transform
  235 +:translateY(0)
  236 +}
  237 +}
  238 +@
  239 +keyframes layer-fadeInUpBig { 0%{
  240 + opacity: 0;
  241 + -webkit-transform: translateY(2000px);
  242 + -ms-transform: translateY(2000px);
  243 + transform: translateY(2000px)
  244 +}
  245 +
  246 +100%{
  247 +opacity
  248 +:
  249 +1;-webkit-transform
  250 +:translateY(0)
  251 +;-ms-transform
  252 +:translateY(0)
  253 +;transform
  254 +:translateY(0)
  255 +}
  256 +}
  257 +.layer-anim-02 {
  258 + -webkit-animation-name: layer-fadeInUpBig;
  259 + animation-name: layer-fadeInUpBig
  260 +}
  261 +
  262 +@
  263 +-webkit-keyframes layer-zoomInLeft { 0%{
  264 + opacity: 0;
  265 + -webkit-transform: scale(.1) translateX(-2000px);
  266 + transform: scale(.1) translateX(-2000px);
  267 + -webkit-animation-timing-function: ease-in-out;
  268 + animation-timing-function: ease-in-out
  269 +}
  270 +
  271 +60%{
  272 +opacity
  273 +:
  274 +1;-webkit-transform
  275 +:scale
  276 +(
  277 +.475
  278 +)
  279 +
  280 +translateX
  281 +(48px);transform
  282 +:scale
  283 +(
  284 +.475
  285 +)
  286 +
  287 +translateX
  288 +(48px);-webkit-animation-timing-function
  289 +:ease-out
  290 +;animation-timing-function
  291 +:ease-out
  292 +}
  293 +}
  294 +@
  295 +keyframes layer-zoomInLeft { 0%{
  296 + opacity: 0;
  297 + -webkit-transform: scale(.1) translateX(-2000px);
  298 + -ms-transform: scale(.1) translateX(-2000px);
  299 + transform: scale(.1) translateX(-2000px);
  300 + -webkit-animation-timing-function: ease-in-out;
  301 + animation-timing-function: ease-in-out
  302 +}
  303 +
  304 +60%{
  305 +opacity
  306 +:
  307 +1;-webkit-transform
  308 +:scale
  309 +(
  310 +.475
  311 +)
  312 +
  313 +translateX
  314 +(48px);-ms-transform
  315 +:scale
  316 +(
  317 +.475
  318 +)
  319 +
  320 +translateX
  321 +(48px);transform
  322 +:scale
  323 +(
  324 +.475
  325 +)
  326 +
  327 +translateX
  328 +(48px);-webkit-animation-timing-function
  329 +:ease-out
  330 +;animation-timing-function
  331 +:ease-out
  332 +}
  333 +}
  334 +.layer-anim-03 {
  335 + -webkit-animation-name: layer-zoomInLeft;
  336 + animation-name: layer-zoomInLeft
  337 +}
  338 +
  339 +@
  340 +-webkit-keyframes layer-rollIn { 0%{
  341 + opacity: 0;
  342 + -webkit-transform: translateX(-100%) rotate(-120deg);
  343 + transform: translateX(-100%) rotate(-120deg)
  344 +}
  345 +
  346 +100%{
  347 +opacity
  348 +:
  349 +1;-webkit-transform
  350 +:translateX(0)
  351 +
  352 +rotate
  353 +(0);transform
  354 +:translateX(0)
  355 +
  356 +rotate
  357 +(0)
  358 +}
  359 +}
  360 +@
  361 +keyframes layer-rollIn { 0%{
  362 + opacity: 0;
  363 + -webkit-transform: translateX(-100%) rotate(-120deg);
  364 + -ms-transform: translateX(-100%) rotate(-120deg);
  365 + transform: translateX(-100%) rotate(-120deg)
  366 +}
  367 +
  368 +100%{
  369 +opacity
  370 +:
  371 +1;-webkit-transform
  372 +:translateX(0)
  373 +
  374 +rotate
  375 +(0);-ms-transform
  376 +:translateX(0)
  377 +
  378 +rotate
  379 +(0);transform
  380 +:translateX(0)
  381 +
  382 +rotate
  383 +(0)
  384 +}
  385 +}
  386 +.layer-anim-04 {
  387 + -webkit-animation-name: layer-rollIn;
  388 + animation-name: layer-rollIn
  389 +}
  390 +
  391 +@
  392 +keyframes layer-fadeIn { 0%{
  393 + opacity: 0
  394 +}
  395 +
  396 +100%{
  397 +opacity
  398 +:
  399 +1
  400 +}
  401 +}
  402 +.layer-anim-05 {
  403 + -webkit-animation-name: layer-fadeIn;
  404 + animation-name: layer-fadeIn
  405 +}
  406 +
  407 +@
  408 +-webkit-keyframes layer-shake { 0%,100%{
  409 + -webkit-transform: translateX(0);
  410 + transform: translateX(0)
  411 +}
  412 +
  413 +10%,30%,50%,70%,90%{
  414 +-webkit-transform
  415 +:translateX(-10px)
  416 +;transform
  417 +:translateX(-10px)
  418 +}
  419 +20%,40%,60%,80%{
  420 +-webkit-transform
  421 +:translateX(10px)
  422 +;transform
  423 +:translateX(10px)
  424 +}
  425 +}
  426 +@
  427 +keyframes layer-shake { 0%,100%{
  428 + -webkit-transform: translateX(0);
  429 + -ms-transform: translateX(0);
  430 + transform: translateX(0)
  431 +}
  432 +
  433 +10%,30%,50%,70%,90%{
  434 +-webkit-transform
  435 +:translateX(-10px)
  436 +;-ms-transform
  437 +:translateX(-10px)
  438 +;transform
  439 +:translateX(-10px)
  440 +}
  441 +20%,40%,60%,80%{
  442 +-webkit-transform
  443 +:translateX(10px)
  444 +;-ms-transform
  445 +:translateX(10px)
  446 +;transform
  447 +:translateX(10px)
  448 +}
  449 +}
  450 +.layer-anim-06 {
  451 + -webkit-animation-name: layer-shake;
  452 + animation-name: layer-shake
  453 +}
  454 +
  455 +@
  456 +-webkit-keyframes fadeIn { 0%{
  457 + opacity: 0
  458 +}
  459 +
  460 +100%{
  461 +opacity
  462 +:
  463 +1
  464 +}
  465 +}
  466 +.layui-layer-title {
  467 + padding: 0 80px 0 20px;
  468 + height: 42px;
  469 + line-height: 42px;
  470 + border-bottom: 1px solid #eee;
  471 + font-size: 14px;
  472 + color: #333;
  473 + overflow: hidden;
  474 + background-color: #F8F8F8;
  475 + border-radius: 2px 2px 0 0
  476 +}
  477 +
  478 +.layui-layer-setwin {
  479 + position: absolute;
  480 + right: 15px;
  481 + *right: 0;
  482 + top: 15px;
  483 + font-size: 0;
  484 + line-height: initial
  485 +}
  486 +
  487 +.layui-layer-setwin a {
  488 + position: relative;
  489 + width: 16px;
  490 + height: 16px;
  491 + margin-left: 10px;
  492 + font-size: 12px;
  493 + _overflow: hidden
  494 +}
  495 +
  496 +.layui-layer-setwin .layui-layer-min cite {
  497 + position: absolute;
  498 + width: 14px;
  499 + height: 2px;
  500 + left: 0;
  501 + top: 50%;
  502 + margin-top: -1px;
  503 + background-color: #2E2D3C;
  504 + cursor: pointer;
  505 + _overflow: hidden
  506 +}
  507 +
  508 +.layui-layer-setwin .layui-layer-min:hover cite {
  509 + background-color: #2D93CA
  510 +}
  511 +
  512 +.layui-layer-setwin .layui-layer-max {
  513 + background-position: -32px -40px
  514 +}
  515 +
  516 +.layui-layer-setwin .layui-layer-max:hover {
  517 + background-position: -16px -40px
  518 +}
  519 +
  520 +.layui-layer-setwin .layui-layer-maxmin {
  521 + background-position: -65px -40px
  522 +}
  523 +
  524 +.layui-layer-setwin .layui-layer-maxmin:hover {
  525 + background-position: -49px -40px
  526 +}
  527 +
  528 +.layui-layer-setwin .layui-layer-close1 {
  529 + background-position: 1px -40px;
  530 + cursor: pointer
  531 +}
  532 +
  533 +.layui-layer-setwin .layui-layer-close1:hover {
  534 + opacity: .7
  535 +}
  536 +
  537 +.layui-layer-setwin .layui-layer-close2 {
  538 + position: absolute;
  539 + right: -28px;
  540 + top: -28px;
  541 + width: 30px;
  542 + height: 30px;
  543 + margin-left: 0;
  544 + background-position: -149px -31px;
  545 + *right: -18px;
  546 + _display: none
  547 +}
  548 +
  549 +.layui-layer-setwin .layui-layer-close2:hover {
  550 + background-position: -180px -31px
  551 +}
  552 +
  553 +.layui-layer-btn {
  554 + text-align: right;
  555 + padding: 0 10px 12px;
  556 + pointer-events: auto;
  557 + user-select: none;
  558 + -webkit-user-select: none
  559 +}
  560 +
  561 +.layui-layer-btn a {
  562 + height: 28px;
  563 + line-height: 28px;
  564 + margin: 6px 6px 0;
  565 + padding: 0 15px;
  566 + border: 1px solid #dedede;
  567 + background-color: #f1f1f1;
  568 + color: #333;
  569 + border-radius: 2px;
  570 + font-weight: 400;
  571 + cursor: pointer;
  572 + text-decoration: none
  573 +}
  574 +
  575 +.layui-layer-btn a:hover {
  576 + opacity: .9;
  577 + text-decoration: none
  578 +}
  579 +
  580 +.layui-layer-btn a:active {
  581 + opacity: .8
  582 +}
  583 +
  584 +.layui-layer-btn .layui-layer-btn0 {
  585 + border-color: #4898d5;
  586 + background-color: #2e8ded;
  587 + color: #fff
  588 +}
  589 +
  590 +.layui-layer-btn-l {
  591 + text-align: left
  592 +}
  593 +
  594 +.layui-layer-btn-c {
  595 + text-align: center
  596 +}
  597 +
  598 +.layui-layer-dialog {
  599 + min-width: 260px
  600 +}
  601 +
  602 +.layui-layer-dialog .layui-layer-content {
  603 + position: relative;
  604 + padding: 20px;
  605 + line-height: 24px;
  606 + word-break: break-all;
  607 + overflow: hidden;
  608 + font-size: 14px;
  609 + overflow-x: hidden;
  610 + overflow-y: auto
  611 +}
  612 +
  613 +.layui-layer-dialog .layui-layer-content .layui-layer-ico {
  614 + position: absolute;
  615 + top: 16px;
  616 + left: 15px;
  617 + _left: -40px;
  618 + width: 30px;
  619 + height: 30px
  620 +}
  621 +
  622 +.layui-layer-ico1 {
  623 + background-position: -30px 0
  624 +}
  625 +
  626 +.layui-layer-ico2 {
  627 + background-position: -60px 0
  628 +}
  629 +
  630 +.layui-layer-ico3 {
  631 + background-position: -90px 0
  632 +}
  633 +
  634 +.layui-layer-ico4 {
  635 + background-position: -120px 0
  636 +}
  637 +
  638 +.layui-layer-ico5 {
  639 + background-position: -150px 0
  640 +}
  641 +
  642 +.layui-layer-ico6 {
  643 + background-position: -180px 0
  644 +}
  645 +
  646 +.layui-layer-rim {
  647 + border: 6px solid #8D8D8D;
  648 + border: 6px solid rgba(0, 0, 0, .3);
  649 + border-radius: 5px;
  650 + box-shadow: none
  651 +}
  652 +
  653 +.layui-layer-msg {
  654 + min-width: 180px;
  655 + border: 1px solid #D3D4D3;
  656 + box-shadow: none
  657 +}
  658 +
  659 +.layui-layer-hui {
  660 + min-width: 100px;
  661 + background-color: #000;
  662 + filter: alpha(opacity = 60);
  663 + background-color: rgba(0, 0, 0, .6);
  664 + color: #fff;
  665 + border: none
  666 +}
  667 +
  668 +.layui-layer-hui .layui-layer-content {
  669 + padding: 12px 25px;
  670 + text-align: center
  671 +}
  672 +
  673 +.layui-layer-dialog .layui-layer-padding {
  674 + padding: 20px 20px 20px 55px;
  675 + text-align: left
  676 +}
  677 +
  678 +.layui-layer-page .layui-layer-content {
  679 + position: relative;
  680 + overflow: auto
  681 +}
  682 +
  683 +.layui-layer-iframe .layui-layer-btn, .layui-layer-page .layui-layer-btn
  684 + {
  685 + padding-top: 10px
  686 +}
  687 +
  688 +.layui-layer-nobg {
  689 + background: 0 0
  690 +}
  691 +
  692 +.layui-layer-iframe iframe {
  693 + display: block;
  694 + width: 100%
  695 +}
  696 +
  697 +.layui-layer-loading {
  698 + border-radius: 100%;
  699 + background: 0 0;
  700 + box-shadow: none;
  701 + border: none
  702 +}
  703 +
  704 +.layui-layer-loading .layui-layer-content {
  705 + width: 60px;
  706 + height: 24px;
  707 + background: url(loading-0.gif) no-repeat
  708 +}
  709 +
  710 +.layui-layer-loading .layui-layer-loading1 {
  711 + width: 37px;
  712 + height: 37px;
  713 + background: url(loading-1.gif) no-repeat
  714 +}
  715 +
  716 +.layui-layer-ico16, .layui-layer-loading .layui-layer-loading2 {
  717 + width: 32px;
  718 + height: 32px;
  719 + background: url(loading-2.gif) no-repeat
  720 +}
  721 +
  722 +.layui-layer-tips {
  723 + background: 0 0;
  724 + box-shadow: none;
  725 + border: none
  726 +}
  727 +
  728 +.layui-layer-tips .layui-layer-content {
  729 + position: relative;
  730 + line-height: 22px;
  731 + min-width: 12px;
  732 + padding: 5px 10px;
  733 + font-size: 12px;
  734 + _float: left;
  735 + border-radius: 2px;
  736 + box-shadow: 1px 1px 3px rgba(0, 0, 0, .2);
  737 + background-color: #000;
  738 + color: #fff
  739 +}
  740 +
  741 +.layui-layer-tips .layui-layer-close {
  742 + right: -2px;
  743 + top: -1px
  744 +}
  745 +
  746 +.layui-layer-tips i.layui-layer-TipsG {
  747 + position: absolute;
  748 + width: 0;
  749 + height: 0;
  750 + border-width: 8px;
  751 + border-color: transparent;
  752 + border-style: dashed;
  753 + *overflow: hidden
  754 +}
  755 +
  756 +.layui-layer-tips i.layui-layer-TipsB, .layui-layer-tips i.layui-layer-TipsT
  757 + {
  758 + left: 5px;
  759 + border-right-style: solid;
  760 + border-right-color: #000
  761 +}
  762 +
  763 +.layui-layer-tips i.layui-layer-TipsT {
  764 + bottom: -8px
  765 +}
  766 +
  767 +.layui-layer-tips i.layui-layer-TipsB {
  768 + top: -8px
  769 +}
  770 +
  771 +.layui-layer-tips i.layui-layer-TipsL, .layui-layer-tips i.layui-layer-TipsR
  772 + {
  773 + top: 1px;
  774 + border-bottom-style: solid;
  775 + border-bottom-color: #000
  776 +}
  777 +
  778 +.layui-layer-tips i.layui-layer-TipsR {
  779 + left: -8px
  780 +}
  781 +
  782 +.layui-layer-tips i.layui-layer-TipsL {
  783 + right: -8px
  784 +}
  785 +
  786 +.layui-layer-lan[type=dialog] {
  787 + min-width: 280px
  788 +}
  789 +
  790 +.layui-layer-lan .layui-layer-title {
  791 + background: #4476A7;
  792 + color: #fff;
  793 + border: none
  794 +}
  795 +
  796 +.layui-layer-lan .layui-layer-btn {
  797 + padding: 5px 10px 10px;
  798 + text-align: right;
  799 + border-top: 1px solid #E9E7E7
  800 +}
  801 +
  802 +.layui-layer-lan .layui-layer-btn a {
  803 + background: #BBB5B5;
  804 + border: none
  805 +}
  806 +
  807 +.layui-layer-lan .layui-layer-btn .layui-layer-btn1 {
  808 + background: #C9C5C5
  809 +}
  810 +
  811 +.layui-layer-molv .layui-layer-title {
  812 + background: #009f95;
  813 + color: #fff;
  814 + border: none
  815 +}
  816 +
  817 +.layui-layer-molv .layui-layer-btn a {
  818 + background: #009f95
  819 +}
  820 +
  821 +.layui-layer-molv .layui-layer-btn .layui-layer-btn1 {
  822 + background: #92B8B1
  823 +}
  824 +
  825 +.layui-layer-iconext {
  826 + background: url(icon-ext.png) no-repeat
  827 +}
  828 +
  829 +.layui-layer-prompt .layui-layer-input {
  830 + display: block;
  831 + width: 220px;
  832 + height: 30px;
  833 + margin: 0 auto;
  834 + line-height: 30px;
  835 + padding: 0 5px;
  836 + border: 1px solid #ccc;
  837 + box-shadow: 1px 1px 5px rgba(0, 0, 0, .1) inset;
  838 + color: #333
  839 +}
  840 +
  841 +.layui-layer-prompt textarea.layui-layer-input {
  842 + width: 300px;
  843 + height: 100px;
  844 + line-height: 20px
  845 +}
  846 +
  847 +.layui-layer-prompt .layui-layer-content {
  848 + padding: 20px
  849 +}
  850 +
  851 +.layui-layer-prompt .layui-layer-btn {
  852 + padding-top: 0
  853 +}
  854 +
  855 +.layui-layer-tab {
  856 + box-shadow: 1px 1px 50px rgba(0, 0, 0, .4)
  857 +}
  858 +
  859 +.layui-layer-tab .layui-layer-title {
  860 + padding-left: 0;
  861 + border-bottom: 1px solid #ccc;
  862 + background-color: #eee;
  863 + overflow: visible
  864 +}
  865 +
  866 +.layui-layer-tab .layui-layer-title span {
  867 + position: relative;
  868 + float: left;
  869 + min-width: 80px;
  870 + max-width: 260px;
  871 + padding: 0 20px;
  872 + text-align: center;
  873 + cursor: default;
  874 + overflow: hidden
  875 +}
  876 +
  877 +.layui-layer-tab .layui-layer-title span.layui-layer-tabnow {
  878 + height: 43px;
  879 + border-left: 1px solid #ccc;
  880 + border-right: 1px solid #ccc;
  881 + background-color: #fff;
  882 + z-index: 10
  883 +}
  884 +
  885 +.layui-layer-tab .layui-layer-title span:first-child {
  886 + border-left: none
  887 +}
  888 +
  889 +.layui-layer-tabmain {
  890 + line-height: 24px;
  891 + clear: both
  892 +}
  893 +
  894 +.layui-layer-tabmain .layui-layer-tabli {
  895 + display: none
  896 +}
  897 +
  898 +.layui-layer-tabmain .layui-layer-tabli.xubox_tab_layer {
  899 + display: block
  900 +}
  901 +
  902 +.xubox_tabclose {
  903 + position: absolute;
  904 + right: 10px;
  905 + top: 5px;
  906 + cursor: pointer
  907 +}
  908 +
  909 +.layui-layer-photos {
  910 + -webkit-animation-duration: .8s;
  911 + animation-duration: .8s
  912 +}
  913 +
  914 +.layui-layer-photos .layui-layer-content {
  915 + overflow: hidden;
  916 + text-align: center
  917 +}
  918 +
  919 +.layui-layer-photos .layui-layer-phimg img {
  920 + position: relative;
  921 + width: 100%;
  922 + display: inline-block;
  923 + *display: inline;
  924 + *zoom: 1;
  925 + vertical-align: top
  926 +}
  927 +
  928 +.layui-layer-imgbar, .layui-layer-imguide {
  929 + display: none
  930 +}
  931 +
  932 +.layui-layer-imgnext, .layui-layer-imgprev {
  933 + position: absolute;
  934 + top: 50%;
  935 + width: 27px;
  936 + _width: 44px;
  937 + height: 44px;
  938 + margin-top: -22px;
  939 + outline: 0;
  940 + blr: expression(this.onFocus = this.blur ())
  941 +}
  942 +
  943 +.layui-layer-imgprev {
  944 + left: 10px;
  945 + background-position: -5px -5px;
  946 + _background-position: -70px -5px
  947 +}
  948 +
  949 +.layui-layer-imgprev:hover {
  950 + background-position: -33px -5px;
  951 + _background-position: -120px -5px
  952 +}
  953 +
  954 +.layui-layer-imgnext {
  955 + right: 10px;
  956 + _right: 8px;
  957 + background-position: -5px -50px;
  958 + _background-position: -70px -50px
  959 +}
  960 +
  961 +.layui-layer-imgnext:hover {
  962 + background-position: -33px -50px;
  963 + _background-position: -120px -50px
  964 +}
  965 +
  966 +.layui-layer-imgbar {
  967 + position: absolute;
  968 + left: 0;
  969 + bottom: 0;
  970 + width: 100%;
  971 + height: 32px;
  972 + line-height: 32px;
  973 + background-color: rgba(0, 0, 0, .8);
  974 + background-color: #000\9;
  975 + filter: Alpha(opacity = 80);
  976 + color: #fff;
  977 + overflow: hidden;
  978 + font-size: 0
  979 +}
  980 +
  981 +.layui-layer-imgtit * {
  982 + display: inline-block;
  983 + *display: inline;
  984 + *zoom: 1;
  985 + vertical-align: top;
  986 + font-size: 12px
  987 +}
  988 +
  989 +.layui-layer-imgtit a {
  990 + max-width: 65%;
  991 + overflow: hidden;
  992 + color: #fff
  993 +}
  994 +
  995 +.layui-layer-imgtit a:hover {
  996 + color: #fff;
  997 + text-decoration: underline
  998 +}
  999 +
  1000 +.layui-layer-imgtit em {
  1001 + padding-left: 10px;
  1002 + font-style: normal
  1003 +}
  1004 +
  1005 +@
  1006 +-webkit-keyframes layer-bounceOut { 100%{
  1007 + opacity: 0;
  1008 + -webkit-transform: scale(.7);
  1009 + transform: scale(.7)
  1010 +}
  1011 +
  1012 +30%{
  1013 +-webkit-transform
  1014 +:scale
  1015 +(1
  1016 +.05
  1017 +);transform
  1018 +:scale
  1019 +(1
  1020 +.05
  1021 +)
  1022 +}
  1023 +0%{
  1024 +-webkit-transform
  1025 +:scale(1)
  1026 +;transform
  1027 +:scale(1)
  1028 +}
  1029 +}
  1030 +@
  1031 +keyframes layer-bounceOut { 100%{
  1032 + opacity: 0;
  1033 + -webkit-transform: scale(.7);
  1034 + -ms-transform: scale(.7);
  1035 + transform: scale(.7)
  1036 +}
  1037 +
  1038 +30%{
  1039 +-webkit-transform
  1040 +:scale
  1041 +(1
  1042 +.05
  1043 +);-ms-transform
  1044 +:scale
  1045 +(1
  1046 +.05
  1047 +);transform
  1048 +:scale
  1049 +(1
  1050 +.05
  1051 +)
  1052 +}
  1053 +0%{
  1054 +-webkit-transform
  1055 +:scale(1)
  1056 +;-ms-transform
  1057 +:scale(1)
  1058 +;transform
  1059 +:scale(1)
  1060 +}
  1061 +}
  1062 +.layer-anim-close {
  1063 + -webkit-animation-name: layer-bounceOut;
  1064 + animation-name: layer-bounceOut;
  1065 + -webkit-animation-duration: .2s;
  1066 + animation-duration: .2s
  1067 +}
  1068 +
  1069 +@media screen and (max-width:1100px) {
  1070 + .layui-layer-iframe {
  1071 + overflow-y: auto;
  1072 + -webkit-overflow-scrolling: touch
  1073 + }
  1074 +}
  1 +@charset "UTF-8";
  2 +body .layer-ext-warning .layui-layer-title{
  3 + color: white;
  4 + background-color: red;
  5 +}
  6 +/* body .layui-ext-warning .layui-layer-btn{
  7 +
  8 +}
  9 +body .layui-ext-warning .layui-layer-btn a{
  10 +
  11 +} */