#
Junjie
昨天 6d5b845378c568a7f403ac5ffd5d5aec4639e7a8
src/main/webapp/static/js/basShuttle/basShuttle.js
@@ -26,19 +26,14 @@
            ,{field: 'status$', align: 'center',title: '状态'}
            // ,{field: 'shuttleStatus', align: 'center',title: '作业态'}
            ,{field: 'wrkNo', align: 'center',title: '任务号'}
            ,{field: 'idleLoc', align: 'center',title: '暂存库位'}
            // ,{field: 'autoCharge', align: 'center',title: '自动充电'}
            // ,{field: 'idleLoc', align: 'center',title: '暂存库位'}
            ,{field: 'chargeLine', align: 'center',title: '电量线'}
            ,{field: 'busyStatus$', align: 'center',title: '小车忙状态'}
            ,{field: 'currentCode', align: 'center',title: '二维码'}
            ,{field: 'batteryPower$', align: 'center',title: '电量'}
            ,{field: 'batteryTemp$', align: 'center',title: '电池温度'}
            // ,{field: 'createBy$', align: 'center',title: '添加人员'}
            // ,{field: 'createTime$', align: 'center',title: '添加时间'}
            // ,{field: 'updateBy$', align: 'center',title: '修改人员'}
            // ,{field: 'updateTime$', align: 'center',title: '修改时间'}
            ,{field: 'memo', align: 'center',title: '备注'}
            ,{field: 'liftNo', align: 'center',title: '提升机号'}
            ,{field: 'pakMk$', align: 'center',title: '标记'}
            ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120}
@@ -101,11 +96,81 @@
                showUpdateCharge();
                break;
            case 'shuttleGather':
                shuttleNos = []
                checkStatus.map(function (d) {
                    shuttleNos.push(d.shuttleNo)
                })
                admin.confirm('确定集合全部小车吗?', {shadeClose: true}, function(){
                    $.ajax({
                        url: baseUrl+"/openapi/shuttleGather",
                        headers: {'token': localStorage.getItem('token')},
                        dataType:'json',
                        data: JSON.stringify({
                            shuttleNos: shuttleNos
                        }),
                        contentType:'application/json;charset=UTF-8',
                        method: 'POST',
                        success: function (res) {
                            layer.closeAll();
                            if (res.code === 200) {
                                layer.msg("请求成功", {icon: 1});
                                tableReload();
                            } else if (res.code === 403) {
                                top.location.href = baseUrl+"/";
                            } else {
                                layer.msg(res.msg, {icon: 2})
                            }
                        }
                    });
                });
                break;
            case 'demoOpen':
                shuttleNos = []
                checkStatus.map(function (d) {
                    shuttleNos.push(d.shuttleNo)
                })
                admin.confirm('确定开启演示模式吗?', {shadeClose: true}, function(){
                    $.ajax({
                        url: baseUrl+"/openapi/shuttleDemo",
                        headers: {'token': localStorage.getItem('token')},
                        dataType:'json',
                        data: JSON.stringify({
                            shuttleNos: shuttleNos,
                            status: 1
                        }),
                        contentType:'application/json;charset=UTF-8',
                        method: 'POST',
                        success: function (res) {
                            layer.closeAll();
                            if (res.code === 200) {
                                layer.msg("请求成功", {icon: 1});
                                tableReload();
                            } else if (res.code === 403) {
                                top.location.href = baseUrl+"/";
                            } else {
                                layer.msg(res.msg, {icon: 2})
                            }
                        }
                    });
                });
                break;
            case 'demoClose':
                shuttleNos = []
                checkStatus.map(function (d) {
                    shuttleNos.push(d.shuttleNo)
                })
                admin.confirm('确定关闭演示模式吗?', {shadeClose: true}, function(){
                    $.ajax({
                        url: baseUrl+"/openapi/shuttleDemo",
                        headers: {'token': localStorage.getItem('token')},
                        dataType:'json',
                        data: JSON.stringify({
                            shuttleNos: shuttleNos,
                            status: 0
                        }),
                        contentType:'application/json;charset=UTF-8',
                        method: 'POST',
                        success: function (res) {