正在显示
10 个修改的文件
包含
1115 行增加
和
5 行删除
.idea/artifacts/agent_war_exploded.xml
0 → 100644
1 | +<component name="ArtifactManager"> | ||
2 | + <artifact type="exploded-war" name="agent:war exploded"> | ||
3 | + <output-path>$PROJECT_DIR$/target/ROOT</output-path> | ||
4 | + <root id="root"> | ||
5 | + <element id="directory" name="WEB-INF"> | ||
6 | + <element id="directory" name="classes"> | ||
7 | + <element id="module-output" name="agent" /> | ||
8 | + </element> | ||
9 | + <element id="directory" name="lib"> | ||
10 | + <element id="library" level="project" name="Maven: org.apache.cxf:cxf-rt-frontend-jaxws:2.7.5" /> | ||
11 | + <element id="library" level="project" name="Maven: xml-resolver:xml-resolver:1.2" /> | ||
12 | + <element id="library" level="project" name="Maven: asm:asm:3.3.1" /> | ||
13 | + <element id="library" level="project" name="Maven: org.apache.cxf:cxf-api:2.7.5" /> | ||
14 | + <element id="library" level="project" name="Maven: org.codehaus.woodstox:woodstox-core-asl:4.2.0" /> | ||
15 | + <element id="library" level="project" name="Maven: org.codehaus.woodstox:stax2-api:3.1.1" /> | ||
16 | + <element id="library" level="project" name="Maven: org.apache.ws.xmlschema:xmlschema-core:2.0.3" /> | ||
17 | + <element id="library" level="project" name="Maven: org.apache.geronimo.specs:geronimo-javamail_1.4_spec:1.7.1" /> | ||
18 | + <element id="library" level="project" name="Maven: wsdl4j:wsdl4j:1.6.3" /> | ||
19 | + <element id="library" level="project" name="Maven: org.apache.cxf:cxf-rt-core:2.7.5" /> | ||
20 | + <element id="library" level="project" name="Maven: org.apache.cxf:cxf-rt-bindings-soap:2.7.5" /> | ||
21 | + <element id="library" level="project" name="Maven: org.apache.cxf:cxf-rt-databinding-jaxb:2.7.5" /> | ||
22 | + <element id="library" level="project" name="Maven: org.apache.cxf:cxf-rt-bindings-xml:2.7.5" /> | ||
23 | + <element id="library" level="project" name="Maven: org.apache.cxf:cxf-rt-frontend-simple:2.7.5" /> | ||
24 | + <element id="library" level="project" name="Maven: org.apache.cxf:cxf-rt-ws-addr:2.7.5" /> | ||
25 | + <element id="library" level="project" name="Maven: org.apache.cxf:cxf-rt-ws-policy:2.7.5" /> | ||
26 | + <element id="library" level="project" name="Maven: org.apache.neethi:neethi:3.0.2" /> | ||
27 | + <element id="library" level="project" name="Maven: org.apache.cxf:cxf-rt-transports-http:2.7.5" /> | ||
28 | + <element id="library" level="project" name="Maven: org.apache.cxf:cxf-rt-ws-security:2.7.5" /> | ||
29 | + <element id="library" level="project" name="Maven: org.apache.ws.security:wss4j:1.6.10" /> | ||
30 | + <element id="library" level="project" name="Maven: org.apache.santuario:xmlsec:1.5.4" /> | ||
31 | + <element id="library" level="project" name="Maven: org.opensaml:opensaml:2.5.1-1" /> | ||
32 | + <element id="library" level="project" name="Maven: org.opensaml:openws:1.4.2-1" /> | ||
33 | + <element id="library" level="project" name="Maven: org.opensaml:xmltooling:1.3.2-1" /> | ||
34 | + <element id="library" level="project" name="Maven: commons-logging:commons-logging:1.1.1" /> | ||
35 | + <element id="library" level="project" name="Maven: javax.transaction:jta:1.1" /> | ||
36 | + <element id="library" level="project" name="Maven: jstl:jstl:1.2" /> | ||
37 | + <element id="library" level="project" name="Maven: com.alibaba:fastjson:1.2.16" /> | ||
38 | + <element id="library" level="project" name="Maven: org.jdom:jdom:1.1.3" /> | ||
39 | + <element id="library" level="project" name="Maven: junit:junit:4.12" /> | ||
40 | + <element id="library" level="project" name="Maven: org.hamcrest:hamcrest-core:1.3" /> | ||
41 | + <element id="library" level="project" name="Maven: commons-codec:commons-codec:1.10" /> | ||
42 | + <element id="library" level="project" name="Maven: com.google.guava:guava:19.0" /> | ||
43 | + <element id="library" level="project" name="Maven: org.slf4j:slf4j-api:1.7.13" /> | ||
44 | + <element id="library" level="project" name="Maven: org.apache.logging.log4j:log4j-api:2.5" /> | ||
45 | + <element id="library" level="project" name="Maven: org.apache.logging.log4j:log4j-core:2.5" /> | ||
46 | + <element id="library" level="project" name="Maven: org.apache.logging.log4j:log4j-slf4j-impl:2.5" /> | ||
47 | + <element id="library" level="project" name="Maven: javax.annotation:jsr250-api:1.0" /> | ||
48 | + <element id="library" level="project" name="Maven: org.springframework:spring-context:4.2.4.RELEASE" /> | ||
49 | + <element id="library" level="project" name="Maven: org.springframework:spring-beans:4.2.4.RELEASE" /> | ||
50 | + <element id="library" level="project" name="Maven: org.springframework:spring-core:4.2.4.RELEASE" /> | ||
51 | + <element id="library" level="project" name="Maven: org.springframework:spring-expression:4.2.4.RELEASE" /> | ||
52 | + <element id="library" level="project" name="Maven: org.springframework:spring-context-support:4.2.4.RELEASE" /> | ||
53 | + <element id="library" level="project" name="Maven: org.springframework:spring-aop:4.2.4.RELEASE" /> | ||
54 | + <element id="library" level="project" name="Maven: aopalliance:aopalliance:1.0" /> | ||
55 | + <element id="library" level="project" name="Maven: org.springframework:spring-aspects:4.2.4.RELEASE" /> | ||
56 | + <element id="library" level="project" name="Maven: org.aspectj:aspectjweaver:1.8.7" /> | ||
57 | + <element id="library" level="project" name="Maven: org.springframework:spring-tx:4.2.4.RELEASE" /> | ||
58 | + <element id="library" level="project" name="Maven: org.springframework:spring-web:4.2.4.RELEASE" /> | ||
59 | + <element id="library" level="project" name="Maven: org.springframework:spring-webmvc:4.2.4.RELEASE" /> | ||
60 | + <element id="library" level="project" name="Maven: commons-httpclient:commons-httpclient:3.0" /> | ||
61 | + <element id="library" level="project" name="Maven: org.springframework.data:spring-data-jpa:1.9.2.RELEASE" /> | ||
62 | + <element id="library" level="project" name="Maven: org.springframework.data:spring-data-commons:1.11.2.RELEASE" /> | ||
63 | + <element id="library" level="project" name="Maven: org.springframework:spring-orm:4.1.9.RELEASE" /> | ||
64 | + <element id="library" level="project" name="Maven: org.springframework:spring-jdbc:4.1.9.RELEASE" /> | ||
65 | + <element id="library" level="project" name="Maven: org.aspectj:aspectjrt:1.8.7" /> | ||
66 | + <element id="library" level="project" name="Maven: org.slf4j:jcl-over-slf4j:1.7.13" /> | ||
67 | + <element id="library" level="project" name="Maven: org.hibernate:hibernate-core:5.0.6.Final" /> | ||
68 | + <element id="library" level="project" name="Maven: org.jboss.logging:jboss-logging:3.3.0.Final" /> | ||
69 | + <element id="library" level="project" name="Maven: org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final" /> | ||
70 | + <element id="library" level="project" name="Maven: org.javassist:javassist:3.18.1-GA" /> | ||
71 | + <element id="library" level="project" name="Maven: antlr:antlr:2.7.7" /> | ||
72 | + <element id="library" level="project" name="Maven: org.jboss:jandex:2.0.0.Final" /> | ||
73 | + <element id="library" level="project" name="Maven: dom4j:dom4j:1.6.1" /> | ||
74 | + <element id="library" level="project" name="Maven: xml-apis:xml-apis:1.0.b2" /> | ||
75 | + <element id="library" level="project" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.1.Final" /> | ||
76 | + <element id="library" level="project" name="Maven: org.hibernate:hibernate-entitymanager:5.0.6.Final" /> | ||
77 | + <element id="library" level="project" name="Maven: org.hibernate:hibernate-ehcache:5.0.6.Final" /> | ||
78 | + <element id="library" level="project" name="Maven: mysql:mysql-connector-java:5.1.38" /> | ||
79 | + <element id="library" level="project" name="Maven: com.alibaba:druid:1.0.16" /> | ||
80 | + <element id="library" level="project" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.6.4" /> | ||
81 | + <element id="library" level="project" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.6.0" /> | ||
82 | + <element id="library" level="project" name="Maven: com.fasterxml.jackson.core:jackson-core:2.6.4" /> | ||
83 | + <element id="library" level="project" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.6.4" /> | ||
84 | + <element id="library" level="project" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-joda:2.6.4" /> | ||
85 | + <element id="library" level="project" name="Maven: joda-time:joda-time:2.2" /> | ||
86 | + <element id="library" level="project" name="Maven: org.codehaus.jackson:jackson-mapper-asl:1.9.13" /> | ||
87 | + <element id="library" level="project" name="Maven: org.codehaus.jackson:jackson-core-asl:1.9.13" /> | ||
88 | + <element id="library" level="project" name="Maven: org.apache.commons:commons-lang3:3.4" /> | ||
89 | + <element id="library" level="project" name="Maven: commons-fileupload:commons-fileupload:1.3.1" /> | ||
90 | + <element id="library" level="project" name="Maven: commons-io:commons-io:2.2" /> | ||
91 | + <element id="library" level="project" name="Maven: net.sf.ehcache:ehcache-core:2.6.8" /> | ||
92 | + <element id="library" level="project" name="Maven: org.apache.shiro:shiro-core:1.2.3" /> | ||
93 | + <element id="library" level="project" name="Maven: commons-beanutils:commons-beanutils:1.8.3" /> | ||
94 | + <element id="library" level="project" name="Maven: org.apache.shiro:shiro-web:1.2.3" /> | ||
95 | + <element id="library" level="project" name="Maven: org.apache.shiro:shiro-spring:1.2.3" /> | ||
96 | + <element id="library" level="project" name="Maven: org.apache.shiro:shiro-ehcache:1.2.3" /> | ||
97 | + <element id="library" level="project" name="Maven: org.apache.shiro:shiro-quartz:1.2.3" /> | ||
98 | + <element id="library" level="project" name="Maven: org.opensymphony.quartz:quartz:1.6.1" /> | ||
99 | + <element id="library" level="project" name="Maven: org.apache.shiro:shiro-cas:1.2.3" /> | ||
100 | + <element id="library" level="project" name="Maven: org.jasig.cas.client:cas-client-core:3.2.1" /> | ||
101 | + <element id="library" level="project" name="Maven: net.pusuo:patchca:0.5.0" /> | ||
102 | + <element id="library" level="project" name="Maven: com.oracle:ojdbc6:11.2.0.4.0-atlassian-hosted" /> | ||
103 | + <element id="library" level="project" name="Maven: net.sourceforge.jexcelapi:jxl:2.6.12" /> | ||
104 | + <element id="library" level="project" name="Maven: log4j:log4j:1.2.14" /> | ||
105 | + <element id="library" level="project" name="Maven: org.apache.poi:poi:3.14" /> | ||
106 | + <element id="library" level="project" name="Maven: javax.mail:mail:1.4" /> | ||
107 | + <element id="library" level="project" name="Maven: javax.activation:activation:1.1.1" /> | ||
108 | + <element id="library" level="project" name="Maven: org.apache.poi:poi-ooxml:3.14" /> | ||
109 | + <element id="library" level="project" name="Maven: org.apache.poi:poi-ooxml-schemas:3.14" /> | ||
110 | + <element id="library" level="project" name="Maven: org.apache.xmlbeans:xmlbeans:2.6.0" /> | ||
111 | + <element id="library" level="project" name="Maven: stax:stax-api:1.0.1" /> | ||
112 | + <element id="library" level="project" name="Maven: com.github.virtuald:curvesapi:1.03" /> | ||
113 | + <element id="library" level="project" name="Maven: commons-collections:commons-collections:3.2.1" /> | ||
114 | + <element id="library" level="project" name="Maven: org.apache.velocity:velocity-tools:2.0" /> | ||
115 | + <element id="library" level="project" name="Maven: commons-digester:commons-digester:1.8" /> | ||
116 | + <element id="library" level="project" name="Maven: commons-chain:commons-chain:1.1" /> | ||
117 | + <element id="library" level="project" name="Maven: commons-validator:commons-validator:1.3.1" /> | ||
118 | + <element id="library" level="project" name="Maven: oro:oro:2.0.8" /> | ||
119 | + <element id="library" level="project" name="Maven: sslext:sslext:1.2-0" /> | ||
120 | + <element id="library" level="project" name="Maven: org.apache.struts:struts-core:1.3.8" /> | ||
121 | + <element id="library" level="project" name="Maven: org.apache.struts:struts-taglib:1.3.8" /> | ||
122 | + <element id="library" level="project" name="Maven: org.apache.struts:struts-tiles:1.3.8" /> | ||
123 | + <element id="library" level="project" name="Maven: org.apache.velocity:velocity:1.6.2" /> | ||
124 | + <element id="library" level="project" name="Maven: commons-lang:commons-lang:2.4" /> | ||
125 | + <element id="library" level="project" name="Maven: redis.clients:jedis:2.1.0" /> | ||
126 | + <element id="library" level="project" name="Maven: commons-pool:commons-pool:1.5.5" /> | ||
127 | + <element id="library" level="project" name="Maven: org.apache.ant:ant:1.9.7" /> | ||
128 | + <element id="library" level="project" name="Maven: org.apache.ant:ant-launcher:1.9.7" /> | ||
129 | + <element id="library" level="project" name="Maven: javax.xml.bind:jaxb-api:2.3.0" /> | ||
130 | + <element id="library" level="project" name="Maven: com.sun.xml.bind:jaxb-impl:2.3.0" /> | ||
131 | + <element id="library" level="project" name="Maven: com.sun.xml.bind:jaxb-core:2.3.0" /> | ||
132 | + <element id="library" level="project" name="Maven: com.google.code.gson:gson:2.8.2" /> | ||
133 | + <element id="library" level="project" name="Maven: com.jfinal:jfinal:3.4" /> | ||
134 | + <element id="library" level="project" name="Maven: cglib:cglib-nodep:3.2.5" /> | ||
135 | + </element> | ||
136 | + </element> | ||
137 | + <element id="directory" name="META-INF"> | ||
138 | + <element id="file-copy" path="$PROJECT_DIR$/target/ROOT/META-INF/MANIFEST.MF" /> | ||
139 | + </element> | ||
140 | + <element id="javaee-facet-resources" facet="agent/web/Web" /> | ||
141 | + </root> | ||
142 | + </artifact> | ||
143 | +</component> |
1 | +package com.agent.controller.system; | ||
2 | + | ||
3 | +import com.agent.controller.BasicController; | ||
4 | +import com.agent.entity.Constant; | ||
5 | +import com.agent.entity.system.UserEntity; | ||
6 | +import com.agent.service.system.RoleService; | ||
7 | +import com.agent.service.system.UserService; | ||
8 | +import com.agent.util.HttpJsonMsg; | ||
9 | +import com.agent.vo.ResponseModel; | ||
10 | +import com.agent.vo.agent.CommodityVo; | ||
11 | +import com.agent.vo.agent.ManifestVo; | ||
12 | +import com.agent.xml.XmlBuildTask; | ||
13 | +import com.agent.xml.common.XmlHead; | ||
14 | +import com.agent.xml.common.XmlUtil; | ||
15 | +import com.agent.xml.fhlsli.FSXmlKit; | ||
16 | +import com.alibaba.fastjson.JSON; | ||
17 | +import com.alibaba.fastjson.JSONArray; | ||
18 | +import com.alibaba.fastjson.JSONObject; | ||
19 | +import com.framework.core.Servlets; | ||
20 | +import com.framework.shiro.SessionUtil; | ||
21 | +import com.framework.util.MessageKit; | ||
22 | +import com.framework.util.MessageType; | ||
23 | +import com.plugin.easyui.DataGrid; | ||
24 | +import com.plugin.easyui.EasyPage; | ||
25 | +import org.apache.commons.collections.CollectionUtils; | ||
26 | +import org.apache.commons.lang.StringUtils; | ||
27 | +import org.apache.shiro.SecurityUtils; | ||
28 | +import org.slf4j.Logger; | ||
29 | +import org.slf4j.LoggerFactory; | ||
30 | +import org.springframework.stereotype.Controller; | ||
31 | +import org.springframework.ui.Model; | ||
32 | +import org.springframework.web.bind.annotation.*; | ||
33 | +import tools.DBConnection; | ||
34 | +import tools.NumKit; | ||
35 | +import tools.Tools; | ||
36 | +import tools.oclass.FemyList; | ||
37 | + | ||
38 | +import javax.annotation.Resource; | ||
39 | +import javax.servlet.http.HttpServletRequest; | ||
40 | +import javax.servlet.http.HttpServletResponse; | ||
41 | +import java.sql.Connection; | ||
42 | +import java.sql.ResultSet; | ||
43 | +import java.sql.SQLException; | ||
44 | +import java.sql.Statement; | ||
45 | +import java.util.ArrayList; | ||
46 | +import java.util.Date; | ||
47 | +import java.util.HashMap; | ||
48 | +import java.util.List; | ||
49 | +import java.util.Map; | ||
50 | +import java.util.Set; | ||
51 | +import com.agent.entity.agent.BasicAgentEntity; | ||
52 | +import com.agent.entity.agent.ManifestBillEntity; | ||
53 | +import com.agent.entity.agent.ManifestEntity; | ||
54 | +import com.agent.entity.agent.PackageTypeEntity; | ||
55 | +import com.agent.entity.agent.PreparesecondaryEntity; | ||
56 | +import com.agent.entity.agent.PubDgEntity; | ||
57 | +import com.agent.entity.agent.TBasCarrierEntity; | ||
58 | +import com.agent.entity.agent.WaybillReceiptEntity; | ||
59 | +import com.agent.entity.agent.WaybillReceiptType; | ||
60 | +import com.agent.service.agent.BasicAgentService; | ||
61 | +import com.agent.service.agent.ConsigneeService; | ||
62 | +import com.agent.service.agent.ConsignorService; | ||
63 | +import com.agent.service.agent.ManifestBillService; | ||
64 | +import com.agent.service.agent.ManifestCommodityService; | ||
65 | +import com.agent.service.agent.ManifestContainerService; | ||
66 | +import com.agent.service.agent.ManifestService; | ||
67 | +import com.agent.service.agent.PackageTypeService; | ||
68 | +import com.agent.service.agent.PreparesecondaryService; | ||
69 | +import com.agent.service.agent.PubDgService; | ||
70 | +import com.agent.service.agent.TBasCarrierService; | ||
71 | +import com.agent.service.agent.WaybillReceiptService; | ||
72 | +import com.agent.xml.manifestdeclare.DeclarePreparemasterXmlBody; | ||
73 | +import com.agent.xml.manifestdeclare.ManifestBorderTransportMeansXml; | ||
74 | +import com.agent.xml.manifestdeclare.ManifestCarrierXml; | ||
75 | +import com.agent.xml.manifestdeclare.ManifestConsignmentItemXml; | ||
76 | +import com.agent.xml.manifestdeclare.ManifestConsignmentPackagingXml; | ||
77 | +import com.agent.xml.manifestdeclare.ManifestConsignmentXml; | ||
78 | +import com.agent.xml.manifestdeclare.ManifestConsignorXml; | ||
79 | +import com.agent.xml.manifestdeclare.ManifestDeclarationXml; | ||
80 | +import com.agent.xml.manifestdeclare.ManifestDeclareMetaXml; | ||
81 | +import com.agent.xml.manifestdeclare.ManifestDeclareMsgXml; | ||
82 | +import com.agent.xml.manifestdeclare.ManifestDesXml; | ||
83 | +import com.agent.xml.manifestdeclare.ManifestFreightPaymentXml; | ||
84 | +import com.agent.xml.manifestdeclare.ManifestLoadingLocationXml; | ||
85 | +import com.agent.xml.manifestdeclare.ManifestOrgXml; | ||
86 | +import com.agent.xml.manifestdeclare.ManifestTransportContractDocumentXml; | ||
87 | +import com.agent.xml.manifestdeclare.ManifestUnloadingLocationXml; | ||
88 | +import com.agent.xml.manifestdeclare.ManifestsAddressXml; | ||
89 | +/** | ||
90 | + * @Auther: shenhl | ||
91 | + * @Date: 2019/3/15 09:52 | ||
92 | + */ | ||
93 | +@Controller | ||
94 | +@RequestMapping(value = "/wbm") | ||
95 | +public class WaybillnomasterController extends BasicController { | ||
96 | + | ||
97 | + private static final Logger logger = LoggerFactory.getLogger(com.agent.controller.agent.ManifestController.class); | ||
98 | + | ||
99 | + public static boolean isSuccess = false; | ||
100 | + | ||
101 | + @Resource | ||
102 | + private ManifestService manifestService; | ||
103 | + | ||
104 | + @Resource | ||
105 | + private PreparesecondaryService preparesecondaryServer; | ||
106 | + | ||
107 | + @Resource | ||
108 | + private BasicAgentService agentService; | ||
109 | + | ||
110 | + @Resource | ||
111 | + private UserService userService; | ||
112 | + | ||
113 | + | ||
114 | + @RequestMapping(value="/list") | ||
115 | + public String list() { | ||
116 | + return "system/user/wbm"; | ||
117 | + } | ||
118 | + | ||
119 | + | ||
120 | + /** | ||
121 | + * 查询分页数据 | ||
122 | + * | ||
123 | + * @return | ||
124 | + */ | ||
125 | + @RequestMapping(value = "/grid.json") | ||
126 | + @ResponseBody | ||
127 | + public DataGrid<ManifestVo> grid(HttpServletRequest request, EasyPage<ManifestEntity> pageForm) { | ||
128 | + Map<String, Object> searchParams = Servlets.getParametersStartingWith(request, "search_"); | ||
129 | + // searchParams.put("EQ_isdelete", 0); | ||
130 | + pageForm.setSearchParams(searchParams); | ||
131 | + // UserEntity ue = | ||
132 | + // (UserEntity)SecurityUtils.getSubject().getSession().getAttribute("user"); | ||
133 | + UserEntity ue = (UserEntity) SecurityUtils.getSubject().getSession().getAttribute("user"); | ||
134 | + if (ue != null) { | ||
135 | + Long u = ue.getId(); | ||
136 | + Set<String> sk = pageForm.getSearchParams().keySet(); | ||
137 | + | ||
138 | + if (Tools.getUserId() != null && Tools.getUserId() != 1) { | ||
139 | + // 不是管理员,添加用户id的条件 | ||
140 | + pageForm.getSearchParams().put("EQ_USER_ID", u); | ||
141 | + } | ||
142 | + } | ||
143 | + | ||
144 | + pageForm.parseData(manifestService.getPage(pageForm)); | ||
145 | + // | ||
146 | + DataGrid<ManifestEntity> manis = pageForm.getData(); | ||
147 | + List<ManifestVo> manifestVos = new ArrayList<>(); | ||
148 | + for (ManifestEntity mani : manis.getRows()){ | ||
149 | + ManifestVo manifestVo = new ManifestVo(); | ||
150 | + manifestVo.setId(mani.getId()); | ||
151 | + manifestVo.setUnlodingcode(mani.getUnlodingcode()); | ||
152 | + manifestVo.setCnecusid(mani.getCnecusid()); | ||
153 | + manifestVo.setShpcusid(mani.getShpcusid()); | ||
154 | + manifestVo.setShpaeo(mani.getShpaeo()); | ||
155 | + manifestVo.setCneaeo(mani.getCneaeo()); | ||
156 | + manifestVo.setFlightno(mani.getFlightno()); | ||
157 | + manifestVo.setFlightdate(mani.getFlightdate()); | ||
158 | + manifestVo.setOriginatingstation(mani.getOriginatingstation()); | ||
159 | + manifestVo.setDestinationstation(mani.getDestinationstation()); | ||
160 | + manifestVo.setWaybillnomaster(mani.getWaybillnomaster()); | ||
161 | + manifestVo.setTotalweight(mani.getTotalweight()); | ||
162 | + manifestVo.setTotalpiece(mani.getTotalpiece()); | ||
163 | + manifestVo.setPreparetotalpiece(mani.getPreparetotalpiece()); | ||
164 | + manifestVo.setPreparetotalweight(mani.getPreparetotalweight()); | ||
165 | + manifestVo.setAgentcompanycode(mani.getAgentcompanycode()); | ||
166 | + manifestVo.setStowagedate(mani.getStowagedate()); | ||
167 | + manifestVo.setStatus(mani.getStatus()); | ||
168 | + manifestVo.setCarrier(mani.getCarrier()); | ||
169 | + manifestVo.setCustomsstatus(mani.getCustomsstatus()); | ||
170 | + manifestVo.setPaymode(mani.getPaymode()); | ||
171 | + manifestVo.setSpecialgoodscode(mani.getSpecialgoodscode()); | ||
172 | + manifestVo.setCustomscode(mani.getCustomscode()); | ||
173 | + manifestVo.setAgentman(mani.getAgentman()); | ||
174 | + manifestVo.setAgentcompany(mani.getAgentcompany()); | ||
175 | + manifestVo.setReceiptinformation(mani.getReceiptinformation()); | ||
176 | + manifestVo.setCreatedate(mani.getCreatedate()); | ||
177 | + manifestVo.setProductname(mani.getProductname()); | ||
178 | + manifestVo.setUnnumber(mani.getUnnumber()); | ||
179 | + manifestVo.setCategory(mani.getCategory()); | ||
180 | + manifestVo.setSh_company(mani.getSh_company()); | ||
181 | + manifestVo.setSh_address(mani.getSh_address()); | ||
182 | + manifestVo.setSh_zipcode(mani.getSh_zipcode()); | ||
183 | + manifestVo.setSh_city(mani.getSh_city()); | ||
184 | + manifestVo.setSh_deltaname(mani.getSh_deltaname()); | ||
185 | + manifestVo.setSh_country(mani.getSh_country()); | ||
186 | + manifestVo.setSh_telephone(mani.getSh_telephone()); | ||
187 | + manifestVo.setSh_fax(mani.getSh_fax()); | ||
188 | + manifestVo.setSh_name(mani.getSh_name()); | ||
189 | + manifestVo.setCo_company(mani.getCo_company()); | ||
190 | + manifestVo.setCo_address(mani.getCo_address()); | ||
191 | + manifestVo.setCo_zipcode(mani.getCo_zipcode()); | ||
192 | + manifestVo.setCo_city(mani.getCo_city()); | ||
193 | + manifestVo.setCo_deltaname(mani.getCo_deltaname()); | ||
194 | + manifestVo.setCo_country(mani.getCo_country()); | ||
195 | + manifestVo.setCo_telephone(mani.getCo_telephone()); | ||
196 | + manifestVo.setCo_fax(mani.getCo_fax()); | ||
197 | + manifestVo.setCo_name(mani.getCo_name()); | ||
198 | + manifestVo.setReach_station(mani.getReach_station()); | ||
199 | + manifestVo.setCarrier1(mani.getCarrier1()); | ||
200 | + manifestVo.setReach_station1(mani.getReach_station1()); | ||
201 | + manifestVo.setCarrier2(mani.getCarrier2()); | ||
202 | + manifestVo.setReach_station2(mani.getReach_station2()); | ||
203 | + manifestVo.setName_ofgoods(mani.getName_ofgoods()); | ||
204 | + manifestVo.setDelivery_station(mani.getDelivery_station()); | ||
205 | + manifestVo.setSh_provincecode(mani.getSh_provincecode()); | ||
206 | + manifestVo.setSh_provincename(mani.getSh_provincename()); | ||
207 | + manifestVo.setDe_number(mani.getDe_number()); | ||
208 | + manifestVo.setDe_weight(mani.getDe_weight()); | ||
209 | + manifestVo.setDe_chweight(mani.getDe_chweight()); | ||
210 | + manifestVo.setDe_size(mani.getDe_size()); | ||
211 | + manifestVo.setDe_volume(mani.getDe_volume()); | ||
212 | + manifestVo.setDe_type(mani.getDe_type()); | ||
213 | + manifestVo.setDe_trstation(mani.getDe_trstation()); | ||
214 | + manifestVo.setDe_packing(mani.getDe_packing()); | ||
215 | + manifestVo.setDe_remarks(mani.getDe_remarks()); | ||
216 | + manifestVo.setDe_ids(mani.getDe_ids()); | ||
217 | + manifestVo.setResponse_code(mani.getResponse_code()); | ||
218 | + manifestVo.setResponse_text(mani.getResponse_text()); | ||
219 | + manifestVo.setSave_time(mani.getSave_time()); | ||
220 | + manifestVo.setUSER_ID(mani.getUSER_ID()); | ||
221 | + | ||
222 | + if(mani.getUSER_ID() != null){ | ||
223 | + UserEntity one = userService.findOne(mani.getUSER_ID()); | ||
224 | + manifestVo.setLoginaccount(one.getLoginaccount()); | ||
225 | + BasicAgentEntity one1 = agentService.findOne(one.getAgent()); | ||
226 | + manifestVo.setAgentCode(one1.getThreeCode()); | ||
227 | + } | ||
228 | + manifestVos.add(manifestVo); | ||
229 | + } | ||
230 | + DataGrid<ManifestVo> vo = new DataGrid<>(); | ||
231 | + vo.setRows(manifestVos); | ||
232 | + vo.setTotal(manis.getTotal()); | ||
233 | +// return pageForm.getData(); | ||
234 | + return vo; | ||
235 | + } | ||
236 | + | ||
237 | + /** | ||
238 | + * 模糊查询匹配信息 | ||
239 | + * @param id | ||
240 | + * @param model | ||
241 | + * @return | ||
242 | + */ | ||
243 | + @RequestMapping(value = "/infor") | ||
244 | + @ResponseBody | ||
245 | + public List<ManifestEntity> infor(String id, Model model) { | ||
246 | + List<ManifestEntity> li = null; | ||
247 | + if (Tools.getUserId() != null && Tools.getUserId().longValue() == 1) { | ||
248 | + li = manifestService.queryAll(); | ||
249 | + } else { | ||
250 | + li = manifestService.queryByUserId(Tools.getUserId()); | ||
251 | + } | ||
252 | + | ||
253 | + List<ManifestEntity> result = new FemyList(); | ||
254 | + for (ManifestEntity me : li) { | ||
255 | + if (result.contains(me)) { | ||
256 | + } else { | ||
257 | + result.add(me); | ||
258 | + } | ||
259 | + } | ||
260 | + return result; | ||
261 | + } | ||
262 | + | ||
263 | + /** | ||
264 | + * * 模糊查询匹配信息 | ||
265 | + * | ||
266 | + * @param manifest | ||
267 | + * @return | ||
268 | + * @return | ||
269 | + */ | ||
270 | + @RequestMapping(value = "/inforPre") | ||
271 | + @ResponseBody | ||
272 | + public List<PreparesecondaryEntity> inforPre(String id, Model model) { | ||
273 | + List<PreparesecondaryEntity> li = preparesecondaryServer.queryByUserId(Tools.getUserId()); | ||
274 | + List<PreparesecondaryEntity> result = new FemyList(); | ||
275 | + for (PreparesecondaryEntity pe : li) { | ||
276 | + if (result.contains(pe)) { | ||
277 | + | ||
278 | + } else { | ||
279 | + result.add(pe); | ||
280 | + } | ||
281 | + } | ||
282 | + return result; | ||
283 | + } | ||
284 | + | ||
285 | + /** | ||
286 | + * 查询分制单分页数据 | ||
287 | + * | ||
288 | + * @return | ||
289 | + */ | ||
290 | + @RequestMapping(value = "/sub/grid.json") | ||
291 | + @ResponseBody | ||
292 | + public DataGrid<PreparesecondaryEntity> gridSub(Long mawbId, HttpServletRequest request) { | ||
293 | + DataGrid<PreparesecondaryEntity> dg = new DataGrid<>(); | ||
294 | + dg.setRows(preparesecondaryServer.findByMawbId(mawbId)); | ||
295 | + return dg; | ||
296 | + } | ||
297 | + | ||
298 | + | ||
299 | + /** | ||
300 | + * 删除 | ||
301 | + * | ||
302 | + * @param ids | ||
303 | + * @return | ||
304 | + */ | ||
305 | + @RequestMapping(value = "/delete", method = { RequestMethod.POST }) | ||
306 | + @ResponseBody | ||
307 | + public ResponseModel delete(String ids) { | ||
308 | + ResponseModel model = new ResponseModel(); | ||
309 | + try { | ||
310 | + manifestService.trueDeleteAll(ids); | ||
311 | + model.setStatus(200); | ||
312 | + model.setMsg(HttpJsonMsg.SUCCESS); | ||
313 | + } catch (Exception e) { | ||
314 | + model.setStatus(500); | ||
315 | + model.setMsg(HttpJsonMsg.ERROR); | ||
316 | + logger.error("系统异常 >>", e); | ||
317 | + } | ||
318 | + return model; | ||
319 | + } | ||
320 | + | ||
321 | + | ||
322 | + //编辑 | ||
323 | + @RequestMapping(value = "/edit/{id}") | ||
324 | + public String edit(Model model, @PathVariable("id") Long id){ | ||
325 | + ManifestEntity manifest = null; | ||
326 | + UserEntity user = SessionUtil.getUser(); | ||
327 | + // 判断是否是便捷 | ||
328 | + if (id != null) { | ||
329 | + manifest = manifestService.findOne(id); | ||
330 | + user = userService.findOne(manifest.getUSER_ID()); | ||
331 | + } | ||
332 | + List<UserEntity> laList = userService.findAll(); | ||
333 | + //全部用户账户号 | ||
334 | + model.addAttribute("userList", laList); | ||
335 | + //主单号id | ||
336 | + model.addAttribute("manifest",manifest); | ||
337 | + model.addAttribute("wbm", user); | ||
338 | + return "system/user/wbm_edit"; | ||
339 | + } | ||
340 | + | ||
341 | + //修改 | ||
342 | + @RequestMapping(value = "/userUpdate") | ||
343 | + @ResponseBody | ||
344 | + public ResponseModel userUpdate(@RequestParam("ids") Long ids, | ||
345 | + @RequestParam("userId") Long userId, | ||
346 | + @RequestParam("loginaccount") String loginaccount){ | ||
347 | + ResponseModel rm = new ResponseModel(200,"",null); | ||
348 | + | ||
349 | + try { | ||
350 | + UserEntity user = userService.findLoginaccount(loginaccount); | ||
351 | + if (user.getId() != null){ | ||
352 | + manifestService.userUpdate(user.getId(), ids); | ||
353 | + rm.setStatus(200); | ||
354 | + }else { | ||
355 | + rm.setStatus(500); | ||
356 | + } | ||
357 | + }catch (Exception e){ | ||
358 | + e.printStackTrace(); | ||
359 | + rm.setStatus(500); | ||
360 | + } | ||
361 | + | ||
362 | + return rm; | ||
363 | + } | ||
364 | + | ||
365 | + | ||
366 | +} |
@@ -2,12 +2,14 @@ package com.agent.repository.agent; | @@ -2,12 +2,14 @@ package com.agent.repository.agent; | ||
2 | 2 | ||
3 | import com.agent.entity.agent.ManifestEntity; | 3 | import com.agent.entity.agent.ManifestEntity; |
4 | 4 | ||
5 | +import java.beans.Transient; | ||
5 | import java.util.List; | 6 | import java.util.List; |
6 | 7 | ||
7 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; | 8 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; |
8 | import org.springframework.data.jpa.repository.Modifying; | 9 | import org.springframework.data.jpa.repository.Modifying; |
9 | import org.springframework.data.jpa.repository.Query; | 10 | import org.springframework.data.jpa.repository.Query; |
10 | import org.springframework.data.repository.PagingAndSortingRepository; | 11 | import org.springframework.data.repository.PagingAndSortingRepository; |
12 | +import org.springframework.transaction.annotation.Transactional; | ||
11 | 13 | ||
12 | /** | 14 | /** |
13 | * Created by cohesion on 2017/4/19. | 15 | * Created by cohesion on 2017/4/19. |
@@ -18,19 +20,31 @@ public interface ManifestRepository extends PagingAndSortingRepository<ManifestE | @@ -18,19 +20,31 @@ public interface ManifestRepository extends PagingAndSortingRepository<ManifestE | ||
18 | @Modifying | 20 | @Modifying |
19 | @Query(value = "UPDATE MANIFEST SET IS_DELETE = 1 WHERE ID = ?1",nativeQuery = true) | 21 | @Query(value = "UPDATE MANIFEST SET IS_DELETE = 1 WHERE ID = ?1",nativeQuery = true) |
20 | public void delete(Long id); | 22 | public void delete(Long id); |
23 | + | ||
24 | + @Transactional | ||
25 | + @Modifying | ||
26 | + @Query(value = "DELETE FROM MANIFEST WHERE ID = ?1",nativeQuery = true) | ||
27 | + void trueDelete(Long id); | ||
28 | + | ||
29 | + @Transactional | ||
30 | + @Modifying | ||
31 | + @Query(value = "UPDATE MANIFEST SET USER_ID =?1 where ID = ?2", nativeQuery = true) | ||
32 | + void userUpdate(Long userId, Long ids); | ||
21 | 33 | ||
22 | @Query(value = "SELECT * FROM MANIFEST ORDER BY ID DESC", nativeQuery = true) | 34 | @Query(value = "SELECT * FROM MANIFEST ORDER BY ID DESC", nativeQuery = true) |
23 | public List<ManifestEntity> findAll(); | 35 | public List<ManifestEntity> findAll(); |
24 | - | 36 | + |
25 | @Query(value = "SELECT * FROM MANIFEST WHERE WAYBILLNOMASTER = ?1 and USER_ID=?2 ORDER BY ID DESC", nativeQuery = true) | 37 | @Query(value = "SELECT * FROM MANIFEST WHERE WAYBILLNOMASTER = ?1 and USER_ID=?2 ORDER BY ID DESC", nativeQuery = true) |
26 | public List<ManifestEntity> findByMawbNo(String mawbNo, Long user_id); | 38 | public List<ManifestEntity> findByMawbNo(String mawbNo, Long user_id); |
27 | - | 39 | + |
28 | @Query(value = "SELECT * FROM MANIFEST WHERE WAYBILLNOMASTER = ?1 ORDER BY ID DESC", nativeQuery = true) | 40 | @Query(value = "SELECT * FROM MANIFEST WHERE WAYBILLNOMASTER = ?1 ORDER BY ID DESC", nativeQuery = true) |
29 | public List<ManifestEntity> findByMawbNo(String mawbNo); | 41 | public List<ManifestEntity> findByMawbNo(String mawbNo); |
30 | - | 42 | + |
31 | @Query(value = "SELECT * FROM MANIFEST", nativeQuery = true) | 43 | @Query(value = "SELECT * FROM MANIFEST", nativeQuery = true) |
32 | public List<ManifestEntity> queryAll(); | 44 | public List<ManifestEntity> queryAll(); |
33 | - | 45 | + |
34 | @Query(value = "SELECT * FROM MANIFEST WHERE USER_ID=?1", nativeQuery = true) | 46 | @Query(value = "SELECT * FROM MANIFEST WHERE USER_ID=?1", nativeQuery = true) |
35 | public List<ManifestEntity> queryByUserId(Long user_id); | 47 | public List<ManifestEntity> queryByUserId(Long user_id); |
48 | + | ||
49 | + | ||
36 | } | 50 | } |
@@ -8,6 +8,7 @@ import org.springframework.data.jpa.repository.Query; | @@ -8,6 +8,7 @@ import org.springframework.data.jpa.repository.Query; | ||
8 | import org.springframework.data.repository.PagingAndSortingRepository; | 8 | import org.springframework.data.repository.PagingAndSortingRepository; |
9 | 9 | ||
10 | import com.agent.entity.agent.PreparesecondaryEntity; | 10 | import com.agent.entity.agent.PreparesecondaryEntity; |
11 | +import org.springframework.transaction.annotation.Transactional; | ||
11 | 12 | ||
12 | public interface PreparesecondaryRepository extends PagingAndSortingRepository<PreparesecondaryEntity, Long>, | 13 | public interface PreparesecondaryRepository extends PagingAndSortingRepository<PreparesecondaryEntity, Long>, |
13 | JpaSpecificationExecutor<PreparesecondaryEntity>{ | 14 | JpaSpecificationExecutor<PreparesecondaryEntity>{ |
@@ -37,4 +38,8 @@ JpaSpecificationExecutor<PreparesecondaryEntity>{ | @@ -37,4 +38,8 @@ JpaSpecificationExecutor<PreparesecondaryEntity>{ | ||
37 | List<PreparesecondaryEntity> queryAll(); | 38 | List<PreparesecondaryEntity> queryAll(); |
38 | @Query(value = "SELECT * FROM PREPARESECONDARY WHERE USER_ID=?1", nativeQuery = true) | 39 | @Query(value = "SELECT * FROM PREPARESECONDARY WHERE USER_ID=?1", nativeQuery = true) |
39 | List<PreparesecondaryEntity> queryByUserId(Long user_id); | 40 | List<PreparesecondaryEntity> queryByUserId(Long user_id); |
41 | + @Transactional | ||
42 | + @Modifying | ||
43 | + @Query(value = "DELETE FROM PREPARESECONDARY WHERE PREPAREMASTERID = ?1", nativeQuery = true) | ||
44 | + void deleteSub(Long id); | ||
40 | } | 45 | } |
@@ -29,9 +29,15 @@ public interface UserRepository extends PagingAndSortingRepository<UserEntity, L | @@ -29,9 +29,15 @@ public interface UserRepository extends PagingAndSortingRepository<UserEntity, L | ||
29 | 29 | ||
30 | @Query(value = "SELECT u.* FROM sys_user u LEFT JOIN sys_role r ON r.id = u.role WHERE r.rolename IN (?1) AND u.isdelete='0'", nativeQuery = true) | 30 | @Query(value = "SELECT u.* FROM sys_user u LEFT JOIN sys_role r ON r.id = u.role WHERE r.rolename IN (?1) AND u.isdelete='0'", nativeQuery = true) |
31 | public List<UserEntity> findByRoleNames(String[] roleNames); | 31 | public List<UserEntity> findByRoleNames(String[] roleNames); |
32 | - //根据用户名设置密码 | 32 | + //根m据用户名设置密码 |
33 | @Transactional | 33 | @Transactional |
34 | @Modifying(clearAutomatically=true) | 34 | @Modifying(clearAutomatically=true) |
35 | @Query(value = "UPDATE SYS_USER SET password=?1 where loginaccount=?2", nativeQuery = true) | 35 | @Query(value = "UPDATE SYS_USER SET password=?1 where loginaccount=?2", nativeQuery = true) |
36 | public void updatePassword(String password, String loginacount); | 36 | public void updatePassword(String password, String loginacount); |
37 | + | ||
38 | + @Query(value = "SELECT * FROM sys_user", nativeQuery = true) | ||
39 | + List<UserEntity> findAlls(); | ||
40 | + | ||
41 | + @Query(value = "select * from sys_user where LOGINACCOUNT = ?1", nativeQuery = true) | ||
42 | + UserEntity findLoginaccount(String loginaccount); | ||
37 | } | 43 | } |
@@ -134,6 +134,7 @@ public class ManifestService extends BasicService<ManifestEntity> { | @@ -134,6 +134,7 @@ public class ManifestService extends BasicService<ManifestEntity> { | ||
134 | Specification<ManifestEntity> spec = buildSpecification(pageForm); | 134 | Specification<ManifestEntity> spec = buildSpecification(pageForm); |
135 | 135 | ||
136 | Page<ManifestEntity> page = manifestRepository.findAll(spec, pageRequest); | 136 | Page<ManifestEntity> page = manifestRepository.findAll(spec, pageRequest); |
137 | + | ||
137 | if (page != null && page.getContent() != null) { | 138 | if (page != null && page.getContent() != null) { |
138 | List<ManifestEntity> list = page.getContent(); | 139 | List<ManifestEntity> list = page.getContent(); |
139 | for (int i = 0; i < list.size(); i++) { | 140 | for (int i = 0; i < list.size(); i++) { |
@@ -192,6 +193,20 @@ public class ManifestService extends BasicService<ManifestEntity> { | @@ -192,6 +193,20 @@ public class ManifestService extends BasicService<ManifestEntity> { | ||
192 | } | 193 | } |
193 | } | 194 | } |
194 | 195 | ||
196 | + @Transactional | ||
197 | + public void trueDeleteAll(String ids) { | ||
198 | + List<String> list = Splitter.on(",").trimResults().omitEmptyStrings().splitToList(ids); | ||
199 | + for (String id : list) { | ||
200 | + | ||
201 | +// ManifestEntity manifest = manifestRepository.findOne(Long.valueOf(id)); | ||
202 | +// if (manifest != null) { | ||
203 | + // 先删除子表信息 | ||
204 | + preparesecondaryRepository.deleteSub(Long.valueOf(id)); | ||
205 | +// } | ||
206 | + manifestRepository.trueDelete(Long.valueOf(id)); | ||
207 | + } | ||
208 | + } | ||
209 | + | ||
195 | public List<ManifestEntity> findByMawbNo(String mawbNo) { | 210 | public List<ManifestEntity> findByMawbNo(String mawbNo) { |
196 | return manifestRepository.findByMawbNo(mawbNo, Tools.getUserId()); | 211 | return manifestRepository.findByMawbNo(mawbNo, Tools.getUserId()); |
197 | } | 212 | } |
@@ -1025,4 +1040,13 @@ public class ManifestService extends BasicService<ManifestEntity> { | @@ -1025,4 +1040,13 @@ public class ManifestService extends BasicService<ManifestEntity> { | ||
1025 | return body; | 1040 | return body; |
1026 | } | 1041 | } |
1027 | 1042 | ||
1043 | + | ||
1044 | + //修改主单号用户 | ||
1045 | + public void userUpdate(Long userId, Long ids){ | ||
1046 | + | ||
1047 | + preparesecondaryRepository.deleteSub(ids); | ||
1048 | + manifestRepository.userUpdate(userId, ids); | ||
1049 | + | ||
1050 | + } | ||
1051 | + | ||
1028 | } | 1052 | } |
@@ -39,6 +39,15 @@ public class UserService extends BasicService<UserEntity> { | @@ -39,6 +39,15 @@ public class UserService extends BasicService<UserEntity> { | ||
39 | return page; | 39 | return page; |
40 | } | 40 | } |
41 | 41 | ||
42 | + | ||
43 | + /** | ||
44 | + * 查询所有用户 | ||
45 | + */ | ||
46 | + public List<UserEntity> findAll(){ | ||
47 | + | ||
48 | + return userDao.findAlls(); | ||
49 | + } | ||
50 | + | ||
42 | /** | 51 | /** |
43 | * 根据id 查询 | 52 | * 根据id 查询 |
44 | * | 53 | * |
@@ -138,4 +147,10 @@ public class UserService extends BasicService<UserEntity> { | @@ -138,4 +147,10 @@ public class UserService extends BasicService<UserEntity> { | ||
138 | //System.out.println("update loginaaccount and password:"+logincount+" "+password); | 147 | //System.out.println("update loginaaccount and password:"+logincount+" "+password); |
139 | userDao.updatePassword(password, logincount); | 148 | userDao.updatePassword(password, logincount); |
140 | } | 149 | } |
150 | + | ||
151 | + //查询该用户是否存在 | ||
152 | + public UserEntity findLoginaccount(String loginaccount){ | ||
153 | + return userDao.findLoginaccount(loginaccount); | ||
154 | + } | ||
155 | + | ||
141 | } | 156 | } |
@@ -79,6 +79,7 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request. | @@ -79,6 +79,7 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request. | ||
79 | <li><a href="javascript:void(0)" onclick="addTab('<spring:message code="menu.role" />||system/role/list',this)"><spring:message code="menu.role" /></a></li> | 79 | <li><a href="javascript:void(0)" onclick="addTab('<spring:message code="menu.role" />||system/role/list',this)"><spring:message code="menu.role" /></a></li> |
80 | <li><a href="javascript:void(0)" onclick="addTab('<spring:message code="menu.agent" />||agent/list',this)"><spring:message code="menu.agent" /></a></li> | 80 | <li><a href="javascript:void(0)" onclick="addTab('<spring:message code="menu.agent" />||agent/list',this)"><spring:message code="menu.agent" /></a></li> |
81 | <li><a href="javascript:void(0)" onclick="addTab('<spring:message code="menu.user" />||system/user/list',this)"><spring:message code="menu.user" /></a></li> | 81 | <li><a href="javascript:void(0)" onclick="addTab('<spring:message code="menu.user" />||system/user/list',this)"><spring:message code="menu.user" /></a></li> |
82 | + <li><a href="javascript:void(0);" onclick="addTab('<spring:message code="menu.wbm" />||wbm/list',this)"><spring:message code="menu.wbm" /></a></li> | ||
82 | <%-- <li><a href="javascript:void(0)" onclick="addTab('<spring:message code="menu.consignee_info_set" />||consignee/list')"><spring:message code="menu.consignee_info_set" /></a></li> --%> | 83 | <%-- <li><a href="javascript:void(0)" onclick="addTab('<spring:message code="menu.consignee_info_set" />||consignee/list')"><spring:message code="menu.consignee_info_set" /></a></li> --%> |
83 | </ul> | 84 | </ul> |
84 | </li> | 85 | </li> |
1 | +<%-- | ||
2 | + Created by IntelliJ IDEA. | ||
3 | + User: lenovo | ||
4 | + Date: 2019/3/15 | ||
5 | + Time: 9:33 | ||
6 | + To change this template use File | Settings | File Templates. | ||
7 | +--%> | ||
8 | +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> | ||
9 | +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | ||
10 | +<% | ||
11 | + String path = request.getContextPath(); | ||
12 | + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; | ||
13 | +%> | ||
14 | +<!DOCTYPE html> | ||
15 | +<html lang="en"> | ||
16 | +<head> | ||
17 | + <meta charset="utf-8"> | ||
18 | + <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
19 | + <link href="<%=basePath %>resource/css/base.css" rel="stylesheet"> | ||
20 | + <link rel="stylesheet" href="<%=basePath %>resource/easyui/uimaker/easyui.css"> | ||
21 | + <link rel="stylesheet" type="text/css" href="<%=basePath %>resource/easyui/uimaker/icon.css"> | ||
22 | + <link rel="stylesheet" href="<%=basePath %>resource/css/providers.css"> | ||
23 | + | ||
24 | + <link rel="stylesheet" href="<%=basePath%>resource/layui/css/layui.css" media="all"> | ||
25 | + <script type="text/javascript" src="<%=basePath%>resource/easyui/jquery.min.js"></script> | ||
26 | + <script type="text/javascript" src="<%=basePath%>resource/layer-v3.0.3/layer/layer.js"></script> | ||
27 | + <script type="text/javascript" src="<%=basePath%>resource/layui/layui.js"></script> | ||
28 | + | ||
29 | +</head> | ||
30 | +<body> | ||
31 | +<div class="container"> | ||
32 | + <div data-options="closable:true"> | ||
33 | + <table id="dg" style="width:100%;" title="<spring:message code="wbm.list"/>" | ||
34 | + data-options=" | ||
35 | + rownumbers:true, | ||
36 | + singleSelect:false, | ||
37 | + autoRowHeight:false, | ||
38 | + pagination:true, | ||
39 | + fitColumns:true, | ||
40 | + striped:true, | ||
41 | + collapsible:true, | ||
42 | + toolbar:'#tb', | ||
43 | + pageSize:10"> | ||
44 | + <thead> | ||
45 | + <tr> | ||
46 | + <th field="." formatter="editFormat"><spring:message code="opt.edit" /></th> | ||
47 | + <th field="loginaccount"><spring:message code="manifest.loginaccount"/></th> | ||
48 | + <th field="agentCode"><spring:message code="manifest.agentCode"/></th> | ||
49 | + <th field="waybillnomaster" sortable="true"><spring:message code="manifest.bill.number"/></th> | ||
50 | + <th field="customscode"><spring:message code="manifest.customs"/></th> | ||
51 | + <th field="flightno" formatter="appendCarrier"><spring:message code="manifest.flight.number"/></th> | ||
52 | + <th field="flightdate" formatter="formatFlightDate"><spring:message code="manifest.flight.date"/></th> | ||
53 | + <th field="originatingstation"><spring:message code="manifest.starting.point"/></th> | ||
54 | + <th field="destinationstation"><spring:message code="manifest.destination"/></th> | ||
55 | + <th field="preparetotalpiece"><spring:message code="manifest.number.of.fittings"/></th> | ||
56 | + <th field="preparetotalweight"><spring:message code="manifest.pre.weight"/></th> | ||
57 | + <th field="response_text" formatter="checkResponseText" width="200"><spring:message code="manifest.response_text" /></th> | ||
58 | + <%--<th field=".." formatter="operatorFormat"><spring:message code="opt.operator" /></th>--%> | ||
59 | + </tr> | ||
60 | + </thead> | ||
61 | + </table> | ||
62 | + <div id="tb" style="padding:0 30px;"><input type="hidden" id="idcc"> | ||
63 | + <form id="searchForm"> | ||
64 | + <table class="search_form_table"> | ||
65 | + <spring:message code="manifest.bill.number"/>:<input id="manifnum" type="text" name="search_LIKE_waybillnomaster" style="width:166px;height:35px;line-height:35px;"> | ||
66 | + <spring:message code="manifest.flight.number"/>:<input class="easyui-textbox" type="text" name="search_LIKE_flightno" style="width:166px;height:35px;line-height:35px;"> | ||
67 | + <a href="javascript:doSearch()" class="easyui-linkbutton" iconCls="icon-search" data-options="selected:true"><spring:message code="opt.search" /></a> | ||
68 | + <%--<a href="javascript:editRow()" class="easyui-linkbutton" style="background:#18A197;color:#FFF;border: 1px solid #18A197;" iconCls="icon-add"><spring:message code="opt.add" /></a>--%> | ||
69 | + <a href="javascript:doDelete()" class="easyui-linkbutton" style="background:red;color:#FFF;border: 1px solid red" iconCls="icon-no"><spring:message code="opt.delete" /></a> | ||
70 | + </table> | ||
71 | + </form> | ||
72 | + </div> | ||
73 | + </div> | ||
74 | + | ||
75 | +</div> | ||
76 | +<script type="text/javascript" src="<%=basePath %>resource/easyui/jquery.min.js"></script> | ||
77 | +<script type="text/javascript" src="<%=basePath %>resource/easyui/jquery.easyui.min.js"></script> | ||
78 | +<script type="text/javascript" src="<%=basePath %>resource/easyui/easyui-lang-${pageContext.response.locale}.js"></script> | ||
79 | +<script type="text/javascript" src="<%=basePath %>resource/easyui/datagrid-detailview.js"></script> | ||
80 | +<script type="text/javascript" src="<%=basePath %>resource/js/tools.js?version=${version}"></script> | ||
81 | +<!--弹出层引入的JS--> | ||
82 | +<script type="text/javascript" src="<%=basePath %>resource/layer-v3.0.3/layer/layer.js"></script> | ||
83 | +<script type="text/javascript"> | ||
84 | + | ||
85 | + function formatFlightDate(value, row, index){ | ||
86 | + return row.flightdate.split(" ")[0]; | ||
87 | + } | ||
88 | + | ||
89 | + function appendCarrier(value, row, index) { | ||
90 | + return row.carrier+row.flightno; | ||
91 | + } | ||
92 | + | ||
93 | + function checkResponseText(value, row, index) { | ||
94 | + var res = ''; | ||
95 | + if(value){ | ||
96 | + var start_yupei = value.indexOf("41301"); | ||
97 | + var start_yundi = value.indexOf("45201"); | ||
98 | + if(start_yupei>-1||start_yundi>-1){ | ||
99 | + // 成功 | ||
100 | + res = '<span style="color:green;">'+value+'</span>'; | ||
101 | + }else{ | ||
102 | + // 未通过或者未回执 | ||
103 | + var start_exception_ = value.indexOf("分单"); | ||
104 | + var start_exception_ = value.indexOf("主单"); | ||
105 | + if(start_exception_>-1||start_exception_>-1){ | ||
106 | + //没有回执 | ||
107 | + res = '<span style="color:black;">'+value+'</span>'; | ||
108 | + }else{ | ||
109 | + res = '<span style="color:red;">'+value+'</span>'; | ||
110 | + } | ||
111 | + } | ||
112 | + } | ||
113 | + | ||
114 | + return res; | ||
115 | + } | ||
116 | + | ||
117 | + $(function(){ | ||
118 | + function getPageNumber(){ | ||
119 | + var pageNumber = window.localStorage.getItem("pageNumber"); | ||
120 | + if(typeof(pageNumber) != "undefined") | ||
121 | + { | ||
122 | + try{ | ||
123 | + var pattern = /^\d+$/g; //判断是否是数字 | ||
124 | + | ||
125 | + //console.log(pageNumber.search(pattern)); | ||
126 | + | ||
127 | + if(pageNumber.search(pattern) >= 0) | ||
128 | + { | ||
129 | + var num = parseInt(pageNumber); | ||
130 | + return num; | ||
131 | + } | ||
132 | + return 1; | ||
133 | + } | ||
134 | + catch(e){ | ||
135 | + return 1; | ||
136 | + } | ||
137 | + } | ||
138 | + return 1; | ||
139 | + } | ||
140 | + | ||
141 | + //console.log(getPageNumber()); | ||
142 | + | ||
143 | + $('#dg').datagrid({ | ||
144 | + url:'<%=basePath %>wbm/grid.json', | ||
145 | + //queryParams:$("#searchForm").serializeJson(), | ||
146 | + pageNumber:getPageNumber(), | ||
147 | + view: detailview, | ||
148 | + detailFormatter:function(index,row){ | ||
149 | + return '<div id="ddv-' + index + '"style="padding:5px 0"></div>'; | ||
150 | + }, | ||
151 | + onExpandRow: function(index,row){ | ||
152 | + console.log("expand row index:"+index); | ||
153 | + $('#ddv-'+index).datagrid({ | ||
154 | + url:'<%=basePath %>wbm/sub/grid.json?mawbId='+row.id, | ||
155 | + fitColumns:true, | ||
156 | + singleSelect:true, | ||
157 | + loadMsg:'正在加载……', | ||
158 | + height:'auto', | ||
159 | + autoRowHeight:"true", | ||
160 | + columns:[[ | ||
161 | + {field:'.',title:'',formatter:editHbillFormat}, | ||
162 | + {field:'waybillnosecondary',title:'<spring:message code="manifest.odd.number"/>'}, | ||
163 | + {field:'originatingstation',title:'<spring:message code="manifest.starting.point"/>'}, | ||
164 | + {field:'destinationstation',title:'<spring:message code="manifest.destination"/>'}, | ||
165 | + {field:'preparepiece',title:'<spring:message code="manifest.number.of.fittings"/>'}, | ||
166 | + {field:'prepareweight',title:'<spring:message code="manifest.pre.weight"/>'}, | ||
167 | + {field:'response_text',width:160,title:'<spring:message code="manifest.response_text"/>', | ||
168 | + formatter:function(value, row, index){ | ||
169 | + var res = ''; | ||
170 | + if(value){ | ||
171 | + var start_yupei = value.indexOf("41301"); | ||
172 | + var start_yundi = value.indexOf("45201"); | ||
173 | + if(start_yupei>-1||start_yundi>-1){ | ||
174 | + // 成功 | ||
175 | + res = '<span style="color:green;">'+value+'</span>'; | ||
176 | + }else{ | ||
177 | + // 未通过或者未回执 | ||
178 | + var start_exception_1 = value.indexOf("分单"); | ||
179 | + var start_exception_2 = value.indexOf("主单"); | ||
180 | + if(start_exception_1>-1||start_exception_2>-1){ | ||
181 | + //没有回执 | ||
182 | + res = '<span style="color:black;">'+value+'</span>'; | ||
183 | + }else{ | ||
184 | + res = '<span style="color:red;">'+value+'</span>'; | ||
185 | + } | ||
186 | + } | ||
187 | + } | ||
188 | + | ||
189 | + return res; | ||
190 | + } | ||
191 | + }, | ||
192 | + {field:'..', title:'<spring:message code="opt.operator" />', formatter:preoperatorFormat, width:40} | ||
193 | + ]], | ||
194 | + onResize:function(){ | ||
195 | + $('#dg').datagrid('fixDetailRowHeight',index); | ||
196 | + }, | ||
197 | + onLoadSuccess:function(){ | ||
198 | + $('#dg').datagrid('resize'); | ||
199 | + } | ||
200 | + }); | ||
201 | + | ||
202 | + $('#dg').datagrid('fixDetailRowHeight',index); | ||
203 | + } | ||
204 | + }); | ||
205 | + }); | ||
206 | + | ||
207 | + function editFormat(val,row,index){ | ||
208 | + | ||
209 | + var html='<a href="javascript:void(0)" style="padding-left:10px;text-decoration:none;color:blue;padding-right:20px;" onclick="userUpdate('+row.id+')"><i class="iconfont"></i></a>' | ||
210 | + html += '<a href="javascript:void(0)" style="text-decoration:none;margin-left:20px;color:blue;" </a>'; | ||
211 | + return html; | ||
212 | + } | ||
213 | + | ||
214 | + //分单撤销按钮 | ||
215 | + function preoperatorFormat(val, row, index){ | ||
216 | + var html = "<a href='javascript:void(0)' style='text-decoration:none;color:blue;'></a>"; | ||
217 | + html+="<a href='javascript:void(0)' style='text-decoration:none;color:blue;margin-left:20px;'></a>"; | ||
218 | + return html; | ||
219 | + } | ||
220 | + | ||
221 | + function prebackout(id){ | ||
222 | + if(typeof(id) == "undefined") | ||
223 | + return; | ||
224 | + layer.confirm("确定要撤销吗?", function(flag){ | ||
225 | + layer.close(flag); | ||
226 | + $.ajax({ | ||
227 | + url:"<%=basePath %>/manifest/prebackout", | ||
228 | + data:{ | ||
229 | + id:id | ||
230 | + }, | ||
231 | + success:function(data){ | ||
232 | + if(data.status == 200) | ||
233 | + layer.alert("撤销请求已发送!"); | ||
234 | + else | ||
235 | + layer.alert("撤销请求发送失败!"); | ||
236 | + } | ||
237 | + }); | ||
238 | + }); | ||
239 | + } | ||
240 | + //主单撤销按钮 | ||
241 | + function operatorFormat(val, row, index){ | ||
242 | + var html = "<a href='javascript:void(0)' onclick='backout("+row.id+")' style='text-decoration:none;color:blue;'><spring:message code='opt.backout'/></a>"; | ||
243 | + html+="<a href='javascript:void(0)' onclick='openReceipt(\""+row.waybillnomaster+"\")' style='text-decoration:none;color:blue;margin-left:20px;'><spring:message code='opt.open.receipt'/></a>"; | ||
244 | + return html; | ||
245 | + } | ||
246 | + function backout(id){ | ||
247 | + if(typeof(id) == "undefined") | ||
248 | + return; | ||
249 | + layer.confirm("确定要撤销吗?", function(flag){ | ||
250 | + layer.close(flag); | ||
251 | + //提交到后台,发送一个撤销报文 | ||
252 | + $.ajax({ | ||
253 | + url:"<%=basePath %>/manifest/backout", | ||
254 | + data:{ | ||
255 | + id:id | ||
256 | + }, | ||
257 | + success:function(data){ | ||
258 | + if(data.status == 200) | ||
259 | + layer.alert("撤销请求已发送!"); | ||
260 | + else | ||
261 | + layer.alert("撤销请求发送失败!"); | ||
262 | + } | ||
263 | + }); | ||
264 | + }); | ||
265 | + } | ||
266 | + | ||
267 | + //查看分单回执 | ||
268 | + function openSubReceipt(waybill_no,subno){ | ||
269 | + if(typeof(waybill_no) == "undefined") | ||
270 | + return; | ||
271 | + if(typeof(subno) == "undefined") | ||
272 | + return; | ||
273 | + seeReceipt(waybill_no,subno,false); | ||
274 | + } | ||
275 | + | ||
276 | + //查看主单回执 | ||
277 | + function openReceipt(waybill_no){ | ||
278 | + if(typeof(waybill_no) == "undefined") | ||
279 | + return; | ||
280 | + seeReceipt(waybill_no,"",true); | ||
281 | + } | ||
282 | + | ||
283 | + function seeReceipt(waybill_no,sub_waybill_no,isMain){ | ||
284 | + layui.use('layer', function(){ | ||
285 | + var layer = layui.layer; | ||
286 | + var api="<%=basePath%>receipt/seeReceipt"; | ||
287 | + var params = "waybill_no="+waybill_no; | ||
288 | + if(!isMain){ | ||
289 | + params+="&sub_waybill_no="+sub_waybill_no; | ||
290 | + } | ||
291 | + var viewUrl = api+"?"+params; | ||
292 | + | ||
293 | + parent.layer.open({ | ||
294 | + type: 2, | ||
295 | + title: "<spring:message code='opt.open.receipt'/>", | ||
296 | + shadeClose: true, | ||
297 | + shade: 0.8, | ||
298 | + area: ['80%', '60%'], | ||
299 | + content: viewUrl | ||
300 | + }); | ||
301 | + }); | ||
302 | + } | ||
303 | + | ||
304 | + //制分单 | ||
305 | + function makeHawb(id){ | ||
306 | + window.location.href="<%=basePath %>manifest/subedit?mawbId="+id; | ||
307 | + } | ||
308 | + | ||
309 | + //分单编辑 | ||
310 | + function editHbillRow(id){ | ||
311 | + window.location.href="<%=basePath %>manifest/subedit?id="+id; | ||
312 | + } | ||
313 | + | ||
314 | + function editHbillFormat(val,row,index){ | ||
315 | + var html='<a href="javascript:void(0)" style="text-decoration:none;margin-left:20px;color:blue;" onclick="editHbillRow('+row.id+')"><i class="iconfont"></i></a>'; | ||
316 | +// html += '<a href="javascript:void(0)" style="text-decoration:none;margin-left:20px;color:red;" onclick="delHbillRow('+row.id+','+row.mawbId+','+index+')"><i class="iconfont"></i></a>'; | ||
317 | + return html; | ||
318 | + } | ||
319 | + | ||
320 | + | ||
321 | + function editRow(id){ | ||
322 | + var page = $("#dg").datagrid("getPager").data("pagination").options; | ||
323 | + window.localStorage.setItem("pageNumber", page.pageNumber); | ||
324 | + if(id==undefined){ | ||
325 | + window.location.href='<%=basePath %>manifest/edit?id='; | ||
326 | + }else{ | ||
327 | + window.location.href='<%=basePath %>manifest/edit?id='+id; | ||
328 | + } | ||
329 | + } | ||
330 | + | ||
331 | + function userUpdate(id) { | ||
332 | + // iframe层 | ||
333 | + layer.open({ | ||
334 | + type : 2, | ||
335 | + title : '修改主单号用户', | ||
336 | + maxmin : true, | ||
337 | + shadeClose : false, // 点击遮罩关闭层 | ||
338 | + area : [ '400px', '260px' ], | ||
339 | + content : '/wbm/edit/'+id | ||
340 | + }); | ||
341 | + } | ||
342 | + | ||
343 | + function doSearch(){ | ||
344 | + $('#dg').datagrid("options").queryParams=$("#searchForm").serializeJson(); | ||
345 | + $('#dg').datagrid("reload"); | ||
346 | + } | ||
347 | + | ||
348 | + function getIds() { | ||
349 | + var ids = []; | ||
350 | + var rows = $("#dg").datagrid('getChecked'); | ||
351 | + $.each(rows,function(key,v){ | ||
352 | + ids.push(v.id); | ||
353 | + }); | ||
354 | + return ids; | ||
355 | + } | ||
356 | + | ||
357 | + //分单删除 | ||
358 | + function delHbillRow(id,mawbId,index){ | ||
359 | + $.post("<%=basePath %>wbm/subdelete",{id:id},function(data){ | ||
360 | + if(data.status == 200) { | ||
361 | + $('#ddv-'+index).datagrid({ | ||
362 | + url:'<%=basePath %>wbm/sub/grid.json?mawbId='+id, | ||
363 | + queryParams:$("#searchForm").serializeJson(), | ||
364 | + fitColumns:true, | ||
365 | + singleSelect:true, | ||
366 | + loadMsg:'', | ||
367 | + height:'auto', | ||
368 | + columns:[[ | ||
369 | + {field:'.',title:'<spring:message code="opt.name"/>',formatter:editHbillFormat,width:80}, | ||
370 | + {field:'hawbNo',title:'<spring:message code="bill.hawbNo"/>',width:100}, | ||
371 | + {field:'totalPieces',title:'<spring:message code="bill.pieces"/>',width:100}, | ||
372 | + {field:'grossWeight',title:'<spring:message code="bill.weightcharge"/>',width:100}, | ||
373 | + {field:'productname',title:'<spring:message code="bill.productname"/>',width:100}, | ||
374 | + {field:'departureStation',title:'<spring:message code="bill.orilocation"/>',width:100}, | ||
375 | + {field:'destinationStation',title:'<spring:message code="bill.destination"/>',width:100}, | ||
376 | + ]], | ||
377 | + onResize:function(){ | ||
378 | + $('#dg').datagrid('fixDetailRowHeight',index); | ||
379 | + }, | ||
380 | + onLoadSuccess:function(){ | ||
381 | + setTimeout(function(){ | ||
382 | + $('#dg').datagrid('fixDetailRowHeight',index); | ||
383 | + },0); | ||
384 | + } | ||
385 | + //onClickRow: editHbillRow | ||
386 | + | ||
387 | + }) | ||
388 | + layer.open({content:"<spring:message code="opt.success"/>"}); | ||
389 | + }else{ | ||
390 | + layer.open({content:"<spring:message code="opt.delfailed"/>!"}); | ||
391 | + } | ||
392 | + },"json"); | ||
393 | + } | ||
394 | + | ||
395 | + | ||
396 | + function doDelete(){ | ||
397 | + var rows = $("#dg").datagrid('getChecked'); | ||
398 | + if(rows.length==0){ | ||
399 | + layer.open({content:"<spring:message code="opt.selectone" />"}); | ||
400 | + return false; | ||
401 | + } | ||
402 | + layer.confirm("<spring:message code="opt.confirmdel" />?", {btn:['<spring:message code="opt.confirm" />','<spring:message code="opt.cancel" />']},function () { | ||
403 | + $.post("<%=basePath %>wbm/delete",{ids:getIds().join(",")},function(data){ | ||
404 | + if(data.status == 200) { | ||
405 | + layer.confirm("<spring:message code="opt.delsuccess" />!",{btn:['<spring:message code="opt.confirm" />','<spring:message code="opt.cancel" />']},function(){ | ||
406 | + window.location.href="<%=basePath %>wbm/list"; | ||
407 | + }) | ||
408 | + }else{ | ||
409 | + layer.open({content:"<spring:message code="opt.delfailed" />!"}); | ||
410 | + } | ||
411 | + },"json"); | ||
412 | + | ||
413 | + }); | ||
414 | + } | ||
415 | + | ||
416 | + $("#manifnum").keyup(function(){ | ||
417 | + var leng = $("#manifnum").val().length; | ||
418 | + if (leng == 3) | ||
419 | + { | ||
420 | + $("#manifnum").val( $("#manifnum").val()+"-") | ||
421 | + } | ||
422 | + }) | ||
423 | +</script> | ||
424 | +</body> | ||
425 | +</html> | ||
426 | + | ||
427 | + |
1 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | ||
2 | +<%-- | ||
3 | + Created by IntelliJ IDEA. | ||
4 | + User: lenovo | ||
5 | + Date: 2019/3/15 | ||
6 | + Time: 16:24 | ||
7 | + To change this template use File | Settings | File Templates. | ||
8 | +--%> | ||
9 | +<%@ page contentType="text/html;charset=UTF-8" language="java" %> | ||
10 | +<% | ||
11 | + String path = request.getContextPath(); | ||
12 | + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; | ||
13 | +%> | ||
14 | +<html> | ||
15 | +<head> | ||
16 | + <title>Title</title> | ||
17 | + <meta charset="utf-8"> | ||
18 | + <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
19 | + <link href="<%=basePath %>resource/css/base.css" rel="stylesheet"> | ||
20 | + <link href="<%=basePath %>resource/css/basic_info.css" rel="stylesheet"> | ||
21 | + <link rel="stylesheet" href="<%=basePath %>resource/easyui/uimaker/easyui.css"> | ||
22 | + <link href="<%=basePath %>resource/css/form.css" rel="stylesheet"> | ||
23 | + <link rel="stylesheet" href="<%=basePath %>resource/css/form.css"> | ||
24 | + <script type="text/javascript" src="<%=basePath %>resource/easyui/jquery.min.js"></script> | ||
25 | + <script type="text/javascript" src="<%=basePath %>resource/validate/jquery.validate.js"></script> | ||
26 | + <script type="text/javascript" src="<%=basePath %>resource/validate/validate-extends.js"></script> | ||
27 | + | ||
28 | + <script type="text/javascript" src="<%=basePath %>resource/js/tools.js"></script> | ||
29 | + <!-- validate 验证中英文 --> | ||
30 | + <script type="text/javascript" src="<%=basePath %>resource/validate/jquery.validate-${pageContext.response.locale}.js"></script> | ||
31 | +</head> | ||
32 | +<body> | ||
33 | +<div class="container"> | ||
34 | + <div class="content"> | ||
35 | + <form class="from-control" id="form"> | ||
36 | + <input type="hidden" id="id" name="id" value="${manifest.id }"> | ||
37 | + <div></div> | ||
38 | + <div> | ||
39 | + <table class="kv-table"> | ||
40 | + <tbody> | ||
41 | + <div> | ||
42 | + <tr class="kv-content"> | ||
43 | + <td style="background-color: #EBEDF4; color: black;" class="kv-label" colspan="6">用户账号</td> | ||
44 | + <td style="background-color: #EBEDF4; color: black;" class="kv-label" colspan="6"> | ||
45 | + <%--<select id="user_update" required>--%> | ||
46 | + <%--<c:forEach var="user" items="${userList}">--%> | ||
47 | + <%--<option id = "${user.id}">${user.loginaccount}</option>--%> | ||
48 | + <%--</c:forEach>--%> | ||
49 | + <%--</select>--%> | ||
50 | + <input type="text" id = "loginaccount" name = "loginacciunt" value="${wbm.loginaccount}"> | ||
51 | + </td> | ||
52 | + </tr> | ||
53 | + <tr class="kv-content"> | ||
54 | + <td style="background-color: #EBEDF4; color: black;" class="kv-label" colspan="2"> | ||
55 | + <button type="button" class="layui-btn layui-btn-sm layui-icon layui-icon-user" id="subbtn"> | ||
56 | + <i class="fa fa-trash hidden" aria-hidden="true"></i>提交 | ||
57 | + </button> | ||
58 | + </td> | ||
59 | + </tr> | ||
60 | + </div> | ||
61 | + </tbody> | ||
62 | + </table> | ||
63 | + </div> | ||
64 | + </form> | ||
65 | + </div> | ||
66 | +</div> | ||
67 | + | ||
68 | +<script type="text/javascript"> | ||
69 | + | ||
70 | + | ||
71 | + $("#subbtn").on("click",function () { | ||
72 | + var userId = ""; | ||
73 | + console.log("success"); | ||
74 | + | ||
75 | + var loginaccount = $("#loginaccount").val(); | ||
76 | + var idss = $('#user_update>option:selected'); | ||
77 | + idss.val(function(){ | ||
78 | + userId = (this.id); | ||
79 | + }); | ||
80 | + | ||
81 | + var ids = $("#id").val(); | ||
82 | + $.ajax({ | ||
83 | + type : 'POST', | ||
84 | + // contentType: 'application/json; charset=UTF-8', | ||
85 | + data : { | ||
86 | + "ids" : ids, | ||
87 | + "userId" : userId, | ||
88 | + "loginaccount":loginaccount | ||
89 | + }, | ||
90 | + url :"<%=basePath%>wbm/userUpdate", | ||
91 | + success : function(data) { | ||
92 | + console.log(data) | ||
93 | + if (data.status != 200) { | ||
94 | + alert("该账号不存在"); | ||
95 | + }else { | ||
96 | + // parent.reLoad(); | ||
97 | + alert("修改成功"); | ||
98 | + window.parent.location.reload(); | ||
99 | + var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引 | ||
100 | + parent.layer.close(index); | ||
101 | + } | ||
102 | + } | ||
103 | + }); | ||
104 | + }) | ||
105 | + | ||
106 | + | ||
107 | +</script> | ||
108 | +</body> | ||
109 | +</html> |
-
请 注册 或 登录 后发表评论