From f4cae05606b4ed5ca8f1cf5f4a93c90f274f1697 Mon Sep 17 00:00:00 2001 From: Junjie <fallin.jie@qq.com> Date: 星期一, 15 五月 2023 11:12:21 +0800 Subject: [PATCH] 库位热点图 --- src/main/webapp/views/report/viewLocMap.html | 111 + src/main/java/com/zy/asrs/entity/ViewStockUseBean.java | 81 + src/main/webapp/static/js/report/locMap.js | 84 + src/main/java/com/zy/common/web/BaseController.java | 49 src/main/java/com/zy/system/controller/ResourceController.java | 9 src/main/java/com/zy/asrs/entity/ViewInOutBean.java | 73 src/main/webapp/views/report/viewStockUse.html | 42 src/main/webapp/views/report/viewInOut.html | 54 src/main/webapp/views/report/viewStayTime.html | 52 src/main/java/com/zy/asrs/mapper/ReportQueryMapper.java | 61 src/main/webapp/static/js/report/workOut.js | 219 ++ src/main/webapp/views/report/viewWorkOut.html | 61 src/main/java/com/zy/asrs/entity/ViewWorkInBean.java | 193 ++ src/main/resources/mapper/ViewInOutMapper.xml | 83 + src/main/webapp/static/js/common.js | 78 + src/main/webapp/static/js/report/workCountIn.js | 219 ++ src/main/webapp/static/js/report/stayTime.js | 200 ++ src/main/webapp/static/js/report/workCountOut.js | 220 ++ src/main/webapp/static/js/report/reportStockUse.js | 195 ++ src/main/webapp/views/report/locDetl.html | 93 + src/main/java/com/zy/asrs/controller/LocDetlController.java | 164 ++ src/main/java/com/zy/asrs/entity/ViewLocMapDto.java | 103 + src/main/resources/mapper/ViewWorkInMapper.xml | 148 + src/main/webapp/static/js/report/workIn.js | 215 ++ src/main/java/com/zy/asrs/entity/ViewStayTimeBean.java | 179 ++ src/main/resources/mapper/ViewStayTimeMapper.xml | 107 + src/main/webapp/views/report/viewWorkIn.html | 61 src/main/webapp/views/report/viewWorkCountIn.html | 63 src/main/webapp/views/report/viewWorkCountOut.html | 64 src/main/webapp/static/js/report/inOut.js | 196 ++ src/main/resources/mapper/ViewStockUseMapper.xml | 116 + src/main/webapp/static/js/locMast/locMast.js | 620 ++++++++ src/main/java/com/zy/asrs/entity/ViewWorkCountInView.java | 11 src/main/java/com/zy/asrs/controller/ReportQueryController.java | 249 +++ 34 files changed, 4,468 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/zy/asrs/controller/LocDetlController.java b/src/main/java/com/zy/asrs/controller/LocDetlController.java new file mode 100644 index 0000000..93d4845 --- /dev/null +++ b/src/main/java/com/zy/asrs/controller/LocDetlController.java @@ -0,0 +1,164 @@ +package com.zy.asrs.controller; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.mapper.EntityWrapper; +import com.baomidou.mybatisplus.plugins.Page; +import com.core.annotations.ManagerAuth; +import com.core.common.BaseRes; +import com.core.common.Cools; +import com.core.common.DateUtils; +import com.core.common.R; +import com.zy.asrs.entity.LocDetl; +import com.zy.asrs.mapper.LocDetlMapper; +import com.zy.asrs.service.LocDetlService; +import com.zy.common.web.BaseController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.*; + +@RestController +public class LocDetlController extends BaseController { + + @Autowired + private LocDetlService locDetlService; + + @Autowired + private LocDetlMapper locDetlMapper; + + @RequestMapping(value = "/locDetl/{id}/auth") + @ManagerAuth + public R get(@PathVariable("id") String id) { + return R.ok(locDetlService.selectById(String.valueOf(id))); + } + + @RequestMapping(value = "/locDetl/auth") + @ManagerAuth + public R stockOutList(@RequestParam(value = "locNos[]") List<String> locNos){ + if (!locNos.isEmpty()) { + List<LocDetl> res = new ArrayList<>(); + for (String locNo : new HashSet<>(locNos)) { + List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", locNo)); + if (!locDetls.isEmpty()) { + res.addAll(locDetls); + } + } + return R.ok().add(res); + } + return R.parse(BaseRes.EMPTY); + } + + @RequestMapping(value = "/locDetl/list/auth")// /locDetl/list/auth 鎺ュ彛闂 + @ManagerAuth + public R list(@RequestParam(defaultValue = "1")Integer curr, + @RequestParam(defaultValue = "10")Integer limit, + @RequestParam(required = false)String orderByField, + @RequestParam(required = false)String orderByType, + @RequestParam(required = false)String condition, + @RequestParam Map<String, Object> param){ + EntityWrapper<LocDetl> wrapper = new EntityWrapper<>(); + excludeTrash(param); + convert(param, wrapper); + allLike(LocDetl.class, param.keySet(), wrapper, condition); + if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} + return R.ok(locDetlService.selectPage(new Page<>(curr, limit), wrapper)); + } + + + private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ + for (Map.Entry<String, Object> entry : map.entrySet()){ + String val = String.valueOf(entry.getValue()); + if (val.contains(RANGE_TIME_LINK)){ + String[] dates = val.split(RANGE_TIME_LINK); + wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); + wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); + } else { + if (entry.getKey().equals("locNo")) { + wrapper.eq("loc_no", String.valueOf(entry.getValue())); + } else { + wrapper.like(entry.getKey(), String.valueOf(entry.getValue())); + } + } + } + } + + @RequestMapping(value = "/locDetl/add/auth") + @ManagerAuth(memo = "搴撲綅鏄庣粏娣诲姞") + public R add(LocDetl locDetl) { + locDetl.setModiUser(getUserId()); + locDetl.setModiTime(new Date()); + locDetl.setAppeUser(getUserId()); + locDetl.setAppeTime(new Date()); + locDetlService.insert(locDetl); + return R.ok(); + } + + @RequestMapping(value = "/locDetl/update/auth") + @ManagerAuth(memo = "搴撲綅鏄庣粏淇敼") + public R update(LocDetl locDetl){ + if (Cools.isEmpty(locDetl) || null==locDetl.getMatnr()){ + return R.error(); + } + locDetl.setModiUser(getUserId()); + locDetl.setModiTime(new Date()); + locDetlService.updateById(locDetl); + return R.ok(); + } + + @RequestMapping(value = "/locDetl/delete/auth") + @ManagerAuth(memo = "搴撲綅鏄庣粏鍒犻櫎") + public R delete(@RequestParam String param){ + List<LocDetl> list = JSONArray.parseArray(param, LocDetl.class); + if (Cools.isEmpty(list)){ + return R.error(); + } + for (LocDetl entity : list){ + locDetlService.delete(new EntityWrapper<>(entity)); + } + return R.ok(); + } + + @RequestMapping(value = "/locDetl/export/auth") + @ManagerAuth(memo = "搴撲綅鏄庣粏瀵煎嚭") + public R export(@RequestBody JSONObject param){ + List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); + EntityWrapper<LocDetl> wrapper = new EntityWrapper<>(); + Map<String, Object> map = excludeTrash(param.getJSONObject("locDetl")); + String row = ""; + if (map.get("row") != null) { + String chooseRow = (String) map.get("row"); + if (chooseRow.length() == 1) { + row = "0" + chooseRow; + map.remove("row"); + }else { + row = chooseRow; + map.remove("row"); + } + } + convert(map, wrapper); + if (!row.equals("")){ + wrapper.and() + .where("loc_no like '" +row +"%'"); + } + List<LocDetl> list = locDetlService.selectList(wrapper); + return R.ok(exportSupport(list, fields)); + } + + @RequestMapping(value = "/locDetlQuery/auth") + @ManagerAuth + public R query(String condition) { + EntityWrapper<LocDetl> wrapper = new EntityWrapper<>(); + wrapper.like("matnr", condition); + Page<LocDetl> page = locDetlService.selectPage(new Page<>(0, 10), wrapper); + List<Map<String, Object>> result = new ArrayList<>(); + for (LocDetl locDetl : page.getRecords()){ + Map<String, Object> map = new HashMap<>(); + map.put("id", locDetl.getMatnr()); + map.put("value", locDetl.getMatnr()); + result.add(map); + } + return R.ok(result); + } + +} diff --git a/src/main/java/com/zy/asrs/controller/ReportQueryController.java b/src/main/java/com/zy/asrs/controller/ReportQueryController.java new file mode 100644 index 0000000..cd42ffc --- /dev/null +++ b/src/main/java/com/zy/asrs/controller/ReportQueryController.java @@ -0,0 +1,249 @@ +package com.zy.asrs.controller; + +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.plugins.Page; +import com.core.annotations.ManagerAuth; +import com.core.common.Cools; +import com.core.common.R; +import com.zy.asrs.entity.*; +import com.zy.asrs.mapper.ReportQueryMapper; +import com.zy.asrs.service.LocDetlService; +import com.zy.common.web.BaseController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 鏃ュ織缁熻鎺у埗鍣ㄥ眰 + * @author admin + * @date 2018骞�11鏈�23鏃� + */ +@RestController +@RequestMapping("/report") +public class ReportQueryController extends BaseController { + + @Autowired + private LocDetlService locDetlService; + @Autowired + private ReportQueryMapper reportQueryMapper; + + //------------------搴撲綅浣跨敤缁熻-------------------------------------- + @RequestMapping("/viewStockUseList.action") + public R queryViewStockUseListByPages(@RequestParam(defaultValue = "1")Integer curr, + @RequestParam(defaultValue = "10")Integer limit, + @RequestParam Map<String, Object> param){ + ViewStockUseBean bean = new ViewStockUseBean(); + bean.setPageSize(limit); + bean.setPageNumber(curr); + List<ViewStockUseBean> list= reportQueryMapper.queryViewStockUseList(bean); + int count = reportQueryMapper.getViewStockUseCount(bean); + Page<ViewStockUseBean> page = new Page<>(); + page.setRecords(list); + page.setTotal(count); + return R.ok(page); + } + + // 瀵煎嚭 + @RequestMapping(value = "/viewStockUseExport.action") + @ManagerAuth(memo = "搴撲綅浣跨敤缁熻瀵煎嚭") + public R viewStockUseExport(@RequestBody JSONObject param){ + List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); + List<ViewStockUseBean> list = reportQueryMapper.getViewStockUseAll(new ViewStockUseBean()); + return R.ok(exportSupport(list, fields)); + } + + //------------------搴撳瓨婊炵暀缁熻-------------------------------------- + @RequestMapping("/viewStayTimeList.action") + public Map<String,Object> queryViewStayTimeListByPages(@RequestParam(defaultValue = "1")Integer curr, + @RequestParam(defaultValue = "10")Integer limit, + @RequestParam Map<String, Object> param){ + ViewStayTimeBean bean = new ViewStayTimeBean(); + bean.setPageSize(limit); + bean.setPageNumber(curr); + String locNo = String.valueOf(param.get("loc_no")); + if (!Cools.isEmpty(locNo) && !locNo.equals("null")) { + bean.setLoc_no(locNo); + } + List<ViewStayTimeBean> list = reportQueryMapper.queryViewStayTimeList(bean); + int count = reportQueryMapper.getViewStayTimeCount(bean); + Page<ViewStayTimeBean> page = new Page<>(); + page.setRecords(list); + page.setTotal(count); + return R.ok(page); + } + + // 瀵煎嚭 + @RequestMapping(value = "/viewStayTimeExport.action") + @ManagerAuth(memo = "搴撳瓨婊炵暀缁熻瀵煎嚭") + public R viewStayTimeExport(@RequestBody JSONObject param){ + List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); + List<ViewStayTimeBean> list = reportQueryMapper.getViewStayTimeAll(new ViewStayTimeBean()); + return R.ok(exportSupport(list, fields)); + } + + //-----------------搴撳瓨MAP鍥�-------------------------------------- + @RequestMapping("/viewLocMapList/rows.action") + public R queryViewLocMapRows(){ + return R.ok().add(reportQueryMapper.getViewLocRowTotal()); + } + + @RequestMapping("/viewLocMapList.action") + public R queryViewLocMapListByPages(@RequestParam(defaultValue = "1")Integer row){ + // 鑾峰彇鎺掔骇鏁版嵁 + // 琛ㄦ牸鏍囬锛氬垪 ===>> 鍗囧簭 + List<String> bays = reportQueryMapper.getViewLocBayCount(row); + // 锛佽〃鏍肩涓�鍒楁斁灞傜骇鏁� + bays.add(0, ""); + // 琛ㄦ牸琛岋細灞� ====>> 鍊掑簭 + List<String> levs = reportQueryMapper.getViewLocLevCount(row); + List<Map<String, Object>> body = new ArrayList<>(); + for (String lev : levs){ + // 鑾峰彇灞傜骇鏁版嵁 + List<ViewLocMapDto> dtos = reportQueryMapper.getViewLocBays(row, Integer.parseInt(lev)); + // 锛佽〃鏍肩涓�鍒楁斁灞傜骇鏁� + dtos.add(0, new ViewLocMapDto(null ,null, lev)); + Map<String, Object> map = new HashMap<>(); + map.put("loc", dtos); + body.add(map); + } + Map<String, Object> result = new HashMap<>(); + result.put("title", bays); + result.put("body", body); + return R.ok(result); + } + + + //------------------绔欑偣鏃ュ叆鍑哄簱娆℃暟缁熻-------------------------------------- + @RequestMapping("/viewInOutList.action") + public Map<String,Object> viewInOutList(@RequestParam(defaultValue = "1")Integer curr, + @RequestParam(defaultValue = "10")Integer limit, + @RequestParam Map<String, Object> param){ + ViewInOutBean bean = new ViewInOutBean(); + bean.setPageSize(limit); + bean.setPageNumber(curr); + List<ViewInOutBean> list = reportQueryMapper.queryViewInOutList(bean); + int count = reportQueryMapper.getViewInOutCount(bean); + Page<ViewInOutBean> page = new Page<>(); + page.setRecords(list); + page.setTotal(count); + return R.ok(page); + } + + //excel瀵煎嚭 + @RequestMapping("/viewInOutExport.action") + @ManagerAuth(memo = "绔欑偣鏃ュ叆鍑哄簱娆℃暟缁熻瀵煎嚭") + public R viewInOutExport(@RequestBody JSONObject param){ + List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); + List<ViewInOutBean> list = reportQueryMapper.getViewInOutAll(new ViewInOutBean()); + return R.ok(exportSupport(list, fields)); + } + + //------------------鏃ュ叆搴撴槑缁嗙粺璁�-------------------------------------- + @RequestMapping("/viewWorkInList.action") + public Map<String,Object> viewWorkInList(ViewWorkInBean bean){ + List<ViewWorkInBean> list = reportQueryMapper.queryViewWorkInList(bean); + int count = reportQueryMapper.getViewWorkInCount(bean); + Page<ViewWorkInBean> page = new Page<>(); + page.setRecords(list); + page.setTotal(count); + return R.ok(page); + } + + /** + * 鏃ュ叆搴撴眹鎬绘煡璇� + * @return + */ + @RequestMapping("/viewWorkCountInList.action") + public R viewWorkCountInList(@RequestParam(defaultValue = "1")Integer curr, + @RequestParam(defaultValue = "10")Integer limit, + @RequestParam Map<String, Object> param){ + String startTime = "1970.1.2"; + String endTime = "2099.1.2"; + if (!Cools.isEmpty(param.get("query_date"))) { + String queryDate = (String) param.get("query_date"); + String[] split = queryDate.split(" - "); + startTime= split[0].split(" ")[0].replace("-","."); + endTime = split[1].split(" ")[0].replace("-","."); + } + List<ViewWorkCountInView> allCountIn = reportQueryMapper.selectWorkCountIn(Integer.valueOf((String) param.get("pageNumber")), Integer.valueOf((String) param.get("pageSize")), (String) param.get("matnr"), startTime,endTime); + Integer total = reportQueryMapper.selectWorkCountInTotal((String) param.get("matnr"), startTime,endTime); + Page<ViewWorkCountInView> page = new Page<>(); + page.setRecords(allCountIn); + page.setTotal(total); + Integer sum = reportQueryMapper.selectWorkCountInSum((String) param.get("matnr"), startTime,endTime); + HashMap<String, Object> result = new HashMap<>(); + result.put("page",page); + result.put("sum",sum); + return R.ok(result); + } + + /** + * 鏃ュ嚭搴撴眹鎬� + */ + @RequestMapping("/viewWorkCountOutList.action") + public R viewWorkCountOutList(@RequestParam(defaultValue = "1")Integer curr, + @RequestParam(defaultValue = "10")Integer limit, + @RequestParam Map<String, Object> param){ + String startTime = "1970.1.2"; + String endTime = "2099.1.2"; + if (!Cools.isEmpty(param.get("query_date"))) { + String queryDate = (String) param.get("query_date"); + String[] split = queryDate.split(" - "); + startTime= split[0].split(" ")[0].replace("-","."); + endTime = split[1].split(" ")[0].replace("-","."); + } + List<ViewWorkCountInView> allCountIn = reportQueryMapper.selectWorkCountOut(Integer.valueOf((String) param.get("pageNumber")), Integer.valueOf((String) param.get("pageSize")), (String) param.get("matnr"), startTime,endTime); + Integer total = reportQueryMapper.selectWorkCountOutTotal((String) param.get("matnr"), startTime,endTime); + Page<ViewWorkCountInView> page = new Page<>(); + page.setRecords(allCountIn); + page.setTotal(total); + Integer sum = reportQueryMapper.selectWorkCountOutSum((String) param.get("matnr"), startTime,endTime); + HashMap<String, Object> result = new HashMap<>(); + result.put("page",page); + result.put("sum",sum); + return R.ok(result); + } + + //excel瀵煎嚭 + @RequestMapping("/viewWorkInExport.action") + @ManagerAuth(memo = "鏃ュ叆搴撴槑缁嗙粺璁″鍑�") + public R viewWorkInExport(@RequestBody JSONObject param){ + List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); + @SuppressWarnings("unchecked") + ViewWorkInBean bean = Cools.conver((Map<? extends String, ?>) param.get("exportData"), ViewWorkInBean.class); + bean.setQuery_date(bean.getQuery_date()); + List<ViewWorkInBean> list = reportQueryMapper.getViewWorkInAll(bean); + return R.ok(exportSupport(list, fields)); + } + + //------------------鏃ュ嚭搴撴槑缁嗙粺璁�-------------------------------------- + @RequestMapping("/viewWorkOutList.action") + public R viewWorkOutList(ViewWorkInBean bean){ + List<ViewWorkInBean> list = reportQueryMapper.queryViewWorkOutList(bean); + int count = reportQueryMapper.getViewWorkOutCount(bean); + Page<ViewWorkInBean> page = new Page<>(); + page.setRecords(list); + page.setTotal(count); + return R.ok(page); + } + + //excel瀵煎嚭 + @RequestMapping("/viewWorkOutExport.action") + @ManagerAuth(memo = "鏃ュ嚭搴撴槑缁嗙粺璁″鍑�") + public R viewWorkOutExport(@RequestBody JSONObject param){ + List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); + @SuppressWarnings("unchecked") + ViewWorkInBean bean = Cools.conver((Map<? extends String, ?>) param.get("exportData"), ViewWorkInBean.class); + bean.setQuery_date(bean.getQuery_date()); + List<ViewWorkInBean> list = reportQueryMapper.getViewWorkOutAll(bean); + return R.ok(exportSupport(list, fields)); + } + +} diff --git a/src/main/java/com/zy/asrs/entity/ViewInOutBean.java b/src/main/java/com/zy/asrs/entity/ViewInOutBean.java new file mode 100644 index 0000000..27fdb86 --- /dev/null +++ b/src/main/java/com/zy/asrs/entity/ViewInOutBean.java @@ -0,0 +1,73 @@ +package com.zy.asrs.entity; + +/** + * 鏃ュ嚭鍏ュ簱娆℃暟缁熻 + * @author admin + * @date 2018骞�11鏈�24鏃� + */ +public class ViewInOutBean { + private String ymd; + private String source_sta_no; + private Long sto_qty; + private Long ret_qty; + private Long total_qty; + private int pageNumber; + private int pageSize; + private String begin_date; //鏌ヨ寮�濮嬫棩鏈� + private String end_date; //鏌ヨ鎴鏃ユ湡 + + public String getYmd() { + return ymd; + } + public void setYmd(String ymd) { + this.ymd = ymd; + } + public String getSource_sta_no() { + return source_sta_no; + } + public void setSource_sta_no(String source_sta_no) { + this.source_sta_no = source_sta_no; + } + public Long getSto_qty() { + return sto_qty; + } + public void setSto_qty(Long sto_qty) { + this.sto_qty = sto_qty; + } + public Long getRet_qty() { + return ret_qty; + } + public void setRet_qty(Long ret_qty) { + this.ret_qty = ret_qty; + } + public Long getTotal_qty() { + return total_qty; + } + public void setTotal_qty(Long total_qty) { + this.total_qty = total_qty; + } + public int getPageNumber() { + return pageNumber; + } + public void setPageNumber(int pageNumber) { + this.pageNumber = pageNumber; + } + public int getPageSize() { + return pageSize; + } + public void setPageSize(int pageSize) { + this.pageSize = pageSize; + } + public String getBegin_date() { + return begin_date; + } + public void setBegin_date(String begin_date) { + this.begin_date = begin_date; + } + public String getEnd_date() { + return end_date; + } + public void setEnd_date(String end_date) { + this.end_date = end_date; + } +} \ No newline at end of file diff --git a/src/main/java/com/zy/asrs/entity/ViewLocMapDto.java b/src/main/java/com/zy/asrs/entity/ViewLocMapDto.java new file mode 100644 index 0000000..53fbbc4 --- /dev/null +++ b/src/main/java/com/zy/asrs/entity/ViewLocMapDto.java @@ -0,0 +1,103 @@ +package com.zy.asrs.entity; + +/** + * Created by vincent on 2020-05-20 + */ +public class ViewLocMapDto { + + // 搴撲綅鍙� + private String locNo; + // 鍒� + private Integer bay1; + // 搴撲綅鐘舵�� + private String locSts; + // 鑳屾櫙鑹� + private String bgc = "#fff"; + // 瀛椾綋棰滆壊 + private String color = "#666"; + + public ViewLocMapDto() { + } + + public ViewLocMapDto(String locNo, Integer bay1, String locSts) { + this.locNo = locNo; + this.bay1 = bay1; + this.locSts = locSts; + } + + public String getLocNo() { + return locNo; + } + + public void setLocNo(String locNo) { + this.locNo = locNo; + } + + public Integer getBay1() { + return bay1; + } + + public void setBay1(Integer bay1) { + this.bay1 = bay1; + } + + public String getLocSts() { + return locSts; + } + + public void setLocSts(String locSts) { + this.locSts = locSts; + switch (locSts){ + case "D": + this.bgc = "#00B271"; + this.color = "#fff"; + break; + case "F": + this.bgc = "#479AC7"; + this.color = "#fff"; + break; + case "O": + this.bgc = "#B45B3E"; + this.color = "#fff"; + break; + case "P": + this.bgc = "#66CCCC"; + this.color = "#fff"; + break; + case "Q": + this.bgc = "#5172ef"; + this.color = "#fff"; + break; + case "R": + this.bgc = "#D7FFF0"; + this.color = "#000"; + break; + case "S": + this.bgc = "#F0DAD2"; + this.color = "#000"; + break; + case "X": + this.bgc = "#bac296"; + this.color = "#fff"; + break; + default: + break; + } + } + + public String getBgc() { + return bgc; + } + + public void setBgc(String bgc) { + this.bgc = bgc; + } + + public String getColor() { + return color; + } + + public void setColor(String color) { + this.color = color; + } +} diff --git a/src/main/java/com/zy/asrs/entity/ViewStayTimeBean.java b/src/main/java/com/zy/asrs/entity/ViewStayTimeBean.java new file mode 100644 index 0000000..0a172e0 --- /dev/null +++ b/src/main/java/com/zy/asrs/entity/ViewStayTimeBean.java @@ -0,0 +1,179 @@ +package com.zy.asrs.entity; + +import com.baomidou.mybatisplus.annotations.TableField; +import com.core.common.Cools; +import com.core.common.SpringUtils; +import com.zy.system.entity.User; +import com.zy.system.service.UserService; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.text.SimpleDateFormat; +import java.util.Date; + +/** + * 搴撳瓨婊炵暀鏃堕棿瀹炰綋绫� + * @author admin + * @date 2018骞�11鏈�23鏃� + */ +@Data +public class ViewStayTimeBean { + + private int pageNumber; + private int pageSize; + + private int stay_time; + + private String begin_date; + private String end_date; + + private Integer row; + + @ApiModelProperty(value= "搴撲綅鍙�") + private String loc_no; + + @ApiModelProperty(value= "鎵樼洏鏉$爜") + private String zpallet; + + @ApiModelProperty(value= "鏁伴噺") + private Double anfme; + + @ApiModelProperty(value= "鍟嗗搧缂栧彿") + private String matnr; + + @ApiModelProperty(value= "鍟嗗搧鍚嶇О") + private String maktx; + + @ApiModelProperty(value= "鎵瑰彿") + private String batch; + + @ApiModelProperty(value= "鍗曟嵁缂栧彿") + @TableField("order_no") + private String orderNo; + + @ApiModelProperty(value= "瑙勬牸") + private String specs; + + @ApiModelProperty(value= "鍨嬪彿") + private String model; + + @ApiModelProperty(value= "棰滆壊") + private String color; + + @ApiModelProperty(value= "鍝佺墝") + private String brand; + + @ApiModelProperty(value= "鍗曚綅") + private String unit; + + @ApiModelProperty(value= "鍗曚环") + private Double price; + + @ApiModelProperty(value= "sku") + private String sku; + + @ApiModelProperty(value= "鍗曚綅閲�") + private Double units; + + @ApiModelProperty(value= "鏉$爜") + private String barcode; + + @ApiModelProperty(value= "浜у湴") + private String origin; + + @ApiModelProperty(value= "鍘傚") + private String manu; + + @ApiModelProperty(value= "鐢熶骇鏃ユ湡") + private String manu_date; + + @ApiModelProperty(value= "鍝侀」鏁�") + private String item_num; + + @ApiModelProperty(value= "瀹夊叏搴撳瓨閲�") + private Double safe_qty; + + @ApiModelProperty(value= "閲嶉噺") + private Double weight; + + @ApiModelProperty(value= "闀垮害") + private Double length; + + @ApiModelProperty(value= "浣撶Н") + private Double volume; + + @ApiModelProperty(value= "涓夋柟缂栫爜") + private String three_code; + + @ApiModelProperty(value= "渚涘簲鍟�") + private String supp; + + @ApiModelProperty(value= "渚涘簲鍟嗙紪鐮�") + private String supp_code; + + @ApiModelProperty(value= "鏄惁鎵规 1: 鏄� 0: 鍚� ") + private Integer be_batch; + + @ApiModelProperty(value= "淇濊川鏈�") + private String dead_time; + + @ApiModelProperty(value= "棰勮澶╂暟") + private Integer dead_warn; + + @ApiModelProperty(value= "鍒惰喘 1: 鍒堕�� 2: 閲囪喘 3: 澶栧崗 ") + private Integer source; + + @ApiModelProperty(value= "瑕佹眰妫�楠� 1: 鏄� 0: 鍚� ") + private Integer inspect; + + @ApiModelProperty(value= "鍗遍櫓鍝� 1: 鏄� 0: 鍚� ") + private Integer danger; + + @ApiModelProperty(value= "淇敼浜哄憳") + private Long modi_user; + + @ApiModelProperty(value= "淇敼鏃堕棿") + private Date modi_time; + + @ApiModelProperty(value= "鍒涘缓鑰�") + private Long appe_user; + + @ApiModelProperty(value= "娣诲姞鏃堕棿") + private Date appe_time; + + @ApiModelProperty(value= "澶囨敞") + private String memo; + + public String getModiUser$(){ + UserService service = SpringUtils.getBean(UserService.class); + User user = service.selectById(this.modi_user); + if (!Cools.isEmpty(user)){ + return String.valueOf(user.getUsername()); + } + return null; + } + + public String getModiTime$(){ + if (Cools.isEmpty(this.modi_time)){ + return ""; + } + return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modi_time); + } + + public String getAppeUser$(){ + UserService service = SpringUtils.getBean(UserService.class); + User user = service.selectById(this.appe_user); + if (!Cools.isEmpty(user)){ + return String.valueOf(user.getUsername()); + } + return null; + } + + public String getAppeTime$(){ + if (Cools.isEmpty(this.appe_time)){ + return ""; + } + return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appe_time); + } + +} diff --git a/src/main/java/com/zy/asrs/entity/ViewStockUseBean.java b/src/main/java/com/zy/asrs/entity/ViewStockUseBean.java new file mode 100644 index 0000000..616a857 --- /dev/null +++ b/src/main/java/com/zy/asrs/entity/ViewStockUseBean.java @@ -0,0 +1,81 @@ +package com.zy.asrs.entity; + +/** + * 搴撲綅浣跨敤鐜囪鍥惧疄浣撶被 + * @author admin + * @date 2018骞�11鏈�23鏃� + */ +public class ViewStockUseBean { + private String row1; //閽㈡灦鍙� + private Long total_qty; //搴撲綅鎬绘暟 + private Long full_qty; //鍦ㄥ簱鏁伴噺 + private Long null_qty; //绌哄簱浣� + private Long forbid_qty; //绂佺敤搴撲綅 + private Long empty_qty; //绌哄鍣� + private String full_rate; //鍦ㄥ簱鐜� + private String occ_rate; //浣跨敤鐜� + private int pageNumber; + private int pageSize; + + public String getRow1() { + return row1; + } + public void setRow1(String row1) { + this.row1 = row1; + } + public Long getTotal_qty() { + return total_qty; + } + public void setTotal_qty(Long total_qty) { + this.total_qty = total_qty; + } + public Long getFull_qty() { + return full_qty; + } + public void setFull_qty(Long full_qty) { + this.full_qty = full_qty; + } + public Long getNull_qty() { + return null_qty; + } + public void setNull_qty(Long null_qty) { + this.null_qty = null_qty; + } + public Long getForbid_qty() { + return forbid_qty; + } + public void setForbid_qty(Long forbid_qty) { + this.forbid_qty = forbid_qty; + } + public Long getEmpty_qty() { + return empty_qty; + } + public void setEmpty_qty(Long empty_qty) { + this.empty_qty = empty_qty; + } + public String getFull_rate() { + return full_rate; + } + public void setFull_rate(String full_rate) { + this.full_rate = full_rate; + } + public String getOcc_rate() { + return occ_rate; + } + public void setOcc_rate(String occ_rate) { + this.occ_rate = occ_rate; + } + public int getPageNumber() { + return pageNumber; + } + public void setPageNumber(int pageNumber) { + this.pageNumber = pageNumber; + } + public int getPageSize() { + return pageSize; + } + public void setPageSize(int pageSize) { + this.pageSize = pageSize; + } + +} \ No newline at end of file diff --git a/src/main/java/com/zy/asrs/entity/ViewWorkCountInView.java b/src/main/java/com/zy/asrs/entity/ViewWorkCountInView.java new file mode 100644 index 0000000..8a8fd87 --- /dev/null +++ b/src/main/java/com/zy/asrs/entity/ViewWorkCountInView.java @@ -0,0 +1,11 @@ +package com.zy.asrs.entity; + +import lombok.Data; + +@Data +public class ViewWorkCountInView { + private String oneday; + private String matnr; + private String maktx; + private String anfme; +} diff --git a/src/main/java/com/zy/asrs/entity/ViewWorkInBean.java b/src/main/java/com/zy/asrs/entity/ViewWorkInBean.java new file mode 100644 index 0000000..a4947ff --- /dev/null +++ b/src/main/java/com/zy/asrs/entity/ViewWorkInBean.java @@ -0,0 +1,193 @@ +package com.zy.asrs.entity; + +import com.baomidou.mybatisplus.annotations.TableField; +import com.core.common.Cools; +import com.core.common.SpringUtils; +import com.zy.system.entity.User; +import com.zy.system.service.UserService; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.text.SimpleDateFormat; +import java.util.Date; + +/** + * 鍏ュ簱鏄庣粏缁熻 + * @author admin + * @date 2018骞�11鏈�26鏃� + */ +@Data +public class ViewWorkInBean { + + + private int pageNumber; + private int pageSize; + + private int stay_time; + + private String begin_date; + private String end_date; + private String query_date; + + private Integer row; + + private String crn_str_time; + private String crn_end_time; + + @ApiModelProperty(value= "宸ヤ綔鍙�") + private Integer wrk_no; + + @ApiModelProperty(value= "宸ヤ綔鏃堕棿") + private Date io_time; + + @ApiModelProperty(value= "搴撲綅鍙�") + private String loc_no; + + @ApiModelProperty(value= "鎵樼洏鏉$爜") + private String zpallet; + + @ApiModelProperty(value= "鏁伴噺") + private Double anfme; + + @ApiModelProperty(value= "鍟嗗搧缂栧彿") + private String matnr; + + @ApiModelProperty(value= "鍟嗗搧鍚嶇О") + private String maktx; + + @ApiModelProperty(value= "鎵瑰彿") + private String batch; + + @ApiModelProperty(value= "鍗曟嵁缂栧彿") + @TableField("order_no") + private String orderNo; + + @ApiModelProperty(value= "瑙勬牸") + private String specs; + + @ApiModelProperty(value= "鍨嬪彿") + private String model; + + @ApiModelProperty(value= "棰滆壊") + private String color; + + @ApiModelProperty(value= "鍝佺墝") + private String brand; + + @ApiModelProperty(value= "鍗曚綅") + private String unit; + + @ApiModelProperty(value= "鍗曚环") + private Double price; + + @ApiModelProperty(value= "sku") + private String sku; + + @ApiModelProperty(value= "鍗曚綅閲�") + private Double units; + + @ApiModelProperty(value= "鏉$爜") + private String barcode; + + @ApiModelProperty(value= "浜у湴") + private String origin; + + @ApiModelProperty(value= "鍘傚") + private String manu; + + @ApiModelProperty(value= "鐢熶骇鏃ユ湡") + private String manu_date; + + @ApiModelProperty(value= "鍝侀」鏁�") + private String item_num; + + @ApiModelProperty(value= "瀹夊叏搴撳瓨閲�") + private Double safe_qty; + + @ApiModelProperty(value= "閲嶉噺") + private Double weight; + + @ApiModelProperty(value= "闀垮害") + private Double length; + + @ApiModelProperty(value= "浣撶Н") + private Double volume; + + @ApiModelProperty(value= "涓夋柟缂栫爜") + private String three_code; + + @ApiModelProperty(value= "渚涘簲鍟�") + private String supp; + + @ApiModelProperty(value= "渚涘簲鍟嗙紪鐮�") + private String supp_code; + + @ApiModelProperty(value= "鏄惁鎵规 1: 鏄� 0: 鍚� ") + private Integer be_batch; + + @ApiModelProperty(value= "淇濊川鏈�") + private String dead_time; + + @ApiModelProperty(value= "棰勮澶╂暟") + private Integer dead_warn; + + @ApiModelProperty(value= "鍒惰喘 1: 鍒堕�� 2: 閲囪喘 3: 澶栧崗 ") + private Integer source; + + @ApiModelProperty(value= "瑕佹眰妫�楠� 1: 鏄� 0: 鍚� ") + private Integer inspect; + + @ApiModelProperty(value= "鍗遍櫓鍝� 1: 鏄� 0: 鍚� ") + private Integer danger; + + @ApiModelProperty(value= "淇敼浜哄憳") + private Long modi_user; + + @ApiModelProperty(value= "淇敼鏃堕棿") + private Object modi_time; + + @ApiModelProperty(value= "鍒涘缓鑰�") + private Long appe_user; + + @ApiModelProperty(value= "娣诲姞鏃堕棿") + private Object appe_time; + + @ApiModelProperty(value= "澶囨敞") + private String memo; + + public String getModiUser$(){ + UserService service = SpringUtils.getBean(UserService.class); + User user = service.selectById(this.modi_user); + if (!Cools.isEmpty(user)){ + return String.valueOf(user.getUsername()); + } + return null; + } + + public String getAppeUser$(){ + UserService service = SpringUtils.getBean(UserService.class); + User user = service.selectById(this.appe_user); + if (!Cools.isEmpty(user)){ + return String.valueOf(user.getUsername()); + } + return null; + } + + public String getIoTime$(){ + if (Cools.isEmpty(this.io_time)){ + return ""; + } + return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.io_time); + } + + public void setQuery_date(String query_date) { + this.query_date = query_date; + if (query_date.contains(" - ")) { + String[] dates = query_date.split(" - "); + this.begin_date = dates[0]; + this.end_date = dates[1]; + + } + } + +} diff --git a/src/main/java/com/zy/asrs/mapper/ReportQueryMapper.java b/src/main/java/com/zy/asrs/mapper/ReportQueryMapper.java index bd14d54..b234685 100644 --- a/src/main/java/com/zy/asrs/mapper/ReportQueryMapper.java +++ b/src/main/java/com/zy/asrs/mapper/ReportQueryMapper.java @@ -2,7 +2,9 @@ import com.zy.asrs.domain.dto.WorkChartAxis; import com.zy.asrs.domain.vo.LocChartPie; +import com.zy.asrs.entity.*; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import org.springframework.stereotype.Repository; @@ -13,6 +15,65 @@ @Repository public interface ReportQueryMapper { + //鍒嗛〉鏌ヨ搴撲綅浣跨敤鐜� + List<ViewStockUseBean> queryViewStockUseList(ViewStockUseBean viewStockUse); + + int getViewStockUseCount(ViewStockUseBean viewStockUse); + + List<ViewStockUseBean> getViewStockUseAll(ViewStockUseBean viewStockUse); + + //鍒嗛〉鏌ヨ搴撳瓨婊炵暀鏃堕棿 + public List<ViewStayTimeBean> queryViewStayTimeList(ViewStayTimeBean viewStayTime); + public int getViewStayTimeCount(ViewStayTimeBean viewStayTime); + //涓嶅垎椤垫煡璇㈡墍鏈変俊鎭紝鐢ㄤ簬excel瀵煎嚭 + public List<ViewStayTimeBean> getViewStayTimeAll(ViewStayTimeBean viewStayTime); + + // // 搴撲綅Map + @Select("select distinct row1 from asr_loc_mast order by row1 asc") + List<Integer> getViewLocRowTotal(); + + // 搴撲綅Map + @Select("select distinct bay1 from asr_loc_mast where row1=#{row1} order by bay1") + public List<String> getViewLocBayCount(@Param("row1") int row1); + + @Select("select distinct lev1 from asr_loc_mast where row1=#{row1} order by lev1 desc") + public List<String> getViewLocLevCount(@Param("row1") int row1); + + @Select("select loc_no as locNo, bay1,loc_sts as locSts from asr_loc_mast where row1=#{row1} and lev1=#{lev1} order by bay1") + public List<ViewLocMapDto> getViewLocBays(@Param("row1") int row1, @Param("lev1") int lev1); + + //鍒嗛〉鏌ヨ绔欑偣鍏ュ嚭搴撴鏁扮粺璁� + public List<ViewInOutBean> queryViewInOutList(ViewInOutBean viewInOut); + + public int getViewInOutCount(ViewInOutBean viewInOut); + + //涓嶅垎椤垫煡璇㈡墍鏈変俊鎭紝鐢ㄤ簬excel瀵煎嚭 + public List<ViewInOutBean> getViewInOutAll(ViewInOutBean viewInOut); + + //鍒嗛〉鏌ヨ鏃ュ叆搴撹褰� + public List<ViewWorkInBean> queryViewWorkInList(ViewWorkInBean viewWorkIn); + public int getViewWorkInCount(ViewWorkInBean viewWorkIn); + //涓嶅垎椤垫煡璇㈡墍鏈変俊鎭紝鐢ㄤ簬excel瀵煎嚭 + public List<ViewWorkInBean> getViewWorkInAll(ViewWorkInBean viewWorkIn); + + List<ViewWorkCountInView> selectWorkCountIn(@Param("curr") Integer curr, @Param("limit") Integer limit, @Param("matnr")String matnr, @Param("start") String startTime, @Param("end") String endTime); + + Integer selectWorkCountInTotal(String matnr, @Param("start") String startTime, @Param("end") String endTime); + + Integer selectWorkCountInSum(String matnr, @Param("start") String startTime, @Param("end") String endTime); + + List<ViewWorkCountInView> selectWorkCountOut(@Param("curr") Integer pageNumber, @Param("limit") Integer pageSize, String matnr, @Param("start") String startTime, @Param("end") String endTime); + + Integer selectWorkCountOutTotal(String matnr, @Param("start") String startTime, @Param("end") String endTime); + + Integer selectWorkCountOutSum(String matnr, @Param("start") String startTime, @Param("end") String endTime); + + //鍒嗛〉鏌ヨ鏃ュ嚭搴撹褰� + public List<ViewWorkInBean> queryViewWorkOutList(ViewWorkInBean viewWorkOut); + public int getViewWorkOutCount(ViewWorkInBean viewWorkOut); + //涓嶅垎椤垫煡璇㈡墍鏈変俊鎭紝鐢ㄤ簬excel瀵煎嚭 + public List<ViewWorkInBean> getViewWorkOutAll(ViewWorkInBean viewWorkOut); + @Select("select \n" + "Min(wm.io_time) as node,\n" + diff --git a/src/main/java/com/zy/common/web/BaseController.java b/src/main/java/com/zy/common/web/BaseController.java index 80596c9..1d40c1d 100644 --- a/src/main/java/com/zy/common/web/BaseController.java +++ b/src/main/java/com/zy/common/web/BaseController.java @@ -1,5 +1,7 @@ package com.zy.common.web; +import com.baomidou.mybatisplus.annotations.TableField; +import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.core.common.BaseRes; import com.core.common.Cools; import com.core.controller.AbstractBaseController; @@ -11,11 +13,17 @@ import javax.servlet.http.HttpServletRequest; import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; /** * Created by vincent on 2019-09-09 */ public class BaseController extends AbstractBaseController { + + protected static final String RANGE_TIME_LINK = " - "; @Autowired protected HttpServletRequest request; @@ -43,4 +51,45 @@ } return ""; } + + /** + * 鍏ㄥ瓧娈垫ā绯婃悳绱� + * @param cls 妯″瀷绫� + * @param set 鎺掗櫎瀛楁闆嗗悎 + * @param condition 鎼滅储鍐呭 + */ + protected <T> void allLike(Class<T> cls, Set<String> set, EntityWrapper<T> wrapper, String condition){ + if (Cools.isEmpty(condition)) { + return; + } + List<String> columns = new ArrayList<>(); + for (Field field :Cools.getAllFields(cls)){ + if (Modifier.isFinal(field.getModifiers()) + || Modifier.isStatic(field.getModifiers()) + || Modifier.isTransient(field.getModifiers())){ + continue; + } + String column = null; + if (field.isAnnotationPresent(TableField.class)) { + column = field.getAnnotation(TableField.class).value(); + } + if (Cools.isEmpty(column)) { + column = field.getName(); + } + if (!set.contains(column)) { + columns.add(column); + } + } + if (columns.isEmpty()) { + return; + } + for (int i=0;i<columns.size();i++){ + if (i==0){ + wrapper.andNew(); + } else { + wrapper.or(); + } + wrapper.like(columns.get(i), condition); + } + } } diff --git a/src/main/java/com/zy/system/controller/ResourceController.java b/src/main/java/com/zy/system/controller/ResourceController.java index d6e3737..64717f8 100644 --- a/src/main/java/com/zy/system/controller/ResourceController.java +++ b/src/main/java/com/zy/system/controller/ResourceController.java @@ -105,12 +105,11 @@ } @RequestMapping(value = "/resource/delete/auth") - @ManagerAuth(memo = "鑿滃崟鍒犻櫎") - public R delete(Integer[] ids){ - if (Cools.isEmpty(ids)){ - return R.error(); + @ManagerAuth + public R delete(@RequestParam(value="ids[]") Long[] ids){ + for (Long id : ids){ + resourceService.deleteById(id); } - resourceService.deleteBatchIds(Arrays.asList(ids)); return R.ok(); } diff --git a/src/main/resources/mapper/ViewInOutMapper.xml b/src/main/resources/mapper/ViewInOutMapper.xml new file mode 100644 index 0000000..8152776 --- /dev/null +++ b/src/main/resources/mapper/ViewInOutMapper.xml @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" +"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.zy.asrs.mapper.ReportQueryMapper"> + +<!-- mapper涓嶆敮鎸乻ql璇彞宓屽鏃讹紝閲囩敤sql鐗囨鍖呭惈鏂瑰紡锛岃В鍐硏ml鏍囩闂 --> +<sql id="viewInOutConditionSql"> + <if test="source_sta_no!=null and source_sta_no!='' "> + and source_sta_no like '%' + #{source_sta_no} + '%' + </if> + <if test="begin_date!=null and begin_date!='' "> + <![CDATA[ + and ymd >= #{begin_date} + ]]> + </if> + <if test="end_date!=null and end_date!='' "> + <![CDATA[ + and ymd <= #{end_date} + ]]> + </if> +</sql> + +<!-- 鍒嗛〉鏌ヨ鎵�鏈変俊鎭� --> +<select id="queryViewInOutList" parameterType="com.zy.asrs.entity.ViewInOutBean" resultType="com.zy.asrs.entity.ViewInOutBean"> +select * from ( +select *,ROW_NUMBER() OVER(Order by ymd desc) as rowid + from asr_sta_inout_view +<where> + 1=1 + <include refid="viewInOutConditionSql"></include> +</where> + ) as a +<where> + rowid between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize}) + <![CDATA[ + order by ymd desc + ]]> +</where> +</select> + +<select id="getViewInOutCount" parameterType="com.zy.asrs.entity.ViewInOutBean" resultType="Integer"> +select count(1) from asr_sta_inout_view a +<where> +<![CDATA[ + 1=1 +]]> +<include refid="viewInOutConditionSql"></include> +</where> +</select> + +<!-- 涓嶅垎椤垫煡璇㈡墍鏈変俊鎭紝鐢ㄤ簬excel瀵煎嚭 --> +<select id="getViewInOutAll" parameterType="com.zy.asrs.entity.ViewInOutBean" resultType="com.zy.asrs.entity.ViewInOutBean"> +select * from asr_sta_inout_view a +<where> + <![CDATA[ + 1=1 + ]]> + <include refid="viewInOutConditionSql"></include> + <![CDATA[ + order by ymd desc + ]]> +</where> +</select> + <select id="selectWorkCountInSum" resultType="java.lang.Integer"> + SELECT SUM(anfme) FROM asr_wrkin_count_view WHERE 1=1 AND + (oneday > #{start} + AND + oneday < #{end}) + <if test="matnr != null and matnr !=''"> + and matnr = #{matnr} + </if> + </select> + <select id="selectWorkCountOutSum" resultType="java.lang.Integer"> + SELECT SUM(anfme) FROM asr_wrkout_count_view WHERE 1=1 AND + (oneday > #{start} + AND + oneday < #{end}) + <if test="matnr != null and matnr !=''"> + and matnr = #{matnr} + </if> + </select> + +</mapper> \ No newline at end of file diff --git a/src/main/resources/mapper/ViewStayTimeMapper.xml b/src/main/resources/mapper/ViewStayTimeMapper.xml new file mode 100644 index 0000000..2b01a4f --- /dev/null +++ b/src/main/resources/mapper/ViewStayTimeMapper.xml @@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" +"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.zy.asrs.mapper.ReportQueryMapper"> + +<!-- mapper涓嶆敮鎸乻ql璇彞宓屽鏃讹紝閲囩敤sql鐗囨鍖呭惈鏂瑰紡锛岃В鍐硏ml鏍囩闂 --> +<sql id="viewStayTimeConditionSql"> + <if test="loc_no!=null and loc_no!='' "> + and asr_loc_mast.loc_no like '%' + #{loc_no} + '%' + </if> + <if test="matnr!=null and matnr!='' "> + and matnr like '%' + #{matnr} + '%' + </if> + <if test="stay_time!=null and stay_time!='' "> + and stay_time > #{stay_time} + </if> + <if test="maktx!=null and maktx!='' "> + and (maktx like '%' + #{maktx} + '%' + or lgnum like '%' + #{maktx} + '%' + or tbnum like '%' + #{maktx} + '%' + or tbpos like '%' + #{maktx} + '%' + or zmatid like '%' + #{maktx} + '%' + or werks like '%' + #{maktx} + '%' + or anfme like '%' + #{maktx} + '%' + or altme like '%' + #{maktx} + '%' + or zpallet like '%' + #{maktx} + '%' + or bname like '%' + #{maktx} + '%' + ) + </if> + <if test="begin_date!=null and begin_date!='' "> + <![CDATA[ + and appe_time >= #{begin_date} + ]]> + </if> + <if test="end_date!=null and end_date!='' "> + <![CDATA[ + and appe_time <= #{end_date} + ]]> + </if> +</sql> + +<!-- 鍒嗛〉鏌ヨ鎵�鏈変俊鎭� --> +<select id="queryViewStayTimeList" parameterType="com.zy.asrs.entity.ViewStayTimeBean" resultType="com.zy.asrs.entity.ViewStayTimeBean"> + select + * + from ( + select + ROW_NUMBER() over (order by stay_time desc) as row + , * + from + ( + SELECT + GETDATE() AS today + , CONVERT(decimal, DATEDIFF(second,asr_loc_detl.appe_time, GETDATE()) / 86400.0, 9) AS stay_time + , asr_loc_detl.* + FROM asr_loc_detl + INNER JOIN asr_loc_mast ON asr_loc_detl.loc_no = asr_loc_mast.loc_no + where 1=1 + <include refid="viewStayTimeConditionSql"></include> + ) t + ) a where a.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize}) +</select> + +<select id="getViewStayTimeCount" parameterType="com.zy.asrs.entity.ViewStayTimeBean" resultType="Integer"> + select + count(1) + from ( + select + ROW_NUMBER() over (order by stay_time desc) as row + , * + from + ( + SELECT + GETDATE() AS today + , CONVERT(decimal, DATEDIFF(second,asr_loc_detl.appe_time, GETDATE()) / 86400.0, 9) AS stay_time + , dbo.asr_loc_detl.* + FROM asr_loc_detl + INNER JOIN asr_loc_mast ON asr_loc_detl.loc_no = asr_loc_mast.loc_no + where 1=1 + <include refid="viewStayTimeConditionSql"></include> + ) t + ) a +</select> + +<!-- 涓嶅垎椤垫煡璇㈡墍鏈変俊鎭紝鐢ㄤ簬excel瀵煎嚭 --> +<select id="getViewStayTimeAll" parameterType="com.zy.asrs.entity.ViewStayTimeBean" resultType="com.zy.asrs.entity.ViewStayTimeBean"> + select + * + from ( + select + ROW_NUMBER() over (order by stay_time desc) as row + , * + from + ( + SELECT + GETDATE() AS today + , CONVERT(decimal, DATEDIFF(second,asr_loc_detl.appe_time, GETDATE()) / 86400.0, 9) AS stay_time + , dbo.asr_loc_detl.* + FROM asr_loc_detl + INNER JOIN asr_loc_mast ON asr_loc_detl.loc_no = asr_loc_mast.loc_no + where 1=1 + <include refid="viewStayTimeConditionSql"></include> + ) t + ) a +</select> + +</mapper> diff --git a/src/main/resources/mapper/ViewStockUseMapper.xml b/src/main/resources/mapper/ViewStockUseMapper.xml new file mode 100644 index 0000000..cb6440b --- /dev/null +++ b/src/main/resources/mapper/ViewStockUseMapper.xml @@ -0,0 +1,116 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" +"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.zy.asrs.mapper.ReportQueryMapper"> + +<!-- mapper涓嶆敮鎸乻ql璇彞宓屽鏃讹紝閲囩敤sql鐗囨鍖呭惈鏂瑰紡锛岃В鍐硏ml鏍囩闂 --> +<sql id="viewStockUseConditionSql"> + <if test="row1!=null and row1!='' "> + and row1 like '%' + #{row1} + '%' + </if> +</sql> + +<!-- 鍒嗛〉鏌ヨ鎵�鏈変俊鎭� --> +<select id="queryViewStockUseList" parameterType="com.zy.asrs.entity.ViewStockUseBean" resultType="com.zy.asrs.entity.ViewStockUseBean"> +select top (#{pageSize}) * from asr_stk_use_view +<where> + row1 not in (select top ((#{pageNumber}-1)*#{pageSize}) row1 from asr_stk_use_view + <where> + 1=1 + <include refid="viewStockUseConditionSql"></include> + </where> + order by row1 asc) + <include refid="viewStockUseConditionSql"></include> + <![CDATA[ + order by row1 asc + ]]> +</where> +</select> + +<select id="getViewStockUseCount" parameterType="com.zy.asrs.entity.ViewStockUseBean" resultType="Integer"> +select count(1) from asr_stk_use_view +<where> +<![CDATA[ + 1=1 +]]> +<include refid="viewStockUseConditionSql"></include> +</where> +</select> + +<!-- 涓嶅垎椤垫煡璇㈡墍鏈変俊鎭紝鐢ㄤ簬excel瀵煎嚭 --> +<select id="getViewStockUseAll" parameterType="com.zy.asrs.entity.ViewStockUseBean" resultType="com.zy.asrs.entity.ViewStockUseBean"> +select * from asr_stk_use_view +<where> + <![CDATA[ + 1=1 + ]]> + <include refid="viewStockUseConditionSql"></include> + <![CDATA[ + order by row1 asc + ]]> +</where> +</select> + <select id="selectWorkCountIn" resultType="com.zy.asrs.entity.ViewWorkCountInView"> + SELECT * + FROM ( + select + ROW_NUMBER() OVER(Order by a.oneday desc) as row + , * + FROM( + SELECT * FROM asr_wrkin_count_view + WHERE + 1 = 1 AND + (oneday > #{start} + AND + oneday < #{end}) + + <if test="matnr != null and matnr !=''"> + and matnr = #{matnr} + </if> + + ) a ) b + WHERE 1=1 and b.row between ((#{curr}-1)*#{limit}+1) and (#{curr}*#{limit}) + + </select> + <select id="selectWorkCountInTotal" resultType="java.lang.Integer"> + SELECT COUNT(*) FROM asr_wrkin_count_view + WHERE 1= 1 AND + (oneday > #{start} + AND + oneday < #{end}) + <if test="matnr != null and matnr !='' "> + and matnr = #{matnr} + </if> + </select> + <select id="selectWorkCountOut" resultType="com.zy.asrs.entity.ViewWorkCountInView"> + SELECT * + FROM ( + select + ROW_NUMBER() OVER(Order by a.oneday desc) as row + , * + FROM( + SELECT * FROM asr_wrkout_count_view + WHERE + 1 = 1 AND + (oneday > #{start} + AND + oneday < #{end}) + + <if test="matnr != null and matnr !=''"> + and matnr = #{matnr} + </if> + ) a ) b + WHERE 1=1 and b.row between ((#{curr}-1)*#{limit}+1) and (#{curr}*#{limit}) + </select> + <select id="selectWorkCountOutTotal" resultType="java.lang.Integer"> + SELECT COUNT(*) FROM asr_wrkout_count_view + WHERE 1= 1 AND + (oneday > #{start} + AND + oneday < #{end}) + <if test="matnr != null and matnr !='' "> + and matnr = #{matnr} + </if> + </select> + +</mapper> \ No newline at end of file diff --git a/src/main/resources/mapper/ViewWorkInMapper.xml b/src/main/resources/mapper/ViewWorkInMapper.xml new file mode 100644 index 0000000..e63997b --- /dev/null +++ b/src/main/resources/mapper/ViewWorkInMapper.xml @@ -0,0 +1,148 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" +"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.zy.asrs.mapper.ReportQueryMapper"> + +<!-- mapper涓嶆敮鎸乻ql璇彞宓屽鏃讹紝閲囩敤sql鐗囨鍖呭惈鏂瑰紡锛岃В鍐硏ml鏍囩闂 --> +<sql id="viewWorkInConditionSql"> + <if test="loc_no!=null and loc_no!='' "> + and loc_no like '%' + #{loc_no} + '%' + </if> + <if test="matnr!=null and matnr!='' "> + and matnr like '%' + #{matnr} + '%' + </if> + <if test="maktx!=null and maktx!='' "> + and (maktx like '%' + #{maktx} + '%' + or matnr like '%' + #{maktx} + '%' + or lgnum like '%' + #{maktx} + '%' + or tbnum like '%' + #{maktx} + '%' + or tbpos like '%' + #{maktx} + '%' + or zmatid like '%' + #{maktx} + '%' + or maktx like '%' + #{maktx} + '%' + or werks like '%' + #{maktx} + '%' + or anfme like '%' + #{maktx} + '%' + or altme like '%' + #{maktx} + '%' + or zpallet like '%' + #{maktx} + '%' + or bname like '%' + #{maktx} + '%' + ) + </if> + <if test="begin_date!=null and begin_date!='' "> + <![CDATA[ + and io_time >= #{begin_date} + ]]> + </if> + <if test="end_date!=null and end_date!='' "> + <![CDATA[ + and io_time <= #{end_date} + ]]> + </if> +</sql> + +<sql id="viewWorkOutConditionSql"> + <if test="loc_no!=null and loc_no!='' "> + and loc_no like '%' + #{loc_no} + '%' + </if> + <if test="matnr!=null and matnr!='' "> + and matnr like '%' + #{matnr} + '%' + </if> + <if test="maktx!=null and maktx!='' "> + and (maktx like '%' + #{maktx} + '%' + or matnr like '%' + #{maktx} + '%' + or lgnum like '%' + #{maktx} + '%' + or tbnum like '%' + #{maktx} + '%' + or tbpos like '%' + #{maktx} + '%' + or zmatid like '%' + #{maktx} + '%' + or maktx like '%' + #{maktx} + '%' + or werks like '%' + #{maktx} + '%' + or anfme like '%' + #{maktx} + '%' + or altme like '%' + #{maktx} + '%' + or zpallet like '%' + #{maktx} + '%' + or bname like '%' + #{maktx} + '%' + ) + </if> + <if test="begin_date!=null and begin_date!='' "> + <![CDATA[ + and crn_str_time >= #{begin_date} + ]]> + </if> + <if test="end_date!=null and end_date!='' "> + <![CDATA[ + and crn_str_time <= #{end_date} + ]]> + </if> +</sql> + +<!-- 鍏ュ簱缁熻 --> +<!-- 鍒嗛〉鏌ヨ鎵�鏈変俊鎭� --> +<select id="queryViewWorkInList" parameterType="com.zy.asrs.entity.ViewWorkInBean" resultType="com.zy.asrs.entity.ViewWorkInBean"> + select + * + from ( + select + ROW_NUMBER() OVER(Order by t.io_time desc) as row + , * + from ( + select * + from asr_wrkin_view + where 1=1 + <include refid="viewWorkInConditionSql"></include> + ) t + ) a where 1=1 and a.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize}) +</select> + +<select id="getViewWorkInCount" parameterType="com.zy.asrs.entity.ViewWorkInBean" resultType="Integer"> + select count(1) + from asr_wrkin_view a + where 1=1 + <include refid="viewWorkInConditionSql"></include> +</select> + +<!-- 涓嶅垎椤垫煡璇㈡墍鏈変俊鎭紝鐢ㄤ簬excel瀵煎嚭 --> +<select id="getViewWorkInAll" parameterType="com.zy.asrs.entity.ViewWorkInBean" resultType="com.zy.asrs.entity.ViewWorkInBean"> +<!-- select count(1)--> +<!-- from asr_wrkin_view a--> +<!-- where 1=1--> +<!-- <include refid="viewWorkInConditionSql"></include>--> + select * from asr_wrkin_view + where 1=1 + <include refid="viewWorkInConditionSql"></include> +</select> + +<!-- 鍑哄簱缁熻 --> +<!-- 鍒嗛〉鏌ヨ鎵�鏈変俊鎭� --> +<select id="queryViewWorkOutList" parameterType="com.zy.asrs.entity.ViewWorkInBean" resultType="com.zy.asrs.entity.ViewWorkInBean"> + + + select + * + from ( + select + ROW_NUMBER() OVER(Order by t.io_time desc) as row + , * + from ( + select * + from asr_wrkout_view + where 1=1 + <include refid="viewWorkInConditionSql"></include> + ) t + ) a where 1=1 and a.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize}) + +</select> + +<select id="getViewWorkOutCount" parameterType="com.zy.asrs.entity.ViewWorkInBean" resultType="Integer"> + select count(1) + from asr_wrkout_view a + where 1=1 + <include refid="viewWorkInConditionSql"></include> +</select> + +<!-- 涓嶅垎椤垫煡璇㈡墍鏈変俊鎭紝鐢ㄤ簬excel瀵煎嚭 --> +<select id="getViewWorkOutAll" parameterType="com.zy.asrs.entity.ViewWorkInBean" resultType="com.zy.asrs.entity.ViewWorkInBean"> + select * + from asr_wrkout_view a + where 1=1 + <include refid="viewWorkInConditionSql"></include> + Order by a.io_time desc +</select> + +</mapper> diff --git a/src/main/webapp/static/js/common.js b/src/main/webapp/static/js/common.js index 2a45d7e..073bb86 100644 --- a/src/main/webapp/static/js/common.js +++ b/src/main/webapp/static/js/common.js @@ -193,3 +193,81 @@ if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); return fmt; } + + +var matCols = [ + {field: 'matnr', align: 'center',title: '鍟嗗搧缂栧彿', width: 180} + // {field: 'id', align: 'center',title: 'ID'} + // ,{field: 'uuid', align: 'center',title: '缂栧彿'} + // ,{field: 'tagId$', align: 'center',title: '鎵�灞炲綊绫�'} + ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О', width: 200} + // ,{field: 'name', align: 'center',title: '鍒悕'} + // ,{field: 'specs', align: 'center',title: '閰嶇疆'} + // ,{field: 'model', align: 'center',title: '浠g爜', hide: false} + // ,{field: 'color', align: 'center',title: '棰滆壊', hide: true} + ,{field: 'brand', align: 'center',title: '鍝佺墝', hide: true} + ,{field: 'unit', align: 'center',title: '鍗曚綅', hide: true} + // ,{field: 'price', align: 'center',title: '鍗曚环', hide: true} + ,{field: 'sku', align: 'center',title: 'sku', hide: true} + ,{field: 'units', align: 'center',title: '鍗曚綅閲�', hide: true} + // ,{field: 'barcode', align: 'center',title: '鏉$爜', hide: true} + ,{field: 'origin', align: 'center',title: '浜у湴', hide: true} + ,{field: 'manu', align: 'center',title: '鍘傚', hide: true} + ,{field: 'manuDate', align: 'center',title: '鐢熶骇鏃ユ湡', hide: true} + ,{field: 'itemNum', align: 'center',title: '鍝侀」鏁�', hide: true} + ,{field: 'safeQty', align: 'center',title: '瀹夊叏搴撳瓨閲�', hide: true} + ,{field: 'weight', align: 'center',title: '鍑�閲�', hide: false} + ,{field: 'length', align: 'center',title: '姣涢噸', hide: false} + ,{field: 'volume', align: 'center',title: '浣撶Н', hide: false} + ,{field: 'threeCode', align: 'center',title: '灏哄', hide: false} + ,{field: 'supp', align: 'center',title: '渚涘簲鍟�', hide: true} + ,{field: 'suppCode', align: 'center',title: '渚涘簲鍟嗙紪鐮�', hide: true} + ,{field: 'beBatch$', align: 'center',title: '鏄惁鎵规', hide: true} + // ,{field: 'deadTime', align: 'center',title: '淇濊川鏈�', hide: true} + ,{field: 'deadWarn', align: 'center',title: '棰勮澶╂暟', hide: true} + ,{field: 'source$', align: 'center',title: '鍒惰喘', hide: true} + ,{field: 'check$', align: 'center',title: '瑕佹眰妫�楠�', hide: true} + ,{field: 'danger$', align: 'center',title: '鍗遍櫓鍝�', hide: true} + // ,{field: 'status$', align: 'center',title: '鐘舵��'} + // ,{field: 'createBy$', align: 'center',title: '娣诲姞浜哄憳'} + // ,{field: 'createTime$', align: 'center',title: '娣诲姞鏃堕棿'} + ,{field: 'updateBy$', align: 'center',title: '淇敼浜哄憳', hide: true} + ,{field: 'updateTime$', align: 'center',title: '淇敼鏃堕棿', hide: true} + ,{field: 'memo', align: 'center',title: '澶囨敞', hide: true} +] + +var detlCols = [ + {field: 'matnr', align: 'center',title: '鍟嗗搧缂栧彿', sort:true} + ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О', sort:true} + // ,{field: 'orderNo', align: 'center',title: '鍗曟嵁缂栧彿', hide: false} + ,{field: 'batch', align: 'center',title: '鎵瑰彿', sort:true} + ,{field: 'anfme', align: 'center',title: '閲嶉噺锛坘g锛�'} + // ,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜'} + + ,{field: 'specs', align: 'center',title: '閰嶇疆'} + ,{field: 'model', align: 'center',title: '浠g爜', hide: false} + ,{field: 'color', align: 'center',title: '棰滆壊', hide: true} + ,{field: 'brand', align: 'center',title: '鍝佺墝', hide: true} + ,{field: 'unit', align: 'center',title: '鍗曚綅', hide: true} + // ,{field: 'price', align: 'center',title: '鍗曚环', hide: true} + ,{field: 'sku', align: 'center',title: 'sku', hide: true} + ,{field: 'units', align: 'center',title: '鍗曚綅閲�', hide: true} + // ,{field: 'barcode', align: 'center',title: '鏉$爜', hide: true} + ,{field: 'origin', align: 'center',title: '浜у湴', hide: true} + ,{field: 'manu', align: 'center',title: '鍘傚', hide: true} + ,{field: 'manuDate', align: 'center',title: '鐢熶骇鏃ユ湡', hide: true} + ,{field: 'itemNum', align: 'center',title: '鍝侀」鏁�', hide: true} + ,{field: 'safeQty', align: 'center',title: '瀹夊叏搴撳瓨閲�', hide: true} + ,{field: 'weight', align: 'center',title: '鍑�閲�', hide: false} + ,{field: 'length', align: 'center',title: '姣涢噸', hide: false} + ,{field: 'volume', align: 'center',title: '浣撶Н', hide: false} + ,{field: 'threeCode', align: 'center',title: '灏哄', hide: false} + ,{field: 'supp', align: 'center',title: '渚涘簲鍟�', hide: true} + ,{field: 'suppCode', align: 'center',title: '渚涘簲鍟嗙紪鐮�', hide: true} + ,{field: 'beBatch$', align: 'center',title: '鏄惁鎵规', hide: true} + ,{field: 'deadTime', align: 'center',title: '淇濊川鏈�', hide: true} + ,{field: 'deadWarn', align: 'center',title: '棰勮澶╂暟', hide: true} + ,{field: 'source$', align: 'center',title: '鍒惰喘', hide: true} + ,{field: 'check$', align: 'center',title: '瑕佹眰妫�楠�', hide: true} + ,{field: 'danger$', align: 'center',title: '鍗遍櫓鍝�', hide: true} +] \ No newline at end of file diff --git a/src/main/webapp/static/js/locMast/locMast.js b/src/main/webapp/static/js/locMast/locMast.js new file mode 100644 index 0000000..c67cc91 --- /dev/null +++ b/src/main/webapp/static/js/locMast/locMast.js @@ -0,0 +1,620 @@ +var pageCurr; +layui.use(['table','laydate', 'form'], function(){ + var table = layui.table; + var $ = layui.jquery; + var layer = layui.layer; + var layDate = layui.laydate; + var form = layui.form; + + // 鏁版嵁娓叉煋 + tableIns = table.render({ + elem: '#locMast', + headers: {token: localStorage.getItem('token')}, + url: baseUrl+'/locMast/list/auth', + page: true, + limit: 16, + limits: [16, 30, 50, 100, 200, 500], + even: true, + // size: 'sm', + toolbar: '#toolbar', + cellMinWidth: 50, + cols: [[ + {type: 'checkbox', fixed: 'left'} +// ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80} + ,{field: 'locNo', align: 'center',title: '搴撲綅鍙�',sort:true} + ,{field: 'locSts$', align: 'center',title: '搴撲綅鐘舵��',width:200} + // ,{field: 'whsType$', align: 'center',title: '搴撲綅绫诲瀷'} + // ,{field: 'pltType', align: 'center',title: ''} + // ,{field: 'ctnType', align: 'center',title: ''} + // ,{field: 'locSts', align: 'center',title: ''} + // ,{field: 'sheetNo', align: 'center',title: ''} + ,{field: 'crnNo', align: 'center',title: '鍫嗗灈鏈哄彿'} + ,{field: 'row1', align: 'center',title: '鎺�', sort:true} + ,{field: 'bay1', align: 'center',title: '鍒�', sort:true} + ,{field: 'lev1', align: 'center',title: '灞�', sort:true} + // ,{field: 'fullPlt', align: 'center',title: '婊℃澘', templet:function(row){ + // var html = "<input value='fullPlt' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' disabled table-index='"+row.LAY_TABLE_INDEX+"'"; + // if(row.fullPlt === 'Y'){html += " checked ";} + // html += ">"; + // return html; + // },width:80} + // ,{field: 'outEnable', align: 'center',title: ''} + // ,{field: 'ioTime$', align: 'center',title: ''} + // ,{field: 'firstTime$', align: 'center',title: ''} + ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', hide:true} + ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿', hide:true} + // ,{field: 'appeUser$', align: 'center',title: '鍒涘缓鑰�',event: 'appeUser', style: 'text-decoration: underline;cursor:pointer'} + // ,{field: 'appeTime$', align: 'center',title: '娣诲姞鏃堕棿'} + // ,{field: 'errorTime$', align: 'center',title: ''} + // ,{field: 'errorMemo', align: 'center',title: ''} + // ,{field: 'ctnKind', align: 'center',title: ''} + // ,{field: 'scWeight', align: 'center',title: ''} + // ,{field: 'invWh', align: 'center',title: ''} + // ,{field: 'mk', align: 'center',title: ''} + // ,{field: 'barcode', align: 'center',title: ''} + // ,{field: 'PdcType', align: 'center',title: ''} + // ,{field: 'ctnNo', align: 'center',title: ''} + ,{field: 'locType1$', align: 'center',title: '搴撲綅绫诲瀷'} + // ,{field: 'locType2$', align: 'center',title: '瀹界獎绫诲瀷'} + // ,{field: 'locType3$', align: 'center',title: '杞婚噸绫诲瀷'} + + ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:100} + ]], + request: { + pageName: 'curr', + pageSize: 'limit' + }, + parseData: function (res) { + return { + 'code': res.code, + 'msg': res.msg, + 'count': res.data.total, + 'data': res.data.records + } + }, + response: { + statusCode: 200 + }, + done: function(res, curr, count) { + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + pageCurr=curr; + limit(); + form.on('checkbox(tableCheckbox)', function (data) { + var _index = $(data.elem).attr('table-index')||0; + if(data.elem.checked){ + res.data[_index][data.value] = 'Y'; + }else{ + res.data[_index][data.value] = 'N'; + } + }); + } + }); + + // 鐩戝惉鎺掑簭浜嬩欢 + table.on('sort(locMast)', function (obj) { + var searchData = {}; + $.each($('#search-box [name]').serializeArray(), function() { + searchData[this.name] = this.value; + }); + searchData['orderByField'] = obj.field; + searchData['orderByType'] = obj.type; + tableIns.reload({ + where: searchData, + page: { + curr: 1 + }, + done: function (res, curr, count) { + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + pageCurr=curr; + limit(); + } + }); + }); + + // 鐩戝惉澶村伐鍏锋爮浜嬩欢 + table.on('toolbar(locMast)', function (obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch(obj.event) { + case 'addData': + layer.open({ + type: 2, + title: '鏂板', + maxmin: true, + area: ['500px', top.detailHeight], + shadeClose: false, + content: 'locMast_detail.html', + success: function(layero, index){ + layer.getChildFrame('#data-detail-submit-edit', index).hide(); + clearFormVal(layer.getChildFrame('#detail', index)); + top.convertDisabled(layer.getChildFrame('#data-detail :input', index), false); + layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); + } + }); + break; + case 'refreshData': + tableIns.reload({ + page: { + curr: pageCurr + } + }); + limit(); + break; + case 'deleteData': + var data = checkStatus.data; + if (data.length === 0){ + layer.msg('璇烽�夋嫨鏁版嵁'); + } else { + layer.confirm('纭畾鍒犻櫎'+(data.length===1?'姝�':data.length)+'鏉℃暟鎹悧', function(){ + $.ajax({ + url: baseUrl+"/locMast/delete/auth", + headers: {'token': localStorage.getItem('token')}, + data: {param: JSON.stringify(data)}, + method: 'POST', + traditional:true, + success: function (res) { + if (res.code === 200){ + layer.closeAll(); + tableReload(false); + } else if (res.code === 403){ + top.location.href = baseUrl+"/"; + } else { + layer.msg(res.msg) + } + } + }) + }); + } + break; + case 'exportData': + layer.confirm('纭畾瀵煎嚭Excel鍚�', {shadeClose: true}, function(){ + var titles=[]; + var fields=[]; + obj.config.cols[0].map(function (col) { + if (col.type === 'normal' && col.hide === false && col.toolbar == null) { + titles.push(col.title); + fields.push(col.field); + } + }); + var exportData = {}; + $.each($('#search-box [name]').serializeArray(), function() { + exportData[this.name] = this.value; + }); + var param = { + 'locMast': exportData, + 'fields': fields + }; + $.ajax({ + url: baseUrl+"/locMast/export/auth", + headers: {'token': localStorage.getItem('token')}, + data: JSON.stringify(param), + dataType:'json', + contentType:'application/json;charset=UTF-8', + method: 'POST', + success: function (res) { + layer.closeAll(); + if (res.code === 200) { + table.exportFile(titles,res.data,'xls'); + } else if (res.code === 403) { + top.location.href = baseUrl+"/"; + } else { + layer.msg(res.msg) + } + } + }); + }); + break; + case "init": + layer.prompt({title: '璇疯緭鍏ュ彛浠わ紝骞堕噸缃簱浣�', formType: 1, shadeClose: true}, function(pass, idx){ + http.get(baseUrl+"/locMast/init/pwd", {pwd: pass}, function (res) { + if (res.data) { + layer.open({ + type: 1, + title: '鍒濆鍖栧簱浣�', + area: ["400px"], + maxmin: true, + shadeClose: true, + content: $("#resetLocDiv"), + success: function (layero, index) { + + } + }) + } else { + layer.msg("鍙d护閿欒"); + } + layer.close(idx); + }) + }); + break; + } + }); + + // 鐩戝惉琛屽伐鍏蜂簨浠� + table.on('tool(locMast)', function(obj){ + var data = obj.data; + switch (obj.event) { + // 璇︽儏 + case 'detail': + layer.open({ + type: 2, + title: '璇︽儏', + maxmin: true, + area: [top.detailWidth, top.detailHeight], + shadeClose: false, + content: 'locMast_detail.html', + success: function(layero, index){ + setFormVal(layer.getChildFrame('#detail', index), data, true); + top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); + layer.getChildFrame('#data-detail-submit-save,#prompt', index).hide(); + layer.getChildFrame('#data-detail-submit-edit', index).hide(); + layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); + layero.find('iframe')[0].contentWindow.layui.form.render('select'); + layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); + } + }); + break; + // 缂栬緫 + case 'edit': + layer.open({ + type: 2, + title: '淇敼', + maxmin: true, + area: ['500px', top.detailHeight], + shadeClose: false, + content: 'locMast_detail.html', + success: function(layero, index){ + layer.getChildFrame('#data-detail-submit-save', index).hide(); + setFormVal(layer.getChildFrame('#detail', index), data, false); + // top.convertDisabled(layer.getChildFrame('#data-detail :input', index), false); + top.convertDisabled(layer.getChildFrame('#locNo', index), true); + layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); + layero.find('iframe')[0].contentWindow.layui.form.render('select'); + layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); + } + }); + break; + case 'whsType': + var param = top.reObject(data).whsType; + if (param === undefined) { + layer.msg("鏃犳暟鎹�"); + } else { + layer.open({ + type: 2, + title: '搴撲綅璇︽儏', + maxmin: true, + area: [top.detailWidth, top.detailHeight], + shadeClose: false, + content: '../basWhs/basWhs_detail.html', + success: function(layero, index){ + $.ajax({ + url: baseUrl+"/basWhs/"+ param +"/auth", + headers: {'token': localStorage.getItem('token')}, + method: 'GET', + success: function (res) { + if (res.code === 200){ + setFormVal(layer.getChildFrame('#detail', index), res.data, true); + top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); + layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide(); + layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); + layero.find('iframe')[0].contentWindow.layui.form.render('select'); + layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); + } else if (res.code === 403){ + parent.location.href = "/"; + }else { + layer.msg(res.msg) + } + } + }) + } + }); + } + break; + case 'modiUser': + var param = top.reObject(data).modiUser; + if (param === undefined) { + layer.msg("鏃犳暟鎹�"); + } else { + layer.open({ + type: 2, + title: '淇敼璇︽儏', + maxmin: true, + area: [top.detailWidth, top.detailHeight], + shadeClose: false, + content: '../user/user_detail.html', + success: function(layero, index){ + $.ajax({ + url: baseUrl+"/user/"+ param +"/auth", + headers: {'token': localStorage.getItem('token')}, + method: 'GET', + success: function (res) { + if (res.code === 200){ + setFormVal(layer.getChildFrame('#detail', index), res.data, true); + top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); + layer.getChildFrame('#password,#createTime\\$,#status', index).parent().parent().hide(); + layer.getChildFrame('#data-detail-submit,#prompt', index).hide(); + layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); + layero.find('iframe')[0].contentWindow.layui.form.render('select'); + layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); + } else if (res.code === 403){ + parent.location.href = "/"; + }else { + layer.msg(res.msg) + } + } + }) + } + }); + } + break; + case 'appeUser': + var param = top.reObject(data).appeUser; + if (param === undefined) { + layer.msg("鏃犳暟鎹�"); + } else { + layer.open({ + type: 2, + title: '鍒涜鎯�', + maxmin: true, + area: [top.detailWidth, top.detailHeight], + shadeClose: false, + content: '../user/user_detail.html', + success: function(layero, index){ + $.ajax({ + url: baseUrl+"/user/"+ param +"/auth", + headers: {'token': localStorage.getItem('token')}, + method: 'GET', + success: function (res) { + if (res.code === 200){ + setFormVal(layer.getChildFrame('#detail', index), res.data, true); + top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); + layer.getChildFrame('#data-detail-submit', index).hide(); + layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); + layero.find('iframe')[0].contentWindow.layui.form.render('select'); + layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); + } else if (res.code === 403){ + parent.location.href = "/"; + }else { + layer.msg(res.msg) + } + } + }) + } + }); + } + break; + + } + }); + + // 鍒濆鍖栦繚瀛� + form.on('submit(initDo)', function (data) { + $.ajax({ + url: baseUrl+"/locMast/init/auth", + headers: {'token': localStorage.getItem('token')}, + data: data.field, + method: 'POST', + async: false, + success: function (res) { + if (res.code === 200){ + layer.msg(res.msg); + layer.closeAll(); + tableReload(false); + } else if (res.code === 403){ + parent.location.href = "/"; + }else { + layer.msg(res.msg) + } + } + }) + }); + + // 鏁版嵁淇濆瓨鍔ㄤ綔 + form.on('submit(save)', function () { + if (banMsg != null){ + layer.msg(banMsg); + return; + } + method("add"); + }); + + // 鏁版嵁淇敼鍔ㄤ綔 + form.on('submit(edit)', function () { + method("update") + }); + + function method(name){ + var index = layer.load(1, { + shade: [0.5,'#000'] //0.1閫忔槑搴︾殑鑳屾櫙 + }); + var data = { +// id: $('#id').val(), + locNo: $('#locNo').val(), + whsType: $('#whsType').val(), + pltType: $('#pltType').val(), + ctnType: $('#ctnType').val(), + locSts: $('#locSts').val(), + sheetNo: $('#sheetNo').val(), + crnNo: $('#crnNo').val(), + row1: $('#row1').val(), + bay1: $('#bay1').val(), + lev1: $('#lev1').val(), + fullPlt: $('#fullPlt').val(), + locType: $('#locType').val(), + outEnable: $('#outEnable').val(), + ioTime: top.strToDate($('#ioTime\\$').val()), + firstTime: top.strToDate($('#firstTime\\$').val()), + modiUser: $('#modiUser').val(), + modiTime: top.strToDate($('#modiTime\\$').val()), + appeUser: $('#appeUser').val(), + appeTime: top.strToDate($('#appeTime\\$').val()), + errorTime: top.strToDate($('#errorTime\\$').val()), + errorMemo: $('#errorMemo').val(), + ctnKind: $('#ctnKind').val(), + scWeight: $('#scWeight').val(), + invWh: $('#invWh').val(), + mk: $('#mk').val(), + barcode: $('#barcode').val(), + PdcType: $('#PdcType').val(), + ctnNo: $('#ctnNo').val(), + + }; + $.ajax({ + url: baseUrl+"/locMast/"+name+"/auth", + headers: {'token': localStorage.getItem('token')}, + data: top.reObject(data), + method: 'POST', + success: function (res) { + if (res.code === 200){ + parent.layer.closeAll(); + parent.$(".layui-laypage-btn")[0].click(); + $("#data-detail :input").each(function () { + $(this).val(""); + }); + } else if (res.code === 403){ + top.location.href = baseUrl+"/"; + }else { + layer.msg(res.msg) + } + layer.close(index); + } + }) + } + + // 澶嶉�夋浜嬩欢 + form.on('checkbox(detailCheckbox)', function (data) { + var el = data.elem; + if (el.checked) { + $(el).val('Y'); + } else { + $(el).val('N'); + } + }); + + // 鎼滅储鏍忔悳绱簨浠� + form.on('submit(search)', function (data) { + pageCurr = 1; + tableReload(false); + }); + + // 鎼滅储鏍忛噸缃簨浠� + form.on('submit(reset)', function (data) { + pageCurr = 1; + clearFormVal($('#search-box')); + tableReload(false); + }); + + // 鏃堕棿閫夋嫨鍣� + layDate.render({ + elem: '#ioTime\\$', + type: 'datetime' + }); + layDate.render({ + elem: '#firstTime\\$', + type: 'datetime' + }); + layDate.render({ + elem: '#modiTime\\$', + type: 'datetime' + }); + layDate.render({ + elem: '#appeTime\\$', + type: 'datetime' + }); + layDate.render({ + elem: '#errorTime\\$', + type: 'datetime' + }); + + +}); + +// 鍏抽棴鍔ㄤ綔 +$(document).on('click','#data-detail-close', function () { + parent.layer.closeAll(); +}); + +function tableReload(child) { + var searchData = {}; + $.each($('#search-box [name]').serializeArray(), function() { + searchData[this.name] = this.value; + }); + (child ? parent.tableIns : tableIns).reload({ + where: searchData, + page: { + curr: pageCurr + }, + done: function (res, curr, count) { + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + pageCurr=curr; + if (res.data.length === 0 && count !== 0) { + tableIns.reload({ + where: searchData, + page: { + curr: pageCurr-1 + } + }); + pageCurr -= 1; + } + limit(child); + } + }); +} + +function setFormVal(el, data, showImg) { + for (var val in data) { + var find = el.find(":input[id='" + val + "']"); + if (find[0]!=null){ + if (find[0].type === 'checkbox'){ + if (data[val]==='Y'){ + find.attr("checked","checked"); + find.val('Y'); + } else { + find.remove("checked"); + find.val('N'); + } + continue; + } + } + find.val(data[val]); + if (showImg){ + var next = find.next(); + if (next.get(0)){ + if (next.get(0).localName === "img") { + find.hide(); + next.attr("src", data[val]); + next.show(); + } + } + } + } +} + +function clearFormVal(el) { + $(':input', el) + .val('') + .removeAttr('checked') + .removeAttr('selected'); +} + +function detailScreen(index) { + var detail = layer.getChildFrame('#data-detail', index); + var height = detail.height()+60; + if (height > ($(window).height()*0.9)) { + height = ($(window).height()*0.8); + } + layer.style(index, { +// top: (($(window).height()-height)/3)+"px", + height: height+'px' + }); +} + +$('body').keydown(function () { + if (event.keyCode === 13) { + $("#search").click(); + } +}); diff --git a/src/main/webapp/static/js/report/inOut.js b/src/main/webapp/static/js/report/inOut.js new file mode 100644 index 0000000..e7dff96 --- /dev/null +++ b/src/main/webapp/static/js/report/inOut.js @@ -0,0 +1,196 @@ +var pageCurr; +layui.use(['table','laydate', 'form'], function(){ + var table = layui.table; + var $ = layui.jquery; + var layer = layui.layer; + var layDate = layui.laydate; + var form = layui.form; + + + // 鏁版嵁娓叉煋 + tableIns = table.render({ + elem: '#inOut', + headers: {token: localStorage.getItem('token')}, + url: baseUrl+'/report/viewInOutList.action', + page: true, + limit: 10, + toolbar: '#toolbar', + cellMinWidth: 50, + cols: [[ + // {type: 'checkbox'} + {field: 'ymd', align: 'center', title: '鏃ユ湡'} + ,{field: 'source_sta_no', align: 'center',title: '绔欑偣'} + ,{field: 'sto_qty', align: 'center',title: '鍏ュ簱娆℃暟'} + ,{field: 'ret_qty', align: 'center',title: '鍑哄簱娆℃暟'} + ,{field: 'total_qty', align: 'center',title: '鍏ュ嚭鎬绘暟'} + ]], + request: { + pageName: 'curr', + pageSize: 'limit' + }, + parseData: function (res) { + return { + 'code': res.code, + 'msg': res.msg, + 'count': res.data.total, + 'data': res.data.records + } + }, + response: { + statusCode: 200 + }, + done: function(res, curr, count) { + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + pageCurr=curr; + limit(); + } + }); + + // 鐩戝惉鎺掑簭浜嬩欢 + table.on('sort(inOut)', function (obj) { + var searchData = {}; + $.each($('#search-box [name]').serializeArray(), function() { + searchData[this.name] = this.value; + }); + searchData['orderByField'] = obj.field; + searchData['orderByType'] = obj.type; + tableIns.reload({ + where: searchData, + page: { + curr: 1 + }, + done: function (res, curr, count) { + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + pageCurr=curr; + limit(); + } + }); + }); + + // 鐩戝惉澶村伐鍏锋爮浜嬩欢 + table.on('toolbar(inOut)', function (obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch(obj.event) { + case 'exportData': + layer.confirm('纭畾瀵煎嚭Excel鍚�', {shadeClose: true}, function(){ + var titles=[]; + var fields=[]; + obj.config.cols[0].map(function (col) { + if (col.type === 'normal' && col.hide === false && col.toolbar == null) { + titles.push(col.title); + fields.push(col.field); + } + }); + var param = { + 'fields': fields + }; + $.ajax({ + url: baseUrl+"/report/viewInOutList.action", + headers: {'token': localStorage.getItem('token')}, + data: JSON.stringify(param), + dataType:'json', + contentType:'application/json;charset=UTF-8', + method: 'POST', + success: function (res) { + layer.closeAll(); + if (res.code === 200) { + table.exportFile(titles,res.data,'xls'); + } else if (res.code === 403) { + top.location.href = baseUrl+"/"; + } else { + layer.msg(res.msg) + } + } + }); + }); + break; + } + }); + + // 鎼滅储鏍忔悳绱簨浠� + form.on('submit(search)', function (data) { + pageCurr = 1; + tableReload(false); + }); +}); + +// 鍏抽棴鍔ㄤ綔 +$(document).on('click','#data-detail-close', function () { + parent.layer.closeAll(); +}); + +function tableReload(child) { + var searchData = {}; + $.each($('#search-box [name]').serializeArray(), function() { + searchData[this.name] = this.value; + }); + (child ? parent.tableIns : tableIns).reload({ + where: searchData, + page: { + curr: pageCurr + }, + done: function (res, curr, count) { + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + pageCurr=curr; + if (res.data.length === 0 && count !== 0) { + tableIns.reload({ + where: searchData, + page: { + curr: pageCurr-1 + } + }); + pageCurr -= 1; + } + limit(child); + } + }); +} + +function setFormVal(el, data, showImg) { + for (var val in data) { + var find = el.find(":input[id='" + val + "']"); + find.val(data[val]); + if (showImg){ + var next = find.next(); + if (next.get(0)){ + if (next.get(0).localName === "img") { + find.hide(); + next.attr("src", data[val]); + next.show(); + } + } + } + } +} + +function clearFormVal(el) { + $(':input', el) + .val('') + .removeAttr('checked') + .removeAttr('selected'); +} + +function detailScreen(index) { + var detail = layer.getChildFrame('#data-detail', index); + var height = detail.height()+60; + if (height > ($(window).height()*0.9)) { + height = ($(window).height()*0.9); + } + layer.style(index, { + top: (($(window).height()-height)/3)+"px", + height: height+'px' + }); + $(".layui-layer-shade").remove(); +} + +$('body').keydown(function () { + if (event.keyCode === 13) { + $("#search").click(); + } +}); diff --git a/src/main/webapp/static/js/report/locMap.js b/src/main/webapp/static/js/report/locMap.js new file mode 100644 index 0000000..e8f5ac8 --- /dev/null +++ b/src/main/webapp/static/js/report/locMap.js @@ -0,0 +1,84 @@ +layui.use(['table','laydate', 'form'], function(){ + var $ = layui.jquery; + var layer = layui.layer; + var form = layui.form; + + getLocMapRows(); + getLocTable(1); + + function getLocMapRows() { + $.ajax({ + url: baseUrl+"/report/viewLocMapList/rows.action", + headers: {'token': localStorage.getItem('token')}, + method: 'POST', + async: false, + success: function (res) { + if (res.code === 200) { + var tpl = $("#locMastRowTemplate").html(); + var template = Handlebars.compile(tpl); + var html = template(res); + $('#rowSelect').append(html); + form.render('select'); + } else if (res.code === 403) { + top.location.href = baseUrl+"/"; + } else { + layer.msg(res.msg) + } + } + }); + } + + function getLocTable(row){ + $.ajax({ + url: baseUrl+"/report/viewLocMapList.action", + headers: {'token': localStorage.getItem('token')}, + data: {row: row}, + method: 'POST', + success: function (res) { + if (res.code === 200) { + var tpl = $("#locMapTemplate").html(); + var template = Handlebars.compile(tpl); + var html = template(res.data); + $('#locMap').html(html); + } else if (res.code === 403) { + top.location.href = baseUrl+"/"; + } else { + layer.msg(res.msg) + } + } + }); + } + + form.on('select(row)', function (data) { + getLocTable(data.value); + }); +}); + +var locNo = ''; +function locDetl(el) { + var value = $(el).attr('title'); + var html = $(el).html(); + if (value===null + ||value === undefined + || value.trim()==='' + || html.trim()==='S' + || html.trim()==='D' + || html.trim()==='O' + || html.trim()==='Z' + ){ + + } else { + layer.open({ + type: 2, + title: '搴撲綅鐗╂枡', + maxmin: true, + area: [top.detailWidth, top.detailHeight], + shadeClose: true, + content: 'locDetl.html', + success: function(layero, index){ + locNo = value; + } + }); + } +} + diff --git a/src/main/webapp/static/js/report/reportStockUse.js b/src/main/webapp/static/js/report/reportStockUse.js new file mode 100644 index 0000000..414dde2 --- /dev/null +++ b/src/main/webapp/static/js/report/reportStockUse.js @@ -0,0 +1,195 @@ +var pageCurr; +layui.use(['table','laydate', 'form'], function(){ + var table = layui.table; + var $ = layui.jquery; + var layer = layui.layer; + var layDate = layui.laydate; + var form = layui.form; + + + // 鏁版嵁娓叉煋 + tableIns = table.render({ + elem: '#reportStockUse', + headers: {token: localStorage.getItem('token')}, + url: baseUrl+'/report/viewStockUseList.action', + page: true, + limit: 16, + limits: [16, 30, 50, 100, 200, 500], + toolbar: '#toolbar', + cellMinWidth: 50, + cols: [[ + // {type: 'checkbox', fixed: 'left'} + {field: 'row1', title: '閽㈡灦鍙�', sort: true, align: 'center'} + ,{field: 'total_qty', align: 'center',title: '搴撲綅鎬绘暟'} + ,{field: 'full_qty', align: 'center',title: '鍦ㄥ簱鏁伴噺'} + ,{field: 'null_qty', align: 'center',title: '绌哄簱浣嶆暟閲�'} + ,{field: 'forbid_qty', align: 'center',title: '绂佺敤搴撲綅鏁伴噺'} + ,{field: 'empty_qty', align: 'center',title: '绌哄鍣ㄦ暟閲�'} + ,{field: 'full_rate', align: 'center',title: '鍦ㄥ簱鐜�(%)'} + ,{field: 'occ_rate', align: 'center',title: '浣跨敤鐜�(%)'} + ]], + request: { + pageName: 'curr', + pageSize: 'limit' + }, + parseData: function (res) { + return { + 'code': res.code, + 'msg': res.msg, + 'count': res.data.total, + 'data': res.data.records + } + }, + response: { + statusCode: 200 + }, + done: function(res, curr, count) { + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + pageCurr=curr; + limit(); + } + }); + + // 鐩戝惉鎺掑簭浜嬩欢 + table.on('sort(reportStockUse)', function (obj) { + var searchData = {}; + $.each($('#search-box [name]').serializeArray(), function() { + searchData[this.name] = this.value; + }); + searchData['orderByField'] = obj.field; + searchData['orderByType'] = obj.type; + tableIns.reload({ + where: searchData, + page: { + curr: 1 + }, + done: function (res, curr, count) { + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + pageCurr=curr; + limit(); + } + }); + }); + + // 鐩戝惉澶村伐鍏锋爮浜嬩欢 + table.on('toolbar(reportStockUse)', function (obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch(obj.event) { + case 'exportData': + layer.confirm('纭畾瀵煎嚭Excel鍚�', {shadeClose: true}, function(){ + var titles=[]; + var fields=[]; + obj.config.cols[0].map(function (col) { + if (col.type === 'normal' && col.hide === false && col.toolbar == null) { + titles.push(col.title); + fields.push(col.field); + } + }); + var param = { + 'fields': fields + }; + $.ajax({ + url: baseUrl+"/report/viewStockUseExport.action", + headers: {'token': localStorage.getItem('token')}, + data: JSON.stringify(param), + dataType:'json', + contentType:'application/json;charset=UTF-8', + method: 'POST', + success: function (res) { + layer.closeAll(); + if (res.code === 200) { + table.exportFile(titles,res.data,'xls'); + } else if (res.code === 403) { + top.location.href = baseUrl+"/"; + } else { + layer.msg(res.msg) + } + } + }); + }); + break; + } + }); + +}); + +// 鍏抽棴鍔ㄤ綔 +$(document).on('click','#data-detail-close', function () { + parent.layer.closeAll(); +}); + +function tableReload(child) { + var searchData = {}; + $.each($('#search-box [name]').serializeArray(), function() { + searchData[this.name] = this.value; + }); + (child ? parent.tableIns : tableIns).reload({ + where: searchData, + page: { + curr: pageCurr + }, + done: function (res, curr, count) { + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + pageCurr=curr; + if (res.data.length === 0 && count !== 0) { + tableIns.reload({ + where: searchData, + page: { + curr: pageCurr-1 + } + }); + pageCurr -= 1; + } + limit(child); + } + }); +} + +function setFormVal(el, data, showImg) { + for (var val in data) { + var find = el.find(":input[id='" + val + "']"); + find.val(data[val]); + if (showImg){ + var next = find.next(); + if (next.get(0)){ + if (next.get(0).localName === "img") { + find.hide(); + next.attr("src", data[val]); + next.show(); + } + } + } + } +} + +function clearFormVal(el) { + $(':input', el) + .val('') + .removeAttr('checked') + .removeAttr('selected'); +} + +function detailScreen(index) { + var detail = layer.getChildFrame('#data-detail', index); + var height = detail.height()+60; + if (height > ($(window).height()*0.9)) { + height = ($(window).height()*0.9); + } + layer.style(index, { + top: (($(window).height()-height)/3)+"px", + height: height+'px' + }); + $(".layui-layer-shade").remove(); +} + +$('body').keydown(function () { + if (event.keyCode === 13) { + $("#search").click(); + } +}); diff --git a/src/main/webapp/static/js/report/stayTime.js b/src/main/webapp/static/js/report/stayTime.js new file mode 100644 index 0000000..7fa12ef --- /dev/null +++ b/src/main/webapp/static/js/report/stayTime.js @@ -0,0 +1,200 @@ +var pageCurr; +function getCol() { + var cols = [ + {field: 'appeTime$', title: '鍏ュ簱鏃堕棿', align: 'center', width: 200} + ,{field: 'stay_time', align: 'center',title: '婊炵暀澶╂暟'} + ,{field: 'loc_no', align: 'center',title: '搴撲綅鍙�'} + ]; + cols.push.apply(cols, detlCols); + return cols; +} + +layui.use(['table','laydate', 'form'], function(){ + var table = layui.table; + var $ = layui.jquery; + var layer = layui.layer; + var layDate = layui.laydate; + var form = layui.form; + + + // 鏁版嵁娓叉煋 + tableIns = table.render({ + elem: '#stayTime', + headers: {token: localStorage.getItem('token')}, + url: baseUrl+'/report/viewStayTimeList.action', + page: true, + limit: 16, + limits: [16, 30, 50, 100, 200, 500], + toolbar: '#toolbar', + cellMinWidth: 50, + cols: [getCol()], + request: { + pageName: 'curr', + pageSize: 'limit' + }, + parseData: function (res) { + return { + 'code': res.code, + 'msg': res.msg, + 'count': res.data.total, + 'data': res.data.records + } + }, + response: { + statusCode: 200 + }, + done: function(res, curr, count) { + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + pageCurr=curr; + limit(); + } + }); + + // 鐩戝惉鎺掑簭浜嬩欢 + table.on('sort(stayTime)', function (obj) { + var searchData = {}; + $.each($('#search-box [name]').serializeArray(), function() { + searchData[this.name] = this.value; + }); + searchData['orderByField'] = obj.field; + searchData['orderByType'] = obj.type; + tableIns.reload({ + where: searchData, + page: { + curr: 1 + }, + done: function (res, curr, count) { + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + pageCurr=curr; + limit(); + } + }); + }); + + // 鐩戝惉澶村伐鍏锋爮浜嬩欢 + table.on('toolbar(stayTime)', function (obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch(obj.event) { + case 'exportData': + layer.confirm('纭畾瀵煎嚭Excel鍚�', {shadeClose: true}, function(){ + var titles=[]; + var fields=[]; + obj.config.cols[0].map(function (col) { + if (col.type === 'normal' && col.hide === false && col.toolbar == null) { + titles.push(col.title); + fields.push(col.field); + } + }); + var param = { + 'fields': fields + }; + $.ajax({ + url: baseUrl+"/report/viewStayTimeExport.action", + headers: {'token': localStorage.getItem('token')}, + data: JSON.stringify(param), + dataType:'json', + contentType:'application/json;charset=UTF-8', + method: 'POST', + success: function (res) { + layer.closeAll(); + if (res.code === 200) { + table.exportFile(titles,res.data,'xls'); + } else if (res.code === 403) { + top.location.href = baseUrl+"/"; + } else { + layer.msg(res.msg) + } + } + }); + }); + break; + } + }); + + // 鎼滅储鏍忔悳绱簨浠� + form.on('submit(search)', function (data) { + pageCurr = 1; + tableReload(false); + }); +}); + +// 鍏抽棴鍔ㄤ綔 +$(document).on('click','#data-detail-close', function () { + parent.layer.closeAll(); +}); + +function tableReload(child) { + var searchData = {}; + $.each($('#search-box [name]').serializeArray(), function() { + searchData[this.name] = this.value; + }); + (child ? parent.tableIns : tableIns).reload({ + where: searchData, + page: { + curr: pageCurr + }, + done: function (res, curr, count) { + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + pageCurr=curr; + if (res.data.length === 0 && count !== 0) { + tableIns.reload({ + where: searchData, + page: { + curr: pageCurr-1 + } + }); + pageCurr -= 1; + } + limit(child); + } + }); +} + +function setFormVal(el, data, showImg) { + for (var val in data) { + var find = el.find(":input[id='" + val + "']"); + find.val(data[val]); + if (showImg){ + var next = find.next(); + if (next.get(0)){ + if (next.get(0).localName === "img") { + find.hide(); + next.attr("src", data[val]); + next.show(); + } + } + } + } +} + +function clearFormVal(el) { + $(':input', el) + .val('') + .removeAttr('checked') + .removeAttr('selected'); +} + +function detailScreen(index) { + var detail = layer.getChildFrame('#data-detail', index); + var height = detail.height()+60; + if (height > ($(window).height()*0.9)) { + height = ($(window).height()*0.9); + } + layer.style(index, { + top: (($(window).height()-height)/3)+"px", + height: height+'px' + }); + $(".layui-layer-shade").remove(); +} + +$('body').keydown(function () { + if (event.keyCode === 13) { + $("#search").click(); + } +}); diff --git a/src/main/webapp/static/js/report/workCountIn.js b/src/main/webapp/static/js/report/workCountIn.js new file mode 100644 index 0000000..0edc32b --- /dev/null +++ b/src/main/webapp/static/js/report/workCountIn.js @@ -0,0 +1,219 @@ +var pageCurr; +function getCol() { + var cols = [ + {field: 'oneday', align: 'center', title: '鍏ュ簱鏃ユ湡', width: 200} + ,{field: 'matnr', align: 'center',title: '鍟嗗搧缂栧彿'} + ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О'} + ,{field: 'anfme', align: 'center',title: '鏁伴噺'} + ]; + + return cols; +} + +layui.use(['table','laydate', 'form'], function(){ + var table = layui.table; + var $ = layui.jquery; + var layer = layui.layer; + var layDate = layui.laydate; + var form = layui.form; + + + // 鏁版嵁娓叉煋 + tableIns = table.render({ + elem: '#workIn', + headers: {token: localStorage.getItem('token')}, + url: baseUrl+'/report/viewWorkCountInList.action', + page: true, + limit: 16, + limits: [16, 30, 50, 100, 200, 500], + toolbar: '#toolbar', + cellMinWidth: 50, + cols: [getCol()], + request: { + pageName: 'pageNumber', + limitName: 'pageSize' + }, + parseData: function (res) { + $('#countNum').text(res.data.sum + '涓�'); + return { + 'code': res.code, + 'msg': res.msg, + 'count': res.data.page.total, + 'data': res.data.page.records + } + }, + response: { + statusCode: 200 + }, + done: function(res, curr, count) { + + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + pageCurr=curr; + limit(); + } + }); + + // 鐩戝惉鎺掑簭浜嬩欢 + table.on('sort(workIn)', function (obj) { + var searchData = {}; + $.each($('#search-box [name]').serializeArray(), function() { + searchData[this.name] = this.value; + }); + searchData['orderByField'] = obj.field; + searchData['orderByType'] = obj.type; + tableIns.reload({ + where: searchData, + page: { + curr: 1 + }, + done: function (res, curr, count) { + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + pageCurr=curr; + limit(); + } + }); + }); + + // 鐩戝惉澶村伐鍏锋爮浜嬩欢 + table.on('toolbar(workIn)', function (obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch(obj.event) { + case 'exportData': + layer.confirm('纭畾瀵煎嚭Excel鍚�', {shadeClose: true}, function(){ + var titles=[]; + var fields=[]; + obj.config.cols[0].map(function (col) { + if (col.type === 'normal' && col.hide === false && col.toolbar == null) { + titles.push(col.title); + fields.push(col.field); + } + }); + var exportData = {}; + $.each($('#search-box [name]').serializeArray(), function() { + exportData[this.name] = this.value; + }); + var param = { + fields: fields, + exportData: exportData + }; + $.ajax({ + url: baseUrl+"/report/viewWorkInExport.action", + headers: {'token': localStorage.getItem('token')}, + data: JSON.stringify(param), + dataType:'json', + contentType:'application/json;charset=UTF-8', + method: 'POST', + success: function (res) { + layer.closeAll(); + if (res.code === 200) { + table.exportFile(titles,res.data,'xls'); + } else if (res.code === 403) { + top.location.href = baseUrl+"/"; + } else { + layer.msg(res.msg) + } + } + }); + }); + break; + } + }); + + // 鎼滅储鏍忔悳绱簨浠� + form.on('submit(search)', function (data) { + pageCurr = 1; + tableReload(false); + }); + // 鎼滅储鏍忛噸缃簨浠� + form.on('submit(reset)', function (data) { + pageCurr = 1; + clearFormVal($('#search-box')); + tableReload(false); + }); + layDate.render({ + elem: '.layui-laydate-range' + ,type: 'datetime' + ,range: true + }); +}); + +// 鍏抽棴鍔ㄤ綔 +$(document).on('click','#data-detail-close', function () { + parent.layer.closeAll(); +}); + +function tableReload(child) { + var searchData = {}; + $.each($('#search-box [name]').serializeArray(), function() { + searchData[this.name] = this.value; + }); + (child ? parent.tableIns : tableIns).reload({ + where: searchData, + page: { + curr: pageCurr + }, + done: function (res, curr, count) { + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + pageCurr=curr; + if (res.data.length === 0 && count !== 0) { + tableIns.reload({ + where: searchData, + page: { + curr: pageCurr-1 + } + }); + pageCurr -= 1; + } + limit(child); + } + }); +} + +function setFormVal(el, data, showImg) { + for (var val in data) { + var find = el.find(":input[id='" + val + "']"); + find.val(data[val]); + if (showImg){ + var next = find.next(); + if (next.get(0)){ + if (next.get(0).localName === "img") { + find.hide(); + next.attr("src", data[val]); + next.show(); + } + } + } + } +} + +function clearFormVal(el) { + $(':input', el) + .val('') + .removeAttr('checked') + .removeAttr('selected'); +} + +function detailScreen(index) { + var detail = layer.getChildFrame('#data-detail', index); + var height = detail.height()+60; + if (height > ($(window).height()*0.9)) { + height = ($(window).height()*0.9); + } + layer.style(index, { + top: (($(window).height()-height)/3)+"px", + height: height+'px' + }); + $(".layui-layer-shade").remove(); +} + +$('body').keydown(function () { + if (event.keyCode === 13) { + $("#search").click(); + } +}); diff --git a/src/main/webapp/static/js/report/workCountOut.js b/src/main/webapp/static/js/report/workCountOut.js new file mode 100644 index 0000000..6534f00 --- /dev/null +++ b/src/main/webapp/static/js/report/workCountOut.js @@ -0,0 +1,220 @@ +var pageCurr; +function getCol() { + var cols = [ + {field: 'oneday', align: 'center', title: '鍏ュ簱鏃ユ湡', width: 200} + ,{field: 'matnr', align: 'center',title: '鍟嗗搧缂栧彿'} + ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О'} + ,{field: 'anfme', align: 'center',title: '鏁伴噺'} + ]; + + return cols; +} + +layui.use(['table','laydate', 'form'], function(){ + var table = layui.table; + var $ = layui.jquery; + var layer = layui.layer; + var layDate = layui.laydate; + var form = layui.form; + + + // 鏁版嵁娓叉煋 + tableIns = table.render({ + elem: '#workOut', + headers: {token: localStorage.getItem('token')}, + url: baseUrl+'/report/viewWorkCountOutList.action', + page: true, + limit: 16, + limits: [16, 30, 50, 100, 200, 500], + toolbar: '#toolbar', + cellMinWidth: 50, + cols: [getCol()], + request: { + pageName: 'pageNumber', + limitName: 'pageSize' + }, + parseData: function (res) { + $('#countNum').text(res.data.sum + '涓�'); + return { + 'code': res.code, + 'msg': res.msg, + 'count': res.data.page.total, + 'data': res.data.page.records + } + }, + response: { + statusCode: 200 + }, + done: function(res, curr, count) { + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + pageCurr=curr; + limit(); + } + }); + + // 鐩戝惉鎺掑簭浜嬩欢 + table.on('sort(workOut)', function (obj) { + var searchData = {}; + $.each($('#search-box [name]').serializeArray(), function() { + searchData[this.name] = this.value; + }); + searchData['orderByField'] = obj.field; + searchData['orderByType'] = obj.type; + tableIns.reload({ + where: searchData, + page: { + curr: 1 + }, + done: function (res, curr, count) { + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + pageCurr=curr; + limit(); + } + }); + }); + + // 鐩戝惉澶村伐鍏锋爮浜嬩欢 + table.on('toolbar(workOut)', function (obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch(obj.event) { + case 'exportData': + layer.confirm('纭畾瀵煎嚭Excel鍚�', {shadeClose: true}, function(){ + var titles=[]; + var fields=[]; + obj.config.cols[0].map(function (col) { + if (col.type === 'normal' && col.hide === false && col.toolbar == null) { + titles.push(col.title); + fields.push(col.field); + } + }); + var exportData = {}; + $.each($('#search-box [name]').serializeArray(), function() { + exportData[this.name] = this.value; + }); + var param = { + fields: fields, + exportData: exportData + }; + $.ajax({ + url: baseUrl+"/report/viewWorkOutExport.action", + headers: {'token': localStorage.getItem('token')}, + data: JSON.stringify(param), + dataType:'json', + contentType:'application/json;charset=UTF-8', + method: 'POST', + success: function (res) { + layer.closeAll(); + if (res.code === 200) { + table.exportFile(titles,res.data,'xls'); + } else if (res.code === 403) { + top.location.href = baseUrl+"/"; + } else { + layer.msg(res.msg) + } + } + }); + }); + break; + } + }); + + // 鎼滅储鏍忔悳绱簨浠� + form.on('submit(search)', function (data) { + pageCurr = 1; + tableReload(false); + }); + + // 鎼滅储鏍忛噸缃簨浠� + form.on('submit(reset)', function (data) { + pageCurr = 1; + clearFormVal($('#search-box')); + tableReload(false); + }); + layDate.render({ + elem: '.layui-laydate-range' + ,type: 'datetime' + ,range: true + }); + +}); + +// 鍏抽棴鍔ㄤ綔 +$(document).on('click','#data-detail-close', function () { + parent.layer.closeAll(); +}); + +function tableReload(child) { + var searchData = {}; + $.each($('#search-box [name]').serializeArray(), function() { + searchData[this.name] = this.value; + }); + (child ? parent.tableIns : tableIns).reload({ + where: searchData, + page: { + curr: pageCurr + }, + done: function (res, curr, count) { + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + pageCurr=curr; + if (res.data.length === 0 && count !== 0) { + tableIns.reload({ + where: searchData, + page: { + curr: pageCurr-1 + } + }); + pageCurr -= 1; + } + limit(child); + } + }); +} + +function setFormVal(el, data, showImg) { + for (var val in data) { + var find = el.find(":input[id='" + val + "']"); + find.val(data[val]); + if (showImg){ + var next = find.next(); + if (next.get(0)){ + if (next.get(0).localName === "img") { + find.hide(); + next.attr("src", data[val]); + next.show(); + } + } + } + } +} + +function clearFormVal(el) { + $(':input', el) + .val('') + .removeAttr('checked') + .removeAttr('selected'); +} + +function detailScreen(index) { + var detail = layer.getChildFrame('#data-detail', index); + var height = detail.height()+60; + if (height > ($(window).height()*0.9)) { + height = ($(window).height()*0.9); + } + layer.style(index, { + top: (($(window).height()-height)/3)+"px", + height: height+'px' + }); + $(".layui-layer-shade").remove(); +} + +$('body').keydown(function () { + if (event.keyCode === 13) { + $("#search").click(); + } +}); diff --git a/src/main/webapp/static/js/report/workIn.js b/src/main/webapp/static/js/report/workIn.js new file mode 100644 index 0000000..ec329f9 --- /dev/null +++ b/src/main/webapp/static/js/report/workIn.js @@ -0,0 +1,215 @@ +var pageCurr; +function getCol() { + var cols = [ + {field: 'ioTime$', align: 'center', title: '鍏ュ簱鏃ユ湡', width: 200} + ,{field: 'loc_no', align: 'center',title: '搴撲綅鍙�'} + ]; + cols.push.apply(cols, detlCols); + return cols; +} + +layui.use(['table','laydate', 'form'], function(){ + var table = layui.table; + var $ = layui.jquery; + var layer = layui.layer; + var layDate = layui.laydate; + var form = layui.form; + + + // 鏁版嵁娓叉煋 + tableIns = table.render({ + elem: '#workIn', + headers: {token: localStorage.getItem('token')}, + url: baseUrl+'/report/viewWorkInList.action', + page: true, + limit: 16, + limits: [16, 30, 50, 100, 200, 500], + toolbar: '#toolbar', + cellMinWidth: 50, + cols: [getCol()], + request: { + pageName: 'pageNumber', + limitName: 'pageSize' + }, + parseData: function (res) { + return { + 'code': res.code, + 'msg': res.msg, + 'count': res.data.total, + 'data': res.data.records + } + }, + response: { + statusCode: 200 + }, + done: function(res, curr, count) { + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + pageCurr=curr; + limit(); + } + }); + + // 鐩戝惉鎺掑簭浜嬩欢 + table.on('sort(workIn)', function (obj) { + var searchData = {}; + $.each($('#search-box [name]').serializeArray(), function() { + searchData[this.name] = this.value; + }); + searchData['orderByField'] = obj.field; + searchData['orderByType'] = obj.type; + tableIns.reload({ + where: searchData, + page: { + curr: 1 + }, + done: function (res, curr, count) { + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + pageCurr=curr; + limit(); + } + }); + }); + + // 鐩戝惉澶村伐鍏锋爮浜嬩欢 + table.on('toolbar(workIn)', function (obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch(obj.event) { + case 'exportData': + layer.confirm('纭畾瀵煎嚭Excel鍚�', {shadeClose: true}, function(){ + var titles=[]; + var fields=[]; + obj.config.cols[0].map(function (col) { + if (col.type === 'normal' && col.hide === false && col.toolbar == null) { + titles.push(col.title); + fields.push(col.field); + } + }); + var exportData = {}; + $.each($('#search-box [name]').serializeArray(), function() { + exportData[this.name] = this.value; + }); + var param = { + fields: fields, + exportData: exportData + }; + $.ajax({ + url: baseUrl+"/report/viewWorkInExport.action", + headers: {'token': localStorage.getItem('token')}, + data: JSON.stringify(param), + dataType:'json', + contentType:'application/json;charset=UTF-8', + method: 'POST', + success: function (res) { + layer.closeAll(); + if (res.code === 200) { + table.exportFile(titles,res.data,'xls'); + } else if (res.code === 403) { + top.location.href = baseUrl+"/"; + } else { + layer.msg(res.msg) + } + } + }); + }); + break; + } + }); + + // 鎼滅储鏍忔悳绱簨浠� + form.on('submit(search)', function (data) { + pageCurr = 1; + tableReload(false); + }); + // 鎼滅储鏍忛噸缃簨浠� + form.on('submit(reset)', function (data) { + pageCurr = 1; + clearFormVal($('#search-box')); + tableReload(false); + }); + layDate.render({ + elem: '.layui-laydate-range' + ,type: 'datetime' + ,range: true + }); +}); + +// 鍏抽棴鍔ㄤ綔 +$(document).on('click','#data-detail-close', function () { + parent.layer.closeAll(); +}); + +function tableReload(child) { + var searchData = {}; + $.each($('#search-box [name]').serializeArray(), function() { + searchData[this.name] = this.value; + }); + (child ? parent.tableIns : tableIns).reload({ + where: searchData, + page: { + curr: pageCurr + }, + done: function (res, curr, count) { + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + pageCurr=curr; + if (res.data.length === 0 && count !== 0) { + tableIns.reload({ + where: searchData, + page: { + curr: pageCurr-1 + } + }); + pageCurr -= 1; + } + limit(child); + } + }); +} + +function setFormVal(el, data, showImg) { + for (var val in data) { + var find = el.find(":input[id='" + val + "']"); + find.val(data[val]); + if (showImg){ + var next = find.next(); + if (next.get(0)){ + if (next.get(0).localName === "img") { + find.hide(); + next.attr("src", data[val]); + next.show(); + } + } + } + } +} + +function clearFormVal(el) { + $(':input', el) + .val('') + .removeAttr('checked') + .removeAttr('selected'); +} + +function detailScreen(index) { + var detail = layer.getChildFrame('#data-detail', index); + var height = detail.height()+60; + if (height > ($(window).height()*0.9)) { + height = ($(window).height()*0.9); + } + layer.style(index, { + top: (($(window).height()-height)/3)+"px", + height: height+'px' + }); + $(".layui-layer-shade").remove(); +} + +$('body').keydown(function () { + if (event.keyCode === 13) { + $("#search").click(); + } +}); diff --git a/src/main/webapp/static/js/report/workOut.js b/src/main/webapp/static/js/report/workOut.js new file mode 100644 index 0000000..c8b06bf --- /dev/null +++ b/src/main/webapp/static/js/report/workOut.js @@ -0,0 +1,219 @@ +var pageCurr; +function getCol() { + var cols = [ + {field: 'ioTime$', align: 'center', title: '鍑哄簱鏃ユ湡', width: 200} + ,{field: 'loc_no', align: 'center',title: '搴撲綅鍙�'} + ,{field: 'crn_str_time', align: 'center',title: '鍫嗗灈鏈哄惎鍔ㄦ椂闂�'} + ,{field: 'crn_end_time', align: 'center',title: '鍫嗗灈鏈哄仠姝㈡椂闂�'} + ]; + cols.push.apply(cols, detlCols); + return cols; +} + +layui.use(['table','laydate', 'form'], function(){ + var table = layui.table; + var $ = layui.jquery; + var layer = layui.layer; + var layDate = layui.laydate; + var form = layui.form; + + + // 鏁版嵁娓叉煋 + tableIns = table.render({ + elem: '#workOut', + headers: {token: localStorage.getItem('token')}, + url: baseUrl+'/report/viewWorkOutList.action', + page: true, + limit: 16, + limits: [16, 30, 50, 100, 200, 500], + toolbar: '#toolbar', + cellMinWidth: 50, + cols: [getCol()], + request: { + pageName: 'pageNumber', + limitName: 'pageSize' + }, + parseData: function (res) { + return { + 'code': res.code, + 'msg': res.msg, + 'count': res.data.total, + 'data': res.data.records + } + }, + response: { + statusCode: 200 + }, + done: function(res, curr, count) { + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + pageCurr=curr; + limit(); + } + }); + + // 鐩戝惉鎺掑簭浜嬩欢 + table.on('sort(workOut)', function (obj) { + var searchData = {}; + $.each($('#search-box [name]').serializeArray(), function() { + searchData[this.name] = this.value; + }); + searchData['orderByField'] = obj.field; + searchData['orderByType'] = obj.type; + tableIns.reload({ + where: searchData, + page: { + curr: 1 + }, + done: function (res, curr, count) { + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + pageCurr=curr; + limit(); + } + }); + }); + + // 鐩戝惉澶村伐鍏锋爮浜嬩欢 + table.on('toolbar(workOut)', function (obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch(obj.event) { + case 'exportData': + layer.confirm('纭畾瀵煎嚭Excel鍚�', {shadeClose: true}, function(){ + var titles=[]; + var fields=[]; + obj.config.cols[0].map(function (col) { + if (col.type === 'normal' && col.hide === false && col.toolbar == null) { + titles.push(col.title); + fields.push(col.field); + } + }); + var exportData = {}; + $.each($('#search-box [name]').serializeArray(), function() { + exportData[this.name] = this.value; + }); + var param = { + fields: fields, + exportData: exportData + }; + $.ajax({ + url: baseUrl+"/report/viewWorkOutExport.action", + headers: {'token': localStorage.getItem('token')}, + data: JSON.stringify(param), + dataType:'json', + contentType:'application/json;charset=UTF-8', + method: 'POST', + success: function (res) { + layer.closeAll(); + if (res.code === 200) { + table.exportFile(titles,res.data,'xls'); + } else if (res.code === 403) { + top.location.href = baseUrl+"/"; + } else { + layer.msg(res.msg) + } + } + }); + }); + break; + } + }); + + // 鎼滅储鏍忔悳绱簨浠� + form.on('submit(search)', function (data) { + pageCurr = 1; + tableReload(false); + }); + + // 鎼滅储鏍忛噸缃簨浠� + form.on('submit(reset)', function (data) { + pageCurr = 1; + clearFormVal($('#search-box')); + tableReload(false); + }); + layDate.render({ + elem: '.layui-laydate-range' + ,type: 'datetime' + ,range: true + }); + +}); + +// 鍏抽棴鍔ㄤ綔 +$(document).on('click','#data-detail-close', function () { + parent.layer.closeAll(); +}); + +function tableReload(child) { + var searchData = {}; + $.each($('#search-box [name]').serializeArray(), function() { + searchData[this.name] = this.value; + }); + (child ? parent.tableIns : tableIns).reload({ + where: searchData, + page: { + curr: pageCurr + }, + done: function (res, curr, count) { + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + pageCurr=curr; + if (res.data.length === 0 && count !== 0) { + tableIns.reload({ + where: searchData, + page: { + curr: pageCurr-1 + } + }); + pageCurr -= 1; + } + limit(child); + } + }); +} + +function setFormVal(el, data, showImg) { + for (var val in data) { + var find = el.find(":input[id='" + val + "']"); + find.val(data[val]); + if (showImg){ + var next = find.next(); + if (next.get(0)){ + if (next.get(0).localName === "img") { + find.hide(); + next.attr("src", data[val]); + next.show(); + } + } + } + } +} + +function clearFormVal(el) { + $(':input', el) + .val('') + .removeAttr('checked') + .removeAttr('selected'); +} + +function detailScreen(index) { + var detail = layer.getChildFrame('#data-detail', index); + var height = detail.height()+60; + if (height > ($(window).height()*0.9)) { + height = ($(window).height()*0.9); + } + layer.style(index, { + top: (($(window).height()-height)/3)+"px", + height: height+'px' + }); + $(".layui-layer-shade").remove(); +} + +$('body').keydown(function () { + if (event.keyCode === 13) { + $("#search").click(); + } +}); diff --git a/src/main/webapp/views/report/locDetl.html b/src/main/webapp/views/report/locDetl.html new file mode 100644 index 0000000..9e3ee3d --- /dev/null +++ b/src/main/webapp/views/report/locDetl.html @@ -0,0 +1,93 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title></title> + <meta name="renderer" content="webkit"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> + <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> + <link rel="stylesheet" href="../../static/css/cool.css" media="all"> + <link rel="stylesheet" href="../../static/css/common.css" media="all"> + <style> + .layui-table-body.layui-table-main{ + overflow: auto; !important; + } + </style> +</head> +<body> +<div class="layui-inline" style="width:31%;margin-top: 20px"> + <label class="layui-form-label">搴� 浣� 鍙凤細</label> + <div class="layui-input-inline"> + <input id="locNo" class="layui-input" type="text" disabled="disabled"> + </div> +</div> +<table class="layui-hide" id="locDetlByMap" lay-filter="locDetlByMap"></table> +</body> +<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> +<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/locMast/locMast.js" charset="utf-8"></script> +<script type="text/javascript"> + var pageCur; + function getCol() { + var cols = [ + {field: 'locNo$', align: 'center',title: '搴撲綅鍙�'} + ]; + cols.push.apply(cols, detlCols); + return cols; + } + layui.use(['table','laydate', 'form'], function() { + table = layui.table; + var $ = layui.jquery; + var form = layui.form; + + $('#locNo').val(parent.locNo); + + // 鏁版嵁娓叉煋 + tableIns = table.render({ + elem: '#locDetlByMap', + headers: {token: localStorage.getItem('token')}, + url: baseUrl+'/locDetl/list/auth', + page: true, + limit: 20, + skin: 'line', + where: {loc_no: parent.locNo}, + even: true, + cellMinWidth: 50, + cols: [getCol()], + request: { + pageName: 'curr', + pageSize: 'limit' + }, + parseData: function (res) { + return { + 'code': res.code, + 'msg': res.msg, + 'count': res.data.total, + 'data': res.data.records + } + }, + response: { + statusCode: 200 + }, + done: function(res, curr, count) { + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + pageCur=curr; + form.on('checkbox(tableCheckbox)', function (data) { + var _index = $(data.elem).attr('table-index')||0; + if(data.elem.checked){ + res.data[_index][data.value] = 'Y'; + }else{ + res.data[_index][data.value] = 'N'; + } + }); + } + }); + }); +</script> +</html> + diff --git a/src/main/webapp/views/report/viewInOut.html b/src/main/webapp/views/report/viewInOut.html new file mode 100644 index 0000000..440e00d --- /dev/null +++ b/src/main/webapp/views/report/viewInOut.html @@ -0,0 +1,54 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title></title> + <meta name="renderer" content="webkit"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> + <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> + <link rel="stylesheet" href="../../static/css/cool.css" media="all"> + <link rel="stylesheet" href="../../static/css/common.css" media="all"> + <style> + #btn-export { + margin-top: 10px; + } + </style> +</head> +<body> + +<!-- 鎼滅储鏍� --> +<div id="search-box" class="layui-form layui-card-header"> + <!--<div class="layui-inline">--> + <!--<label class="layui-form-label">搴� 浣� 鍙凤細</label>--> + <!--<div class="layui-input-inline">--> + <!--<input class="layui-input" type="text" name="id" placeholder="璇疯緭鍏�" autocomplete="off">--> + <!--</div>--> + <!--</div>--> + + <!-- 寰呮坊鍔� --> +<!-- <div id="data-search-btn" class="layui-btn-container layui-form-item">--> +<!-- <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">鎼滅储</button>--> +<!-- <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">閲嶇疆</button>--> +<!-- </div>--> +</div> + +<!-- 琛ㄦ牸 --> +<table class="layui-hide" id="inOut" lay-filter="inOut"></table> +<script type="text/html" id="toolbar"> + <div class="layui-btn-container"> + <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" >瀵煎嚭</button> + </div> +</script> + +<script type="text/html" id="operate"> +</script> + +<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> +<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/report/inOut.js" charset="utf-8"></script> +</body> +</html> + diff --git a/src/main/webapp/views/report/viewLocMap.html b/src/main/webapp/views/report/viewLocMap.html new file mode 100644 index 0000000..b2a54a0 --- /dev/null +++ b/src/main/webapp/views/report/viewLocMap.html @@ -0,0 +1,111 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title></title> + <meta name="renderer" content="webkit"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> + <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> + <link rel="stylesheet" href="../../static/css/cool.css" media="all"> + <link rel="stylesheet" href="../../static/css/common.css" media="all"> + <style> + #locMapContain { + overflow-x: auto; + width:100%; + height:700px + } + .a-loc { + cursor: pointer; + font-size: 18px; + font-weight: bold; + text-align: center; + } + .layui-table, .layui-table-view { + margin: 0; + } + #locMapContain::-webkit-scrollbar { + width : 10px; + height: 25px; + } + #locMapContain::-webkit-scrollbar-thumb { + border-radius : 10px; + background-color: #159684; + background-image: -webkit-linear-gradient( + 45deg, + rgba(255, 255, 255, 0.2) 25%, + transparent 25%, + transparent 50%, + rgba(255, 255, 255, 0.2) 50%, + rgba(255, 255, 255, 0.2) 75%, + transparent 75%, + transparent + ); + } + #locMapContain::-webkit-scrollbar-track { + box-shadow : inset 0 0 5px rgba(0, 0, 0, 0.2); + background : #ededed; + border-radius: 10px; + } + .layui-table td:hover { + opacity: 0.5; + } +</style> +</head> +<body> +<!-- 鎼滅储鏍� --> +<div id="search-box" class="layui-form layui-card-header"> + <div class="layui-inline" style="margin-left: 10px"> + <div class="layui-input-inline"> + <select id="rowSelect" name="row" lay-filter="row"> +<!-- <option value="1">绗�1鎺�</option>--> +<!-- <option value="2">绗�2鎺�</option>--> +<!-- <option value="3">绗�3鎺�</option>--> +<!-- <option value="4">绗�4鎺�</option>--> +<!-- <option value="5">绗�5鎺�</option>--> +<!-- <option value="6">绗�6鎺�</option>--> +<!-- <option value="7">绗�7鎺�</option>--> +<!-- <option value="8">绗�8鎺�</option>--> + </select> + </div> + </div> +</div> +<div id="locMapContain"> + <table class="layui-table" id="locMap" lay-filter="locMap"></table> +</div> +<!-- 琛ㄦ牸 --> + +<iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe> + +<script type="text/template" id="locMapTemplate"> + <thead> + <tr> + {{#each title}} + <th lay-data="{field:'{{this}}', width:100}">{{this}}</th> + {{/each}} + </tr> + </thead> + <tbody> + {{#each body}} + <tr> + {{#each loc}} + <td class="a-loc" title="{{locNo}}" onclick="locDetl(this)" style="background-color:{{bgc}};color:{{color}}">{{locSts}}</td> + {{/each}} + </tr> + {{/each}} + </tbody> +</script> +<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> +<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> +<script type="text/javascript" src="../../static/js/report/locMap.js" charset="utf-8"></script> +</body> +<script type="text/template" id="locMastRowTemplate"> + {{#each data}} + <option value="{{this}}">{{this}}</option> + {{/each}} +</script> +</html> + diff --git a/src/main/webapp/views/report/viewStayTime.html b/src/main/webapp/views/report/viewStayTime.html new file mode 100644 index 0000000..6269cce --- /dev/null +++ b/src/main/webapp/views/report/viewStayTime.html @@ -0,0 +1,52 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title></title> + <meta name="renderer" content="webkit"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> + <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> + <link rel="stylesheet" href="../../static/css/cool.css" media="all"> + <link rel="stylesheet" href="../../static/css/common.css" media="all"> + <style> + #btn-export { + margin-top: 10px; + } + </style> +</head> +<body> + +<!-- 鎼滅储鏍� --> +<div id="search-box" class="layui-form layui-card-header"> + <div class="layui-inline"> + <div class="layui-input-inline"> + <input class="layui-input" type="text" name="loc_no" placeholder="搴撲綅鍙�" autocomplete="off"> + </div> + </div> + + <!-- 寰呮坊鍔� --> + <div id="data-search-btn" class="layui-btn-container layui-form-item" style="display: inline-block"> + <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">鎼滅储</button> + </div> +</div> + +<!-- 琛ㄦ牸 --> +<table class="layui-hide" id="stayTime" lay-filter="stayTime"></table> +<script type="text/html" id="toolbar"> + <div class="layui-btn-container"> + <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" >瀵煎嚭</button> + </div> +</script> + +<script type="text/html" id="operate"> +</script> + +<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> +<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/report/stayTime.js" charset="utf-8"></script> +</body> +</html> + diff --git a/src/main/webapp/views/report/viewStockUse.html b/src/main/webapp/views/report/viewStockUse.html new file mode 100644 index 0000000..34825c2 --- /dev/null +++ b/src/main/webapp/views/report/viewStockUse.html @@ -0,0 +1,42 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title></title> + <meta name="renderer" content="webkit"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> + <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> + <link rel="stylesheet" href="../../static/css/cool.css" media="all"> + <link rel="stylesheet" href="../../static/css/common.css" media="all"> + <style> + #btn-export { + margin-top: 10px; + } + </style> +</head> +<body> + +<!-- 鎼滅储鏍� --> +<div id="search-box" class="layui-form layui-card-header"> +</div> + +<!-- 琛ㄦ牸 --> +<table class="layui-hide" id="reportStockUse" lay-filter="reportStockUse"></table> +<script type="text/html" id="toolbar"> + <div class="layui-btn-container"> + <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" >瀵煎嚭</button> + </div> +</script> + +<script type="text/html" id="operate"> +</script> + +<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> +<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/report/reportStockUse.js" charset="utf-8"></script> +</body> +</html> + diff --git a/src/main/webapp/views/report/viewWorkCountIn.html b/src/main/webapp/views/report/viewWorkCountIn.html new file mode 100644 index 0000000..0b183b8 --- /dev/null +++ b/src/main/webapp/views/report/viewWorkCountIn.html @@ -0,0 +1,63 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title></title> + <meta name="renderer" content="webkit"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> + <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> + <link rel="stylesheet" href="../../static/css/cool.css" media="all"> + <link rel="stylesheet" href="../../static/css/common.css" media="all"> + <style> + #btn-export { + margin-top: 10px; + } + </style> +</head> +<body> + +<div id="search-box" class="layui-form layui-card-header"> + <div class="layui-inline"> + <div class="layui-input-inline"> + <input class="layui-input" type="text" name="matnr" placeholder="鍟嗗搧缂栧彿" autocomplete="off"> + </div> + </div> + <div class="layui-inline" style="width: 300px"> + <div class="layui-input-inline"> + <input class="layui-input layui-laydate-range" name="query_date" type="text" placeholder="鍏ュ簱璧峰鏃堕棿 - 鍏ュ簱缁堟鏃堕棿" autocomplete="off" style="width: 300px"> + </div> + </div> + <div id="data-search-btn" class="layui-btn-container layui-form-item"> + <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">鎼滅储</button> + <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">閲嶇疆</button> + </div> + <div class="layui-inline"> + <fieldset class="layui-elem-field"> + <legend>鎬昏鏁伴噺</legend> + <div class="layui-field-box" id="countNum"> + 璇风◢绛� + </div> + </fieldset> + </div> +</div> + +<!-- 琛ㄦ牸 --> +<table class="layui-hide" id="workIn" lay-filter="workIn"></table> +<script type="text/html" id="toolbar"> + <div class="layui-btn-container"> +<!-- <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" >瀵煎嚭</button>--> + </div> +</script> + +<script type="text/html" id="operate"> +</script> + +<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> +<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/report/workCountIn.js" charset="utf-8"></script> +</body> +</html> + diff --git a/src/main/webapp/views/report/viewWorkCountOut.html b/src/main/webapp/views/report/viewWorkCountOut.html new file mode 100644 index 0000000..d42c553 --- /dev/null +++ b/src/main/webapp/views/report/viewWorkCountOut.html @@ -0,0 +1,64 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title></title> + <meta name="renderer" content="webkit"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> + <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> + <link rel="stylesheet" href="../../static/css/cool.css" media="all"> + <link rel="stylesheet" href="../../static/css/common.css" media="all"> + <style> + #btn-export { + margin-top: 10px; + } + </style> +</head> +<body> + +<!-- 鎼滅储鏍� --> +<div id="search-box" class="layui-form layui-card-header"> + <div class="layui-inline"> + <div class="layui-input-inline"> + <input class="layui-input" type="text" name="matnr" placeholder="鍟嗗搧缂栧彿" autocomplete="off"> + </div> + </div> + <div class="layui-inline" style="width: 300px"> + <div class="layui-input-inline"> + <input class="layui-input layui-laydate-range" name="query_date" type="text" placeholder="璧峰鏃堕棿 - 缁堟鏃堕棿" autocomplete="off" style="width: 300px"> + </div> + </div> + <div id="data-search-btn" class="layui-btn-container layui-form-item"> + <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">鎼滅储</button> + <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">閲嶇疆</button> + </div> + <div class="layui-inline"> + <fieldset class="layui-elem-field"> + <legend>鎬昏鏁伴噺</legend> + <div class="layui-field-box" id="countNum"> + 璇风◢绛� + </div> + </fieldset> + </div> +</div> + +<!-- 琛ㄦ牸 --> +<table class="layui-hide" id="workOut" lay-filter="workOut"></table> +<script type="text/html" id="toolbar"> + <div class="layui-btn-container"> +<!-- <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" >瀵煎嚭</button>--> + </div> +</script> + +<script type="text/html" id="operate"> +</script> + +<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> +<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/report/workCountOut.js" charset="utf-8"></script> +</body> +</html> + diff --git a/src/main/webapp/views/report/viewWorkIn.html b/src/main/webapp/views/report/viewWorkIn.html new file mode 100644 index 0000000..dca05aa --- /dev/null +++ b/src/main/webapp/views/report/viewWorkIn.html @@ -0,0 +1,61 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title></title> + <meta name="renderer" content="webkit"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> + <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> + <link rel="stylesheet" href="../../static/css/cool.css" media="all"> + <link rel="stylesheet" href="../../static/css/common.css" media="all"> + <style> + #btn-export { + margin-top: 10px; + } + </style> +</head> +<body> + +<!-- 鎼滅储鏍� --> +<div id="search-box" class="layui-form layui-card-header"> + <div class="layui-inline"> + <div class="layui-input-inline"> + <input class="layui-input" type="text" name="loc_no" placeholder="搴撲綅鍙�" autocomplete="off"> + </div> + </div> + <div class="layui-inline"> + <div class="layui-input-inline"> + <input class="layui-input" type="text" name="matnr" placeholder="鍟嗗搧缂栧彿" autocomplete="off"> + </div> + </div> + <div class="layui-inline" style="width: 300px"> + <div class="layui-input-inline"> + <input class="layui-input layui-laydate-range" name="query_date" type="text" placeholder="鍏ュ簱璧峰鏃堕棿 - 鍏ュ簱缁堟鏃堕棿" autocomplete="off" style="width: 300px"> + </div> + </div> + <div id="data-search-btn" class="layui-btn-container layui-form-item"> + <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">鎼滅储</button> + <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">閲嶇疆</button> + </div> +</div> + +<!-- 琛ㄦ牸 --> +<table class="layui-hide" id="workIn" lay-filter="workIn"></table> +<script type="text/html" id="toolbar"> + <div class="layui-btn-container"> + <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" >瀵煎嚭</button> + </div> +</script> + +<script type="text/html" id="operate"> +</script> + +<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> +<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/report/workIn.js" charset="utf-8"></script> +</body> +</html> + diff --git a/src/main/webapp/views/report/viewWorkOut.html b/src/main/webapp/views/report/viewWorkOut.html new file mode 100644 index 0000000..bde3a5e --- /dev/null +++ b/src/main/webapp/views/report/viewWorkOut.html @@ -0,0 +1,61 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title></title> + <meta name="renderer" content="webkit"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> + <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> + <link rel="stylesheet" href="../../static/css/cool.css" media="all"> + <link rel="stylesheet" href="../../static/css/common.css" media="all"> + <style> + #btn-export { + margin-top: 10px; + } + </style> +</head> +<body> + +<!-- 鎼滅储鏍� --> +<div id="search-box" class="layui-form layui-card-header"> + <div class="layui-inline"> + <div class="layui-input-inline"> + <input class="layui-input" type="text" name="loc_no" placeholder="搴撲綅鍙�" autocomplete="off"> + </div> + </div> + <div class="layui-inline"> + <div class="layui-input-inline"> + <input class="layui-input" type="text" name="matnr" placeholder="鍟嗗搧缂栧彿" autocomplete="off"> + </div> + </div> + <div class="layui-inline" style="width: 300px"> + <div class="layui-input-inline"> + <input class="layui-input layui-laydate-range" name="query_date" type="text" placeholder="璧峰鏃堕棿 - 缁堟鏃堕棿" autocomplete="off" style="width: 300px"> + </div> + </div> + <div id="data-search-btn" class="layui-btn-container layui-form-item"> + <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">鎼滅储</button> + <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">閲嶇疆</button> + </div> +</div> + +<!-- 琛ㄦ牸 --> +<table class="layui-hide" id="workOut" lay-filter="workOut"></table> +<script type="text/html" id="toolbar"> + <div class="layui-btn-container"> + <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" >瀵煎嚭</button> + </div> +</script> + +<script type="text/html" id="operate"> +</script> + +<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> +<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/report/workOut.js" charset="utf-8"></script> +</body> +</html> + -- Gitblit v1.9.1