自动化立体仓库 - WMS系统
1
zhang
11 小时以前 42ba7926de5f21a2856e4c7b9c5ce148413b6cbe
1
6个文件已修改
6个文件已添加
1996 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/OrderController.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/mapper/OrderMapper.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/OrderService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/OrderServiceImpl.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/task/OrderSyncScheduler.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/OrderMapper.xml 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/order/outReturn.js 458 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/order/outUQ.js 458 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/orderTableReturn.js 174 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/orderTableUQ.js 174 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/order/outReturn.html 321 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/order/outUQ.html 321 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/OrderController.java
@@ -10,7 +10,6 @@
import com.core.exception.CoolException;
import com.zy.asrs.entity.*;
import com.zy.asrs.entity.param.OrderDomainParam;
import com.zy.asrs.entity.result.WrkTraceVo;
import com.zy.asrs.importexcle.ImportOrderDto;
import com.zy.asrs.importexcle.ImportOrderListener;
@@ -132,6 +131,33 @@
        return R.ok().add(orders);
    }
    @RequestMapping(value = "/order/nav/listReturn/auth")
    @ManagerAuth
    public R navListReturn(@RequestParam(required = false) String orderNo) {
        EntityWrapper<Order> wrapper = new EntityWrapper<>();
        if (!Cools.isEmpty(orderNo)) {
            wrapper.like("order_no", orderNo);
        }
        wrapper.le("settle", 2).eq("status", 0).eq("doc_type", 26);
        wrapper.orderBy("create_time", false);
        List<Order> orders = orderService.selectList(wrapper);
        return R.ok().add(orders);
    }
    @RequestMapping(value = "/order/nav/listUQ/auth")
    @ManagerAuth
    public R navListUQ(@RequestParam(required = false) String orderNo) {
        EntityWrapper<Order> wrapper = new EntityWrapper<>();
        if (!Cools.isEmpty(orderNo)) {
            wrapper.like("order_no", orderNo);
        }
        wrapper.le("settle", 2).eq("status", 0).eq("doc_type", 27);
        wrapper.orderBy("create_time", false);
        List<Order> orders = orderService.selectList(wrapper);
        return R.ok().add(orders);
    }
    @RequestMapping(value = "/order/head/page/auth")
    @ManagerAuth
    public R head(@RequestParam(defaultValue = "1")Integer curr,
@@ -142,7 +168,9 @@
        EntityWrapper<Order> wrapper = new EntityWrapper<>();
        excludeTrash(param);
        convert(param, wrapper);
        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} else {
        if (!Cools.isEmpty(orderByField)) {
            wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));
        } else {
            wrapper.orderBy("settle").orderBy("create_time", false);
        }
        wrapper.eq("status", 1);
@@ -384,7 +412,9 @@
        EntityWrapper<Order> wrapper = new EntityWrapper<>();
        excludeTrash(param);
        convert(param, wrapper);
        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
        if (!Cools.isEmpty(orderByField)) {
            wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));
        }
        return R.ok(orderService.selectPage(new Page<>(curr, limit), wrapper));
    }
src/main/java/com/zy/asrs/mapper/OrderMapper.java
@@ -17,6 +17,10 @@
    List<Order> selectComplete();
    List<Order> selectComplete2();
    List<Order> selectComplete3();
    int addToLogTable(Order order);
    List<Order> selectorderNoL(@Param("orderNo")String orderNo);
src/main/java/com/zy/asrs/service/OrderService.java
@@ -24,6 +24,10 @@
    List<Order> selectComplete();
    List<Order> selectComplete2();
    List<Order> selectComplete3();
    boolean addToLogTable(Order order);
    List<Order> selectorderNoL(String orderNo);
src/main/java/com/zy/asrs/service/impl/OrderServiceImpl.java
@@ -166,6 +166,16 @@
    }
    @Override
    public List<Order> selectComplete2() {
        return this.baseMapper.selectComplete2();
    }
    @Override
    public List<Order> selectComplete3() {
        return this.baseMapper.selectComplete3();
    }
    @Override
    public boolean addToLogTable(Order order) {
        return this.baseMapper.addToLogTable(order) > 0;
    }
src/main/java/com/zy/asrs/task/OrderSyncScheduler.java
@@ -74,15 +74,14 @@
    }
    @Scheduled(cron = "0/9 * * * * ? ")
    @Async("orderThreadPool")
    //@Scheduled(cron = "0/9 * * * * ? ")
    //@Async("orderThreadPool")
    public void completeAndReport2() {
        Config config = configMapper.selectConfigByCode("RETURN_REPORT");
        if (config == null || config.getStatus() == 0 || Cools.isEmpty(config.getValue())) {
            return;
        }
        List<Order> orders = orderService.selectComplete();
        List<Order> orders = orderService.selectComplete2();
        for (Order order : orders) {
            try {
                ReturnT<String> result = orderSyncHandler.start(order);
@@ -94,7 +93,18 @@
                log.error("订单" + order + "处理失败,异常信息:" + e);
            }
        }
        orders = orderService.selectComplete3();
        for (Order order : orders) {
            try {
                ReturnT<String> result = orderSyncHandler.start(order);
                if (!result.isSuccess()) {
                    log.error("单据[orderNo={}]上报erp失败", order.getOrderNo());
                }
            } catch (Exception e) {
                log.error("单据[orderNo={}]上报erp失败", order.getOrderNo());
                log.error("订单" + order + "处理失败,异常信息:" + e);
            }
        }
    }
src/main/resources/mapper/OrderMapper.xml
@@ -101,6 +101,22 @@
            mo.create_time asc
    </select>
    <select id="selectComplete3" resultMap="BaseResultMap">
        select
            top 5 mo.*
        from
            man_order mo
                inner join man_doc_type mt on
                mo.doc_type = mt.doc_id
        where
            mt.pakout = 1
          and mo.settle = 5
          and mo.status = 1
          and mo.doc_type = 27
        order by
            mo.create_time asc
    </select>
    <insert id="addToLogTable">
        INSERT INTO man_order_log SELECT * FROM man_order WHERE id = #{id}
    </insert>
