自动化立体仓库 - WMS系统
dubin
6 小时以前 0ab29c6d89777a832e21c5d2934e3e3e1544c6d8
src/main/webapp/static/js/mat/mat.js
@@ -315,71 +315,71 @@
        });
    }
    // /* 显示表单弹窗 */
    // function showEditModelBarcode(mData) {
    //     admin.open({
    //         type: 1,
    //         area: '600px',
    //         title: '绑定商品',
    //         content: $('#editDialogBarcode').html(),
    //         success: function (layero, dIndex) {
    //             // 回显表单数据
    //             form.val('detail', mData);
    //             // 表单提交事件
    //             form.on('submit(editSubmit)', function (data) {
    //                 console.log(data)
    //                 data.field.tagId = insXmSel.getValue('valueStr');
    //                 if (isEmpty(data.field.tagId)) {
    //                     layer.msg('分类不能为空', {icon: 2});
    //                     return false;
    //                 }
    //                 var loadIndex = layer.load(2);
    //                 $.ajax({
    //                     url: baseUrl+"/mat/barcode/auth",
    //                     headers: {'token': localStorage.getItem('token')},
    //                     data: data.field,
    //                     method: 'POST',
    //                     success: function (res) {
    //                         layer.close(loadIndex);
    //                         if (res.code === 200){
    //                             layer.close(dIndex);
    //                             layer.msg(res.msg, {icon: 1});
    //                             $(".layui-laypage-btn")[0].click();
    //                         } else if (res.code === 403){
    //                             top.location.href = baseUrl+"/";
    //                         }else {
    //                             layer.msg(res.msg, {icon: 2});
    //                         }
    //                     }
    //                 })
    //                 return false;
    //             });
    //             // 渲染下拉树
    //             var insXmSel = xmSelect.render({
    //                 el: '#tagSelBarcode',
    //                 height: '250px',
    //                 data: insTb.options.data,
    //                 initValue: mData ? [mData.tagId] : [],
    //                 model: {label: {type: 'text'}},
    //                 prop: {
    //                     name: 'name',
    //                     value: 'id'
    //                 },
    //                 radio: true,
    //                 clickClose: true,
    //                 tree: {
    //                     show: true,
    //                     indent: 15,
    //                     strict: false,
    //                     expandedKeys: true
    //                 }
    //             });
    //             // 弹窗不出现滚动条
    //             $(layero).children('.layui-layer-content').css('overflow', 'visible');
    //             layui.form.render('select');
    //         }
    //     });
    // }
    /* 显示表单弹窗 */
    function showEditModelBarcode(mData) {
        admin.open({
            type: 1,
            area: '600px',
            title: '绑定商品',
            content: $('#editDialogBarcode').html(),
            success: function (layero, dIndex) {
                // 回显表单数据
                form.val('detail', mData);
                // 表单提交事件
                form.on('submit(editSubmit)', function (data) {
                    console.log(data)
                    data.field.tagId = insXmSel.getValue('valueStr');
                    if (isEmpty(data.field.tagId)) {
                        layer.msg('分类不能为空', {icon: 2});
                        return false;
                    }
                    var loadIndex = layer.load(2);
                    $.ajax({
                        url: baseUrl+"/mat/barcode/auth",
                        headers: {'token': localStorage.getItem('token')},
                        data: data.field,
                        method: 'POST',
                        success: function (res) {
                            layer.close(loadIndex);
                            if (res.code === 200){
                                layer.close(dIndex);
                                layer.msg(res.msg, {icon: 1});
                                $(".layui-laypage-btn")[0].click();
                            } else if (res.code === 403){
                                top.location.href = baseUrl+"/";
                            }else {
                                layer.msg(res.msg, {icon: 2});
                            }
                        }
                    })
                    return false;
                });
                // 渲染下拉树
                var insXmSel = xmSelect.render({
                    el: '#tagSelBarcode',
                    height: '250px',
                    data: insTb.options.data,
                    initValue: mData ? [mData.tagId] : [],
                    model: {label: {type: 'text'}},
                    prop: {
                        name: 'name',
                        value: 'id'
                    },
                    radio: true,
                    clickClose: true,
                    tree: {
                        show: true,
                        indent: 15,
                        strict: false,
                        expandedKeys: true
                    }
                });
                // 弹窗不出现滚动条
                $(layero).children('.layui-layer-content').css('overflow', 'visible');
                layui.form.render('select');
            }
        });
    }
    // 模板选择
    form.on('radio(selectTemplateRadio)', function (data) {