New file |
| | |
| | | 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); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | 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)); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
| | | } |
New file |
| | |
| | | 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); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ViewWorkCountInView { |
| | | private String oneday; |
| | | private String matnr; |
| | | private String maktx; |
| | | private String anfme; |
| | | } |
New file |
| | |
| | | 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]; |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | 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; |
| | | |
| | |
| | | @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" + |
| | |
| | | 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; |
| | |
| | | |
| | | 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; |
| | |
| | | } |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | @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(); |
| | | } |
| | | |
New file |
| | |
| | | <?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不支持sql语句嵌套时,采用sql片段包含方式,解决xml标签问题 --> |
| | | <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> |
New file |
| | |
| | | <?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不支持sql语句嵌套时,采用sql片段包含方式,解决xml标签问题 --> |
| | | <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> |
New file |
| | |
| | | <?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不支持sql语句嵌套时,采用sql片段包含方式,解决xml标签问题 --> |
| | | <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> |
New file |
| | |
| | | <?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不支持sql语句嵌套时,采用sql片段包含方式,解决xml标签问题 --> |
| | | <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> |
| | |
| | | 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: '代码', 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: '重量(kg)'} |
| | | // ,{field: 'zpallet', align: 'center',title: '托盘条码'} |
| | | |
| | | ,{field: 'specs', align: 'center',title: '配置'} |
| | | ,{field: 'model', align: 'center',title: '代码', 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} |
| | | ] |
New file |
| | |
| | | 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("口令错误"); |
| | | } |
| | | 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(); |
| | | } |
| | | }); |
New file |
| | |
| | | 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(); |
| | | } |
| | | }); |
New file |
| | |
| | | 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; |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | 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(); |
| | | } |
| | | }); |
New file |
| | |
| | | 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(); |
| | | } |
| | | }); |
New file |
| | |
| | | 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(); |
| | | } |
| | | }); |
New file |
| | |
| | | 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(); |
| | | } |
| | | }); |
New file |
| | |
| | | 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(); |
| | | } |
| | | }); |
New file |
| | |
| | | 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(); |
| | | } |
| | | }); |
New file |
| | |
| | | <!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> |
| | | |
New file |
| | |
| | | <!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> |
| | | |
New file |
| | |
| | | <!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> |
| | | |
New file |
| | |
| | | <!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> |
| | | |
New file |
| | |
| | | <!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> |
| | | |
New file |
| | |
| | | <!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> |
| | | |
New file |
| | |
| | | <!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> |
| | | |
New file |
| | |
| | | <!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> |
| | | |
New file |
| | |
| | | <!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> |
| | | |