自动化立体仓库 - WMS系统
#
pang.jiabao
4 天以前 52b21b24130c75197c039ae0fd761e2ef5b43cb3
src/main/webapp/static/js/mat/mat.js
@@ -6,7 +6,7 @@
    var cols = [
        {type: 'checkbox'}
        , {field: 'tagId$', align: 'center', title: '归类', templet: '#tagTpl'}
        , {field: 'locType$', align: 'center', title: '库位类型'}
        // , {field: 'locType$', align: 'center', title: '库位类型'}
        // ,{field: 'store_max', align: 'center',title: '库存上限'}
        // ,{field: 'store_min', align: 'center',title: '库存下限'}
        // ,{field: 'store_max_date', align: 'center',title: '库龄上限(天)'}
@@ -211,52 +211,53 @@
                    });
                }
                break;
            case "batchModifties":
                var selected = checkStatus.data;
                if (selected.length === 0) {
                    layer.msg('请选择修改数据');
                } else {
                    let selIds = selected.map(item => {
                       return  item.id
                    });
                    layer.open({
                        type: 1,
                        title: '批量修改',
                        area: ['500px'],
                        shadeClose: true,
                        content: $('#batchModifties'),
                        success: function (layero, index) {
                            layer.iframeAuto(index);
                            form.on('submit(batchModify)', function (data) {
                                let params = {...data?.field}
                                params.id = selIds
                                $.ajax({
                                    url: baseUrl + "/mat/batch/auth",
                                    headers: {'token': localStorage.getItem('token')},
                                    data: JSON.stringify(params),
                                    dataType: 'json',
                                    contentType: 'application/json;charset=UTF-8',
                                    method: 'POST',
                                    success: function (res) {
                                        layer.closeAll();
                                        if (res.code === 200) {
                                        } else if (res.code === 403) {
                                            top.location.href = baseUrl + "/";
                                        } else {
                                            layer.msg(res.msg)
                                        }
                                    }
                                });
                                layer.closeAll();
                            });
                        },
                        end: function () {
                        }
                    });
                }
                break;
            // case "batchModifties":
            //     console.log('顶顶顶')
            //     var selected = checkStatus.data;
            //     if (selected.length === 0) {
            //         layer.msg('请选择修改数据');
            //     } else {
            //         let selIds = selected.map(item => {
            //            return  item.id
            //         });
            //         layer.open({
            //             type: 1,
            //             title: '批量修改',
            //             area: ['500px'],
            //             shadeClose: true,
            //             content: $('#batchModifties'),
            //             success: function (layero, index) {
            //                 layer.iframeAuto(index);
            //                 form.on('submit(batchModify)', function (data) {
            //                     let params = {...data?.field}
            //                     params.id = selIds
            //                     $.ajax({
            //                         url: baseUrl + "/mat/batch/auth",
            //                         headers: {'token': localStorage.getItem('token')},
            //                         data: JSON.stringify(params),
            //                         dataType: 'json',
            //                         contentType: 'application/json;charset=UTF-8',
            //                         method: 'POST',
            //                         success: function (res) {
            //                             layer.closeAll();
            //                             if (res.code === 200) {
            //
            //                             } else if (res.code === 403) {
            //                                 top.location.href = baseUrl + "/";
            //                             } else {
            //                                 layer.msg(res.msg)
            //                             }
            //                         }
            //                     });
            //                     layer.closeAll();
            //                 });
            //             },
            //             end: function () {
            //
            //             }
            //         });
            //     }
            //     break;
            default:
                break;
        }