From 9f095733d13185290cfedd242b5f299585fbcad0 Mon Sep 17 00:00:00 2001 From: Junjie <xjj@123> Date: 星期一, 07 四月 2025 10:05:34 +0800 Subject: [PATCH] # --- src/main/webapp/static/js/agvBasDevp/basDevp.js | 134 ++++++++++++++++++++++++++++++++++++++------ 1 files changed, 116 insertions(+), 18 deletions(-) diff --git a/src/main/webapp/static/js/agvBasDevp/basDevp.js b/src/main/webapp/static/js/agvBasDevp/basDevp.js index f1d5413..c17a0b3 100644 --- a/src/main/webapp/static/js/agvBasDevp/basDevp.js +++ b/src/main/webapp/static/js/agvBasDevp/basDevp.js @@ -10,7 +10,7 @@ tableIns = table.render({ elem: '#agvBasDevp', headers: {token: localStorage.getItem('token')}, - url: baseUrl+'/agvBasDevp/list/auth', + url: baseUrl+'/agv/basDevp/list/auth', page: true, limit: 16, limits: [16, 30, 50, 100, 200, 500], @@ -21,7 +21,7 @@ {type: 'checkbox', fixed: 'left'} // ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80} ,{field: 'stationCode', align: 'center',sort:true,title: '宸ヤ綔绔欑紪鍙�'} - ,{field: 'devNo', align: 'center',sort:true,title: '宸ヤ綔浣嶇紪鍙�'} + ,{field: 'devNo', align: 'center',sort:true,title: '宸ヤ綔浣嶇紪鍙�',width:150} // ,{field: 'decDesc', align: 'center',title: '璁惧鎻忚堪'} // ,{field: 'devMk', align: 'center',title: '澶囨敞'} ,{field: 'inEnable', align: 'center',title: '鍙叆', templet:function(row){ @@ -77,11 +77,11 @@ return html; }} ,{field: 'locSts$', align: 'center',title: '璐т綅鐘舵��'} - ,{field: 'wrkNo', align: 'center',title: '宸ヤ綔鍙�', edit:true, style:'color: blue;font-weight: bold'} + //,{field: 'wrkNo', align: 'center',title: '宸ヤ綔鍙�', edit:true, style:'color: blue;font-weight: bold'} ,{field: 'floor', align: 'center',title: '妤�'} //,{field: 'locType1$', align: 'center',title: '楂樹綆'} ,{field: 'barcode', align: 'center',title: '鏉″舰鐮�'} - ,{field: 'inQty', align: 'center',title: '鍏ュ簱鏆傚瓨'} + // ,{field: 'inQty', align: 'center',title: '鍏ュ簱鏆傚瓨'} // ,{field: 'row1', align: 'center',title: ''} // ,{field: 'ioTime$', align: 'center',title: ''} // ,{field: 'area', align: 'center',title: ''} @@ -97,7 +97,7 @@ //,{field: 'grossWt', align: 'center',title: '閲嶉噺'} // ,{field: 'cartPos', align: 'center',title: ''} - ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:150} + ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:200} ]], request: { pageName: 'curr', @@ -139,7 +139,7 @@ return; } $.ajax({ - url: baseUrl+"/basDevp/update/auth", + url: baseUrl+"/agv/basDevp/update/auth", headers: {'token': localStorage.getItem('token')}, data: top.reObject({ devNo: obj.data.devNo, @@ -217,7 +217,7 @@ } else { layer.confirm('纭畾鍒犻櫎'+(data.length===1?'姝�':data.length)+'鏉℃暟鎹悧', function(){ $.ajax({ - url: baseUrl+"/basDevp/delete/auth", + url: baseUrl+"/agv/basDevp/delete/auth", headers: {'token': localStorage.getItem('token')}, data: {param: JSON.stringify(data)}, method: 'POST', @@ -235,6 +235,61 @@ }) }); } + break; + case "createWrk": + var data = checkStatus.data; + if (data.length === 0){ + layer.msg('璇烽�夋嫨鏁版嵁'); + } else { + layer.confirm('纭畾鍏ュ簱'+(data.length===1?'姝�':data.length)+'涓珯鐐硅揣鐗╁悧锛�', function(){ + $.ajax({ + url: baseUrl+"/agv/create/waitPain/wrkMast/start", + headers: {'token': localStorage.getItem('token')}, + data: {param: JSON.stringify(data)}, + method: 'POST', + traditional:true, + success: function (res) { + if (res.code === 200){ + layer.closeAll(); + tableReload(false); + } else if (res.code === 403){ + top.location.href = baseUrl+"/"; + } else { + layer.msg(res.msg) + } + } + }) + }) + } + + break; + case "init": + layer.prompt({title: '璇疯緭鍏ュ彛浠わ紝骞堕噸缃簱浣�', formType: 1, shadeClose: true}, function(pass, idx){ + http.get(baseUrl+"/locMast/init/pwd", {pwd: pass}, function (res) { + if (res.data) { + $.ajax({ + url: baseUrl+"/agv/basDevp/init/auth", + headers: {'token': localStorage.getItem('token')}, + data: {param: JSON.stringify(data)}, + method: 'POST', + traditional:true, + success: function (res) { + if (res.code === 200){ + layer.closeAll(); + tableReload(false); + } else if (res.code === 403){ + top.location.href = baseUrl+"/"; + } else { + layer.msg(res.msg) + } + } + }) + } else { + layer.msg("鍙d护閿欒"); + } + layer.close(idx); + }) + }); break; case 'exportData': layer.confirm('纭畾瀵煎嚭Excel鍚�', {shadeClose: true}, function(){ @@ -255,7 +310,7 @@ 'fields': fields }; $.ajax({ - url: baseUrl+"/basDevp/export/auth", + url: baseUrl+"/agv/basDevp/export/auth", headers: {'token': localStorage.getItem('token')}, data: JSON.stringify(param), dataType:'json', @@ -319,6 +374,43 @@ layero.find('iframe')[0].contentWindow.layui.form.render('select'); layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); } + }); + break; + case 'detl': + // locDetl(data.locNo); + if (data.locSts.trim() === '' + || data.locSts.trim() === 'S' + || data.locSts.trim() === 'D' + || data.locSts.trim() === 'O') { + layer.msg("姝ょ珯鐐圭殑鐘舵�佷笉瀛樺湪鐗╂枡"); + return; + } + locDetlToLayer(data.devNo,data.barcode); + break; + case 'unbind': + // locDetl(data.locNo); + if (data.barcode === null || data.barcode.trim() === '') { + layer.msg("姝ょ珯鐐规殏鏈粦瀹氫换浣曟潯鐮�"); + return; + } + layer.confirm('纭畾瑙g粦'+(data.devNo)+'绔欑偣鐨勬墭鐩樼爜锛�', function(){ + $.ajax({ + url: baseUrl+"/agv/basDevp/unbind/auth", + headers: {'token': localStorage.getItem('token')}, + data: {param: JSON.stringify(data)}, + method: 'POST', + traditional:true, + success: function (res) { + if (res.code === 200){ + layer.closeAll(); + tableReload(false); + } else if (res.code === 403){ + top.location.href = baseUrl+"/"; + } else { + layer.msg(res.msg) + } + } + }) }); break; case 'modiUser': @@ -458,7 +550,7 @@ }; console.log(data); $.ajax({ - url: baseUrl+"/agvBasDevp/"+name+"/auth", + url: baseUrl+"/agv/basDevp/"+name+"/auth", headers: {'token': localStorage.getItem('token')}, data: top.reObject(data), method: 'POST', @@ -479,15 +571,21 @@ }) } - // 澶嶉�夋浜嬩欢 - form.on('checkbox(detailCheckbox)', function (data) { - var el = data.elem; - if (el.checked) { - $(el).val('Y'); - } else { - $(el).val('N'); - } - }); + // iframe鐗╂枡璇︽儏 + function locDetlToLayer(val1,val2) { + devNo = val1; + barcode = val2; + layer.open({ + type: 2, + title: '绔欑偣鏄庣粏', + maxmin: true, + area: [top.detailWidth, top.detailHeight], + shadeClose: true, + content: '../agvBasDevp/basDevpWaitPakinDetail.html', + success: function(layero, index){ + } + }); + } // 鎼滅储鏍忔悳绱簨浠� form.on('submit(search)', function (data) { -- Gitblit v1.9.1