作者 Kevin

收发货人按用户查询,预配按账户查询,管理员可以查看所有预配运单;预配列表增加海关关区字段。

正在显示 38 个修改的文件 包含 1802 行增加708 行删除
package com.agent.controller.agent;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
... ... @@ -16,10 +15,12 @@ import com.agent.entity.agent.ConsigneeEntity;
import com.agent.service.agent.ConsigneeService;
import com.agent.util.HttpJsonMsg;
import com.agent.vo.ResponseModel;
import com.framework.core.Servlets;
import com.plugin.easyui.DataGrid;
import com.plugin.easyui.EasyPage;
import tools.NumKit;
import tools.Tools;
@Controller
public class ConsigneeController extends BasicController{
... ... @@ -30,9 +31,23 @@ public class ConsigneeController extends BasicController{
@RequestMapping(value = "consignee/grid.json")
@ResponseBody
public DataGrid<ConsigneeEntity> consignee_grid_json(HttpServletRequest request, EasyPage<ConsigneeEntity> pageForm){
Map<String, Object> searchParams = Servlets.getParametersStartingWith(request, "search_");
pageForm.setSearchParams(searchParams);
pageForm.parseData(consigneeService.getPage(pageForm));
// Map<String, Object> searchParams = Servlets.getParametersStartingWith(request, "search_");
// pageForm.setSearchParams(searchParams);
// pageForm.parseData(consigneeService.getPage(pageForm));
// return pageForm.getData();
int page = NumKit.parseString2Int(request.getParameter("page"));
page = page<1?1:page;
int rows = NumKit.parseString2Int(request.getParameter("rows"));
rows = rows<1?10:rows;
List<ConsigneeEntity> list = consigneeService.list(page, rows);
pageForm.setPage(page);
pageForm.setRows(rows);
DataGrid<ConsigneeEntity> data = new DataGrid<>();
data.setRows(list);
data.setTotal(consigneeService.total(Tools.getUserId()));
pageForm.setData(data );
return pageForm.getData();
}
@RequestMapping(value="consignee/edit")
... ... @@ -80,7 +95,6 @@ public class ConsigneeController extends BasicController{
public ResponseModel consignee_save(HttpServletRequest request, ConsigneeEntity consignee){
ResponseModel model = new ResponseModel(200, "", null);
consigneeService.save(consignee);
return model;
}
... ...
... ... @@ -75,7 +75,7 @@ public class ConsignorController extends BasicController {
} else {
model = new ResponseModel(200, "", null);
}
model.setCount(service.count());
model.setCount(service.total(Tools.getUserId()));
model.setData(dataList);
return model;
}
... ... @@ -117,6 +117,8 @@ public class ConsignorController extends BasicController {
if (consignor != null) {
ConsignorEntity old = service.findByCompanyAndUserId(consignor.getCo_company(),Tools.getUserId());
if (old == null) {
consignor.setCreator(Tools.getUserEntity());
consignor.setModifier(Tools.getUserEntity());
service.save(consignor);
model = new ResponseModel(200, "操作成功", null);
} else {
... ...
package com.agent.controller.agent;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.agent.controller.BasicController;
import com.agent.entity.agent.EnterpriseEntity;
import com.agent.service.agent.EnterpriseService;
import com.agent.vo.ResponseModel;
import com.plugin.easyui.DataGrid;
@Controller
@RequestMapping(value = "/enterprise")
public class EnterpriseController extends BasicController {
@Resource
private EnterpriseService service;
@RequestMapping(value = "/search")
@ResponseBody
public DataGrid<EnterpriseEntity> search(HttpServletRequest request, String start) {
DataGrid<EnterpriseEntity> dg = new DataGrid<>();
List<EnterpriseEntity> dataList = service.search(start);
dg.setRows(dataList);
return dg;
}
@RequestMapping(value = "/list")
@ResponseBody
public ResponseModel list(HttpServletRequest request, String countryCode) {
ResponseModel model = new ResponseModel(200, "", null);
List<EnterpriseEntity> dataList = service.findTypeByCountryCode(countryCode);
if (dataList == null || dataList.size() == 0) {
model = new ResponseModel(404, "", null);
} else {
model = new ResponseModel(200, "", null);
}
model.setData(dataList);
return model;
}
}
... ...
... ... @@ -50,6 +50,7 @@ import com.agent.service.agent.PubDgService;
import com.agent.service.agent.TBasCarrierService;
import com.agent.service.agent.WaybillReceiptService;
import com.agent.service.system.RoleService;
import com.agent.smb.RemoteFileKit;
import com.agent.util.HttpJsonMsg;
import com.agent.vo.ResponseModel;
import com.agent.vo.agent.CommodityVo;
... ... @@ -78,6 +79,7 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.framework.core.Servlets;
import com.framework.shiro.SessionUtil;
import com.framework.util.CustomMessageKit;
import com.plugin.easyui.DataGrid;
import com.plugin.easyui.EasyPage;
... ... @@ -155,9 +157,12 @@ public class ManifestController extends BasicController {
// response.setDateHeader("Expires", 0);
Map<String, Object> searchParams = Servlets.getParametersStartingWith(request, "search_");
searchParams.put("EQ_USER_ID", Tools.getUserId());
if (Tools.getUserId() != null && Tools.getUserId() != 1) {
// 不是管理员,添加用户id的条件
searchParams.put("EQ_USER_ID", Tools.getUserId());
}
pageForm.setSearchParams(searchParams);
// 添加用户id的条件
pageForm.parseData(manifestService.getPage(pageForm));
return pageForm.getData();
}
... ... @@ -434,7 +439,11 @@ public class ManifestController extends BasicController {
if (ue != null) {
Long u = ue.getId();
Set<String> sk = pageForm.getSearchParams().keySet();
pageForm.getSearchParams().put("EQ_USER_ID", u);
if (Tools.getUserId() != null && Tools.getUserId() != 1) {
// 不是管理员,添加用户id的条件
pageForm.getSearchParams().put("EQ_USER_ID", u);
}
}
pageForm.parseData(manifestService.getPage(pageForm));
... ... @@ -451,7 +460,13 @@ public class ManifestController extends BasicController {
@RequestMapping(value = "/infor")
@ResponseBody
public List<ManifestEntity> infor(String id, Model model) {
List<ManifestEntity> li = manifestService.queryByUserId(Tools.getUserId());
List<ManifestEntity> li = null;
if(Tools.getUserId()!=null&&Tools.getUserId().longValue()==1) {
li = manifestService.queryAll();
}else {
li = manifestService.queryByUserId(Tools.getUserId());
}
List<ManifestEntity> result = new FemyList();
for (ManifestEntity me : li) {
if (result.contains(me)) {
... ... @@ -751,7 +766,7 @@ public class ManifestController extends BasicController {
@RequestMapping(value = "/save", method = { RequestMethod.POST })
@ResponseBody
public ResponseModel save(ManifestEntity manifest, HttpServletRequest reuqest) {
consignorService.saveFromManifest(manifest,Tools.getUserId());
consignorService.saveFromManifest(manifest, Tools.getUserId());
ResponseModel model = new ResponseModel();
try {
... ... @@ -759,12 +774,15 @@ public class ManifestController extends BasicController {
if (manifestService.isExistsByWaybill(manifest)) {
model.setMsg("该订单已存在!");
model.setStatus(500);
System.err.println("before manifest--> 该订单已存在!");
} else {
String stowagedate = reuqest.getParameter("stowagedate");
manifest.setStowagedate(manifest.getStowagedate(stowagedate));
manifest.setSave_time(new Long(System.currentTimeMillis()));
// 处理预配时间
manifest = manifestService.save(manifest);
model.setData(manifest);
model.setStatus(200);
model.setMsg(HttpJsonMsg.SUCCESS);
... ... @@ -835,7 +853,7 @@ public class ManifestController extends BasicController {
@RequestMapping(value = "/savesend", method = { RequestMethod.POST })
@ResponseBody
public ResponseModel savesend(ManifestEntity manifest, HttpServletRequest request, HttpServletResponse response) {
consignorService.saveFromManifest(manifest,Tools.getUserId());
consignorService.saveFromManifest(manifest, Tools.getUserId());
ResponseModel model = new ResponseModel();
try {
... ... @@ -859,31 +877,38 @@ public class ManifestController extends BasicController {
manifestService.save(manifest);
receiptService.saveFromManifest(manifest, type);
System.out.println("收货人名称:" + manifest.getSh_name());
System.out.println("发货人名称:" + manifest.getCo_name());
System.out.println("-----------------id:" + manifest.getId());
// 生成报文并且发送
String rootPath = request.getSession().getServletContext().getRealPath("/");
String path = rootPath + "/excel/manifest" + new Date().getTime() + ".xml";
String ndlrxml = XmlUtil.convertToXml2(manifestService.sendNDLRXml(manifest), path);
String dlcfxml = XmlUtil.convertToXml2(manifestService.sendDLCFXml(manifest), path);
String slifxml = XmlUtil.convertToXml(FSXmlKit.sliXml(manifest));
// System.err.println("===================ndlrxml===================");
// System.err.println(ndlrxml);
// System.err.println();
//
// System.err.println("===================dlcfxml===================");
// System.err.println(dlcfxml);
// System.err.println();
// String rootPath = request.getSession().getServletContext().getRealPath("/");
// String path = rootPath + "/excel/manifest" + new Date().getTime() + ".xml";
String ndlrPath = CustomMessageKit.getMessagePath("ndlr");
String dlcPath = CustomMessageKit.getMessagePath("dlc");
String sliPath = CustomMessageKit.getMessagePath("sli");
String ndlrxml = XmlUtil.convertToXml2(manifestService.sendNDLRXml(manifest), ndlrPath);
String dlcfxml = XmlUtil.convertToXml2(manifestService.sendDLCFXml(manifest), dlcPath);
String slifxml = XmlUtil.convertToXml2(FSXmlKit.sliXml(manifest), sliPath);
RemoteFileKit.putFile(ndlrPath);
RemoteFileKit.putFile(dlcPath);
RemoteFileKit.putFile(sliPath);
// System.err.println("===================ndlrxml===================");
// System.err.println(ndlrxml);
// System.err.println();
//
// System.err.println("===================dlcfxml===================");
// System.err.println(dlcfxml);
// System.err.println();
System.err.println("===================slifxml===================");
System.err.println(slifxml);
System.err.println();
new RedisSaveMessage().saveMessage(ndlrxml);
new RedisSaveMessage().saveMessage(dlcfxml);
new RedisSaveMessage().saveMessage(slifxml);
model.setData(manifest);
model.setStatus(200);
model.setMsg(HttpJsonMsg.SUCCESS);
}
... ... @@ -967,7 +992,7 @@ public class ManifestController extends BasicController {
@RequestMapping(value = "/sub_save", method = { RequestMethod.POST })
@ResponseBody
public ResponseModel sub_save(PreparesecondaryEntity preparesecondary) {
consignorService.saveFromPreparesecondary(preparesecondary,Tools.getUserId());
consignorService.saveFromPreparesecondary(preparesecondary, Tools.getUserId());
ResponseModel model = new ResponseModel();
try {
... ... @@ -1035,7 +1060,7 @@ public class ManifestController extends BasicController {
@RequestMapping(value = "/presavesend", method = { RequestMethod.POST })
@ResponseBody
public ResponseModel presavesend(PreparesecondaryEntity preparesecondary, HttpServletRequest request) {
consignorService.saveFromPreparesecondary(preparesecondary,Tools.getUserId());
consignorService.saveFromPreparesecondary(preparesecondary, Tools.getUserId());
ResponseModel model = new ResponseModel();
try {
... ... @@ -1050,39 +1075,47 @@ public class ManifestController extends BasicController {
String stowagedate = request.getParameter("stowagedate");
preparesecondary.setStowagedate(preparesecondary.getStowagedate(stowagedate));
preparesecondary.setIsdelete(1);
preparesecondary.setResponse_code(String.valueOf(type.getValue()));
preparesecondary.setResponse_text("分单——" + type.getName());
preparesecondaryServer.save(preparesecondary);
receiptService.saveFromPreparesecondary(preparesecondary, type);
// 生成报文并且发送
String rootPath = request.getSession().getServletContext().getRealPath("/");
String path = rootPath + "/excel/manifest" + new Date().getTime() + ".xml";
String ndlrxml = XmlUtil.convertToXml2(manifestService.presenddlcfNdlrXml(preparesecondary), path);
String dlcfxml = XmlUtil.convertToXml2(manifestService.presenddlcfdlcfXml(preparesecondary), path);
String fhlfxml = XmlUtil.convertToXml(FSXmlKit.fhlXml(preparesecondary));
// String rootPath = request.getSession().getServletContext().getRealPath("/");
// String path = rootPath + "/excel/manifest" + new Date().getTime() + ".xml";
String ndlrPath = CustomMessageKit.getMessagePath("ndlr");
String dlcPath = CustomMessageKit.getMessagePath("dlc");
String fhlPath = CustomMessageKit.getMessagePath("fhl");
String ndlrxml = XmlUtil.convertToXml2(manifestService.presenddlcfNdlrXml(preparesecondary), ndlrPath);
String dlcfxml = XmlUtil.convertToXml2(manifestService.presenddlcfdlcfXml(preparesecondary), dlcPath);
String fhlfxml = XmlUtil.convertToXml2(FSXmlKit.fhlXml(preparesecondary), fhlPath);
RemoteFileKit.putFile(ndlrPath);
RemoteFileKit.putFile(dlcPath);
RemoteFileKit.putFile(fhlPath);
// 发送redis储存数据
// System.out.println(ndlrxml);
new RedisSaveMessage().saveMessage(ndlrxml);
new RedisSaveMessage().saveMessage(dlcfxml);
new RedisSaveMessage().saveMessage(fhlfxml);
model.setData(preparesecondary);
model.setStatus(200);
model.setMsg(HttpJsonMsg.SUCCESS);
// System.out.println("===================ndlrxml===================");
// System.out.println(ndlrxml);
// System.out.println();
//
// System.out.println("===================dlcfxml===================");
// System.err.println(dlcfxml);
// System.out.println();
System.out.println("===================ndlrxml===================");
System.out.println(ndlrxml);
System.out.println();
System.out.println("===================dlcfxml===================");
System.err.println(dlcfxml);
System.out.println();
System.out.println("===================fhlfxml===================");
System.err.println(fhlfxml);
System.out.println();
preparesecondary.setIsdelete(1);
preparesecondary.setResponse_code(String.valueOf(type.getValue()));
preparesecondary.setResponse_text("分单——" + type.getName());
preparesecondaryServer.save(preparesecondary);
receiptService.saveFromPreparesecondary(preparesecondary, type);
model.setData(preparesecondary);
model.setStatus(200);
model.setMsg(HttpJsonMsg.SUCCESS);
}
} catch (Exception e) {
... ...
package com.agent.controller.agent;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
... ... @@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.agent.entity.Constant;
import com.agent.entity.agent.ManifestEntity;
import com.agent.entity.agent.PreparesecondaryEntity;
import com.agent.entity.agent.WaybillReceiprtEntity;
... ... @@ -56,7 +58,7 @@ public class ReceiptController {
WaybillReceiprtEntity wre = null;
if (StringUtils.isNoneBlank(waybillNo) && StringUtils.isBlank(waybillNoSub)) {
// 主单报文
List<ManifestEntity> list = manifestService.findByMawbNo(waybillNo);
List<ManifestEntity> list = manifestService.findByManifestNo(waybillNo);
if (list != null && list.size() > 0) {
ManifestEntity bean = list.get(0);
bean.setResponse_code(response_code);
... ... @@ -70,7 +72,7 @@ public class ReceiptController {
wre.setMessage_type("MT2201");
wre.setResponse_code(response_code);
wre.setResponse_text(response_text);
wre.setSendtime(sendTime);
wre.setSendtime(sendTime!=null?sendTime:Constant.dateTimeFormat.format(new Date()));
wre.setWaybill_no(bean.getWaybillnomaster());
wre.setCreator(Tools.getUserEntity());
wre.setModifier(Tools.getUserEntity());
... ... @@ -100,7 +102,7 @@ public class ReceiptController {
wre.setMessage_type("MT2201");
wre.setResponse_code(response_code);
wre.setResponse_text(response_text);
wre.setSendtime(sendTime);
wre.setSendtime(sendTime!=null?sendTime:Constant.dateTimeFormat.format(new Date()));
wre.setWaybill_no(bean.getWaybillnomaster());
wre.setSub_waybill_no(bean.getWaybillnosecondary());
wre.setCreator(Tools.getUserEntity());
... ...
... ... @@ -14,7 +14,6 @@ import com.agent.entity.system.UserEntity;
@MappedSuperclass
public abstract class BasicEntity extends IdEntity{
/**
* 创建时间
*/
... ...
package com.agent.entity;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
/**
* Created by cohesion on 2017/3/31.
*/
public class Constant {
//日期格式化
public final static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
//日期格式化
public final static SimpleDateFormat dateFormatYYYYMM = new SimpleDateFormat("yyyyMM");
//日期格式化
public final static SimpleDateFormat dateFormatMonth = new SimpleDateFormat("yyyy-MM");
// 日期格式化
public final static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
//日期格式化
public final static SimpleDateFormat dateTimeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//日期格式化
public final static SimpleDateFormat dateTimeFormatnumber = new SimpleDateFormat("yyyyMMddHHmmssSSS");
// 日期格式化
public final static SimpleDateFormat dateFormatYYYYMM = new SimpleDateFormat("yyyyMM");
//包装尺寸类型 - 交运
public final static String packageSizeDelivery = "DELIVERY";
// 日期格式化
public final static SimpleDateFormat dateFormatMonth = new SimpleDateFormat("yyyy-MM");
//包装尺寸类型 - 主单
public final static String packageSizeBill = "BILL";
// 日期格式化
public final static SimpleDateFormat dateTimeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//包装尺寸类型 - 分单
public final static String packageSizeSubBill = "SUB_BILL";
// 日期格式化
public final static SimpleDateFormat dateTimeFormatnumber = new SimpleDateFormat("yyyyMMddHHmmssSSS");
// 包装尺寸类型 - 交运
public final static String packageSizeDelivery = "DELIVERY";
// 包装尺寸类型 - 主单
public final static String packageSizeBill = "BILL";
// 包装尺寸类型 - 分单
public final static String packageSizeSubBill = "SUB_BILL";
public final static String getDateEnglish(Date date) {
DateFormat df = new SimpleDateFormat("MMM",Locale.ENGLISH);
String monthEn = df.format(date);
SimpleDateFormat sdf = new SimpleDateFormat("dd");
String day = sdf.format(date);
return monthEn+day;
}
}
... ...
package com.agent.entity;
import javax.persistence.*;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
@MappedSuperclass
public class IdEntity {
public class IdEntity{
protected Long id;
@Id
... ...
package com.agent.entity.agent;
import javax.persistence.Entity;
import javax.persistence.Table;
import com.agent.entity.IdEntity;
/**
*
* Depiction: 企业类型以及国家代码
* <p>
* Modify:
* <p>
* Author: William Lynn
* <p>
* Create Date:2018年5月28日 下午2:05:28
*
*/
@Entity
@Table(name = "T_BAS_ENTERPRISE")
public class EnterpriseEntity extends IdEntity {
private String name_cn;
private String name_en;
private String country_code;
private String enterprise_type;
public EnterpriseEntity() {
}
public String getName_cn() {
return name_cn;
}
public void setName_cn(String name_cn) {
this.name_cn = name_cn;
}
public String getName_en() {
return name_en;
}
public void setName_en(String name_en) {
this.name_en = name_en;
}
public String getCountry_code() {
return country_code;
}
public void setCountry_code(String country_code) {
this.country_code = country_code;
}
public String getEnterprise_type() {
return enterprise_type;
}
public void setEnterprise_type(String enterprise_type) {
this.enterprise_type = enterprise_type;
}
@Override
public String toString() {
return "EnterpriseEntity [name_cn=" + name_cn + ", name_en=" + name_en + ", country_code=" + country_code
+ ", enterprise_type=" + enterprise_type + "]";
}
}
... ...
//package com.agent.entity.agent;
//
//import com.agent.entity.BasicEntity;
//
//import javax.persistence.Column;
//import javax.persistence.Entity;
//import javax.persistence.Table;
//import java.util.Date;
//
///**
// * Created by cohesion on 2017/4/19.
// * <p/>
// * 预配舱单表
// */
//@Entity
//@Table(name = "MANIFEST")
//public class ManifestEntity extends BasicEntity {
//
// /**
// * 航班航次编号
// */
// private String voyageNo;
//
// /**
// * 运输工具代码
// */
// private String toolCode;
//
// /**
// * 运输工具名称
// */
// private String toolName;
//
// /**
// * 运输方式代码
// */
// private String modeCode;
//
// /**
// * 舱单传输人名称
// */
// private String transferName;
//
// /**
// * 离境地海关代码
// */
// private String leaveCode;
//
// /**
// * 代理企业代码
// */
// private String agentCompanyCode;
//
// /**
// * 承运人代码
// */
// private String carrierCode;
//
// /**
// * 境外海关第一停靠港代码
// */
// private String firstPortCode;
//
// /**
// * 境外海关第一停靠港日期
// */
// private Date firstPortDate;
//
// /**
// * 启运日期
// */
// private Date departureDate;
//
// /**
// * 申报企业关区号
// */
// private String enterpriseNumber;
//
// /**
// * 申报企业组织机构代码
// */
// private String enterpriseCode;
//
// /**
// * 备注
// */
// private String remark;
//
// /**
// * 报文发送状态
// */
// private Integer sendXml = 0;
//
//
// @Column(name = "VOYAGE_NUMBER")
// public String getVoyageNo() {
// return voyageNo;
// }
//
// public void setVoyageNo(String voyageNo) {
// this.voyageNo = voyageNo;
// }
//
// @Column(name = "TOOL_CODE")
// public String getToolCode() {
// return toolCode;
// }
//
// public void setToolCode(String toolCode) {
// this.toolCode = toolCode;
// }
//
// @Column(name = "TOOL_NAME")
// public String getToolName() {
// return toolName;
// }
//
// public void setToolName(String toolName) {
// this.toolName = toolName;
// }
//
// @Column(name = "MODE_CODE")
// public String getModeCode() {
// return modeCode;
// }
//
// public void setModeCode(String modeCode) {
// this.modeCode = modeCode;
// }
//
// @Column(name = "TRANSFER_NAME")
// public String getTransferName() {
// return transferName;
// }
//
// public void setTransferName(String transferName) {
// this.transferName = transferName;
// }
//
// @Column(name = "CUSTOMS_LEAVE_CODE")
// public String getLeaveCode() {
// return leaveCode;
// }
//
// public void setLeaveCode(String leaveCode) {
// this.leaveCode = leaveCode;
// }
//
// @Column(name = "AGENT_COMPANY_CODE")
// public String getAgentCompanyCode() {
// return agentCompanyCode;
// }
//
// public void setAgentCompanyCode(String agentCompanyCode) {
// this.agentCompanyCode = agentCompanyCode;
// }
//
// @Column(name = "CARRIER_CODE")
// public String getCarrierCode() {
// return carrierCode;
// }
//
// public void setCarrierCode(String carrierCode) {
// this.carrierCode = carrierCode;
// }
//
// @Column(name = "FIRST_PORT_CODE")
// public String getFirstPortCode() {
// return firstPortCode;
// }
//
// public void setFirstPortCode(String firstPortCode) {
// this.firstPortCode = firstPortCode;
// }
//
// @Column(name = "FIRST_PORT_DATE")
// public Date getFirstPortDate() {
// return firstPortDate;
// }
//
// public void setFirstPortDate(Date firstPortDate) {
// this.firstPortDate = firstPortDate;
// }
//
// @Column(name = "DEPARTURE_DATE")
// public Date getDepartureDate() {
// return departureDate;
// }
//
// public void setDepartureDate(Date departureDate) {
// this.departureDate = departureDate;
// }
//
// @Column(name = "ENTERPRISE_NUMBER")
// public String getEnterpriseNumber() {
// return enterpriseNumber;
// }
//
// public void setEnterpriseNumber(String enterpriseNumber) {
// this.enterpriseNumber = enterpriseNumber;
// }
//
// @Column(name = "ENTERPRISE_CODE")
// public String getEnterpriseCode() {
// return enterpriseCode;
// }
//
// public void setEnterpriseCode(String enterpriseCode) {
// this.enterpriseCode = enterpriseCode;
// }
//
// @Column(name = "REMARK")
// public String getRemark() {
// return remark;
// }
//
// public void setRemark(String remark) {
// this.remark = remark;
// }
//
// @Column(name = "SEND_XML")
// public Integer getSendXml() {
// return sendXml;
// }
//
// public void setSendXml(Integer sendXml) {
// this.sendXml = sendXml;
// }
//}
package com.agent.entity.agent;
import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;
... ... @@ -240,6 +11,7 @@ import javax.persistence.Table;
import org.apache.commons.lang.StringUtils;
import com.agent.entity.BasicEntity;
import com.agent.entity.Constant;
/**
* Created by cohesion on 2017/8/9.
... ... @@ -248,7 +20,9 @@ import com.agent.entity.BasicEntity;
*/
@Entity
@Table(name = "MANIFEST")
public class ManifestEntity extends BasicEntity {
public class ManifestEntity extends BasicEntity implements Serializable {
private static final long serialVersionUID = 1L;
private String unlodingcode;// 卸货地代码
private String cnecusid;// 收货人代码
private String shpcusid;// 发货人代码
... ... @@ -790,7 +564,8 @@ public class ManifestEntity extends BasicEntity {
@Column(name = "STOWAGEDATE")
public Date getStowagedate() {
return stowagedate;
// return stowagedate;
return new Date();
}
public void setStowagedate(Date stowagedate) {
... ... @@ -1068,7 +843,7 @@ public class ManifestEntity extends BasicEntity {
@Column(name = "CO_COUNTRY")
public String getCo_country() {
return co_country;
return co_country != null ? co_country.toUpperCase() : "";
}
public void setCo_country(String co_country) {
... ... @@ -1187,4 +962,36 @@ public class ManifestEntity extends BasicEntity {
}
return false;
}
@Override
public String toString() {
return "ManifestEntity [unlodingcode=" + unlodingcode + ", cnecusid=" + cnecusid + ", shpcusid=" + shpcusid
+ ", shpaeo=" + shpaeo + ", cneaeo=" + cneaeo + ", flightno=" + flightno + ", flightdate=" + flightdate
+ ", originatingstation=" + originatingstation + ", destinationstation=" + destinationstation
+ ", waybillnomaster=" + waybillnomaster + ", totalweight=" + totalweight + ", totalpiece=" + totalpiece
+ ", preparetotalpiece=" + preparetotalpiece + ", preparetotalweight=" + preparetotalweight
+ ", agentcompanycode=" + agentcompanycode + ", stowagedate=" + stowagedate + ", status=" + status
+ ", carrier=" + carrier + ", customsstatus=" + customsstatus + ", paymode=" + paymode
+ ", specialgoodscode=" + specialgoodscode + ", customscode=" + customscode + ", agentman=" + agentman
+ ", agentcompany=" + agentcompany + ", receiptinformation=" + receiptinformation + ", createdate="
+ createdate + ", productname=" + productname + ", unnumber=" + unnumber + ", category=" + category
+ ", sh_company=" + sh_company + ", sh_address=" + sh_address + ", sh_zipcode=" + sh_zipcode
+ ", sh_city=" + sh_city + ", sh_deltaname=" + sh_deltaname + ", sh_country=" + sh_country
+ ", sh_telephone=" + sh_telephone + ", sh_fax=" + sh_fax + ", sh_name=" + sh_name + ", co_company="
+ co_company + ", co_address=" + co_address + ", co_zipcode=" + co_zipcode + ", co_city=" + co_city
+ ", co_deltaname=" + co_deltaname + ", co_country=" + co_country + ", co_telephone=" + co_telephone
+ ", co_fax=" + co_fax + ", co_name=" + co_name + ", reach_station=" + reach_station + ", carrier1="
+ carrier1 + ", reach_station1=" + reach_station1 + ", carrier2=" + carrier2 + ", reach_station2="
+ reach_station2 + ", name_ofgoods=" + name_ofgoods + ", delivery_station=" + delivery_station
+ ", sh_provincecode=" + sh_provincecode + ", sh_provincename=" + sh_provincename + ", de_number="
+ de_number + ", de_weight=" + de_weight + ", de_chweight=" + de_chweight + ", de_size=" + de_size
+ ", de_volume=" + de_volume + ", de_type=" + de_type + ", de_trstation=" + de_trstation
+ ", de_packing=" + de_packing + ", de_remarks=" + de_remarks + ", de_ids=" + de_ids
+ ", response_code=" + response_code + ", response_text=" + response_text + ", save_time=" + save_time
+ ", USER_ID=" + USER_ID + "]";
}
public static void main(String[] args) {
System.out.println(Constant.getDateEnglish(new Date()));
}
}
... ...
... ... @@ -591,7 +591,8 @@ public class PreparesecondaryEntity extends BasicEntity {
@Column(name = "STOWAGEDATE")
public Date getStowagedate() {
return stowagedate;
// return stowagedate;
return new Date();
}
public void setStowagedate(Date stowagedate) {
... ... @@ -798,7 +799,7 @@ public class PreparesecondaryEntity extends BasicEntity {
@Column(name = "SH_COUNTRY")
public String getSh_country() {
return sh_country;
return sh_country!=null?sh_country.toUpperCase():"";
}
public void setSh_country(String sh_country) {
... ...
package com.agent.repository.agent;
import com.agent.entity.agent.ConsigneeEntity;
import com.agent.entity.agent.ConsigneeInfo;
import java.util.List;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
... ... @@ -9,22 +8,26 @@ import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import com.agent.entity.agent.ConsigneeEntity;
import com.agent.entity.agent.ConsigneeInfo;
public interface ConsigneeRepository extends PagingAndSortingRepository<ConsigneeEntity, Long>,
JpaSpecificationExecutor<ConsigneeEntity> {
@Query(value = "SELECT * FROM PUB_CONSIGNEE WHERE CODE = ?1 AND NAME = ?2 ORDER BY ID DESC", nativeQuery = true)
public List<ConsigneeEntity> findByName(String code,String name);
@Query(value = "SELECT * FROM(SELECT rownum rn,c.* from PUB_CONSIGNEE c where c.creator=?1) cr where cr.rn between ?2 and ?3", nativeQuery = true)
public List<ConsigneeEntity> list(long user_id,int start,int end);
@Query(value = "SELECT * FROM PUB_CONSIGNEE WHERE CODE = ?1 AND NAME = ?2 AND CREATOR=?3 ORDER BY ID DESC", nativeQuery = true)
public List<ConsigneeEntity> findByName(String code,String name,long user_id);
@Query(value = "SELECT * FROM PUB_CONSIGNEE WHERE CODE = ?1 ORDER BY ID DESC", nativeQuery = true)
public List<ConsigneeEntity> findByCode(String code);
@Query(value = "SELECT * FROM PUB_CONSIGNEE WHERE CODE = ?1 AND CREATOR=?2 ORDER BY ID DESC", nativeQuery = true)
public List<ConsigneeEntity> findByCode(String code,long user_id);
@Query(value = "SELECT * FROM PUB_CONSIGNEE WHERE ID = ?1 ORDER BY ID DESC", nativeQuery = true)
public List<ConsigneeEntity> findById(String id);
@Query(value = "SELECT * FROM PUB_CONSIGNEE WHERE ID = ?1 AND CREATOR=?2 ORDER BY ID DESC", nativeQuery = true)
public List<ConsigneeEntity> findById(String id,long user_id);
@Query(value = "SELECT * FROM PUB_CONSIGNEE ORDER BY ID DESC", nativeQuery = true)
public List<ConsigneeEntity> findAll2();
@Query(value = "SELECT * FROM PUB_CONSIGNEE WHERE CREATOR=?1 ORDER BY ID DESC", nativeQuery = true)
public List<ConsigneeEntity> findAll2(long user_id);
@Modifying
@Query(value = "DELETE FROM PUB_CONSIGNEE WHERE ID = ?1", nativeQuery = true)
... ...
... ... @@ -19,8 +19,8 @@ public interface ConsignorRepository
@Query(value = "SELECT * FROM CONSIGNOR WHERE ID = ?1 ORDER BY ID DESC", nativeQuery = true)
public List<ConsignorEntity> findById(String id);
@Query(value = "SELECT * FROM(SELECT rownum rn,c.* from CONSIGNOR c) cr where cr.rn between ?1 and ?2", nativeQuery = true)
public List<ConsignorEntity> list(int start,int end);
@Query(value = "SELECT * FROM(SELECT rownum rn,c.* from CONSIGNOR c where c.creator=?1) cr where cr.rn between ?2 and ?3", nativeQuery = true)
public List<ConsignorEntity> list(long user_id,int start,int end);
@Query(value = "SELECT * FROM CONSIGNOR WHERE CREATOR = ?1 ORDER BY ID DESC", nativeQuery = true)
public List<ConsignorEntity> getAllByUserId(long user_id);
... ...
package com.agent.repository.agent;
import java.util.List;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import com.agent.entity.agent.EnterpriseEntity;
public interface EnterpriseRepository extends PagingAndSortingRepository<EnterpriseEntity, String>, JpaSpecificationExecutor<EnterpriseEntity> {
@Query(value = "SELECT * FROM T_BAS_ENTERPRISE WHERE COUNTRY_CODE like ?1% AND ROWID=ANY(SELECT MAX(ROWID) FROM T_BAS_ENTERPRISE GROUP BY NAME_EN) ORDER BY ID ASC", nativeQuery = true)
public List<EnterpriseEntity> search(String start);
@Query(value = "SELECT * FROM T_BAS_ENTERPRISE WHERE COUNTRY_CODE = ?1 ORDER BY ID ASC", nativeQuery = true)
public List<EnterpriseEntity> findTypeByCountryCode(String countryCode);
}
... ...
... ... @@ -25,6 +25,9 @@ public interface ManifestRepository extends PagingAndSortingRepository<ManifestE
@Query(value = "SELECT * FROM MANIFEST WHERE WAYBILLNOMASTER = ?1 and USER_ID=?2 ORDER BY ID DESC", nativeQuery = true)
public List<ManifestEntity> findByMawbNo(String mawbNo, Long user_id);
@Query(value = "SELECT * FROM MANIFEST WHERE WAYBILLNOMASTER = ?1 ORDER BY ID DESC", nativeQuery = true)
public List<ManifestEntity> findByMawbNo(String mawbNo);
@Query(value = "SELECT * FROM MANIFEST", nativeQuery = true)
public List<ManifestEntity> queryAll();
... ...
... ... @@ -57,6 +57,7 @@ public class BasicService<T> {
*/
protected Specification<T> buildSpecification(EasyPage<T> pageForm) {
Map<String, SearchFilter> filters = SearchFilter.parse(pageForm.getSearchParams());
// filters.put("creator", new SearchFilter("creator", Operator.EQ, Tools.getUserId()));
Specification<T> spec = DynamicSpecifications.bySearchFilter(filters.values(),entityClass);
return spec;
}
... ...
package com.agent.service.agent;
import java.util.List;
import javax.annotation.Resource;
... ... @@ -13,88 +12,78 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.agent.entity.agent.ConsigneeEntity;
import com.agent.entity.agent.ConsignorEntity;
import com.agent.repository.agent.ConsigneeRepository;
import com.agent.service.BasicService;
import com.google.common.base.Splitter;
import com.plugin.easyui.EasyPage;
import tools.Tools;
@Service
public class ConsigneeService extends BasicService<ConsigneeEntity> {
@Resource
private ConsigneeRepository consigneeRepository;
@Resource
private ConsigneeRepository consigneeRepository;
@Transactional
public void deleteAll(String ids) {
List<String> list = Splitter.on(",").trimResults().omitEmptyStrings().splitToList(ids);
for (String id : list) {
consigneeRepository.delete(Long.valueOf(id));
}
}
public ConsigneeEntity findByCodeAndName(String code, String name) {
List<ConsigneeEntity> consigns = consigneeRepository.findByName(code, name, Tools.getUserId());
if (CollectionUtils.isNotEmpty(consigns)) {
return consigns.get(0);
}
return null;
}
public ConsigneeEntity findByCode(String code) {
List<ConsigneeEntity> consigns = consigneeRepository.findByCode(code, Tools.getUserId());
if (CollectionUtils.isNotEmpty(consigns)) {
return consigns.get(0);
}
return null;
}
public Page<ConsigneeEntity> getPage(EasyPage<ConsigneeEntity> pageForm) {
PageRequest pageRequest = buildPageRequest(pageForm);
Specification<ConsigneeEntity> spec = buildSpecification(pageForm);
Page<ConsigneeEntity> page = consigneeRepository.findAll(spec, pageRequest);
return page;
}
public long total(long user_id) {
List<ConsigneeEntity> list = consigneeRepository.findAll2(user_id);
return list!=null?list.size():0;
}
public List<ConsigneeEntity> list(int page,int limit) {
int start = (page-1)*limit+1;
int end = page*limit;
long user_id = Tools.getUserId();
return consigneeRepository.list(user_id,start,end);
}
public void save(ConsigneeEntity c) {
c.setCreator(Tools.getUserEntity());
consigneeRepository.save(c);
}
@Transactional
public void deleteAll(String ids) {
List<String> list = Splitter.on(",").trimResults().omitEmptyStrings().splitToList(ids);
for (String id : list) {
consigneeRepository.delete(Long.valueOf(id));
}
}
public List<ConsigneeEntity> findAll() {
return consigneeRepository.findAll2(Tools.getUserId());
}
public ConsigneeEntity findByCodeAndName(String code,String name){
List<ConsigneeEntity> consigns = consigneeRepository.findByName(code,name);
if(CollectionUtils.isNotEmpty(consigns)){
return consigns.get(0);
}
return null;
}
public void update(ConsigneeEntity c) {
c.setCreator(Tools.getUserEntity());
consigneeRepository.save(c);
}
public ConsigneeEntity findByCode(String code){
List<ConsigneeEntity> consigns = consigneeRepository.findByCode(code);
if(CollectionUtils.isNotEmpty(consigns)){
return consigns.get(0);
}
return null;
}
public Page<ConsigneeEntity> getPage(EasyPage<ConsigneeEntity> pageForm) {
PageRequest pageRequest = buildPageRequest(pageForm);
Specification<ConsigneeEntity> spec = buildSpecification(pageForm);
Page<ConsigneeEntity> page = consigneeRepository.findAll(spec, pageRequest);
return page;
}
public void save(ConsigneeEntity c){
consigneeRepository.save(c);
}
public List<ConsigneeEntity> findAll(){
return consigneeRepository.findAll2();
}
public void update(ConsigneeEntity c){
consigneeRepository.save(c);
}
public List<ConsigneeEntity> findById(String id){
return consigneeRepository.findById(id);
}
/* //保存这个有问题
public int save(ConsigneeInfo info){
if(info == null)
return 0;
info.setId(MD5Tools.MD5(System.currentTimeMillis() + JSONObject.toJSONString(info)));
return consigneeRepository.save(info.getId(),
info.getSh_company(), info.getSh_address(),
info.getSh_zipcode(), info.getCity(),
info.getDeltaname(), info.getCountry(),
info.getTelephone(), info.getSh_fax(),
info.getSh_name(), info.getSh_provincename(),
info.getSh_provincecode());
}
public int update(ConsigneeInfo info){
if(info == null)
return 0;
return consigneeRepository.update(info.getId(),
info.getSh_company(), info.getSh_address(),
info.getSh_zipcode(), info.getCity(),
info.getDeltaname(), info.getCountry(),
info.getTelephone(), info.getSh_fax(),
info.getSh_name(), info.getSh_provincename(),
info.getSh_provincecode());
}
public List<ConsigneeInfo> queryById(String id){
if(id == null)
return null;
return consigneeRepository.queryById(id);
}*/
public List<ConsigneeEntity> findById(String id) {
return consigneeRepository.findById(id, Tools.getUserId());
}
}
... ...
... ... @@ -73,11 +73,17 @@ public class ConsignorService extends BasicService<ConsignorEntity> {
public long count() {
return service.count();
}
public long total(long user_id) {
List<ConsignorEntity> list = service.getAllByUserId(user_id);
return list!=null?list.size():0;
}
public List<ConsignorEntity> list(int page,int limit) {
int start = (page-1)*limit+1;
int end = page*limit;
return service.list(start,end);
long user_id = Tools.getUserId();
return service.list(user_id,start,end);
}
public List<ConsignorEntity> findAllByUserId(long user_id) {
... ... @@ -142,5 +148,5 @@ public class ConsignorService extends BasicService<ConsignorEntity> {
}
}
}
... ...
package com.agent.service.agent;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.agent.entity.agent.EnterpriseEntity;
import com.agent.repository.agent.EnterpriseRepository;
/**
* Depiction:
* <p>
* Modify:
* <p>
* Author: William Lynn
* <p>
* Create Date:2018年6月28日 下午4:06:43
*
*/
@Service
public class EnterpriseService {
@Resource
private EnterpriseRepository service;
public EnterpriseService() {
}
public List<EnterpriseEntity> search(String start){
return service.search(start);
}
public List<EnterpriseEntity> findTypeByCountryCode(String countryCode){
return service.findTypeByCountryCode(countryCode);
}
}
... ...
... ... @@ -30,6 +30,8 @@ import com.framework.shiro.SessionUtil;
import com.google.common.base.Splitter;
import com.plugin.easyui.EasyPage;
import tools.Tools;
@Service
public class MakeHawbService extends BasicService<MakeHawbEntity> {
... ... @@ -78,7 +80,7 @@ public class MakeHawbService extends BasicService<MakeHawbEntity> {
}
//保存收货人
if(StringUtils.isNotEmpty(consign.getCode()) && StringUtils.isNotEmpty(consign.getName())){
List<ConsigneeEntity> consigns = consigneeRepository.findByName(consign.getCode(),consign.getName());
List<ConsigneeEntity> consigns = consigneeRepository.findByName(consign.getCode(),consign.getName(),Tools.getUserId());
if(CollectionUtils.isEmpty(consigns)){
consign.setCreator(SessionUtil.getUser());
consign.setCreateDate(new Date());
... ...
package com.agent.service.agent;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.agent.entity.Constant;
import com.agent.entity.agent.ConsigneeEntity;
import com.agent.entity.agent.MakeMawbEntity;
... ... @@ -17,20 +30,6 @@ import com.plugin.easyui.EasyPage;
import tools.Tools;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Service
public class MakeMawbService extends BasicService<MakeMawbEntity> {
... ... @@ -103,7 +102,7 @@ public class MakeMawbService extends BasicService<MakeMawbEntity> {
public MakeMawbEntity save(MakeMawbEntity bill,MawbOtherFeeEntity otherFee,ConsigneeEntity consign,List<PackageSizeEntity> sizeList) {
//保存收货人
if(StringUtils.isNotEmpty(consign.getCode()) && StringUtils.isNotEmpty(consign.getName())){
List<ConsigneeEntity> consignees = consigneeRepository.findByName(consign.getCode(),consign.getName());
List<ConsigneeEntity> consignees = consigneeRepository.findByName(consign.getCode(),consign.getName(),Tools.getUserId());
if(CollectionUtils.isEmpty(consignees)){
consign = consigneeRepository.save(consign);
}
... ...
... ... @@ -173,23 +173,6 @@ public class ManifestService extends BasicService<ManifestEntity> {
if (manifest != null) {
// 先删除子表信息
preparesecondaryRepository.deleteAll(manifest.getId());
// 以前删除其他表信息
// List<ManifestBillEntity> bills =
// billRepository.findByManifestId(manifest.getId());
// if(!CollectionUtils.isEmpty(bills)){
// for(ManifestBillEntity bill :bills){
// List<ManifestCommodityEntity> commodities =
// commodityRepository.findByBillId(bill.getId());
// if(!CollectionUtils.isEmpty(commodities)){
// for(ManifestCommodityEntity commodity :commodities){
// containerRepository.deleteByCommodityId(commodity.getId());
// commodityRepository.delete(commodity.getId());
// }
// }
// billRepository.delete(Long.valueOf(id));
// }
// }
}
manifestRepository.delete(Long.valueOf(id));
}
... ... @@ -198,7 +181,11 @@ public class ManifestService extends BasicService<ManifestEntity> {
public List<ManifestEntity> findByMawbNo(String mawbNo) {
return manifestRepository.findByMawbNo(mawbNo, Tools.getUserId());
}
public List<ManifestEntity> findByManifestNo(String mawbNo) {
return manifestRepository.findByMawbNo(mawbNo);
}
public List<ManifestEntity> queryAll() {
return manifestRepository.queryAll();
}
... ... @@ -308,7 +295,7 @@ public class ManifestService extends BasicService<ManifestEntity> {
// 装载日期
ManifestLoadingLocationXml ml = new ManifestLoadingLocationXml();
ml.setId("CGO/4604");
ml.setLoadingdate(new SimpleDateFormat("yyyy-MM-dd HH:mm").format(manifest.getStowagedate()));
ml.setLoadingdate(new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()));
mcs.setLoadinglocation(ml);
ManifestUnloadingLocationXml mu = new ManifestUnloadingLocationXml();
... ... @@ -335,7 +322,7 @@ public class ManifestService extends BasicService<ManifestEntity> {
mcs.setCustomscode(manifest.getCustomscode());
mcs.setAgentname(manifest.getAgentman());
mcs.setAgentCompany(manifest.getAgentcompany());
mcs.setName_ofgoods(manifest.getName_ofgoods() != null ? manifest.getName_ofgoods() : "");
mcs.setName_ofgoods(manifest.getProductname() != null ? manifest.getProductname() : "");
mcs.setDelivery_station(manifest.getDelivery_station() != null ? manifest.getDelivery_station() : "");
mcs.setUnnumber(manifest.getUnnumber() != null ? manifest.getUnnumber() : "");
mcs.setCategory(manifest.getCategory() != null ? manifest.getCategory() : "");
... ... @@ -484,8 +471,7 @@ public class ManifestService extends BasicService<ManifestEntity> {
// 装载日期
ManifestLoadingLocationXml ml = new ManifestLoadingLocationXml();
ml.setId("CGO/4604");
// ml.setLoadingdate(Constant.dateTimeFormatnumber.format(pre.getStowagedate()));
ml.setLoadingdate(new SimpleDateFormat("yyyy-MM-dd HH:mm").format(pre.getStowagedate()));
ml.setLoadingdate(new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()));
mcs.setLoadinglocation(ml);
ManifestUnloadingLocationXml mu = new ManifestUnloadingLocationXml();
... ... @@ -512,7 +498,7 @@ public class ManifestService extends BasicService<ManifestEntity> {
mcs.setCustomscode(pre.getCustomscode());
mcs.setAgentname(pre.getAgentman());
mcs.setAgentCompany(pre.getAgentcompany());
mcs.setName_ofgoods(pre.getName_ofgoods() != null ? pre.getName_ofgoods() : "");
mcs.setName_ofgoods(pre.getProductname() != null ? pre.getProductname() : "");
mcs.setDelivery_station(pre.getDelivery_station() != null ? pre.getDelivery_station() : "");
mcs.setUnnumber(pre.getUnnumber() != null ? pre.getUnnumber() : "");
mcs.setCategory(pre.getCategory() != null ? pre.getCategory() : "");
... ... @@ -658,7 +644,7 @@ public class ManifestService extends BasicService<ManifestEntity> {
inc.setPiecequantity(manifest.getDe_number());
NatureIdentificationTransportCargoXml nat = new NatureIdentificationTransportCargoXml();
nat.setIdentification(manifest.getName_ofgoods());
nat.setIdentification(manifest.getProductname());
inc.setNatureidentificationtransportcargo(nat);
mas.setIncludedmasterconsignmentitem(inc);
... ...
... ... @@ -47,7 +47,6 @@ public class PreparesecondaryService extends BasicService<PreparesecondaryEntity
// 判断是否存在
public boolean isExists(PreparesecondaryEntity pe) {
System.out.println(pe.getId());
if (pe == null)
return false;
else if (pe.getId() == null) {
... ...
... ... @@ -115,7 +115,7 @@ public class WaybillReceiptService extends BasicService<WaybillReceiprtEntity> {
ManifestService mbs = new ManifestService();
DeclareXmlBody dpxb = mbs.generateWaybillReceiptXml(manifest, type, null);
String dpxbPath = CustomMessageKit.getMessagePath();
String dpxbPath = CustomMessageKit.getMessagePath("manifest");
XmlUtil.convertToXml2(dpxb, dpxbPath);
RemoteFileKit.putFile(dpxbPath);
}
... ... @@ -147,7 +147,7 @@ public class WaybillReceiptService extends BasicService<WaybillReceiprtEntity> {
ManifestService mbs = new ManifestService();
DeclareXmlBody dpxb = mbs.generateWaybillReceiptXml(prepare, type, null);
String dpxbPath = CustomMessageKit.getMessagePath();
String dpxbPath = CustomMessageKit.getMessagePath("secondary");
XmlUtil.convertToXml2(dpxb, dpxbPath);
RemoteFileKit.putFile(dpxbPath);
}else {
... ...
... ... @@ -4,24 +4,32 @@ import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import org.apache.commons.lang.StringUtils;
import com.agent.entity.Constant;
import com.agent.entity.agent.ManifestEntity;
import com.agent.entity.agent.PreparesecondaryEntity;
import com.agent.xml.fhlsli.common.ApplicableFreightRateServiceCharge;
import com.agent.xml.fhlsli.common.ArrivalEvent;
import com.agent.xml.fhlsli.common.AssociatedParty;
import com.agent.xml.fhlsli.common.AssociatedReferenceDocument;
import com.agent.xml.fhlsli.common.ChargeableWeightMeasure;
import com.agent.xml.fhlsli.common.ConsigneeParty;
import com.agent.xml.fhlsli.common.ConsignorParty;
import com.agent.xml.fhlsli.common.DepartureEvent;
import com.agent.xml.fhlsli.common.FinalDestinationLocation;
import com.agent.xml.fhlsli.common.FreightForwarderParty;
import com.agent.xml.fhlsli.common.GrossWeightMeasure;
import com.agent.xml.fhlsli.common.HandlingInstructions;
import com.agent.xml.fhlsli.common.IncludedCustomsNote;
import com.agent.xml.fhlsli.common.IncludedTareGrossWeightMeasure;
import com.agent.xml.fhlsli.common.NatureIdentificationTransportCargo;
import com.agent.xml.fhlsli.common.OccurrenceArrivalLocation;
import com.agent.xml.fhlsli.common.OccurrenceDepartureLocation;
import com.agent.xml.fhlsli.common.OriginLocation;
import com.agent.xml.fhlsli.common.PostalStructuredAddress;
import com.agent.xml.fhlsli.common.SpecifiedLogisticsTransportMovement;
import com.agent.xml.fhlsli.common.UsedLogisticsTransportMeans;
import com.agent.xml.fhlsli.fhl.ApplicableLogisticsAllowanceCharge;
import com.agent.xml.fhlsli.fhl.ApplicableTradeCurrencyExchange;
import com.agent.xml.fhlsli.fhl.AssociatedUnitLoadTransportEquipment;
... ... @@ -88,12 +96,14 @@ public class FSXmlKit {
SliMain dflt = new SliMain();
SliMasterConsignment sliMasterConsignment = new SliMasterConsignment();
sliMasterConsignment.setID(me.getWaybillnomaster());
sliMasterConsignment.setNilCustomsValueIndicator("true");
sliMasterConsignment.setNilInsuranceValueIndicator("true");
sliMasterConsignment.setNilCarriageValueIndicator("false");
sliMasterConsignment.setNilInsuranceValueIndicator("false");
sliMasterConsignment.setNilCustomsValueIndicator("false");
sliMasterConsignment.setNilInsuranceValueIndicator("false");
sliMasterConsignment.setDeclaredValueForCarriageAmount("");
sliMasterConsignment.setInsuranceValueAmount("");
sliMasterConsignment.setTotalChargePrepaidIndicator("true");
sliMasterConsignment.setTotalDisbursementPrepaidIndicator("true");
sliMasterConsignment.setTotalChargePrepaidIndicator("false");
sliMasterConsignment.setTotalDisbursementPrepaidIndicator("false");
IncludedTareGrossWeightMeasure IncludedTareGrossWeightMeasure = new IncludedTareGrossWeightMeasure();
IncludedTareGrossWeightMeasure.setIncludedTareGrossWeightMeasure(me.getTotalweight());
... ... @@ -139,8 +149,37 @@ public class FSXmlKit {
sliMasterConsignment.setFinalDestinationLocation(destinationLocation);
SpecifiedLogisticsTransportMovement transport = new SpecifiedLogisticsTransportMovement();
transport.setStageCode(
me.getCarrier() + me.getFlightno() + "/" + Constant.dateFormat.format(me.getFlightdate()));
UsedLogisticsTransportMeans meas = new UsedLogisticsTransportMeans();
meas.setName("");
transport.setUsedLogisticsTransportMeans(meas);
ArrivalEvent arrivalEvent = new ArrivalEvent();
OccurrenceArrivalLocation occurrenceArrivalLocation = new OccurrenceArrivalLocation();
occurrenceArrivalLocation.setID(me.getDestinationstation());
occurrenceArrivalLocation.setName("");
occurrenceArrivalLocation.setTypeCode("");
arrivalEvent.setOccurrenceArrivalLocation(occurrenceArrivalLocation);
transport.setArrivalEvent(arrivalEvent);
DepartureEvent departureEvent = new DepartureEvent();
OccurrenceDepartureLocation occurrenceDepartureLocation = new OccurrenceDepartureLocation();
occurrenceDepartureLocation.setID(me.getOriginatingstation());
occurrenceDepartureLocation.setName("");
occurrenceDepartureLocation.setTypeCode("");
departureEvent.setOccurrenceDepartureLocation(occurrenceDepartureLocation);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX", Locale.CHINA);
departureEvent.setScheduledOccurrenceDateTime(sdf.format(me.getFlightdate()));
transport.setDepartureEvent(departureEvent);
String flight = me.getCarrier() + me.getFlightno();
String date = Constant.getDateEnglish(me.getFlightdate());// 英文月日,eg:Jul01
transport.setStageCode(flight + "/" + date);
transport.setModeCode("4");
transport.setMode("Air Transport");
transport.setID(flight);
transport.setSequenceNumeric("1");
sliMasterConsignment.setSpecifiedLogisticsTransportMovement(transport);
HandlingInstructions handlingInstructions = new HandlingInstructions();
... ... @@ -173,6 +212,13 @@ public class FSXmlKit {
applicableFreightRateServiceCharge.setAppliedRate("");
applicableFreightRateServiceCharge.setAppliedAmount("");
includedMasterConsignmentItem.setApplicableFreightRateServiceCharge(applicableFreightRateServiceCharge);
NatureIdentificationTransportCargo natureIdentificationTransportCargo = new NatureIdentificationTransportCargo();
String productName = StringUtils.isNotBlank(me.getProductname()) ? me.getProductname() : "";
natureIdentificationTransportCargo.setIdentification(productName);
natureIdentificationTransportCargo.setExtraIdentification(productName);
includedMasterConsignmentItem.setNatureIdentificationTransportCargo(natureIdentificationTransportCargo);
sliMasterConsignment.setIncludedMasterConsignmentItem(includedMasterConsignmentItem);
ReportedStatus reportedStatus = new ReportedStatus();
... ... @@ -226,6 +272,7 @@ public class FSXmlKit {
FhlMain dflt = new FhlMain();
HouseWaybill houseWaybill = new HouseWaybill();
FhlMasterConsignment fhlMasterConsignment = new FhlMasterConsignment();
fhlMasterConsignment.setIncludedTareGrossWeightMeasure(pe.getTotalweight());
fhlMasterConsignment.setTotalPieceQuantity(pe.getTotalpiece());
... ... @@ -242,6 +289,17 @@ public class FSXmlKit {
fhlMasterConsignment.setFinalDestinationLocation(destinationLocation);
IncludedHouseConsignment includedHouseConsignment = new IncludedHouseConsignment();
// includedHouseConsignment.setID();
// includedHouseConsignment.setNilCarriageValueIndicator("false");
// includedHouseConsignment.setNilInsuranceValueIndicator("false");
// includedHouseConsignment.setNilCustomsValueIndicator("false");
// includedHouseConsignment.setNilInsuranceValueIndicator("false");
// includedHouseConsignment.setDeclaredValueForCarriageAmount("");
// includedHouseConsignment.setInsuranceValueAmount("");
// includedHouseConsignment.setTotalChargePrepaidIndicator("false");
// includedHouseConsignment.setTotalDisbursementPrepaidIndicator("false");
TransportContractDocument transportContractDocumentSub = new TransportContractDocument();
transportContractDocumentSub.setID(pe.getWaybillnosecondary());
includedHouseConsignment.setTransportContractDocument(transportContractDocumentSub);
... ... @@ -305,6 +363,39 @@ public class FSXmlKit {
FinalDestinationLocation includedDestinationLocation = new FinalDestinationLocation();
includedDestinationLocation.setID(pe.getDestinationstation());
includedHouseConsignment.setFinalDestinationLocation(includedDestinationLocation);
SpecifiedLogisticsTransportMovement transport = new SpecifiedLogisticsTransportMovement();
UsedLogisticsTransportMeans meas = new UsedLogisticsTransportMeans();
meas.setName("");
transport.setUsedLogisticsTransportMeans(meas);
ArrivalEvent arrivalEvent = new ArrivalEvent();
OccurrenceArrivalLocation occurrenceArrivalLocation = new OccurrenceArrivalLocation();
occurrenceArrivalLocation.setID(pe.getDestinationstation());
occurrenceArrivalLocation.setName("");
occurrenceArrivalLocation.setTypeCode("");
arrivalEvent.setOccurrenceArrivalLocation(occurrenceArrivalLocation);
transport.setArrivalEvent(arrivalEvent);
DepartureEvent departureEvent = new DepartureEvent();
OccurrenceDepartureLocation occurrenceDepartureLocation = new OccurrenceDepartureLocation();
occurrenceDepartureLocation.setID(pe.getOriginatingstation());
occurrenceDepartureLocation.setName("");
occurrenceDepartureLocation.setTypeCode("");
departureEvent.setOccurrenceDepartureLocation(occurrenceDepartureLocation);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX", Locale.CHINA);
departureEvent.setScheduledOccurrenceDateTime(sdf.format(pe.getFlightdate()));
transport.setDepartureEvent(departureEvent);
String flight = pe.getCarrier() + pe.getFlightno();
String date = Constant.getDateEnglish(pe.getFlightdate());// 英文月日,eg:Jul01
transport.setStageCode(flight + "/" + date);
transport.setModeCode("4");
transport.setMode("Air Transport");
transport.setID(flight);
transport.setSequenceNumeric("1");
includedHouseConsignment.setSpecifiedLogisticsTransportMovement(transport);
HandlingInstructions handlingInstructions = new HandlingInstructions();
handlingInstructions.setDescriptionCode(pe.getProductname());
... ...
... ... @@ -39,10 +39,14 @@ public class CustomMessageKit {
return dirPath;
}
public static String getMessagePath() {
return getMessageLocalDir() + "/" + getMessageName();
public static String getMessagePath(String prefix) {
return getMessageLocalDir() + "/" + prefix + "_" + getMessageName();
}
// public static String getMessagePath() {
// return getMessageLocalDir() + "/" + getMessageName();
// }
public static String getMessageName() {
return "CN_MT2201_1P0_4604_70678920X_" + TimeUtils.getDate(new Date(), "yyyyMMddHHmmssSSS") + ".xml";
}
... ...
... ... @@ -374,6 +374,8 @@ handlebill.password=Password
track.no=Freight Waybill No
###
manifest.enterprise.code=Enterprise Code
manifest.enterprise.code.type=Select Code Type
manifest.list=Manifest List
manifest.flight=Flight No
manifest.agent=Agent Code
... ...
... ... @@ -376,6 +376,8 @@ handlebill.password=\u8BBE\u7F6E\u63D0\u8D27\u5BC6\u7801
track.no=\u8D27\u8FD0\u5355\u53F7
###
manifest.enterprise.code=\u4F01\u4E1A\u4EE3\u7801
manifest.enterprise.code.type=\u8BF7\u9009\u62E9\u4EE3\u7801\u7C7B\u578B
manifest.list=\u9884\u914D\u8231\u5355\u5217\u8868
manifest.flight=\u822A\u73ED\u822A\u6B21\u7F16\u53F7
manifest.agent=\u4EE3\u7406\u4F01\u4E1A\u4EE3\u7801
... ... @@ -589,7 +591,7 @@ manifest.transfer.station=\u4e2d\u8f6c\u7ad9
manifest.packing.information=\u5305\u88c5\u4fe1\u606f
manifest.Remarks=\u5907\u6ce8
manifest.delivery=\u4fdd\u5b58\u5e76\u53d1\u9001\u5230\u4ea4\u8fd0
manifest.response_text=\u8FD0\u5355\u72B6\u6001;
manifest.response_text=\u8FD0\u5355\u72B6\u6001
manifest.customs_status_001 = \u666E\u901A\u8D27\u7269
manifest.customs_status_002 = \u56FD\u9645\u8F6C\u8FD0\u8D27\u7269
... ...
... ... @@ -97,7 +97,7 @@
field : 'co_country',
title : '国家代码',
sort : true,
width : 80
width : 100
}, {
field : 'co_telephone',
title : '电话'
... ...
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><spring:message code="menu.consignor_info_set" /></title>
<script type="text/javascript" src="<%=basePath%>resource/easyui/jquery.min.js"></script>
<script type="text/javascript" src="<%=basePath%>resource/validate/jquery.validate.js"></script>
<script type="text/javascript" src="<%=basePath%>resource/validate/validate-extends.js"></script>
<!-- validate 验证中英文 -->
<script type="text/javascript"
src="<%=basePath %>resource/validate/jquery.validate-${pageContext.response.locale}.js"></script>
<link rel="stylesheet" href="<%=basePath%>resource/layui/css/layui.css" media="all">
<script type="text/javascript" src="<%=basePath%>resource/layui/layui.js"></script>
<script type="text/javascript" src="<%=basePath%>resource/js/tools.js"></script>
</head>
<body>
<div class="layui-collapse">
<div class="layui-colla-item">
<h2 class="layui-colla-title">
<spring:message code="consignor.list" />
</h2>
<div class="layui-colla-content layui-show">
<div class="layui-row">
<div class="layui-col-md12">
<button class="layui-btn" onclick="edit()">新增</button>
<button class="layui-btn layui-btn-danger" onclick="onDelete()">删除</button>
</div>
</div>
<table id="consignor-table" class="layui-hide" lay-filter="consignor-table"></table>
</div>
</div>
</div>
<script type="text/html" id="opt-bar">
<i class="layui-icon layui-icon-edit" style="font-size: 14px; color: #1E9FFF;" lay-event="edit">编辑</i>
</script>
<script>
var layer;
layui.use('layer', function() {
layer = layui.layer;
});
layui.use('element', function() {
var element = layui.element;
});
$(window).load(function() {
doSearch();
});
var table;
function doSearch() {
var api = "<%=basePath%>consignor/search";
layui.use('table', function() {
table = layui.table;
table.on('checkbox(consignor-table)', function(obj) {
/* console.log(JSON.stringify(obj)) */
});
table.render({
elem : '#consignor-table',
url : api,
limit : 10,
page : true,
loading : true,
limits : [ 10, 15, 20, 25, 30, 35, 40, 45, 50 ],
text : '暂无数据',
cols : [ [ //表头
{
type : 'checkbox',
fixed : 'left',
width : 60
}, {
field : '',
title : '操作',
toolbar : '#opt-bar',
width : 80
}, {
field : 'co_company',
title : '发货人公司',
}, {
field : 'co_city',
title : '发货人城市',
sort : true
}, {
field : 'co_country',
title : '国家代码',
sort : true,
width : 80
}, {
field : 'co_telephone',
title : '电话'
} ] ]
});
});
}
function onDelete() {
var checkStatus = table.checkStatus('consignor-table');
var data = checkStatus.data;
if(data&&data.length){
var ids="";
for (var i = 0; i < data.length; i++) {
var item = data[i];
var id = item.id;
ids+=id;
ids+=","
}
parent.layer.confirm('确定删除吗?', function(index) {
layer.close(index);
doDelete(ids);
});
}
}
function doDelete(ids) {
var api = "<%=basePath%>consignor/delete";
$.post(api, "ids="+ids, function(response, status) {
if(response.status==200){
layer.msg('删除成功');
window.location.reload();
}else{
layer.msg("操作失败");
console.log("response-->"+JSON.stringify(response));
}
});
}
layui.use('table', function() {
var table = layui.table;
table.on('tool(consignor-table)', function(obj) { //注:tool是工具条事件名,test是table原始容器的属性 lay-filter="对应的值"
var data = obj.data; //获得当前行数据
var layEvent = obj.event; //获得 lay-event 对应的值(也可以是表头的 event 参数对应的值)
var tr = obj.tr; //获得当前行 tr 的DOM对象
if (layEvent === 'edit') { //编辑
window.location.href = "<%=basePath%>/consignor/edit?id="+data.id;
}
});
});
function edit(){
window.location.href = "<%=basePath%>/consignor/edit";
}
</script>
</body>
</html>
\ No newline at end of file
... ...
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
... ... @@ -13,7 +14,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="<%=basePath%>resource/css/base.css" rel="stylesheet">
<link href="<%=basePath%>resource/css/base.css?ver=1.0" rel="stylesheet">
<link href="<%=basePath%>resource/css/basic_info.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="<%=basePath%>resource/easyui/uimaker/icon.css">
<link rel="stylesheet" href="<%=basePath%>resource/easyui/uimaker/easyui.css">
... ... @@ -21,6 +22,10 @@
<script type="text/javascript" src="<%=basePath%>resource/easyui/jquery.min.js"></script>
<script type="text/javascript" src="<%=basePath%>resource/validate/jquery.validate.js"></script>
<script type="text/javascript" src="<%=basePath%>resource/validate/validate-extends.js"></script>
<link rel="stylesheet" href="<%=basePath%>resource/layui/css/layui.css" media="all">
<script type="text/javascript" src="<%=basePath%>resource/layui/layui.js"></script>
<style type="text/css">
.required_span {
color: red;
... ... @@ -43,15 +48,32 @@
<table class="kv-table">
<tbody>
<tr>
<td class="kv-label" colspan="6"><spring:message code="manifest.bill.number" /></td>
<td style="background-color: #EBEDF4; color: black;" class="kv-label" colspan="6"><spring:message
code="manifest.bill.number" /></td>
</tr>
<tr>
<td class="kv-label"><spring:message code="manifest.bill.number" /><span
class="required_span">*</span></td>
<td class="kv-content" colspan="5"><input required id="waybill" minlength="12"
maxlength="12" type="text" onblur="input_change(this)"> <input required
id="waybillnomaster" minlength="12" maxlength="12" name="waybillnomaster" type="hidden"
<td class="kv-content"><input required id="waybill" minlength="12" maxlength="12"
type="text" onblur="input_change(this)"> <input required id="waybillnomaster"
minlength="12" maxlength="12" name="waybillnomaster" type="hidden"
value="${manifest.waybillnomaster }"></td>
<td class="kv-label"><spring:message code="delivery.delivery.station" /><span
class="required_span">*</span></td>
<td class="kv-content"><select id="delivery_station" name="delivery_station">
<option value="001"
<c:if test = "${manifest.delivery_station ==001 }">selected="selected"</c:if>><spring:message
code="delivery.ground.handling" /></option>
</select></td>
<td class="kv-label"><spring:message code="delivery.delivery.type" /></td>
<td class="kv-content"><select class="delivery" id="de_type" name="de_type">
<option value="001" <c:if test = "${manifest.de_type ==001 }">selected="selected"</c:if>><spring:message
code="manifest.general.delivery" /></option>
<option value="002" <c:if test = "${manifest.de_type ==002 }">selected="selected"</c:if>><spring:message
code="manifest.mail.delivery" /></option>
<option value="003" <c:if test = "${manifest.de_type ==003 }">selected="selected"</c:if>><spring:message
code="manifest.International" /></option>
</select></td>
<script>
function input_change(obj){
var val = $(obj).val();
... ... @@ -73,48 +95,48 @@
}
</script>
</tr>
<tr>
<td class="kv-label"><spring:message code="delivery.name.of.goods" /></td>
<!-- <tr> -->
<%-- <td class="kv-label"><spring:message code="delivery.name.of.goods" /></td>
<td class="kv-content"><input id="name_ofgoods" name="name_ofgoods" type="text"
value="${manifest.name_ofgoods }"></td>
<td class="kv-label"><spring:message code="delivery.delivery.station" /><span
value="${manifest.name_ofgoods }"></td> --%>
<%-- <td class="kv-label"><spring:message code="delivery.delivery.station" /><span
class="required_span">*</span></td>
<td class="kv-content"><select id="delivery_station" name="delivery_station">
<%-- <option value=""><spring:message code="opt.select"/></option> --%>
<option value="001"
<c:if test = "${manifest.delivery_station ==001 }">selected="selected"</c:if>><spring:message
code="delivery.ground.handling" /></option>
</select></td>
<td class="kv-label"><spring:message code="delivery.delivery.type" /></td>
<td class="kv-content"><select class="delivery" id="de_type" name="de_type">
<%-- <option value=""><spring:message code="opt.select"/></option> --%>
<option value="001" <c:if test = "${manifest.de_type ==001 }">selected="selected"</c:if>><spring:message
code="manifest.general.delivery" /></option>
<option value="002" <c:if test = "${manifest.de_type ==002 }">selected="selected"</c:if>><spring:message
code="manifest.mail.delivery" /></option>
<option value="003" <c:if test = "${manifest.de_type ==003 }">selected="selected"</c:if>><spring:message
code="manifest.International" /></option>
</select></td>
</tr>
</select></td> --%>
<!-- </tr> -->
<tr>
<td class="kv-label" colspan="6"><spring:message code="manifest.flight.information" /></td>
<td style="background-color: #EBEDF4; color: black;" class="kv-label" colspan="6"><spring:message
code="manifest.flight.information" /></td>
</tr>
<tr>
<td class="kv-label"><spring:message code="manifest.carrier" /><span
class="required_span">*</span></td>
<td class="kv-content"><input required id="carrier_new" name="carrier" type="text"
value="${manifest.carrier}"
oninput="onInputChange(event,'carrier_new','oninput')"
value="${manifest.carrier}" oninput="onInputChange(event,'carrier_new','oninput')"
onpropertychange="onInputChange(event,'carrier_new','onpropertychange')"></td>
<td class="kv-label"><spring:message code="manifest.flight.number" /><span
class="required_span">*</span></td>
<td class="kv-content"><input required id="flightno" name="flightno" type="text"
value="${manifest.flightno }"></td>
value="${manifest.flightno }" oninput="onInputChange(event,'flightno','oninput')"
onpropertychange="onInputChange(event,'flightno','onpropertychange')"></td>
<td class="kv-label"><spring:message code="manifest.flight.date" /></td>
<td class="kv-content"><input type="text" class="date bill Wdate" id="flightdate"
name="flightdate" required
<td class="kv-label"><spring:message code="manifest.flight.date" /><span
class="required_span">*</span></td>
<td class="kv-content"><input type="text" class="date bill Wdate"
id="flightdate" name="flightdate" required autocomplete="off"
value="<fmt:formatDate pattern='yyyy-MM-dd' value='${manifest.flightdate }'></fmt:formatDate>">
</td>
</tr>
... ... @@ -133,18 +155,19 @@
onpropertychange="onInputChange(event,'destinationstation','onpropertychange')" /></td>
</tr>
<tr>
<td class="kv-label" colspan="6"><spring:message code="manifest.cargo.information" /></td>
<td style="background-color: #EBEDF4; color: black;" class="kv-label" colspan="6"><spring:message
code="manifest.cargo.information" /></td>
</tr>
<tr>
<td class="kv-label"><spring:message code="manifest.number.of.consignment.note" /><span
<td class="kv-label"><spring:message code="manifest.number.of.fittings" /><span
class="required_span">*</span></td>
<td class="kv-content"><input required class="delivery number" id="totalpiece"
name="totalpiece" type="text" value="${manifest.totalpiece}"
oninput="onInputChange(event,'totalpiece','oninput')"
onpropertychange="onInputChange(event,'totalpiece','onpropertychange')"></td>
<td class="kv-label"><spring:message code="manifest.waybill.weight" /><span
<td class="kv-label"><spring:message code="manifest.pre.weight" /><span
class="required_span">*</span></td>
<td class="kv-content"><input required class="delivery number" id="totalweight"
name="totalweight" type="text" value="${manifest.totalweight}"
... ... @@ -171,10 +194,10 @@
<option value="CC" <c:if test = "${manifest.paymode == 'CC' }">selected="selected"</c:if>><spring:message
code="manifest.to.pay" /></option>
</select></td>
<td class="kv-label"><spring:message code="manifest.fitting.time" /><span
<td style="display: none;" class="kv-label"><spring:message code="manifest.fitting.time" /><span
class="required_span">*</span></td>
<td class="kv-content"><input required type="text" class=" bill "
id="stowagedate" name="stowagedate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
<td style="display: none;" class="kv-content"><input required type="text" class=" bill " id="stowagedate"
name="stowagedate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
value="<fmt:formatDate pattern='yyyy-MM-dd HH:mm:ss' value='${manifest.stowagedate }'></fmt:formatDate>">
</td>
<td class="kv-label"><spring:message code="manifest.customs.status" /><span
... ... @@ -205,8 +228,9 @@
name="preparetotalpiece" type="text" value="${manifest.preparetotalpiece}"></td>
<td class="kv-label"><spring:message code="manifest.pre.weight" /><span
class="required_span">*</span></td>
<td class="kv-content" colspan="3"><input required class="delivery number" id="preparetotalweight"
name="preparetotalweight" type="text" value="${manifest.preparetotalweight}"></td>
<td class="kv-content" colspan="3"><input required class="delivery number"
id="preparetotalweight" name="preparetotalweight" type="text"
value="${manifest.preparetotalweight}"></td>
</tr>
<tr>
<td class="kv-label"><spring:message code="manifest.description.of.the.goods" /><span
... ... @@ -214,7 +238,7 @@
<td class="kv-content" colspan="5"><textarea required id="productname"
name="productname" maxlength="200">${manifest.productname}</textarea></td>
</tr>
<tr>
<%-- <tr>
<td class="kv-label"><spring:message code="manifest.agent.name" /></td>
<td class="kv-content"><input id="agentman" name="agentman" type="text"
value="${manifest.agentman}"
... ... @@ -224,12 +248,13 @@
<input id="agentcompany" name="agentcompany" type="text" value="${manifest.agentcompany}"
placeholder="<spring:message code="agent.companyPlaceholder"/>">
</td>
</tr>
</tr> --%>
<!-- 发货人信息 start -->
<tr>
<td class="kv-label" colspan="1"><spring:message code="manifest.shipper.information" />
</td>
<td class="kv-content" colspan="5"><select onchange="changeConsignorSelect()"
<tr style="background-color: #EBEDF4; color: black;">
<td style="background-color: #EBEDF4; color: black;" class="kv-label" colspan="1"><spring:message
code="manifest.shipper.information" /></td>
<!-- <td class="kv-label"> <button type="button" class="layui-btn layui-btn-normal layui-icon layui-icon-user" onclick="showDialog()">弹出选择框</button> </td> -->
<td class="kv-content" colspan="4"><select onchange="changeConsignorSelect()"
id="fh_select">
<option value="-1">请选择</option>
</select> <script>
... ... @@ -242,7 +267,15 @@
{
var consignor = consignorList[index];
$("#co_company").val(consignor.co_company?consignor.co_company:"");
$("#co_address").val(consignor.co_address?consignor.co_address:"");
var address = consignor.co_address;
if(notEmpty(address)){
if(address.length>70){
address = address.substring(0,70);
}
}else{
address = "";
}
$("#co_address").val(address);
$("#co_telephone").val(consignor.co_telephone?consignor.co_telephone:"");
$("#co_country").val(consignor.co_country?consignor.co_country:"");
$("#co_city").val(consignor.co_city?consignor.co_city:"");
... ... @@ -251,7 +284,14 @@
$("#co_fax").val(consignor.co_fax?consignor.co_fax:"");
$("#co_zipcode").val(consignor.co_zipcode?consignor.co_zipcode:"");
$("#shpaeo").val(consignor.shpaeo?consignor.shpaeo:"");
$("#shpcusid").val(consignor.shpcusid?consignor.shpcusid:"");
if(notEmpty(consignor.shpcusid)){
var temp = consignor.shpcusid.split("+")[1];
if(notEmpty(temp)){
$("#shpcusid").val(temp);
}
}
}
}
}
... ... @@ -273,39 +313,37 @@
}
}
});
</script></td>
</script>
</td>
</tr>
<tr>
<td class="kv-label"><spring:message code="manifest.company" /><span
class="required_span">*</span></td>
<td class="kv-content">
<input required id="co_company" name="co_company" type="text" value="${manifest.co_company}"
oninput="onInputChange(event,'co_company','oninput')"
onpropertychange="onInputChange(event,'co_company','onpropertychange')">
</td>
<td class="kv-content"><input required id="co_company" name="co_company" type="text"
value="${manifest.co_company}" oninput="onInputChange(event,'co_company','oninput')"
onpropertychange="onInputChange(event,'co_company','onpropertychange')"></td>
<td class="kv-label"><spring:message code="manifest.address" /><span
class="required_span">*</span></td>
<td class="kv-content"><input required id="co_address" name="co_address" type="text"
value="${manifest.co_address}" maxlength="70"></td>
<td class="kv-label"><spring:message code="manifest.zip.code" /></td>
<td class="kv-content" colspan="5"><input id="co_zipcode" name="co_zipcode" type="text"
value="${manifest.co_zipcode }"></td>
<td class="kv-label"><spring:message code="manifest.country" /><span
class="required_span">*</span></td>
<td class="kv-content"><input required id="co_country" name="co_country" maxlength="2"
type="text" value="${manifest.co_country }"
oninput="onInputChange(event,'co_country','oninput')"
onpropertychange="onInputChange(event,'co_country','onpropertychange')"></td>
</tr>
<tr>
<td class="kv-label"><spring:message code="manifest.city" /></td>
<%-- <td class="kv-label"><spring:message code="manifest.city" /></td>
<td class="kv-content"><input id="co_city" name="co_city" type="text"
value="${manifest.co_city }" oninput="onInputChange(event,'co_city','oninput')"
onpropertychange="onInputChange(event,'co_city','onpropertychange')"></td>
onpropertychange="onInputChange(event,'co_city','onpropertychange')"></td> --%>
<td class="kv-label"><spring:message code="manifest.state" /></td>
<td class="kv-content"><input id="co_deltaname" name="co_deltaname" type="text"
value="${manifest.co_deltaname}"></td>
<td class="kv-label"><spring:message code="manifest.country" /><span
class="required_span">*</span></td>
<td class="kv-content" colspan="5"><input required id="co_country" name="co_country"
type="text" value="${manifest.co_country }"
oninput="onInputChange(event,'co_country','oninput')"
onpropertychange="onInputChange(event,'co_country','onpropertychange')"></td>
<td class="kv-label"><spring:message code="manifest.zip.code" /></td>
<td class="kv-content" colspan="3"><input id="co_zipcode" name="co_zipcode" type="text"
value="${manifest.co_zipcode }"></td>
</tr>
<tr>
<td class="kv-label"><spring:message code="manifest.telephone" /></td>
... ... @@ -316,28 +354,48 @@
<td class="kv-content"><input id="co_fax" name="co_fax" type="text"
value="${manifest.co_fax }"
placeholder="<spring:message code="manifest.fhr.fh_placeholder"/>"></td>
<td style="display: none;" class="kv-label"><spring:message code="manifest.send_name" /><span
class="required_span">*</span></td>
<td style="display: none;" class="kv-content" colspan="5"><input required id="co_name" name="co_name" type="text"
value="${manifest.co_name }"></td>
</tr>
<tr>
<td class="kv-label"><spring:message code="manifest.fhr.shpaeo" /></td>
<td class="kv-content"><input id="shpaeo" name="shpaeo" type="text"
value="${manifest.shpaeo }" oninput="onInputChange(event,'shpaeo','oninput')"
onpropertychange="onInputChange(event,'shpaeo','onpropertychange')"></td>
<td class="kv-label"><spring:message code="manifest.fhr.shpcusid" /><span
</tr>
<tr style="display: none;">
<td style="display: none;" class="kv-label"><spring:message code="manifest.send_name" /><span
class="required_span">*</span></td>
<td class="kv-content" colspan="3"><input required id="shpcusid" name="shpcusid"
type="text" value="${manifest.shpcusid }"
<td style="display: none;" class="kv-content" colspan="5"><input required id="co_name"
name="co_name" type="text" value="${manifest.co_name }"></td>
</tr>
<tr>
<td class="kv-label" colspan="6">
<select id="co_cusid" required>
<c:if test="${not empty manifest.shpcusid}">
<c:set var="tempShpType" value='${fn:split(manifest.shpcusid,"+")[0]}' />
<option value="${tempShpType}">${tempShpType}</option>
</c:if>
<c:if test="${empty manifest.shpcusid}">
<option value=""><spring:message code="manifest.enterprise.code.type" /></option>
</c:if>
</select>
<span style="color: black; font-size: 16px;">+</span>
<input id="shpcusid" type="text" required
<c:if test="${not empty manifest.shpcusid}">
<c:set var="tempShpValue" value='${fn:split(manifest.shpcusid,"+")[1]}' />
value="${tempShpValue}"
</c:if>
placeholder="<spring:message code='manifest.enterprise.code' />"
oninput="onInputChange(event,'shpcusid','oninput')"
onpropertychange="onInputChange(event,'shpcusid','onpropertychange')"></td>
onpropertychange="onInputChange(event,'shpcusid','onpropertychange')">
</td>
</tr>
<!-- 发货人信息 end -->
<!-- 收货人信息 start -->
<tr>
<td class="kv-label" colspan="1"><spring:message code="manifest.consignee" /></td>
<tr style="background-color: #EBEDF4; color: black;">
<td style="background-color: #EBEDF4; color: black;" class="kv-label" colspan="1"><spring:message
code="manifest.consignee" /></td>
<td class="kv-content" colspan="5"><select onchange="changeConsigneeSelect()"
id="consignee_select">
<option value="-1">请选择</option>
... ... @@ -351,9 +409,20 @@
{
var consignee = consigneeList[index];
$("#sh_company").val(consignee.code?consignee.code:"");
$("#sh_address").val(consignee.address?consignee.address:"");
var address = consignee.co_address;
if(notEmpty(address)){
if(address.length>70){
address = address.substring(0,70);
}
}else{
address = "";
}
$("#sh_address").val(address);
$("#sh_telephone").val(consignee.tel?consignee.tel:"");
$("#sh_country").val(consignee.name?consignee.name:"");
$("#sh_name").val(consignee.code?consignee.code:"");
}
}
}
... ... @@ -381,16 +450,18 @@
<td class="kv-label"><spring:message code="manifest.company" /><span
class="required_span">*</span></td>
<td class="kv-content"><input required id="sh_company" name="sh_company" type="text"
value="${manifest.sh_company }"
oninput="onInputChange(event,'sh_company','oninput')"
onpropertychange="onInputChange(event,'sh_company','onpropertychange')"></td>
value="${manifest.sh_company }" oninput="onInputChange(event,'sh_company','oninput')"
onpropertychange="onInputChange(event,'sh_company','onpropertychange')"></td>
<td class="kv-label"><spring:message code="manifest.address" /><span
class="required_span">*</span></td>
<td class="kv-content"><input required id="sh_address" name="sh_address" maxlength="70" type="text"
value="${manifest.sh_address }"></td>
<td class="kv-label"><spring:message code="manifest.zip.code" /></td>
<td class="kv-content" colspan="5"><input id="sh_zipcode" name="sh_zipcode" type="text"
value="${manifest.sh_zipcode }"></td>
<td class="kv-content"><input required id="sh_address" name="sh_address" maxlength="70"
type="text" value="${manifest.sh_address }"></td>
<td class="kv-label"><spring:message code="manifest.country" /><span
class="required_span">*</span></td>
<td class="kv-content"><input required id="sh_country" name="sh_country" maxlength="2"
type="text" value="${manifest.sh_country }"
oninput="onInputChange(event,'sh_country','oninput')"
onpropertychange="onInputChange(event,'sh_country','onpropertychange')"></td>
</tr>
<tr>
<td class="kv-label"><spring:message code="manifest.city" /><span class="required_span">*</span></td>
... ... @@ -400,12 +471,9 @@
<td class="kv-label"><spring:message code="manifest.state" /></td>
<td class="kv-content"><input id="sh_deltaname" name="sh_deltaname" type="text"
value="${manifest.sh_deltaname}"></td>
<td class="kv-label"><spring:message code="manifest.country.code" /><span
class="required_span">*</span></td>
<td class="kv-content" colspan="5"><input required id="sh_country" name="sh_country"
type="text" value="${manifest.sh_country }"
oninput="onInputChange(event,'sh_country','oninput')"
onpropertychange="onInputChange(event,'sh_country','onpropertychange')"></td>
<td class="kv-label"><spring:message code="manifest.zip.code" /></td>
<td class="kv-content"><input id="sh_zipcode" name="sh_zipcode" type="text"
value="${manifest.sh_zipcode }"></td>
</tr>
<tr>
<td class="kv-label"><spring:message code="manifest.telephone" /></td>
... ... @@ -414,12 +482,18 @@
<td class="kv-label"><spring:message code="manifest.fax" /></td>
<td class="kv-content"><input id="sh_fax" name="sh_fax" type="text"
value="${manifest.sh_fax }"></td>
<td class="kv-label"><spring:message code="manifest.shr.cneaeo" /></td>
<td class="kv-content"><input id="cneaeo" name="cneaeo" type="text"
value="${manifest.cneaeo }" oninput="onInputChange(event,'cneaeo','oninput')"
onpropertychange="onInputChange(event,'cneaeo','onpropertychange')"></td>
</tr>
<tr style="display: none;">
<td style="display: none;" class="kv-label"><spring:message code="manifest.receive_name" /><span
class="required_span">*</span></td>
<td style="display: none;" class="kv-content" colspan="5"><input required id="sh_name" name="sh_name"
type="text" value="${manifest.sh_name }"></td>
<td style="display: none;" class="kv-content" colspan="5"><input required id="sh_name"
name="sh_name" type="text" value="${manifest.sh_name }"></td>
</tr>
<tr>
<%-- <tr>
<td class="kv-label"><spring:message code="manifest.province.code" /></td>
<td class="kv-content"><input id="sh_provincecode" name="sh_provincecode" type="text"
value="${manifest.sh_provincecode }"
... ... @@ -428,21 +502,37 @@
<td class="kv-label"><spring:message code="manifest.province.name" /></td>
<td class="kv-content" colspan="3"><input id="sh_provincename" name="sh_provincename" type="text"
value="${manifest.sh_provincename }"></td>
</tr>
</tr> --%>
<tr>
<td class="kv-label"><spring:message code="manifest.shr.cneaeo" /></td>
<td class="kv-content"><input id="cneaeo" name="cneaeo" type="text"
value="${manifest.cneaeo }" oninput="onInputChange(event,'cneaeo','oninput')"
onpropertychange="onInputChange(event,'cneaeo','onpropertychange')"></td>
<td class="kv-label"><spring:message code="manifest.shr.cnecusid" /></td>
<td class="kv-content"><input id="cnecusid" name="cnecusid" type="text"
value="${manifest.cnecusid }" oninput="onInputChange(event,'cnecusid','oninput')"
<td class="kv-label" colspan="6">
<select id="sh_cusid" required>
<c:if test="${not empty manifest.cnecusid}">
<c:set var="tempCneType" value='${fn:split(manifest.cnecusid,"+")[0]}' />
<option value="${tempCneType}">${tempCneType}</option>
</c:if>
<c:if test="${empty manifest.cnecusid}">
<option value=""><spring:message code="manifest.enterprise.code.type" /></option>
</c:if>
</select>
<span style="color: black; font-size: 16px;">+</span>
<input id="cnecusid" type="text" required
<c:if test="${not empty manifest.cnecusid}">
<c:set var="tempCneValue" value='${fn:split(manifest.cnecusid,"+")[1]}' />
value="${tempCneValue }"
</c:if>
placeholder="<spring:message code='manifest.enterprise.code' />"
oninput="onInputChange(event,'cnecusid','oninput')"
onpropertychange="onInputChange(event,'cnecusid','onpropertychange')"></td>
<td style="display: none;" class="kv-label"><spring:message code="manifest.shr.unlodingcode" /><span
class="required_span">*</span></td>
<td style="display: none;" class="kv-content"><input required id="unlodingcode" name="unlodingcode"
type="text" value="${manifest.unlodingcode }"
</tr>
<tr style="display: none;">
<td style="display: none;" class="kv-label"><spring:message
code="manifest.shr.unlodingcode" /><span class="required_span">*</span></td>
<td style="display: none;" class="kv-content"><input required id="unlodingcode"
name="unlodingcode" type="text" value="${manifest.unlodingcode }"
oninput="onInputChange(event,'unlodingcode','oninput')"
onpropertychange="onInputChange(event,'unlodingcode','onpropertychange')"></td>
</tr>
... ... @@ -450,7 +540,7 @@
<!-- 危险品信息 start -->
<tr>
<td class="kv-label" colspan="6"><spring:message
<td style="background-color: #EBEDF4; color: black;" class="kv-label" colspan="6"><spring:message
code="manifest.dangerous.goods.information" /></td>
</tr>
<tr>
... ... @@ -469,7 +559,8 @@
<!-- 承运到达信息 start -->
<tr>
<td class="kv-label" colspan="6"><spring:message code="manifest.carriage.arrival" /></td>
<td style="background-color: #EBEDF4; color: black;" class="kv-label" colspan="6"><spring:message
code="manifest.carriage.arrival" /></td>
</tr>
<tr>
<td class="kv-label"><spring:message code="manifest.carrier" /><span
... ... @@ -514,7 +605,8 @@
<!-- 交运信息 start -->
<tr>
<td class="kv-label" colspan="6"><spring:message code="menu.delivery" /></td>
<td style="background-color: #EBEDF4; color: black;" class="kv-label" colspan="6"><spring:message
code="menu.delivery" /></td>
</tr>
<tr>
<td class="kv-label"><spring:message code="manifest.transfer.station" /></td>
... ... @@ -594,7 +686,7 @@
<script type="text/javascript" src="<%=basePath%>resource/layer-v3.0.3/layer/layer.js"></script>
<script type="text/javascript" src="<%=basePath%>resource/My97DatePicker/WdatePicker.js"></script>
<script src="<%=basePath%>resource/easyui/jquery.easyui.min.js"></script>
<script src="<%=basePath%>/resource/js/tools.js?version=0.8"></script>
<script src="<%=basePath%>/resource/js/tools.js?version=1.2"></script>
<!--弹出层引入的JS-->
<script type="text/javascript">
$(function(){
... ... @@ -689,6 +781,25 @@ $(function(){
function submit(){
var id3 = $("#waybillnomaster").val($("#waybill").val());
var data = $("#form").serialize();
var shp_cusid_type = getSelectedValue("co_cusid");
var sh_cusid = $("#shpcusid").val();
if(notEmpty(shp_cusid_type)&&notEmpty(sh_cusid)){
shpcusid = shp_cusid_type+"+"+sh_cusid;
data+="&shpcusid="+encodeURIComponent(shpcusid);
}
var cne_cusid_type = getSelectedValue("sh_cusid");
var cne_cusid = $("#cnecusid").val();
if(notEmpty(cne_cusid_type)&&notEmpty(cne_cusid)){
cnecusid = cne_cusid_type+"+"+cne_cusid;
data+="&cnecusid="+encodeURIComponent(cnecusid);
}
console.log("form-->"+data);
$.post("<%=basePath%>manifest/save",data,function (data) {
if (data.status == 200) {
// layer.confirm("<spring:message code="opt.savesuccess"/>", {btn: ['<spring:message code="opt.confirm"/>', '<spring:message code="opt.cancel"/>']}, function () {
... ... @@ -719,21 +830,38 @@ $(function(){
//发送报文并且保存
function savesend(){
var id3 = $("#waybillnomaster").val($("#waybill").val());
var data = $("#form").serialize();
$.post("<%=basePath%>manifest/savesend",data,function (data) {
if (data.status == 200) {
// layer.confirm("<spring:message code="opt.savesuccess"/>", {btn: ['<spring:message code="opt.confirm"/>', '<spring:message code="opt.cancel"/>']}, function () {
<%-- window.location.href = "<%=basePath %>manifest/list" ; --%>
$("#xmlContent").val(data.data);
$("#DialogShunt").window('open');
window.location.href = "<%=basePath%>manifest/list";
// })
} else {
//layer.open({content: "<spring:message code="opt.savefailed"/>"});
layer.open({content:data.msg});
}
})
var isValid = $("#form").valid();
if(isValid){
var id3 = $("#waybillnomaster").val($("#waybill").val());
var data = $("#form").serialize();
var shp_cusid_type = getSelectedValue("co_cusid");
var sh_cusid = $("#shpcusid").val();
if(notEmpty(shp_cusid_type)&&notEmpty(sh_cusid)){
shpcusid = shp_cusid_type+"+"+sh_cusid;
data+="&shpcusid="+encodeURIComponent(shpcusid);
}
var cne_cusid_type = getSelectedValue("sh_cusid");
var cne_cusid = $("#cnecusid").val();
if(notEmpty(cne_cusid_type)&&notEmpty(cne_cusid)){
cnecusid = cne_cusid_type+"+"+cne_cusid;
data+="&cnecusid="+encodeURIComponent(cnecusid);
}
console.log("form-->"+data);
$.post("<%=basePath%>manifest/savesend",data,function (data) {
if (data.status == 200) {
$("#xmlContent").val(data.data);
$("#DialogShunt").window('open');
window.location.href = "<%=basePath%>manifest/list";
} else {
layer.open({content:data.msg});
}
})
}
}
//发送交运报文
function sendDelivery(){
... ... @@ -775,6 +903,141 @@ $(function(){
// }
// })
// }
var api = "<%=basePath %>enterprise/search";
$('#co_country').combogrid({
panelWidth:212,
url: api,
idField:'country_code',
textField:'start',
mode:'remote',
fitColumns:true,
onBeforeLoad: function (parm) { //在请求加载数据之前触发,返回 false 则取消加载动作
var value = $('#co_country').combobox('getValue');
if (value) {
var upper = value.toUpperCase();
$('#co_country').combogrid('setValue',upper);
parm.start = upper;
onGetData('co_cusid','co_country');
return true;
}
return false;
},
onSelect: function(row,rowData){
//当用户选择一个列表项时触发。
$('#co_country').combogrid('setValue',rowData.country_code);
onGetData('co_cusid','co_country');
},
columns:[[
{field:'name_cn',title:'名称',width:106},
{field:'country_code',title:'代码',width:106}
]]
});
$('#sh_country').combogrid({
panelWidth:220,
url: api,
idField:'country_code',
textField:'start',
mode:'remote',
fitColumns:true,
onBeforeLoad: function (parm) { //在请求加载数据之前触发,返回 false 则取消加载动作
var value = $('#sh_country').combobox('getValue');
if (value) {
var upper = value.toUpperCase();
$('#sh_country').combogrid('setValue',upper);
parm.start = upper;
onGetData('sh_cusid','sh_country')
return true;
}
return false;
},
onSelect: function(row,rowData){
//当用户选择一个列表项时触发。
$('#sh_country').val(rowData.country_code);
onGetData('sh_cusid','sh_country')
},
columns:[[
{field:'name_cn',title:'名称',width:106},
{field:'country_code',title:'代码',width:106}
]]
});
function onGetData(selectId,inputId) {
console.log("onGetData()");
var cneType = "";
var shpType = "";
if(selectId=="co_cusid"){
//发货的
var shp_cusid = "${manifest.shpcusid}";
if(notEmpty(shp_cusid)){
shpType = shp_cusid.split("+")[0];
}
}
if(selectId=="sh_cusid"){
//收货的
var cnecusid = "${manifest.cnecusid}";
if(notEmpty(cnecusid)){
cneType = cnecusid.split("+")[0];
}
}
var select = $("#"+selectId);
select.html("");
select.append("<option value=''><spring:message code='manifest.enterprise.code.type' /></option>");
var countryCode = $('#'+inputId).combobox('getValue');
$.ajax({
url:"<%=basePath%>/enterprise/list?countryCode="+countryCode,
success:function(data){
if(data.status == 200){
if(data.data){
for(var i = 0; i < data.data.length; i++){
var type = data.data[i].enterprise_type;
if(selectId=="co_cusid"){
if(notEmpty(shpType)&&type&&(type==shpType)){
select.append("<option selected value='"+type+"'>"+type+"</option>");
}else{
select.append("<option value='"+type+"'>"+type+"</option>");
}
}else if(selectId=="sh_cusid"){
if(notEmpty(cneType)&&type&&(type==cneType)){
select.append("<option selected value='"+type+"'>"+type+"</option>");
}else{
select.append("<option value='"+type+"'>"+type+"</option>");
}
}else{
select.append("<option value='"+type+"'>"+type+"</option>");
}
}
}
}
}
});
}
function showDialog() {
layui.use('layer', function(){
var layer = layui.layer;
var viewUrl="<%=basePath%>consignor/list";
parent.layer.open({
type: 2,
title: '',
shadeClose: true,
shade: 0.8,
area: ['50%', '90%'],
content: viewUrl
});
});
}
</script>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -31,17 +31,17 @@
<thead>
<tr>
<!-- <th field="id" checkbox="true"></th> -->
<th field="." formatter="editFormat" width="120"><spring:message code="opt.edit" /></th>
<th field="waybillnomaster" sortable="true" width="110"><spring:message code="manifest.bill.number"/></th>
<th field="flightno" width="120"><spring:message code="manifest.flight.number"/></th>
<th field="originatingstation" width="112"><spring:message code="manifest.starting.point"/></th>
<th field="destinationstation" width="112"><spring:message code="manifest.destination"/></th>
<th field="totalpiece" width="50"><spring:message code="manifest.number.of.consignment.note"/></th>
<th field="totalweight" width="50"><spring:message code="manifest.waybill.weight"/></th>
<th field="preparetotalweight" width="50"><spring:message code="manifest.pre.weight"/></th>
<th field="preparetotalpiece" width="50"><spring:message code="manifest.number.of.fittings"/></th>
<th field="response_text" widht="50"><spring:message code="manifest.response_text" /></th>
<th field=".." width="50" formatter="operatorFormat"><spring:message code="opt.operator" /></th>
<th field="." formatter="editFormat" width="40"><spring:message code="opt.edit" /></th>
<th field="waybillnomaster" sortable="true" width="30"><spring:message code="manifest.bill.number"/></th>
<th field="customscode" width="15"><spring:message code="manifest.customs"/></th>
<th field="flightno" width="20"><spring:message code="manifest.flight.number"/></th>
<th field="originatingstation" width="20"><spring:message code="manifest.starting.point"/></th>
<th field="destinationstation" width="20"><spring:message code="manifest.destination"/></th>
<%-- <th field="totalpiece" width="50"><spring:message code="manifest.number.of.consignment.note"/></th>--%>
<th field="preparetotalweight" width="20"><spring:message code="manifest.pre.weight"/></th>
<th field="preparetotalpiece" width="20"><spring:message code="manifest.number.of.fittings"/></th>
<th field="response_text" widht="260"><spring:message code="manifest.response_text" /></th>
<th field=".." width="20" formatter="operatorFormat"><spring:message code="opt.operator" /></th>
<%-- <th field="flightdate" width="130"><spring:message code="manifest.flight.date"/></th> --%>
</tr>
</thead>
... ... @@ -113,17 +113,16 @@
loadMsg:'正在加载中……',
height:'auto',
columns:[[
{field:'.',title:'<spring:message code="opt.name"/>',formatter:editHbillFormat,width:80},
{field:'waybillnosecondary',title:'<spring:message code="manifest.odd.number"/>',width:100},
{field:'originatingstation',title:'<spring:message code="manifest.starting.point"/>',width:100},
{field:'destinationstation',title:'<spring:message code="manifest.destination"/>',width:100},
{field:'totalpiece',title:'<spring:message code="manifest.number.of.consignment.note"/>',width:100},
{field:'totalweight',title:'<spring:message code="manifest.waybill.weight"/>',width:100},
{field:'prepareweight',title:'<spring:message code="manifest.pre.weight"/>',width:100},
{field:'preparepiece',title:'<spring:message code="manifest.number.of.fittings"/>',width:100},
{field:'response_text',title:'<spring:message code="manifest.response_text"/>', width:100},
{field:'..', title:'<spring:message code="opt.operator" />', formatter:preoperatorFormat, width:100}
{field:'.',title:'<spring:message code="opt.name"/>',formatter:editHbillFormat,width:30},
{field:'waybillnosecondary',title:'<spring:message code="manifest.odd.number"/>',width:40},
{field:'originatingstation',title:'<spring:message code="manifest.starting.point"/>',width:40},
{field:'destinationstation',title:'<spring:message code="manifest.destination"/>',width:40},
/* {field:'totalpiece',title:'<spring:message code="manifest.number.of.consignment.note"/>',width:60},
{field:'totalweight',title:'<spring:message code="manifest.waybill.weight"/>',width:60}, */
{field:'prepareweight',title:'<spring:message code="manifest.pre.weight"/>',width:30},
{field:'preparepiece',title:'<spring:message code="manifest.number.of.fittings"/>',width:30},
{field:'response_text',title:'<spring:message code="manifest.response_text"/>', width:160},
{field:'..', title:'<spring:message code="opt.operator" />', formatter:preoperatorFormat, width:40}
]],
onResize:function(){
$('#dg').datagrid('fixDetailRowHeight',index);
... ...
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
... ... @@ -12,7 +13,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="<%=basePath%>resource/css/base.css" rel="stylesheet">
<link href="<%=basePath%>resource/css/base.css?ver=1.0" rel="stylesheet">
<link href="<%=basePath%>resource/css/basic_info.css" rel="stylesheet">
<link rel="stylesheet" href="<%=basePath%>resource/easyui/uimaker/easyui.css">
<link href="<%=basePath%>resource/css/form.css" rel="stylesheet">
... ... @@ -20,7 +21,6 @@
<script type="text/javascript" src="<%=basePath%>resource/validate/jquery.validate.js"></script>
<script type="text/javascript" src="<%=basePath%>resource/validate/validate-extends.js"></script>
<link rel="stylesheet" href="<%=basePath%>resource/css/form.css">
<script type="text/javascript" src="<%=basePath%>resource/js/tools.js"></script>
<style type="text/css">
.required_span {
color: red;
... ... @@ -39,7 +39,8 @@
<table class="kv-table">
<tbody>
<tr>
<td class="kv-label" colspan="6"><spring:message code="manifest.bill.number" /></td>
<td style="background-color: #EBEDF4; color: black;" class="kv-label" colspan="6"><spring:message
code="manifest.bill.number" /></td>
<input type="hidden" id="id" name="id" value="${pre.id }">
<input type="hidden" id="isdelete" name="isdelete" value="${pre.isdelete }">
<input type="hidden" id="de_ids" name="de_ids" value="${pre.de_ids }">
... ... @@ -56,18 +57,18 @@
<td class="kv-label"><spring:message code="manifest.odd.number" /><span
class="required_span">*</span></td>
<td class="kv-content" colspan="3"><input required id="ways" name="ways" type="text"
minlength="11" maxlength="11"> <input required id="waybillnosecondary"
maxlength="35"> <input required id="waybillnosecondary"
name="waybillnosecondary" type="hidden" value="${pre.waybillnosecondary }"></td>
</tr>
<tr>
<td class="kv-label"><spring:message code="delivery.name.of.goods" /><span
<%-- <td class="kv-label"><spring:message code="delivery.name.of.goods" /><span
class="required_span">*</span></td>
<td class="kv-content"><input required id="name_ofgoods" name="name_ofgoods" type="text"
value="${pre.name_ofgoods }"></td>
value="${pre.name_ofgoods }"></td> --%>
<td class="kv-label"><spring:message code="delivery.delivery.station" /><span
class="required_span">*</span></td>
<td class="kv-content"><select required id="delivery_station" name="delivery_station">
<%-- <option value=""><spring:message code="opt.select"/></option> --%>
<option value=""><spring:message code="opt.select" /></option>
<option value="001"
<c:if test = "${pre.delivery_station ==001 }">selected="selected"</c:if>><spring:message
code="delivery.ground.handling" /></option>
... ... @@ -87,7 +88,8 @@
<!-- 航班信息 start -->
<tr>
<td class="kv-label" colspan="6"><spring:message code="manifest.flight.information" /></td>
<td style="background-color: #EBEDF4; color: black;" class="kv-label" colspan="6"><spring:message
code="manifest.flight.information" /></td>
</tr>
<tr>
<td class="kv-label"><spring:message code="manifest.carrier" /><span
... ... @@ -99,10 +101,12 @@
<td class="kv-label"><spring:message code="manifest.flight.number" /><span
class="required_span">*</span></td>
<td class="kv-content"><input required id="flightno" name="flightno" type="text"
value="${pre.flightno }"></td>
<td class="kv-label"><spring:message code="manifest.flight.date" /></td>
value="${pre.flightno }" oninput="onInputChange(event,'flightno','oninput')"
onpropertychange="onInputChange(event,'flightno','onpropertychange')"></td>
<td class="kv-label"><spring:message code="manifest.flight.date" /><span
class="required_span">*</span></td>
<td class="kv-content" colspan="3"><input type="text" class="date bill Wdate"
id="flightdate" name="flightdate"
id="flightdate" name="flightdate" required autocomplete="off"
value="<fmt:formatDate pattern='yyyy-MM-dd' value='${pre.flightdate }'></fmt:formatDate>">
</td>
</tr>
... ... @@ -124,60 +128,56 @@
<!-- 货物信息 start -->
<tr>
<td class="kv-label" colspan="6"><spring:message code="manifest.cargo.information" /></td>
<td style="background-color: #EBEDF4; color: black;" class="kv-label" colspan="6"><spring:message
code="manifest.cargo.information" /></td>
</tr>
<tr>
<td class="kv-label"><spring:message code="manifest.number.of.consignment.note" /><span
<td class="kv-label"><spring:message code="manifest.number.of.fittings" /><span
class="required_span">*</span></td>
<td class="kv-content">
<input required class="delivery number" id="totalpiece"
<td class="kv-content"><input required class="delivery number" id="totalpiece"
name="totalpiece" type="text" value="${pre.totalpiece}"
onkeyup="value=value.replace(/[^\d]/g,'') " ng-pattern="/[^a-zA-Z]/"
oninput="onInputChange(event,'totalpiece','oninput')"
onpropertychange="onInputChange(event,'totalpiece','onpropertychange')">
<input id="pie" disabled="disabled"></td>
<td class="kv-label"><spring:message code="manifest.waybill.weight" /><span
onpropertychange="onInputChange(event,'totalpiece','onpropertychange')"> <input
id="pie" disabled="disabled"></td>
<td class="kv-label"><spring:message code="manifest.pre.weight" /><span
class="required_span">*</span></td>
<td class="kv-content">
<input required class="delivery number" id="totalweight"
<td class="kv-content"><input required class="delivery number" id="totalweight"
name="totalweight" type="text" value="${pre.totalweight}"
onkeyup="value=value.replace(/[^\d]/g,'') " ng-pattern="/[^a-zA-Z]/"
oninput="onInputChange(event,'totalweight','oninput')"
onpropertychange="onInputChange(event,'totalweight','onpropertychange')">
<input id="wei" disabled="disabled">
</td>
onpropertychange="onInputChange(event,'totalweight','onpropertychange')"> <input
id="wei" disabled="disabled"></td>
<td class="kv-label"><spring:message code="manifest.customs" /><span
class="required_span">*</span></td>
<td class="kv-content" colspan="3">
<select required id="customscode" name="customscode">
<td class="kv-content" colspan="3"><select required id="customscode" name="customscode">
<option value=""><spring:message code="opt.select" /></option>
<c:forEach items="${CusToms}" var="customsCode">
<option value="${customsCode}"
<c:if test="${pre.customscode==customsCode}" >selected="selected" </c:if>>${customsCode}
</option>
</c:forEach>
</select>
</td>
</select></td>
</tr>
<tr>
<td class="kv-label"><spring:message code="manifest.payment.method" /><span
class="required_span">*</span></td>
<td class="kv-content"><select required id="paymode" name="paymode">
<option value="001" <c:if test = "${pre.paymode ==001 }">selected="selected "</c:if>><spring:message
<option value="PP" <c:if test = "${pre.paymode =='PP' }">selected="selected "</c:if>><spring:message
code="manifest.prepaid" /></option>
<option value="002" <c:if test = "${pre.paymode ==002 }">selected="selected "</c:if>><spring:message
<option value="CC" <c:if test = "${pre.paymode =='CC' }">selected="selected "</c:if>><spring:message
code="manifest.to.pay" /></option>
</select></td>
<td class="kv-label"><spring:message code="manifest.fitting.time" /></td>
<td class="kv-content"><input type="text" class="date bill" id="stowagedate"
name="stowagedate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
autocomplete="off" name="stowagedate"
onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
value="<fmt:formatDate pattern='yyyy-MM-dd HH:mm:ss' value='${pre.stowagedate }'></fmt:formatDate>">
</td>
<td class="kv-label"><spring:message code="manifest.customs.status" /><span
class="required_span">*</span></td>
<td class="kv-content">
<select required id="customsstatus" name="customsstatus">
<td class="kv-content"><select required id="customsstatus" name="customsstatus">
<option value="001" <c:if test = "${pre.customsstatus ==001 }">selected="selected"</c:if>><spring:message
code="manifest.import.and" /></option>
<option value="002" <c:if test = "${pre.customsstatus ==002 }">selected="selected"</c:if>><spring:message
... ... @@ -186,8 +186,7 @@
code="manifest.frontier.goods" /></option>
<option value="004" <c:if test = "${pre.customsstatus ==004 }">selected="selected"</c:if>><spring:message
code="manifest.temporary.container" /></option>
</select>
</td>
</select></td>
</tr>
<tr style="display: none;">
<td class="kv-label"><spring:message code="manifest.number.of.fittings" /><span
... ... @@ -204,11 +203,12 @@
id="towei" disabled="disabled"></td>
</tr>
<tr>
<td class="kv-label"><spring:message code="manifest.description.of.the.goods" /></td>
<td class="kv-content" colspan="5"><textarea id="productname" name="productname"
maxlength="200">${pre.productname}</textarea></td>
<td class="kv-label"><spring:message code="manifest.description.of.the.goods" /><span
class="required_span">*</span></td>
<td class="kv-content" colspan="5"><textarea required id="productname"
name="productname" maxlength="200">${pre.productname}</textarea></td>
</tr>
<tr>
<%-- <tr>
<td class="kv-label"><spring:message code="manifest.agent.name" /></td>
<td class="kv-content"><input id="agentman" name="agentman" type="text"
value="${agent.threeCode}" placeholder="<spring:message code="agent.namePlaceholder"/>"></td>
... ... @@ -216,12 +216,13 @@
<td class="kv-content" colspan="3"><input id="agentcompany" name="agentcompany"
style="width: 400px;" type="text" value="${agent.nameCn }"
placeholder="<spring:message code="agent.companyPlaceholder"/>"></td>
</tr>
</tr> --%>
<!-- 货物信息 end -->
<!-- 发货信息 start -->
<tr>
<td class="kv-label"><spring:message code="manifest.shipper.information" /></td>
<tr style="background-color: #EBEDF4; color: black;">
<td style="background-color: #EBEDF4; color: black;" class="kv-label"><spring:message
code="manifest.shipper.information" /></td>
<td class="kv-content" colspan="5"><select onchange="changeConsignorSelect()"
id="fh_select">
<option value="-1">请选择</option>
... ... @@ -244,7 +245,13 @@
$("#co_fax").val(consignor.co_fax?consignor.co_fax:"");
$("#co_zipcode").val(consignor.co_zipcode?consignor.co_zipcode:"");
$("#shpaeo").val(consignor.shpaeo?consignor.shpaeo:"");
$("#shpcusid").val(consignor.shpcusid?consignor.shpcusid:"");
if(notEmpty(consignor.shpcusid)){
var temp = consignor.shpcusid.split("+")[1];
if(notEmpty(temp)){
$("#shpcusid").val(temp);
}
}
}
}
}
... ... @@ -272,33 +279,31 @@
<tr>
<td class="kv-label"><spring:message code="manifest.company" /><span
class="required_span">*</span></td>
<td class="kv-content">
<input required id="co_company" name="co_company" type="text" value="${pre.co_company}"
oninput="onInputChange(event,'co_company','oninput')"
onpropertychange="onInputChange(event,'co_company','onpropertychange')">
</td>
<td class="kv-content"><input required id="co_company" name="co_company" type="text"
value="${pre.co_company}" oninput="onInputChange(event,'co_company','oninput')"
onpropertychange="onInputChange(event,'co_company','onpropertychange')"></td>
<td class="kv-label"><spring:message code="manifest.address" /><span
class="required_span">*</span></td>
<td class="kv-content"><input required id="co_address" name="co_address" type="text"
value="${pre.co_address}" maxlength="70"></td>
<td class="kv-label"><spring:message code="manifest.zip.code" /></td>
<td class="kv-content" colspan="5"><input id="co_zipcode" name="co_zipcode" type="text"
value="${pre.co_zipcode }"></td>
<td class="kv-label"><spring:message code="manifest.country" /><span
class="required_span">*</span></td>
<td class="kv-content"><input required id="co_country" name="co_country" maxlength="2"
type="text" value="${pre.co_country }"
oninput="onInputChange(event,'co_country','oninput')"
onpropertychange="onInputChange(event,'co_country','onpropertychange')"></td>
</tr>
<tr>
<td class="kv-label"><spring:message code="manifest.city" /><span class="required_span">*</span></td>
<%-- <td class="kv-label"><spring:message code="manifest.city" /><span class="required_span">*</span></td>
<td class="kv-content"><input required id="co_city" name="co_city" type="text"
value="${pre.co_city }" oninput="onInputChange(event,'co_city','oninput')"
onpropertychange="onInputChange(event,'co_city','onpropertychange')"></td>
onpropertychange="onInputChange(event,'co_city','onpropertychange')"></td> --%>
<td class="kv-label"><spring:message code="manifest.state" /></td>
<td class="kv-content"><input id="co_deltaname" name="co_deltaname" type="text"
value="${pre.co_deltaname }"></td>
<td class="kv-label"><spring:message code="manifest.country" /><span
class="required_span">*</span></td>
<td class="kv-content" colspan="5"><input required id="co_country" name="co_country"
type="text" value="${pre.co_country }"
oninput="onInputChange(event,'co_country','oninput')"
onpropertychange="onInputChange(event,'co_country','onpropertychange')"></td>
<td class="kv-label"><spring:message code="manifest.zip.code" /></td>
<td class="kv-content" colspan="3"><input id="co_zipcode" name="co_zipcode" type="text"
value="${pre.co_zipcode }"></td>
</tr>
<tr>
<td class="kv-label"><spring:message code="manifest.telephone" /></td>
... ... @@ -310,25 +315,42 @@
value="${pre.co_fax }" placeholder="<spring:message code="manifest.fhr.fh_placeholder"/>"></td>
<td style="display: none;" class="kv-label"><spring:message code="manifest.name" /><span
class="required_span">*</span></td>
<td style="display: none;" class="kv-content" colspan="5"><input required id="co_name" name="co_name" type="text"
value="${pre.co_name }"></td>
</tr>
<tr>
<td style="display: none;" class="kv-content" colspan="5"><input required id="co_name"
name="co_name" type="text" value="${pre.co_name }"></td>
<td class="kv-label"><spring:message code="manifest.fhr.shpaeo" /></td>
<td class="kv-content"><input id="shpaeo" name="shpaeo" type="text"
value="${pre.shpaeo }" oninput="onInputChange(event,'shpaeo','oninput')"
onpropertychange="onInputChange(event,'shpaeo','onpropertychange')"></td>
<td class="kv-label"><spring:message code="manifest.fhr.shpcusid" /><span
class="required_span">*</span></td>
<td class="kv-content" colspan="3"><input required id="shpcusid" name="shpcusid"
</tr>
<tr>
<%-- <td class="kv-label"><spring:message code="manifest.fhr.shpcusid" /></td>
<td class="kv-content" colspan="3"><input id="shpcusid" name="shpcusid"
type="text" value="${pre.shpcusid }" oninput="onInputChange(event,'shpcusid','oninput')"
onpropertychange="onInputChange(event,'shpcusid','onpropertychange')"></td> --%>
<td class="kv-label" colspan="6"><select id="co_cusid" required>
<c:if test="${not empty pre.shpcusid}">
<c:set var="tempShpType" value='${fn:split(pre.shpcusid,"+")[0]}' />
<option value="${tempShpType}">${tempShpType}</option>
</c:if>
<c:if test="${empty pre.shpcusid}">
<option value=""><spring:message code="manifest.enterprise.code.type" /></option>
</c:if>
</select> <span style="color: black; font-size: 16px;">+</span> <input required id="shpcusid" type="text"
<c:if test="${not empty pre.shpcusid}">
<c:set var="tempShpValue" value='${fn:split(pre.shpcusid,"+")[1]}' />
value="${tempShpValue}"
</c:if>
placeholder="<spring:message code='manifest.enterprise.code' />"
oninput="onInputChange(event,'shpcusid','oninput')"
onpropertychange="onInputChange(event,'shpcusid','onpropertychange')"></td>
</tr>
<!-- 发货信息 end -->
<!-- 收货信息 start -->
<tr>
<td class="kv-label" colspan="1"><spring:message code="manifest.consignee" /></td>
<tr style="background-color: #EBEDF4; color: black;">
<td style="background-color: #EBEDF4; color: black;" class="kv-label" colspan="1"><spring:message
code="manifest.consignee" /></td>
<td class="kv-content" colspan="5"><select onchange="changeConsigneeSelect()"
id="consignee_select">
<option value="-1">请选择</option>
... ... @@ -345,6 +367,7 @@
$("#sh_address").val(consignee.address?consignee.address:"");
$("#sh_telephone").val(consignee.tel?consignee.tel:"");
$("#sh_country").val(consignee.name?consignee.name:"");
$("#sh_name").val(consignee.code?consignee.code:"");
}
}
}
... ... @@ -372,15 +395,14 @@
<td class="kv-label"><spring:message code="manifest.company" /><span
class="required_span">*</span></td>
<td class="kv-content"><input required id="sh_company" name="sh_company" type="text"
value="${pre.sh_company }"
oninput="onInputChange(event,'sh_company','oninput')"
value="${pre.sh_company }" oninput="onInputChange(event,'sh_company','oninput')"
onpropertychange="onInputChange(event,'sh_company','onpropertychange')"></td>
<td class="kv-label"><spring:message code="manifest.address" /><span
class="required_span">*</span></td>
<td class="kv-content"><input required id="sh_address" name="sh_address" type="text"
value="${pre.sh_address }" maxlength="70"></td>
<td class="kv-label"><spring:message code="manifest.zip.code" /></td>
<td class="kv-content" colspan="5"><input id="sh_zipcode" name="sh_zipcode" type="text"
<td class="kv-content"><input id="sh_zipcode" name="sh_zipcode" type="text"
value="${pre.sh_zipcode }"></td>
</tr>
<tr>
... ... @@ -393,7 +415,7 @@
value="${pre.sh_deltaname}"></td>
<td class="kv-label"><spring:message code="manifest.country" /><span
class="required_span">*</span></td>
<td class="kv-content" colspan="5"><input required id="sh_country" name="sh_country"
<td class="kv-content"><input required id="sh_country" name="sh_country" maxlength="2"
type="text" value="${pre.sh_country }"
oninput="onInputChange(event,'sh_country','oninput')"
onpropertychange="onInputChange(event,'sh_country','onpropertychange')"></td>
... ... @@ -406,10 +428,14 @@
<td class="kv-content"><input id="sh_fax" name="sh_fax" type="text"
value="${pre.sh_fax }"></td>
<td style="display: none;" class="kv-label"><spring:message code="manifest.name" /></td>
<td style="display: none;" class="kv-content" colspan="5"><input id="sh_name" name="sh_name" type="text"
value="${pre.sh_name }"></td>
<td style="display: none;" class="kv-content" colspan="5"><input id="sh_name"
name="sh_name" type="text" value="${pre.sh_name }"></td>
<td class="kv-label"><spring:message code="manifest.shr.cneaeo" /></td>
<td class="kv-content"><input id="cneaeo" name="cneaeo" type="text"
value="${pre.cneaeo }" oninput="onInputChange(event,'cneaeo','oninput')"
onpropertychange="onInputChange(event,'cneaeo','onpropertychange')"></td>
</tr>
<tr>
<%-- <tr>
<td class="kv-label"><spring:message code="manifest.province.code" /></td>
<td class="kv-content"><input id="sh_provincecode" name="sh_provincecode" type="text"
value="${pre.sh_provincecode }" oninput="onInputChange(event,'sh_provincecode','oninput')"
... ... @@ -417,27 +443,44 @@
<td class="kv-label"><spring:message code="manifest.province.name" /></td>
<td class="kv-content" colspan="3"><input id="sh_provincename" name="sh_provincename"
type="text" value="${pre.sh_provincename }"></td>
</tr>
</tr> --%>
<tr>
<td class="kv-label"><spring:message code="manifest.shr.cneaeo" /></td>
<td class="kv-content"><input id="cneaeo" name="cneaeo" type="text"
value="${pre.cneaeo }" oninput="onInputChange(event,'cneaeo','oninput')"
onpropertychange="onInputChange(event,'cneaeo','onpropertychange')"></td>
<td class="kv-label"><spring:message code="manifest.shr.cnecusid" /></td>
<%-- <td class="kv-label"><spring:message code="manifest.shr.cnecusid" /></td>
<td class="kv-content"><input id="cnecusid" name="cnecusid" type="text"
value="${pre.cnecusid }" oninput="onInputChange(event,'cnecusid','oninput')"
onpropertychange="onInputChange(event,'cnecusid','onpropertychange')"></td> --%>
<td class="kv-label" colspan="6"><select id="sh_cusid" required>
<c:if test="${not empty pre.cnecusid}">
<c:set var="tempCneType" value='${fn:split(pre.cnecusid,"+")[0]}' />
<option value="${tempCneType}">${tempCneType}</option>
</c:if>
<c:if test="${empty pre.cnecusid}">
<option value=""><spring:message code="manifest.enterprise.code.type" /></option>
</c:if>
</select> <span style="color: black; font-size: 16px;">+</span> <input required id="cnecusid" type="text"
<c:if test="${not empty pre.cnecusid}">
<c:set var="tempCneValue" value='${fn:split(pre.cnecusid,"+")[1]}' />
value="${tempCneValue }"
</c:if>
placeholder="<spring:message code='manifest.enterprise.code' />"
oninput="onInputChange(event,'cnecusid','oninput')"
onpropertychange="onInputChange(event,'cnecusid','onpropertychange')"></td>
<td style="display: none;" class="kv-label"><spring:message code="manifest.shr.unlodingcode" /><span
class="required_span">*</span></td>
<td style="display: none;" class="kv-content"><input required id="unlodingcode" name="unlodingcode" type="text"
value="${pre.unlodingcode }" oninput="onInputChange(event,'unlodingcode','oninput')"
<td style="display: none;" class="kv-label"><spring:message
code="manifest.shr.unlodingcode" /><span class="required_span">*</span></td>
<td style="display: none;" class="kv-content"><input required id="unlodingcode"
name="unlodingcode" type="text" value="${pre.unlodingcode }"
oninput="onInputChange(event,'unlodingcode','oninput')"
onpropertychange="onInputChange(event,'unlodingcode','onpropertychange')"></td>
</tr>
<!-- 收货信息 end -->
<!-- 危险信息 start -->
<tr>
<td class="kv-label" colspan="6"><spring:message
<td style="background-color: #EBEDF4; color: black;" class="kv-label" colspan="6"><spring:message
code="manifest.dangerous.goods.information" /></td>
</tr>
<tr>
... ... @@ -454,10 +497,10 @@
</tr>
<!-- 危险信息 end -->
<!-- 交运信息 start -->
<!-- 承运到达信息 start -->
<tr>
<td class="kv-label" colspan="6"><spring:message code="manifest.carriage.arrival" /><span
class="required_span">*</span></td>
<td style="background-color: #EBEDF4; color: black;" class="kv-label" colspan="6"><spring:message
code="manifest.carriage.arrival" /></td>
</tr>
<tr>
<td class="kv-label"><spring:message code="manifest.carrier" /><span
... ... @@ -496,8 +539,12 @@
oninput="onInputChange(event,'reach_station2','oninput')"
onpropertychange="onInputChange(event,'reach_station2','onpropertychange')"></td>
</tr>
<!-- 承运到达信息 end -->
<!-- 交运信息 start -->
<tr>
<td class="kv-label" colspan="6"><spring:message code="menu.delivery" /></td>
<td style="background-color: #EBEDF4; color: black;" class="kv-label" colspan="6"><spring:message
code="menu.delivery" /></td>
</tr>
<tr>
<td class="kv-label"><spring:message code="manifest.transfer.station" /></td>
... ... @@ -567,7 +614,7 @@
<script type="text/javascript" src="<%=basePath%>resource/layer-v3.0.3/layer/layer.js"></script>
<script src="<%=basePath%>resource/easyui/jquery.easyui.min.js"></script>
<script src="<%=basePath%>resource/My97DatePicker/WdatePicker.js"></script>
<script src="<%=basePath%>resource/js/tools.js?version=0.8"></script>
<script src="<%=basePath%>resource/js/tools.js?version=1.2"></script>
<script type="text/javascript">
function onCarrierMsg() {
layer.open({content: "<spring:message code='manifest.fhr.carrierMsg'/>"});
... ... @@ -578,7 +625,7 @@
var is='${is_strs}';
if(is != null){
table_data = JSON.parse(is);
if(parseInt(table_data.totalpiece) <= 0){
/* if(parseInt(table_data.totalpiece) <= 0){
$("#totalpiece").attr("readonly","true");
}
if(parseInt(table_data.totalweight) <= 0){
... ... @@ -589,7 +636,7 @@
}
if(parseInt(table_data.preparetotalweight) <= 0){
$("#prepareweight").attr("readonly","true")
}
} */
$("#pie").val(table_data.totalpiece);
$("#wei").val(table_data.totalweight);
$("#topie").val(table_data.preparetotalpiece);
... ... @@ -664,7 +711,7 @@
})
//计算 总件数 总总量 舱单件数 和舱单重量 --开始
$("#totalpiece").blur(function(){
/* $("#totalpiece").blur(function(){
if(parseInt(table_data.totalpiece) <= 0){
$("#totalpiece").attr("readonly","true");
return false;
... ... @@ -675,10 +722,10 @@
$("#totalpiece").val("");
layer.open({content:"不能大于提示信息"});
}
})
}) */
//未判断小数的重量
$("#totalweight").blur(function(){
/* $("#totalweight").blur(function(){
if(parseInt(table_data.totalweight) <= 0){
$("#totalweight").attr("readonly","true");
return false;
... ... @@ -715,7 +762,7 @@
$("#prepareweight").val("");
layer.open({content:"不能大于提示信息"});
}
})
}) */
//--结束
... ... @@ -724,6 +771,25 @@
var dd = $("#ways").val();
$("#waybillnosecondary").val(dd)
var data = $("#form").serialize();
var shp_cusid_type = getSelectedValue("co_cusid");
var sh_cusid = $("#shpcusid").val();
if(notEmpty(shp_cusid_type)&&notEmpty(sh_cusid)){
shpcusid = shp_cusid_type+"+"+sh_cusid;
data+="&shpcusid="+encodeURIComponent(shpcusid);
}
var cne_cusid_type = getSelectedValue("sh_cusid");
var cne_cusid = $("#cnecusid").val();
if(notEmpty(cne_cusid_type)&&notEmpty(cne_cusid)){
cnecusid = cne_cusid_type+"+"+cne_cusid;
data+="&cnecusid="+encodeURIComponent(cnecusid);
}
console.log("form-->"+data);
$.post("<%=basePath%>manifest/sub_save",data,function(data){
if(data.status==200){
// layer.confirm("<spring:message code="opt.savesuccess" />!",{btn:['<spring:message code="opt.confirm" />','<spring:message code="opt.cancel" />']},function(){
... ... @@ -737,19 +803,35 @@
}
function presavesend(){
var dd = $("#ways").val();
$("#waybillnosecondary").val(dd)
var data = $("#form").serialize();
$.post("<%=basePath%>manifest/presavesend",data,function(data){
if(data.status==200){
// layer.confirm("<spring:message code="opt.savesuccess" />!",{btn:['<spring:message code="opt.confirm" />','<spring:message code="opt.cancel" />']},function(){
window.location.href="<%=basePath%>manifest/list";
// })
}else{
layer.open({content:""+data.msg});
//layer.open({content:"<spring:message code="opt.savefailed" />!"});
}
})
var isValid = $("#form").valid();
if(isValid){
var dd = $("#ways").val();
$("#waybillnosecondary").val(dd);
var data = $("#form").serialize();
var shp_cusid_type = getSelectedValue("co_cusid");
var sh_cusid = $("#shpcusid").val();
if(notEmpty(shp_cusid_type)&&notEmpty(sh_cusid)){
shpcusid = shp_cusid_type+"+"+sh_cusid;
data+="&shpcusid="+encodeURIComponent(shpcusid);
}
var cne_cusid_type = getSelectedValue("sh_cusid");
var cne_cusid = $("#cnecusid").val();
if(notEmpty(cne_cusid_type)&&notEmpty(cne_cusid)){
cnecusid = cne_cusid_type+"+"+cne_cusid;
data+="&cnecusid="+encodeURIComponent(cnecusid);
}
$.post("<%=basePath%>manifest/presavesend",data,function(data){
if(data.status==200){
window.location.href="<%=basePath%>manifest/list";
}else{
layer.open({content:""+data.msg});
}
})
}
}
function presendDelivery(){
... ... @@ -826,6 +908,93 @@
$("#de_chweight").val(co);
$("#de_volume").val(co);
})
var api = "<%=basePath%>enterprise/search";
var api = "<%=basePath%>enterprise/search";
$('#co_country').combogrid({
panelWidth:212,
url: api,
idField:'country_code',
textField:'start',
mode:'remote',
fitColumns:true,
onBeforeLoad: function (parm) { //在请求加载数据之前触发,返回 false 则取消加载动作
var value = $('#co_country').combobox('getValue');
if (value) {
var upper = value.toUpperCase();
$('#co_country').combogrid('setValue',upper);
parm.start = upper;
onGetData('co_cusid','co_country')
return true;
}
return false;
},
onSelect: function(row,rowData){
//当用户选择一个列表项时触发。
$('#co_country').combogrid('setValue',rowData.country_code);
onGetData('co_cusid','co_country')
},
columns:[[
{field:'name_cn',title:'名称',width:106},
{field:'country_code',title:'代码',width:106}
]]
});
$('#sh_country').combogrid({
panelWidth:220,
url: api,
idField:'country_code',
textField:'start',
mode:'remote',
fitColumns:true,
onBeforeLoad: function (parm) { //在请求加载数据之前触发,返回 false 则取消加载动作
var value = $('#sh_country').combobox('getValue');
if (value) {
var upper = value.toUpperCase();
$('#sh_country').combogrid('setValue',upper);
parm.start = upper;
onGetData('sh_cusid','sh_country')
return true;
}
return false;
},
onSelect: function(row,rowData){
//当用户选择一个列表项时触发。
$('#sh_country').val(rowData.country_code);
onGetData('sh_cusid','sh_country')
},
columns:[[
{field:'name_cn',title:'名称',width:106},
{field:'country_code',title:'代码',width:106}
]]
});
function onGetData(selectId,inputId) {
var select = $("#"+selectId);
select.html("");
select.append("<option value=''><spring:message code='manifest.enterprise.code.type' /></option>");
var countryCode = $('#'+inputId).combobox('getValue');
$.ajax({
url:"<%=basePath%>/enterprise/list?countryCode="+ countryCode,
success : function(data) {
if (data.status == 200) {
if (data.data) {
for (var i = 0; i < data.data.length; i++) {
var type = data.data[i].enterprise_type;
select.append("<option value='"+type+"'>"
+ type + "</option>");
}
}
}
}
});
}
</script>
</body>
</html>
\ No newline at end of file
... ...
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}html{line-height:1}ol,ul{list-style:none}table{border-collapse:collapse;border-spacing:0}caption,th,td{text-align:left;font-weight:normal;vertical-align:middle}q,blockquote{quotes:none}q:before,q:after,blockquote:before,blockquote:after{content:"";content:none}a img{border:none}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}html{*overflow:auto}body,button,input,select,textarea{font-family:PingFang SC, Lantinghei SC, Microsoft Yahei, Hiragino Sans GB, Microsoft Sans Serif, WenQuanYi Micro Hei, sans;font-size:14px}.clearfix:after{content:"";display:block;height:0;clear:both;visibility:hidden}.clearfix{display:inline-block}.clearfix{height:1%}.clearfix{display:block;overflow:hidden}.ellipsis{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.alert{margin-bottom:20px;padding:0 10px;height:36px;line-height:36px;border:1px solid #ddd;color:#888}.alert .close{float:right;font-size:12px;color:#999}.alert .close:hover{text-decoration:none}.alert.alert-warning{background:#fff5db;color:#e2ba89;border-color:#ffe195}.alert.alert-error{background:#fceee8;color:#fc0000;border-color:#fc0000}::-webkit-scrollbar-track-piece{background-color:#fff;-webkit-border-radius:0}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-thumb{height:50px;background-color:#b8b8b8;-webkit-border-radius:6px;outline:2px solid #fff;outline-offset:-2px;border:2px solid #fff;filter:alpha(opacity=50);-moz-opacity:0.5;-khtml-opacity:0.5;opacity:0.5}::-webkit-scrollbar-thumb:hover{height:50px;background-color:#878987;-webkit-border-radius:6px}@font-face{font-family:'iconfont';src:url('../fonts/iconfont.eot?1464535104');src:url('../fonts/iconfont.eot?&1464535104#iefix') format("embedded-opentype"),url('../fonts/iconfont.woff?1464535104') format("woff"),url('../fonts/iconfont.ttf?1464535104') format("truetype"),url('../fonts/iconfont.svg?1464535104#iconfont') format("svg")}.iconfont{font-family:"iconfont" !important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:0.2px;-moz-osx-font-smoothing:grayscale}.kv-table{border-right:1px solid #cacaca \9;*border-right:1px solid #cacaca}.kv-table .kv-table-row{border-bottom:1px solid #cacaca}.kv-table .kv-table-row .kv-item{padding-left:134px}.kv-table .kv-table-row .kv-item .kv-label{float:left;padding:0 10px;margin-left:-134px;width:112px;background:#f5f5f5;border:1px solid #cacaca;border-bottom:none;border-top:none}.kv-table .kv-table-row .kv-item .kv-content-wrap{float:left;width:100%}.kv-table .kv-table-row .kv-item .kv-content{padding:10px}.kv-table .kv-table-row.col-3 .kv-item-wrap{float:left;width:33.33%}.kv-table .kv-table-row.col-2 .kv-item-wrap{float:left;width:33.33%}table.kv-table{width:100%}table.kv-table .kv-label{padding:0 10px;width:114px;background:#f5f5f5;border:1px solid #cacaca;border-top:none}table.kv-table td.kv-content,table.kv-table td.kv-label{height:29px;padding:5px 0;border-bottom:1px solid #cacaca;font-size:14px;padding-left:20px}table.kv-table tr:first-child td.kv-content,table.kv-table tr:first-child td.kv-label{border-top:1px solid #cacaca}table.kv-table tr td.kv-content:last-child{border-right:1px solid #cacaca}table.kv-table tr .button{text-align:center;border-radius:0;text-indent:0;height:32px}table.kv-table .kv-content{width:260px;padding:5px 10px}table.kv-table .textarea-wrap textarea{width:98%}
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p,
blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn,
em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var,
b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas,
details, embed, figure, figcaption, footer, header, hgroup, menu, nav,
output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font: inherit;
font-size: 100%;
vertical-align: baseline
}
html {
line-height: 1
}
ol, ul {
list-style: none
}
table {
border-collapse: collapse;
border-spacing: 0
}
caption, th, td {
text-align: left;
font-weight: normal;
vertical-align: middle
}
q, blockquote {
quotes: none
}
q:before, q:after, blockquote:before, blockquote:after {
content: "";
content: none
}
a img {
border: none
}
article, aside, details, figcaption, figure, footer, header, hgroup,
main, menu, nav, section, summary {
display: block
}
html {
*overflow: auto
}
body, button, input, select, textarea {
font-family: PingFang SC, Lantinghei SC, Microsoft Yahei,
Hiragino Sans GB, Microsoft Sans Serif, WenQuanYi Micro Hei, sans;
font-size: 14px
}
.clearfix:after {
content: "";
display: block;
height: 0;
clear: both;
visibility: hidden
}
.clearfix {
display: inline-block
}
.clearfix {
height: 1%
}
.clearfix {
display: block;
overflow: hidden
}
.ellipsis {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden
}
.alert {
margin-bottom: 20px;
padding: 0 10px;
height: 36px;
line-height: 36px;
border: 1px solid #ddd;
color: #888
}
.alert .close {
float: right;
font-size: 12px;
color: #999
}
.alert .close:hover {
text-decoration: none
}
.alert.alert-warning {
background: #fff5db;
color: #e2ba89;
border-color: #ffe195
}
.alert.alert-error {
background: #fceee8;
color: #fc0000;
border-color: #fc0000
}
::-webkit-scrollbar-track-piece {
background-color: #fff;
-webkit-border-radius: 0
}
::-webkit-scrollbar {
width: 10px;
height: 10px
}
::-webkit-scrollbar-thumb {
height: 50px;
background-color: #b8b8b8;
-webkit-border-radius: 6px;
outline: 2px solid #fff;
outline-offset: -2px;
border: 2px solid #fff;
filter: alpha(opacity = 50);
-moz-opacity: 0.5;
-khtml-opacity: 0.5;
opacity: 0.5
}
::-webkit-scrollbar-thumb:hover {
height: 50px;
background-color: #878987;
-webkit-border-radius: 6px
}
@font-face {
font-family: 'iconfont';
src: url('../fonts/iconfont.eot?1464535104');
src: url('../fonts/iconfont.eot?&1464535104#iefix')
format("embedded-opentype"), url('../fonts/iconfont.woff?1464535104')
format("woff"), url('../fonts/iconfont.ttf?1464535104')
format("truetype"), url('../fonts/iconfont.svg?1464535104#iconfont')
format("svg")
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale
}
.kv-table {
border-right: 1px solid #cacaca \9;
*border-right: 1px solid #cacaca
}
.kv-table .kv-table-row {
border-bottom: 1px solid #cacaca
}
.kv-table .kv-table-row .kv-item {
padding-left: 134px
}
.kv-table .kv-table-row .kv-item .kv-label {
float: left;
padding: 0 10px;
margin-left: -134px;
width: 112px;
background: white;
border: 1px solid #cacaca;
border-bottom: none;
border-top: none
}
.kv-table .kv-table-row .kv-item .kv-content-wrap {
float: left;
width: 100%
}
.kv-table .kv-table-row .kv-item .kv-content {
padding: 10px
}
.kv-table .kv-table-row.col-3 .kv-item-wrap {
float: left;
width: 33.33%
}
.kv-table .kv-table-row.col-2 .kv-item-wrap {
float: left;
width: 33.33%
}
table.kv-table {
width: 100%
}
table.kv-table .kv-label {
padding: 0 10px;
width: 114px;
background: white;
border: 1px solid #cacaca;
border-top: none
}
table.kv-table td.kv-content, table.kv-table td.kv-label {
height: 29px;
padding: 5px 0;
border-bottom: 1px solid #cacaca;
font-size: 14px;
padding-left: 20px
}
table.kv-table tr:first-child td.kv-content, table.kv-table tr:first-child td.kv-label
{
border-top: 1px solid #cacaca
}
table.kv-table tr td.kv-content:last-child {
border-right: 1px solid #cacaca
}
table.kv-table tr .button {
text-align: center;
border-radius: 0;
text-indent: 0;
height: 32px
}
table.kv-table .kv-content {
width: 260px;
padding: 5px 10px
}
table.kv-table .textarea-wrap textarea {
width: 98%
}
\ No newline at end of file
... ...
.container{position:relative;}.container .left-tree{position:absolute;left:0;top:0;bottom:0;padding:10px;width:146px;border:1px solid #bfbfbf}.container .content{padding-left:10px;min-height:200px}.container .content .basic-info{padding:10px}.container .content .tabs-header{background-color:#fff;border-width:0}.container .content .tabs li{border-top:1px solid #bfbfbf;border-radius:3px 3px 0 0}.container .content .tabs li.tabs-selected{border-top:2px solid #11a9e2}.container .content .tabs li.tabs-selected a.tabs-inner{color:#000;background-color:#fff}.container .content .tabs li a.tabs-inner{color:#000;background-color:#e3e3e3}.container .content .tabs li a.tabs-inner .tabs-title{font-size:14px}.container .content .column{position:relative;height:23px;border-bottom:1px solid #d4d4d4;margin-bottom:10px}.container .content .column span.current{position:relative;top:0px;display:inline-block;color:#11a9e2;font-size:12px;font-weight:bold;height:22px;line-height:22px;border-bottom:2px solid #ff9d02}.container .content table.yes-not.kv-table td.kv-label{width:130px}.container .content table.kv-table{margin-bottom:20px}.container .content table.kv-table td.kv-label{height:26px;font-size:12px}.container .content table.kv-table td.kv-content{height:26px;font-size:12px}.container .content table.kv-table td.kv-content a{color:#11a9e2;text-decoration:none}.container .content table.kv-table td.kv-content a:hover{text-decoration:underline}
.container {
position: relative;
}
.container .left-tree {
position: absolute;
left: 0;
top: 0;
bottom: 0;
padding: 10px;
width: 146px;
border: 1px solid #bfbfbf
}
.container .content {
padding-left: 10px;
min-height: 200px
}
.container .content .basic-info {
padding: 10px
}
.container .content .tabs-header {
background-color: #fff;
border-width: 0
}
.container .content .tabs li {
border-top: 1px solid #bfbfbf;
border-radius: 3px 3px 0 0
}
.container .content .tabs li.tabs-selected {
border-top: 2px solid #11a9e2
}
.container .content .tabs li.tabs-selected a.tabs-inner {
color: #000;
background-color: #fff
}
.container .content .tabs li a.tabs-inner {
color: #000;
background-color: #e3e3e3
}
.container .content .tabs li a.tabs-inner .tabs-title {
font-size: 14px
}
.container .content .column {
position: relative;
height: 23px;
border-bottom: 1px solid #d4d4d4;
margin-bottom: 10px
}
.container .content .column span.current {
position: relative;
top: 0px;
display: inline-block;
color: #11a9e2;
font-size: 12px;
font-weight: bold;
height: 22px;
line-height: 22px;
border-bottom: 2px solid #ff9d02
}
.container .content table.yes-not.kv-table td.kv-label {
width: 130px
}
.container .content table.kv-table {
margin-bottom: 20px
}
.container .content table.kv-table td.kv-label {
height: 26px;
font-size: 12px
}
.container .content table.kv-table td.kv-content {
height: 26px;
font-size: 12px
}
.container .content table.kv-table td.kv-content a {
color: #11a9e2;
text-decoration: none
}
.container .content table.kv-table td.kv-content a:hover {
text-decoration: underline
}
\ No newline at end of file
... ...
... ... @@ -304,6 +304,24 @@ function isEmpty(data) {
}
}
function sync(id){
function notEmpty(data) {
return !isEmpty(data);
}
//获取下拉列表选中项的文本
function getSelectedText(eid) {
var obj = document.getElementById(eid);
for (i = 0; i < obj.length; i++) {
if (obj[i].selected == true) {
// 关键是通过option对象的innerText属性获取到选项文本
return obj[i].innerText;
}
}
}
// 获取下拉列表选中项的值
function getSelectedValue(eid) {
var obj = document.getElementById(eid);
// 直接用其对象的value属性便可获取到
return obj.value;
}
\ No newline at end of file
... ...