#
Junjie
2023-12-28 3bcbf7e0bc53dea03ad7a267dd0dfec7262b96ce
#
9个文件已添加
848 ■■■■■ 已修改文件
zy-asrs-common/src/main/java/com/zy/asrs/common/wms/controller/LocRuleController.java 110 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-common/src/main/java/com/zy/asrs/common/wms/entity/LocRule.java 202 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-common/src/main/java/com/zy/asrs/common/wms/mapper/LocRuleMapper.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-common/src/main/java/com/zy/asrs/common/wms/service/LocRuleService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-common/src/main/java/com/zy/asrs/common/wms/service/impl/LocRuleServiceImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-common/src/main/java/locRule.sql 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-common/src/main/resources/mapper/wms/LocRuleMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-wms/src/main/webapp/static/js/locRule/locRule.js 278 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-wms/src/main/webapp/views/locRule/locRule.html 203 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-common/src/main/java/com/zy/asrs/common/wms/controller/LocRuleController.java
New file
@@ -0,0 +1,110 @@
package com.zy.asrs.common.wms.controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zy.asrs.common.wms.entity.LocRule;
import com.zy.asrs.common.wms.service.LocRuleService;
import com.zy.asrs.framework.annotations.ManagerAuth;
import com.zy.asrs.framework.common.Cools;
import com.zy.asrs.framework.common.R;
import com.zy.asrs.framework.domain.KeyValueVo;
import com.zy.asrs.framework.common.DateUtils;
import com.zy.asrs.common.web.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.*;
@RestController
public class LocRuleController extends BaseController {
    @Autowired
    private LocRuleService locRuleService;
    @RequestMapping(value = "/locRule/{id}/auth")
    @ManagerAuth
    public R get(@PathVariable("id") String id) {
        return R.ok(locRuleService.getById(String.valueOf(id)));
    }
    @RequestMapping(value = "/locRule/page/auth")
    @ManagerAuth
    public R page(@RequestParam(defaultValue = "1") Integer curr,
                  @RequestParam(defaultValue = "10") Integer limit,
                  @RequestParam(required = false) String condition,
                  @RequestParam(required = false) String timeRange,
                  @RequestParam Map<String, Object> param) {
        LambdaQueryWrapper<LocRule> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(LocRule::getHostId, getHostId());
        if (!Cools.isEmpty(condition)) {
            wrapper.like(LocRule::getId, condition);
        }
        if (!Cools.isEmpty(timeRange)) {
            String[] range = timeRange.split(RANGE_TIME_LINK);
            wrapper.ge(LocRule::getCreateTime, DateUtils.convert(range[0]));
            wrapper.le(LocRule::getCreateTime, DateUtils.convert(range[1]));
        }
        return R.ok(locRuleService.page(new Page<>(curr, limit), wrapper));
    }
    @RequestMapping(value = "/locRule/add/auth")
    @ManagerAuth
    public R add(LocRule locRule) {
        locRule.setHostId(getHostId());
        locRuleService.save(locRule);
        return R.ok();
    }
    @RequestMapping(value = "/locRule/update/auth")
    @ManagerAuth
    public R update(LocRule locRule){
        if (Cools.isEmpty(locRule) || null==locRule.getId()){
            return R.error();
        }
        locRuleService.updateById(locRule);
        return R.ok();
    }
    @RequestMapping(value = "/locRule/delete/auth")
    @ManagerAuth
    public R delete(@RequestParam(value="ids[]") Long[] ids){
         for (Long id : ids){
            locRuleService.removeById(id);
        }
        return R.ok();
    }
    @RequestMapping(value = "/locRuleQuery/auth")
    @ManagerAuth
    public R query(String condition) {
        LambdaQueryWrapper<LocRule> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(LocRule::getHostId, getHostId());
        wrapper.like(LocRule::getId, condition);
        Page<LocRule> page = locRuleService.page(new Page<>(0, 10), wrapper);
        List<Map<String, Object>> result = new ArrayList<>();
        for (LocRule locRule : page.getRecords()){
            Map<String, Object> map = new HashMap<>();
            map.put("id", locRule.getId());
            map.put("value", locRule.getId());
            result.add(map);
        }
        return R.ok(result);
    }
    @RequestMapping("/locRule/all/get/kv")
    @ManagerAuth
    public R getDataKV(@RequestParam(required = false) String condition) {
        List<KeyValueVo> vos = new ArrayList<>();
        LambdaQueryWrapper<LocRule> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(LocRule::getHostId, getHostId());
        if (!Cools.isEmpty(condition)) {
            wrapper.like(LocRule::getId, condition);
        }
        locRuleService.page(new Page<>(1, 30), wrapper).getRecords().forEach(item -> vos.add(new KeyValueVo(String.valueOf(item.getId()), item.getId())));
        return R.ok().add(vos);
    }
}
zy-asrs-common/src/main/java/com/zy/asrs/common/wms/entity/LocRule.java
New file
@@ -0,0 +1,202 @@
package com.zy.asrs.common.wms.entity;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.zy.asrs.framework.common.Cools;
import com.zy.asrs.framework.common.SpringUtils;
import com.zy.asrs.common.sys.entity.User;
import com.zy.asrs.common.sys.entity.Host;
import com.zy.asrs.common.sys.service.UserService;
import com.zy.asrs.common.sys.service.HostService;
import java.io.Serializable;
import java.util.Date;
@Data
@TableName("wms_loc_rule")
public class LocRule implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value= "")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @ApiModelProperty(value= "")
    private String matnr;
    @ApiModelProperty(value= "")
    private String specs;
    @ApiModelProperty(value= "")
    private String model;
    @ApiModelProperty(value= "")
    private String cstmr;
    @ApiModelProperty(value= "")
    private String batch;
    @ApiModelProperty(value= "")
    private String other;
    @ApiModelProperty(value= "")
    private Integer rowBeg;
    @ApiModelProperty(value= "")
    private Integer rowEnd;
    @ApiModelProperty(value= "")
    private Integer bayBeg;
    @ApiModelProperty(value= "")
    private Integer bayEnd;
    @ApiModelProperty(value= "")
    private Integer levBeg;
    @ApiModelProperty(value= "")
    private Integer levEnd;
    @ApiModelProperty(value= "")
    private Integer limit;
    @ApiModelProperty(value= "")
    private Integer status;
    @ApiModelProperty(value= "")
    private Long createBy;
    @ApiModelProperty(value= "")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    @ApiModelProperty(value= "")
    private Long updateBy;
    @ApiModelProperty(value= "")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    @ApiModelProperty(value= "")
    private String memo;
    /**
     * 是否支持混载 0: 不支持  1: 支持
     */
    @ApiModelProperty(value= "是否支持混载 0: 不支持  1: 支持  ")
    private Short mixed;
    /**
     * 支持混载情况下,没找到库位是否继续寻找 0: 否  1: 是
     */
    @ApiModelProperty(value= "支持混载情况下,没找到库位是否继续寻找 0: 否  1: 是  ")
    private Short keepGo;
    /**
     * 仓库ID
     */
    @ApiModelProperty(value= "仓库ID")
    private Long hostId;
    public LocRule() {}
    public LocRule(String matnr,String specs,String model,String cstmr,String batch,String other,Integer rowBeg,Integer rowEnd,Integer bayBeg,Integer bayEnd,Integer levBeg,Integer levEnd,Integer limit,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo,Short mixed,Short keepGo) {
        this.matnr = matnr;
        this.specs = specs;
        this.model = model;
        this.cstmr = cstmr;
        this.batch = batch;
        this.other = other;
        this.rowBeg = rowBeg;
        this.rowEnd = rowEnd;
        this.bayBeg = bayBeg;
        this.bayEnd = bayEnd;
        this.levBeg = levBeg;
        this.levEnd = levEnd;
        this.limit = limit;
        this.status = status;
        this.createBy = createBy;
        this.createTime = createTime;
        this.updateBy = updateBy;
        this.updateTime = updateTime;
        this.memo = memo;
        this.mixed = mixed;
        this.keepGo = keepGo;
    }