src/main/webapp/static/js/order/outReturn.js
New file
@@ -0,0 +1,458 @@
var pageCurr;
var insTb2;
layui.config({
    base: baseUrl + "/static/layui/lay/modules/"
}).extend({
    notice: 'notice/notice',
}).use(['table','laydate', 'form', 'util', 'admin', 'notice', 'treeTable', 'xmSelect', 'tableMerge', 'tableX'], function(){
    var table = layui.table;
    var $ = layui.jquery;
    var layer = layui.layer;
    var layDate = layui.laydate;
    var form = layui.form;
    var admin = layui.admin;
    var util = layui.util;
    var notice = layui.notice;
    var treeTable = layui.treeTable;
    var xmSelect = layui.xmSelect;
    var tableMerge = layui.tableMerge;
    var tableX = layui.tableX;
    insTb2 = table.render({
        elem: '#orderDetlTable',
        headers: {token: localStorage.getItem('token')},
        url: baseUrl+'/orderDetl/pakout/list/auth',
        page: true,
        limit: 15,
        limits: [15, 30, 50, 100, 200, 500],
        toolbar: '#orderDetToolbar',
        height: 'full-120',
        where: {order_id: 9999999999},
        cols: [[
            {type: 'checkbox'}
            ,{type: 'numbers', title: '#'}
            ,{field: 'orderNo', align: 'center',title: '正常退库单号', templet: '#orderNoTpl', width: 160}
            // ,{field: 'matnr', align: 'center',title: '规格', width: 160}
            // ,{field: 'maktx', align: 'center',title: '商品名称', width: 200}
            // ,{field: 'batch', align: 'center',title: '箱号'}
            // ,{field: 'specs', align: 'center',title: '接头'}
            // ,{field: 'anfme', align: 'center',title: '数量'}
            ,{field: 'brand', align: 'center',title: '包装组号'}
            ,{field: 'model', align: 'center',title: '卷号'}
            // ,{field: 'supp', align: 'center',title: '客户名称', hide: false}
            // ,{field: 'memo', align: 'center',title: '备注', hide: false}
            // ,{field: 'qty', align: 'center',title: '作业数量', style: 'font-weight: bold'}
            // ,{field: 'enableQty', align: 'center',title: '待出数量', style: 'font-weight: bold'}
            // ,{field: 'finishStatus', align: 'center', title: '是否完成', templet: function(d){
            //         if (d.qty === 0 && d.enableQty === 0) {
            //             return '<span style="color:green;font-weight:bold;">完成</span>';
            //         } else {
            //             return '<span style="color:red;">未完成</span>';
            //         }
            //     }}
            // ,{field: 'name', align: 'center',title: '名称'}
            // ,{field: 'unit', align: 'center',title: '单位', hide: true}
            // ,{field: 'barcode', align: 'center',title: '商品条码', hide: true}
            // ,{field: 'supplier', align: 'center',title: '供应商'}
            // ,{field: 'unitPrice', align: 'center',title: '单价'}
            // ,{field: 'itemNum', align: 'center',title: '品项数'}
            // ,{field: 'count', align: 'center',title: '数量'}
            // ,{field: 'weight', align: 'center',title: '重量'}
            // ,{field: 'status$', align: 'center',title: '状态'}
            // ,{field: 'createBy$', align: 'center',title: '添加人员'}
            // ,{field: 'createTime$', align: 'center',title: '添加时间'}
            // ,{field: 'updateBy$', align: 'center',title: '修改人员'}
            // ,{field: 'updateTime$', align: 'center',title: '修改时间'}
            // ,{field: 'memo', align: 'center',title: '备注'}
            ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width: 160}
        ]],
        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();
        }
    });
    /* 表格2搜索 */
    form.on('submit(sensorTbSearch)', function (data) {
        insTb2.reload({where: data.field, page: {curr: 1}});
        return false;
    });
    /* 表格2头工具栏点击事件 */
    table.on('toolbar(orderDetlTable)', function (obj) {
        var checkStatus = table.checkStatus(obj.config.id).data;
        if (obj.event === 'pakoutPreview') { // 添加
            if (checkStatus.length === 0) {
                layer.msg('请选择至少一条出库明细', {icon: 2});
                return;
            }
            pakoutPreview(checkStatus.map(function (d) {
                return d.id;
            }));
        } else if (obj.event === 'del') { // 删除
            var checkRows = table.checkStatus('sensorTable');
            if (checkRows.data.length === 0) {
                layer.msg('请选择要删除的数据', {icon: 2});
                return;
            }
            var ids = checkRows.data.map(function (d) {
                return d.id;
            });
            doDelSensor({ids: ids});
        }
    });
    /* 表格2工具条点击事件 */
    table.on('tool(orderDetlTable)', function (obj) {
        console.log(obj);
        var data = obj.data;
        switch (obj.event) {
            // 出库
            case 'pakoutPreview':
                pakoutPreview([data.id])
                break;
        }
    });
    function pakoutPreview(ids) {
        let loadIndex = layer.load(2);
        $.ajax({
            url: baseUrl + "/out/pakout/preview/auth",
            headers: {'token': localStorage.getItem('token')},
            contentType: 'application/json;charset=UTF-8',
            data: JSON.stringify(ids),
            method: 'POST',
            success: function (res) {
                layer.close(loadIndex);
                var tableCache;
                if (res.code === 200){
                    layer.open({
                        type: 1
                        ,title: false
                        ,closeBtn: false
                        ,offset: '50px'
                        ,area: ['1500px', '700px']
                        ,shade: 0.5
                        ,shadeClose: false
                        ,btn: ['立即出库', '稍后处理']
                        ,btnAlign: 'c'
                        ,moveType: 1 //拖拽模式,0或者1
                        ,content: $('#pakoutPreviewBox').html()
                        ,success: function(layero, index){
                            stoPreTabIdx = table.render({
                                elem: '#stoPreTab',
                                data: res.data,
                                height: 520,
                                page: false,
                                limit: Number.MAX_VALUE,
                                cellMinWidth: 100,
                                cols: [[
                                    {field: 'orderNo', title: '单据编号', merge: true, align: 'center'},
                                    // {type: 'checkbox', merge: ['brand'],width: 100},
                                    // {field: 'title', title: '商品', merge: true, align: 'center', width: 350},
                                    {field: 'unit', title: '箱号', align: 'center',hide:false},
                                    {field: 'model', title: '卷号', align: 'center', hide: false},
                                    {
                                        field: 'threeCode',
                                        align: 'center',
                                        title: '合格否',
                                        hide: false,
                                        templet: function(d) {
                                            return d.threeCode ? d.threeCode : '待判';
                                        }
                                    },
                                    // {field: 'specs', title: '接头', align: 'center'},
                                    {field: 'brand', align: 'center',title: '包装组号', merge: true, hide: false},
                                    // {field: 'brand$', align: 'center',title: '木箱类型', hide: false},
                                    // {field: 'zpallet', title: '托盘码', align: 'center'},
                                    // {field: 'anfme', title: '数量', align: 'center', width: 90, style: 'font-weight: bold'},
                                    // {field: 'count', title: '数量', align: 'center', width: 90, style: 'font-weight: bold'},
                                    {field: 'locNo', title: '货位', align: 'center', width: 100, templet: '#locNoTpl'},
                                    {field: 'staNos', align: 'center', title: '出库站', merge: ['locNo'], templet: '#tbBasicTbStaNos'},
                                    // {type: 'checkbox', merge: ['locNo']},
                                ]],
                                done: function (res) {
                                    tableMerge.render(this);
                                    $('.layui-table-body.layui-table-main').css("overflow", "auto");
                                    tableCache = tableData = table.cache.stoPreTab;
                                }
                            });
                            // 修改出库站
                            form.on('select(tbBasicTbStaNos)', function (obj) {
                                let index  = obj.othis.parents('tr').attr("data-index");
                                let data = tableCache[index];
                                for (let i = 0; i<tableCache.length; i++) {
                                    if (tableCache[i].locNo === data.locNo) {
                                        tableCache[i]['staNo'] = Number(obj.elem.value);
                                    }
                                }
                                obj.othis.children().find("input").css("color", "blue");
                                return false;
                            });
                            // 批量修改出库站
                            form.on('submit(batchModifySta)', function () {
                                let stoPreTabData = layui.table.checkStatus('stoPreTab').data;
                                if (stoPreTabData.length < 1) {
                                    layer.msg("请至少选择一条以上合并数据", {icon: 7});
                                    return false;
                                }
                                modifySta(stoPreTabData);
                            });
                            form.on('submit(checkModifySta)', function () {
                                if (!tableCache || tableCache.length === 0) {
                                    layer.msg("没有可处理的数据", {icon: 7});
                                    return false;
                                }
                                let updatedRows = [];
                                for (let i = 0; i < tableCache.length; i++) {
                                    let row = tableCache[i];
                                    let locNo = row.locNo;
                                    if (!locNo || locNo.length < 2) continue;
                                    let rowPrefix = parseInt(locNo.substring(0, 2), 10);
                                    let newStaNo;
                                    if (rowPrefix >= 17 && rowPrefix <= 24) {
                                        newStaNo = 3092;
                                    } else if (rowPrefix >= 9 && rowPrefix <= 16) {
                                        newStaNo = 3102;
                                    } else if (rowPrefix >= 1 && rowPrefix <= 8) {
                                        newStaNo = 3095;
                                    }
                                    if (newStaNo) {
                                        row.staNo = newStaNo;
                                        updatedRows.push({index: i, staNo: newStaNo});
                                    }
                                }
                                // 重载表格数据
                                stoPreTabIdx.reload({data: tableCache});
                                // 更新下拉框颜色和值
                                updatedRows.forEach(item => {
                                    $('div[lay-id=stoPreTab] tr[data-index="' + item.index + '"] .order-sta-select').val(item.staNo);
                                });
                                layui.form.render('select');
                                updatedRows.forEach(item => {
                                    $('div[lay-id=stoPreTab] tr[data-index="' + item.index + '"] .layui-select-title input').css("color", "blue");
                                });
                                layer.msg("出库站点均分已完成", {icon: 1});
                                return false;
                            });
                            // 批量修改出库站 - 站点选择
                            function modifySta(stoPreTabData) {
                                // 出库站取交集
                                let staBatchSelectVal = [];
                                for(let i = 0; i<stoPreTabData.length; i++) {
                                    let staNos = stoPreTabData[i].staNos;
                                    if (staNos !== null) {
                                        if (staBatchSelectVal.length === 0) {
                                            staBatchSelectVal = staNos;
                                        } else {
                                            staBatchSelectVal = staBatchSelectVal.filter(val =>
                                                {
                                                    return new Set(staNos).has(val)
                                                }
                                            )
                                        }
                                    }
                                }
                                if (staBatchSelectVal.length === 0) {
                                    layer.msg("出库站没有交集,无法批量修改", {icon: 2});
                                    return;
                                }
                                admin.open({
                                    type: 1,
                                    area: '300px',
                                    offset: 'auto',
                                    title: '请选择站点',
                                    content: $('#staBatchSelectDialog').html(),
                                    success: function (layero, ddIndex) {
                                        // 渲染下拉框
                                        let template = Handlebars.compile($('#batchStaSelectTpl').html());
                                        $('#batchSelectStaBox').html(template({list: staBatchSelectVal}));
                                        // 确认
                                        form.on('submit(staBatchSelectConfirm)', function (obj) {
                                            let loadIdx = layer.load(2);
                                            let batchSta = Number(obj.field.batchSta);
                                            let arr = [];
                                            for (let j = 0; j<stoPreTabData.length; j++) {
                                                for (let i = 0; i<tableCache.length; i++) {
                                                    if (tableCache[i].orderNo === stoPreTabData[j].orderNo
                                                        && tableCache[i].matnr === stoPreTabData[j].matnr
                                                        && tableCache[i].locNo === stoPreTabData[j].locNo) {
                                                        tableCache[i]['staNo'] = batchSta;
                                                        arr.push(i);
                                                    }
                                                }
                                            }
                                            stoPreTabIdx.reload({data: tableCache});
                                            arr.forEach(item => {
                                                $('div[lay-id=stoPreTab] tr[data-index="' + item + '"] .order-sta-select').val(batchSta);
                                            });
                                            layui.form.render('select');
                                            arr.forEach(item => {
                                                $('div[lay-id=stoPreTab] tr[data-index="' + item + '"] .layui-select-title').find("input").css("color", "blue");
                                            });
                                            layer.close(loadIdx); layer.close(ddIndex);
                                            return false;
                                        });
                                        // 弹窗不出现滚动条
                                        $(layero).children('.layui-layer-content').css('overflow', 'visible');
                                        layui.form.render('select');
                                    },
                                })
                            }
                        }
                        ,yes: function(index, layero){
                            //按钮【立即出库】的回调
                            pakout(tableCache, index);
                        }
                        ,btn2: function(index, layero){
                            //按钮【稍后处理】的回调
                            layer.close(index)
                            //return false 开启该代码可禁止点击该按钮关闭
                        }
                    });
                } else if (res.code === 403){
                    top.location.href = baseUrl+"/";
                } else {
                    layer.msg(res.msg, {icon: 2})
                }
            }
        })
    }
    function pakout(tableCache, layerIndex) {
        // let loadIndex = layer.load(2);
        notice.msg('正在生成出库任务......', {icon: 4});
        $.ajax({
            url: baseUrl + "/out/pakout/auth",
            headers: {'token': localStorage.getItem('token')},
            contentType: 'application/json;charset=UTF-8',
            data: JSON.stringify(tableCache),
            method: 'POST',
            success: function (res) {
                notice.destroy();
                if (res.code === 200) {
                    layer.close(layerIndex);
                    layer.msg(res.msg, {icon: 1});
                    insTb.reload({where: null});
                    insTb2.reload({where: null, page: {curr: 1}});
                } else if (res.code === 403) {
                    top.location.href = baseUrl + "/";
                } else {
                    layer.msg(res.msg, {icon: 2})
                }
            }
        });
    }
    /* 删除订单 */
    function doDelSensor(obj) {
        layer.confirm('确定要删除选中数据吗?', {
            skin: 'layui-layer-admin',
            shade: .1
        }, function (i) {
            layer.close(i);
            var loadIndex = layer.load(2);
            $.ajax({
                url: baseUrl+"/sensor/delete/auth",
                headers: {'token': localStorage.getItem('token')},
                data: {ids: obj.ids},
                method: 'POST',
                success: function (res) {
                    layer.close(loadIndex);
                    if (res.code === 200){
                        layer.msg(res.msg, {icon: 1});
                        $(".layui-laypage-btn")[0].click();
                    } else if (res.code === 403){
                        top.location.href = baseUrl+"/";
                    }else {
                        layer.msg(res.msg, {icon: 2});
                    }
                }
            })
        });
    }
    // 修改状态
    form.on('switch(statusSwitch)', function (obj) {
        var index  = obj.othis.parents('tr').attr("data-index");
        var data = tableData[index];
        data[this.name] = obj.elem.checked?1:0;
        http.post(baseUrl+"/sensor/edit/auth", {id: data.id, status: data[this.name]}, function (res) {
            layer.msg(res.msg, {icon: 1});
        })
    })
    window.pakoutPreview = pakoutPreview;
});
function tableReload(child) {
    var searchData = {};
    $.each($('#search-box [name]').serializeArray(), function() {
        searchData[this.name] = this.value;
    });
    (child ? parent.tableIns : tableIns).reload({
        where: searchData,
        page: {
            curr: pageCurr
        }
    });
}
/**
 * 一键出库
 */
