From 6d5b845378c568a7f403ac5ffd5d5aec4639e7a8 Mon Sep 17 00:00:00 2001 From: Junjie <540245094@qq.com> Date: 星期三, 13 八月 2025 11:02:14 +0800 Subject: [PATCH] # --- src/main/webapp/static/js/basShuttle/basShuttle.js | 139 +++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 131 insertions(+), 8 deletions(-) diff --git a/src/main/webapp/static/js/basShuttle/basShuttle.js b/src/main/webapp/static/js/basShuttle/basShuttle.js index e4811cb..ca1c240 100644 --- a/src/main/webapp/static/js/basShuttle/basShuttle.js +++ b/src/main/webapp/static/js/basShuttle/basShuttle.js @@ -24,21 +24,16 @@ {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} @@ -97,6 +92,101 @@ 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=[]; @@ -151,12 +241,45 @@ } }); + 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); -- Gitblit v1.9.1