正在显示
20 个修改的文件
包含
2776 行增加
和
12 行删除
@@ -399,8 +399,7 @@ public class SecurityDeclarationController { | @@ -399,8 +399,7 @@ public class SecurityDeclarationController { | ||
399 | //生成相对路径 | 399 | //生成相对路径 |
400 | URL resource = this.getClass().getClassLoader().getResource("/"); | 400 | URL resource = this.getClass().getClassLoader().getResource("/"); |
401 | String path = resource.getPath(); | 401 | String path = resource.getPath(); |
402 | - String w = path.substring(0, path.indexOf("R")); | ||
403 | - String s = w +"/agent/resource/img/bar_code/"+replace+".png"; | 402 | + String s = path +"../../resource/img/bar_code/"+replace+".png"; |
404 | //生成条形码 | 403 | //生成条形码 |
405 | BarCodeUtil.generateFile(replace, s); | 404 | BarCodeUtil.generateFile(replace, s); |
406 | 405 |
1 | +package com.agent.controller.system; | ||
2 | + | ||
3 | +import com.agent.entity.agent.CargoCountEntity; | ||
4 | +import com.agent.entity.system.RoleEntity; | ||
5 | +import com.agent.entity.system.UserEntity; | ||
6 | +import com.agent.service.system.CargoCountService; | ||
7 | +import com.agent.vo.agent.CargoCountVo; | ||
8 | +import com.agent.vo.agent.UserVo; | ||
9 | +import com.framework.core.Servlets; | ||
10 | +import com.plugin.easyui.DataGrid; | ||
11 | +import com.plugin.easyui.EasyPage; | ||
12 | +import org.apache.commons.collections.CollectionUtils; | ||
13 | +import org.springframework.stereotype.Controller; | ||
14 | +import org.springframework.ui.Model; | ||
15 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
16 | +import org.springframework.web.bind.annotation.RequestParam; | ||
17 | +import org.springframework.web.bind.annotation.ResponseBody; | ||
18 | + | ||
19 | +import javax.annotation.Resource; | ||
20 | +import javax.servlet.http.HttpServletRequest; | ||
21 | +import java.util.ArrayList; | ||
22 | +import java.util.List; | ||
23 | +import java.util.Map; | ||
24 | + | ||
25 | +/** | ||
26 | + * @Auther: shenhl | ||
27 | + * @Date: 2019/6/18 18:07 | ||
28 | + */ | ||
29 | + | ||
30 | +@RequestMapping(value = "/cargo") | ||
31 | +@Controller | ||
32 | +public class CargoController { | ||
33 | + | ||
34 | + | ||
35 | + @Resource | ||
36 | + CargoCountService cargoCountService; | ||
37 | + | ||
38 | + @RequestMapping("/list") | ||
39 | + public String list(){ | ||
40 | + return "cargo/cargo"; | ||
41 | + } | ||
42 | + | ||
43 | + /** | ||
44 | + * 查询用户分页 | ||
45 | + * @return | ||
46 | + */ | ||
47 | + @RequestMapping(value="grid.json") | ||
48 | + @ResponseBody | ||
49 | + public DataGrid<CargoCountVo> grid(HttpServletRequest request, EasyPage<CargoCountEntity> pageForm) { | ||
50 | + Map<String, Object> searchParams = Servlets.getParametersStartingWith(request, "search_"); | ||
51 | + if (!searchParams.containsKey("LIKE_tstype")){ | ||
52 | + searchParams.put("LIKE_tstype", 1); | ||
53 | + } | ||
54 | + | ||
55 | + | ||
56 | + pageForm.setSearchParams(searchParams); | ||
57 | + pageForm.parseData(cargoCountService.getPage(pageForm)); | ||
58 | + DataGrid<CargoCountEntity> cargoCountEntityDataGrid = pageForm.getData(); | ||
59 | + | ||
60 | + | ||
61 | + List<CargoCountVo> cargoCountVos = new ArrayList<>(); | ||
62 | + if(CollectionUtils.isNotEmpty(cargoCountEntityDataGrid.getRows())){ | ||
63 | + for (CargoCountEntity cargo: cargoCountEntityDataGrid.getRows()){ | ||
64 | + CargoCountVo vo = new CargoCountVo(); | ||
65 | + vo.setForshort(cargo.getForshort()); | ||
66 | + vo.setFullname(cargo.getFullname()); | ||
67 | + if ("1".equals(cargo.getTstype())){ | ||
68 | + vo.setTstype("发货人"); | ||
69 | + }else if ("2".equals(cargo.getTstype())){ | ||
70 | + vo.setTstype("订舱代理"); | ||
71 | + }else { | ||
72 | + vo.setTstype("操作代理"); | ||
73 | + } | ||
74 | + vo.setContacts(cargo.getContacts()); | ||
75 | + vo.setPhone(cargo.getPhone()); | ||
76 | + vo.setWaybill(cargo.getWaybill()); | ||
77 | + vo.setCustomsstatus(cargo.getCustomsstatus()); | ||
78 | + vo.setFlightno(cargo.getFlightno()); | ||
79 | + vo.setFlightdate(cargo.getFlightdate()); | ||
80 | + vo.setOrig(cargo.getOrig()); | ||
81 | + vo.setDest(cargo.getDest()); | ||
82 | + vo.setPiece(cargo.getPiece()); | ||
83 | + vo.setWeight(cargo.getWeight()); | ||
84 | + vo.setRetext(cargo.getRetext()); | ||
85 | + vo.setLoginname(cargo.getLoginname()); | ||
86 | + vo.setCodes(cargo.getCodes()); | ||
87 | + | ||
88 | + cargoCountVos.add(vo); | ||
89 | + } | ||
90 | + } | ||
91 | + | ||
92 | + DataGrid<CargoCountVo> vos = new DataGrid<>(); | ||
93 | + vos.setRows(cargoCountVos); | ||
94 | + vos.setTotal(cargoCountEntityDataGrid.getTotal()); | ||
95 | + return vos; | ||
96 | + | ||
97 | + } | ||
98 | + | ||
99 | +} |
1 | +package com.agent.controller.system; | ||
2 | + | ||
3 | +import com.agent.entity.agent.HZSHIPPERINFORMATIONEntity; | ||
4 | +import com.agent.service.system.HzInfoService; | ||
5 | +import com.agent.util.HttpJsonMsg; | ||
6 | +import com.agent.vo.ResponseModel; | ||
7 | +import com.agent.vo.agent.HZSHIPPERINFORMATIONVo; | ||
8 | +import com.framework.core.Servlets; | ||
9 | +import com.framework.util.StringUtils; | ||
10 | +import com.plugin.easyui.DataGrid; | ||
11 | +import com.plugin.easyui.EasyPage; | ||
12 | +import org.apache.commons.collections.CollectionUtils; | ||
13 | +import org.slf4j.Logger; | ||
14 | +import org.slf4j.LoggerFactory; | ||
15 | +import org.springframework.stereotype.Controller; | ||
16 | +import org.springframework.ui.Model; | ||
17 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
18 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
19 | +import org.springframework.web.bind.annotation.ResponseBody; | ||
20 | + | ||
21 | +import javax.annotation.Resource; | ||
22 | +import javax.servlet.http.HttpServletRequest; | ||
23 | +import java.util.ArrayList; | ||
24 | +import java.util.List; | ||
25 | +import java.util.Map; | ||
26 | + | ||
27 | +/** | ||
28 | + * @Auther: shenhl | ||
29 | + * @Date: 2019/4/17 09:55 | ||
30 | + */ | ||
31 | +@RequestMapping(value = "/hzinfo") | ||
32 | +@Controller | ||
33 | +public class HzInfoController { | ||
34 | + | ||
35 | + private static final Logger logger = LoggerFactory.getLogger(HzInfoController.class); | ||
36 | + | ||
37 | + @Resource | ||
38 | + private HzInfoService hzInfoService; | ||
39 | + | ||
40 | + | ||
41 | + @RequestMapping(value = "/list") | ||
42 | + public String list(){ | ||
43 | + return "system/user/hzinfo"; | ||
44 | + } | ||
45 | + | ||
46 | + @RequestMapping(value = "/choosetHz") | ||
47 | + public String selectHz(){ | ||
48 | + return "hz/hzinfo"; | ||
49 | + } | ||
50 | + | ||
51 | + | ||
52 | + | ||
53 | + @RequestMapping(value = "/add") | ||
54 | + public String add(){ | ||
55 | + return "system/user/hzinfo_add"; | ||
56 | + } | ||
57 | + | ||
58 | + /** | ||
59 | + * 分页查询 | ||
60 | + * @param request | ||
61 | + * @param pageForm | ||
62 | + * @return | ||
63 | + */ | ||
64 | + @RequestMapping(value = "/grid.json") | ||
65 | + @ResponseBody | ||
66 | + public DataGrid<HZSHIPPERINFORMATIONVo> grid(HttpServletRequest request, EasyPage<HZSHIPPERINFORMATIONEntity> pageForm) { | ||
67 | + | ||
68 | + Map<String, Object> searchParams = Servlets.getParametersStartingWith(request, "search_"); | ||
69 | +// searchParams.put("LIKE_phone","17600319854"); | ||
70 | + searchParams.put("LIKE_delete_flag","1"); | ||
71 | + | ||
72 | + pageForm.setSearchParams(searchParams); | ||
73 | + pageForm.parseData(hzInfoService.getPage(pageForm)); | ||
74 | + DataGrid<HZSHIPPERINFORMATIONEntity> hzshipperinformationEntityDataGrid = pageForm.getData(); | ||
75 | + List<HZSHIPPERINFORMATIONVo>rows = new ArrayList<>(); | ||
76 | + if (CollectionUtils.isNotEmpty(hzshipperinformationEntityDataGrid.getRows())){ | ||
77 | + for (HZSHIPPERINFORMATIONEntity hz: hzshipperinformationEntityDataGrid.getRows()){ | ||
78 | + HZSHIPPERINFORMATIONVo hzvo = new HZSHIPPERINFORMATIONVo(); | ||
79 | + hzvo.setId(hz.getId()); | ||
80 | + hzvo.setForShort(hz.getFor_short()); | ||
81 | + hzvo.setFullName(hz.getFull_name()); | ||
82 | + hzvo.setContacts(hz.getContacts()); | ||
83 | + if ("1".equals(hz.getThe_shipper_type())){ | ||
84 | + hzvo.setTheShipperType("发货人"); | ||
85 | + }else if ("2".equals(hz.getThe_shipper_type())){ | ||
86 | + hzvo.setTheShipperType("订舱代理"); | ||
87 | + }else { | ||
88 | + hzvo.setTheShipperType("操作代理"); | ||
89 | + } | ||
90 | + | ||
91 | + hzvo.setPhone(hz.getPhone()); | ||
92 | + hzvo.setDeleteFlag(hz.getDelete_flag()); | ||
93 | + | ||
94 | + rows.add(hzvo); | ||
95 | + } | ||
96 | + } | ||
97 | + DataGrid<HZSHIPPERINFORMATIONVo> vos = new DataGrid<>(); | ||
98 | + vos.setRows(rows); | ||
99 | + vos.setTotal(hzshipperinformationEntityDataGrid.getTotal()); | ||
100 | + return vos; | ||
101 | + } | ||
102 | + | ||
103 | + /** | ||
104 | + * 添加 | ||
105 | + * @param hz | ||
106 | + * @param request | ||
107 | + * @return | ||
108 | + */ | ||
109 | + @RequestMapping("/save") | ||
110 | + @ResponseBody | ||
111 | + public ResponseModel save(HZSHIPPERINFORMATIONEntity hz, HttpServletRequest request){ | ||
112 | + ResponseModel model = new ResponseModel(); | ||
113 | + //获取对象值 | ||
114 | + String forshort = request.getParameter("forshort"); | ||
115 | + String fullname = request.getParameter("fullname"); | ||
116 | + //发货人 | ||
117 | + String one = request.getParameter("one"); | ||
118 | + //订舱代理 | ||
119 | + String two = request.getParameter("two"); | ||
120 | + //操作代理 | ||
121 | + String three = request.getParameter("three"); | ||
122 | + String contacts = request.getParameter("contacts"); | ||
123 | + String phone = request.getParameter("phone"); | ||
124 | + | ||
125 | + List<String> list = new ArrayList<>(); | ||
126 | + if (!StringUtils.isBlank(one)){ | ||
127 | + list.add(one); | ||
128 | + } | ||
129 | + if (!StringUtils.isBlank(two)){ | ||
130 | + list.add(two); | ||
131 | + } | ||
132 | + if (!StringUtils.isBlank(three)){ | ||
133 | + list.add(three); | ||
134 | + } | ||
135 | + | ||
136 | + | ||
137 | + for (String type: list){ | ||
138 | + switch (type) { | ||
139 | + case "1": | ||
140 | + if (hzInfoService.forShortShipperType(forshort, "1") == 0) { | ||
141 | + | ||
142 | + HZSHIPPERINFORMATIONEntity hzshipperinformationEntity = new HZSHIPPERINFORMATIONEntity(); | ||
143 | + | ||
144 | + hzshipperinformationEntity.setFor_short(forshort); | ||
145 | + hzshipperinformationEntity.setFull_name(fullname); | ||
146 | + hzshipperinformationEntity.setThe_shipper_type("1"); | ||
147 | + hzshipperinformationEntity.setContacts(contacts); | ||
148 | + hzshipperinformationEntity.setPhone(phone); | ||
149 | + hzshipperinformationEntity.setDelete_flag("1"); | ||
150 | + hzInfoService.save(hzshipperinformationEntity); | ||
151 | + model.setStatus(200); | ||
152 | + continue; | ||
153 | + }else { | ||
154 | + model.setStatus(201); | ||
155 | + break; | ||
156 | + } | ||
157 | + case "2": | ||
158 | + if (hzInfoService.forShortShipperType(forshort, "2") == 0) { | ||
159 | + HZSHIPPERINFORMATIONEntity hzshipperinformationEntity = new HZSHIPPERINFORMATIONEntity(); | ||
160 | + hzshipperinformationEntity.setFor_short(forshort); | ||
161 | + hzshipperinformationEntity.setFull_name(fullname); | ||
162 | + hzshipperinformationEntity.setThe_shipper_type("2"); | ||
163 | + hzshipperinformationEntity.setContacts(contacts); | ||
164 | + hzshipperinformationEntity.setPhone(phone); | ||
165 | + hzshipperinformationEntity.setDelete_flag("1"); | ||
166 | + hzInfoService.save(hzshipperinformationEntity); | ||
167 | + model.setStatus(200); | ||
168 | + continue; | ||
169 | + }else { | ||
170 | + model.setStatus(201); | ||
171 | + break; | ||
172 | + } | ||
173 | + case "3": | ||
174 | + if (hzInfoService.forShortShipperType(forshort, "3") == 0) { | ||
175 | + HZSHIPPERINFORMATIONEntity hzshipperinformationEntity = new HZSHIPPERINFORMATIONEntity(); | ||
176 | + hzshipperinformationEntity.setFor_short(forshort); | ||
177 | + hzshipperinformationEntity.setFull_name(fullname); | ||
178 | + hzshipperinformationEntity.setThe_shipper_type("3"); | ||
179 | + hzshipperinformationEntity.setContacts(contacts); | ||
180 | + hzshipperinformationEntity.setPhone(phone); | ||
181 | + hzshipperinformationEntity.setDelete_flag("1"); | ||
182 | + hzInfoService.save(hzshipperinformationEntity); | ||
183 | + model.setStatus(200); | ||
184 | + continue; | ||
185 | + }else { | ||
186 | + model.setStatus(201); | ||
187 | + break; | ||
188 | + } | ||
189 | + } | ||
190 | + } | ||
191 | + return model; | ||
192 | + | ||
193 | + } | ||
194 | + | ||
195 | + /** | ||
196 | + * 删除 | ||
197 | + * | ||
198 | + * @param ids | ||
199 | + * @return | ||
200 | + */ | ||
201 | + @RequestMapping(value = "/delete", method = { RequestMethod.POST }) | ||
202 | + @ResponseBody | ||
203 | + public ResponseModel delete(String ids) { | ||
204 | + ResponseModel model = new ResponseModel(); | ||
205 | + try { | ||
206 | + hzInfoService.deletes(ids); | ||
207 | + model.setStatus(200); | ||
208 | + model.setMsg(HttpJsonMsg.SUCCESS); | ||
209 | + } catch (Exception e) { | ||
210 | + model.setStatus(500); | ||
211 | + model.setMsg(HttpJsonMsg.ERROR); | ||
212 | + logger.error("系统异常 >>", e); | ||
213 | + } | ||
214 | + return model; | ||
215 | + } | ||
216 | + | ||
217 | + @RequestMapping(value = {"/edit" }, method = {RequestMethod.GET }) | ||
218 | + public String edit(Long id, Model model) { | ||
219 | + if (id != null) { | ||
220 | + HZSHIPPERINFORMATIONEntity hz = hzInfoService.findOne(id); | ||
221 | + model.addAttribute("entity", hz); | ||
222 | + } | ||
223 | + return "system/user/hzinfo_edit"; | ||
224 | + } | ||
225 | + | ||
226 | + /** | ||
227 | + * 修改 | ||
228 | + * @param hz | ||
229 | + * @param request | ||
230 | + * @return | ||
231 | + */ | ||
232 | + @RequestMapping(value = "/update") | ||
233 | + @ResponseBody | ||
234 | + public ResponseModel update(HZSHIPPERINFORMATIONEntity hz, HttpServletRequest request){ | ||
235 | + ResponseModel responseModel = new ResponseModel(); | ||
236 | + | ||
237 | + if (hzInfoService.forShortShipperType(hz.getFor_short(), hz.getThe_shipper_type())==0){ | ||
238 | + hz.setDelete_flag("1"); | ||
239 | + int update = hzInfoService.update(hz); | ||
240 | + if (update>0){ | ||
241 | + responseModel.setStatus(200); | ||
242 | + }else { | ||
243 | + responseModel.setStatus(202); | ||
244 | + } | ||
245 | + }else { | ||
246 | + responseModel.setStatus(201); | ||
247 | + } | ||
248 | + return responseModel; | ||
249 | + } | ||
250 | + | ||
251 | +} |
1 | +package com.agent.controller.system; | ||
2 | + | ||
3 | +import com.agent.controller.BasicController; | ||
4 | +import com.agent.entity.agent.BasicAgentEntity; | ||
5 | +import com.agent.entity.agent.ManifestEntity; | ||
6 | +import com.agent.entity.agent.PreparesecondaryEntity; | ||
7 | +import com.agent.entity.system.UserEntity; | ||
8 | +import com.agent.service.agent.BasicAgentService; | ||
9 | +import com.agent.service.agent.ManifestService; | ||
10 | +import com.agent.service.agent.PreparesecondaryService; | ||
11 | +import com.agent.service.system.UserService; | ||
12 | +import com.agent.util.HttpJsonMsg; | ||
13 | +import com.agent.vo.ResponseModel; | ||
14 | +import com.agent.vo.agent.ManifestVo; | ||
15 | +import com.framework.core.Servlets; | ||
16 | +import com.framework.shiro.SessionUtil; | ||
17 | +import com.plugin.easyui.DataGrid; | ||
18 | +import com.plugin.easyui.EasyPage; | ||
19 | +import org.apache.shiro.SecurityUtils; | ||
20 | +import org.slf4j.Logger; | ||
21 | +import org.slf4j.LoggerFactory; | ||
22 | +import org.springframework.stereotype.Controller; | ||
23 | +import org.springframework.ui.Model; | ||
24 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
25 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
26 | +import org.springframework.web.bind.annotation.RequestParam; | ||
27 | +import org.springframework.web.bind.annotation.ResponseBody; | ||
28 | +import tools.Tools; | ||
29 | +import tools.oclass.FemyList; | ||
30 | + | ||
31 | +import javax.annotation.Resource; | ||
32 | +import javax.servlet.http.HttpServletRequest; | ||
33 | +import java.util.ArrayList; | ||
34 | +import java.util.List; | ||
35 | +import java.util.Map; | ||
36 | +import java.util.Set; | ||
37 | + | ||
38 | +/** | ||
39 | + * @Auther: shenhl | ||
40 | + * @Date: 2019/3/15 09:52 | ||
41 | + */ | ||
42 | +@Controller | ||
43 | +@RequestMapping(value = "/wbm") | ||
44 | +public class WaybillnomasterController extends BasicController { | ||
45 | + | ||
46 | + private static final Logger logger = LoggerFactory.getLogger(com.agent.controller.agent.ManifestController.class); | ||
47 | + | ||
48 | + public static boolean isSuccess = false; | ||
49 | + | ||
50 | + @Resource | ||
51 | + private ManifestService manifestService; | ||
52 | + | ||
53 | + @Resource | ||
54 | + private PreparesecondaryService preparesecondaryServer; | ||
55 | + | ||
56 | + @Resource | ||
57 | + private BasicAgentService agentService; | ||
58 | + | ||
59 | + @Resource | ||
60 | + private UserService userService; | ||
61 | + | ||
62 | + | ||
63 | + @RequestMapping(value="/list") | ||
64 | + public String list() { | ||
65 | + return "system/user/wbm"; | ||
66 | + } | ||
67 | + | ||
68 | + | ||
69 | + /** | ||
70 | + * 查询分页数据 | ||
71 | + * | ||
72 | + * @return | ||
73 | + */ | ||
74 | + @RequestMapping(value = "/grid.json") | ||
75 | + @ResponseBody | ||
76 | + public DataGrid<ManifestVo> grid(HttpServletRequest request, EasyPage<ManifestEntity> pageForm) { | ||
77 | + Map<String, Object> searchParams = Servlets.getParametersStartingWith(request, "search_"); | ||
78 | + // searchParams.put("EQ_isdelete", 0); | ||
79 | + pageForm.setSearchParams(searchParams); | ||
80 | + // UserEntity ue = | ||
81 | + // (UserEntity)SecurityUtils.getSubject().getSession().getAttribute("user"); | ||
82 | + UserEntity ue = (UserEntity) SecurityUtils.getSubject().getSession().getAttribute("user"); | ||
83 | + if (ue != null) { | ||
84 | + Long u = ue.getId(); | ||
85 | + Set<String> sk = pageForm.getSearchParams().keySet(); | ||
86 | + | ||
87 | + if (Tools.getUserId() != null && Tools.getUserId() != 1) { | ||
88 | + // 不是管理员,添加用户id的条件 | ||
89 | + pageForm.getSearchParams().put("EQ_USER_ID", u); | ||
90 | + } | ||
91 | + } | ||
92 | + | ||
93 | + pageForm.parseData(manifestService.getPage(pageForm)); | ||
94 | + // | ||
95 | + DataGrid<ManifestEntity> manis = pageForm.getData(); | ||
96 | + List<ManifestVo> manifestVos = new ArrayList<>(); | ||
97 | + for (ManifestEntity mani : manis.getRows()){ | ||
98 | + ManifestVo manifestVo = new ManifestVo(); | ||
99 | + manifestVo.setId(mani.getId()); | ||
100 | + manifestVo.setUnlodingcode(mani.getUnlodingcode()); | ||
101 | + manifestVo.setCnecusid(mani.getCnecusid()); | ||
102 | + manifestVo.setShpcusid(mani.getShpcusid()); | ||
103 | + manifestVo.setShpaeo(mani.getShpaeo()); | ||
104 | + manifestVo.setCneaeo(mani.getCneaeo()); | ||
105 | + manifestVo.setFlightno(mani.getFlightno()); | ||
106 | + manifestVo.setFlightdate(mani.getFlightdate()); | ||
107 | + manifestVo.setOriginatingstation(mani.getOriginatingstation()); | ||
108 | + manifestVo.setDestinationstation(mani.getDestinationstation()); | ||
109 | + manifestVo.setWaybillnomaster(mani.getWaybillnomaster()); | ||
110 | + manifestVo.setTotalweight(mani.getTotalweight()); | ||
111 | + manifestVo.setTotalpiece(mani.getTotalpiece()); | ||
112 | + manifestVo.setPreparetotalpiece(mani.getPreparetotalpiece()); | ||
113 | + manifestVo.setPreparetotalweight(mani.getPreparetotalweight()); | ||
114 | + manifestVo.setAgentcompanycode(mani.getAgentcompanycode()); | ||
115 | + manifestVo.setStowagedate(mani.getStowagedate()); | ||
116 | + manifestVo.setStatus(mani.getStatus()); | ||
117 | + manifestVo.setCarrier(mani.getCarrier()); | ||
118 | + manifestVo.setCustomsstatus(mani.getCustomsstatus()); | ||
119 | + manifestVo.setPaymode(mani.getPaymode()); | ||
120 | + manifestVo.setSpecialgoodscode(mani.getSpecialgoodscode()); | ||
121 | + manifestVo.setCustomscode(mani.getCustomscode()); | ||
122 | + manifestVo.setAgentman(mani.getAgentman()); | ||
123 | + manifestVo.setAgentcompany(mani.getAgentcompany()); | ||
124 | + manifestVo.setReceiptinformation(mani.getReceiptinformation()); | ||
125 | + manifestVo.setCreatedate(mani.getCreatedate()); | ||
126 | + manifestVo.setProductname(mani.getProductname()); | ||
127 | + manifestVo.setUnnumber(mani.getUnnumber()); | ||
128 | + manifestVo.setCategory(mani.getCategory()); | ||
129 | + manifestVo.setSh_company(mani.getSh_company()); | ||
130 | + manifestVo.setSh_address(mani.getSh_address()); | ||
131 | + manifestVo.setSh_zipcode(mani.getSh_zipcode()); | ||
132 | + manifestVo.setSh_city(mani.getSh_city()); | ||
133 | + manifestVo.setSh_deltaname(mani.getSh_deltaname()); | ||
134 | + manifestVo.setSh_country(mani.getSh_country()); | ||
135 | + manifestVo.setSh_telephone(mani.getSh_telephone()); | ||
136 | + manifestVo.setSh_fax(mani.getSh_fax()); | ||
137 | + manifestVo.setSh_name(mani.getSh_name()); | ||
138 | + manifestVo.setCo_company(mani.getCo_company()); | ||
139 | + manifestVo.setCo_address(mani.getCo_address()); | ||
140 | + manifestVo.setCo_zipcode(mani.getCo_zipcode()); | ||
141 | + manifestVo.setCo_city(mani.getCo_city()); | ||
142 | + manifestVo.setCo_deltaname(mani.getCo_deltaname()); | ||
143 | + manifestVo.setCo_country(mani.getCo_country()); | ||
144 | + manifestVo.setCo_telephone(mani.getCo_telephone()); | ||
145 | + manifestVo.setCo_fax(mani.getCo_fax()); | ||
146 | + manifestVo.setCo_name(mani.getCo_name()); | ||
147 | + manifestVo.setReach_station(mani.getReach_station()); | ||
148 | + manifestVo.setCarrier1(mani.getCarrier1()); | ||
149 | + manifestVo.setReach_station1(mani.getReach_station1()); | ||
150 | + manifestVo.setCarrier2(mani.getCarrier2()); | ||
151 | + manifestVo.setReach_station2(mani.getReach_station2()); | ||
152 | + manifestVo.setName_ofgoods(mani.getName_ofgoods()); | ||
153 | + manifestVo.setDelivery_station(mani.getDelivery_station()); | ||
154 | + manifestVo.setSh_provincecode(mani.getSh_provincecode()); | ||
155 | + manifestVo.setSh_provincename(mani.getSh_provincename()); | ||
156 | + manifestVo.setDe_number(mani.getDe_number()); | ||
157 | + manifestVo.setDe_weight(mani.getDe_weight()); | ||
158 | + manifestVo.setDe_chweight(mani.getDe_chweight()); | ||
159 | + manifestVo.setDe_size(mani.getDe_size()); | ||
160 | + manifestVo.setDe_volume(mani.getDe_volume()); | ||
161 | + manifestVo.setDe_type(mani.getDe_type()); | ||
162 | + manifestVo.setDe_trstation(mani.getDe_trstation()); | ||
163 | + manifestVo.setDe_packing(mani.getDe_packing()); | ||
164 | + manifestVo.setDe_remarks(mani.getDe_remarks()); | ||
165 | + manifestVo.setDe_ids(mani.getDe_ids()); | ||
166 | + manifestVo.setResponse_code(mani.getResponse_code()); | ||
167 | + manifestVo.setResponse_text(mani.getResponse_text()); | ||
168 | + manifestVo.setSave_time(mani.getSave_time()); | ||
169 | + manifestVo.setUSER_ID(mani.getUSER_ID()); | ||
170 | + | ||
171 | + if(mani.getUSER_ID() != null){ | ||
172 | + UserEntity one = userService.findOne(mani.getUSER_ID()); | ||
173 | + manifestVo.setLoginaccount(one.getLoginaccount()); | ||
174 | + BasicAgentEntity one1 = agentService.findOne(one.getAgent()); | ||
175 | + manifestVo.setAgentCode(one1.getThreeCode()); | ||
176 | + } | ||
177 | + manifestVos.add(manifestVo); | ||
178 | + } | ||
179 | + DataGrid<ManifestVo> vo = new DataGrid<>(); | ||
180 | + vo.setRows(manifestVos); | ||
181 | + vo.setTotal(manis.getTotal()); | ||
182 | +// return pageForm.getData(); | ||
183 | + return vo; | ||
184 | + } | ||
185 | + | ||
186 | + /** | ||
187 | + * 模糊查询匹配信息 | ||
188 | + * @param id | ||
189 | + * @param model | ||
190 | + * @return | ||
191 | + */ | ||
192 | + @RequestMapping(value = "/infor") | ||
193 | + @ResponseBody | ||
194 | + public List<ManifestEntity> infor(String id, Model model) { | ||
195 | + List<ManifestEntity> li = null; | ||
196 | + if (Tools.getUserId() != null && Tools.getUserId().longValue() == 1) { | ||
197 | + li = manifestService.queryAll(); | ||
198 | + } else { | ||
199 | + li = manifestService.queryByUserId(Tools.getUserId()); | ||
200 | + } | ||
201 | + | ||
202 | + List<ManifestEntity> result = new FemyList(); | ||
203 | + for (ManifestEntity me : li) { | ||
204 | + if (result.contains(me)) { | ||
205 | + } else { | ||
206 | + result.add(me); | ||
207 | + } | ||
208 | + } | ||
209 | + return result; | ||
210 | + } | ||
211 | + | ||
212 | + /** | ||
213 | + * 模糊查询匹配信息 | ||
214 | + * @param id | ||
215 | + * @param model | ||
216 | + * @return | ||
217 | + */ | ||
218 | + @RequestMapping(value = "/inforPre") | ||
219 | + @ResponseBody | ||
220 | + public List<PreparesecondaryEntity> inforPre(String id, Model model) { | ||
221 | + List<PreparesecondaryEntity> li = preparesecondaryServer.queryByUserId(Tools.getUserId()); | ||
222 | + List<PreparesecondaryEntity> result = new FemyList(); | ||
223 | + for (PreparesecondaryEntity pe : li) { | ||
224 | + if (result.contains(pe)) { | ||
225 | + | ||
226 | + } else { | ||
227 | + result.add(pe); | ||
228 | + } | ||
229 | + } | ||
230 | + return result; | ||
231 | + } | ||
232 | + | ||
233 | + /** | ||
234 | + * 查询分制单分页数据 | ||
235 | + * | ||
236 | + * @return | ||
237 | + */ | ||
238 | + @RequestMapping(value = "/sub/grid.json") | ||
239 | + @ResponseBody | ||
240 | + public DataGrid<PreparesecondaryEntity> gridSub(Long mawbId, HttpServletRequest request) { | ||
241 | + DataGrid<PreparesecondaryEntity> dg = new DataGrid<>(); | ||
242 | + dg.setRows(preparesecondaryServer.findByMawbId(mawbId)); | ||
243 | + return dg; | ||
244 | + } | ||
245 | + | ||
246 | + | ||
247 | + /** | ||
248 | + * 删除 | ||
249 | + * | ||
250 | + * @param ids | ||
251 | + * @return | ||
252 | + */ | ||
253 | + @RequestMapping(value = "/delete", method = { RequestMethod.POST }) | ||
254 | + @ResponseBody | ||
255 | + public ResponseModel delete(String ids) { | ||
256 | + ResponseModel model = new ResponseModel(); | ||
257 | + try { | ||
258 | + manifestService.trueDeleteAll(ids); | ||
259 | + model.setStatus(200); | ||
260 | + model.setMsg(HttpJsonMsg.SUCCESS); | ||
261 | + } catch (Exception e) { | ||
262 | + e.printStackTrace(); | ||
263 | + model.setStatus(500); | ||
264 | + model.setMsg(HttpJsonMsg.ERROR); | ||
265 | + logger.error("系统异常 >>", e); | ||
266 | + } | ||
267 | + return model; | ||
268 | + } | ||
269 | + | ||
270 | + | ||
271 | + /** | ||
272 | + * 分单删除 | ||
273 | + * | ||
274 | + * @param id | ||
275 | + * @return | ||
276 | + */ | ||
277 | + @RequestMapping(value = "/subdelete", method = { RequestMethod.POST }) | ||
278 | + @ResponseBody | ||
279 | + public ResponseModel subdelete(Long id) { | ||
280 | + ResponseModel model = new ResponseModel(); | ||
281 | + try { | ||
282 | + preparesecondaryServer.delete(id); | ||
283 | + model.setStatus(200); | ||
284 | + model.setMsg(HttpJsonMsg.SUCCESS); | ||
285 | + } catch (Exception e) { | ||
286 | + model.setStatus(500); | ||
287 | + model.setMsg(HttpJsonMsg.ERROR); | ||
288 | + logger.error("系统异常 >>", e); | ||
289 | + } | ||
290 | + return model; | ||
291 | + } | ||
292 | + | ||
293 | + | ||
294 | + //编辑 | ||
295 | + @RequestMapping(value = "/edit") | ||
296 | + public String edit(Model model, Long id){ | ||
297 | + ManifestEntity manifest = null; | ||
298 | + UserEntity user = SessionUtil.getUser(); | ||
299 | + // 判断是否是便捷 | ||
300 | + if (id != null) { | ||
301 | + manifest = manifestService.findOne(id); | ||
302 | + user = userService.findOne(manifest.getUSER_ID()); | ||
303 | + } | ||
304 | + List<UserEntity> laList = userService.findAll(); | ||
305 | + //全部用户账户号 | ||
306 | + model.addAttribute("userList", laList); | ||
307 | + //主单号id | ||
308 | + model.addAttribute("manifest",manifest); | ||
309 | + model.addAttribute("wbm", user); | ||
310 | + return "system/user/wbm_edit"; | ||
311 | + } | ||
312 | + | ||
313 | + //修改 | ||
314 | + @RequestMapping(value = "/userUpdate") | ||
315 | + @ResponseBody | ||
316 | + public ResponseModel userUpdate(@RequestParam("ids") Long ids, | ||
317 | + @RequestParam("userId") Long userId, | ||
318 | + @RequestParam("loginaccount") String loginaccount){ | ||
319 | + ResponseModel rm = new ResponseModel(200,"",null); | ||
320 | + | ||
321 | + try { | ||
322 | + UserEntity user = userService.findLoginaccount(loginaccount); | ||
323 | + if (user.getId() != null){ | ||
324 | + manifestService.userUpdate(user.getId(), ids); | ||
325 | + rm.setStatus(200); | ||
326 | + }else { | ||
327 | + rm.setStatus(500); | ||
328 | + } | ||
329 | + }catch (Exception e){ | ||
330 | + e.printStackTrace(); | ||
331 | + rm.setStatus(500); | ||
332 | + } | ||
333 | + | ||
334 | + return rm; | ||
335 | + } | ||
336 | + | ||
337 | + | ||
338 | +} |
1 | +package com.agent.entity.agent; | ||
2 | + | ||
3 | +import com.agent.entity.IdEntity; | ||
4 | + | ||
5 | +import javax.persistence.Entity; | ||
6 | +import javax.persistence.Table; | ||
7 | +import java.util.Date; | ||
8 | + | ||
9 | +/** | ||
10 | + * @Auther: shenhl | ||
11 | + * @Date: 2019/6/18 19:02 | ||
12 | + */ | ||
13 | +@Entity | ||
14 | +@Table(name = "cargo_count") | ||
15 | +public class CargoCountEntity extends IdEntity{ | ||
16 | + | ||
17 | + /** | ||
18 | + * 简称 | ||
19 | + */ | ||
20 | + private String forshort; | ||
21 | + /** | ||
22 | + * 货主名称 | ||
23 | + */ | ||
24 | + private String fullname; | ||
25 | + /** | ||
26 | + * 货主类型 | ||
27 | + */ | ||
28 | + private String tstype; | ||
29 | + /** | ||
30 | + * 联系人 | ||
31 | + */ | ||
32 | + private String contacts; | ||
33 | + /** | ||
34 | + * 电话 | ||
35 | + */ | ||
36 | + private String phone; | ||
37 | + /** | ||
38 | + * 主单号 | ||
39 | + */ | ||
40 | + private String waybill; | ||
41 | + /** | ||
42 | + * 海关关区 | ||
43 | + */ | ||
44 | + private String customsstatus; | ||
45 | + /** | ||
46 | + * 航班号 | ||
47 | + */ | ||
48 | + private String flightno; | ||
49 | + /** | ||
50 | + * 航班日期 | ||
51 | + */ | ||
52 | + private Date flightdate; | ||
53 | + /** | ||
54 | + * 起始站 | ||
55 | + */ | ||
56 | + private String orig; | ||
57 | + /** | ||
58 | + * 目的站 | ||
59 | + */ | ||
60 | + private String dest; | ||
61 | + /** | ||
62 | + * 件数 | ||
63 | + */ | ||
64 | + private String piece; | ||
65 | + /** | ||
66 | + * 重量 | ||
67 | + */ | ||
68 | + private String weight; | ||
69 | + /** | ||
70 | + * 回执信息 | ||
71 | + */ | ||
72 | + private String retext; | ||
73 | + /** | ||
74 | + * 用户登录名称 | ||
75 | + */ | ||
76 | + private String loginname; | ||
77 | + /** | ||
78 | + * 货代信息 | ||
79 | + */ | ||
80 | + private String codes; | ||
81 | + | ||
82 | + public String getForshort() { | ||
83 | + return forshort; | ||
84 | + } | ||
85 | + | ||
86 | + public void setForshort(String forshort) { | ||
87 | + this.forshort = forshort; | ||
88 | + } | ||
89 | + | ||
90 | + public String getFullname() { | ||
91 | + return fullname; | ||
92 | + } | ||
93 | + | ||
94 | + public void setFullname(String fullname) { | ||
95 | + this.fullname = fullname; | ||
96 | + } | ||
97 | + | ||
98 | + public String getTstype() { | ||
99 | + return tstype; | ||
100 | + } | ||
101 | + | ||
102 | + public void setTstype(String tstype) { | ||
103 | + this.tstype = tstype; | ||
104 | + } | ||
105 | + | ||
106 | + public String getContacts() { | ||
107 | + return contacts; | ||
108 | + } | ||
109 | + | ||
110 | + public void setContacts(String contacts) { | ||
111 | + this.contacts = contacts; | ||
112 | + } | ||
113 | + | ||
114 | + public String getPhone() { | ||
115 | + return phone; | ||
116 | + } | ||
117 | + | ||
118 | + public void setPhone(String phone) { | ||
119 | + this.phone = phone; | ||
120 | + } | ||
121 | + | ||
122 | + public String getWaybill() { | ||
123 | + return waybill; | ||
124 | + } | ||
125 | + | ||
126 | + public void setWaybill(String waybill) { | ||
127 | + this.waybill = waybill; | ||
128 | + } | ||
129 | + | ||
130 | + public String getCustomsstatus() { | ||
131 | + return customsstatus; | ||
132 | + } | ||
133 | + | ||
134 | + public void setCustomsstatus(String customsstatus) { | ||
135 | + this.customsstatus = customsstatus; | ||
136 | + } | ||
137 | + | ||
138 | + public String getFlightno() { | ||
139 | + return flightno; | ||
140 | + } | ||
141 | + | ||
142 | + public void setFlightno(String flightno) { | ||
143 | + this.flightno = flightno; | ||
144 | + } | ||
145 | + | ||
146 | + public Date getFlightdate() { | ||
147 | + return flightdate; | ||
148 | + } | ||
149 | + | ||
150 | + public void setFlightdate(Date flightdate) { | ||
151 | + this.flightdate = flightdate; | ||
152 | + } | ||
153 | + | ||
154 | + public String getOrig() { | ||
155 | + return orig; | ||
156 | + } | ||
157 | + | ||
158 | + public void setOrig(String orig) { | ||
159 | + this.orig = orig; | ||
160 | + } | ||
161 | + | ||
162 | + public String getDest() { | ||
163 | + return dest; | ||
164 | + } | ||
165 | + | ||
166 | + public void setDest(String dest) { | ||
167 | + this.dest = dest; | ||
168 | + } | ||
169 | + | ||
170 | + public String getPiece() { | ||
171 | + return piece; | ||
172 | + } | ||
173 | + | ||
174 | + public void setPiece(String piece) { | ||
175 | + this.piece = piece; | ||
176 | + } | ||
177 | + | ||
178 | + public String getWeight() { | ||
179 | + return weight; | ||
180 | + } | ||
181 | + | ||
182 | + public void setWeight(String weight) { | ||
183 | + this.weight = weight; | ||
184 | + } | ||
185 | + | ||
186 | + public String getRetext() { | ||
187 | + return retext; | ||
188 | + } | ||
189 | + | ||
190 | + public void setRetext(String retext) { | ||
191 | + this.retext = retext; | ||
192 | + } | ||
193 | + | ||
194 | + public String getLoginname() { | ||
195 | + return loginname; | ||
196 | + } | ||
197 | + | ||
198 | + public void setLoginname(String loginname) { | ||
199 | + this.loginname = loginname; | ||
200 | + } | ||
201 | + | ||
202 | + public String getCodes() { | ||
203 | + return codes; | ||
204 | + } | ||
205 | + | ||
206 | + public void setCodes(String codes) { | ||
207 | + this.codes = codes; | ||
208 | + } | ||
209 | +} |
1 | +package com.agent.repository.system; | ||
2 | + | ||
3 | +import com.agent.entity.agent.CargoCountEntity; | ||
4 | +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; | ||
5 | +import org.springframework.data.repository.PagingAndSortingRepository; | ||
6 | + | ||
7 | +/** | ||
8 | + * @Auther: shenhl | ||
9 | + * @Date: 2019/6/18 19:15 | ||
10 | + */ | ||
11 | +public interface CargoCountRepository extends PagingAndSortingRepository<CargoCountEntity, Long>, | ||
12 | + JpaSpecificationExecutor<CargoCountEntity> { | ||
13 | +} |
@@ -34,4 +34,11 @@ public interface UserRepository extends PagingAndSortingRepository<UserEntity, L | @@ -34,4 +34,11 @@ public interface UserRepository extends PagingAndSortingRepository<UserEntity, L | ||
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); | ||
43 | + | ||
37 | } | 44 | } |
1 | +package com.agent.service.system; | ||
2 | + | ||
3 | +import com.agent.entity.agent.CargoCountEntity; | ||
4 | +import com.agent.repository.system.CargoCountRepository; | ||
5 | +import com.agent.service.BasicService; | ||
6 | +import com.plugin.easyui.EasyPage; | ||
7 | +import org.springframework.data.domain.Page; | ||
8 | +import org.springframework.data.domain.PageRequest; | ||
9 | +import org.springframework.data.jpa.domain.Specification; | ||
10 | +import org.springframework.stereotype.Service; | ||
11 | + | ||
12 | +import javax.annotation.Resource; | ||
13 | + | ||
14 | +/** | ||
15 | + * @Auther: shenhl | ||
16 | + * @Date: 2019/6/18 19:13 | ||
17 | + */ | ||
18 | +@Service | ||
19 | +public class CargoCountService extends BasicService<CargoCountEntity> { | ||
20 | + | ||
21 | + | ||
22 | + @Resource | ||
23 | + CargoCountRepository cargoCountRepository; | ||
24 | + | ||
25 | + /** | ||
26 | + * 分页查询 | ||
27 | + * | ||
28 | + * @param pageForm 分页对象 | ||
29 | + * @return 包含分页信息和数据的分页对象 | ||
30 | + */ | ||
31 | + public Page<CargoCountEntity> getPage(EasyPage<CargoCountEntity> pageForm) { | ||
32 | + | ||
33 | + PageRequest pageRequest = buildPageRequest(pageForm); | ||
34 | + Specification<CargoCountEntity> spec = buildSpecification(pageForm); | ||
35 | + Page<CargoCountEntity> page = cargoCountRepository.findAll(spec, pageRequest); | ||
36 | + return page; | ||
37 | + } | ||
38 | + | ||
39 | +} |
@@ -40,6 +40,14 @@ public class UserService extends BasicService<UserEntity> { | @@ -40,6 +40,14 @@ public class UserService extends BasicService<UserEntity> { | ||
40 | } | 40 | } |
41 | 41 | ||
42 | /** | 42 | /** |
43 | + * 查询所有用户 | ||
44 | + */ | ||
45 | + public List<UserEntity> findAll(){ | ||
46 | + | ||
47 | + return userDao.findAlls(); | ||
48 | + } | ||
49 | + | ||
50 | + /** | ||
43 | * 根据id 查询 | 51 | * 根据id 查询 |
44 | * | 52 | * |
45 | * @param id | 53 | * @param id |
@@ -138,4 +146,9 @@ public class UserService extends BasicService<UserEntity> { | @@ -138,4 +146,9 @@ public class UserService extends BasicService<UserEntity> { | ||
138 | //System.out.println("update loginaaccount and password:"+logincount+" "+password); | 146 | //System.out.println("update loginaaccount and password:"+logincount+" "+password); |
139 | userDao.updatePassword(password, logincount); | 147 | userDao.updatePassword(password, logincount); |
140 | } | 148 | } |
149 | + | ||
150 | + //查询该用户是否存在 | ||
151 | + public UserEntity findLoginaccount(String loginaccount){ | ||
152 | + return userDao.findLoginaccount(loginaccount); | ||
153 | + } | ||
141 | } | 154 | } |
1 | package com.agent.util; | 1 | package com.agent.util; |
2 | 2 | ||
3 | import cn.jiguang.common.utils.StringUtils; | 3 | import cn.jiguang.common.utils.StringUtils; |
4 | -import org.krysalis.barcode4j.impl.code39.Code39Bean; | 4 | +import org.krysalis.barcode4j.impl.code128.Code128Bean; |
5 | import org.krysalis.barcode4j.output.bitmap.BitmapCanvasProvider; | 5 | import org.krysalis.barcode4j.output.bitmap.BitmapCanvasProvider; |
6 | import org.krysalis.barcode4j.tools.UnitConv; | 6 | import org.krysalis.barcode4j.tools.UnitConv; |
7 | 7 | ||
@@ -53,16 +53,17 @@ public class BarCodeUtil { | @@ -53,16 +53,17 @@ public class BarCodeUtil { | ||
53 | return; | 53 | return; |
54 | } | 54 | } |
55 | 55 | ||
56 | - Code39Bean bean = new Code39Bean(); | 56 | +// Code39Bean bean = new Code39Bean(); |
57 | + Code128Bean bean = new Code128Bean(); | ||
57 | 58 | ||
58 | // 精细度 | 59 | // 精细度 |
59 | final int dpi = 150; | 60 | final int dpi = 150; |
60 | // module宽度 | 61 | // module宽度 |
61 | - final double moduleWidth = UnitConv.in2mm(1.0f / dpi); | 62 | + final double moduleWidth = UnitConv.in2mm(2.0f / dpi); |
62 | 63 | ||
63 | // 配置对象 | 64 | // 配置对象 |
64 | bean.setModuleWidth(moduleWidth); | 65 | bean.setModuleWidth(moduleWidth); |
65 | - bean.setWideFactor(3); | 66 | +// bean.setWideFactor(3); |
66 | bean.doQuietZone(false); | 67 | bean.doQuietZone(false); |
67 | 68 | ||
68 | String format = "image/png"; | 69 | String format = "image/png"; |
@@ -84,11 +85,11 @@ public class BarCodeUtil { | @@ -84,11 +85,11 @@ public class BarCodeUtil { | ||
84 | 85 | ||
85 | 86 | ||
86 | 87 | ||
87 | -// public static void main(String[] args) { | ||
88 | -// String msg = "172-27295203"; | ||
89 | -// String path = "D:/shangyou/agent/barcode.png"; | ||
90 | -// File file = generateFile(msg, path); | ||
91 | -// System.out.println(file); | ||
92 | -// } | 88 | + public static void main(String[] args) { |
89 | + String msg = "17227295203"; | ||
90 | + String path = "D:/barcode.png"; | ||
91 | + File file = generateFile(msg, path); | ||
92 | + System.out.println(file); | ||
93 | + } | ||
93 | 94 | ||
94 | } | 95 | } |
1 | +package com.agent.vo.agent; | ||
2 | + | ||
3 | +import java.util.Date; | ||
4 | + | ||
5 | +/** | ||
6 | + * @Auther: shenhl | ||
7 | + * @Date: 2019/6/18 19:19 | ||
8 | + */ | ||
9 | +public class CargoCountVo { | ||
10 | + | ||
11 | + /** | ||
12 | + * 简称 | ||
13 | + */ | ||
14 | + private String forshort; | ||
15 | + /** | ||
16 | + * 货主名称 | ||
17 | + */ | ||
18 | + private String fullname; | ||
19 | + /** | ||
20 | + * 货主类型 | ||
21 | + */ | ||
22 | + private String tstype; | ||
23 | + /** | ||
24 | + * 联系人 | ||
25 | + */ | ||
26 | + private String contacts; | ||
27 | + /** | ||
28 | + * 电话 | ||
29 | + */ | ||
30 | + private String phone; | ||
31 | + /** | ||
32 | + * 主单号 | ||
33 | + */ | ||
34 | + private String waybill; | ||
35 | + /** | ||
36 | + * 海关关区 | ||
37 | + */ | ||
38 | + private String customsstatus; | ||
39 | + /** | ||
40 | + * 航班号 | ||
41 | + */ | ||
42 | + private String flightno; | ||
43 | + /** | ||
44 | + * 航班日期 | ||
45 | + */ | ||
46 | + private Date flightdate; | ||
47 | + /** | ||
48 | + * 起始站 | ||
49 | + */ | ||
50 | + private String orig; | ||
51 | + /** | ||
52 | + * 目的站 | ||
53 | + */ | ||
54 | + private String dest; | ||
55 | + /** | ||
56 | + * 件数 | ||
57 | + */ | ||
58 | + private String piece; | ||
59 | + /** | ||
60 | + * 重量 | ||
61 | + */ | ||
62 | + private String weight; | ||
63 | + /** | ||
64 | + * 回执信息 | ||
65 | + */ | ||
66 | + private String retext; | ||
67 | + /** | ||
68 | + * 用户登录名称 | ||
69 | + */ | ||
70 | + private String loginname; | ||
71 | + /** | ||
72 | + * 货代信息 | ||
73 | + */ | ||
74 | + private String codes; | ||
75 | + | ||
76 | + /** | ||
77 | + * 总件数 | ||
78 | + * @return | ||
79 | + */ | ||
80 | + private int totalpiec; | ||
81 | + | ||
82 | + /** | ||
83 | + * 总重量 | ||
84 | + * @return | ||
85 | + */ | ||
86 | + private int totalweight; | ||
87 | + | ||
88 | + public int getTotalpiec() { | ||
89 | + return totalpiec; | ||
90 | + } | ||
91 | + | ||
92 | + public void setTotalpiec(int totalpiec) { | ||
93 | + this.totalpiec = totalpiec; | ||
94 | + } | ||
95 | + | ||
96 | + public int getTotalweight() { | ||
97 | + return totalweight; | ||
98 | + } | ||
99 | + | ||
100 | + public void setTotalweight(int totalweight) { | ||
101 | + this.totalweight = totalweight; | ||
102 | + } | ||
103 | + | ||
104 | + public String getForshort() { | ||
105 | + return forshort; | ||
106 | + } | ||
107 | + | ||
108 | + public void setForshort(String forshort) { | ||
109 | + this.forshort = forshort; | ||
110 | + } | ||
111 | + | ||
112 | + public String getFullname() { | ||
113 | + return fullname; | ||
114 | + } | ||
115 | + | ||
116 | + public void setFullname(String fullname) { | ||
117 | + this.fullname = fullname; | ||
118 | + } | ||
119 | + | ||
120 | + public String getTstype() { | ||
121 | + return tstype; | ||
122 | + } | ||
123 | + | ||
124 | + public void setTstype(String tstype) { | ||
125 | + this.tstype = tstype; | ||
126 | + } | ||
127 | + | ||
128 | + public String getContacts() { | ||
129 | + return contacts; | ||
130 | + } | ||
131 | + | ||
132 | + public void setContacts(String contacts) { | ||
133 | + this.contacts = contacts; | ||
134 | + } | ||
135 | + | ||
136 | + public String getPhone() { | ||
137 | + return phone; | ||
138 | + } | ||
139 | + | ||
140 | + public void setPhone(String phone) { | ||
141 | + this.phone = phone; | ||
142 | + } | ||
143 | + | ||
144 | + public String getWaybill() { | ||
145 | + return waybill; | ||
146 | + } | ||
147 | + | ||
148 | + public void setWaybill(String waybill) { | ||
149 | + this.waybill = waybill; | ||
150 | + } | ||
151 | + | ||
152 | + public String getCustomsstatus() { | ||
153 | + return customsstatus; | ||
154 | + } | ||
155 | + | ||
156 | + public void setCustomsstatus(String customsstatus) { | ||
157 | + this.customsstatus = customsstatus; | ||
158 | + } | ||
159 | + | ||
160 | + public String getFlightno() { | ||
161 | + return flightno; | ||
162 | + } | ||
163 | + | ||
164 | + public void setFlightno(String flightno) { | ||
165 | + this.flightno = flightno; | ||
166 | + } | ||
167 | + | ||
168 | + public Date getFlightdate() { | ||
169 | + return flightdate; | ||
170 | + } | ||
171 | + | ||
172 | + public void setFlightdate(Date flightdate) { | ||
173 | + this.flightdate = flightdate; | ||
174 | + } | ||
175 | + | ||
176 | + public String getOrig() { | ||
177 | + return orig; | ||
178 | + } | ||
179 | + | ||
180 | + public void setOrig(String orig) { | ||
181 | + this.orig = orig; | ||
182 | + } | ||
183 | + | ||
184 | + public String getDest() { | ||
185 | + return dest; | ||
186 | + } | ||
187 | + | ||
188 | + public void setDest(String dest) { | ||
189 | + this.dest = dest; | ||
190 | + } | ||
191 | + | ||
192 | + public String getPiece() { | ||
193 | + return piece; | ||
194 | + } | ||
195 | + | ||
196 | + public void setPiece(String piece) { | ||
197 | + this.piece = piece; | ||
198 | + } | ||
199 | + | ||
200 | + public String getWeight() { | ||
201 | + return weight; | ||
202 | + } | ||
203 | + | ||
204 | + public void setWeight(String weight) { | ||
205 | + this.weight = weight; | ||
206 | + } | ||
207 | + | ||
208 | + public String getRetext() { | ||
209 | + return retext; | ||
210 | + } | ||
211 | + | ||
212 | + public void setRetext(String retext) { | ||
213 | + this.retext = retext; | ||
214 | + } | ||
215 | + | ||
216 | + public String getLoginname() { | ||
217 | + return loginname; | ||
218 | + } | ||
219 | + | ||
220 | + public void setLoginname(String loginname) { | ||
221 | + this.loginname = loginname; | ||
222 | + } | ||
223 | + | ||
224 | + public String getCodes() { | ||
225 | + return codes; | ||
226 | + } | ||
227 | + | ||
228 | + public void setCodes(String codes) { | ||
229 | + this.codes = codes; | ||
230 | + } | ||
231 | +} |
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="loginname"><spring:message code="manifest.loginaccount"/></th> | ||
48 | + <th field="codes"><spring:message code="manifest.agentCode"/></th> | ||
49 | + <th field="contacts">联系人</th> | ||
50 | + <th field="phone">电话</th> | ||
51 | + <th field="tstype">货主类型</th> | ||
52 | + <th field="fullname">货主名称</th> | ||
53 | + <th field="forshort">货主简称</th> | ||
54 | + <th field="waybill" sortable="true"><spring:message code="manifest.bill.number"/></th> | ||
55 | + <th field="customsstatus"><spring:message code="manifest.customs"/></th> | ||
56 | + <th field="flightno"><spring:message code="manifest.flight.number"/></th> | ||
57 | + <th field="flightdate" formatter="formatFlightDate"><spring:message code="manifest.flight.date"/></th> | ||
58 | + <th field="orig"><spring:message code="manifest.starting.point"/></th> | ||
59 | + <th field="dest"><spring:message code="manifest.destination"/></th> | ||
60 | + <th id="tpie" field="piece"><spring:message code="manifest.number.of.fittings"/></th> | ||
61 | + <th id="twei" field="weight"><spring:message code="manifest.pre.weight"/></th> | ||
62 | + <th field="retext" formatter="checkResponseText" width="200"><spring:message code="manifest.response_text" /></th> | ||
63 | + <%--<th field=".." formatter="operatorFormat"><spring:message code="opt.operator" /></th>--%> | ||
64 | + </tr> | ||
65 | + </thead> | ||
66 | + </table> | ||
67 | + <div id="tb" style="padding:0 30px;"><input type="hidden" id="idcc"> | ||
68 | + <form id="searchForm"> | ||
69 | + <table class="search_form_table"> | ||
70 | + <select name="search_LIKE_tstype" id="tstype" style="width:166px;height:35px;line-height:35px;" > | ||
71 | + <option value="1">发货人</option> | ||
72 | + <option value="2">订舱代理</option> | ||
73 | + <option value="3">操作代理</option> | ||
74 | + </select> | ||
75 | + <a href="javascript:doSearch()" class="easyui-linkbutton" iconCls="icon-search" data-options="selected:true"><spring:message code="opt.search" /></a> | ||
76 | + </table> | ||
77 | + </form> | ||
78 | + | ||
79 | + 总件数:<span id = "totalpiec"></span> | ||
80 | + 总重量:<span id = "totalweight"></span> | ||
81 | + </div> | ||
82 | + </div> | ||
83 | + | ||
84 | +</div> | ||
85 | +<script type="text/javascript" src="<%=basePath %>resource/easyui/jquery.min.js"></script> | ||
86 | +<script type="text/javascript" src="<%=basePath %>resource/easyui/jquery.easyui.min.js"></script> | ||
87 | +<script type="text/javascript" src="<%=basePath %>resource/easyui/easyui-lang-${pageContext.response.locale}.js"></script> | ||
88 | +<script type="text/javascript" src="<%=basePath %>resource/easyui/datagrid-detailview.js"></script> | ||
89 | +<script type="text/javascript" src="<%=basePath %>resource/js/tools.js?version=${version}"></script> | ||
90 | +<!--弹出层引入的JS--> | ||
91 | +<script type="text/javascript" src="<%=basePath %>resource/layer-v3.0.3/layer/layer.js"></script> | ||
92 | +<script type="text/javascript"> | ||
93 | + | ||
94 | + function formatFlightDate(value, row, index){ | ||
95 | + return row.flightdate.split(" ")[0]; | ||
96 | + } | ||
97 | + | ||
98 | + // function appendCarrier(value, row, index) { | ||
99 | + // return row.carrier+row.flightno; | ||
100 | + // } | ||
101 | + | ||
102 | + function checkResponseText(value, row, index) { | ||
103 | + var res = ''; | ||
104 | + if(value){ | ||
105 | + var start_yupei = value.indexOf("41301"); | ||
106 | + var start_yundi = value.indexOf("45201"); | ||
107 | + if(start_yupei>-1||start_yundi>-1){ | ||
108 | + // 成功 | ||
109 | + res = '<span style="color:green;">'+value+'</span>'; | ||
110 | + }else{ | ||
111 | + // 未通过或者未回执 | ||
112 | + var start_exception_ = value.indexOf("分单"); | ||
113 | + var start_exception_ = value.indexOf("主单"); | ||
114 | + if(start_exception_>-1||start_exception_>-1){ | ||
115 | + //没有回执 | ||
116 | + res = '<span style="color:black;">'+value+'</span>'; | ||
117 | + }else{ | ||
118 | + res = '<span style="color:red;">'+value+'</span>'; | ||
119 | + } | ||
120 | + } | ||
121 | + } | ||
122 | + | ||
123 | + return res; | ||
124 | + } | ||
125 | + | ||
126 | + var totalpiece = 0; | ||
127 | + var totalweight = 0; | ||
128 | + | ||
129 | + $(function(){ | ||
130 | + function getPageNumber(){ | ||
131 | + var pageNumber = window.localStorage.getItem("pageNumber"); | ||
132 | + if(typeof(pageNumber) != "undefined") | ||
133 | + { | ||
134 | + try{ | ||
135 | + var pattern = /^\d+$/g; //判断是否是数字 | ||
136 | + | ||
137 | + //console.log(pageNumber.search(pattern)); | ||
138 | + | ||
139 | + if(pageNumber.search(pattern) >= 0) | ||
140 | + { | ||
141 | + var num = parseInt(pageNumber); | ||
142 | + return num; | ||
143 | + } | ||
144 | + return 1; | ||
145 | + } | ||
146 | + catch(e){ | ||
147 | + return 1; | ||
148 | + } | ||
149 | + } | ||
150 | + return 1; | ||
151 | + } | ||
152 | + | ||
153 | + //console.log(getPageNumber()); | ||
154 | + | ||
155 | + | ||
156 | + | ||
157 | + | ||
158 | + $('#dg').datagrid({ | ||
159 | + url:'<%=basePath %>cargo/grid.json', | ||
160 | + //queryParams:$("#searchForm").serializeJson(), | ||
161 | + pageNumber:getPageNumber(), | ||
162 | + view: detailview, | ||
163 | + detailFormatter:function(index,row){ | ||
164 | + $("#totalpiec").html(''); | ||
165 | + $("#totalweight").html(''); | ||
166 | + totalpiece += parseInt(row.piece); | ||
167 | + totalweight += parseInt(row.weight); | ||
168 | + | ||
169 | + | ||
170 | + $("#totalpiec").html(totalpiece); | ||
171 | + $("#totalweight").html(totalweight); | ||
172 | + | ||
173 | + return '<div id="ddv-' + index + '""></div>'; | ||
174 | + }, | ||
175 | + }); | ||
176 | + }); | ||
177 | + | ||
178 | + | ||
179 | + | ||
180 | + | ||
181 | + function editFormat(val,row,index){ | ||
182 | + | ||
183 | + 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>' | ||
184 | + html += '<a href="javascript:void(0)" style="text-decoration:none;margin-left:20px;color:blue;" </a>'; | ||
185 | + return html; | ||
186 | + } | ||
187 | + | ||
188 | + //分单撤销 | ||
189 | + function preoperatorFormat(val, row, index){ | ||
190 | + var html = "<a href='javascript:void(0)' onclick='prebackout("+row.id+")' style='text-decoration:none;color:blue;'><spring:message code='opt.delete'/></a>"; | ||
191 | + // html+="<a href='javascript:void(0)' style='text-decoration:none;color:blue;margin-left:20px;'></a>"; | ||
192 | + return html; | ||
193 | + } | ||
194 | + | ||
195 | + function prebackout(id){ | ||
196 | + if(typeof(id) == "undefined") | ||
197 | + return; | ||
198 | + layer.confirm("确定要撤销吗?", function(flag){ | ||
199 | + layer.close(flag); | ||
200 | + $.ajax({ | ||
201 | + url:"<%=basePath %>/manifest/prebackout", | ||
202 | + data:{ | ||
203 | + id:id | ||
204 | + }, | ||
205 | + success:function(data){ | ||
206 | + if(data.status == 200) | ||
207 | + layer.alert("撤销请求已发送!"); | ||
208 | + else | ||
209 | + layer.alert("撤销请求发送失败!"); | ||
210 | + } | ||
211 | + }); | ||
212 | + }); | ||
213 | + } | ||
214 | + //主单撤销按钮 | ||
215 | + function operatorFormat(val, row, index){ | ||
216 | + var html = "<a href='javascript:void(0)' onclick='backout("+row.id+")' style='text-decoration:none;color:blue;'><spring:message code='opt.backout'/></a>"; | ||
217 | + 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>"; | ||
218 | + return html; | ||
219 | + } | ||
220 | + function backout(id){ | ||
221 | + if(typeof(id) == "undefined") | ||
222 | + return; | ||
223 | + layer.confirm("确定要撤销吗?", function(flag){ | ||
224 | + layer.close(flag); | ||
225 | + //提交到后台,发送一个撤销报文 | ||
226 | + $.ajax({ | ||
227 | + url:"<%=basePath %>/manifest/backout", | ||
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 | + //查看分单回执 | ||
242 | + function openSubReceipt(waybill_no,subno){ | ||
243 | + if(typeof(waybill_no) == "undefined") | ||
244 | + return; | ||
245 | + if(typeof(subno) == "undefined") | ||
246 | + return; | ||
247 | + seeReceipt(waybill_no,subno,false); | ||
248 | + } | ||
249 | + | ||
250 | + //查看主单回执 | ||
251 | + function openReceipt(waybill_no){ | ||
252 | + if(typeof(waybill_no) == "undefined") | ||
253 | + return; | ||
254 | + seeReceipt(waybill_no,"",true); | ||
255 | + } | ||
256 | + | ||
257 | + function seeReceipt(waybill_no,sub_waybill_no,isMain){ | ||
258 | + layui.use('layer', function(){ | ||
259 | + var layer = layui.layer; | ||
260 | + var api="<%=basePath%>receipt/seeReceipt"; | ||
261 | + var params = "waybill_no="+waybill_no; | ||
262 | + if(!isMain){ | ||
263 | + params+="&sub_waybill_no="+sub_waybill_no; | ||
264 | + } | ||
265 | + var viewUrl = api+"?"+params; | ||
266 | + | ||
267 | + parent.layer.open({ | ||
268 | + type: 2, | ||
269 | + title: "<spring:message code='opt.open.receipt'/>", | ||
270 | + shadeClose: true, | ||
271 | + shade: 0.8, | ||
272 | + area: ['80%', '60%'], | ||
273 | + content: viewUrl | ||
274 | + }); | ||
275 | + }); | ||
276 | + } | ||
277 | + | ||
278 | + //制分单 | ||
279 | + function makeHawb(id){ | ||
280 | + window.location.href="<%=basePath %>manifest/subedit?mawbId="+id; | ||
281 | + } | ||
282 | + | ||
283 | + //分单编辑 | ||
284 | + function editHbillRow(id){ | ||
285 | + window.location.href="<%=basePath %>manifest/subedit?id="+id; | ||
286 | + } | ||
287 | + | ||
288 | + function editHbillFormat(val,row,index){ | ||
289 | + // 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>'; | ||
290 | + var 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>'; | ||
291 | + return html; | ||
292 | + } | ||
293 | + | ||
294 | + | ||
295 | + function editRow(id){ | ||
296 | + var page = $("#dg").datagrid("getPager").data("pagination").options; | ||
297 | + window.localStorage.setItem("pageNumber", page.pageNumber); | ||
298 | + if(id==undefined){ | ||
299 | + window.location.href='<%=basePath %>manifest/edit?id='; | ||
300 | + }else{ | ||
301 | + window.location.href='<%=basePath %>manifest/edit?id='+id; | ||
302 | + } | ||
303 | + } | ||
304 | + | ||
305 | + function userUpdate(id) { | ||
306 | + // iframe层 | ||
307 | + layer.open({ | ||
308 | + type : 2, | ||
309 | + title : '修改主单号用户', | ||
310 | + maxmin : true, | ||
311 | + shadeClose : false, // 点击遮罩关闭层 | ||
312 | + area : [ '450px', '300px' ], | ||
313 | + content : '<%=basePath %>wbm/edit?id='+id | ||
314 | + }); | ||
315 | + } | ||
316 | + | ||
317 | + function doSearch(){ | ||
318 | + totalpiece = 0; | ||
319 | + totalweight = 0; | ||
320 | + $('#dg').datagrid("options").queryParams=$("#searchForm").serializeJson(); | ||
321 | + $('#dg').datagrid("reload"); | ||
322 | + } | ||
323 | + | ||
324 | + function getIds() { | ||
325 | + var ids = []; | ||
326 | + var rows = $("#dg").datagrid('getChecked'); | ||
327 | + $.each(rows,function(key,v){ | ||
328 | + ids.push(v.id); | ||
329 | + }); | ||
330 | + return ids; | ||
331 | + } | ||
332 | + | ||
333 | + | ||
334 | + | ||
335 | + | ||
336 | + $("#manifnum").keyup(function(){ | ||
337 | + var leng = $("#manifnum").val().length; | ||
338 | + if (leng == 3) | ||
339 | + { | ||
340 | + $("#manifnum").val( $("#manifnum").val()+"-") | ||
341 | + } | ||
342 | + }) | ||
343 | +</script> | ||
344 | +</body> | ||
345 | +</html> | ||
346 | + | ||
347 | + |
src/main/webapp/WEB-INF/views/hz/hzinfo.jsp
0 → 100644
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="货主信息管理" | ||
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="forShort">简称</th> | ||
48 | + <th field="fullName">全称</th> | ||
49 | + <th field="theShipperType" sortable="true">货主类型</th> | ||
50 | + <th field="contacts">联系人</th> | ||
51 | + <th field="phone">电话</th> | ||
52 | + | ||
53 | + </tr> | ||
54 | + </thead> | ||
55 | + </table> | ||
56 | + <div id="tb" style="padding:0 30px;"><input type="hidden" id="idcc"> | ||
57 | + <form id="searchForm"> | ||
58 | + <table class="search_form_table"> | ||
59 | + <%--联系人:<input id="manifnum" type="text" name="search_LIKE_waybillnomaster" style="width:166px;height:35px;line-height:35px;">--%> | ||
60 | + 电话:<input class="easyui-textbox" type="text" name="search_LIKE_phone" style="width:166px;height:35px;line-height:35px;"> | ||
61 | + <a href="javascript:doSearch()" class="easyui-linkbutton" iconCls="icon-search" data-options="selected:true"><spring:message code="opt.search" /></a> | ||
62 | + <%--<a href="javascript:doSave()" class="easyui-linkbutton" style="background:#18A197;color:#FFF;border: 1px solid #18A197;" iconCls="icon-add"><spring:message code="opt.add" /></a>--%> | ||
63 | + <%--<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>--%> | ||
64 | + </table> | ||
65 | + </form> | ||
66 | + </div> | ||
67 | + </div> | ||
68 | + | ||
69 | +</div> | ||
70 | +<script type="text/javascript" src="<%=basePath %>resource/easyui/jquery.min.js"></script> | ||
71 | +<script type="text/javascript" src="<%=basePath %>resource/easyui/jquery.easyui.min.js"></script> | ||
72 | +<script type="text/javascript" src="<%=basePath %>resource/easyui/easyui-lang-${pageContext.response.locale}.js"></script> | ||
73 | +<script type="text/javascript" src="<%=basePath %>resource/easyui/datagrid-detailview.js"></script> | ||
74 | +<script type="text/javascript" src="<%=basePath %>resource/js/tools.js?version=${version}"></script> | ||
75 | +<!--弹出层引入的JS--> | ||
76 | +<script type="text/javascript" src="<%=basePath %>resource/layer-v3.0.3/layer/layer.js"></script> | ||
77 | +<script type="text/javascript"> | ||
78 | + | ||
79 | + $(function(){ | ||
80 | + function getPageNumber(){ | ||
81 | + var pageNumber = window.localStorage.getItem("pageNumber"); | ||
82 | + if(typeof(pageNumber) != "undefined") | ||
83 | + { | ||
84 | + try{ | ||
85 | + var pattern = /^\d+$/g; //判断是否是数字 | ||
86 | + | ||
87 | + //console.log(pageNumber.search(pattern)); | ||
88 | + | ||
89 | + if(pageNumber.search(pattern) >= 0) | ||
90 | + { | ||
91 | + var num = parseInt(pageNumber); | ||
92 | + return num; | ||
93 | + } | ||
94 | + return 1; | ||
95 | + } | ||
96 | + catch(e){ | ||
97 | + return 1; | ||
98 | + } | ||
99 | + } | ||
100 | + return 1; | ||
101 | + } | ||
102 | + | ||
103 | + //console.log(getPageNumber()); | ||
104 | + | ||
105 | + $('#dg').datagrid({ | ||
106 | + url:'<%=basePath %>hzinfo/grid.json', | ||
107 | + //queryParams:$("#searchForm").serializeJson(), | ||
108 | + pageNumber:getPageNumber(), | ||
109 | + view: detailview, | ||
110 | + detailFormatter:function(index,row){ | ||
111 | + return '<div id="ddv-' + index + '"style="padding:5px 0"></div>'; | ||
112 | + } | ||
113 | + }); | ||
114 | + }); | ||
115 | + | ||
116 | + function editFormat(val,row,index){ | ||
117 | + | ||
118 | + var html='<a href="javascript:void(0)" style="padding-left:10px;text-decoration:none;color:blue;padding-right:20px;" onclick="findOneHz('+row.id+')" lay-event="choose"><i class="iconfont">选择</i></a>' | ||
119 | + html += '<a href="javascript:void(0)" style="text-decoration:none;margin-left:20px;color:blue;" </a>'; | ||
120 | + return html; | ||
121 | + } | ||
122 | + | ||
123 | + | ||
124 | + function doSearch(){ | ||
125 | + $('#dg').datagrid("options").queryParams=$("#searchForm").serializeJson(); | ||
126 | + $('#dg').datagrid("reload"); | ||
127 | + } | ||
128 | + | ||
129 | + function getIds() { | ||
130 | + var ids = []; | ||
131 | + var rows = $("#dg").datagrid('getChecked'); | ||
132 | + $.each(rows,function(key,v){ | ||
133 | + ids.push(v.id); | ||
134 | + }); | ||
135 | + return ids; | ||
136 | + } | ||
137 | + | ||
138 | + function doDelete(){ | ||
139 | + var rows = $("#dg").datagrid('getChecked'); | ||
140 | + if(rows.length==0){ | ||
141 | + layer.open({content:"<spring:message code="opt.selectone" />"}); | ||
142 | + return false; | ||
143 | + } | ||
144 | + layer.confirm("<spring:message code="opt.confirmdel" />?", {btn:['<spring:message code="opt.confirm" />','<spring:message code="opt.cancel" />']},function () { | ||
145 | + $.post("<%=basePath %>hzinfo/delete",{ids:getIds().join(",")},function(data){ | ||
146 | + if(data.status == 200) { | ||
147 | + layer.confirm("<spring:message code="opt.delsuccess" />!",{btn:['<spring:message code="opt.confirm" />','<spring:message code="opt.cancel" />']},function(){ | ||
148 | + window.location.href="<%=basePath %>hzinfo/list"; | ||
149 | + }) | ||
150 | + }else{ | ||
151 | + layer.open({content:"<spring:message code="opt.delfailed" />!"}); | ||
152 | + } | ||
153 | + },"json"); | ||
154 | + | ||
155 | + }); | ||
156 | + } | ||
157 | + | ||
158 | + $("#manifnum").keyup(function(){ | ||
159 | + var leng = $("#manifnum").val().length; | ||
160 | + if (leng == 3) | ||
161 | + { | ||
162 | + $("#manifnum").val( $("#manifnum").val()+"-") | ||
163 | + } | ||
164 | + }) | ||
165 | + | ||
166 | +</script> | ||
167 | +</body> | ||
168 | +</html> | ||
169 | + | ||
170 | + |
@@ -81,6 +81,8 @@ | @@ -81,6 +81,8 @@ | ||
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.wbm" />||wbm/list',this)"><spring:message code="menu.wbm" /></a></li> |
83 | <li><a href="javascript:void(0);" onclick="addTab('<spring:message code="hz.info" />||hzinfo/list',this)"><spring:message code="hz.info" /></a></li> | 83 | <li><a href="javascript:void(0);" onclick="addTab('<spring:message code="hz.info" />||hzinfo/list',this)"><spring:message code="hz.info" /></a></li> |
84 | + <li><a href="javascript:void(0);" onclick="addTab('<spring:message code="hz.info" />||hzinfo/list',this)"><spring:message code="hz.info" /></a></li> | ||
85 | + <li><a href="javascript:void(0);" onclick="addTab('货量统计||cargo/list',this)">货量统计</a></li> | ||
84 | <%-- <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> --%> | 86 | <%-- <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> --%> |
85 | </ul> | 87 | </ul> |
86 | </li> | 88 | </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="货主信息管理" | ||
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="forShort">简称</th> | ||
48 | + <th field="fullName">全称</th> | ||
49 | + <th field="theShipperType" sortable="true">货主类型</th> | ||
50 | + <th field="contacts">联系人</th> | ||
51 | + <th field="phone">电话</th> | ||
52 | + | ||
53 | + </tr> | ||
54 | + </thead> | ||
55 | + </table> | ||
56 | + <div id="tb" style="padding:0 30px;"><input type="hidden" id="idcc"> | ||
57 | + <form id="searchForm"> | ||
58 | + <table class="search_form_table"> | ||
59 | + <%--联系人:<input id="manifnum" type="text" name="search_LIKE_waybillnomaster" style="width:166px;height:35px;line-height:35px;">--%> | ||
60 | + 电话号:<input class="easyui-textbox" type="text" name="search_LIKE_phone" style="width:166px;height:35px;line-height:35px;"> | ||
61 | + <a href="javascript:doSearch()" class="easyui-linkbutton" iconCls="icon-search" data-options="selected:true"><spring:message code="opt.search" /></a> | ||
62 | + <a href="javascript:doSave()" class="easyui-linkbutton" style="background:#18A197;color:#FFF;border: 1px solid #18A197;" iconCls="icon-add"><spring:message code="opt.add" /></a> | ||
63 | + <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> | ||
64 | + </table> | ||
65 | + </form> | ||
66 | + </div> | ||
67 | + </div> | ||
68 | + | ||
69 | +</div> | ||
70 | +<script type="text/javascript" src="<%=basePath %>resource/easyui/jquery.min.js"></script> | ||
71 | +<script type="text/javascript" src="<%=basePath %>resource/easyui/jquery.easyui.min.js"></script> | ||
72 | +<script type="text/javascript" src="<%=basePath %>resource/easyui/easyui-lang-${pageContext.response.locale}.js"></script> | ||
73 | +<script type="text/javascript" src="<%=basePath %>resource/easyui/datagrid-detailview.js"></script> | ||
74 | +<script type="text/javascript" src="<%=basePath %>resource/js/tools.js?version=${version}"></script> | ||
75 | +<!--弹出层引入的JS--> | ||
76 | +<script type="text/javascript" src="<%=basePath %>resource/layer-v3.0.3/layer/layer.js"></script> | ||
77 | +<script type="text/javascript"> | ||
78 | + | ||
79 | + $(function(){ | ||
80 | + function getPageNumber(){ | ||
81 | + var pageNumber = window.localStorage.getItem("pageNumber"); | ||
82 | + if(typeof(pageNumber) != "undefined") | ||
83 | + { | ||
84 | + try{ | ||
85 | + var pattern = /^\d+$/g; //判断是否是数字 | ||
86 | + | ||
87 | + //console.log(pageNumber.search(pattern)); | ||
88 | + | ||
89 | + if(pageNumber.search(pattern) >= 0) | ||
90 | + { | ||
91 | + var num = parseInt(pageNumber); | ||
92 | + return num; | ||
93 | + } | ||
94 | + return 1; | ||
95 | + } | ||
96 | + catch(e){ | ||
97 | + return 1; | ||
98 | + } | ||
99 | + } | ||
100 | + return 1; | ||
101 | + } | ||
102 | + | ||
103 | + //console.log(getPageNumber()); | ||
104 | + | ||
105 | + $('#dg').datagrid({ | ||
106 | + url:'<%=basePath %>hzinfo/grid.json', | ||
107 | + //queryParams:$("#searchForm").serializeJson(), | ||
108 | + pageNumber:getPageNumber(), | ||
109 | + view: detailview, | ||
110 | + detailFormatter:function(index,row){ | ||
111 | + return '<div id="ddv-' + index + '"style="padding:5px 0"></div>'; | ||
112 | + } | ||
113 | + }); | ||
114 | + }); | ||
115 | + | ||
116 | + function editFormat(val,row,index){ | ||
117 | + | ||
118 | + 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>' | ||
119 | + html += '<a href="javascript:void(0)" style="text-decoration:none;margin-left:20px;color:blue;" </a>'; | ||
120 | + return html; | ||
121 | + } | ||
122 | + | ||
123 | + function seeReceipt(waybill_no,sub_waybill_no,isMain){ | ||
124 | + layui.use('layer', function(){ | ||
125 | + var layer = layui.layer; | ||
126 | + var api="<%=basePath%>receipt/seeReceipt"; | ||
127 | + var params = "waybill_no="+waybill_no; | ||
128 | + if(!isMain){ | ||
129 | + params+="&sub_waybill_no="+sub_waybill_no; | ||
130 | + } | ||
131 | + var viewUrl = api+"?"+params; | ||
132 | + | ||
133 | + parent.layer.open({ | ||
134 | + type: 2, | ||
135 | + title: "<spring:message code='opt.open.receipt'/>", | ||
136 | + shadeClose: true, | ||
137 | + shade: 0.8, | ||
138 | + area: ['80%', '60%'], | ||
139 | + content: viewUrl | ||
140 | + }); | ||
141 | + }); | ||
142 | + } | ||
143 | + | ||
144 | + //分单编辑 | ||
145 | + function editHbillRow(id){ | ||
146 | + window.location.href="<%=basePath %>manifest/subedit?id="+id; | ||
147 | + } | ||
148 | + | ||
149 | + function editHbillFormat(val,row,index){ | ||
150 | + // 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>'; | ||
151 | + var 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>'; | ||
152 | + return html; | ||
153 | + } | ||
154 | + | ||
155 | + | ||
156 | + function editRow(id){ | ||
157 | + var page = $("#dg").datagrid("getPager").data("pagination").options; | ||
158 | + window.localStorage.setItem("pageNumber", page.pageNumber); | ||
159 | + if(id==undefined){ | ||
160 | + window.location.href='<%=basePath %>manifest/edit?id='; | ||
161 | + }else{ | ||
162 | + window.location.href='<%=basePath %>manifest/edit?id='+id; | ||
163 | + } | ||
164 | + } | ||
165 | + | ||
166 | + function userUpdate(id) { | ||
167 | + // iframe层 | ||
168 | + layer.open({ | ||
169 | + type : 2, | ||
170 | + title : '修改主单号用户', | ||
171 | + maxmin : true, | ||
172 | + shadeClose : false, // 点击遮罩关闭层 | ||
173 | + area : [ '700px', '350px' ], | ||
174 | + content : '<%=basePath %>hzinfo/edit?id='+id | ||
175 | + }); | ||
176 | + } | ||
177 | + | ||
178 | + //添加 | ||
179 | + function doSave() { | ||
180 | + layer.open({ | ||
181 | + type : 2, | ||
182 | + title : '新增', | ||
183 | + maxmin : true, | ||
184 | + shadeClose : false, // 点击遮罩关闭层 | ||
185 | + area : [ '700px', '350px' ], | ||
186 | + content : '<%=basePath %>hzinfo/add' | ||
187 | + }); | ||
188 | + } | ||
189 | + | ||
190 | + function doSearch(){ | ||
191 | + $('#dg').datagrid("options").queryParams=$("#searchForm").serializeJson(); | ||
192 | + $('#dg').datagrid("reload"); | ||
193 | + } | ||
194 | + | ||
195 | + function getIds() { | ||
196 | + var ids = []; | ||
197 | + var rows = $("#dg").datagrid('getChecked'); | ||
198 | + $.each(rows,function(key,v){ | ||
199 | + ids.push(v.id); | ||
200 | + }); | ||
201 | + return ids; | ||
202 | + } | ||
203 | + | ||
204 | + function doDelete(){ | ||
205 | + var rows = $("#dg").datagrid('getChecked'); | ||
206 | + if(rows.length==0){ | ||
207 | + layer.open({content:"<spring:message code="opt.selectone" />"}); | ||
208 | + return false; | ||
209 | + } | ||
210 | + layer.confirm("<spring:message code="opt.confirmdel" />?", {btn:['<spring:message code="opt.confirm" />','<spring:message code="opt.cancel" />']},function () { | ||
211 | + $.post("<%=basePath %>hzinfo/delete",{ids:getIds().join(",")},function(data){ | ||
212 | + if(data.status == 200) { | ||
213 | + layer.confirm("<spring:message code="opt.delsuccess" />!",{btn:['<spring:message code="opt.confirm" />','<spring:message code="opt.cancel" />']},function(){ | ||
214 | + window.location.href="<%=basePath %>hzinfo/list"; | ||
215 | + }) | ||
216 | + }else{ | ||
217 | + layer.open({content:"<spring:message code="opt.delfailed" />!"}); | ||
218 | + } | ||
219 | + },"json"); | ||
220 | + | ||
221 | + }); | ||
222 | + } | ||
223 | + | ||
224 | + $("#manifnum").keyup(function(){ | ||
225 | + var leng = $("#manifnum").val().length; | ||
226 | + if (leng == 3) | ||
227 | + { | ||
228 | + $("#manifnum").val( $("#manifnum").val()+"-") | ||
229 | + } | ||
230 | + }) | ||
231 | +</script> | ||
232 | +</body> | ||
233 | +</html> | ||
234 | + | ||
235 | + |
1 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | ||
2 | +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> | ||
3 | +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | ||
4 | +<% | ||
5 | + String path = request.getContextPath(); | ||
6 | + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; | ||
7 | +%> | ||
8 | +<!DOCTYPE html> | ||
9 | +<html lang="en"> | ||
10 | +<head> | ||
11 | + <meta charset="utf-8"> | ||
12 | + <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
13 | + <link href="<%=basePath %>resource/css/base.css" rel="stylesheet"> | ||
14 | + <link href="<%=basePath %>resource/css/basic_info.css" rel="stylesheet"> | ||
15 | + <link rel="stylesheet" href="<%=basePath %>resource/easyui/uimaker/easyui.css"> | ||
16 | + <link href="<%=basePath %>resource/css/form.css" rel="stylesheet"> | ||
17 | + <script type="text/javascript" src="<%=basePath %>resource/easyui/jquery.min.js"></script> | ||
18 | + <script type="text/javascript" src="<%=basePath %>resource/validate/jquery.validate.js"></script> | ||
19 | + <script type="text/javascript" src="<%=basePath %>resource/validate/validate-extends.js"></script> | ||
20 | + <link rel="stylesheet" href="<%=basePath %>resource/css/form.css"> | ||
21 | + <script type="text/javascript" src="<%=basePath %>resource/js/tools.js"></script> | ||
22 | + <!-- validate 验证中英文 --> | ||
23 | + <script type="text/javascript" src="<%=basePath %>resource/validate/jquery.validate-${pageContext.response.locale}.js"></script> | ||
24 | +</head> | ||
25 | +<body> | ||
26 | + <div class="container"> | ||
27 | + | ||
28 | + <div class="content"> | ||
29 | + <form class="from-control" id="form"> | ||
30 | + <table class="kv-table"> | ||
31 | + <tbody> | ||
32 | + <tr> | ||
33 | + <td class="kv-label">简称</td> | ||
34 | + <td class="kv-content"> | ||
35 | + <input id="forshort" name="forshort" type="text" required/> | ||
36 | + </td> | ||
37 | + </tr> | ||
38 | + <tr> | ||
39 | + <td class="kv-label">全称</td> | ||
40 | + <td class="kv-content"> | ||
41 | + <input id="fullname" name="fullname" type="text" required/> | ||
42 | + </td> | ||
43 | + </tr> | ||
44 | + <tr> | ||
45 | + <td class="kv-label">货主类型</td> | ||
46 | + <td class="kv-content"> | ||
47 | + <div class="date"> | ||
48 | + <label> | ||
49 | + <input id="one" name="one" type="checkbox" value="1" checked>发货人 | ||
50 | + </label> | ||
51 | + <label> | ||
52 | + <input id="two" name="two" type="checkbox" value="2">订舱代理 | ||
53 | + </label> | ||
54 | + <label> | ||
55 | + <input id="three" name="three" type="checkbox" value="3">操作代理 | ||
56 | + </label> | ||
57 | + </div> | ||
58 | + </td> | ||
59 | + </tr> | ||
60 | + <tr> | ||
61 | + <td class="kv-label">联系人</td> | ||
62 | + <td class="kv-content"><input type="text" id="contacts" name="contacts" required></td> | ||
63 | + </tr> | ||
64 | + <tr> | ||
65 | + <td class="kv-label">电话</td> | ||
66 | + <td class="kv-content"><input type="text" id="phone" name="phone" required></td> | ||
67 | + </tr> | ||
68 | + | ||
69 | + <tr> | ||
70 | + <td colspan="6"> | ||
71 | + <div class="opt-buttons" style="padding-top:20px;"> | ||
72 | + <button type="submit" class="easyui-linkbutton l-btn l-btn-small l-btn-selected " data-options="selected:true"> | ||
73 | + <span class="l-btn-left"><span class="l-btn-text"><spring:message code="opt.save" /></span></span> | ||
74 | + </button> | ||
75 | + <%--<button type="button" class="easyui-linkbutton l-btn l-btn-small" onclick="window.location.href='<%=basePath%>system/user/list'">--%> | ||
76 | + <%--<span class="l-btn-left"><span class="l-btn-text"><spring:message code="opt.cancel"/></span></span>--%> | ||
77 | + <%--</button>--%> | ||
78 | + </div> | ||
79 | + </td> | ||
80 | + </tr> | ||
81 | + </tbody> | ||
82 | + </table> | ||
83 | + </form> | ||
84 | + </div> | ||
85 | + </div> | ||
86 | + <script type="text/javascript" src="<%=basePath %>resource/layer-v3.0.3/layer/layer.js"></script> | ||
87 | + <script src="<%=basePath %>resource/easyui/jquery.easyui.min.js"></script> | ||
88 | + <script src="<%=basePath %>resource/js/tools.js"></script> | ||
89 | + <script type="text/javascript"> | ||
90 | + $("#form").validate({ | ||
91 | + submitHandler:function(form){ | ||
92 | + submit(); | ||
93 | + } | ||
94 | + }); | ||
95 | + | ||
96 | + var selectFals = false; | ||
97 | + function submit(){ | ||
98 | + var chboxValue=[]; | ||
99 | + var checkBox = $("input[name=one],input[name=two],input[name=three]"); | ||
100 | + for (var i=0; i<checkBox.length; i++){ | ||
101 | + if (checkBox[i].checked){ | ||
102 | + selectFals = true; | ||
103 | + } | ||
104 | + } | ||
105 | + | ||
106 | + if (selectFals == true){ | ||
107 | + var data = $("#form").serialize(); | ||
108 | + $.post("<%=basePath%>hzinfo/save",data,function(data){ | ||
109 | + if(data.status==200){ | ||
110 | + layer.confirm("<spring:message code="opt.savesuccess" />!",{btn:['<spring:message code="opt.confirm" />','<spring:message code="opt.cancel" />']},function(){ | ||
111 | + var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引 | ||
112 | + parent.layer.close(index); | ||
113 | + window.parent.location.reload(); | ||
114 | + }) | ||
115 | + }else if(data.status == 201){ | ||
116 | + layer.open({content:"该简称和货主类型已存在!"}); | ||
117 | + }else { | ||
118 | + layer.open({content:"网络异常!"}); | ||
119 | + } | ||
120 | + }) | ||
121 | + }else { | ||
122 | + alert("货主类型至少选择一项"); | ||
123 | + return false; | ||
124 | + } | ||
125 | + } | ||
126 | + </script> | ||
127 | +</body> | ||
128 | +</html> |
1 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | ||
2 | +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> | ||
3 | +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | ||
4 | +<% | ||
5 | + String path = request.getContextPath(); | ||
6 | + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; | ||
7 | +%> | ||
8 | +<!DOCTYPE html> | ||
9 | +<html lang="en"> | ||
10 | +<head> | ||
11 | + <meta charset="utf-8"> | ||
12 | + <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
13 | + <link href="<%=basePath %>resource/css/base.css" rel="stylesheet"> | ||
14 | + <link href="<%=basePath %>resource/css/basic_info.css" rel="stylesheet"> | ||
15 | + <link rel="stylesheet" href="<%=basePath %>resource/easyui/uimaker/easyui.css"> | ||
16 | + <link href="<%=basePath %>resource/css/form.css" rel="stylesheet"> | ||
17 | + <script type="text/javascript" src="<%=basePath %>resource/easyui/jquery.min.js"></script> | ||
18 | + <script type="text/javascript" src="<%=basePath %>resource/validate/jquery.validate.js"></script> | ||
19 | + <script type="text/javascript" src="<%=basePath %>resource/validate/validate-extends.js"></script> | ||
20 | + <link rel="stylesheet" href="<%=basePath %>resource/css/form.css"> | ||
21 | + <script type="text/javascript" src="<%=basePath %>resource/js/tools.js"></script> | ||
22 | + <!-- validate 验证中英文 --> | ||
23 | + <script type="text/javascript" src="<%=basePath %>resource/validate/jquery.validate-${pageContext.response.locale}.js"></script> | ||
24 | +</head> | ||
25 | +<body> | ||
26 | + <div class="container"> | ||
27 | + | ||
28 | + <div class="content"> | ||
29 | + <form class="from-control" id="form"> | ||
30 | + <input type="hidden" id="id" name="id" value="${entity.id}"> | ||
31 | + <table class="kv-table"> | ||
32 | + <tbody> | ||
33 | + <tr> | ||
34 | + <td class="kv-label">简称</td> | ||
35 | + <td class="kv-content"> | ||
36 | + <input id="forshort" name="for_short" type="text" value="${entity.for_short}" required/> | ||
37 | + </td> | ||
38 | + </tr> | ||
39 | + | ||
40 | + <tr> | ||
41 | + <td class="kv-label">全称</td> | ||
42 | + <td class="kv-content"> | ||
43 | + <input id="fullname" name="full_name" type="text" value="${entity.full_name}" required/> | ||
44 | + </td> | ||
45 | + </tr> | ||
46 | + <tr> | ||
47 | + <td class="kv-label">货主类型</td> | ||
48 | + <td class="kv-content"> | ||
49 | + <div class="date"> | ||
50 | + <label> | ||
51 | + <input id="one" name="the_shipper_type" type="checkbox" ${1 eq entity.the_shipper_type?"checked":""} value="1">发货人 | ||
52 | + </label> | ||
53 | + <label> | ||
54 | + <input id="two" name="the_shipper_type" type="checkbox" ${2 eq entity.the_shipper_type?"checked":""} value="2">订舱代理 | ||
55 | + </label> | ||
56 | + <label> | ||
57 | + <input id="three" name="the_shipper_type" type="checkbox" ${3 eq entity.the_shipper_type?"checked":""} value="3">操作代理 | ||
58 | + </label> | ||
59 | + </div> | ||
60 | + </td> | ||
61 | + </tr> | ||
62 | + <tr> | ||
63 | + <td class="kv-label">联系人</td> | ||
64 | + <td class="kv-content"> | ||
65 | + <input id="contacts" name="contacts" type="text" value="${entity.contacts}" required/> | ||
66 | + </td> | ||
67 | + </tr> | ||
68 | + <tr> | ||
69 | + <td class="kv-label">电话</td> | ||
70 | + <td class="kv-content"> | ||
71 | + <input id="phone" name="phone" type="text" value="${entity.phone}" required/> | ||
72 | + </td> | ||
73 | + </tr> | ||
74 | + <tr> | ||
75 | + <td colspan="6"> | ||
76 | + <div class="opt-buttons" style="padding-top:20px;"> | ||
77 | + <button type="submit" class="easyui-linkbutton l-btn l-btn-small l-btn-selected " data-options="selected:true"> | ||
78 | + <span class="l-btn-left"><span class="l-btn-text"><spring:message code="opt.save" /></span></span> | ||
79 | + </button> | ||
80 | + </div> | ||
81 | + </td> | ||
82 | + </tr> | ||
83 | + </tbody> | ||
84 | + </table> | ||
85 | + </form> | ||
86 | + </div> | ||
87 | + </div> | ||
88 | + <script type="text/javascript" src="<%=basePath %>resource/layer-v3.0.3/layer/layer.js"></script> | ||
89 | + <script src="<%=basePath %>resource/easyui/jquery.easyui.min.js"></script> | ||
90 | + <script src="<%=basePath %>resource/js/tools.js"></script> | ||
91 | + <script type="text/javascript"> | ||
92 | + $("#form").validate({ | ||
93 | + submitHandler:function(form){ | ||
94 | + submit(); | ||
95 | + } | ||
96 | + }); | ||
97 | + | ||
98 | + $(function () { | ||
99 | + $("#form").find("input[type=checkbox]").bind("click", function () { | ||
100 | + //当前checkbox是否选中 | ||
101 | + if (this.checked){ | ||
102 | + //除当前的checkbox其他不选中 | ||
103 | + $("#form").find("input[type=checkbox]").not(this).attr("checked", false); | ||
104 | + } | ||
105 | + }) | ||
106 | + }) | ||
107 | + | ||
108 | + | ||
109 | + var selectFals = false; | ||
110 | + function submit(){ | ||
111 | + var chboxValue=[]; | ||
112 | + var checkBox = $("input[id=one],input[id=two],input[id=three]"); | ||
113 | + for (var i=0; i<checkBox.length; i++){ | ||
114 | + if (checkBox[i].checked){ | ||
115 | + selectFals = true; | ||
116 | + } | ||
117 | + } | ||
118 | + | ||
119 | + if (selectFals == true){ | ||
120 | + var data = $("#form").serialize(); | ||
121 | + $.post("<%=basePath%>hzinfo/update",data,function(data){ | ||
122 | + if(data.status==200){ | ||
123 | + layer.confirm("修改成功!",{btn:['<spring:message code="opt.confirm" />','<spring:message code="opt.cancel" />']},function(){ | ||
124 | + var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引 | ||
125 | + parent.layer.close(index); | ||
126 | + window.parent.location.reload(); | ||
127 | + }) | ||
128 | + }else if(data.status == 201){ | ||
129 | + layer.open({content:"该简称和货主类型已存在!"}); | ||
130 | + }else { | ||
131 | + layer.open({content:"网络异常!"}); | ||
132 | + } | ||
133 | + }) | ||
134 | + }else { | ||
135 | + alert("货主类型至少选择一项"); | ||
136 | + return false; | ||
137 | + } | ||
138 | + } | ||
139 | + </script> | ||
140 | +</body> | ||
141 | +</html> |
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)' onclick='prebackout("+row.id+")' style='text-decoration:none;color:blue;'><spring:message code='opt.delete'/></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 | + var 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 : [ '450px', '300px' ], | ||
339 | + content : '<%=basePath %>wbm/edit?id='+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 | +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> | ||
15 | +<html> | ||
16 | +<head> | ||
17 | + <title>Title</title> | ||
18 | + <meta charset="utf-8"> | ||
19 | + <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
20 | + <link href="<%=basePath %>resource/css/base.css" rel="stylesheet"> | ||
21 | + <link href="<%=basePath %>resource/css/basic_info.css" rel="stylesheet"> | ||
22 | + <link rel="stylesheet" href="<%=basePath %>resource/easyui/uimaker/easyui.css"> | ||
23 | + <link href="<%=basePath %>resource/css/form.css" rel="stylesheet"> | ||
24 | + <link rel="stylesheet" href="<%=basePath %>resource/css/form.css"> | ||
25 | + <script type="text/javascript" src="<%=basePath %>resource/easyui/jquery.min.js"></script> | ||
26 | + <script type="text/javascript" src="<%=basePath %>resource/validate/jquery.validate.js"></script> | ||
27 | + <script type="text/javascript" src="<%=basePath %>resource/validate/validate-extends.js"></script> | ||
28 | + | ||
29 | + <script type="text/javascript" src="<%=basePath %>resource/js/tools.js"></script> | ||
30 | + <!-- validate 验证中英文 --> | ||
31 | + <script type="text/javascript" src="<%=basePath %>resource/validate/jquery.validate-${pageContext.response.locale}.js"></script> | ||
32 | +</head> | ||
33 | +<body> | ||
34 | +<div class="container"> | ||
35 | + <div class="content"> | ||
36 | + <form class="from-control" id="form"> | ||
37 | + <input type="hidden" id="id" name="id" value="${manifest.id }"> | ||
38 | + <div></div> | ||
39 | + <div> | ||
40 | + <table class="kv-table"> | ||
41 | + <tbody> | ||
42 | + <div> | ||
43 | + <tr class="kv-content" > | ||
44 | + <td style="background-color: #EBEDF4; color: black;" class="kv-label" colspan="6"><spring:message code="wbm.loginName"/></td> | ||
45 | + <td style="background-color: #EBEDF4; color: black;" class="kv-label" colspan="1"> | ||
46 | + <%--<select id="user_update" required>--%> | ||
47 | + <%--<c:forEach var="user" items="${userList}">--%> | ||
48 | + <%--<option id = "${user.id}">${user.loginaccount}</option>--%> | ||
49 | + <%--</c:forEach>--%> | ||
50 | + <%--</select>--%> | ||
51 | + <input type="text" id = "loginaccount" name = "loginacciunt" value="${wbm.loginaccount}" required="required"> | ||
52 | + </td> | ||
53 | + <td style="background-color: #EBEDF4; color: black;" class="kv-label" colspan="4"> | ||
54 | + <button type="button" class="layui-btn layui-btn-sm layui-icon layui-icon-user" id="subbtn"> | ||
55 | + <i class="fa fa-trash hidden" aria-hidden="true"></i>提交 | ||
56 | + </button> | ||
57 | + </td> | ||
58 | + </tr> | ||
59 | + <%--<tr class="kv-content" style="float:left">--%> | ||
60 | + <%--<td style="background-color: #EBEDF4; color: black;" class="kv-label" colspan="2">--%> | ||
61 | + <%----%> | ||
62 | + <%--</td>--%> | ||
63 | + <%--</tr>--%> | ||
64 | + </div> | ||
65 | + </tbody> | ||
66 | + </table> | ||
67 | + </div> | ||
68 | + </form> | ||
69 | + </div> | ||
70 | +</div> | ||
71 | + | ||
72 | +<script type="text/javascript"> | ||
73 | + | ||
74 | + | ||
75 | + $("#subbtn").on("click",function () { | ||
76 | + var userId = ""; | ||
77 | + console.log("success"); | ||
78 | + | ||
79 | + var loginaccount = $("#loginaccount").val(); | ||
80 | + var idss = $('#user_update>option:selected'); | ||
81 | + idss.val(function(){ | ||
82 | + userId = (this.id); | ||
83 | + }); | ||
84 | + | ||
85 | + var ids = $("#id").val(); | ||
86 | + $.ajax({ | ||
87 | + type : 'POST', | ||
88 | + // contentType: 'application/json; charset=UTF-8', | ||
89 | + data : { | ||
90 | + "ids" : ids, | ||
91 | + "userId" : userId, | ||
92 | + "loginaccount":loginaccount | ||
93 | + }, | ||
94 | + url :"<%=basePath%>wbm/userUpdate", | ||
95 | + success : function(data) { | ||
96 | + console.log(data) | ||
97 | + if (data.status != 200) { | ||
98 | + alert("该账号不存在"); | ||
99 | + }else { | ||
100 | + // parent.reLoad(); | ||
101 | + alert("修改成功"); | ||
102 | + window.parent.location.reload(); | ||
103 | + var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引 | ||
104 | + parent.layer.close(index); | ||
105 | + } | ||
106 | + } | ||
107 | + }); | ||
108 | + }) | ||
109 | + | ||
110 | + | ||
111 | +</script> | ||
112 | +</body> | ||
113 | +</html> |
@@ -13,6 +13,7 @@ var detailview = $.extend({}, $.fn.datagrid.defaults.view, { | @@ -13,6 +13,7 @@ var detailview = $.extend({}, $.fn.datagrid.defaults.view, { | ||
13 | } | 13 | } |
14 | 14 | ||
15 | var rows = state.data.rows; | 15 | var rows = state.data.rows; |
16 | + | ||
16 | var fields = $(target).datagrid('getColumnFields', frozen); | 17 | var fields = $(target).datagrid('getColumnFields', frozen); |
17 | var table = []; | 18 | var table = []; |
18 | table.push('<table class="datagrid-btable" cellspacing="0" cellpadding="0" border="0"><tbody>'); | 19 | table.push('<table class="datagrid-btable" cellspacing="0" cellpadding="0" border="0"><tbody>'); |
-
请 注册 或 登录 后发表评论