| | |
| | | {type: 'checkbox'} |
| | | ,{field: 'shuttleNo', align: 'center',title: '四向穿梭车号', width: 120} |
| | | ,{field: 'status$', align: 'center',title: '状态'} |
| | | ,{field: 'shuttleStatus', 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} |
| | |
| | | return d.shuttleNo; |
| | | })); |
| | | break; |
| | | case 'oneUpdateCharge': |
| | | 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) { |
| | | 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 'exportData': |
| | | admin.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | |
| | | } |
| | | }); |
| | | |
| | | function showUpdateCharge() { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '600px', |
| | | title: '一键修改电量线', |
| | | content: $('#updateChargeDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | form.on('submit(editSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/basShuttle/updateCharge", |
| | | 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}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | return false; |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /* 弹窗 - 新增、修改 */ |
| | | function showEditModel(mData) { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '600px', |
| | | title: (mData ? '修改' : '添加') + '订单状态', |
| | | title: (mData ? '修改' : '添加') + '小车数据', |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | layDateRender(mData); |