function autoOut(orderId) {
    let loadIndex = layer.msg('请求中...', {icon: 16, shade: 0.01, time: false});
    $.ajax({
        url: baseUrl + "/out/pakout/orderDetlIds/auth",
        headers: {'token': localStorage.getItem('token')},
        data: { orderId : orderId },
        method: 'POST',
        success: function (res) {
            layer.close(loadIndex);
            if (res.code === 200){
                pakoutPreview(res.data);
            } else if (res.code === 403){
                top.location.href = baseUrl+"/";
            } else {
                layer.msg(res.msg, {icon: 2});
            }
        }
    })
}
src/main/webapp/static/js/order/outUQ.js
New file
@@ -0,0 +1,458 @@
var pageCurr;
var insTb2;
layui.config({
    base: baseUrl + "/static/layui/lay/modules/"
}).extend({
    notice: 'notice/notice',
}).use(['table','laydate', 'form', 'util', 'admin', 'notice', 'treeTable', 'xmSelect', 'tableMerge', 'tableX'], function(){
    var table = layui.table;
    var $ = layui.jquery;
    var layer = layui.layer;
    var layDate = layui.laydate;
    var form = layui.form;
    var admin = layui.admin;
    var util = layui.util;
    var notice = layui.notice;
    var treeTable = layui.treeTable;
    var xmSelect = layui.xmSelect;
    var tableMerge = layui.tableMerge;
    var tableX = layui.tableX;
    insTb2 = table.render({
        elem: '#orderDetlTable',
        headers: {token: localStorage.getItem('token')},
        url: baseUrl+'/orderDetl/pakout/list/auth',
        page: true,
        limit: 15,
        limits: [15, 30, 50, 100, 200, 500],
        toolbar: '#orderDetToolbar',
        height: 'full-120',
        where: {order_id: 9999999999},
        cols: [[
            {type: 'checkbox'}
            ,{type: 'numbers', title: '#'}
            ,{field: 'orderNo', align: 'center',title: '不合格退库单号', templet: '#orderNoTpl', width: 160}
            // ,{field: 'matnr', align: 'center',title: '规格', width: 160}
            // ,{field: 'maktx', align: 'center',title: '商品名称', width: 200}
            // ,{field: 'batch', align: 'center',title: '箱号'}
            // ,{field: 'specs', align: 'center',title: '接头'}
            // ,{field: 'anfme', align: 'center',title: '数量'}
            ,{field: 'brand', align: 'center',title: '包装组号'}
            ,{field: 'model', align: 'center',title: '卷号'}
            // ,{field: 'supp', align: 'center',title: '客户名称', hide: false}
            // ,{field: 'memo', align: 'center',title: '备注', hide: false}
            // ,{field: 'qty', align: 'center',title: '作业数量', style: 'font-weight: bold'}
            // ,{field: 'enableQty', align: 'center',title: '待出数量', style: 'font-weight: bold'}
            // ,{field: 'finishStatus', align: 'center', title: '是否完成', templet: function(d){
            //         if (d.qty === 0 && d.enableQty === 0) {
            //             return '<span style="color:green;font-weight:bold;">完成</span>';
            //         } else {
            //             return '<span style="color:red;">未完成</span>';
            //         }
            //     }}
            // ,{field: 'name', align: 'center',title: '名称'}
            // ,{field: 'unit', align: 'center',title: '单位', hide: true}
            // ,{field: 'barcode', align: 'center',title: '商品条码', hide: true}
            // ,{field: 'supplier', align: 'center',title: '供应商'}
            // ,{field: 'unitPrice', align: 'center',title: '单价'}
            // ,{field: 'itemNum', align: 'center',title: '品项数'}
            // ,{field: 'count', align: 'center',title: '数量'}
            // ,{field: 'weight', align: 'center',title: '重量'}
            // ,{field: 'status$', align: 'center',title: '状态'}
            // ,{field: 'createBy$', align: 'center',title: '添加人员'}
            // ,{field: 'createTime$', align: 'center',title: '添加时间'}
            // ,{field: 'updateBy$', align: 'center',title: '修改人员'}
            // ,{field: 'updateTime$', align: 'center',title: '修改时间'}
            // ,{field: 'memo', align: 'center',title: '备注'}
            ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width: 160}
        ]],
        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();
        }
    });
    /* 表格2搜索 */
    form.on('submit(sensorTbSearch)', function (data) {
        insTb2.reload({where: data.field, page: {curr: 1}});
        return false;
    });
    /* 表格2头工具栏点击事件 */
    table.on('toolbar(orderDetlTable)', function (obj) {
        var checkStatus = table.checkStatus(obj.config.id).data;
        if (obj.event === 'pakoutPreview') { // 添加
            if (checkStatus.length === 0) {
                layer.msg('请选择至少一条出库明细', {icon: 2});
                return;
            }
            pakoutPreview(checkStatus.map(function (d) {
                return d.id;
            }));
        } else if (obj.event === 'del') { // 删除
            var checkRows = table.checkStatus('sensorTable');
            if (checkRows.data.length === 0) {
                layer.msg('请选择要删除的数据', {icon: 2});
                return;
            }
            var ids = checkRows.data.map(function (d) {
                return d.id;
            });
            doDelSensor({ids: ids});
        }
    });
    /* 表格2工具条点击事件 */
    table.on('tool(orderDetlTable)', function (obj) {
        console.log(obj);
        var data = obj.data;
        switch (obj.event) {
            // 出库
            case 'pakoutPreview':
                pakoutPreview([data.id])
                break;
        }
    });
    function pakoutPreview(ids) {
        let loadIndex = layer.load(2);
        $.ajax({
            url: baseUrl + "/out/pakout/preview/auth",
            headers: {'token': localStorage.getItem('token')},
            contentType: 'application/json;charset=UTF-8',
            data: JSON.stringify(ids),
            method: 'POST',
            success: function (res) {
                layer.close(loadIndex);
                var tableCache;
                if (res.code === 200){
                    layer.open({
                        type: 1
                        ,title: false
                        ,closeBtn: false
                        ,offset: '50px'
                        ,area: ['1500px', '700px']
                        ,shade: 0.5
                        ,shadeClose: false
                        ,btn: ['立即出库', '稍后处理']
                        ,btnAlign: 'c'
                        ,moveType: 1 //拖拽模式,0或者1
                        ,content: $('#pakoutPreviewBox').html()
                        ,success: function(layero, index){
                            stoPreTabIdx = table.render({
                                elem: '#stoPreTab',
                                data: res.data,
                                height: 520,
                                page: false,
                                limit: Number.MAX_VALUE,
                                cellMinWidth: 100,
                                cols: [[
                                    {field: 'orderNo', title: '单据编号', merge: true, align: 'center'},
                                    // {type: 'checkbox', merge: ['brand'],width: 100},
                                    // {field: 'title', title: '商品', merge: true, align: 'center', width: 350},
                                    {field: 'unit', title: '箱号', align: 'center',hide:false},
                                    {field: 'model', title: '卷号', align: 'center', hide: false},
                                    {
                                        field: 'threeCode',
                                        align: 'center',
                                        title: '合格否',
                                        hide: false,
                                        templet: function(d) {
                                            return d.threeCode ? d.threeCode : '待判';
                                        }
                                    },
                                    // {field: 'specs', title: '接头', align: 'center'},
                                    {field: 'brand', align: 'center',title: '包装组号', merge: true, hide: false},
                                    // {field: 'brand$', align: 'center',title: '木箱类型', hide: false},
                                    // {field: 'zpallet', title: '托盘码', align: 'center'},
                                    // {field: 'anfme', title: '数量', align: 'center', width: 90, style: 'font-weight: bold'},
                                    // {field: 'count', title: '数量', align: 'center', width: 90, style: 'font-weight: bold'},
                                    {field: 'locNo', title: '货位', align: 'center', width: 100, templet: '#locNoTpl'},
                                    {field: 'staNos', align: 'center', title: '出库站', merge: ['locNo'], templet: '#tbBasicTbStaNos'},
                                    // {type: 'checkbox', merge: ['locNo']},
                                ]],
                                done: function (res) {
                                    tableMerge.render(this);
                                    $('.layui-table-body.layui-table-main').css("overflow", "auto");
                                    tableCache = tableData = table.cache.stoPreTab;
                                }
                            });
                            // 修改出库站
                            form.on('select(tbBasicTbStaNos)', function (obj) {
                                let index  = obj.othis.parents('tr').attr("data-index");
                                let data = tableCache[index];
                                for (let i = 0; i<tableCache.length; i++) {
                                    if (tableCache[i].locNo === data.locNo) {
                                        tableCache[i]['staNo'] = Number(obj.elem.value);
                                    }
                                }
                                obj.othis.children().find("input").css("color", "blue");
                                return false;
                            });
                            // 批量修改出库站
                            form.on('submit(batchModifySta)', function () {
                                let stoPreTabData = layui.table.checkStatus('stoPreTab').data;
                                if (stoPreTabData.length < 1) {
                                    layer.msg("请至少选择一条以上合并数据", {icon: 7});
                                    return false;
                                }
                                modifySta(stoPreTabData);
                            });
                            form.on('submit(checkModifySta)', function () {
                                if (!tableCache || tableCache.length === 0) {
                                    layer.msg("没有可处理的数据", {icon: 7});
                                    return false;
                                }
                                let updatedRows = [];
                                for (let i = 0; i < tableCache.length; i++) {
                                    let row = tableCache[i];
                                    let locNo = row.locNo;
                                    if (!locNo || locNo.length < 2) continue;
                                    let rowPrefix = parseInt(locNo.substring(0, 2), 10);
                                    let newStaNo;
                                    if (rowPrefix >= 17 && rowPrefix <= 24) {
                                        newStaNo = 3092;
                                    } else if (rowPrefix >= 9 && rowPrefix <= 16) {
                                        newStaNo = 3102;
                                    } else if (rowPrefix >= 1 && rowPrefix <= 8) {
                                        newStaNo = 3095;
                                    }
                                    if (newStaNo) {
                                        row.staNo = newStaNo;
                                        updatedRows.push({index: i, staNo: newStaNo});
                                    }
                                }
                                // 重载表格数据
                                stoPreTabIdx.reload({data: tableCache});
                                // 更新下拉框颜色和值
                                updatedRows.forEach(item => {
                                    $('div[lay-id=stoPreTab] tr[data-index="' + item.index + '"] .order-sta-select').val(item.staNo);
                                });
                                layui.form.render('select');
                                updatedRows.forEach(item => {
                                    $('div[lay-id=stoPreTab] tr[data-index="' + item.index + '"] .layui-select-title input').css("color", "blue");
                                });
                                layer.msg("出库站点均分已完成", {icon: 1});
                                return false;
                            });
                            // 批量修改出库站 - 站点选择
                            function modifySta(stoPreTabData) {
                                // 出库站取交集
                                let staBatchSelectVal = [];
                                for(let i = 0; i<stoPreTabData.length; i++) {
                                    let staNos = stoPreTabData[i].staNos;
                                    if (staNos !== null) {
                                        if (staBatchSelectVal.length === 0) {
                                            staBatchSelectVal = staNos;
                                        } else {
                                            staBatchSelectVal = staBatchSelectVal.filter(val =>
                                                {
                                                    return new Set(staNos).has(val)
                                                }
                                            )
                                        }
                                    }
                                }
                                if (staBatchSelectVal.length === 0) {
                                    layer.msg("出库站没有交集,无法批量修改", {icon: 2});
                                    return;
                                }
                                admin.open({
                                    type: 1,
                                    area: '300px',
                                    offset: 'auto',
                                    title: '请选择站点',
                                    content: $('#staBatchSelectDialog').html(),
                                    success: function (layero, ddIndex) {
                                        // 渲染下拉框
                                        let template = Handlebars.compile($('#batchStaSelectTpl').html());
                                        $('#batchSelectStaBox').html(template({list: staBatchSelectVal}));
                                        // 确认
                                        form.on('submit(staBatchSelectConfirm)', function (obj) {
                                            let loadIdx = layer.load(2);
                                            let batchSta = Number(obj.field.batchSta);
                                            let arr = [];
                                            for (let j = 0; j<stoPreTabData.length; j++) {
                                                for (let i = 0; i<tableCache.length; i++) {
                                                    if (tableCache[i].orderNo === stoPreTabData[j].orderNo
                                                        && tableCache[i].matnr === stoPreTabData[j].matnr
                                                        && tableCache[i].locNo === stoPreTabData[j].locNo) {
                                                        tableCache[i]['staNo'] = batchSta;
                                                        arr.push(i);
                                                    }
                                                }
                                            }
                                            stoPreTabIdx.reload({data: tableCache});
                                            arr.forEach(item => {
                                                $('div[lay-id=stoPreTab] tr[data-index="' + item + '"] .order-sta-select').val(batchSta);
                                            });
                                            layui.form.render('select');
                                            arr.forEach(item => {
                                                $('div[lay-id=stoPreTab] tr[data-index="' + item + '"] .layui-select-title').find("input").css("color", "blue");
                                            });
                                            layer.close(loadIdx); layer.close(ddIndex);
                                            return false;
                                        });
                                        // 弹窗不出现滚动条
                                        $(layero).children('.layui-layer-content').css('overflow', 'visible');
                                        layui.form.render('select');
                                    },
                                })
                            }
                        }
                        ,yes: function(index, layero){
                            //按钮【立即出库】的回调
                            pakout(tableCache, index);
                        }
                        ,btn2: function(index, layero){
                            //按钮【稍后处理】的回调
                            layer.close(index)
                            //return false 开启该代码可禁止点击该按钮关闭
                        }
                    });
                } else if (res.code === 403){
                    top.location.href = baseUrl+"/";
                } else {
                    layer.msg(res.msg, {icon: 2})
                }
            }
        })
    }
    function pakout(tableCache, layerIndex) {
        // let loadIndex = layer.load(2);
        notice.msg('正在生成出库任务......', {icon: 4});
        $.ajax({
            url: baseUrl + "/out/pakout/auth",
            headers: {'token': localStorage.getItem('token')},
            contentType: 'application/json;charset=UTF-8',
            data: JSON.stringify(tableCache),
            method: 'POST',
            success: function (res) {
                notice.destroy();
                if (res.code === 200) {
                    layer.close(layerIndex);
                    layer.msg(res.msg, {icon: 1});
                    insTb.reload({where: null});
                    insTb2.reload({where: null, page: {curr: 1}});
                } else if (res.code === 403) {
                    top.location.href = baseUrl + "/";
                } else {
                    layer.msg(res.msg, {icon: 2})
                }
            }
        });
    }
    /* 删除订单 */
    function doDelSensor(obj) {
        layer.confirm('确定要删除选中数据吗?', {
            skin: 'layui-layer-admin',
            shade: .1
        }, function (i) {
            layer.close(i);
            var loadIndex = layer.load(2);
            $.ajax({
                url: baseUrl+"/sensor/delete/auth",
                headers: {'token': localStorage.getItem('token')},
                data: {ids: obj.ids},
                method: 'POST',
                success: function (res) {
                    layer.close(loadIndex);
                    if (res.code === 200){
                        layer.msg(res.msg, {icon: 1});
                        $(".layui-laypage-btn")[0].click();
                    } else if (res.code === 403){
                        top.location.href = baseUrl+"/";
                    }else {
                        layer.msg(res.msg, {icon: 2});
                    }
                }
            })
        });
    }
    // 修改状态
    form.on('switch(statusSwitch)', function (obj) {
        var index  = obj.othis.parents('tr').attr("data-index");
        var data = tableData[index];
        data[this.name] = obj.elem.checked?1:0;
        http.post(baseUrl+"/sensor/edit/auth", {id: data.id, status: data[this.name]}, function (res) {
            layer.msg(res.msg, {icon: 1});
        })
    })
    window.pakoutPreview = pakoutPreview;
});
function tableReload(child) {
    var searchData = {};
    $.each($('#search-box [name]').serializeArray(), function() {
        searchData[this.name] = this.value;
    });
    (child ? parent.tableIns : tableIns).reload({
        where: searchData,
        page: {
            curr: pageCurr
        }
    });
}
/**
 * 一键出库
 */
