自动化立体仓库 - WMS系统
pang.jiabao
2025-04-12 2e36f3e6ccd951fd85a15eff4fae54f938dbe503
src/main/webapp/static/js/stkPlcm/stkPlcm.js
@@ -10,23 +10,23 @@
    tableIns = table.render({
        elem: '#stkPlcm',
        headers: {token: localStorage.getItem('token')},
        url: '/stkPlcm/list/auth',
        url: baseUrl+'/stkPlcm/list/auth',
        page: true,
        limit: 10,
        even: true,
        toolbar: '#toolbar',
        cellMinWidth: 50,
        cols: [[
            {type: 'checkbox'}
            ,{field: 'ioTime$', align: 'center',title: '日期'}
            ,{field: 'wrkNo', align: 'center',title: '工作号'}
            ,{field: 'locNo$', align: 'center',title: '库位号',event: 'locNo', style: 'cursor:pointer'}
            ,{field: 'crnError$', align: 'center',title: '异常码',event: 'crnError', style: 'cursor:pointer'}
            // {type: 'checkbox'}
            {field: 'ioTime$', align: 'center',title: '日期'}
            ,{field: 'wrkNo', align: 'center',title: 'Номер задания'}
            ,{field: 'locNo$', align: 'center',title: 'Номер складского места',event: 'locNo', style: 'cursor:pointer'}
            ,{field: 'crnError$', align: 'center',title: 'Код ошибки'}
            ,{field: 'modiTime$', align: 'center',title: '异常时间'}
            ,{field: 'devNo$', align: 'center',title: '堆垛机号',event: 'devNo', style: 'cursor:pointer'}
            ,{field: 'devNo$', align: 'center',title: 'Номер штабелера',event: 'devNo', style: 'cursor:pointer'}
            ,{field: 'wrkTime$', align: 'center',title: '工作档时间'}
            ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:100}
            ,{fixed: 'right', title:'Операция', align: 'center', toolbar: '#operate', width:100}
        ]],
        request: {
            pageName: 'curr',
@@ -45,7 +45,7 @@
        },
        done: function(res, curr, count) {
            if (res.code === 403) {
                top.location.href = "/";
                top.location.href = baseUrl+"/";
            }
            pageCurr=curr;
            limit();
@@ -75,7 +75,7 @@
            },
            done: function (res, curr, count) {
                if (res.code === 403) {
                    top.location.href = "/";
                    top.location.href = baseUrl+"/";
                }
                pageCurr=curr;
                limit();
@@ -90,7 +90,7 @@
            case 'addData':
                layer.open({
                    type: 2,
                    title: '新增',
                    title: 'Добавить',
                    maxmin: true,
                    area: [top.detailWidth, top.detailHeight],
                    shadeClose: false,
@@ -113,11 +113,11 @@
            case 'deleteData':
                var data = checkStatus.data;
                if (data.length === 0){
                    layer.msg('请选择数据');
                    layer.msg('Пожалуйста, выберите данные');
                } else {
                    layer.confirm('确定删除'+(data.length===1?'此':data.length)+'条数据吗', function(){
                        $.ajax({
                            url: "/stkPlcm/delete/auth",
                            url: baseUrl+"/stkPlcm/delete/auth",
                            headers: {'token': localStorage.getItem('token')},
                            data: {param: JSON.stringify(data)},
                            method: 'POST',
@@ -127,7 +127,7 @@
                                    layer.closeAll();
                                    tableReload(false);
                                } else if (res.code === 403){
                                    top.location.href = "/";
                                    top.location.href = baseUrl+"/";
                                } else {
                                    layer.msg(res.msg)
                                }
@@ -137,7 +137,7 @@
                }
                break;
            case 'exportData':
                layer.confirm('确定导出Excel吗', function(){
                layer.confirm('Подтвердить экспорт в Excel?', {shadeClose: true}, function(){
                    var titles=[];
                    var fields=[];
                    obj.config.cols[0].map(function (col) {
@@ -155,7 +155,7 @@
                        'fields': fields
                    };
                    $.ajax({
                        url: "/stkPlcm/export/auth",
                        url: baseUrl+"/stkPlcm/export/auth",
                        headers: {'token': localStorage.getItem('token')},
                        data: JSON.stringify(param),
                        dataType:'json',
@@ -166,7 +166,7 @@
                            if (res.code === 200) {
                                table.exportFile(titles,res.data,'xls');
                            } else if (res.code === 403) {
                                top.location.href = "/";
                                top.location.href = baseUrl+"/";
                            } else {
                                layer.msg(res.msg)
                            }
@@ -185,7 +185,7 @@
            case 'detail':
                layer.open({
                    type: 2,
                    title: '详情',
                    title: 'Детали',
                    maxmin: true,
                    area: [top.detailWidth, top.detailHeight],
                    shadeClose: false,
@@ -204,7 +204,7 @@
            case 'edit':
                layer.open({
                    type: 2,
                    title: '修改',
                    title: 'Изменить',
                    maxmin: true,
                    area: [top.detailWidth, top.detailHeight],
                    shadeClose: false,
@@ -223,7 +223,7 @@
            case 'locNo':
                var param = top.reObject(data).locNo;
                if (param === undefined || param.trim() === '') {
                    layer.msg("无数据");
                    layer.msg("Нет данных");
                } else {
                   layer.open({
                       type: 2,
@@ -234,7 +234,7 @@
                       content: '../locMast/locMast_detail.html',
                       success: function(layero, index){
                           $.ajax({
                               url: "/locMast/"+ param +"/auth",
                               url: baseUrl+"/locMast/"+ param +"/auth",
                               headers: {'token': localStorage.getItem('token')},
                               method: 'GET',
                               success: function (res) {
@@ -259,7 +259,7 @@
            case 'crnError':
                var param = top.reObject(data).crnError;
                if (param === undefined) {
                    layer.msg("无数据");
                    layer.msg("Нет данных");
                } else {
                   layer.open({
                       type: 2,
@@ -270,7 +270,7 @@
                       content: '../basCrnError/basCrnError_detail.html',
                       success: function(layero, index){
                           $.ajax({
                               url: "/basCrnError/"+ param +"/auth",
                               url: baseUrl+"/basCrnError/"+ param +"/auth",
                               headers: {'token': localStorage.getItem('token')},
                               method: 'GET',
                               success: function (res) {
@@ -295,7 +295,7 @@
            case 'modiUser':
                var param = top.reObject(data).modiUser;
                if (param === undefined) {
                    layer.msg("无数据");
                    layer.msg("Нет данных");
                } else {
                   layer.open({
                       type: 2,
@@ -306,7 +306,7 @@
                       content: '../user/user_detail.html',
                       success: function(layero, index){
                           $.ajax({
                               url: "/user/"+ param +"/auth",
                               url: baseUrl+"/user/"+ param +"/auth",
                               headers: {'token': localStorage.getItem('token')},
                               method: 'GET',
                               success: function (res) {
@@ -331,7 +331,7 @@
            case 'appeUser':
                var param = top.reObject(data).appeUser;
                if (param === undefined) {
                    layer.msg("无数据");
                    layer.msg("Нет данных");
                } else {
                   layer.open({
                       type: 2,
@@ -342,7 +342,7 @@
                       content: '../user/user_detail.html',
                       success: function(layero, index){
                           $.ajax({
                               url: "/user/"+ param +"/auth",
                               url: baseUrl+"/user/"+ param +"/auth",
                               headers: {'token': localStorage.getItem('token')},
                               method: 'GET',
                               success: function (res) {
@@ -367,7 +367,7 @@
            case 'devNo':
                var param = top.reObject(data).devNo;
                if (param === undefined) {
                    layer.msg("无数据");
                    layer.msg("Нет данных");
                } else {
                   layer.open({
                       type: 2,
@@ -378,7 +378,7 @@
                       content: '../basCrnp/basCrnp_detail.html',
                       success: function(layero, index){
                           $.ajax({
                               url: "/basCrnp/"+ param +"/auth",
                               url: baseUrl+"/basCrnp/"+ param +"/auth",
                               headers: {'token': localStorage.getItem('token')},
                               method: 'GET',
                               success: function (res) {
@@ -442,7 +442,7 @@
        };
        $.ajax({
            url: "/stkPlcm/"+name+"/auth",
            url: baseUrl+"/stkPlcm/"+name+"/auth",
            headers: {'token': localStorage.getItem('token')},
            data: top.reObject(data),
            method: 'POST',
@@ -454,7 +454,7 @@
                        $(this).val("");
                    });
                } else if (res.code === 403){
                    top.location.href = "/";
                    top.location.href = baseUrl+"/";
                }else {
                    layer.msg(res.msg)
                }
@@ -524,7 +524,7 @@
        },
        done: function (res, curr, count) {
            if (res.code === 403) {
                top.location.href = "/";
                top.location.href = baseUrl+"/";
            }
            pageCurr=curr;
            if (res.data.length === 0 && count !== 0) {