自动化立体仓库 - WMS系统
dubin
15 小时以前 1cc361ec5fca7550ba01f0a6ecf058e84a5a20ad
src/main/webapp/static/js/mat/mat.js
@@ -237,6 +237,9 @@
            case 'edit':
                showEditModel(data)
                break;
            case 'editBarcode':
                showEditModelBarcode(data)
                break;
        }
    });
@@ -312,6 +315,72 @@
        });
    }
    // /* 显示表单弹窗 */
    // 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) {
        $('.template-preview').hide();