| | |
| | | |
| | | @RequestMapping(value = "/locDetlOut/auth") |
| | | @ManagerAuth |
| | | public R stockOutListAll(@RequestParam(value = "matnrs[]",required = false) List<String> matnrs){ |
| | | if (!matnrs.isEmpty()) { |
| | | public R stockOutListAll(@RequestParam(value = "locNos[]") List<String> locNos,@RequestParam(value = "matnrs[]",required = false) List<String> matnrs){ |
| | | if (!locNos.isEmpty()&&!matnrs.isEmpty()) { |
| | | List<LocDetl> res = new ArrayList<>(); |
| | | for (String locNo : new HashSet<>(locNos)) { |
| | | for (String matnr : new HashSet<>(matnrs)) { |
| | | List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("matnr",matnr)); |
| | | List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("matnr",matnr).eq("loc_no",locNo)); |
| | | if (!locDetls.isEmpty()) { |
| | | res.addAll(locDetls); |
| | | } |
| | | } |
| | | } |
| | | return R.ok().add(res); |
| | | } |
| | | return R.parse(BaseRes.EMPTY); |
| | |
| | | layer.msg("请选择数据", {icon: 2}); |
| | | return; |
| | | } |
| | | // let locNos = []; |
| | | let locNos = []; |
| | | let matnrs = []; |
| | | // data.forEach(function(elem) { |
| | | // // locNos.push(elem.locNo); |
| | | // matnrs.push(elem.matnr); |
| | | // }); |
| | | data.forEach(function(elem) { |
| | | locNos.push(elem.locNo); |
| | | matnrs.push(elem.matnr); |
| | | }); |
| | | $.ajax({ |
| | | url: baseUrl+"/locDetlOut/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | // data: {locNos:locNos,matnrs:matnrs}, |
| | | data: {matnrs}, |
| | | data: {locNos:locNos,matnrs:matnrs}, |
| | | method: 'POST', |
| | | async: false, |
| | | success: function (res) { |