function autoOut(orderId) {
    let loadIndex = layer.msg('请求中...', {icon: 16, shade: 0.01, time: false});
    $.ajax({
        url: baseUrl + "/out/pakout/orderDetlIds/auth",
        headers: {'token': localStorage.getItem('token')},
        data: { orderId : orderId },
        method: 'POST',
        success: function (res) {
            layer.close(loadIndex);
            if (res.code === 200){
                pakoutPreview(res.data);
            } else if (res.code === 403){
                top.location.href = baseUrl+"/";
            } else {
                layer.msg(res.msg, {icon: 2});
            }
        }
    })
}
src/main/webapp/static/js/orderTableReturn.js
New file
@@ -0,0 +1,174 @@
var insTb;
layui.config({
    base: baseUrl + "/static/layui/lay/modules/"  // 配置模块所在的目录
}).use(['table','laydate', 'form',  'admin', 'tableX'], function() {
    var table = layui.table;
    var $ = layui.jquery;
    var layer = layui.layer;
    var layDate = layui.laydate;
    var form = layui.form;
    var admin = layui.admin;
    var tableX = layui.tableX;
    /****************************************** 左边表 *************************************************/
    insTb = table.render({
        elem: '#originTable',
        url: baseUrl + '/order/nav/listReturn/auth',
        height: 'full-120',
        headers: {token: localStorage.getItem('token')},
        request: {
            pageName: 'curr',
            pageSize: 'limit'
        },
        page: false,
        parseData: function (res) {
            return {
                'code': res.code,
                'msg': res.msg,
                'data': res.data
            }
        },
        response: {
            statusCode: 200
        },
        // toolbar: ['<p>',
        //     '<button lay-event="add" class="layui-btn layui-btn-sm icon-btn"><i class="layui-icon">&#xe654;</i>添加</button>&nbsp;',
        //     '<button lay-event="edit" class="layui-btn layui-btn-sm layui-btn-warm icon-btn"><i class="layui-icon">&#xe642;</i>修改</button>&nbsp;',
        //     '<button lay-event="del" class="layui-btn layui-btn-sm layui-btn-danger icon-btn"><i class="layui-icon">&#xe640;</i>删除</button>',
        //     '</p>'].join(''),
        defaultToolbar: [],
        cols: [[
            // {type: 'numbers', title: '#'},
            {field: 'orderTime', title: '日期'},
            {field: 'orderNo', title: '单据编号', align: 'center'},
            {field: 'docType$', title: '单据类型'},
        ]],
        done: function (res, curr, count) {
            $('#dictTable+.layui-table-view .layui-table-body tbody>tr:first').trigger('click');
            // 绑定鼠标右键
            tableX.bindCtxMenu('originTable', function (d) {
                return [
                    {
                        icon: 'layui-icon layui-icon-ok',
                        name: '一键出库',
                        click: function (d) {
                            autoOut(d.id);
                        }
                    }
                ]
            })
        }
    });
    /* 表格搜索 */
    form.on('submit(originTableSearch)', function (data) {
        insTb.reload({where: data.field});
        return false;
    });
    /* 表格重置 */
    form.on('submit(originTbReset)', function (data) {
        insTb.reload({where: null});
        insTb2.reload({where: null, page: {curr: 1}});
        return false;
    });
    /* 表格头工具栏点击事件 */
    table.on('toolbar(originTable)', function (obj) {
        if (obj.event === 'add') { // 添加
            showEdit();
        } else if (obj.event === 'edit') { // 修改
            if (selObj == null) {
                return;
            }
            showEdit(selObj.data);
        } else if (obj.event === 'del') { // 删除
            if (selObj == null) {
                return;
            }
            doDel(selObj);
        }
    });
    /* 监听行单击事件 */
    var selObj;
    table.on('row(originTable)', function (obj) {
        selObj = obj;
        obj.tr.addClass('layui-table-click').siblings().removeClass('layui-table-click');
        insTb2.reload({where: {order_id: obj.data.id}, page: {curr: 1}});
    });
    /* 显示表单弹窗 */
    function showEdit(mData) {
        admin.open({
            type: 1,
            title: (mData ? '修改' : '添加') + '项目',
            content: $('#hostEditDialog').html(),
            success: function (layero, dIndex) {
                // 回显表单数据
                form.val('hostEditForm', mData);
                // 表单提交事件
                form.on('submit(hostEditSubmit)', function (data) {
                    var loadIndex = layer.load(2);
                    $.ajax({
                        url: baseUrl+"/host/"+(mData?'update':'add')+"/auth",
                        headers: {'token': localStorage.getItem('token')},
                        data: data.field,
                        method: 'POST',
                        success: function (res) {
                            layer.close(loadIndex);
                            selObj = null;
                            if (res.code === 200){
                                layer.close(dIndex);
                                layer.msg(res.msg, {icon: 1});
                                insTb.reload();
                            } else if (res.code === 403){
                                top.location.href = baseUrl+"/";
                            } else {
                                layer.msg(res.msg, {icon: 2});
                            }
                        }
                    })
                    return false;
                });
            }
        });
    }
    /* 删除 */
    function doDel(obj) {
        layer.confirm('确定要删除此单据类型吗?', {
            skin: 'layui-layer-admin',
            shade: .1
        }, function (i) {
            layer.close(i);
            var loadIndex = layer.load(2);
            $.ajax({
                url: baseUrl+"/host/delete/one/auth",
                headers: {'token': localStorage.getItem('token')},
                data: {param: JSON.stringify(obj.data)},
                method: 'POST',
                success: function (res) {
                    selObj = null;
                    layer.close(loadIndex);
                    if (res.code === 200){
                        layer.closeAll();
                        insTb.reload();
                        $('#dictTable+.layui-table-view .layui-table-body tbody>tr:first').trigger('click');
                    } else if (res.code === 403){
                        top.location.href = baseUrl+"/";
                    } else {
                        layer.msg(res.msg, {icon: 2});
                    }
                }
            })
        });
    }
})
src/main/webapp/static/js/orderTableUQ.js
New file
@@ -0,0 +1,174 @@
var insTb;
layui.config({
    base: baseUrl + "/static/layui/lay/modules/"  // 配置模块所在的目录
}).use(['table','laydate', 'form',  'admin', 'tableX'], function() {
    var table = layui.table;
    var $ = layui.jquery;
    var layer = layui.layer;
    var layDate = layui.laydate;
    var form = layui.form;
    var admin = layui.admin;
    var tableX = layui.tableX;
    /****************************************** 左边表 *************************************************/
    insTb = table.render({
        elem: '#originTable',
        url: baseUrl + '/order/nav/listUQ/auth',
        height: 'full-120',
        headers: {token: localStorage.getItem('token')},
        request: {
            pageName: 'curr',
            pageSize: 'limit'
        },
        page: false,
        parseData: function (res) {
            return {
                'code': res.code,
                'msg': res.msg,
                'data': res.data
            }
        },
        response: {
            statusCode: 200
        },
        // toolbar: ['<p>',
        //     '<button lay-event="add" class="layui-btn layui-btn-sm icon-btn"><i class="layui-icon">&#xe654;</i>添加</button>&nbsp;',
        //     '<button lay-event="edit" class="layui-btn layui-btn-sm layui-btn-warm icon-btn"><i class="layui-icon">&#xe642;</i>修改</button>&nbsp;',
        //     '<button lay-event="del" class="layui-btn layui-btn-sm layui-btn-danger icon-btn"><i class="layui-icon">&#xe640;</i>删除</button>',
        //     '</p>'].join(''),
        defaultToolbar: [],
        cols: [[
            // {type: 'numbers', title: '#'},
            {field: 'orderTime', title: '日期'},
            {field: 'orderNo', title: '单据编号', align: 'center'},
            {field: 'docType$', title: '单据类型'},
        ]],
        done: function (res, curr, count) {
            $('#dictTable+.layui-table-view .layui-table-body tbody>tr:first').trigger('click');
            // 绑定鼠标右键
            tableX.bindCtxMenu('originTable', function (d) {
                return [
                    {
                        icon: 'layui-icon layui-icon-ok',
                        name: '一键出库',
                        click: function (d) {
                            autoOut(d.id);
                        }
                    }
                ]
            })
        }
    });
    /* 表格搜索 */
    form.on('submit(originTableSearch)', function (data) {
        insTb.reload({where: data.field});
        return false;
    });
    /* 表格重置 */
    form.on('submit(originTbReset)', function (data) {
        insTb.reload({where: null});
        insTb2.reload({where: null, page: {curr: 1}});
        return false;
    });
    /* 表格头工具栏点击事件 */
    table.on('toolbar(originTable)', function (obj) {
        if (obj.event === 'add') { // 添加
            showEdit();
        } else if (obj.event === 'edit') { // 修改
            if (selObj == null) {
                return;
            }
            showEdit(selObj.data);
        } else if (obj.event === 'del') { // 删除
            if (selObj == null) {
                return;
            }
            doDel(selObj);
        }
    });
    /* 监听行单击事件 */
    var selObj;
    table.on('row(originTable)', function (obj) {
        selObj = obj;
        obj.tr.addClass('layui-table-click').siblings().removeClass('layui-table-click');
        insTb2.reload({where: {order_id: obj.data.id}, page: {curr: 1}});
    });
    /* 显示表单弹窗 */
    function showEdit(mData) {
        admin.open({
            type: 1,
            title: (mData ? '修改' : '添加') + '项目',
            content: $('#hostEditDialog').html(),
            success: function (layero, dIndex) {
                // 回显表单数据
                form.val('hostEditForm', mData);
                // 表单提交事件
                form.on('submit(hostEditSubmit)', function (data) {
                    var loadIndex = layer.load(2);
                    $.ajax({
                        url: baseUrl+"/host/"+(mData?'update':'add')+"/auth",
                        headers: {'token': localStorage.getItem('token')},
                        data: data.field,
                        method: 'POST',
                        success: function (res) {
                            layer.close(loadIndex);
                            selObj = null;
                            if (res.code === 200){
                                layer.close(dIndex);
                                layer.msg(res.msg, {icon: 1});
                                insTb.reload();
                            } else if (res.code === 403){
                                top.location.href = baseUrl+"/";
                            } else {
                                layer.msg(res.msg, {icon: 2});
                            }
                        }
                    })
                    return false;
                });
            }
        });
    }
    /* 删除 */
    function doDel(obj) {
        layer.confirm('确定要删除此单据类型吗?', {
            skin: 'layui-layer-admin',
            shade: .1
        }, function (i) {
            layer.close(i);
            var loadIndex = layer.load(2);
            $.ajax({
                url: baseUrl+"/host/delete/one/auth",
                headers: {'token': localStorage.getItem('token')},
                data: {param: JSON.stringify(obj.data)},
                method: 'POST',
                success: function (res) {
                    selObj = null;
                    layer.close(loadIndex);
                    if (res.code === 200){
                        layer.closeAll();
                        insTb.reload();
                        $('#dictTable+.layui-table-view .layui-table-body tbody>tr:first').trigger('click');
                    } else if (res.code === 403){
                        top.location.href = baseUrl+"/";
                    } else {
                        layer.msg(res.msg, {icon: 2});
                    }
                }
            })
        });
    }
})
src/main/webapp/views/order/outReturn.html
New file
@@ -0,0 +1,321 @@
<!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">
    <link rel="stylesheet" href="../../static/css/originTable.css" media="all">
    <style>
        body {
            color: #595959;
            background-color: #f5f7f9;
        }
        .admin-form {
            padding: 25px 30px 0 0 !important;
            margin: 0 !important;
        }
        .layui-table-view .layui-table-cell .layui-select-title .layui-input {
            height: 28px;
            line-height: 28px;
        }
        .layui-table-view [lay-size="lg"] .layui-table-cell .layui-select-title .layui-input {
            height: 40px;
            line-height: 40px;
        }
        .layui-table-view [lay-size="lg"] .layui-table-cell .layui-select-title .layui-input {
            height: 40px;
            line-height: 40px;
        }
        .layui-table-view [lay-size="sm"] .layui-table-cell .layui-select-title .layui-input {
            height: 20px;
            line-height: 20px;
        }
        .layui-table-view [lay-size="sm"] .layui-table-cell .layui-btn-xs {
            height: 18px;
            line-height: 18px;
        }
        /* 权限控制 */
        #btn-pakoutPreview {
            display: none;
        }
        /*#btn-delete {*/
        /*    display: none;*/
        /*}*/
        /*.btn-edit {*/
        /*    display: none;*/
        /*}*/
        /*.btn-more {*/
        /*    display: none;*/
        /*}*/
    </style>
