1. 托盘管理
2. 入库通知档导入功能
3. 工作档明细 新增来源单据类型及单据编号
4. 库存明细统计表 增加一栏ERP数量(需跟ERP确认接口实现方式)。
5. 存货档案、单据管理、库存管理可以支持模糊搜索(各个单据界面)。
| New file |
| | |
| | | package com.zy.asrs.common.domain.entity; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.zy.asrs.common.wms.entity.Mat; |
| | | import com.zy.asrs.common.wms.entity.WaitPakin; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 0.A 1.B 2.C 3.D 4.E 5.F 6.G 7.H 8.I |
| | | * 9.J 10.K 11.L 12.M 13.N 14.O 15.P 16.Q 17.R 18.S |
| | | * 19.T 20.U 21.V 22.W 23.X 24.Y 25.Z |
| | | */ |
| | | @Data |
| | | @ExcelIgnoreUnannotated |
| | | public class WaitPakinExcel extends WaitPakin { |
| | | |
| | | @ExcelProperty(index = 0, value = "托盘条码") |
| | | private String zpallet; |
| | | |
| | | @ExcelProperty(index = 1, value = "数量") |
| | | private Double anfme; |
| | | |
| | | @ExcelProperty(index = 2, value = "商品编号") |
| | | private String matnr; |
| | | |
| | | @ExcelProperty(index = 3, value = "商品名称") |
| | | private String maktx; |
| | | |
| | | @ExcelProperty(index = 4, value = "批号") |
| | | private String batch; |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.common.utils; |
| | | |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.zy.asrs.common.domain.entity.MatExcel; |
| | | import com.zy.asrs.common.domain.entity.WaitPakinExcel; |
| | | import com.zy.asrs.common.wms.entity.Mat; |
| | | import com.zy.asrs.common.wms.entity.Tag; |
| | | import com.zy.asrs.common.wms.entity.WaitPakin; |
| | | import com.zy.asrs.common.wms.mapper.TagMapper; |
| | | import com.zy.asrs.common.wms.service.MatService; |
| | | import com.zy.asrs.common.wms.service.TagService; |
| | | import com.zy.asrs.common.wms.service.WaitPakinService; |
| | | import com.zy.asrs.framework.common.Cools; |
| | | import com.zy.asrs.framework.common.SpringUtils; |
| | | import com.zy.asrs.framework.exception.CoolException; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Created by vincent on 2019-11-25 |
| | | */ |
| | | @Slf4j |
| | | public class WaitPakingExcelListener extends AnalysisEventListener<WaitPakinExcel> { |
| | | |
| | | private int total = 0; |
| | | private Long userId; |
| | | private Long hostId; |
| | | |
| | | public WaitPakingExcelListener() { |
| | | } |
| | | |
| | | public WaitPakingExcelListener(Long userId, Long hostId) { |
| | | this.userId = userId; |
| | | this.hostId = hostId; |
| | | } |
| | | |
| | | /** |
| | | * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 |
| | | */ |
| | | private static final int BATCH_COUNT = 50; |
| | | |
| | | private final List<MatExcel> list = new ArrayList<>(); |
| | | |
| | | /** |
| | | * 这里会一行行的返回头 |
| | | */ |
| | | @Override |
| | | public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) { |
| | | } |
| | | |
| | | /** |
| | | * 这个每一条数据解析都会来调用 |
| | | */ |
| | | @Override |
| | | public void invoke(WaitPakinExcel excel, AnalysisContext ctx) { |
| | | if(Cools.isEmpty(excel.getMatnr()) || Cools.isEmpty(excel.getAnfme()) || Cools.isEmpty(excel.getZpallet())){ |
| | | throw new CoolException("缺少物料编码、数量、仓库、托盘码参数,无法组托"); |
| | | } |
| | | |
| | | MatService matService = SpringUtils.getBean(MatService.class); |
| | | WaitPakinService waitPakinService = SpringUtils.getBean(WaitPakinService.class); |
| | | |
| | | LambdaQueryWrapper<WaitPakin> wrapper = new LambdaQueryWrapper<WaitPakin>() |
| | | .eq(WaitPakin::getMatnr, excel.getMatnr()) |
| | | .eq(WaitPakin::getHostId, hostId) |
| | | .eq(WaitPakin::getZpallet, excel.getZpallet()); |
| | | |
| | | if(Cools.isEmpty(excel.getBatch())){ |
| | | wrapper.isNull(WaitPakin::getBatch); |
| | | }else { |
| | | wrapper.eq(WaitPakin::getBatch, excel.getBatch()); |
| | | } |
| | | |
| | | WaitPakin waitPakinOld = waitPakinService.getOne(wrapper); |
| | | |
| | | if(Cools.isEmpty(waitPakinOld)){ |
| | | Mat mat = matService.getOne(new LambdaQueryWrapper<Mat>().eq(Mat::getMatnr, excel.getMatnr()).eq(Mat::getHostId, hostId)); |
| | | WaitPakin waitPakin = new WaitPakin(); |
| | | BeanUtils.copyProperties(mat,waitPakin); |
| | | waitPakin.setAnfme(excel.getAnfme()); |
| | | waitPakin.setBatch(excel.getBatch()); |
| | | waitPakin.setZpallet(excel.getZpallet()); |
| | | waitPakin.setHostId(excel.getHostId()); |
| | | waitPakin.setAppeTime(new Date()); |
| | | waitPakin.setAppeUser(userId); |
| | | waitPakin.setModiTime(new Date()); |
| | | waitPakin.setAppeUser(userId); |
| | | waitPakin.setHostId(hostId); |
| | | |
| | | waitPakinService.save(waitPakin); |
| | | total ++; |
| | | |
| | | }else { |
| | | waitPakinOld.setAnfme(waitPakinOld.getAnfme() + excel.getAnfme()); |
| | | waitPakinOld.setModiTime(new Date()); |
| | | waitPakinOld.setModiUser(userId); |
| | | |
| | | waitPakinService.updateById(waitPakinOld); |
| | | total ++; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 所有数据解析完成了调用 |
| | | * 适合事务 |
| | | */ |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext ctx) { |
| | | log.info("新增{}条物料信息!", total); |
| | | } |
| | | |
| | | public int getTotal() { |
| | | return total; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.common.wms.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.zy.asrs.common.wms.entity.BasZpallet; |
| | | import com.zy.asrs.common.wms.entity.LocMast; |
| | | import com.zy.asrs.common.wms.service.BasZpalletService; |
| | | import com.zy.asrs.framework.annotations.ManagerAuth; |
| | | import com.zy.asrs.framework.common.Cools; |
| | | import com.zy.asrs.framework.common.R; |
| | | import com.zy.asrs.framework.domain.KeyValueVo; |
| | | import com.zy.asrs.framework.common.DateUtils; |
| | | import com.zy.asrs.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class BasZpalletController extends BaseController { |
| | | |
| | | @Value("${wcs.url}") |
| | | private String WCS_URL; |
| | | |
| | | @Autowired |
| | | private BasZpalletService basZpalletService; |
| | | |
| | | @RequestMapping(value = "/basZpallet/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basZpalletService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basZpallet/page/auth") |
| | | @ManagerAuth |
| | | public R page(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String condition, |
| | | @RequestParam(required = false) String timeRange, |
| | | @RequestParam Map<String, Object> param) { |
| | | LambdaQueryWrapper<BasZpallet> wrapper = new LambdaQueryWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(BasZpallet::getId, condition); |
| | | } |
| | | if (!Cools.isEmpty(timeRange)) { |
| | | String[] range = timeRange.split(RANGE_TIME_LINK); |
| | | wrapper.ge(BasZpallet::getCreateTime, DateUtils.convert(range[0])); |
| | | wrapper.le(BasZpallet::getCreateTime, DateUtils.convert(range[1])); |
| | | } |
| | | return R.ok(basZpalletService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/basZpallet/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasZpallet basZpallet) { |
| | | basZpalletService.save(basZpallet); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basZpallet/update/auth") |
| | | @ManagerAuth |
| | | public R update(BasZpallet basZpallet){ |
| | | if (Cools.isEmpty(basZpallet) || null==basZpallet.getId()){ |
| | | return R.error(); |
| | | } |
| | | basZpalletService.updateById(basZpallet); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basZpallet/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | basZpalletService.removeById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basZpalletQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | LambdaQueryWrapper<BasZpallet> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.like(BasZpallet::getId, condition); |
| | | Page<BasZpallet> page = basZpalletService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasZpallet basZpallet : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", basZpallet.getId()); |
| | | map.put("value", basZpallet.getId()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping("/basZpallet/all/get/kv") |
| | | @ManagerAuth |
| | | public R getDataKV(@RequestParam(required = false) String condition) { |
| | | List<KeyValueVo> vos = new ArrayList<>(); |
| | | LambdaQueryWrapper<BasZpallet> wrapper = new LambdaQueryWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(BasZpallet::getId, condition); |
| | | } |
| | | basZpalletService.page(new Page<>(1, 30), wrapper).getRecords().forEach(item -> vos.add(new KeyValueVo(String.valueOf(item.getId()), item.getId()))); |
| | | return R.ok().add(vos); |
| | | } |
| | | |
| | | @GetMapping("/zpallet/picUrl") |
| | | @ManagerAuth |
| | | public R getPicUrl(@RequestParam String zpallet) { |
| | | BasZpallet basZpallet = basZpalletService.getOne(new LambdaQueryWrapper<BasZpallet>() |
| | | .eq(BasZpallet::getZpallet, zpallet) |
| | | .eq(BasZpallet::getHostId, getHostId())); |
| | | if (basZpallet == null) { |
| | | return R.error(); |
| | | } |
| | | |
| | | ArrayList<String> list = new ArrayList<>(); |
| | | String picStr = basZpallet.getPicture(); |
| | | if (Cools.isEmpty(picStr)) { |
| | | return R.ok().add(list); |
| | | } |
| | | List<String> pics = JSON.parseArray(picStr, String.class); |
| | | for (String pic : pics) { |
| | | List<String> picsOneTime = JSON.parseArray(pic, String.class); |
| | | for (String picture : picsOneTime){ |
| | | list.add("http://" + WCS_URL + "/image/" + pic + "-1.jpg"); |
| | | list.add("http://" + WCS_URL + "/image/" + pic + "-2.jpg"); |
| | | } |
| | | } |
| | | return R.ok().add(list); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.common.wms.entity; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.zy.asrs.framework.common.Cools; |
| | | import com.zy.asrs.framework.common.SpringUtils; |
| | | import com.zy.asrs.common.sys.entity.User; |
| | | import com.zy.asrs.common.sys.entity.Host; |
| | | import com.zy.asrs.common.sys.service.UserService; |
| | | import com.zy.asrs.common.sys.service.HostService; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("wms_bas_zpallet") |
| | | public class BasZpallet implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableId(value = "id", type = IdType.INPUT) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | private String zpallet; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | private String picture; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date modifyTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | private Long hostId; |
| | | |
| | | public BasZpallet() {} |
| | | |
| | | public BasZpallet(Long id,String zpallet,String picture,Date createTime,Date modifyTime,Long hostId) { |
| | | this.id = id; |
| | | this.zpallet = zpallet; |
| | | this.picture = picture; |
| | | this.createTime = createTime; |
| | | this.modifyTime = modifyTime; |
| | | this.hostId = hostId; |
| | | } |
| | | |
| | | // BasZpallet basZpallet = new BasZpallet( |
| | | // null, // [非空] |
| | | // null, // |
| | | // null, // |
| | | // null, // |
| | | // null, // |
| | | // null // |
| | | // ); |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getModifyTime$(){ |
| | | if (Cools.isEmpty(this.modifyTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modifyTime); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import java.util.Date; |
| | | |
| | | import com.zy.asrs.common.utils.Synchro; |
| | | import com.zy.asrs.common.wms.service.OrderService; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | |
| | | return null; |
| | | } |
| | | |
| | | public String getOrderType(){ |
| | | if(Cools.isEmpty(orderNo)){ |
| | | return ""; |
| | | } |
| | | |
| | | OrderService orderService = SpringUtils.getBean(OrderService.class); |
| | | Order order = orderService.selectByNo(orderNo, hostId); |
| | | if(!Cools.isEmpty(order)){ |
| | | return order.getDocType$(); |
| | | } |
| | | |
| | | return ""; |
| | | } |
| | | |
| | | public void sync(Object source) { |
| | | Synchro.Copy(source, this); |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.common.wms.mapper; |
| | | |
| | | import com.zy.asrs.common.wms.entity.BasZpallet; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface BasZpalletMapper extends BaseMapper<BasZpallet> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.common.wms.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.asrs.common.wms.entity.BasZpallet; |
| | | |
| | | public interface BasZpalletService extends IService<BasZpallet> { |
| | | |
| | | } |
| | |
| | | LambdaQueryWrapper<LocMast> wrapper1 = new LambdaQueryWrapper<LocMast>() |
| | | .eq(LocMast::getLocSts, "O") |
| | | .eq(LocMast::getHostId, hostId) |
| | | .in(LocMast::getRow1, curRow) |
| | | .eq(LocMast::getLocType1, locTypeDto.getLocType1()) |
| | | .le(LocMast::getRow1, eRow) |
| | | .ge(LocMast::getRow1, sRow) |
| | | // .in(LocMast::getRow1, curRow) |
| | | .orderByAsc(LocMast::getLev1) |
| | | .orderByAsc(LocMast::getBay1); |
| | | |
| | |
| | | for (LocMast mast : locMasts) { |
| | | LocMast innerLoc = null; |
| | | for (String loc : Utils.getGroupLoc(mast.getLocNo(), hostId)) { |
| | | //1 2 |
| | | LocMast one = locMastService.getOne(new LambdaQueryWrapper<LocMast>().eq(LocMast::getLocNo, loc).eq(LocMast::getHostId, hostId)); |
| | | if (!one.getLocSts().equals("O")) { |
| | | innerLoc = null; |
| | | // innerLoc = null; |
| | | continue; |
| | | } |
| | | |
| | | if (innerLoc == null) { |
| | | List<Integer> innerDeepRow = locDirectionService.getInnerDeepRow(hostId); |
| | | if (innerDeepRow.contains(one.getRow1())) { |
| | | innerLoc = one; |
| | | } |
| | | } |
| | | innerLoc = one; |
| | | |
| | | // if (innerLoc == null) { |
| | | // List<Integer> innerDeepRow = locDirectionService.getInnerDeepRow(hostId); |
| | | //// if (innerDeepRow.contains(one.getRow1())) { |
| | | // innerLoc = one; |
| | | //// } |
| | | // } |
| | | } |
| | | |
| | | if(innerLoc == null) { |
| New file |
| | |
| | | package com.zy.asrs.common.wms.service.impl; |
| | | |
| | | import com.zy.asrs.common.wms.mapper.BasZpalletMapper; |
| | | import com.zy.asrs.common.wms.entity.BasZpallet; |
| | | import com.zy.asrs.common.wms.service.BasZpalletService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basZpalletService") |
| | | public class BasZpalletServiceImpl extends ServiceImpl<BasZpalletMapper, BasZpallet> implements BasZpalletService { |
| | | |
| | | } |
| 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.common.wms.mapper.BasZpalletMapper"> |
| | | |
| | | </mapper> |
| | |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param) throws UnsupportedEncodingException { |
| | | condition = condition.trim(); |
| | | if(!Cools.isEmpty(condition)){ |
| | | condition = condition.trim(); |
| | | } |
| | | QueryWrapper<Order> wrapper = new QueryWrapper<>(); |
| | | excludeTrash(param); |
| | | wrapper.eq("status", 1); |
| | |
| | | package com.zy.asrs.wms.controller; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.zy.asrs.common.domain.entity.MatExcel; |
| | | import com.zy.asrs.common.domain.entity.WaitPakinExcel; |
| | | import com.zy.asrs.common.utils.MatExcelListener; |
| | | import com.zy.asrs.common.utils.WaitPakingExcelListener; |
| | | import com.zy.asrs.common.wms.entity.Mat; |
| | | import com.zy.asrs.common.wms.entity.WaitPakin; |
| | | import com.zy.asrs.common.wms.entity.WrkMast; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | |
| | | return R.ok().add(vos); |
| | | } |
| | | |
| | | /*************************************** 数据相关 ***********************************************/ |
| | | |
| | | /** |
| | | * excel导入模板下载 |
| | | */ |
| | | @RequestMapping(value = "/waitPakin/excel/import/mould") |
| | | public void matExcelImportMould(HttpServletResponse response) throws IOException { |
| | | List<WaitPakinExcel> excels = new ArrayList<>(); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("utf-8"); |
| | | String fileName = URLEncoder.encode("入库通知档Excel导入模板", "UTF-8"); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | EasyExcel.write(response.getOutputStream(), WaitPakinExcel.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .sheet("sheet1") |
| | | .doWrite(excels); |
| | | } |
| | | |
| | | // // excel导入-------判断是否有重复物料 |
| | | // @PostMapping(value = "/mat/excel/import/check/auth") |
| | | // @ManagerAuth(memo = "商品档案数据导入") |
| | | // @Transactional |
| | | // public R matExcelImportCheck(MultipartFile file) throws IOException { |
| | | // MatExcelListener listener = new MatExcelListener(getUserId(), getHostId()); |
| | | // EasyExcel.read(file.getInputStream(), MatExcel.class, listener).sheet().doRead(); |
| | | // return R.ok("成功同步"+listener.getTotal()+"条商品数据"); |
| | | // } |
| | | |
| | | // excel导入 |
| | | @PostMapping(value = "/waitPakin/excel/import/auth") |
| | | @ManagerAuth(memo = "入库通知档档案数据导入") |
| | | @Transactional |
| | | public R matExcelImport(MultipartFile file) throws IOException { |
| | | WaitPakingExcelListener listener = new WaitPakingExcelListener(getUserId(), getHostId()); |
| | | EasyExcel.read(file.getInputStream(), WaitPakinExcel.class, listener).sheet().doRead(); |
| | | return R.ok("成功同步"+listener.getTotal()+"条商品数据"); |
| | | } |
| | | |
| | | } |
| | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | //异常上报失败 |
| | | exceptionHandle("上报ERP异常失败[workNo={0}]失败", wrkMast.getWrkNo()); |
| | | // exceptionHandle("上报ERP异常失败[workNo={0}]失败", wrkMast.getWrkNo()); |
| | | } finally { |
| | | //记录上报数据 |
| | | OperateLog operateLog = new OperateLog(); |
| | |
| | | package com.zy.asrs.wms.task.handler; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.zy.asrs.common.wms.entity.*; |
| | | import com.zy.asrs.common.wms.service.*; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | private WaitPakinService waitPakinService; |
| | | @Autowired |
| | | private OrderDetlService orderDetlService; |
| | | @Autowired |
| | | private BasZpalletService basZpalletService; |
| | | |
| | | public ReturnT<String> start(WrkMast wrkMast) { |
| | | // 99.入库完成 |
| | |
| | | // 修改工作主档状态 |
| | | wrkMast.setWrkSts(200L);//200.库存更新完成 |
| | | wrkMast.setModiTime(now); |
| | | savePicInZpallet(wrkMast.getBarcode(),wrkMast.getPic(),wrkMast.getHostId()); |
| | | if (!wrkMastService.updateById(wrkMast)) { |
| | | exceptionHandle("更新出库完成状态失败;[workNo={0}]", wrkMast.getWrkNo()); |
| | | } |
| | |
| | | return SUCCESS; |
| | | } |
| | | |
| | | /* |
| | | 保存图片到托盘管理页面 |
| | | */ |
| | | private void savePicInZpallet(String barcode, String pic, Long hostId){ |
| | | |
| | | if(Cools.isEmpty(pic)){ |
| | | return; |
| | | } |
| | | |
| | | BasZpallet basZpallet = basZpalletService.getOne(new LambdaQueryWrapper<BasZpallet>().eq(BasZpallet::getZpallet, barcode)); |
| | | List<String> list = null; |
| | | if(Cools.isEmpty(basZpallet)){ |
| | | basZpallet = new BasZpallet(); |
| | | basZpallet.setHostId(hostId); |
| | | basZpallet.setCreateTime(new Date()); |
| | | basZpallet.setModifyTime(new Date()); |
| | | |
| | | list = new ArrayList<>(); |
| | | list.add(pic); |
| | | basZpallet.setPicture(JSON.toJSONString(list)); |
| | | |
| | | basZpalletService.save(basZpallet); |
| | | |
| | | }else { |
| | | basZpallet.setHostId(hostId); |
| | | basZpallet.setModifyTime(new Date()); |
| | | |
| | | String picture = basZpallet.getPicture(); |
| | | list = JSON.parseArray(picture, String.class); |
| | | if(list.size() >= 5){ |
| | | list.remove(0); |
| | | } |
| | | list.add(pic); |
| | | |
| | | basZpallet.setPicture(JSON.toJSONString(list)); |
| | | |
| | | basZpalletService.updateById(basZpallet); |
| | | } |
| | | |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | String str = "['abc','bcd','cdg']"; |
| | | List<String> list = JSON.parseArray(str, String.class); |
| | | System.out.println(list); |
| | | list.remove(0); |
| | | System.out.println(list); |
| | | list.add("aaa"); |
| | | System.out.println(list); |
| | | } |
| | | |
| | | } |
| | |
| | | generator.url="127.0.0.1:1433;databasename=ncasrs"; |
| | | generator.username="sa"; |
| | | generator.password="sa@123"; |
| | | generator.table="sys_permission"; |
| | | generator.table="wms_bas_zpallet"; |
| | | generator.packagePath="com.zy.asrs.common.wms"; |
| | | generator.js = false; |
| | | generator.html = false; |
| | | generator.js = true; |
| | | generator.html = true; |
| | | generator.sql = false; |
| | | // generator.controller = false; |
| | | generator.build(); |
| | |
| | | enabled: false |
| | | datasource: |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | url: jdbc:sqlserver://127.0.0.1:1433;databasename=ncasrs |
| | | # url: jdbc:sqlserver://localhost:1433;databasename=jmasrs |
| | | # username: sa |
| | | # password: sa@123 |
| | | url: jdbc:sqlserver://192.168.4.61:1433;databasename=ncasrs |
| | | # url: jdbc:sqlserver://192.168.4.15:1433;databasename=ncasrs |
| | | username: sa |
| | | password: sa@123 |
| | | mvc: |
| New file |
| | |
| | | var pageCurr; |
| | | var pageCount = 0; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin', 'xmSelect'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | var xmSelect = layui.xmSelect; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#basZpallet', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/basZpallet/page/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'id', align: 'center',title: 'id', hide:true} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘码'} |
| | | ,{field: 'createTime$', align: 'center',title: '创建时间'} |
| | | ,{field: 'modifyTime$', align: 'center',title: '修改时间'} |
| | | // ,{field: 'hostId', align: 'center',title: ''} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:250} |
| | | ]], |
| | | 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;pageCount=count; |
| | | limit(); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(basZpallet)', 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} |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(basZpallet)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | showEditModel(); |
| | | break; |
| | | case 'deleteData': |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | del(checkStatus.map(function (d) { |
| | | return d.id; |
| | | })); |
| | | break; |
| | | case 'exportData': |
| | | admin.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 = { |
| | | 'basZpallet': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/basZpallet/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, {icon: 2}) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(basZpallet)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | | case "del": |
| | | del([data.id]); |
| | | break; |
| | | // 查看图片 |
| | | case 'showPic': |
| | | let imgHtml = '<div style="height:100%;display: flex;justify-content: space-around;align-items: center;flex-wrap: wrap;">'; |
| | | $.ajax({ |
| | | url: baseUrl+"/zpallet/picUrl", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | locNo: data.locNo |
| | | }, |
| | | method: 'GET', |
| | | traditional:true, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | res.data.forEach((item) => { |
| | | let tmp = '<img width="600" src="' + item + '" />'; |
| | | imgHtml += tmp; |
| | | }) |
| | | imgHtml += "</div>"; |
| | | |
| | | layer.open({ |
| | | type: 1, |
| | | title: '查看图片', |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: true, |
| | | content: imgHtml, |
| | | success: function(layero, index){ |
| | | } |
| | | }); |
| | | |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | /* 弹窗 - 新增、修改 */ |
| | | function showEditModel(mData) { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '600px', |
| | | title: (mData ? '修改' : '添加') + '', |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | form.val('detail', mData); |
| | | layDateRender(mData); |
| | | form.on('submit(editSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/basZpallet/"+(mData?'update':'add')+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.close(dIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | return false; |
| | | }); |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /* 删除 */ |
| | | function del(ids) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/basZpallet/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: ids}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | // 搜索 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(true); |
| | | }); |
| | | |
| | | // 重置 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(true); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | function layDateRender(data) { |
| | | setTimeout(function () { |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | layDate.render({ |
| | | elem: '#createTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['createTime$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#modifyTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['modifyTime$']:null |
| | | }); |
| | | |
| | | }, 100); |
| | | } |
| | | layDateRender(); |
| | | |
| | | |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(search) { |
| | | if (pageCount === 0 || search) { |
| | | let searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | | }); |
| | | } else { |
| | | $(".layui-laypage-btn")[0].click(); |
| | | } |
| | | } |
| | |
| | | ,{field: 'danger$', align: 'center',title: '危险品', hide: true} |
| | | ] |
| | | |
| | | var detlColsWrkDetl = [ |
| | | {field: 'matnr', align: 'center',title: '商品编号', sort:true} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称', sort:true} |
| | | ,{field: 'orderNo', align: 'center',title: '单据编号', hide: false} |
| | | ,{field: 'orderType', align: 'center',title: '单据类型', hide: false} |
| | | ,{field: 'batch', align: 'center',title: '序列码', width: 300, sort:true} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码'} |
| | | ,{field: 'owner', align: 'center',title: '货主'} |
| | | ,{field: 'fullPlt$', 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} |
| | | ] |
| | | |
| | | function getQueryVariable(variable) |
| | | { |
| | | var query = window.location.search.substring(1); |
| | |
| | | function getCol() { |
| | | var cols = [ |
| | | {field: 'anfme', align: 'center',title: '库存数量', style: 'font-weight: bold'} |
| | | ,{field: 'anfmeErp', align: 'center',title: 'Erp数量', style: 'font-weight: bold'} |
| | | ]; |
| | | arrRemove(detlCols, "field", "anfme") |
| | | arrRemove(detlCols, "field", "zpallet") |
| | |
| | | var pageCurr; |
| | | var admin; |
| | | function getCol() { |
| | | var cols = [ {type: 'checkbox'} ]; |
| | | cols.push.apply(cols, detlCols); |
| | |
| | | |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'tableMerge'], function(){ |
| | | }).extend({ |
| | | dropdown: 'dropdown/dropdown', |
| | | }).use(['table','laydate', 'form', 'tableMerge', 'dropdown', 'admin'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | admin = layui.admin; |
| | | var tableMerge = layui.tableMerge; |
| | | |
| | | // 数据渲染 |
| | |
| | | } |
| | | } |
| | | |
| | | // excel导入模板下载 |
| | | function excelMouldDownload(){ |
| | | layer.load(1, {shade: [0.1,'#fff']}); |
| | | location.href = baseUrl + "/waitPakin/excel/import/mould"; |
| | | layer.closeAll('loading'); |
| | | } |
| | | |
| | | // excel导入 |
| | | function importExcel() { |
| | | $("#importExcel").trigger("click"); |
| | | } |
| | | function upload(obj){ |
| | | if(!obj.files) { |
| | | return; |
| | | } |
| | | var file = obj.files[0]; |
| | | admin.confirm('确认同步 [' + file.name +'] 文件吗?', function (index) { |
| | | layer.load(1, {shade: [0.1,'#fff']}); |
| | | var url = baseUrl + "/waitPakin/excel/import/auth"; |
| | | var form = new FormData(); |
| | | form.append("file", file); |
| | | xhr = new XMLHttpRequest(); |
| | | xhr.open("post", url, true); //post方式,url为服务器请求地址,true 该参数规定请求是否异步处理。 |
| | | xhr.setRequestHeader('token', localStorage.getItem('token')); |
| | | xhr.onload = uploadComplete; //请求完成 |
| | | xhr.onerror = uploadFailed; //请求失败 |
| | | xhr.onloadend = function () { // // 上传完成重置文件流 |
| | | layer.closeAll('loading'); |
| | | $("#importExcel").val(""); |
| | | }; |
| | | // xhr.upload.onprogress = progressFunction;//【上传进度调用方法实现】 |
| | | xhr.upload.onloadstart = function(){//上传开始执行方法 |
| | | ot = new Date().getTime(); //设置上传开始时间 |
| | | oloaded = 0;//设置上传开始时,以上传的文件大小为0 |
| | | }; |
| | | xhr.send(form); |
| | | }, function(index){ |
| | | $("#importExcel").val(""); |
| | | }); |
| | | } |
| | | function uploadComplete(evt) { |
| | | var res = JSON.parse(evt.target.responseText); |
| | | if(res.code === 200) { |
| | | layer.msg(res.msg, {icon: 1}); |
| | | loadTree(""); |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | function uploadFailed(evt) { |
| | | var res = JSON.parse(evt.target.responseText); |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | |
| | | // excel导出 |
| | | function exportExcel() { |
| | | |
| | | } |
| | | |
| | | function clearFormVal(el) { |
| | | $(':input', el) |
| | | .val('') |
| | |
| | | {field: 'wrkNo', align: 'center',title: '工作号'} |
| | | ,{field: 'ioTime$', align: 'center',title: '工作时间', width: 160} |
| | | ]; |
| | | cols.push.apply(cols, detlCols); |
| | | cols.push.apply(cols, detlColsWrkDetl); |
| | | cols.push({field: 'modiUser$', align: 'center',title: '修改人员', hide:true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', hide:true}) |
| | | return cols; |
| 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/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <div class="layui-fluid"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-form toolbar" id="search-box"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="condition" 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="timeRange" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline">  |
| | | <button class="layui-btn icon-btn" lay-filter="search" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button class="layui-btn icon-btn" lay-filter="reset" lay-submit> |
| | | <i class="layui-icon"></i>重置 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" id="basZpallet" lay-filter="basZpallet"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <!-- <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button>--> |
| | | <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right">导出</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <!--<script type="text/html" id="operate">--> |
| | | <!-- <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a>--> |
| | | <!-- <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a>--> |
| | | <!--</script>--> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <!-- <a class="layui-btn layui-btn-xs loc-detl" lay-event="locDetl">查看明细</a>--> |
| | | <a class="layui-btn layui-btn-xs loc-detl" lay-event="showPic">查看图片</a> |
| | | </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/basZpallet/basZpallet.js" charset="utf-8"></script> |
| | | </body> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <div id="detail" lay-filter="detail" class="layui-form admin-form model-form"> |
| | | <input name="id" type="hidden"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="id" placeholder="请输入" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="zpallet" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="picture" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="createTime" id="createTime$" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="modifyTime" id="modifyTime$" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="hostId" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="editSubmit" lay-submit="">保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </div> |
| | | </script> |
| | | </html> |
| | | |
| | |
| | | <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button> |
| | | <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="">导出</button> |
| | | |
| | | <!-- 商品/物料 数据中心 --> |
| | | <div class="dropdown-menu" style="float: right"> |
| | | <button class="layui-btn layui-btn-primary layui-border-black icon-btn layui-btn-sm"> 数据同步 <i |
| | | class="layui-icon layui-icon-drop"></i></button> |
| | | <ul class="dropdown-menu-nav dark"> |
| | | <div class="dropdown-anchor"></div> |
| | | <li class="title">1st menu</li> |
| | | <li><a onclick="excelMouldDownload()" style="font-size: 12px"><i |
| | | class="layui-icon layui-icon-template-1"></i>模板下载</a></li> |
| | | <li><a onclick="importExcel()" style="font-size: 12px"><i class="layui-icon layui-icon-upload"></i>导入 |
| | | Excel</a></li> |
| | | <li style="display: none"><input id="importExcel" type="file" onchange="upload(this)"></li> |
| | | <hr> |
| | | <li class="title">2nd menu</li> |
| | | <li><a onclick="exportExcel()" style="font-size: 12px"><i class="layui-icon layui-icon-export"></i>导出 |
| | | Excel</a></li> |
| | | </ul> |
| | | </div> |
| | | </div> |
| | | </script> |
| | | |
| | |
| | | {field: 'wrkNo', align: 'center',title: '工作号'} |
| | | ,{field: 'ioTime$', align: 'center',title: '工作时间'} |
| | | ]; |
| | | cols.push.apply(cols, detlCols); |
| | | cols.push.apply(cols, detlColsWrkDetl); |
| | | return cols; |
| | | } |
| | | layui.use(['table','laydate', 'form'], function() { |