New file |
| | |
| | | -- save basAreas record |
| | | -- mysql |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'basAreas/basAreas.html', 'basAreas管理', null , '2', null , '1'); |
| | | |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'basAreas#view', '查询', '', '3', '0', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'basAreas#btn-add', '新增', '', '3', '1', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'basAreas#btn-edit', '编辑', '', '3', '2', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'basAreas#btn-delete', '删除', '', '3', '3', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'basAreas#btn-export', '导出', '', '3', '4', '1'); |
| | | |
| | | -- sqlserver |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'basAreas/basAreas.html', N'basAreas管理', null, '2', null, '1'); |
| | | |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'basAreas#view', N'查询', '', '3', '0', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'basAreas#btn-add', N'新增', '', '3', '1', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'basAreas#btn-edit', N'编辑', '', '3', '2', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'basAreas#btn-delete', N'删除', '', '3', '3', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'basAreas#btn-export', N'导出', '', '3', '4', '1'); |
New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.entity.BasAreas; |
| | | import com.zy.asrs.service.BasAreasService; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class BasAreasController extends BaseController { |
| | | |
| | | @Autowired |
| | | private BasAreasService basAreasService; |
| | | |
| | | @RequestMapping(value = "/basAreas/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basAreasService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basAreas/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<BasAreas> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasAreas.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(basAreasService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/basAreas/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasAreas basAreas) { |
| | | basAreasService.insert(basAreas); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basAreas/update/auth") |
| | | @ManagerAuth |
| | | public R update(BasAreas basAreas){ |
| | | if (Cools.isEmpty(basAreas) || null==basAreas.getId()){ |
| | | return R.error(); |
| | | } |
| | | basAreasService.updateById(basAreas); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basAreas/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | basAreasService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basAreas/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasAreas> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basAreas")); |
| | | convert(map, wrapper); |
| | | List<BasAreas> list = basAreasService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basAreasQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasAreas> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<BasAreas> page = basAreasService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasAreas basAreas : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", basAreas.getId()); |
| | | map.put("value", basAreas.getName()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/basAreas/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasAreas> wrapper = new EntityWrapper<BasAreas>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basAreasService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasAreas.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.BasWhsType; |
| | | import com.zy.asrs.entity.LocCache; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import com.zy.asrs.entity.param.LocMastInitParam; |
| | | import com.zy.asrs.service.LocCacheService; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.zy.common.model.Shelves; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class LocCacheController extends BaseController { |
| | | |
| | | @Autowired |
| | | private LocCacheService locCacheService; |
| | | |
| | | @RequestMapping(value = "/locCache/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(locCacheService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locCache/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<LocCache> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(LocCache.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(locCacheService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/locCache/add/auth") |
| | | @ManagerAuth |
| | | public R add(LocCache locCache) { |
| | | locCacheService.insert(locCache); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locCache/update/auth") |
| | | @ManagerAuth |
| | | public R update(LocCache locCache){ |
| | | if (Cools.isEmpty(locCache) || null==locCache.getLocNo()){ |
| | | return R.error(); |
| | | } |
| | | locCacheService.updateById(locCache); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locCache/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | locCacheService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locCache/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<LocCache> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("locCache")); |
| | | convert(map, wrapper); |
| | | List<LocCache> list = locCacheService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locCacheQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<LocCache> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("loc_no", condition); |
| | | Page<LocCache> page = locCacheService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (LocCache locCache : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", locCache.getLocNo()); |
| | | map.put("value", locCache.getLocNo()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locCache/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<LocCache> wrapper = new EntityWrapper<LocCache>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != locCacheService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(LocCache.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | @RequestMapping("locCache/init/auth") |
| | | @ManagerAuth |
| | | public R init(LocMastInitParam param) { |
| | | if (Objects.isNull(param)) { |
| | | throw new CoolException("参数不能为空!"); |
| | | } |
| | | return locCacheService.initLocCache(param, getUserId()); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.SpringUtils; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.zy.asrs.service.BasWhsTypeService; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @TableName("asr_bas_areas") |
| | | public class BasAreas implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableId(value = "id", type = IdType.INPUT) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 仓库ID |
| | | */ |
| | | @ApiModelProperty(value= "仓库ID") |
| | | @TableField("whs_id") |
| | | private Long whsId; |
| | | |
| | | /** |
| | | * 仓库名称 |
| | | */ |
| | | @ApiModelProperty(value= "仓库名称") |
| | | @TableField("whs_name") |
| | | private String whsName; |
| | | |
| | | /** |
| | | * 库区名称 |
| | | */ |
| | | @ApiModelProperty(value= "库区名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * 仓库类型 |
| | | */ |
| | | @ApiModelProperty(value= "仓库类型") |
| | | @TableField("whs_type_id") |
| | | private Long whsTypeId; |
| | | |
| | | /** |
| | | * 库区编码 |
| | | */ |
| | | @ApiModelProperty(value= "库区编码") |
| | | @TableField("area_no") |
| | | private String areaNo; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value= "创建时间") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("update_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 创建人员 |
| | | */ |
| | | @ApiModelProperty(value= "创建人员") |
| | | @TableField("create_by") |
| | | private String createBy; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("update_by") |
| | | private String updateBy; |
| | | |
| | | public BasAreas() {} |
| | | |
| | | public BasAreas(Long id,Long whsId,String whsName,String name,Long whsTypeId,String areaNo,Date createTime,Date updateTime,String createBy,String updateBy) { |
| | | this.id = id; |
| | | this.whsId = whsId; |
| | | this.whsName = whsName; |
| | | this.name = name; |
| | | this.whsTypeId = whsTypeId; |
| | | this.areaNo = areaNo; |
| | | this.createTime = createTime; |
| | | this.updateTime = updateTime; |
| | | this.createBy = createBy; |
| | | this.updateBy = updateBy; |
| | | } |
| | | |
| | | // BasAreas basAreas = new BasAreas( |
| | | // null, // [非空] |
| | | // null, // 仓库ID |
| | | // null, // 仓库名称 |
| | | // null, // 库区名称 |
| | | // null, // 仓库类型 |
| | | // null, // 库区编码 |
| | | // null, // 创建时间 |
| | | // null, // 修改时间 |
| | | // null, // 创建人员 |
| | | // null // 修改人员 |
| | | // ); |
| | | |
| | | public String getWhsTypeId$(){ |
| | | BasWhsTypeService service = SpringUtils.getBean(BasWhsTypeService.class); |
| | | BasWhsType basWhsType = service.selectById(this.whsTypeId); |
| | | if (!Cools.isEmpty(basWhsType)){ |
| | | return String.valueOf(basWhsType.getWhsDesc()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.service.BasWhsTypeService; |
| | | import com.zy.asrs.service.BasCrnpService; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import com.zy.system.service.UserService; |
| | | import com.zy.system.entity.User; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @TableName("asr_loc_cache") |
| | | public class LocCache implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | @ApiModelProperty("主键ID") |
| | | @TableId |
| | | private Long id; |
| | | |
| | | /** |
| | | * 库位号 |
| | | */ |
| | | @ApiModelProperty(value= "库位号") |
| | | @TableField("loc_no") |
| | | private String locNo; |
| | | |
| | | /** |
| | | * 库位类型 |
| | | */ |
| | | @ApiModelProperty(value= "库位类型") |
| | | @TableField("whs_type") |
| | | private Long whsType; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("loc_sts") |
| | | private String locSts; |
| | | |
| | | /** |
| | | * 排 |
| | | */ |
| | | @ApiModelProperty(value= "排") |
| | | private Integer row1; |
| | | |
| | | /** |
| | | * 列 |
| | | */ |
| | | @ApiModelProperty(value= "列") |
| | | private Integer bay1; |
| | | |
| | | /** |
| | | * 层 |
| | | */ |
| | | @ApiModelProperty(value= "层") |
| | | private Integer lev1; |
| | | |
| | | /** |
| | | * 满板(checkBox) |
| | | */ |
| | | @ApiModelProperty(value= "满板(checkBox)") |
| | | @TableField("full_plt") |
| | | private String fullPlt; |
| | | |
| | | /** |
| | | * 库位状态 |
| | | */ |
| | | @ApiModelProperty(value= "库位状态") |
| | | @TableField("loc_type") |
| | | private String locType; |
| | | |
| | | /** |
| | | * 高低类型 0: 未知 1: 低库位 2: 高库位 |
| | | */ |
| | | @ApiModelProperty(value= "高低类型 0: 未知 1: 低库位 2: 高库位 ") |
| | | @TableField("loc_type1") |
| | | private Short locType1; |
| | | |
| | | /** |
| | | * 宽窄类型 0: 未知 1: 窄库位 2: 宽库位 |
| | | */ |
| | | @ApiModelProperty(value= "宽窄类型 0: 未知 1: 窄库位 2: 宽库位 ") |
| | | @TableField("loc_type2") |
| | | private Short locType2; |
| | | |
| | | /** |
| | | * 轻重类型 0: 未知 1: 轻库位 2: 重库位 |
| | | */ |
| | | @ApiModelProperty(value= "轻重类型 0: 未知 1: 轻库位 2: 重库位 ") |
| | | @TableField("loc_type3") |
| | | private Short locType3; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("out_enable") |
| | | private String outEnable; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("io_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date ioTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("first_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date firstTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("modi_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @TableField("appe_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date appeTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | private String barcode; |
| | | |
| | | @ApiModelProperty("库区ID") |
| | | private Long areaId; |
| | | |
| | | @ApiModelProperty("库区名称") |
| | | private String areaName; |
| | | |
| | | /** |
| | | * 是否冻结,0.未冻结,1.已冻结 |
| | | */ |
| | | @ApiModelProperty(value= "是否冻结,0.未冻结,1.已冻结") |
| | | private Integer frozen; |
| | | |
| | | /** |
| | | * 冻结备注 |
| | | */ |
| | | @ApiModelProperty(value= "冻结备注") |
| | | @TableField("frozen_memo") |
| | | private String frozenMemo; |
| | | |
| | | public LocCache() {} |
| | | |
| | | public LocCache(String locNo,Long whsType,Integer pltType,Integer ctnType,String locSts,String sheetNo,Integer crnNo,Integer row1,Integer bay1,Integer lev1,String fullPlt,String locType,Short locType1,Short locType2,Short locType3,String outEnable,Date ioTime,Date firstTime,Long modiUser,Date modiTime,Long appeUser,Date appeTime,Date errorTime,String errorMemo,Integer ctnKind,Double scWeight,String invWh,String mk,String barcode,String PdcType,String ctnNo,Integer libraryType,Integer gro1,Integer frozen,String frozenMemo) { |
| | | this.locNo = locNo; |
| | | this.whsType = whsType; |
| | | this.locSts = locSts; |
| | | this.row1 = row1; |
| | | this.bay1 = bay1; |
| | | this.lev1 = lev1; |
| | | this.fullPlt = fullPlt; |
| | | this.locType = locType; |
| | | this.locType1 = locType1; |
| | | this.locType2 = locType2; |
| | | this.locType3 = locType3; |
| | | this.outEnable = outEnable; |
| | | this.ioTime = ioTime; |
| | | this.firstTime = firstTime; |
| | | this.modiUser = modiUser; |
| | | this.modiTime = modiTime; |
| | | this.appeUser = appeUser; |
| | | this.appeTime = appeTime; |
| | | this.barcode = barcode; |
| | | this.frozen = frozen; |
| | | this.frozenMemo = frozenMemo; |
| | | } |
| | | |
| | | |
| | | public String getWhsType$(){ |
| | | BasWhsTypeService service = SpringUtils.getBean(BasWhsTypeService.class); |
| | | BasWhsType basWhsType = service.selectById(this.whsType); |
| | | if (!Cools.isEmpty(basWhsType)){ |
| | | return String.valueOf(basWhsType.getWhsDesc()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // public String getCrnNo$(){ |
| | | // BasCrnpService service = SpringUtils.getBean(BasCrnpService.class); |
| | | // BasCrnp basCrnp = service.selectById(this.crnNo); |
| | | // if (!Cools.isEmpty(basCrnp)){ |
| | | // return String.valueOf(basCrnp.getCrnNo()); |
| | | // } |
| | | // return null; |
| | | // } |
| | | |
| | | public String getLocType1$(){ |
| | | if (null == this.locType1){ return null; } |
| | | switch (this.locType1){ |
| | | case 0: |
| | | return "未知"; |
| | | case 1: |
| | | return "低库位"; |
| | | case 2: |
| | | return "高库位"; |
| | | default: |
| | | return String.valueOf(this.locType1); |
| | | } |
| | | } |
| | | |
| | | public String getLocType2$(){ |
| | | if (null == this.locType2){ return null; } |
| | | switch (this.locType2){ |
| | | case 0: |
| | | return "未知"; |
| | | case 1: |
| | | return "窄库位"; |
| | | case 2: |
| | | return "宽库位"; |
| | | default: |
| | | return String.valueOf(this.locType2); |
| | | } |
| | | } |
| | | |
| | | public String getLocType3$(){ |
| | | if (null == this.locType3){ return null; } |
| | | switch (this.locType3){ |
| | | case 0: |
| | | return "未知"; |
| | | case 1: |
| | | return "轻库位"; |
| | | case 2: |
| | | return "重库位"; |
| | | default: |
| | | return String.valueOf(this.locType3); |
| | | } |
| | | } |
| | | |
| | | public String getIoTime$(){ |
| | | if (Cools.isEmpty(this.ioTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ioTime); |
| | | } |
| | | |
| | | public String getFirstTime$(){ |
| | | if (Cools.isEmpty(this.firstTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.firstTime); |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasAreas; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface BasAreasMapper extends BaseMapper<BasAreas> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.LocCache; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface LocCacheMapper extends BaseMapper<LocCache> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.BasAreas; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | public interface BasAreasService extends IService<BasAreas> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.LocCache; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.param.LocMastInitParam; |
| | | |
| | | public interface LocCacheService extends IService<LocCache> { |
| | | |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @date 2025/9/18 |
| | | * @description: 初始化库区库位 |
| | | * @version 1.0 |
| | | */ |
| | | R initLocCache(LocMastInitParam param, Long userId); |
| | | } |
New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.zy.asrs.mapper.BasAreasMapper; |
| | | import com.zy.asrs.entity.BasAreas; |
| | | import com.zy.asrs.service.BasAreasService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basAreasService") |
| | | public class BasAreasServiceImpl extends ServiceImpl<BasAreasMapper, BasAreas> implements BasAreasService { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.BasAreas; |
| | | import com.zy.asrs.entity.BasWhsType; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import com.zy.asrs.entity.param.LocMastInitParam; |
| | | import com.zy.asrs.mapper.LocCacheMapper; |
| | | import com.zy.asrs.entity.LocCache; |
| | | import com.zy.asrs.service.BasAreasService; |
| | | import com.zy.asrs.service.BasWhsTypeService; |
| | | import com.zy.asrs.service.LocCacheService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.common.model.Shelves; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @Service("locCacheService") |
| | | public class LocCacheServiceImpl extends ServiceImpl<LocCacheMapper, LocCache> implements LocCacheService { |
| | | |
| | | |
| | | @Autowired |
| | | private BasAreasService basAreasService; |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @date 2025/9/18 |
| | | * @description: 初始化库区库位信息 |
| | | * @version 1.0 |
| | | */ |
| | | @Override |
| | | public R initLocCache(LocMastInitParam param, Long userId) { |
| | | try { |
| | | List<LocCache> list = new ArrayList<>(); |
| | | BasAreas areas = basAreasService.selectById(param.getIdentifying()); |
| | | if (Cools.isEmpty(areas)) { |
| | | return R.error("库区不存在!!!"); |
| | | } |
| | | for (int r = param.getStartRow(); r <= param.getEndRow(); r++) { |
| | | for (int b = param.getStartBay(); b <= param.getEndBay(); b++) { |
| | | for (int l = param.getStartLev(); l <= param.getEndLev(); l++) { |
| | | // 获取库位号 |
| | | String locNo = String.format("CA") + String.format("%02d", r) + String.format("%03d", b) + String.format("%02d", l); |
| | | Date now = new Date(); |
| | | LocCache locMast = new LocCache(); |
| | | locMast.setLocNo(locNo); |
| | | locMast.setLocSts("O"); |
| | | locMast.setRow1(r); // 排 |
| | | locMast.setBay1(b); // 列 |
| | | locMast.setLev1(l); // 层 |
| | | locMast.setId(null); |
| | | locMast.setLocType1(!Cools.isEmpty(param.getLocType1()) ? param.getLocType1() : 1); |
| | | locMast.setLocType2(param.getLocType2()); |
| | | locMast.setLocType3(param.getLocType3()); |
| | | locMast.setAppeUser(userId); |
| | | locMast.setAppeTime(now); |
| | | locMast.setModiUser(userId); |
| | | locMast.setModiTime(now); |
| | | locMast.setAreaId(areas.getId()); |
| | | locMast.setAreaName(areas.getName()); |
| | | list.add(locMast); |
| | | } |
| | | } |
| | | } |
| | | if (!Cools.isEmpty(param.getEnable()) && param.getEnable() == 1) { |
| | | if (!this.delete(new EntityWrapper<>())) { |
| | | throw new CoolException("删除失败!!"); |
| | | } |
| | | } |
| | | |
| | | if (!this.insertBatch(list)) { |
| | | throw new CoolException("添加失败!!"); |
| | | } |
| | | return R.ok("初始化成功"); |
| | | } catch (Exception e) { |
| | | return R.error("初始化失败===>" + e.getMessage()); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | -- save locCache record |
| | | -- mysql |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'locCache/locCache.html', '缓存库区', null , '2', null , '1'); |
| | | |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'locCache#view', '查询', '', '3', '0', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'locCache#btn-add', '新增', '', '3', '1', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'locCache#btn-edit', '编辑', '', '3', '2', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'locCache#btn-delete', '删除', '', '3', '3', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'locCache#btn-export', '导出', '', '3', '4', '1'); |
| | | |
| | | -- sqlserver |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'locCache/locCache.html', N'缓存库区', null, '2', null, '1'); |
| | | |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'locCache#view', N'查询', '90594', '3', '0', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'locCache#btn-add', N'新增', '90594', '3', '1', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'locCache#btn-edit', N'编辑', '90594', '3', '2', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'locCache#btn-delete', N'删除', '90594', '3', '3', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'locCache#btn-export', N'导出', '90594', '3', '4', '1'); |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.asrs.mapper.BasAreasMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.BasAreas"> |
| | | <result column="id" property="id" /> |
| | | <result column="whs_id" property="whsId" /> |
| | | <result column="whs_name" property="whsName" /> |
| | | <result column="name" property="name" /> |
| | | <result column="whs_type_id" property="whsTypeId" /> |
| | | <result column="area_no" property="areaNo" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.asrs.mapper.LocCacheMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.LocCache"> |
| | | <result column="loc_no" property="locNo" /> |
| | | <result column="whs_type" property="whsType" /> |
| | | <result column="plt_type" property="pltType" /> |
| | | <result column="ctn_type" property="ctnType" /> |
| | | <result column="loc_sts" property="locSts" /> |
| | | <result column="sheet_no" property="sheetNo" /> |
| | | <result column="crn_no" property="crnNo" /> |
| | | <result column="row1" property="row1" /> |
| | | <result column="bay1" property="bay1" /> |
| | | <result column="lev1" property="lev1" /> |
| | | <result column="full_plt" property="fullPlt" /> |
| | | <result column="loc_type" property="locType" /> |
| | | <result column="loc_type1" property="locType1" /> |
| | | <result column="loc_type2" property="locType2" /> |
| | | <result column="loc_type3" property="locType3" /> |
| | | <result column="out_enable" property="outEnable" /> |
| | | <result column="io_time" property="ioTime" /> |
| | | <result column="first_time" property="firstTime" /> |
| | | <result column="modi_user" property="modiUser" /> |
| | | <result column="modi_time" property="modiTime" /> |
| | | <result column="appe_user" property="appeUser" /> |
| | | <result column="appe_time" property="appeTime" /> |
| | | <result column="error_time" property="errorTime" /> |
| | | <result column="error_memo" property="errorMemo" /> |
| | | <result column="ctn_kind" property="ctnKind" /> |
| | | <result column="sc_weight" property="scWeight" /> |
| | | <result column="inv_wh" property="invWh" /> |
| | | <result column="mk" property="mk" /> |
| | | <result column="barcode" property="barcode" /> |
| | | <result column="Pdc_type" property="PdcType" /> |
| | | <result column="ctn_no" property="ctnNo" /> |
| | | <result column="library_type" property="libraryType" /> |
| | | <result column="gro1" property="gro1" /> |
| | | <result column="frozen" property="frozen" /> |
| | | <result column="frozen_memo" property="frozenMemo" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |
New file |
| | |
| | | var pageCurr; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#basAreas', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/basAreas/list/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: ''} |
| | | ,{field: 'whsId', align: 'center',title: '仓库ID'} |
| | | ,{field: 'whsName', align: 'center',title: '仓库名称'} |
| | | ,{field: 'name', align: 'center',title: '库区名称'} |
| | | ,{field: 'whsTypeId$', align: 'center',title: '仓库类型'} |
| | | ,{field: 'areaNo', align: 'center',title: '库区编码'} |
| | | ,{field: 'createTime$', align: 'center',title: '创建时间'} |
| | | ,{field: 'updateTime$', align: 'center',title: '修改时间'} |
| | | ,{field: 'createBy', align: 'center',title: '创建人员'} |
| | | ,{field: 'updateBy', align: 'center',title: '修改人员'} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(basAreas)', 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(basAreas)', 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 = { |
| | | 'basAreas': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/basAreas/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(basAreas)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | | case "del": |
| | | del([data.id]); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | /* 弹窗 - 新增、修改 */ |
| | | function showEditModel(mData) { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '600px', |
| | | title: (mData ? '修改' : '添加') + '订单状态', |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | layDateRender(mData); |
| | | form.val('detail', mData); |
| | | form.on('submit(editSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/basAreas/"+(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+"/basAreas/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(false); |
| | | }); |
| | | |
| | | // 重置 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | 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: '#updateTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['updateTime\\$']:null |
| | | }); |
| | | |
| | | }, 300); |
| | | } |
| | | layDateRender(); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | | }); |
| | | } |
New file |
| | |
| | | var pageCurr; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table', 'laydate', 'form', 'admin'], function () { |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#locCache', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl + '/locCache/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[{type: 'checkbox'}, {field: 'locNo', align: 'center', title: '库位号'}, { |
| | | field: 'barcode', |
| | | align: 'center', |
| | | title: '托盘码' |
| | | }, {field: 'areaName', align: 'center', title: '库区名称'}, { |
| | | field: 'whsType$', |
| | | align: 'center', |
| | | title: '库位类型' |
| | | }, {field: 'locSts', align: 'center', title: '库位状态'}, { |
| | | field: 'row1', |
| | | align: 'center', |
| | | title: '排' |
| | | }, {field: 'bay1', align: 'center', title: '列'}, { |
| | | field: 'lev1', |
| | | align: 'center', |
| | | title: '层' |
| | | }, {field: 'locType', align: 'center', title: '库位类型'}, { |
| | | field: 'modiUser$', |
| | | align: 'center', |
| | | title: '修改人员' |
| | | }, {field: 'modiTime$', align: 'center', title: '修改时间'}, { |
| | | field: 'appeUser$', |
| | | align: 'center', |
| | | title: '创建者' |
| | | }, {field: 'appeTime$', align: 'center', title: '添加时间'}, { |
| | | field: 'frozen', |
| | | align: 'center', |
| | | title: '是否冻结,0.未冻结,1.已冻结', |
| | | hide: true |
| | | }, {field: 'frozenMemo', align: 'center', title: '冻结备注', hide: true}, { |
| | | fixed: 'right', |
| | | title: '操作', |
| | | align: 'center', |
| | | toolbar: '#operate', |
| | | width: 120 |
| | | }]], |
| | | request: { |
| | | pageName: 'curr', pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, 'msg': res.msg, 'count': res.data?.total, 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } |
| | | pageCurr = curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(locCache)', 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(locCache)', 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 'init': |
| | | layer.prompt({title: '请输入口令,并重置库位', formType: 1, shadeClose: true}, function (pass, idx) { |
| | | http.get(baseUrl + "/locMast/init/pwd", {pwd: pass}, function (res) { |
| | | if (res.data) { |
| | | layer.open({ |
| | | type: 1, |
| | | title: '初始化库位', |
| | | area: ["400px"], |
| | | maxmin: true, |
| | | shadeClose: true, |
| | | content: $("#resetLocDiv"), |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }) |
| | | } else { |
| | | layer.msg("口令错误"); |
| | | } |
| | | layer.close(idx); |
| | | }) |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(locCache)', function (obj) { |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | | case "del": |
| | | del([data.id]); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 初始化保存 |
| | | form.on('submit(initDo)', function (data) { |
| | | console.log(data.field) |
| | | $.ajax({ |
| | | url: baseUrl + "/locCache/init/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | layer.msg(res.msg); |
| | | layer.closeAll(); |
| | | tableReload(false); |
| | | } else if (res.code === 403) { |
| | | parent.location.href = "/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | |
| | | /* 弹窗 - 新增、修改 */ |
| | | function showEditModel(mData) { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '600px', |
| | | title: (mData ? '修改' : '添加') + '订单状态', |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | layDateRender(mData); |
| | | form.val('detail', mData); |
| | | form.on('submit(editSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl + "/locCache/" + (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) { |
| | | console.log(ids) |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | skin: 'layui-layer-admin', shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl + "/locCache/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(false); |
| | | }); |
| | | |
| | | // 重置 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | function layDateRender(data) { |
| | | setTimeout(function () { |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range', type: 'datetime', range: true |
| | | }); |
| | | layDate.render({ |
| | | elem: '#ioTime\\$', type: 'datetime', value: data !== undefined ? data['ioTime\\$'] : null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#firstTime\\$', type: 'datetime', value: data !== undefined ? data['firstTime\\$'] : null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#modiTime\\$', type: 'datetime', value: data !== undefined ? data['modiTime\\$'] : null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#appeTime\\$', type: 'datetime', value: data !== undefined ? data['appeTime\\$'] : null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#errorTime\\$', type: 'datetime', value: data !== undefined ? data['errorTime\\$'] : null |
| | | }); |
| | | |
| | | }, 300); |
| | | } |
| | | |
| | | layDateRender(); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click', '#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function () { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | tableIns.reload({ |
| | | where: searchData, page: {curr: pageCurr} |
| | | }); |
| | | } |
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="id" 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="create_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <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">  |
| | | <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="basAreas" lay-filter="basAreas"></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/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/basAreas/basAreas.js" charset="utf-8"></script> |
| | | </body> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <form 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">仓库ID: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="whsId" placeholder="请输入仓库ID"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">仓库名称: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="whsName" placeholder="请输入仓库名称"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">库区名称: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="name" placeholder="请输入库区名称"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">仓库类型: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="whsTypeId" placeholder="请输入仓库类型" style="display: none"> |
| | | <input id="whsTypeId$" name="whsTypeId$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入仓库类型" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basWhsTypeQueryBywhsTypeId" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basWhsTypeQueryBywhsTypeIdSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">库区编码: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="areaNo" 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="updateTime" id="updateTime$" placeholder="请输入修改时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">创建人员: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="createBy" placeholder="请输入创建人员"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">修改人员: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="updateBy" 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> |
| | | </form> |
| | | </script> |
| | | </html> |
| | | |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/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="id" 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="create_time" type="text" |
| | | placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <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">  |
| | | <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="locCache" lay-filter="locCache"></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" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary" id="btn-init" lay-event="init">初始化</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <!-- 重置库位弹窗 --> |
| | | <div id="resetLocDiv" style="margin: 20px 0 10px 30px; display: none"> |
| | | <div class="layui-form layui-form-pane"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">删除库位</label> |
| | | <div class="layui-input-inline" style="width: 100px;"> |
| | | <input type="checkbox" name="enable" lay-skin="switch" value="1" lay-text="删除|保留"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>库区名称:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="identifying" name="identifying" class="layui-input" type="text" style="display: none"> |
| | | <input id="identifying$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" |
| | | type="text" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basAreasQueryBywhsType" |
| | | onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basAreasQueryBywhsTypeSelect" |
| | | onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 排 --> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">起止排</label> |
| | | <div class="layui-input-inline" style="width: 100px;"> |
| | | <input type="text" name="startRow" autocomplete="off" class="layui-input" |
| | | lay-verify="required|number"> |
| | | </div> |
| | | <div class="layui-form-mid">-</div> |
| | | <div class="layui-input-inline" style="width: 100px;"> |
| | | <input type="text" name="endRow" autocomplete="off" class="layui-input" |
| | | lay-verify="required|number"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 列 --> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">起止列</label> |
| | | <div class="layui-input-inline" style="width: 100px;"> |
| | | <input type="text" name="startBay" autocomplete="off" class="layui-input" |
| | | lay-verify="required|number"> |
| | | </div> |
| | | <div class="layui-form-mid">-</div> |
| | | <div class="layui-input-inline" style="width: 100px;"> |
| | | <input type="text" name="endBay" autocomplete="off" class="layui-input" |
| | | lay-verify="required|number"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 层 --> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">起止层</label> |
| | | <div class="layui-input-inline" style="width: 100px;"> |
| | | <input type="text" name="startLev" autocomplete="off" class="layui-input" |
| | | lay-verify="required|number"> |
| | | </div> |
| | | <div class="layui-form-mid">-</div> |
| | | <div class="layui-input-inline" style="width: 100px;"> |
| | | <input type="text" name="endLev" autocomplete="off" class="layui-input" |
| | | lay-verify="required|number"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">堆垛机数量</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="crnAmount" lay-verify="required|number" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">起始堆垛机</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="staCrn" autocomplete="off" class="layui-input" lay-verify="number"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 库位类型 --> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">高低类型</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="locType1"> |
| | | <option style="display: none"></option> |
| | | <option value="0">未知</option> |
| | | <option value="1">低库位</option> |
| | | <option value="2">高库位</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">宽窄类型</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="locType2"> |
| | | <option style="display: none"></option> |
| | | <option value="0">未知</option> |
| | | <option value="1">窄库位</option> |
| | | <option value="2">宽库位</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">轻重类型</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="locType3"> |
| | | <option style="display: none"></option> |
| | | <option value="0">未知</option> |
| | | <option value="1">轻库位</option> |
| | | <option value="2">重库位</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div style="text-align: center; margin-top: 20px"> |
| | | <button class="layui-btn layui-btn-radius layui-btn-normal" id="initDo" lay-submit lay-filter="initDo"> |
| | | 确定 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <!-- <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" 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/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/locCache/locCache.js" charset="utf-8"></script> |
| | | </body> |
| | | </html> |
| | | |