</head>
<body>
<!-- 正文开始 -->
<div class="layui-fluid" style="padding-bottom: 0;">
    <div class="layui-row layui-col-space15">
        <!-- 左 -->
        <div class="layui-col-md3" id="left-table">
            <div class="layui-card">
                <div class="layui-card-body" style="padding: 10px;">
                    <form class="layui-form toolbar">
                        <div class="layui-form-item">
                            <div class="layui-inline" style="max-width: 300px;">
                                <input name="orderNo" class="layui-input" placeholder="输入单据编号" autocomplete="off"/>
                            </div>
                            <div class="layui-inline">
                                <button class="layui-btn icon-btn" lay-filter="originTableSearch" lay-submit>
                                    <i class="layui-icon">&#xe615;</i>搜索
                                </button>
                                <button class="layui-btn icon-btn" lay-filter="originTbReset" lay-submit>
                                    <i class="layui-icon">&#xe666;</i>重置
                                </button>
                            </div>
                        </div>
                    </form>
                    <table id="originTable" lay-filter="originTable"></table>
                </div>
            </div>
        </div>
        <!-- 右 -->
        <div class="layui-col-md9">
            <div class="layui-card">
                <div class="layui-card-body" style="padding: 10px;">
                    <form class="layui-form toolbar">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">包装组号:</label>
                                <div class="layui-input-inline">
                                    <input name="brand" class="layui-input" placeholder="包装组号"/>
                                </div>
                            </div>
