| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDevp/visualized/list/auth") |
| | | public R visualizedList(@RequestBody JSONObject param){ |
| | | |
| | | String stationCode = param.get("stationCode").toString(); |
| | | |
| | | |
| | | Map<String, Object> result = agvBasDevpService.getAgvBasDevpDtoByStationCode(stationCode); |
| | | |
| | | return R.ok(result); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.AgvBasDevp; |
| | | import com.zy.asrs.entity.param.CombParam; |
| | | import com.zy.asrs.service.AgvBasDevpService; |
| | |
| | | List<String> devNos = (List<String>) map.get("devNo"); |
| | | |
| | | List<AgvBasDevp> agvBasDevpList = devNos.stream().map(devNo -> { |
| | | AgvBasDevp agvBasDevp = agvBasDevpService.selectById(devNo); |
| | | if (!"F".equals(agvBasDevp.getLocSts())) { |
| | | throw new CoolException("当前站点货位状态不为F.在库,请重新选择"); |
| | | } |
| | | return agvBasDevp; |
| | | return agvBasDevpService.selectById(devNo); |
| | | }).collect(Collectors.toList()); |
| | | |
| | | workService.createWaitPainWrkMastStart(agvBasDevpList, getUserId()); |
| | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.AgvBasDevp; |
| | | |
| | | import java.util.Map; |
| | | |
| | | public interface AgvBasDevpService extends IService<AgvBasDevp> { |
| | | |
| | | public void clearBasDevp(); |
| | |
| | | public void initBasDevp(); |
| | | |
| | | public void updateLocStsAndBarcodeByDevNo(String devNo, String locSts, String barcode); |
| | | |
| | | public Map<String, Object> getAgvBasDevpDtoByStationCode(String stationCode); |
| | | } |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.entity.AgvBasDevp; |
| | | import com.zy.asrs.entity.AgvWaitPakin; |
| | | import com.zy.asrs.entity.AgvWrkMast; |
| | | import com.zy.asrs.mapper.AgvBasDevpMapper; |
| | | import com.zy.asrs.service.AgvBasDevpService; |
| | | import com.zy.asrs.service.AgvWaitPakinService; |
| | | import com.zy.asrs.service.AgvWrkDetlService; |
| | | import com.zy.asrs.service.AgvWrkMastService; |
| | | import com.zy.common.model.AgvBasDevpDto; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | @Transactional |
| | |
| | | |
| | | @Autowired |
| | | AgvBasDevpMapper agvBasDevpMapper; |
| | | @Autowired |
| | | AgvWrkMastService agvWrkMastService; |
| | | @Autowired |
| | | AgvWrkDetlService agvWrkDetlService; |
| | | @Autowired |
| | | AgvWaitPakinService agvWaitPakinService; |
| | | |
| | | public void clearBasDevp(){ |
| | | agvBasDevpMapper.deleteAll(); |
| | |
| | | this.updateById(agvBasDevp); |
| | | } |
| | | |
| | | public Map<String, Object> getAgvBasDevpDtoByStationCode(String stationCode) { |
| | | |
| | | List<Map<String, Object>> body = new ArrayList<>(); |
| | | for(int i=3; i>=1; i--){ |
| | | List<AgvBasDevp> agvBasDevpList = this.selectList(new EntityWrapper<AgvBasDevp>() |
| | | .eq("station_code", stationCode) |
| | | .like("dev_no","0"+ i +"@")); |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | |
| | | List<AgvBasDevpDto> agvBasDevpDtoList = agvBasDevpList.stream().map(agvBasDevp -> { |
| | | AgvBasDevpDto agvBasDevpDto = new AgvBasDevpDto(); |
| | | BeanUtils.copyProperties(agvBasDevp, agvBasDevpDto); |
| | | |
| | | if (Cools.isEmpty(agvBasDevpDto.getBarcode())) { |
| | | return agvBasDevpDto; |
| | | } |
| | | |
| | | AgvWaitPakin agvWaitPakin = agvWaitPakinService.selectOne(new EntityWrapper<AgvWaitPakin>() |
| | | .eq("zpallet", agvBasDevpDto.getBarcode())); |
| | | |
| | | agvBasDevpDto.setAgvWaitPakin(agvWaitPakin); |
| | | |
| | | AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>() |
| | | .eq("barcode", agvBasDevpDto.getBarcode())); |
| | | |
| | | agvBasDevpDto.setAgvWrkMast(agvWrkMast); |
| | | |
| | | return agvBasDevpDto; |
| | | |
| | | }).collect(Collectors.toList()); |
| | | |
| | | map.put("loc",agvBasDevpDtoList); |
| | | body.add(map); |
| | | } |
| | | |
| | | Map<String, Object> result = new HashMap<>(); |
| | | result.put("body", body); |
| | | |
| | | return result; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | agvBasDevpList.forEach(agvBasDevp -> { |
| | | if(Cools.isEmpty(agvBasDevp.getBarcode())){ |
| | | throw new CoolException("选中的站点中含有位绑定托盘的站点,请重新选择"); |
| | | throw new CoolException("选中的站点中含有未绑定托盘的站点,请重新选择"); |
| | | } |
| | | |
| | | if(!"F".equals(agvBasDevp.getLocSts())){ |
New file |
| | |
| | | package com.zy.common.model; |
| | | |
| | | import com.zy.asrs.entity.AgvBasDevp; |
| | | import com.zy.asrs.entity.AgvWaitPakin; |
| | | import com.zy.asrs.entity.AgvWrkMast; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 用于展示AGV站点可视化管理页面的数据 |
| | | */ |
| | | @Data |
| | | public class AgvBasDevpDto extends AgvBasDevp { |
| | | |
| | | private AgvWrkMast agvWrkMast; |
| | | |
| | | private AgvWaitPakin agvWaitPakin; |
| | | |
| | | } |
New file |
| | |
| | | var pageCurr; |
| | | layui.use(['table','laydate', 'form'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#agvBasDevp', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/agv/basDevp/list/auth', |
| | | page: true, |
| | | limit: 16, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {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: '工作位编号',width:150} |
| | | // ,{field: 'decDesc', align: 'center',title: '设备描述'} |
| | | // ,{field: 'devMk', align: 'center',title: '备注'} |
| | | ,{field: 'inEnable', align: 'center',title: '可入', templet:function(row){ |
| | | var html = "<input value='inEnable' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | if(row.inEnable === 'Y'){html += " checked ";} |
| | | html += ">"; |
| | | return html; |
| | | }} |
| | | ,{field: 'outEnable', align: 'center',title: '可出', templet:function(row){ |
| | | var html = "<input value='outEnable' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | if(row.outEnable === 'Y'){html += " checked ";} |
| | | html += ">"; |
| | | return html; |
| | | }} |
| | | ,{field: 'autoing', align: 'center',title: '自动', templet:function(row){ |
| | | var html = "<input value='autoing' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | if(row.autoing === 'Y'){html += " checked ";} |
| | | html += ">"; |
| | | return html; |
| | | }} |
| | | // ,{field: 'loading', align: 'center',title: '有物', templet:function(row){ |
| | | // var html = "<input value='loading' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | // if(row.loading === 'Y'){html += " checked ";} |
| | | // html += ">"; |
| | | // return html; |
| | | // }} |
| | | // ,{field: 'canining', align: 'center',title: '能入', templet:function(row){ |
| | | // var html = "<input value='canining' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | // if(row.canining === 'Y'){html += " checked ";} |
| | | // html += ">"; |
| | | // return html; |
| | | // }} |
| | | // ,{field: 'canouting', align: 'center',title: '能出', templet:function(row){ |
| | | // var html = "<input value='canouting' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | // if(row.canouting === 'Y'){html += " checked ";} |
| | | // html += ">"; |
| | | // return html; |
| | | // }} |
| | | // ,{field: 'fronting', align: 'center',title: ''} |
| | | // ,{field: 'rearing', align: 'center',title: ''} |
| | | // ,{field: 'uping', align: 'center',title: ''} |
| | | // ,{field: 'downing', align: 'center',title: ''} |
| | | // ,{field: 'inreq1', align: 'center',title: '需求1', templet:function(row){ |
| | | // var html = "<input value='inreq1' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | // if(row.inreq1 === 'Y'){html += " checked ";} |
| | | // html += ">"; |
| | | // return html; |
| | | // }} |
| | | ,{field: 'cacheShelves', align: 'center',title: '是否缓存货架', templet:function(row){ |
| | | var html = "<input value='cacheShelves' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | if(row.cacheShelves === 'Y'){html += " checked ";} |
| | | html += ">"; |
| | | return html; |
| | | }} |
| | | ,{field: 'locSts$', align: 'center',title: '货位状态'} |
| | | //,{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: 'row1', align: 'center',title: ''} |
| | | // ,{field: 'ioTime$', align: 'center',title: ''} |
| | | // ,{field: 'area', align: 'center',title: ''} |
| | | // ,{field: 'inOk', align: 'center',title: ''} |
| | | // ,{field: 'outOk', align: 'center',title: ''} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员',event: 'modiUser', hide:true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', hide:true} |
| | | // ,{field: 'appeUser$', align: 'center',title: '创建者',event: 'appeUser', style: 'text-decoration: underline;cursor:pointer'} |
| | | // ,{field: 'appeTime$', align: 'center',title: '添加时间'} |
| | | // ,{field: 'stdQty', align: 'center',title: ''} |
| | | // ,{field: 'minWt', align: 'center',title: ''} |
| | | // ,{field: 'maxWt', align: 'center',title: ''} |
| | | //,{field: 'grossWt', align: 'center',title: '重量'} |
| | | // ,{field: 'cartPos', align: 'center',title: ''} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:200} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | form.on('checkbox(tableCheckbox)', function (data) { |
| | | var _index = $(data.elem).attr('table-index')||0; |
| | | if(data.elem.checked){ |
| | | res.data[_index][data.value] = 'Y'; |
| | | }else{ |
| | | res.data[_index][data.value] = 'N'; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | // 页面修改 |
| | | table.on('edit(basDevp)', function (obj) { |
| | | if (isNaN(obj.value)) { |
| | | layer.msg("请输入数字"); |
| | | tableReload(); |
| | | return; |
| | | } |
| | | $.ajax({ |
| | | url: baseUrl+"/agv/basDevp/update/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: top.reObject({ |
| | | devNo: obj.data.devNo, |
| | | wrkNo: obj.value |
| | | }), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | $(".layui-laypage-btn")[0].click(); |
| | | layer.msg(res.msg); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(basDevp)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: 1 |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(basDevp)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '新增', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: false, |
| | | content: 'basDevp_detail.html', |
| | | success: function(layero, index){ |
| | | layer.getChildFrame('#autoing,#loading,#canining,#canouting,#inreq1,#inreq2,#wrkNo,#barcode,#ctnType,#grossWt', index).parent().parent().hide(); |
| | | layer.getChildFrame('#data-detail-submit-edit', index).hide(); |
| | | clearFormVal(layer.getChildFrame('#detail', index)); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | } |
| | | }); |
| | | break; |
| | | case 'refreshData': |
| | | tableIns.reload({ |
| | | page: { |
| | | curr: pageCurr |
| | | } |
| | | }); |
| | | limit(); |
| | | break; |
| | | case 'deleteData': |
| | | var data = checkStatus.data; |
| | | if (data.length === 0){ |
| | | layer.msg('请选择数据'); |
| | | } else { |
| | | layer.confirm('确定删除'+(data.length===1?'此':data.length)+'条数据吗', function(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/agv/basDevp/delete/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 "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(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'basDevp': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/agv/basDevp/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(basDevp)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | // 详情 |
| | | case 'detail': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: false, |
| | | content: 'basDevp_detail.html', |
| | | success: function(layero, index){ |
| | | setFormVal(layer.getChildFrame('#detail', index), data, true); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); |
| | | layer.getChildFrame('#data-detail-submit-save,#prompt', index).hide(); |
| | | layer.getChildFrame('#data-detail-submit-edit', index).hide(); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('select'); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); |
| | | } |
| | | }); |
| | | break; |
| | | // 编辑 |
| | | case 'edit': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '修改', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: false, |
| | | content: 'basDevp_detail.html', |
| | | success: function(layero, index){ |
| | | layer.getChildFrame('#data-detail-submit-save', index).hide(); |
| | | setFormVal(layer.getChildFrame('#detail', index), data, false); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), false); |
| | | top.convertDisabled(layer.getChildFrame('#devNo', index), true); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | 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': |
| | | var param = top.reObject(data).modiUser; |
| | | if (param === undefined) { |
| | | layer.msg("无数据"); |
| | | } else { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '修改详情', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: false, |
| | | content: '../user/user_detail.html', |
| | | success: function(layero, index){ |
| | | $.ajax({ |
| | | url: baseUrl+"/user/"+ param +"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | setFormVal(layer.getChildFrame('#detail', index), res.data, true); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); |
| | | layer.getChildFrame('#password,#createTime\\$,#status', index).parent().parent().hide(); |
| | | layer.getChildFrame('#data-detail-submit,#prompt', index).hide(); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('select'); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); |
| | | } else if (res.code === 403){ |
| | | parent.location.href = "/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | break; |
| | | case 'appeUser': |
| | | var param = top.reObject(data).appeUser; |
| | | if (param === undefined) { |
| | | layer.msg("无数据"); |
| | | } else { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '创详情', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: false, |
| | | content: '../user/user_detail.html', |
| | | success: function(layero, index){ |
| | | $.ajax({ |
| | | url: baseUrl+"/user/"+ param +"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | setFormVal(layer.getChildFrame('#detail', index), res.data, true); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); |
| | | layer.getChildFrame('#data-detail-submit', index).hide(); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('select'); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); |
| | | } else if (res.code === 403){ |
| | | parent.location.href = "/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | break; |
| | | |
| | | } |
| | | }); |
| | | |
| | | // 数据保存动作 |
| | | form.on('submit(save)', function () { |
| | | if (banMsg != null){ |
| | | layer.msg(banMsg); |
| | | return; |
| | | } |
| | | method("add"); |
| | | }); |
| | | |
| | | // 数据修改动作 |
| | | form.on('submit(edit)', function () { |
| | | method("update") |
| | | }); |
| | | |
| | | function method(name){ |
| | | var index = layer.load(1, { |
| | | shade: [0.5,'#000'] //0.1透明度的背景 |
| | | }); |
| | | var data = { |
| | | // id: $('#id').val(), |
| | | stationCode: $('#stationCode').val(), |
| | | devNo: $('#devNo').val(), |
| | | cacheShelves: $('#cacheShelves').val(), |
| | | decDesc: $('#decDesc').val(), |
| | | devMk: $('#devMk').val(), |
| | | inEnable: $('#inEnable').val(), |
| | | outEnable: $('#outEnable').val(), |
| | | autoing: $('#autoing').val(), |
| | | loading: $('#loading').val(), |
| | | canining: $('#canining').val(), |
| | | canouting: $('#canouting').val(), |
| | | fronting: $('#fronting').val(), |
| | | rearing: $('#rearing').val(), |
| | | uping: $('#uping').val(), |
| | | downing: $('#downing').val(), |
| | | inreq1: $('#inreq1').val(), |
| | | inreq2: $('#inreq2').val(), |
| | | wrkNo: $('#wrkNo').val(), |
| | | wrkNo1: $('#wrkNo1').val(), |
| | | ctnType: $('#ctnType').val(), |
| | | barcode: $('#barcode').val(), |
| | | inQty: $('#inQty').val(), |
| | | row1: $('#row1').val(), |
| | | ioTime: top.strToDate($('#ioTime\\$').val()), |
| | | area: $('#area').val(), |
| | | inOk: $('#inOk').val(), |
| | | outOk: $('#outOk').val(), |
| | | modiUser: $('#modiUser').val(), |
| | | modiTime: top.strToDate($('#modiTime\\$').val()), |
| | | appeUser: $('#appeUser').val(), |
| | | appeTime: top.strToDate($('#appeTime\\$').val()), |
| | | stdQty: $('#stdQty').val(), |
| | | minWt: $('#minWt').val(), |
| | | maxWt: $('#maxWt').val(), |
| | | grossWt: $('#grossWt').val(), |
| | | cartPos: $('#cartPos').val(), |
| | | |
| | | }; |
| | | console.log(data); |
| | | $.ajax({ |
| | | url: baseUrl+"/agv/basDevp/"+name+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: top.reObject(data), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | parent.layer.closeAll(); |
| | | parent.$(".layui-laypage-btn")[0].click(); |
| | | $("#data-detail :input").each(function () { |
| | | $(this).val(""); |
| | | }); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | layer.close(index); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 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) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 搜索栏重置事件 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | layDate.render({ |
| | | elem: '#ioTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#modiTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#appeTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | (child ? parent.tableIns : tableIns).reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | if (res.data.length === 0 && count !== 0) { |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr-1 |
| | | } |
| | | }); |
| | | pageCurr -= 1; |
| | | } |
| | | limit(child); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function setFormVal(el, data, showImg) { |
| | | for (var val in data) { |
| | | var find = el.find(":input[id='" + val + "']"); |
| | | if (find[0]!=null){ |
| | | if (find[0].type === 'checkbox'){ |
| | | if (data[val]==='Y'){ |
| | | find.attr("checked","checked"); |
| | | find.val('Y'); |
| | | } else { |
| | | find.remove("checked"); |
| | | find.val('N'); |
| | | } |
| | | continue; |
| | | } |
| | | } |
| | | find.val(data[val]); |
| | | if (showImg){ |
| | | var next = find.next(); |
| | | if (next.get(0)){ |
| | | if (next.get(0).localName === "img") { |
| | | find.hide(); |
| | | next.attr("src", data[val]); |
| | | next.show(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | function clearFormVal(el) { |
| | | $(':input', el) |
| | | .val('') |
| | | .removeAttr('checked') |
| | | .removeAttr('selected'); |
| | | } |
| | | |
| | | function detailScreen(index) { |
| | | var detail = layer.getChildFrame('#data-detail', index); |
| | | var height = detail.height()+60; |
| | | if (height > ($(window).height()*0.9)) { |
| | | height = ($(window).height()*0.8); |
| | | } |
| | | layer.style(index, { |
| | | // top: (($(window).height()-height)/3)+"px", |
| | | height: height+'px' |
| | | }); |
| | | } |
| | | |
| | | $('body').keydown(function () { |
| | | if (event.keyCode === 13) { |
| | | $("#search").click(); |
| | | } |
| | | }); |
| | |
| | | var cols = [ |
| | | {field: 'locNo', align: 'center',title: '库位号'}, |
| | | {field: 'matnr', align: 'center',title: '物料号', sort:true} |
| | | ,{field: 'maktx', align: 'center',title: '物料号', sort:true} |
| | | ,{field: 'maktx', align: 'center',title: '物料名称', sort:true} |
| | | ,{field: 'orderNo', align: 'center',title: '单据编号', hide: false} |
| | | ,{field: 'batch', align: 'center',title: '序列码', width: 300, sort:true} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | |
| | | var cols = [ |
| | | {field: 'locNo$', align: 'center',title: '库位号'}, |
| | | {field: 'matnr', align: 'center',title: '物料号', sort:true} |
| | | ,{field: 'maktx', align: 'center',title: '物料号', sort:true} |
| | | ,{field: 'maktx', align: 'center',title: '物料名称', sort:true} |
| | | ,{field: 'orderNo', align: 'center',title: '单据编号', hide: false} |
| | | ,{field: 'batch', align: 'center',title: '序列码', width: 300, sort:true} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | |
| | | cols: [[ |
| | | {type: 'numbers'}, |
| | | {field: 'matnr', title: '物料号', width: 160}, |
| | | {field: 'maktx', title: '物料号', width: 160}, |
| | | {field: 'maktx', title: '物料名称', width: 160}, |
| | | {field: 'batch', title: '序列码'}, |
| | | {field: 'anfme', title: '数量'}, |
| | | {field: 'qty', title: '作业数量', style: 'font-weight: bold'}, |
| | |
| | | cols: [[ |
| | | {type: 'numbers', title: '#'}, |
| | | {field: 'matnr', title: '物料号', width: 160}, |
| | | {field: 'maktx', title: '物料号', width: 200}, |
| | | {field: 'maktx', title: '物料名称', width: 200}, |
| | | {field: 'batch', title: '序列码', edit: true}, |
| | | {field: 'specs', title: '规格'}, |
| | | {field: 'anfme', title: '数量(修改)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, |
| | |
| | | ,{type: 'numbers', title: '#'} |
| | | ,{field: 'orderNo', align: 'center',title: '单据编号', templet: '#orderNoTpl', width: 160} |
| | | ,{field: 'matnr', align: 'center',title: '物料号', width: 160} |
| | | ,{field: 'maktx', align: 'center',title: '物料号', width: 200} |
| | | ,{field: 'maktx', align: 'center',title: '物料名称', width: 200} |
| | | ,{field: 'batch', align: 'center',title: '序列码'} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | // ,{field: 'anfme', align: 'center',title: '数量'} |
| | |
| | | cols: [[ |
| | | {type: 'checkbox'}, |
| | | {field: 'matnr', title: '物料号', align: 'center', width: 350}, |
| | | {field: 'maktx', title: '物料号', align: 'center'}, |
| | | {field: 'maktx', title: '物料名称', align: 'center'}, |
| | | {field: 'specs', title: '规格', align: 'center'}, |
| | | {field: 'batch', title: '批号', align: 'center'}, |
| | | {field: 'anfme', title: '数量', align: 'center', width: 90, style: 'font-weight: bold'}, |
| | |
| | | ,{field: 'orderId$', align: 'center',title: '订单内码'} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'matnr', align: 'center',title: '物料号'} |
| | | ,{field: 'maktx', align: 'center',title: '物料号'} |
| | | ,{field: 'maktx', align: 'center',title: '物料名称'} |
| | | ,{field: 'name', align: 'center',title: '名称'} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'model', align: 'center',title: '通用型号'} |
| | |
| | | var cols = [ |
| | | {field: 'oneday', align: 'center', title: '入库日期', width: 200} |
| | | ,{field: 'matnr', align: 'center',title: '物料号'} |
| | | ,{field: 'maktx', align: 'center',title: '物料号'} |
| | | ,{field: 'maktx', align: 'center',title: '物料名称'} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ]; |
| | | |
| | |
| | | var cols = [ |
| | | {field: 'oneday', align: 'center', title: '入库日期', width: 200} |
| | | ,{field: 'matnr', align: 'center',title: '物料号'} |
| | | ,{field: 'maktx', align: 'center',title: '物料号'} |
| | | ,{field: 'maktx', align: 'center',title: '物料名称'} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ]; |
| | | |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en" xmlns="http://www.w3.org/1999/html"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 搜索栏 --> |
| | | <div id="search-box" class="layui-form layui-card-header"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">楼层:</label> |
| | | <div class="layui-input-inline"> |
| | | <select id="floorSelect" name="row" lay-filter="floorSelect"> |
| | | <option value="1">1楼</option> |
| | | <option value="3">3楼</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 120px">缓存货架站:</label> |
| | | <div class="layui-input-inline"> |
| | | <select id="rowSelect" name="row" lay-filter="rowSelect"> |
| | | <option value="CS-101">1号</option> |
| | | <option value="CS-102">2号</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 待添加 --> |
| | | <div id="data-search-btn" class="layui-btn-container layui-form-item"> |
| | | <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">搜索</button> |
| | | <button id="checkAll" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="checkAll">全选</button> |
| | | <button id="uncheckAll" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="uncheckAll">反选</button> |
| | | <button id="start" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="start">启动入库</button> |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="basDevpContain"> |
| | | <table class="layui-table" id="basDevpMap" lay-filter="basDevpMap"></table> |
| | | </div> |
| | | |
| | | <script type="text/template" id="basDevpMapTemplate"> |
| | | <tbody id="tb"> |
| | | {{#each body}} |
| | | <tr style="height: 280px"> |
| | | {{#each loc}} |
| | | <td class="a-loc" title="{{devNo}}" style="background-color:blue;color:white"> |
| | | <div class="layui-card-body" > |
| | | <div style="float:left; width:15%;"> |
| | | <input type="checkbox" lay-skin="primary" name="cardCheckBox" value="{{devNo}}"/> |
| | | </div> |
| | | <div style="float:right; width:85%;"> |
| | | <div> |
| | | 工作站编码:{{devNo}} </br> |
| | | 站点状态:{{locSts$}} |
| | | </div> |
| | | {{#if agvWaitPakin}} |
| | | <div style="padding-top: 10px;"> |
| | | 物料号:{{agvWaitPakin.matnr}} </br> |
| | | {{#if agvWaitPakin.batch}} |
| | | 序列码:{{agvWaitPakin.batch}} </br> |
| | | {{/if}} |
| | | 托盘码:{{agvWaitPakin.zpallet}} </br> |
| | | 数量:{{agvWaitPakin.anfme}} |
| | | </div> |
| | | {{/if}} |
| | | {{#if agvWrkMast}} |
| | | <div style="padding-top: 10px;"> |
| | | 工作号:{{agvWrkMast.wrkNo}} </br> |
| | | 工作状态:{{agvWrkMast.wrkSts$ }} </br> |
| | | 工作类型:{{agvWrkMast.ioType$}} |
| | | </div> |
| | | {{/if}} |
| | | </div> |
| | | </div> |
| | | </td> |
| | | {{/each}} |
| | | </tr> |
| | | {{/each}} |
| | | </tbody> |
| | | </script> |
| | | |
| | | <!--明细表--> |
| | | <div id="detlTable" style="display: none"> |
| | | <div class="layui-inline" style="width:90%;margin-top: 10px;margin-left: 20px"> |
| | | <span style=" color: indianred">以下为当前站点的物料明细</span> |
| | | </div> |
| | | |
| | | <table class="layui-hide" id="basDevpDetl" lay-filter="locDetlByMap"></table> |
| | | </div> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> |
| | | <script type="text/javascript" src="../../static/js/agvBasDevpVisualized/basDevp.js" charset="utf-8"></script> |
| | | |
| | | <iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe> |
| | | |
| | | </body> |
| | | |
| | | <script type="text/javascript"> |
| | | layui.use(['table','laydate', 'form'], function(){ |
| | | var form = layui.form; |
| | | var $ =layui.jquery; |
| | | var table = layui.table; |
| | | var layer = layui.layer; |
| | | var param = {'stationCode' : 'CS-101'}; |
| | | |
| | | form.on('select(floorSelect)', function (data) { |
| | | |
| | | $('#rowSelect').empty(); |
| | | if(data.value == 1){ |
| | | $('#rowSelect').append("<option value=CS-101>1号</option>"); |
| | | $('#rowSelect').append("<option value=CS-102>2号</option>") |
| | | } |
| | | if(data.value == 3){ |
| | | $('#rowSelect').append("<option value=CS-305>1号</option>"); |
| | | $('#rowSelect').append("<option value=CS-306>2号</option>") |
| | | $('#rowSelect').append("<option value=CS-307>3号</option>") |
| | | } |
| | | form.render(); |
| | | |
| | | }); |
| | | |
| | | // 搜索 |
| | | form.on('submit(search)', function (data) { |
| | | param = null; |
| | | param = {'stationCode' : $('#rowSelect').val()}; |
| | | loadData(param); |
| | | // $.ajax({ |
| | | // url: baseUrl+"/agv/basDevp/visualized/list/auth", |
| | | // headers: {'token': localStorage.getItem('token')}, |
| | | // data: JSON.stringify(param), |
| | | // dataType:'json', |
| | | // contentType:'application/json;charset=UTF-8', |
| | | // method: 'POST', |
| | | // success: function (res) { |
| | | // if (res.code === 200){ |
| | | // var tpl = $("#basDevpMapTemplate").html(); |
| | | // var template = Handlebars.compile(tpl); |
| | | // var html = template(res.data); |
| | | // $('#basDevpMap').html(html); |
| | | // } else if (res.code === 403){ |
| | | // top.location.href = baseUrl+"/"; |
| | | // }else { |
| | | // layer.msg(res.msg) |
| | | // } |
| | | // } |
| | | // }) |
| | | }); |
| | | |
| | | //全选 |
| | | form.on('submit(checkAll)', function () { |
| | | var cks = document.querySelectorAll("#tb input"); |
| | | for (var i = 0; i < cks.length; i++) { |
| | | cks[i].checked = true; |
| | | } |
| | | }); |
| | | |
| | | //反选 |
| | | form.on('submit(uncheckAll)', function () { |
| | | var cks = document.querySelectorAll("#tb input"); |
| | | for (var i = 0; i < cks.length; i++) { |
| | | cks[i].checked = !cks[i].checked; |
| | | } |
| | | }); |
| | | |
| | | //启动入库 |
| | | form.on('submit(start)', function () { |
| | | var cks = document.querySelectorAll("#tb input"); |
| | | var devNoList = new Array(); |
| | | for (var i = 0; i < cks.length; i++) { |
| | | if(cks[i].checked){ |
| | | devNoList.push(cks[i].value); |
| | | } |
| | | } |
| | | var param = {'devNo' : devNoList}; |
| | | $.ajax({ |
| | | url: baseUrl+"/agvMobile/pakin/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg) |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | //定时刷新数据 |
| | | //setInterval(loadData(param), 1000); |
| | | |
| | | setInterval(function() { |
| | | loadData(param); |
| | | }, 1000); |
| | | |
| | | function loadData(param){ |
| | | $.ajax({ |
| | | url: baseUrl+"/agv/basDevp/visualized/list/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | var tpl = $("#basDevpMapTemplate").html(); |
| | | var template = Handlebars.compile(tpl); |
| | | var html = template(res.data); |
| | | $('#basDevpMap').html(html); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | }); |
| | | |
| | | </script> |
| | | </html> |
| | | |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">物料号:</label> |
| | | <label class="layui-form-label">物料名称:</label> |
| | | <div class="layui-input-inline"> |
| | | <input name="maktx" class="layui-input" placeholder="物料号"/> |
| | | <input name="maktx" class="layui-input" placeholder="物料名称"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">序列码:</label> |
| | | <label class="layui-form-label">订单号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input name="batch" class="layui-input" placeholder="序列码"/> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">物料号: </label> |
| | | <label class="layui-form-label">物料名称: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="maktx" placeholder="请输入商品名称"> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">序列码: </label> |
| | | <label class="layui-form-label">订单号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="batch" placeholder="请输入序列码"> |
| | | </div> |
| | |
| | | cols: [[ |
| | | {fixed: 'left', align: 'center', field: 'count', title: '数量', style:'color: blue', width:50}, |
| | | {field: 'matnr', align: 'center', title: '物料号'}, |
| | | {field: 'maktx', align: 'center', title: '物料号'} |
| | | {field: 'maktx', align: 'center', title: '物料名称'} |
| | | ]], |
| | | done: function (res, curr, count) { |
| | | } |
| | |
| | | <input id="matnr" type="text" disabled="disabled"> |
| | | </div> |
| | | <div class="form-item"> |
| | | <span>物料号</span> |
| | | <span>物料名称</span> |
| | | <input id="maktx" type="text" disabled="disabled"> |
| | | </div> |
| | | <div class="form-item"> |
| | |
| | | <input id="matNo" type="text" placeholder="扫码 / 输入" onkeyup="find(this)" autocomplete="off"> |
| | | </div> |
| | | <div class="form-item"> |
| | | <span>物料号</span> |
| | | <span>物料名称</span> |
| | | <input id="matName" type="text" disabled="disabled"> |
| | | </div> |
| | | <div class="form-item"> |
| | |
| | | cols: [[ |
| | | {fixed: 'left', align: 'center', field: 'count', title: '数量', style:'color: blue', width:50}, |
| | | {field: 'matnr', align: 'center', title: '物料号'}, |
| | | {field: 'maktx', align: 'center', title: '物料号'} |
| | | {field: 'maktx', align: 'center', title: '物料名称'} |
| | | ]], |
| | | done: function (res, curr, count) { |
| | | |