| 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 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 SafeStoExcel extends Mat { |
| | | |
| | | @ExcelProperty(index = 0, value = "商品编号") |
| | | private String matnr; |
| | | |
| | | @ExcelProperty(index = 1, value = "库位号") |
| | | private String locNo; |
| | | |
| | | @ExcelProperty(index = 2, value = "安全库存") |
| | | private Double safeQua; |
| | | |
| | | @ExcelProperty(index = 3, value = "备注") |
| | | private String memo; |
| | | |
| | | |
| | | } |
| 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.SafeStoExcel; |
| | | import com.zy.asrs.common.wms.entity.Mat; |
| | | import com.zy.asrs.common.wms.entity.Prior; |
| | | import com.zy.asrs.common.wms.service.MatService; |
| | | import com.zy.asrs.common.wms.service.PriorService; |
| | | import com.zy.asrs.framework.common.SnowflakeIdWorker; |
| | | import com.zy.asrs.framework.common.SpringUtils; |
| | | import com.zy.asrs.framework.exception.CoolException; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | 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 SafeStoExcelListener extends AnalysisEventListener<SafeStoExcel> { |
| | | |
| | | private int total = 0; |
| | | private Long userId; |
| | | private Long hostId; |
| | | |
| | | public SafeStoExcelListener() { |
| | | } |
| | | |
| | | public SafeStoExcelListener(Long userId, Long hostId) { |
| | | this.userId = userId; |
| | | this.hostId = hostId; |
| | | } |
| | | |
| | | /** |
| | | * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 |
| | | */ |
| | | private static final int BATCH_COUNT = 50; |
| | | |
| | | private final List<SafeStoExcel> list = new ArrayList<>(); |
| | | |
| | | /** |
| | | * 这里会一行行的返回头 |
| | | */ |
| | | @Override |
| | | public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) { |
| | | } |
| | | |
| | | /** |
| | | * 这个每一条数据解析都会来调用 |
| | | */ |
| | | @Override |
| | | public void invoke(SafeStoExcel excel, AnalysisContext ctx) { |
| | | MatService matService = SpringUtils.getBean(MatService.class); |
| | | PriorService priorService = SpringUtils.getBean(PriorService.class); |
| | | SnowflakeIdWorker snowflakeIdWorker = SpringUtils.getBean(SnowflakeIdWorker.class); |
| | | Mat mat = matService.getOne(new LambdaQueryWrapper<Mat>().eq(Mat::getMatnr, excel.getMatnr()).eq(Mat::getHostId, hostId)); |
| | | if (mat != null) { |
| | | Prior prior = new Prior(); |
| | | prior.setHostId(hostId); |
| | | prior.setUuid("SP" + snowflakeIdWorker.nextId()); |
| | | prior.setMatId(mat.getId()); |
| | | prior.setMatnr(mat.getMatnr()); |
| | | prior.setMaktx(mat.getMaktx()); |
| | | prior.setLocNo(excel.getLocNo()); |
| | | prior.setSafeQua(excel.getSafeQua()); |
| | | prior.setCreateBy(userId); |
| | | prior.setCreateTime(new Date()); |
| | | prior.setUpdateBy(userId); |
| | | prior.setUpdateTime(new Date()); |
| | | prior.setStatus(1); |
| | | prior.setMemo(excel.getMemo()); |
| | | if (!priorService.save(prior)) { |
| | | throw new CoolException("数据保存失败"); |
| | | } else { |
| | | total++; |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 所有数据解析完成了调用 |
| | | * 适合事务 |
| | | */ |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext ctx) { |
| | | log.info("新增{}条安全库存信息!", total); |
| | | } |
| | | |
| | | public int getTotal() { |
| | | return total; |
| | | } |
| | | } |
| | |
| | | package com.zy.asrs.common.web; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | @Autowired |
| | | private TagService tagService; |
| | | |
| | | protected Long getHostId(){ |
| | | protected Long getHostId() { |
| | | if (getUserId() == 9527) { |
| | | return null; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | protected Long getUserId(){ |
| | | protected Long getUserId() { |
| | | return Long.parseLong(String.valueOf(request.getAttribute("userId"))); |
| | | } |
| | | |
| | | protected User getUser(){ |
| | | protected User getUser() { |
| | | User user = userService.getById(getUserId()); |
| | | if (null == user) { |
| | | throw new CoolException(BaseRes.DENIED); |
| | |
| | | return user; |
| | | } |
| | | |
| | | protected String getComment(Class<?> cls, String fieldName){ |
| | | protected String getComment(Class<?> cls, String fieldName) { |
| | | Field[] fields = Cools.getAllFields(cls); |
| | | for (Field field : fields){ |
| | | if (fieldName.equals(field.getName())){ |
| | | for (Field field : fields) { |
| | | if (fieldName.equals(field.getName())) { |
| | | return field.getAnnotation(ApiModelProperty.class).value(); |
| | | } |
| | | } |
| | |
| | | |
| | | /** |
| | | * 分页组装 |
| | | * |
| | | * @param pageNumber |
| | | * @param pageSize |
| | | * @param map |
| | |
| | | * @param <T> |
| | | * @return |
| | | */ |
| | | protected <T> Page<T> toPage(Integer pageNumber, Integer pageSize, Map<String, Object> map, Class<T> cls){ |
| | | protected <T> Page<T> toPage(Integer pageNumber, Integer pageSize, Map<String, Object> map, Class<T> cls) { |
| | | // 分页索引和单页数量组装 |
| | | pageNumber = Optional.ofNullable(pageNumber).orElse(1); |
| | | pageSize = Optional.ofNullable(pageSize).orElse(10); |
| | |
| | | // 全字段模糊搜索 todo |
| | | if (!Cools.isEmpty(map.get("condition"))) { |
| | | Set<String> columns = new HashSet<>(); |
| | | for (Field field : Cools.getAllFields(cls)){ |
| | | if (Modifier.isFinal(field.getModifiers()) |
| | | || Modifier.isStatic(field.getModifiers()) |
| | | || Modifier.isTransient(field.getModifiers())){ |
| | | for (Field field : Cools.getAllFields(cls)) { |
| | | if (Modifier.isFinal(field.getModifiers()) || Modifier.isStatic(field.getModifiers()) || Modifier.isTransient(field.getModifiers())) { |
| | | continue; |
| | | } |
| | | String column = null; |
| | |
| | | columns.add(column); |
| | | } |
| | | } |
| | | columns.forEach(col->map.put(col, map.get("condition"))); |
| | | columns.forEach(col -> map.put(col, map.get("condition"))); |
| | | } |
| | | // page.setCondition(map); |
| | | return page; |
| | | } |
| | | |
| | | protected Tag getOriginTag(){ |
| | | protected Tag getOriginTag() { |
| | | return tagService.getTop(getHostId()); |
| | | } |
| | | |
| | | /** |
| | | * 全字段模糊搜索 |
| | | * @param cls 模型类 |
| | | * @param set 排除字段集合 |
| | | * |
| | | * @param cls 模型类 |
| | | * @param set 排除字段集合 |
| | | * @param condition 搜索内容 |
| | | */ |
| | | protected <T> void allLike(Class<T> cls, Set<String> set, QueryWrapper<T> wrapper, String condition){ |
| | | protected <T> void allLike(Class<T> cls, Set<String> set, QueryWrapper<T> wrapper, String condition) { |
| | | if (Cools.isEmpty(condition)) { |
| | | return; |
| | | } |
| | | final List<String> columns = new ArrayList<>(); |
| | | for (Field field :Cools.getAllFields(cls)){ |
| | | if (Modifier.isFinal(field.getModifiers()) |
| | | || Modifier.isStatic(field.getModifiers()) |
| | | || Modifier.isTransient(field.getModifiers())){ |
| | | 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(); |
| | | column = camelToUnderscore(field.getAnnotation(TableField.class).value()); |
| | | } |
| | | if (Cools.isEmpty(column)) { |
| | | column = field.getName(); |
| | | column = camelToUnderscore(field.getName()); |
| | | } |
| | | if (!set.contains(column)) { |
| | | columns.add(column); |
| | | } |
| | | //if (!set.contains(column)) { |
| | | columns.add(column); |
| | | //} |
| | | } |
| | | if (columns.isEmpty()) { |
| | | return; |
| | | } |
| | | |
| | | wrapper.and( w -> { |
| | | for (int i=0;i<columns.size();i++){ |
| | | wrapper.and(w -> { |
| | | for (int i = 0; i < columns.size(); i++) { |
| | | String colums = columns.get(i); |
| | | if (i==0){ |
| | | if (i == 0) { |
| | | w.like(colums, condition); |
| | | }else { |
| | | } else { |
| | | w.or().like(colums, condition); |
| | | } |
| | | } |
| | |
| | | // } |
| | | } |
| | | |
| | | private static String camelToUnderscore(String camelCase) { |
| | | return camelCase.replaceAll("([a-z])([A-Z])", "$1_$2").toLowerCase(); |
| | | } |
| | | |
| | | // /** |
| | | // * 全字段模糊搜索 |
| | | // * |
| | | // * @param cls 模型类 |
| | | // * @param set 排除字段集合 |
| | | // * @param condition 搜索内容 |
| | | // */ |
| | | // protected <T> void allLike(Class<T> cls, Set<String> set, LambdaQueryWrapper<T> wrapper, String condition) { |
| | | // if (Cools.isEmpty(condition)) { |
| | | // return; |
| | | // } |
| | | // final 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 = camelToUnderscore(field.getAnnotation(TableField.class).value()); |
| | | // } |
| | | // if (Cools.isEmpty(column)) { |
| | | // column = camelToUnderscore(field.getName()); |
| | | // } |
| | | // //if (!set.contains(column)) { |
| | | // columns.add(column); |
| | | // //} |
| | | // } |
| | | // if (columns.isEmpty()) { |
| | | // return; |
| | | // } |
| | | // |
| | | // SFunction<cls, String> columnFunc = Entity::columnName; |
| | | // wrapper.and(w -> { |
| | | // for (int i = 0; i < columns.size(); i++) { |
| | | // String colums = columns.get(i); |
| | | // if (i == 0) { |
| | | // w.like(colums, condition); |
| | | // } else { |
| | | // w.or().like(colums, condition); |
| | | // } |
| | | // } |
| | | // }); |
| | | // |
| | | // |
| | | // } |
| | | |
| | | |
| | | } |
| | |
| | | * 托盘条码 |
| | | */ |
| | | @ApiModelProperty(value= "托盘条码") |
| | | @TableField("zpallet") |
| | | private String zpallet; |
| | | |
| | | /** |
| | |
| | | private Long hostId; |
| | | |
| | | @ApiModelProperty(value= "货主") |
| | | @TableField("owner") |
| | | private String owner; |
| | | |
| | | public LocDetl() {} |
| | |
| | | private String locationStock; |
| | | |
| | | //材质 |
| | | @TableField("material") |
| | | private String material; |
| | | |
| | | //制令 |
| | | @TableField("decrees") |
| | | private String decrees; |
| | | |
| | | //图号 |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.zy.asrs.common.utils.Synchro; |
| | | 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; |
| | |
| | | select * from asr_sta_inout_view |
| | | where 1=1 |
| | | <include refid="viewInOutConditionSql"></include> |
| | | order by ymd desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | select * from asr_wrkin_view |
| | | where 1=1 |
| | | <include refid="viewWorkInConditionSql"></include> |
| | | order by io_time desc |
| | | </select> |
| | | |
| | | <!-- 不分页查询所有信息,用于excel导出 --> |
| | |
| | | select * from asr_wrkin_view |
| | | where 1=1 |
| | | <include refid="viewWorkInConditionMapSql"></include> |
| | | order by io_time desc |
| | | </select> |
| | | |
| | | <!-- 出库统计 --> |
| | |
| | | from asr_wrkout_view |
| | | where 1=1 |
| | | <include refid="viewWorkInConditionSql"></include> |
| | | order by io_time desc |
| | | </select> |
| | | |
| | | <!-- 不分页查询所有信息,用于excel导出 --> |
| | |
| | | if (!Cools.isEmpty(param.get("matnr"))) { |
| | | wrapper.like(AdjDetl::getMatnr, param.get("matnr")); |
| | | } |
| | | wrapper.orderByDesc(AdjDetl::getModiTime); |
| | | return R.ok(adjDetlService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | |
| | | @RequestParam(required = false) String timeRange, |
| | | @RequestParam Map<String, Object> param) { |
| | | QueryWrapper<LocDetl> wrapper = new QueryWrapper<>(); |
| | | Object barcode = null; |
| | | if (!Cools.isEmpty(param.get("barcode"))) { |
| | | barcode = param.get("barcode"); |
| | | } |
| | | param.remove("zpallet"); |
| | | param.remove("barcode"); |
| | | |
| | | if (!Cools.isEmpty(param.get("decrees"))) { |
| | | ArrayList<String> mats = new ArrayList<>(); |
| | |
| | | mats.add(mat.getMatnr()); |
| | | } |
| | | } |
| | | |
| | | wrapper.in("matnr", mats); |
| | | param.remove("decrees"); |
| | | } |
| | |
| | | wrapper.le("appe_time", DateUtils.convert(range[1])); |
| | | } |
| | | if (!Cools.isEmpty(param.get("locNo"))) { |
| | | wrapper.eq("loc_no", param.get("locNo")); |
| | | wrapper.like("loc_no", param.get("locNo")); |
| | | } |
| | | |
| | | if (!Cools.isEmpty(barcode)) { |
| | | wrapper.eq("zpallet", barcode); |
| | | if (!Cools.isEmpty(param.get("zpallet"))) { |
| | | wrapper.like("zpallet", param.get("zpallet")); |
| | | } |
| | | |
| | | if (!Cools.isEmpty(orderByField)){ |
| | | wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField)); |
| | | } |
| | | |
| | | |
| | | |
| | | param.remove("locNo"); |
| | | param.remove("owner"); |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.OrderItem; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.zy.asrs.common.domain.entity.Parameter; |
| | | import com.zy.asrs.common.domain.entity.Shelves; |
| | | import com.zy.asrs.common.domain.param.LocMastInitParam; |
| | | import com.zy.asrs.common.wms.entity.LocDetl; |
| | | import com.zy.asrs.common.wms.entity.LocMast; |
| | | import com.zy.asrs.common.wms.entity.Mat; |
| | | import com.zy.asrs.common.wms.service.LocDetlService; |
| | | import com.zy.asrs.common.wms.service.LocMastService; |
| | | import com.zy.asrs.framework.annotations.ManagerAuth; |
| | |
| | | treeUtils.getTagIdList(Long.parseLong(tagId.toString()), nodes); |
| | | wrapper.in("tag_id", nodes); |
| | | if (!Cools.isEmpty(param.get("matnr"))) { |
| | | wrapper.eq("matnr", param.get("matnr")); |
| | | wrapper.like("matnr", param.get("matnr")); |
| | | } |
| | | if (!Cools.isEmpty(param.get("maktx"))) { |
| | | wrapper.eq("maktx", param.get("maktx")); |
| | | wrapper.like("maktx", param.get("maktx")); |
| | | } |
| | | if (!Cools.isEmpty(param.get("decrees"))) { |
| | | wrapper.eq("decrees", param.get("decrees")); |
| | | wrapper.like("decrees", param.get("decrees")); |
| | | } |
| | | // if (!Cools.isEmpty(param.get("owner$"))) { |
| | | // wrapper.eq("owner", param.get("owner$")); |
| | |
| | | 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.extension.plugins.pagination.Page; |
| | | import com.zy.asrs.common.domain.dto.SafeStoDo; |
| | | import com.zy.asrs.common.domain.dto.SafeStoDto; |
| | | import com.zy.asrs.common.domain.entity.LocInPrintMatExcel; |
| | | import com.zy.asrs.common.domain.entity.MatExcel; |
| | | import com.zy.asrs.common.domain.entity.SafeStoExcel; |
| | | import com.zy.asrs.common.utils.MatExcelListener; |
| | | import com.zy.asrs.common.utils.SafeStoExcelListener; |
| | | import com.zy.asrs.common.wms.entity.Mat; |
| | | import com.zy.asrs.common.wms.entity.Prior; |
| | | import com.zy.asrs.common.wms.service.MatService; |
| | |
| | | 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(); |
| | | } |
| | | |
| | | |
| | | @PostMapping(value = "/safeSto/excel/import/auth") |
| | | @ManagerAuth(memo = "安全库存数据导入") |
| | | @Transactional |
| | | public R matExcelImport(MultipartFile file) throws IOException { |
| | | SafeStoExcelListener listener = new SafeStoExcelListener(getUserId(), getHostId()); |
| | | EasyExcel.read(file.getInputStream(), SafeStoExcel.class, listener).sheet().doRead(); |
| | | return R.ok("成功同步"+listener.getTotal()+"条安全库存数据"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * excel导入模板下载 |
| | | */ |
| | | @RequestMapping(value = "/safeSto/excel/import/mould") |
| | | public void matExcelImportMould(HttpServletResponse response) throws IOException { |
| | | List<SafeStoExcel> 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(), SafeStoExcel.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .sheet("sheet1") |
| | | .doWrite(excels); |
| | | } |
| | | } |
| | |
| | | @RequestParam Map<String, Object> param) { |
| | | QueryWrapper<WaitPakin> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("host_id", getHostId()); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like("id", condition); |
| | | } |
| | | convert(param,wrapper); |
| | | if (!Cools.isEmpty(timeRange)) { |
| | | String[] range = timeRange.split(RANGE_TIME_LINK); |
| | |
| | | @RequestParam Map<String, Object> param) { |
| | | LambdaQueryWrapper<WaitPakinLog> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(WaitPakinLog::getHostId, getHostId()); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(WaitPakinLog::getId, condition); |
| | | } |
| | | if (!Cools.isEmpty(timeRange)) { |
| | | String[] range = timeRange.split(RANGE_TIME_LINK); |
| | | wrapper.ge(WaitPakinLog::getAppeTime, DateUtils.convert(range[0])); |
| | | wrapper.le(WaitPakinLog::getAppeTime, DateUtils.convert(range[1])); |
| | | } |
| | | if (!Cools.isEmpty(param.get("zpallet"))) { |
| | | wrapper.like(WaitPakinLog::getZpallet, param.get("zpallet")); |
| | | } |
| | | if (!Cools.isEmpty(param.get("matnr"))) { |
| | | wrapper.like(WaitPakinLog::getMatnr, param.get("matnr")); |
| | | } |
| | | return R.ok(waitPakinLogService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | |
| | | package com.zy.asrs.wms.controller; |
| | | |
| | | 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.web.BaseController; |
| | | import com.zy.asrs.common.wms.entity.WrkDetl; |
| | | import com.zy.asrs.common.wms.service.WrkDetlService; |
| | | import com.zy.asrs.framework.annotations.ManagerAuth; |
| | | import com.zy.asrs.framework.common.Cools; |
| | | import com.zy.asrs.framework.common.DateUtils; |
| | | 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.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | public class WrkDetlController extends BaseController { |
| | |
| | | @RequestParam(required = false) String condition, |
| | | @RequestParam(required = false) String timeRange, |
| | | @RequestParam Map<String, Object> param) { |
| | | LambdaQueryWrapper<WrkDetl> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(WrkDetl::getHostId, getHostId()); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(WrkDetl::getId, condition); |
| | | } |
| | | QueryWrapper<WrkDetl> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("host_id", getHostId()); |
| | | // if (!Cools.isEmpty(condition)) { |
| | | // wrapper.like(WrkDetl::getId, condition); |
| | | // } |
| | | if (!Cools.isEmpty(timeRange)) { |
| | | String[] range = timeRange.split(RANGE_TIME_LINK); |
| | | wrapper.ge(WrkDetl::getAppeTime, DateUtils.convert(range[0])); |
| | | wrapper.le(WrkDetl::getAppeTime, DateUtils.convert(range[1])); |
| | | wrapper.ge("io_time", DateUtils.convert(range[0])); |
| | | wrapper.le("io_time", DateUtils.convert(range[1])); |
| | | } |
| | | if (!Cools.isEmpty(param.get("wrk_mast_id"))) { |
| | | wrapper.eq(WrkDetl::getWrkMastId, param.get("wrk_mast_id")); |
| | | wrapper.eq("wrk_mast_id", param.get("wrk_mast_id")); |
| | | } |
| | | if (!Cools.isEmpty(param.get("matnr"))) { |
| | | wrapper.like(WrkDetl::getMatnr, param.get("matnr")); |
| | | wrapper.like("matnr", param.get("matnr")); |
| | | } |
| | | if (!Cools.isEmpty(param.get("maktx"))) { |
| | | wrapper.like(WrkDetl::getMaktx, param.get("maktx")); |
| | | wrapper.like("maktx", param.get("maktx")); |
| | | } |
| | | if (!Cools.isEmpty(param.get("zpallet"))) { |
| | | wrapper.like("zpallet", param.get("zpallet")); |
| | | } |
| | | if (!Cools.isEmpty(param.get("orderNo"))) { |
| | | wrapper.like("order_no", param.get("orderNo")); |
| | | } |
| | | allLike(WrkDetl.class, param.keySet(), wrapper, condition); |
| | | wrapper.orderByDesc("io_time"); |
| | | return R.ok(wrkDetlService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkDetl/update/auth") |
| | | @ManagerAuth |
| | | public R update(WrkDetl wrkDetl){ |
| | | if (Cools.isEmpty(wrkDetl) || null==wrkDetl.getId()){ |
| | | @RequestMapping(value = "/wrkDetl/update/auth") |
| | | @ManagerAuth |
| | | public R update(WrkDetl wrkDetl) { |
| | | if (Cools.isEmpty(wrkDetl) || null == wrkDetl.getId()) { |
| | | return R.error(); |
| | | } |
| | | wrkDetlService.updateById(wrkDetl); |
| | |
| | | |
| | | @RequestMapping(value = "/wrkDetl/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | public R delete(@RequestParam(value = "ids[]") Long[] ids) { |
| | | for (Long id : ids) { |
| | | wrkDetlService.removeById(id); |
| | | } |
| | | return R.ok(); |
| | |
| | | wrapper.like(WrkDetl::getId, condition); |
| | | Page<WrkDetl> page = wrkDetlService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (WrkDetl wrkDetl : page.getRecords()){ |
| | | for (WrkDetl wrkDetl : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", wrkDetl.getId()); |
| | | map.put("value", wrkDetl.getId()); |
| | |
| | | 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.wms.entity.WrkDetl; |
| | | import com.zy.asrs.common.wms.entity.WrkDetlLog; |
| | |
| | | @RequestParam(required = false) String condition, |
| | | @RequestParam(required = false) String timeRange, |
| | | @RequestParam Map<String, Object> param) { |
| | | LambdaQueryWrapper<WrkDetlLog> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(WrkDetlLog::getHostId, getHostId()); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(WrkDetlLog::getId, condition); |
| | | } |
| | | QueryWrapper<WrkDetlLog> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("host_id", getHostId()); |
| | | // if (!Cools.isEmpty(condition)) { |
| | | // wrapper.like(WrkDetl::getId, condition); |
| | | // } |
| | | if (!Cools.isEmpty(timeRange)) { |
| | | String[] range = timeRange.split(RANGE_TIME_LINK); |
| | | wrapper.ge(WrkDetlLog::getAppeTime, DateUtils.convert(range[0])); |
| | | wrapper.le(WrkDetlLog::getAppeTime, DateUtils.convert(range[1])); |
| | | wrapper.ge("io_time", DateUtils.convert(range[0])); |
| | | wrapper.le("io_time", DateUtils.convert(range[1])); |
| | | } |
| | | if (!Cools.isEmpty(param.get("wrk_mast_id"))) { |
| | | wrapper.eq(WrkDetlLog::getWrkMastId, param.get("wrk_mast_id")); |
| | | wrapper.eq("wrk_mast_id", param.get("wrk_mast_id")); |
| | | } |
| | | wrapper.orderByDesc(WrkDetlLog::getId); |
| | | if (!Cools.isEmpty(param.get("matnr"))) { |
| | | wrapper.like("matnr", param.get("matnr")); |
| | | } |
| | | if (!Cools.isEmpty(param.get("maktx"))) { |
| | | wrapper.like("maktx", param.get("maktx")); |
| | | } |
| | | if (!Cools.isEmpty(param.get("zpallet"))) { |
| | | wrapper.like("zpallet", param.get("zpallet")); |
| | | } |
| | | if (!Cools.isEmpty(param.get("orderNo"))) { |
| | | wrapper.like("order_no", param.get("orderNo")); |
| | | } |
| | | allLike(WrkDetlLog.class, param.keySet(), wrapper, condition); |
| | | wrapper.orderByDesc("io_time"); |
| | | return R.ok(wrkDetlLogService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | |
| | | excludeTrash(param); |
| | | QueryWrapper<WrkMast> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("host_id",getHostId()); |
| | | System.out.println(param); |
| | | convert(param, wrapper); |
| | | return R.ok(wrkMastService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | |
| | | 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.wms.entity.WrkMastLog; |
| | | import com.zy.asrs.common.wms.service.WrkMastLogService; |
| | |
| | | @RequestParam(required = false) String condition, |
| | | @RequestParam(required = false) String timeRange, |
| | | @RequestParam Map<String, Object> param) { |
| | | LambdaQueryWrapper<WrkMastLog> wrapper = new LambdaQueryWrapper<>(); |
| | | QueryWrapper<WrkMastLog> wrapper = new QueryWrapper<>(); |
| | | // wrapper.eq(WrkMastLog::getHostId, getHostId()); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(WrkMastLog::getWrkNo, condition); |
| | | } |
| | | if (!Cools.isEmpty(timeRange)) { |
| | | String[] range = timeRange.split(RANGE_TIME_LINK); |
| | | wrapper.ge(WrkMastLog::getAppeTime, DateUtils.convert(range[0])); |
| | | wrapper.le(WrkMastLog::getAppeTime, DateUtils.convert(range[1])); |
| | | wrapper.ge("appe_time", DateUtils.convert(range[0])); |
| | | wrapper.le("appe_time", DateUtils.convert(range[1])); |
| | | } |
| | | if (!Cools.isEmpty(param.get("barcode"))) { |
| | | wrapper.eq("barcode", param.get("barcode")); |
| | | } |
| | | if (!Cools.isEmpty(param.get("wrkNo"))) { |
| | | wrapper.eq(WrkMastLog::getWrkNo, param.get("wrkNo")); |
| | | wrapper.eq("wrk_no", param.get("wrkNo")); |
| | | } |
| | | if (!Cools.isEmpty(param.get("wrkSts"))) { |
| | | wrapper.eq(WrkMastLog::getWrkSts, param.get("wrkSts")); |
| | | wrapper.eq("wrk_sts", param.get("wrkSts")); |
| | | } |
| | | if (!Cools.isEmpty(param.get("ioType"))) { |
| | | wrapper.eq(WrkMastLog::getIoType, param.get("ioType")); |
| | | wrapper.eq("iotype", param.get("ioType")); |
| | | } |
| | | if (!Cools.isEmpty(param.get("manuType"))) { |
| | | wrapper.like(WrkMastLog::getManuType, param.get("manuType")); |
| | | wrapper.like("manu_type", param.get("manuType")); |
| | | } |
| | | wrapper.orderByDesc(WrkMastLog::getId); |
| | | allLike(WrkMastLog.class, param.keySet(), wrapper, condition); |
| | | wrapper.orderByDesc("id"); |
| | | return R.ok(wrkMastLogService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | |
| | | enabled: false |
| | | datasource: |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | url: jdbc:sqlserver://127.0.0.1:1433;databasename=ncasrs |
| | | url: jdbc:sqlserver://192.168.4.34:1433;databasename=ncasrs |
| | | # url: jdbc:sqlserver://localhost:1433;databasename=jmasrs |
| | | # username: sa |
| | | # password: sa@123 |
| | |
| | | var detailWidth = '90%'; |
| | | |
| | | // 非空判断 |
| | | function isEmpty(obj){ |
| | | function isEmpty(obj) { |
| | | return typeof obj == "undefined" || obj == null || obj === ""; |
| | | } |
| | | |
| | |
| | | if (p < 10) { |
| | | p = "00" + p; |
| | | } |
| | | if (p < 100) { |
| | | if (p < 100) { |
| | | p = "0" + p; |
| | | } |
| | | return y + "-" + M + "-" + d + " " + h + ":" + m + ":" + s + "," + p; |
| | |
| | | // 清理对象null值 |
| | | function reObject(data) { |
| | | for (var obj in data) { |
| | | if (data[obj]===null){ |
| | | if (data[obj] === null) { |
| | | delete data[obj]; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | // 权限 |
| | | function limit(child){ |
| | | if (child == null){ |
| | | function limit(child) { |
| | | if (child == null) { |
| | | child = false; |
| | | } |
| | | var param = (child?parent.window:window).location.href.split("?")[1]; |
| | | var param = (child ? parent.window : window).location.href.split("?")[1]; |
| | | if (null != param) { |
| | | var resourceId = getQueryVariable('resourceId') |
| | | if (resourceId == false) { |
| | | resourceId = param.split("=")[1]; |
| | | } |
| | | $.ajax({ |
| | | url: baseUrl+"/power/menu/"+resourceId+"/auth", |
| | | url: baseUrl + "/power/menu/" + resourceId + "/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | for(var i = 0, len = res.data.length; i < len; i++) { |
| | | (child?parent:window).$('#'+res.data[i].code).css("display", "inline-block"); |
| | | (child?parent:window).$('.'+res.data[i].code).css("display", "inline-block"); |
| | | if (res.code === 200) { |
| | | for (var i = 0, len = res.data.length; i < len; i++) { |
| | | (child ? parent : window).$('#' + res.data[i].code).css("display", "inline-block"); |
| | | (child ? parent : window).$('.' + res.data[i].code).css("display", "inline-block"); |
| | | } |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | |
| | | timeout: 10000, |
| | | cache: false, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | if (res.code === 200) { |
| | | callback(res); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg); |
| | | } |
| | | }, |
| | |
| | | timeout: 10000, |
| | | cache: false, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | if (res.code === 200) { |
| | | callback(res); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg); |
| | | } |
| | | }, |
| | |
| | | |
| | | /*************************************************************************************************************/ |
| | | /********************************************** 物料业务抽象 ***************************************************/ |
| | | |
| | | /*************************************************************************************************************/ |
| | | |
| | | function arrRemove(arr, key, val) { |
| | | for(var i=arr.length-1; i>=0; i--){ |
| | | if(arr[i][key] === val){ |
| | | arr.splice(i,1); |
| | | for (var i = arr.length - 1; i >= 0; i--) { |
| | | if (arr[i][key] === val) { |
| | | arr.splice(i, 1); |
| | | } |
| | | } |
| | | } |
| | | |
| | | var matCols = [ |
| | | {field: 'matnr', align: 'center',title: '品号', width: 180, sort:true} |
| | | {field: 'matnr', align: 'center', title: '品号', width: 180, sort: true} |
| | | // {field: 'id', align: 'center',title: 'ID'} |
| | | // ,{field: 'uuid', align: 'center',title: '编号'} |
| | | // ,{field: 'tagId$', align: 'center',title: '所属归类'} |
| | | ,{field: 'maktx', align: 'center',title: '名称', width: 200, sort:true} |
| | | , {field: 'maktx', align: 'center', title: '名称', width: 200, sort: true} |
| | | // ,{field: 'name', align: 'center',title: '别名'} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'model', align: 'center',title: '机型', hide: false} |
| | | ,{field: 'decrees', align: 'center',title: '制令', hide: false, sort:true} |
| | | ,{field: 'imgNum', align: 'center',title: '图号', hide: false} |
| | | ,{field: 'weight', align: 'center',title: '重量', hide: false} |
| | | ,{field: 'length', align: 'center',title: '长度', hide: false} |
| | | ,{field: 'width', align: 'center',title: '宽度', hide: false} |
| | | ,{field: 'height', align: 'center',title: '高度', hide: false} |
| | | , {field: 'specs', align: 'center', title: '规格'} |
| | | , {field: 'model', align: 'center', title: '机型', hide: false} |
| | | , {field: 'decrees', align: 'center', title: '制令', hide: false, sort: true} |
| | | , {field: 'imgNum', align: 'center', title: '图号', hide: false} |
| | | , {field: 'weight', align: 'center', title: '重量', hide: false} |
| | | , {field: 'length', align: 'center', title: '长度', hide: false} |
| | | , {field: 'width', align: 'center', title: '宽度', hide: false} |
| | | , {field: 'height', 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: '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: 'threeCode', align: 'center',title: '三方编码', hide: true} |
| | | ,{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: 'threeCode', align: 'center', title: '三方编码', hide: true} |
| | | , {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: false} |
| | | , {field: 'updateBy$', align: 'center', title: '修改人员', hide: true} |
| | | , {field: 'updateTime$', align: 'center', title: '修改时间', hide: true} |
| | | , {field: 'memo', align: 'center', title: '备注', hide: false} |
| | | ] |
| | | |
| | | 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: '批号', width: 80, 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: 'templet', align: 'center',title: '机型',templet:function(row){ |
| | | if(row.mat$) { |
| | | return row.mat$.model |
| | | {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: '批号', width: 80, sort: true} |
| | | , {field: 'anfme', align: 'center', title: '数量'} |
| | | , {field: 'zpallet', align: 'center', title: '托盘条码', sort: true} |
| | | , {field: 'owner', align: 'center', title: '货主'} |
| | | , {field: 'fullPlt$', align: 'center', title: '是否满板'} |
| | | , {field: 'specs', align: 'center', title: '规格'} |
| | | , { |
| | | field: 'templet', align: 'center', title: '机型', templet: function (row) { |
| | | if (row.mat$) { |
| | | return row.mat$.model |
| | | } |
| | | } |
| | | }} |
| | | ,{field: 'templet', align: 'center',title: '制令',templet:function(row){ |
| | | if (row.mat$) { |
| | | return row.mat$.decrees; |
| | | } |
| | | , { |
| | | field: 'templet', align: 'center', title: '制令', templet: function (row) { |
| | | if (row.mat$) { |
| | | return row.mat$.decrees; |
| | | } |
| | | } |
| | | }} |
| | | } |
| | | |
| | | |
| | | ,{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: true} |
| | | ,{field: 'length', align: 'center',title: '单箱毛重', hide: true} |
| | | ,{field: 'volume', align: 'center',title: '单箱体积', hide: true} |
| | | ,{field: 'threeCode', align: 'center',title: '箱子尺寸', hide: true} |
| | | ,{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: '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: true} |
| | | , {field: 'length', align: 'center', title: '单箱毛重', hide: true} |
| | | , {field: 'volume', align: 'center', title: '单箱体积', hide: true} |
| | | , {field: 'threeCode', align: 'center', title: '箱子尺寸', hide: true} |
| | | , {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} |
| | | ] |
| | | |
| | | var detlColsWrkDetl = [ |
| | | {field: 'matnr', align: 'center',title: '品号', sort:true, width: 150} |
| | | ,{field: 'maktx', align: 'center',title: '名称', sort:true, width: 150} |
| | | ,{field: 'orderNo', align: 'center',title: '单据编号', hide: false} |
| | | ,{field: 'orderType', align: 'center',title: '单据类型', hide: false} |
| | | ,{field: 'batch', align: 'center',title: '批号', width: 80, sort:true} |
| | | ,{field: 'anfme', align: 'center',title: '数量', width: 70} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码', width: 100} |
| | | ,{field: 'owner', align: 'center',title: '货主', width: 80} |
| | | ,{field: 'fullPlt$', align: 'center',title: '是否满板', width: 100} |
| | | ,{field: 'specs', align: 'center',title: '规格', width: 80} |
| | | ,{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: 'matnr', align: 'center', title: '品号', sort: true, width: 150} |
| | | , {field: 'maktx', align: 'center', title: '名称', sort: true, width: 150} |
| | | , {field: 'orderNo', align: 'center', title: '单据编号', sort: true, hide: false} |
| | | , {field: 'orderType', align: 'center', title: '单据类型', hide: false} |
| | | , {field: 'batch', align: 'center', title: '批号', width: 80, sort: true} |
| | | , {field: 'anfme', align: 'center', title: '数量', width: 70} |
| | | , {field: 'zpallet', align: 'center', title: '托盘条码', sort: true, width: 100} |
| | | , {field: 'owner', align: 'center', title: '货主', width: 80} |
| | | , {field: 'fullPlt$', align: 'center', title: '是否满板', width: 100} |
| | | , {field: 'specs', align: 'center', title: '规格', width: 80} |
| | | , {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) |
| | | { |
| | | function getQueryVariable(variable) { |
| | | var query = window.location.search.substring(1); |
| | | var vars = query.split("&"); |
| | | for (var i=0;i<vars.length;i++) { |
| | | for (var i = 0; i < vars.length; i++) { |
| | | var pair = vars[i].split("="); |
| | | if(pair[0] == variable){return pair[1];} |
| | | if (pair[0] == variable) { |
| | | return pair[1]; |
| | | } |
| | | } |
| | | return(false); |
| | | return (false); |
| | | } |
| | |
| | | ,{field: 'staNo$', align: 'center',title: '目标站', hide:true} |
| | | ,{field: 'sourceLocNo$', align: 'center',title: '源库位', hide:true} |
| | | ,{field: 'locNo$', align: 'center',title: '目标库位', hide:true} |
| | | ,{field: 'barcode', align: 'center',title: '条码', hide:true} |
| | | ,{field: 'barcode', align: 'center',title: '托盘码', hide:true} |
| | | ,{field: 'updMk', align: 'center',title: '异常标记'} |
| | | ,{field: 'errorTime$', align: 'center',title: '异常记录时间'} |
| | | ,{field: 'errorMemo', align: 'center',title: '异常内容'} |
| | |
| | | var pageCurr; |
| | | |
| | | function getCol() { |
| | | var cols = [ |
| | | {field: 'locNo', align: 'center',title: '库位号'}, |
| | | {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: 80, sort:true} |
| | | ,{field: 'anfme', align: 'center',title: '数量', width: 100} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘码'} |
| | | ,{field: 'templet', align: 'center',title: '机型',templet:function(row){ |
| | | return row.mat$.model |
| | | }} |
| | | ,{field: 'templet', align: 'center',title: '制令',templet:function(row){ |
| | | {field: 'locNo', align: 'center', title: '库位号'}, |
| | | {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: 80, sort: true} |
| | | , {field: 'anfme', align: 'center', title: '数量', width: 100} |
| | | , {field: 'zpallet', align: 'center', title: '托盘码', sort: true} |
| | | , { |
| | | field: 'templet', align: 'center', title: '机型', templet: function (row) { |
| | | return row.mat$.model |
| | | } |
| | | } |
| | | , { |
| | | field: 'templet', align: 'center', title: '制令', templet: function (row) { |
| | | return row.mat$.decrees |
| | | }} |
| | | ,{field: 'memo', align: 'center',title: '备注'} |
| | | } |
| | | } |
| | | , {field: 'owner', align: 'center', title: '货主'} |
| | | , {field: 'memo', align: 'center', title: '备注'} |
| | | // ,{field: 'owner$', align: 'center',title: '拥有者'} |
| | | |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'model', align: 'center',title: '代码', hide: true} |
| | | ,{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: false} |
| | | ,{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: true} |
| | | ,{field: 'length', align: 'center',title: '单箱毛重', hide: true} |
| | | ,{field: 'volume', align: 'center',title: '单箱体积', hide: true} |
| | | ,{field: 'threeCode', align: 'center',title: '箱子尺寸', hide: true} |
| | | ,{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: 'specs', align: 'center', title: '规格'} |
| | | , {field: 'model', align: 'center', title: '代码', hide: true} |
| | | , {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: false} |
| | | , {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: true} |
| | | , {field: 'length', align: 'center', title: '单箱毛重', hide: true} |
| | | , {field: 'volume', align: 'center', title: '单箱体积', hide: true} |
| | | , {field: 'threeCode', align: 'center', title: '箱子尺寸', hide: true} |
| | | , {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} |
| | | |
| | | ]; |
| | | |
| | | // cols.push.apply(cols, detlCols); |
| | | cols.push({field: 'modiUser$', align: 'center',title: '修改人员',hide: true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间'} |
| | | cols.push({field: 'modiUser$', align: 'center', title: '修改人员', hide: true} |
| | | , {field: 'modiTime$', align: 'center', title: '修改时间'} |
| | | ) |
| | | return cols; |
| | | } |
| | | |
| | | layui.use(['table','laydate', 'form'], function(){ |
| | | layui.use(['table', 'laydate', 'form'], function () { |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | |
| | | tableIns = table.render({ |
| | | elem: '#locDetl', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/locDetl/page/auth', |
| | | url: baseUrl + '/locDetl/page/auth', |
| | | page: true, |
| | | limit: 20, |
| | | where:{ |
| | | where: { |
| | | unreason: false |
| | | }, |
| | | limits: [20, 30, 50, 100, 200, 500], |
| | |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | top.location.href = baseUrl + "/"; |
| | | } |
| | | pageCurr=curr; |
| | | pageCurr = curr; |
| | | limit(); |
| | | form.on('checkbox(tableCheckbox)', function (data) { |
| | | var _index = $(data.elem).attr('table-index')||0; |
| | | if(data.elem.checked){ |
| | | var _index = $(data.elem).attr('table-index') || 0; |
| | | if (data.elem.checked) { |
| | | res.data[_index][data.value] = 'Y'; |
| | | }else{ |
| | | } else { |
| | | res.data[_index][data.value] = 'N'; |
| | | } |
| | | }); |
| | |
| | | // 监听排序事件 |
| | | table.on('sort(locDetl)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | $.each($('#search-box [name]').serializeArray(), function () { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | top.location.href = baseUrl + "/"; |
| | | } |
| | | pageCurr=curr; |
| | | pageCurr = curr; |
| | | limit(); |
| | | } |
| | | }); |
| | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(locDetl)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | switch(obj.event) { |
| | | switch (obj.event) { |
| | | case 'addData': |
| | | layer.open({ |
| | | type: 2, |
| | |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: false, |
| | | content: 'locDetl_detail.html', |
| | | success: function(layero, index){ |
| | | success: function (layero, index) { |
| | | layer.getChildFrame('#data-detail-submit-edit', index).hide(); |
| | | clearFormVal(layer.getChildFrame('#detail', index)); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | layer.iframeAuto(index); |
| | | layer.style(index, {top: (($(window).height() - layer.getChildFrame('#data-detail', index).height()) / 3) + "px"}); |
| | | } |
| | | }); |
| | | break; |
| | |
| | | break; |
| | | case 'deleteData': |
| | | var data = checkStatus.data; |
| | | if (data.length === 0){ |
| | | if (data.length === 0) { |
| | | layer.msg('请选择数据'); |
| | | } else { |
| | | layer.confirm('确定删除'+(data.length===1?'此':data.length)+'条数据吗', function(){ |
| | | layer.confirm('确定删除' + (data.length === 1 ? '此' : data.length) + '条数据吗', function () { |
| | | $.ajax({ |
| | | url: baseUrl+"/locDetl/delete/auth", |
| | | url: baseUrl + "/locDetl/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {param: JSON.stringify(data)}, |
| | | method: 'POST', |
| | | traditional:true, |
| | | traditional: true, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | if (res.code === 200) { |
| | | layer.closeAll(); |
| | | tableReload(false); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } 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=[]; |
| | | 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); |
| | |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | $.each($('#search-box [name]').serializeArray(), function () { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | |
| | | }; |
| | | var loadIndex = layer.msg('正在导出...', {icon: 16, shade: 0.01, time: false}); |
| | | $.ajax({ |
| | | url: baseUrl+"/locDetl/export/auth", |
| | | url: baseUrl + "/locDetl/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | dataType: 'json', |
| | | contentType: 'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | res.data.forEach((item,index) => { |
| | | res.data.forEach((item, index) => { |
| | | if (item[0] != null) { |
| | | item[0] = "'" + item[0]; |
| | | } |
| | |
| | | item[2] = "'" + item[2]; |
| | | } |
| | | }) |
| | | table.exportFile(titles,res.data,'xls'); |
| | | table.exportFile(titles, res.data, 'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(locDetl)', function(obj){ |
| | | table.on('tool(locDetl)', function (obj) { |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | // 详情 |
| | |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: false, |
| | | content: 'locDetl_detail.html', |
| | | success: function(layero, index){ |
| | | 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,#data-detail-submit-edit,#prompt', index).hide(); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | 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'); |
| | | } |
| | |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: false, |
| | | content: 'locDetl_detail.html', |
| | | success: function(layero, index){ |
| | | 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,#matnr', index), true); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | 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'); |
| | | } |
| | |
| | | |
| | | // 数据保存动作 |
| | | form.on('submit(save)', function () { |
| | | if (banMsg != null){ |
| | | if (banMsg != null) { |
| | | layer.msg(banMsg); |
| | | return; |
| | | } |
| | |
| | | method("update") |
| | | }); |
| | | |
| | | function method(name){ |
| | | function method(name) { |
| | | var index = layer.load(1, { |
| | | shade: [0.5,'#000'] //0.1透明度的背景 |
| | | shade: [0.5, '#000'] //0.1透明度的背景 |
| | | }); |
| | | var data = { |
| | | // id: $('#id').val(), |
| | |
| | | |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/locDetl/"+name+"/auth", |
| | | url: baseUrl + "/locDetl/" + name + "/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: top.reObject(data), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | 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 { |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | layer.close(index); |
| | |
| | | done: function (res, curr, count) { |
| | | |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | top.location.href = baseUrl + "/"; |
| | | } |
| | | pageCurr=curr; |
| | | pageCurr = curr; |
| | | |
| | | limit(); |
| | | } |
| | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | $(document).on('click', '#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | |
| | | var searchData = { |
| | | unreason: false |
| | | }; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | $.each($('#search-box [name]').serializeArray(), function () { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | (child ? parent.tableIns : tableIns).reload({ |
| | |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | top.location.href = baseUrl + "/"; |
| | | } |
| | | pageCurr=curr; |
| | | pageCurr = curr; |
| | | if (res.data.length === 0 && count !== 0) { |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr-1 |
| | | curr: pageCurr - 1 |
| | | } |
| | | }); |
| | | pageCurr -= 1; |
| | |
| | | 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"); |
| | | 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(data[val]); |
| | | if (showImg){ |
| | | if (showImg) { |
| | | var next = find.next(); |
| | | if (next.get(0)){ |
| | | if (next.get(0)) { |
| | | if (next.get(0).localName === "img") { |
| | | find.hide(); |
| | | next.attr("src", data[val]); |
| | |
| | | |
| | | 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); |
| | | 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' |
| | | height: height + 'px' |
| | | }); |
| | | } |
| | | |
| | |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'matNo', align: 'center',title: '物料编码'} |
| | | ,{field: 'barcode', align: 'center',title: '条码'} |
| | | ,{field: 'barcode', align: 'center',title: '托盘码'} |
| | | ,{field: 'matName', align: 'center',title: '物料名称'} |
| | | ,{field: 'str1', align: 'center',title: '物料单位'} |
| | | ,{field: 'str2', align: 'center',title: '物料规格'} |
| | |
| | | ,{field: 'level', align: 'center',title: '等级'} |
| | | ,{field: 'leading', align: 'center',title: '负责人'} |
| | | ,{field: 'sort', align: 'center',title: '排序'} |
| | | ,{field: 'barcode', align: 'center',title: '条码'} |
| | | ,{field: 'barcode', align: 'center',title: '托盘码'} |
| | | ,{field: 'major', align: 'center',title: '推荐位'} |
| | | ,{field: 'status$', align: 'center',title: '状态'} |
| | | ,{field: 'createTime$', align: 'center',title: '添加时间'} |
| | |
| | | var pageCurr; |
| | | var admin; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'element', 'admin', 'xmSelect'], function(){ |
| | | }).use(['table', 'laydate', 'form', 'element', 'admin', 'xmSelect'], function () { |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | var element = layui.element; |
| | | var admin = layui.admin; |
| | | admin = layui.admin; |
| | | var xmSelect = layui.xmSelect; |
| | | |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#safeSto', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/safeSto/list/auth', |
| | | url: baseUrl + '/safeSto/list/auth', |
| | | page: true, |
| | | limit: 16, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {type: 'numbers', fixed: 'left'} |
| | | ,{field: 'locNo$', align: 'center',title: '库位'} |
| | | ,{field: 'matnr', align: 'center',title: '品号'} |
| | | ,{field: 'maktx', align: 'center',title: '名称'} |
| | | ,{field: 'progress', align: 'center',title: '使用情况', templet: '#progressTpl', width: 350} |
| | | ,{field: 'status', align: 'center',title: '警报', templet: '#statusTpl', width: 100} |
| | | ,{field: 'safeQua', align: 'center',title: '安全库存量', style: 'font-weight: bold'} |
| | | ,{field: 'amount', align: 'center',title: '当前库存量', style: 'font-weight: bold; color: #2d8cf0'} |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | , {field: 'locNo$', align: 'center', title: '库位'} |
| | | , {field: 'matnr', align: 'center', title: '品号'} |
| | | , {field: 'maktx', align: 'center', title: '名称'} |
| | | , {field: 'progress', align: 'center', title: '使用情况', templet: '#progressTpl', width: 350} |
| | | , {field: 'status', align: 'center', title: '警报', templet: '#statusTpl', width: 100} |
| | | , {field: 'safeQua', align: 'center', title: '安全库存量', style: 'font-weight: bold'} |
| | | , {field: 'amount', align: 'center', title: '当前库存量', style: 'font-weight: bold; color: #2d8cf0'} |
| | | , {fixed: 'right', title: '操作', align: 'center', toolbar: '#operate', width: 120} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | top.location.href = baseUrl + "/"; |
| | | } |
| | | element.render('progress') |
| | | pageCurr=curr; |
| | | pageCurr = curr; |
| | | limit(); |
| | | } |
| | | }); |
| | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(safeSto)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | switch(obj.event) { |
| | | switch (obj.event) { |
| | | case 'add': |
| | | showEditModel(); |
| | | break; |
| | | case 'exportData': |
| | | layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | window.location.href = baseUrl + '/safeSto/excel/export/auth?token='+localStorage.getItem('token'); |
| | | layer.confirm('确定导出Excel吗', {shadeClose: true}, function () { |
| | | window.location.href = baseUrl + '/safeSto/excel/export/auth?token=' + localStorage.getItem('token'); |
| | | layer.closeAll(); |
| | | }); |
| | | break; |
| | |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(safeSto)', function(obj){ |
| | | table.on('tool(safeSto)', function (obj) { |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | // 修改 |
| | |
| | | break; |
| | | // 补仓 |
| | | case 'allot': |
| | | layer.confirm(data.node_name +'补仓 '+ data.matnr + ',数量:' + (data.safe_qua - data.amount), function(){ |
| | | var index = layer.load(1, {shade: [0.1,'#000']}); |
| | | layer.confirm(data.node_name + '补仓 ' + data.matnr + ',数量:' + (data.safe_qua - data.amount), function () { |
| | | var index = layer.load(1, {shade: [0.1, '#000']}); |
| | | $.ajax({ |
| | | url: baseUrl+"/work/stock/transfer", |
| | | url: baseUrl + "/work/stock/transfer", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | contentType:'application/json;charset=UTF-8', |
| | | contentType: 'application/json;charset=UTF-8', |
| | | data: JSON.stringify({ |
| | | node_id: data.node_id, |
| | | matnr: data.matnr, |
| | | safe_qua: data.safe_qua, |
| | | amount: data.amount |
| | | }), |
| | | dataType:'json', |
| | | dataType: 'json', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | layer.msg(res.msg, {icon: 1}) |
| | | $(".layui-laypage-btn")[0].click(); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | |
| | | data.field.matId = matXmSelect.getValue()[0] ? matXmSelect.getValue()[0].value : null; |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/safeSto/"+(mData?'update':'add')+"/auth", |
| | | url: baseUrl + "/safeSto/" + (mData ? 'update' : 'add') + "/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(data.field), |
| | | contentType:'application/json;charset=UTF-8', |
| | | contentType: 'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | if (res.code === 200) { |
| | | layer.close(dIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | |
| | | el: '#locNo', |
| | | radio: true, |
| | | autoRow: true, |
| | | toolbar: { show: true }, |
| | | toolbar: {show: true}, |
| | | filterable: true, |
| | | remoteSearch: true, |
| | | remoteMethod: function(val, cb, show){ |
| | | remoteMethod: function (val, cb, show) { |
| | | //这里如果val为空, 则不触发搜索 |
| | | // if(!val){ |
| | | // return cb([]); |
| | | // } |
| | | $.ajax({ |
| | | url: baseUrl+"/locMast/all/get/kv", |
| | | url: baseUrl + "/locMast/all/get/kv", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | condition: val |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | if (res.code === 200) { |
| | | cb(res.data) |
| | | } else { |
| | | cb([]); |
| | |
| | | el: '#mat', |
| | | radio: true, |
| | | autoRow: true, |
| | | toolbar: { show: true }, |
| | | toolbar: {show: true}, |
| | | filterable: true, |
| | | remoteSearch: true, |
| | | remoteMethod: function(val, cb, show){ |
| | | remoteMethod: function (val, cb, show) { |
| | | //这里如果val为空, 则不触发搜索 |
| | | // if(!val){ |
| | | // return cb([]); |
| | | // } |
| | | $.ajax({ |
| | | url: baseUrl+"/mat/all/get/kv", |
| | | url: baseUrl + "/mat/all/get/kv", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | condition: val |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | if (res.code === 200) { |
| | | cb(res.data) |
| | | } else { |
| | | cb([]); |
| | |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/safeSto/delete/auth", |
| | | url: baseUrl + "/safeSto/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(params), |
| | | contentType:'application/json;charset=UTF-8', |
| | | contentType: 'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | if (res.code === 200) { |
| | | layer.msg(res.msg, {icon: 1}); |
| | | $(".layui-laypage-btn")[0].click(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | $(document).on('click', '#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload() { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | $.each($('#search-box [name]').serializeArray(), function () { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | tableIns.reload({ |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | $('body').keydown(function () { |
| | | if (event.keyCode === 13) { |
| | | $("#search").click(); |
| | | } |
| | | }); |
| | | |
| | | // excel导入模板下载 |
| | | function downloadData() { |
| | | layer.load(1, {shade: [0.1, '#fff']}); |
| | | location.href = baseUrl + "/safeSto/excel/import/mould"; |
| | | layer.closeAll('loading'); |
| | | } |
| | | |
| | | // excel导入 |
| | | function importData() { |
| | | $("#btn-import").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 + "/safeSto/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) { |
| | | $("#btn-import").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}); |
| | | } |
| | |
| | | html += ">"; |
| | | return html; |
| | | }, hide: true} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员', hide:true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间'} |
| | | ,{field: 'ioStatus', align: 'center',title: '入出状态', templet:function(row){ |
| | | var html = "<input value='ioStatus' type='checkbox' lay-skin='switch' lay-text='入库中|待入库' lay-filter='tableCheckbox' disabled='disabled' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | if(row.ioStatus === 'Y'){html += " checked ";} |
| | | html += ">"; |
| | | return html; |
| | | }} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员', hide:true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', hide:true}) |
| | | ) |
| | | return cols; |
| | | } |
| | | |
| | |
| | | ,{field: 'ioTime$', align: 'center',title: '工作时间',sort: true, width: 160} |
| | | ,{field: 'wrkSts$', align: 'center',title: '工作状态'} |
| | | ,{field: 'ioType$', align: 'center',title: '入出库类型'} |
| | | ,{field: 'ioPri', align: 'center',title: '优先级'} |
| | | ,{field: 'ioPri', align: 'center',title: '优先级',sort: true} |
| | | ,{field: 'sourceStaNo', align: 'center',title: '源站'} |
| | | ,{field: 'staNo', align: 'center',title: '目标站'} |
| | | ,{field: 'sourceLocNo', align: 'center',title: '源库位'} |
| | | ,{field: 'locNo', align: 'center',title: '目标库位'} |
| | | ,{field: 'barcode', align: 'center',title: '条码'} |
| | | ,{field: 'barcode', align: 'center',title: '托盘码'} |
| | | ,{field: 'preHave', align: 'center',title: '先入品', hide: true} |
| | | ,{field: 'takeNone', align: 'center',title: '空操作', hide: true} |
| | | // ,{field: 'picking', align: 'center',title: '拣料', templet:function(row){ |
| | |
| | | list.push({ |
| | | wrkNo: track.wrkNo, |
| | | ioTime: track.ioTime, |
| | | ioPri: track.ioPri |
| | | ioPri: track.ioPri, |
| | | id: track.id |
| | | }); |
| | | }); |
| | | $.ajax({ |
| | |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', hide:true} |
| | | // ,{field: 'appeUser$', align: 'center',title: '创建者',event: 'appeUser', style: 'cursor:pointer'} |
| | | // ,{field: 'appeTime$', align: 'center',title: '添加时间'} |
| | | ,{field: 'barcode', align: 'center',title: '条码'} |
| | | ,{field: 'barcode', align: 'center',title: '托盘码'} |
| | | // ,{field: 'fullPlt', align: 'center',title: '满板', templet:function(row){ |
| | | // var html = "<input value='fullPlt' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | // if(row.fullPlt === 'Y'){html += " checked ";} |
| | |
| | | <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/locDetl/locDetl.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/locDetl/locDetl.js?v=1" charset="utf-8"></script> |
| | | |
| | | <iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe> |
| | | |
| | |
| | | <input class="layui-input" type="text" name="matnr" placeholder="商品编号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="maktx" 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">搜索 |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">条码: </label> |
| | | <label class="layui-form-label">托盘码: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="barcode" placeholder="请输入条码"> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">条码: </label> |
| | | <label class="layui-form-label">托盘码: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="barcode" placeholder="请输入条码"> |
| | | </div> |
| | |
| | | <!-- <input class="layui-input" type="text" name="owner$" placeholder="拥有者" autocomplete="off">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="maktx" placeholder="名称" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-inline">--> |
| | | <!-- <div class="layui-input-inline">--> |
| | | <!-- <input class="layui-input" type="text" name="maktx" placeholder="名称" autocomplete="off">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- 日期范围 --> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">条码: </label> |
| | | <label class="layui-form-label">托盘码: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="barcode" placeholder="请输入条码"> |
| | | </div> |
| | |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm" id="btn-add1" lay-event="add"><i class="layui-icon"></i>添加</button> |
| | | <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <input class="layui-btn layui-btn-primary layui-btn-sm" id="btn-import" type="file" onchange="upload(this)" title="导入"> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-download" onclick="downloadData()" >模板下载</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData">导出</button> |
| | | </div> |
| | | </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/safeSto/safeSto.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/safeSto/safeSto.js?v=4" charset="utf-8"></script> |
| | | |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | |
| | | <input class="layui-input" type="text" name="matnr" placeholder="商品编号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="owner" placeholder="货主" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- 日期范围 --> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | |
| | | <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/waitPakin/waitPakin.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/waitPakin/waitPakin.js?v=2" charset="utf-8"></script> |
| | | |
| | | <iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe> |
| | | |
| | |
| | | <input class="layui-input" type="text" name="pakin_id" placeholder="入库通知号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="zpallet" 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"> |
| | |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="zpallet" placeholder="托盘码" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="orderNo" placeholder="单据" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="owner" placeholder="拥有者编号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | |
| | | <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/wrkDetl/wrkDetl.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/wrkDetl/wrkDetl.js?v=1" charset="utf-8"></script> |
| | | |
| | | <iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe> |
| | | |
| | |
| | | <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/wrkMast/wrkMast.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/wrkMast/wrkMast.js?v=1" charset="utf-8"></script> |
| | | |
| | | <iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe> |
| | | |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="barcode" placeholder="托盘码" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="wrkSts" class="layui-input" name="wrk_sts" type="text" placeholder="请输入" autocomplete="off" style="display: none"> |
| | | <input id="wrkSts$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="工作状态" onfocus=this.blur()> |
| | |
| | | <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/wrkMastLog/wrkMastLog.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/wrkMastLog/wrkMastLog.js?v=1" charset="utf-8"></script> |
| | | |
| | | <iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe> |
| | | |