自动化立体仓库 - WMS系统
#
whycq
2024-06-11 2f7c2cf530721226082cb4fb7efe10ddc22070f6
src/main/webapp/static/js/order/order.js
@@ -162,7 +162,7 @@
                            //{field: 'manu', title: '行号'},
                            {field: 'threeCode', title: '销售单号'},
                            {field: 'deadTime', title: '自由项'},
                            //{field: 'itemNum', title: '行唯一标识'}
                            {field: 'processSts$', title: '工序'}
                        ]],
                        request: {
                            pageName: 'curr',
@@ -195,7 +195,7 @@
            type: 1,
            title: (expTpe ? '修改' : '添加') + '单据',
            content: $('#editDialog').html(),
            area: '1300px',
            area: '1600px',
            success: function (layero, dIndex) {
                $(layero).children('.layui-layer-content').css('overflow', 'visible');
                var isExpAdd = !expTpe;
@@ -254,6 +254,13 @@
                    page: true,
                    height: '350px;',
                    cellMinWidth: 100,
                    css: [ // 设置单元格样式
                        // 取消默认的溢出隐藏,并设置适当高度
                        '.layui-table-cell{height: 50px; line-height: 40px;}',
                        '.layui-table-cell .layui-colorpicker{width: 38px; height: 38px;}',
                        '.layui-table-cell select{height: 36px; padding: 0 5px;}'
                    ].join(''),
                    cols: [[
                        {type: 'numbers', title: '#'},
                        {field: 'matnr', title: '商品编码', width: 160},
@@ -263,13 +270,35 @@
                        {field: 'anfme', title: '数量(修改)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110},
                        {field: 'threeCode', title: '销售订单号(修改)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110},
                        {field: 'deadTime', title: '销售订单行号(修改)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110},
                        {field: 'processSts', title: '工序', templet: function (d) {
                                console.log(d)
                            var select = `<select class="layui-select" name="processSts"  lay-filter="processStsSelect" data-value=${d.processSts} id=${d.id}>
                                            <option value="">选择状态</option>
                                            <option value="1">待加工</option>
                                            <option value="2">已加工</option>
                                            <option value="3">无需加工</option>
                                        </select>`;
                            return select;
                            }},
                        // {field: 'inQty', title: '已入库量',  minWidth: 100, width: 100},
                        // {field: 'unit', title: '单位', width: 80},
                        {field: 'memo', title: '备注' , edit: true},
                        {align: 'center', title: '操作', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80, fixed: 'right'}
                    ]],
                    done: function (res) {
                    done: function (res,curr, count) {
                        console.log(res)
                        $(layero).find('.layui-table-view').css('margin', '0');
                        $(".layui-table-body").css('overflow','visible');
                        $(".layui-table-box").css('overflow','visible');
                        $(".layui-table-view").css('overflow','visible');
                        var tableElem = this.elem.next('.layui-table-view');
                        count || tableElem.find('.layui-table-header').css('overflow', 'auto');
                        layui.each(tableElem.find('select[name="processSts"]'), function (index, item) {
                            var elem = $(item);
                            elem.val(elem.data('state')).parents('div.layui-table-cell').css('overflow', 'visible');
                        });
                        form.render();//刷新表单
                    },
                    size: ''
                };
@@ -314,6 +343,17 @@
                        });
                    }
                });
                // 工具条点击事件
                form.on('select(processStsSelect)', function (obj) {
                    console.log(obj)
                    var id = obj.elem.id
                    var val = obj.value
                    for (let item of xxDataList) {
                        if (item.id == id) {
                            item.processSts = val
                        }
                    }
                });
                // 明细数据修改
                table.on('edit(formSSXMTable)', function (obj) {
                    let index = obj.tr.attr("data-index");