//    LocRule locRule = new LocRule(
//            null,    //
//            null,    //
//            null,    //
//            null,    //
//            null,    //
//            null,    //
//            null,    //
//            null,    //
//            null,    //
//            null,    //
//            null,    //
//            null,    //
//            null,    //
//            null,    //
//            null,    //
//            null,    //
//            null,    //
//            null,    //
//            null,    //
//            null,    // 是否支持混载
//            null    // 支持混载情况下,没找到库位是否继续寻找
//    );
    public String getCreateTime$(){
        if (Cools.isEmpty(this.createTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
    }
    public String getUpdateTime$(){
        if (Cools.isEmpty(this.updateTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
    }
    public String getMixed$(){
        if (null == this.mixed){ return null; }
        switch (this.mixed){
            case 0:
                return "不支持";
            case 1:
                return "支持";
            default:
                return String.valueOf(this.mixed);
        }
    }
    public String getKeepGo$(){
        if (null == this.keepGo){ return null; }
        switch (this.keepGo){
            case 0:
                return "否";
            case 1:
                return "是";
            default:
                return String.valueOf(this.keepGo);
        }
    }
}
zy-asrs-common/src/main/java/com/zy/asrs/common/wms/mapper/LocRuleMapper.java
New file
@@ -0,0 +1,12 @@
package com.zy.asrs.common.wms.mapper;
import com.zy.asrs.common.wms.entity.LocRule;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
@Mapper
@Repository
public interface LocRuleMapper extends BaseMapper<LocRule> {
}
zy-asrs-common/src/main/java/com/zy/asrs/common/wms/service/LocRuleService.java
New file
@@ -0,0 +1,8 @@
package com.zy.asrs.common.wms.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zy.asrs.common.wms.entity.LocRule;
public interface LocRuleService extends IService<LocRule> {
}
zy-asrs-common/src/main/java/com/zy/asrs/common/wms/service/impl/LocRuleServiceImpl.java
New file
@@ -0,0 +1,12 @@
package com.zy.asrs.common.wms.service.impl;
import com.zy.asrs.common.wms.mapper.LocRuleMapper;
import com.zy.asrs.common.wms.entity.LocRule;
import com.zy.asrs.common.wms.service.LocRuleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
@Service("locRuleService")
public class LocRuleServiceImpl extends ServiceImpl<LocRuleMapper, LocRule> implements LocRuleService {
}
zy-asrs-common/src/main/java/locRule.sql
New file
@@ -0,0 +1,18 @@
-- save locRule record
-- mysql
insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'locRule/locRule.html', 'locRule管理', null , '2', null , '1');
insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'locRule#view', '查询', '', '3', '0', '1');
insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'locRule#btn-add', '新增', '', '3', '1', '1');
insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'locRule#btn-edit', '编辑', '', '3', '2', '1');
insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'locRule#btn-delete', '删除', '', '3', '3', '1');
insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'locRule#btn-export', '导出', '', '3', '4', '1');
-- sqlserver
insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'locRule/locRule.html', N'locRule管理', null, '2', null, '1');
insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'locRule#view', N'查询', '', '3', '0', '1');
insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'locRule#btn-add', N'新增', '', '3', '1', '1');
insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'locRule#btn-edit', N'编辑', '', '3', '2', '1');
insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'locRule#btn-delete', N'删除', '', '3', '3', '1');
insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'locRule#btn-export', N'导出', '', '3', '4', '1');
zy-asrs-common/src/main/resources/mapper/wms/LocRuleMapper.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zy.asrs.common.wms.mapper.LocRuleMapper">
</mapper>
zy-asrs-wms/src/main/webapp/static/js/locRule/locRule.js
New file
@@ -0,0 +1,278 @@
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: '#locRule',
        headers: {token: localStorage.getItem('token')},
        url: baseUrl+'/locRule/page/auth',
        page: true,
        limit: 15,
        limits: [15, 30, 50, 100, 200, 500],
        toolbar: '#toolbar',
        cellMinWidth: 50,
        height: 'full-120',
        where:{cstmr : 0},
        cols: [[
            {type: 'checkbox'}
            // ,{field: 'id', align: 'center',title: 'ID'}
            ,{field: 'matnr', align: 'center',title: '商品编号'}
            ,{field: 'specs', align: 'center',title: '规格', hide: true}
            ,{field: 'model', align: 'center',title: '通用型号', hide: true}
            ,{field: 'cstmr', align: 'center',title: '客户', hide: true}
            ,{field: 'batch', align: 'center',title: '批号'}
            // ,{field: 'other', align: 'center',title: '库区'}
            ,{field: 'rowBeg', align: 'center',title: '开始排'}
            ,{field: 'rowEnd', align: 'center',title: '结束排'}
            ,{field: 'bayBeg', align: 'center',title: '开始列'}
            ,{field: 'bayEnd', align: 'center',title: '结束列'}
            ,{field: 'levBeg', align: 'center',title: '开始层'}
            ,{field: 'levEnd', align: 'center',title: '结束层'}
            ,{field: 'limit', align: 'center',title: '上限', hide: true}
            ,{field: 'status$', align: 'center',title: '状态', hide: true}
            ,{field: 'createBy$', align: 'center',title: '添加人员', hide: true}
            ,{field: 'createTime$', align: 'center',title: '添加时间', hide: true}
            ,{field: 'updateBy$', align: 'center',title: '修改人员', hide: true}
            ,{field: 'updateTime$', align: 'center',title: '修改时间', hide: true}
            ,{field: 'memo', align: 'center',title: '备注', hide: true}
            // ,{field: 'mixed$', align: 'center',title: '混载'}
            // ,{field: 'keepGo$', 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(locRule)', 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(locRule)', 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 = {
                        'locRule': exportData,
                        'fields': fields
                    };
                    $.ajax({
                        url: baseUrl+"/locRule/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(locRule)', 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: '1000px',
            title: (mData ? '修改' : '添加') + '库区规则',
            content: $('#editDialog').html(),
            success: function (layero, dIndex) {
                layDateRender(mData);
                form.val('detail', mData);
                form.on('submit(editSubmit)', function (data) {
                    data.field.cstmr = 0;
                    var loadIndex = layer.load(2);
                    $.ajax({
                        url: baseUrl+"/locRule/"+(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+"/locRule/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}
    });
}
zy-asrs-wms/src/main/webapp/views/locRule/locRule.html
New file
@@ -0,0 +1,203 @@
<!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">&emsp;
                        <button class="layui-btn icon-btn" lay-filter="search" lay-submit>
                            <i class="layui-icon">&#xe615;</i>搜索
                        </button>
                        <button class="layui-btn icon-btn" lay-filter="reset" lay-submit>
                            <i class="layui-icon">&#xe666;</i>重置
                        </button>
                    </div>
                </div>
            </div>
            <table class="layui-hide" id="locRule" lay-filter="locRule"></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/locRule/locRule.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-md6">
                <div class="layui-form-item">
                    <label class="layui-form-label">商品编号: </label>
                    <div class="layui-input-block">
                        <input class="layui-input" name="matnr" placeholder="请输入商品编号">
                    </div>
                </div>
                <!--                <div class="layui-form-item">-->
                <!--                    <label class="layui-form-label">规格: </label>-->
                <!--                    <div class="layui-input-block">-->
                <!--                        <input class="layui-input" name="specs" placeholder="请输入规格">-->
                <!--                    </div>-->
                <!--                </div>-->
                <!--                <div class="layui-form-item">-->
                <!--                    <label class="layui-form-label">型号: </label>-->
                <!--                    <div class="layui-input-block">-->
                <!--                        <input class="layui-input" name="model" placeholder="请输入型号">-->
                <!--                    </div>-->
                <!--                </div>-->
                <!--                <div class="layui-form-item">-->
                <!--                    <label class="layui-form-label">客户: </label>-->
                <!--                    <div class="layui-input-block">-->
                <!--                        <input class="layui-input" name="cstmr" placeholder="请输入客户">-->
                <!--                    </div>-->
                <!--                </div>-->
                <div class="layui-form-item">
                    <label class="layui-form-label">批号: </label>
                    <div class="layui-input-block">
                        <input class="layui-input" name="batch" placeholder="请输入批号">
                    </div>
                </div>
<!--                <div class="layui-form-item">-->
<!--                    <label class="layui-form-label">库区: </label>-->
<!--                    <div class="layui-input-block">-->
<!--                        <input class="layui-input" name="other" placeholder="请输入库区,不填则默认为四项库库位规则">-->
<!--                    </div>-->
<!--                </div>-->
                <!--                <div class="layui-form-item">-->
                <!--                    <label class="layui-form-label">其他: </label>-->
                <!--                    <div class="layui-input-block">-->
                <!--                        <input class="layui-input" name="other" placeholder="请输入其他">-->
                <!--                    </div>-->
                <!--                </div>-->
                <!--                <div class="layui-form-item">-->
                <!--                    <label class="layui-form-label">上限: </label>-->
                <!--                    <div class="layui-input-block">-->
                <!--                        <input class="layui-input" name="limit" placeholder="请输入上限">-->
                <!--                    </div>-->
                <!--                </div>-->
                <div class="layui-form-item">
                    <label class="layui-form-label">混载: </label>
                    <div class="layui-input-block">
                        <select name="mixed">
                            <option value="1">是</option>
                            <option value="0" selected>否</option>
                        </select>
                    </div>
                </div>
                <!--                <div class="layui-form-item">
                                    <label class="layui-form-label">混载未找到库位继续搜索: </label>
                                    <div class="layui-input-block">
                                        <select name="keepGo">
                                            <option value="1">是</option>
                                            <option value="0" selected>否</option>
                                        </select>
                                    </div>
                                </div>-->
            </div>
            <div class="layui-col-md6">
                <!--                <div class="layui-inline">-->
                <!--                    <label class="layui-form-label">排范围</label>-->
                <!--                    <div class="layui-input-inline" style="width: 100px;">-->
                <!--                        <input type="text" name="price_min" placeholder="¥" autocomplete="off" class="layui-input">-->
                <!--                    </div>-->
                <!--                    <div class="layui-form-mid">-</div>-->
                <!--                    <div class="layui-input-inline" style="width: 100px;">-->
                <!--                        <input type="text" name="price_max" placeholder="¥" autocomplete="off" class="layui-input">-->
                <!--                    </div>-->
                <!--                </div>-->
                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">开始排: </label>
                    <div class="layui-input-block">
                        <input type="number" min="1" class="layui-input" name="rowBeg" placeholder="请输入开始排" lay-vertype="tips" lay-verify="required" required="">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">结束排: </label>
                    <div class="layui-input-block">
                        <input type="number" min="1" class="layui-input" name="rowEnd" placeholder="请输入结束排" lay-vertype="tips" lay-verify="required" required="">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">开始列: </label>
                    <div class="layui-input-block">
                        <input type="number" min="1" class="layui-input" name="bayBeg" placeholder="请输入开始列" lay-vertype="tips" lay-verify="required" required="">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">结束列: </label>
                    <div class="layui-input-block">
                        <input type="number" min="1" class="layui-input" name="bayEnd" placeholder="请输入结束列" lay-vertype="tips" lay-verify="required" required="">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">开始层: </label>
                    <div class="layui-input-block">
                        <input type="number" min="1" class="layui-input" name="levBeg" placeholder="请输入开始层" lay-vertype="tips" lay-verify="required" required="">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">结束层: </label>
                    <div class="layui-input-block">
                        <input type="number" min="1" class="layui-input" name="levEnd" placeholder="请输入结束层" lay-vertype="tips" lay-verify="required" required="">
                    </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>