| | |
| | | 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], |
| | |
| | | {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){ |
| | |
| | | ,{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: ''} |
| | |
| | | //,{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', |
| | |
| | | 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, |
| | |
| | | } 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', |
| | |
| | | }) |
| | | }); |
| | | } |
| | | 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("口令错误"); |
| | | } |
| | | layer.close(idx); |
| | | }) |
| | | }); |
| | | break; |
| | | case 'exportData': |
| | | layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | |
| | | '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', |
| | |
| | | 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.barcode); |
| | | break; |
| | | case 'unbind': |
| | | // locDetl(data.locNo); |
| | | if (data.barcode === null || data.barcode.trim() === '') { |
| | | layer.msg("此站点暂未绑定任何条码"); |
| | | return; |
| | | } |
| | | layer.confirm('确定解绑'+(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': |
| | |
| | | }; |
| | | 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', |
| | |
| | | }) |
| | | } |
| | | |
| | | // 复选框事件 |
| | | form.on('checkbox(detailCheckbox)', function (data) { |
| | | var el = data.elem; |
| | | if (el.checked) { |
| | | $(el).val('Y'); |
| | | } else { |
| | | $(el).val('N'); |
| | | } |
| | | }); |
| | | // iframe物料详情 |
| | | function locDetlToLayer(val) { |
| | | barcode = val; |
| | | 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) { |