| | |
| | | return R.ok(matCodeService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/matCode/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | |
| | | |
| | | private String matNo; |
| | | |
| | | private int count; |
| | | private Double count; |
| | | |
| | | public MatCodeCountDto() { |
| | | } |
| | | |
| | | public MatCodeCountDto(String matNo, int count) { |
| | | public MatCodeCountDto(String matNo, Double count) { |
| | | this.matNo = matNo; |
| | | this.count = count; |
| | | } |
| | |
| | | this.matNo = matNo; |
| | | } |
| | | |
| | | public int getCount() { |
| | | public Double getCount() { |
| | | return count; |
| | | } |
| | | |
| | | public void setCount(int count) { |
| | | public void setCount(Double count) { |
| | | this.count = count; |
| | | } |
| | | } |
| | |
| | | */ |
| | | public class FullStoreParam { |
| | | |
| | | // 托盘条码 |
| | | private String barcode; |
| | | |
| | | // 站点编号 |
| | | private Integer devpNo; |
| | | |
| | |
| | | private String matNo; |
| | | |
| | | // 物料数量 |
| | | private Integer count; |
| | | private Double count; |
| | | |
| | | public String getMatNo() { |
| | | return matNo; |
| | |
| | | this.matNo = matNo; |
| | | } |
| | | |
| | | public Integer getCount() { |
| | | public Double getCount() { |
| | | return count; |
| | | } |
| | | |
| | | public void setCount(Integer count) { |
| | | public void setCount(Double count) { |
| | | this.count = count; |
| | | } |
| | | } |
| | | |
| | | public String getBarcode() { |
| | | return barcode; |
| | | } |
| | | |
| | | public void setBarcode(String barcode) { |
| | | this.barcode = barcode; |
| | | } |
| | | |
| | | public Integer getDevpNo() { |
| | | return devpNo; |
| | | } |
| | |
| | | |
| | | public interface WrkDetlService extends IService<WrkDetl> { |
| | | |
| | | void createWorkDetail(Integer workNo, List<MatCodeCountDto> matCodeCountDtos, Long userId); |
| | | void createWorkDetail(Integer workNo, List<MatCodeCountDto> matCodeCountDtos, String barcode, Long userId); |
| | | |
| | | } |
| | |
| | | param.getList().forEach(elem -> { |
| | | matDtos.add(new MatCodeCountDto(elem.getMatNo(), elem.getCount())); |
| | | }); |
| | | wrkDetlService.createWorkDetail(workNo, matDtos, userId); |
| | | wrkDetlService.createWorkDetail(workNo, matDtos, param.getBarcode(), userId); |
| | | // 更新源站点信息 |
| | | sourceStaNo.setWrkNo(workNo); |
| | | sourceStaNo.setModiUser(userId); |
| | |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void createWorkDetail(Integer workNo, List<MatCodeCountDto> matCodeCountDtos, Long userId) { |
| | | public void createWorkDetail(Integer workNo, List<MatCodeCountDto> matCodeCountDtos, String barcode, Long userId) { |
| | | if (matCodeCountDtos.isEmpty()){ |
| | | return; |
| | | } |
| | |
| | | wrkDetl.setWrkNo(workNo); |
| | | wrkDetl.setIoTime(new Date()); |
| | | wrkDetl.setMatnr(matCode.getMatNo()); // 物料编号 |
| | | wrkDetl.setAnfme((double) dto.getCount()); // 数量 |
| | | wrkDetl.setAnfme(dto.getCount()); // 数量 |
| | | wrkDetl.setZpallet(barcode); // 托盘条码 |
| | | wrkDetl.setLgnum("待定"); // todo |
| | | wrkDetl.setTbnum(0); // todo |
| | | wrkDetl.setTbpos(0); // todo |
| | |
| | | footer { |
| | | position: absolute; |
| | | bottom: 5px; |
| | | width: 100%; |
| | | } |
| | | .layui-btn-container .layui-btn { |
| | | margin-left: 10px; |
| | |
| | | margin-left: 5px; |
| | | margin-bottom: 5px; |
| | | vertical-align: middle; |
| | | } |
| | | |
| | | .layui-btn-primary:hover { |
| | | border-color: #C9C9C9 |
| | | } |
| | |
| | | url: baseUrl+"/full/store/put/start", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify({ |
| | | devpNo: $('#putSiteSelect').val(), |
| | | devpNo: Number($('#putSiteSelect').val()), |
| | | list: matCodeData |
| | | }), |
| | | contentType:'application/json;charset=UTF-8', |
| | |
| | | // ,{field: 'tbnum', align: 'center',title: '转储请求编号'} |
| | | // ,{field: 'tbpos', align: 'center',title: '行项目'} |
| | | // ,{field: 'zmatid', align: 'center',title: '物料标签ID'} |
| | | ,{field: 'maktx', align: 'center',title: '物料描述'} |
| | | // ,{field: 'maktx', align: 'center',title: '物料描述'} |
| | | // ,{field: 'werks', align: 'center',title: '工厂'} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'altme', align: 'center',title: '单位'} |
| | |
| | | */ |
| | | function find(el){ |
| | | if (isEmpty(el.value)) { |
| | | alert(el.value) |
| | | return; |
| | | } |
| | | $.ajax({ |
| | |
| | | margin-bottom: 5px; |
| | | } |
| | | .site-list label { |
| | | padding: 0 0 0 15px; |
| | | padding-right: 15px; |
| | | } |
| | | .site-list span { |
| | | .site-list label span { |
| | | vertical-align: middle; |
| | | font-size: 13px; |
| | | } |
| | |
| | | <footer> |
| | | <!-- 入库口 --> |
| | | <div class="site-list"> |
| | | <label><input class="cool-checkbox" type="radio" name="site"><span>1</span></label> |
| | | <label><input class="cool-checkbox" type="radio" name="site"><span>2</span></label> |
| | | <label><input class="cool-checkbox" type="radio" name="site"><span>3</span></label> |
| | | <span style="display: inline-block; margin:0 0 0 10px; font-size: 12px">入库口:</span> |
| | | </div> |
| | | <div class="layui-btn-container"> |
| | | <button type="button" class="layui-btn layui-btn-xs layui-btn-primary" onclick="reset()">重置</button> |
| | |
| | | </body> |
| | | <script> |
| | | var tableIns; |
| | | window.onload = function(){ |
| | | document.getElementById("code").focus(); |
| | | getInBound(); |
| | | } |
| | | |
| | | layui.use(['table','laydate', 'form'], function() { |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | |
| | | |
| | | }); |
| | | |
| | | window.onload = function(){document.getElementById("code").focus();} |
| | | // 获取入库口 |
| | | function getInBound(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/available/put/site", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'POST', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | var tpl = $("#inSitesTemplate").html(); |
| | | var template = Handlebars.compile(tpl); |
| | | var html = template(res); |
| | | $('.site-list').append(html); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/pda"; |
| | | }else { |
| | | tips("获取入库口失败", true) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 提取物料 |
| | | var matCodeLayerIdx; |
| | | function getMat() { |
| | | matCodeLayerIdx = layer.open({ |
| | |
| | | tips("请提取物料", true); |
| | | return; |
| | | } |
| | | let site = $('input:radio[name="site"]:checked').next("span").html(); |
| | | console.log(site); |
| | | if (null === site || undefined === site) { |
| | | tips("请选择入库口", true); |
| | | return; |
| | | } |
| | | $.ajax({ |
| | | url: baseUrl+"/mobile/comb/auth", |
| | | url: baseUrl+"/full/store/put/start", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify({ |
| | | barcode: barcode, |
| | | combMats: matData |
| | | devpNo: site, |
| | | list: matData |
| | | }), |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | reset(); |
| | | tips("组托成功") |
| | | tips("启动入库成功") |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/pda"; |
| | | } else { |
| | |
| | | tips.css("color", warn?"red":'#666'); |
| | | } |
| | | </script> |
| | | <script type="text/template" id="inSitesTemplate"> |
| | | {{#each data}} |
| | | <label><input class="cool-checkbox" type="radio" name="site"><span>{{this}}</span></label> |
| | | {{/each}} |
| | | </script> |
| | | </html> |