<!--                            <div class="layui-inline">-->
<!--                                <label class="layui-form-label">商品名称:</label>-->
<!--                                <div class="layui-input-inline">-->
<!--                                    <input name="maktx" class="layui-input" placeholder="商品名称"/>-->
<!--                                </div>-->
<!--                            </div>-->
<!--                            <div class="layui-inline">-->
<!--                                <label class="layui-form-label">序列码:</label>-->
<!--                                <div class="layui-input-inline">-->
<!--                                    <input name="batch" class="layui-input" placeholder="序列码"/>-->
<!--                                </div>-->
<!--                            </div>-->
                            <!--                            <div class="layui-inline">-->
                            <!--                                <label class="layui-form-label">状态:</label>-->
                            <!--                                <div class="layui-input-inline">-->
                            <!--                                    <select name="isOnline">-->
                            <!--                                        <option value="1">充电中</option>-->
                            <!--                                        <option value="1">充电中</option>-->
                            <!--                                        <option value="0">不在充电</option>-->
                            <!--                                    </select>-->
                            <!--                                </div>-->
                            <!--                            </div>-->
                            <div class="layui-inline">&emsp;
                                <button class="layui-btn icon-btn" lay-filter="sensorTbSearch" lay-submit>
                                    <i class="layui-icon">&#xe615;</i>搜索
                                </button>
                            </div>
                        </div>
                    </form>
                    <table id="orderDetlTable" lay-filter="orderDetlTable"></table>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 头工具栏 -->
<script type="text/html" id="orderDetToolbar">
    <!--    <div class="layui-btn-container">-->
    <!--        <div class="layui-col-md3">-->
    <!--            <select id="staNoSelect" lay-verify="required">-->
    <!--                <option value="">请选择站点</option>-->
    <!--            </select>-->
    <!--        </div>-->
    <!--    </div>-->
    <button class="layui-btn layui-btn-sm layui-btn-danger btn-pakoutPreview" id="btn-pakoutPreview" lay-event="pakoutPreview">批量出库</button>
</script>
<!-- 行工具栏 -->
<script type="text/html" id="operate">
<!--    {{#if (d.enableQty > 0){ }}-->
<!--    <a class="layui-btn layui-btn-xs layui-btn-danger btn-pakoutPreview" lay-event="pakoutPreview"><i class="layui-icon layui-icon-prev-circle"></i>出库</a>-->
<!--    {{# } }}-->
</script>
<!-- 出库预览 -->
<script type="text/html" id="pakoutPreviewBox" style="display: none">
    <div style="padding: 25px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;">
        <span style="font-size: large; font-weight: bold">出库预览</span>
    </div>
    <div class="layui-card">
        <div class="layui-card-body" style="padding: 10px">
            <table id="stoPreTab" lay-filter="stoPreTab"></table>
        </div>
        <button class="layui-btn layui-btn-primary layui-border-black layui-btn-sm"
                lay-filter="checkModifySta"
                lay-submit
                style="display: block; float: right; margin-right: 3rem; transform: scale(1.2);margin-bottom: 3rem; transform-origin: right center;">
            盘点均分
        </button>
<!--        <button class="layui-btn layui-btn-primary layui-border-black layui-btn-sm" lay-filter="batchModifySta" lay-submit style="display: block;float: right;margin-right: 1rem">-->
<!--            批量修改-->
<!--        </button>-->
    </div>
</script>
<script type="text/html" id="tbBasicTbStaNos">
    <div class="ew-select-fixed">
        <select class="order-sta-select" lay-filter="tbBasicTbStaNos">
            {{#if (d.staNos!=null) {}}
            {{# for(let i=0; i<d.staNos.length; i++) { }}
            <option value="{{d.staNos[i]}}">{{d.staNos[i]}}</option>
            {{# } }}
            {{# } }}
        </select>
    </div>
</script>
<script type="text/html" id="staBatchSelectDialog">
    <form class="layui-form" style="padding: 25px 50px 30px 50px;text-align: center">
        <select id="batchSelectStaBox" name="batchSta" lay-vertype="tips" lay-verify="required" required="">
        </select>
        <button style="margin-top: 30px" class="layui-btn" lay-filter="staBatchSelectConfirm" lay-submit="">确定</button>
    </form>
</script>
<script type="text/html" id="locNoTpl">
    <span name="locNo"
          {{# if( d.lack === false){ }}
          class="layui-badge layui-badge-green" >{{d.locNo}}</span>
    {{# } else { }}
    class="layui-badge layui-badge-red" >库存不足</span>
    {{# } }}
</script>
<!-- 行样式 -->
<script type="text/html" id="orderNoTpl">
    <span name="orderNo" class="layui-badge layui-badge-gray">{{d.orderNo}}</span>
</script>
<script type="text/html" id="statusTpl">
    <input type="checkbox" name="status" value="{{d.status}}" lay-skin="switch" lay-text="正常|禁用" lay-filter="statusSwitch" {{ d.status === 1 ? 'checked' : '' }}>
</script>
<!-- 表单弹窗 -->
<script type="text/html" id="editDialog">
    <form id="detail" lay-filter="detail" class="layui-form admin-form">
        <input name="id" type="hidden">
        <input name="status" type="hidden">
        <div class="layui-row">
            <div class="layui-col-md4">
                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">设备编号</label>
                    <div class="layui-input-block">
                        <input name="uuid" placeholder="请输入设备编号" class="layui-input" lay-vertype="tips" lay-verify="required" required="">
                    </div>
                </div>
            </div>
            <div class="layui-col-md4">
                <div class="layui-form-item">
                    <label class="layui-form-label">设备类型:</label>
                    <div class="layui-input-block">
                        <div id="modelSel" class="ew-xmselect-tree"></div>
                    </div>
                </div>
            </div>
            <div class="layui-col-md4">
                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">所属项目: </label>
                    <div class="layui-input-block cool-auto-complete">
                        <input name="hostId" class="layui-input" style="display: none">
                        <input id="hostId$" name="hostId$" 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="hostQueryByhostId" onkeyup="autoLoad(this.getAttribute('data-key'))">
                            <select class="cool-auto-complete-window-select" data-key="hostQueryByhostIdSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">
                            </select>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-col-md12">
                <div class="layui-form-item">
                    <label class="layui-form-label">详细地址</label>
                    <div class="layui-input-block">
                        <input name="addr" placeholder="请输入详细地址" class="layui-input">
                    </div>
                </div>
            </div>
            <hr class="layui-bg-gray">
            <div class="layui-col-md12" style="text-align: center">
                <iframe id="mapIframe" src="map.html" scrolling="no" frameborder="0"
                        style="display: inline-block; width: 90%;height: 400px;margin: auto">
                </iframe>
            </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>
<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.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/tools/md5.js"></script>
<script type="text/javascript" src="../../static/js/orderTableReturn.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/order/outReturn.js" charset="utf-8"></script>
<!--<script type="text/template" id="takeSiteSelectTemplate">-->
<!--    {{#each data}}-->
<!--    <option value="{{siteId}}">{{desc}}</option>-->
<!--    {{/each}}-->
<!--</script>-->
<!-- 项目编辑窗口 -->
<script type="text/html" id="hostEditDialog">
    <form id="hostEditForm" lay-filter="hostEditForm" class="layui-form model-form">
        <input name="id" type="hidden"/>
        <div class="layui-form-item">
            <label class="layui-form-label layui-form-required">项目名称:</label>
            <div class="layui-input-block">
                <input name="name" placeholder="请输入类型名称" class="layui-input"
                       lay-verType="tips" lay-verify="required" required/>
            </div>
        </div>
        <div class="layui-form-item text-right">
            <button class="layui-btn" lay-filter="hostEditSubmit" lay-submit>保存</button>
            <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button>
        </div>
    </form>
</script>
</body>
<script type="text/template" id="batchStaSelectTpl">
    <option value="">选择出库站</option>
    {{#each list}}
    <option value="{{this}}">{{this}}</option>
    {{/each}}
</script>
</html>
src/main/webapp/views/order/outUQ.html
New file
@@ -0,0 +1,321 @@
<!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">
    <link rel="stylesheet" href="../../static/css/originTable.css" media="all">
    <style>
        body {
            color: #595959;
            background-color: #f5f7f9;
        }
        .admin-form {
            padding: 25px 30px 0 0 !important;
            margin: 0 !important;
        }
        .layui-table-view .layui-table-cell .layui-select-title .layui-input {
            height: 28px;
            line-height: 28px;
        }
        .layui-table-view [lay-size="lg"] .layui-table-cell .layui-select-title .layui-input {
            height: 40px;
            line-height: 40px;
        }
        .layui-table-view [lay-size="lg"] .layui-table-cell .layui-select-title .layui-input {
            height: 40px;
            line-height: 40px;
        }
        .layui-table-view [lay-size="sm"] .layui-table-cell .layui-select-title .layui-input {
            height: 20px;
            line-height: 20px;
        }
        .layui-table-view [lay-size="sm"] .layui-table-cell .layui-btn-xs {
            height: 18px;
            line-height: 18px;
        }
        /* 权限控制 */
        #btn-pakoutPreview {
            display: none;
        }
        /*#btn-delete {*/
        /*    display: none;*/
        /*}*/
        /*.btn-edit {*/
        /*    display: none;*/
        /*}*/
        /*.btn-more {*/
        /*    display: none;*/
        /*}*/
    </style>
</head>
<body>
<!-- 正文开始 -->
<div class="layui-fluid" style="padding-bottom: 0;">
    <div class="layui-row layui-col-space15">
        <!-- 左 -->
        <div class="layui-col-md3" id="left-table">
            <div class="layui-card">
                <div class="layui-card-body" style="padding: 10px;">
                    <form class="layui-form toolbar">
                        <div class="layui-form-item">
                            <div class="layui-inline" style="max-width: 300px;">
                                <input name="orderNo" class="layui-input" placeholder="输入单据编号" autocomplete="off"/>
                            </div>
                            <div class="layui-inline">
                                <button class="layui-btn icon-btn" lay-filter="originTableSearch" lay-submit>
                                    <i class="layui-icon">&#xe615;</i>搜索
                                </button>
                                <button class="layui-btn icon-btn" lay-filter="originTbReset" lay-submit>
                                    <i class="layui-icon">&#xe666;</i>重置
                                </button>
                            </div>
                        </div>
                    </form>
                    <table id="originTable" lay-filter="originTable"></table>
                </div>
            </div>
        </div>
        <!-- 右 -->
        <div class="layui-col-md9">
            <div class="layui-card">
                <div class="layui-card-body" style="padding: 10px;">
                    <form class="layui-form toolbar">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">包装组号:</label>
                                <div class="layui-input-inline">
                                    <input name="brand" class="layui-input" placeholder="包装组号"/>
                                </div>
                            </div>
<!--                            <div class="layui-inline">-->
<!--                                <label class="layui-form-label">商品名称:</label>-->
<!--                                <div class="layui-input-inline">-->
<!--                                    <input name="maktx" class="layui-input" placeholder="商品名称"/>-->
<!--                                </div>-->
<!--                            </div>-->
<!--                            <div class="layui-inline">-->
<!--                                <label class="layui-form-label">序列码:</label>-->
<!--                                <div class="layui-input-inline">-->
<!--                                    <input name="batch" class="layui-input" placeholder="序列码"/>-->
<!--                                </div>-->
<!--                            </div>-->
                            <!--                            <div class="layui-inline">-->
                            <!--                                <label class="layui-form-label">状态:</label>-->
                            <!--                                <div class="layui-input-inline">-->
                            <!--                                    <select name="isOnline">-->
                            <!--                                        <option value="1">充电中</option>-->
                            <!--                                        <option value="1">充电中</option>-->
                            <!--                                        <option value="0">不在充电</option>-->
                            <!--                                    </select>-->
                            <!--                                </div>-->
                            <!--                            </div>-->
                            <div class="layui-inline">&emsp;
                                <button class="layui-btn icon-btn" lay-filter="sensorTbSearch" lay-submit>
                                    <i class="layui-icon">&#xe615;</i>搜索
                                </button>
                            </div>
                        </div>
                    </form>
                    <table id="orderDetlTable" lay-filter="orderDetlTable"></table>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 头工具栏 -->
<script type="text/html" id="orderDetToolbar">
    <!--    <div class="layui-btn-container">-->
    <!--        <div class="layui-col-md3">-->
    <!--            <select id="staNoSelect" lay-verify="required">-->
    <!--                <option value="">请选择站点</option>-->
    <!--            </select>-->
    <!--        </div>-->
    <!--    </div>-->
    <button class="layui-btn layui-btn-sm layui-btn-danger btn-pakoutPreview" id="btn-pakoutPreview" lay-event="pakoutPreview">批量出库</button>
</script>
<!-- 行工具栏 -->
<script type="text/html" id="operate">
<!--    {{#if (d.enableQty > 0){ }}-->
<!--    <a class="layui-btn layui-btn-xs layui-btn-danger btn-pakoutPreview" lay-event="pakoutPreview"><i class="layui-icon layui-icon-prev-circle"></i>出库</a>-->
<!--    {{# } }}-->
</script>
<!-- 出库预览 -->
<script type="text/html" id="pakoutPreviewBox" style="display: none">
    <div style="padding: 25px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;">
        <span style="font-size: large; font-weight: bold">出库预览</span>
    </div>
    <div class="layui-card">
        <div class="layui-card-body" style="padding: 10px">
            <table id="stoPreTab" lay-filter="stoPreTab"></table>
        </div>
        <button class="layui-btn layui-btn-primary layui-border-black layui-btn-sm"
                lay-filter="checkModifySta"
                lay-submit
                style="display: block; float: right; margin-right: 3rem; transform: scale(1.2);margin-bottom: 3rem; transform-origin: right center;">
            盘点均分
        </button>
<!--        <button class="layui-btn layui-btn-primary layui-border-black layui-btn-sm" lay-filter="batchModifySta" lay-submit style="display: block;float: right;margin-right: 1rem">-->
<!--            批量修改-->
<!--        </button>-->
    </div>
</script>
<script type="text/html" id="tbBasicTbStaNos">
    <div class="ew-select-fixed">
        <select class="order-sta-select" lay-filter="tbBasicTbStaNos">
            {{#if (d.staNos!=null) {}}
            {{# for(let i=0; i<d.staNos.length; i++) { }}
            <option value="{{d.staNos[i]}}">{{d.staNos[i]}}</option>
            {{# } }}
            {{# } }}
        </select>
    </div>
</script>
<script type="text/html" id="staBatchSelectDialog">
    <form class="layui-form" style="padding: 25px 50px 30px 50px;text-align: center">
        <select id="batchSelectStaBox" name="batchSta" lay-vertype="tips" lay-verify="required" required="">
        </select>
        <button style="margin-top: 30px" class="layui-btn" lay-filter="staBatchSelectConfirm" lay-submit="">确定</button>
    </form>
</script>
<script type="text/html" id="locNoTpl">
    <span name="locNo"
          {{# if( d.lack === false){ }}
          class="layui-badge layui-badge-green" >{{d.locNo}}</span>
    {{# } else { }}
    class="layui-badge layui-badge-red" >库存不足</span>
    {{# } }}
</script>
<!-- 行样式 -->
<script type="text/html" id="orderNoTpl">
    <span name="orderNo" class="layui-badge layui-badge-gray">{{d.orderNo}}</span>
</script>
<script type="text/html" id="statusTpl">
    <input type="checkbox" name="status" value="{{d.status}}" lay-skin="switch" lay-text="正常|禁用" lay-filter="statusSwitch" {{ d.status === 1 ? 'checked' : '' }}>
</script>
<!-- 表单弹窗 -->
<script type="text/html" id="editDialog">
    <form id="detail" lay-filter="detail" class="layui-form admin-form">
        <input name="id" type="hidden">
        <input name="status" type="hidden">
        <div class="layui-row">
            <div class="layui-col-md4">
                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">设备编号</label>
                    <div class="layui-input-block">
                        <input name="uuid" placeholder="请输入设备编号" class="layui-input" lay-vertype="tips" lay-verify="required" required="">
                    </div>
                </div>
            </div>
            <div class="layui-col-md4">
                <div class="layui-form-item">
                    <label class="layui-form-label">设备类型:</label>
                    <div class="layui-input-block">
                        <div id="modelSel" class="ew-xmselect-tree"></div>
                    </div>
                </div>
            </div>
            <div class="layui-col-md4">
                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">所属项目: </label>
                    <div class="layui-input-block cool-auto-complete">
                        <input name="hostId" class="layui-input" style="display: none">
                        <input id="hostId$" name="hostId$" 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="hostQueryByhostId" onkeyup="autoLoad(this.getAttribute('data-key'))">
                            <select class="cool-auto-complete-window-select" data-key="hostQueryByhostIdSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">
                            </select>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-col-md12">
                <div class="layui-form-item">
                    <label class="layui-form-label">详细地址</label>
                    <div class="layui-input-block">
                        <input name="addr" placeholder="请输入详细地址" class="layui-input">
                    </div>
                </div>
            </div>
            <hr class="layui-bg-gray">
            <div class="layui-col-md12" style="text-align: center">
                <iframe id="mapIframe" src="map.html" scrolling="no" frameborder="0"
                        style="display: inline-block; width: 90%;height: 400px;margin: auto">
                </iframe>
            </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>
<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.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/tools/md5.js"></script>
<script type="text/javascript" src="../../static/js/orderTableUQ.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/order/outUQ.js" charset="utf-8"></script>
<!--<script type="text/template" id="takeSiteSelectTemplate">-->
<!--    {{#each data}}-->
<!--    <option value="{{siteId}}">{{desc}}</option>-->
<!--    {{/each}}-->
<!--</script>-->
<!-- 项目编辑窗口 -->
<script type="text/html" id="hostEditDialog">
    <form id="hostEditForm" lay-filter="hostEditForm" class="layui-form model-form">
        <input name="id" type="hidden"/>
        <div class="layui-form-item">
            <label class="layui-form-label layui-form-required">项目名称:</label>
            <div class="layui-input-block">
                <input name="name" placeholder="请输入类型名称" class="layui-input"
                       lay-verType="tips" lay-verify="required" required/>
            </div>
        </div>
        <div class="layui-form-item text-right">
            <button class="layui-btn" lay-filter="hostEditSubmit" lay-submit>保存</button>
            <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button>
        </div>
    </form>
</script>
</body>
<script type="text/template" id="batchStaSelectTpl">
    <option value="">选择出库站</option>
    {{#each list}}
    <option value="{{this}}">{{this}}</option>
    {{/each}}
</script>
</html>