| | |
| | | private String supplier; |
| | | |
| | | private String memo; |
| | | //供应商 |
| | | private String vendor; |
| | | //来源 |
| | | private String source; |
| | | |
| | | public String getVendor(){return vendor;} |
| | | |
| | | public void setVendor(String vendor){this.vendor=vendor;} |
| | | |
| | | public String getSource() { return source; } |
| | | |
| | | public void setSource(String source) { |
| | | this.source = source; |
| | | } |
| | | |
| | | public String getMemo() { |
| | | return memo; |
| | |
| | | */ |
| | | @ApiModelProperty(value= "总重量") |
| | | @TableField("all_weight") |
| | | private double allWeight; |
| | | private Double allWeight; |
| | | /** |
| | | * 来源:1、外协 2、自制 3、客供 |
| | | * 来源 |
| | | */ |
| | | @ApiModelProperty(value="来源:1、外协 2、自制 3、客供") |
| | | private Integer source; |
| | | @ApiModelProperty(value="来源") |
| | | private String source; |
| | | /** |
| | | * 供应商 |
| | | * 批号 |
| | | */ |
| | | @ApiModelProperty(value = "批号") |
| | | private String supplier; |
| | |
| | | * 供应商 |
| | | */ |
| | | @ApiModelProperty(value = "供应商") |
| | | @TableField("batch_number") |
| | | private String batchNumber; |
| | | private String vendor; |
| | | /** |
| | | * 备注 |
| | | */ |
| | |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date appeTime; |
| | | |
| | | /** |
| | | * 单箱数量 |
| | | */ |
| | | @ApiModelProperty(value = "单箱数量") |
| | | @TableField("qty_box") |
| | | private Double qtyBox; |
| | | |
| | | public PltBarcode() {} |
| | | |
| | | public PltBarcode(String barcode,double allQty,Integer source,String supplier,String batchNumber,double allWeight,String billNo,Integer seqNo,Integer billType,String matNo,String matName,Double qty,String locNo,String specs,String unit,String size,String color,Double weight,String memo,Integer linkErp,Integer ioStatus,Date ioTime,Long modiUser,Date modiTime,Long appeUser,Date appeTime) { |
| | | public PltBarcode(String barcode,Double allQty,Double qtyBox,String source,String supplier,String vendor,Double allWeight,String billNo,Integer seqNo,Integer billType,String matNo,String matName,Double qty,String locNo,String specs,String unit,String size,String color,Double weight,String memo,Integer linkErp,Integer ioStatus,Date ioTime,Long modiUser,Date modiTime,Long appeUser,Date appeTime) { |
| | | this.barcode = barcode; |
| | | this.billNo = billNo; |
| | | this.seqNo = seqNo; |
| | |
| | | this.allWeight=allWeight; |
| | | this.source=source; |
| | | this.supplier=supplier; |
| | | this.batchNumber=batchNumber; |
| | | this.vendor=vendor; |
| | | this.qtyBox=qtyBox; |
| | | } |
| | | |
| | | // PltBarcode pltBarcode = new PltBarcode( |
| | |
| | | |
| | | public double getAllWeight(){return allWeight;} |
| | | |
| | | public void setAllWeight(double allweight){this.allWeight=allweight;} |
| | | public void setAllWeight(Double allweight){this.allWeight=allweight;} |
| | | |
| | | public double getAllQty(){return allQty;} |
| | | public Double getAllQty(){return allQty;} |
| | | |
| | | public void setAllQty(double allqty){this.allQty=allqty;} |
| | | public void setAllQty(Double allqty){this.allQty=allqty;} |
| | | |
| | | public String getBillNo() { |
| | | return billNo; |
| | |
| | | |
| | | public Integer getBillType() { |
| | | return billType; |
| | | } |
| | | |
| | | public String getSource$(){ |
| | | if (null == this.source){ return null; } |
| | | switch (this.source){ |
| | | case 1: |
| | | return "外协"; |
| | | case 2: |
| | | return "自制"; |
| | | case 3: |
| | | return "客供"; |
| | | default: |
| | | return String.valueOf(this.source); |
| | | } |
| | | } |
| | | |
| | | public String getBillType$(){ |
| | |
| | | private Double count; |
| | | //批号 |
| | | private String supplier; |
| | | |
| | | //供应商 |
| | | private String vendor; |
| | | //来源 |
| | | private Integer source; |
| | | private String source; |
| | | |
| | | private String memo; |
| | | |
| | | |
| | | public String getVendor(){return vendor;} |
| | | |
| | | public void setVendor(String vendor){this.vendor=vendor;} |
| | | public String getSeqNo() { |
| | | return seqNo; |
| | | } |
| | |
| | | this.seqNo = seqNo; |
| | | } |
| | | |
| | | public Integer getSource() { |
| | | return source; |
| | | } |
| | | public String getSource() { return source; } |
| | | |
| | | public void setSource(Integer source) { |
| | | public void setSource(String source) { |
| | | this.source = source; |
| | | } |
| | | |
| | |
| | | |
| | | private String memo; |
| | | |
| | | //供应商 |
| | | private String vendor; |
| | | //来源 |
| | | private String source; |
| | | |
| | | public String getVendor(){return vendor;} |
| | | |
| | | public void setVendor(String vendor){this.vendor=vendor;} |
| | | |
| | | public String getSource() { return source; } |
| | | |
| | | public void setSource(String source) { |
| | | this.source = source; |
| | | } |
| | | |
| | | public String getMemo() { |
| | | return memo; |
| | | } |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.chrono.IsoEra; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Random; |
| | |
| | | pltBarcode.setUnit(matCode.getUnit()); |
| | | pltBarcode.setSpecs(matCode.getSpecs()); |
| | | pltBarcode.setSize(matCode.getSize()); |
| | | // pltBarcode.setSupplier(combMat.getSupplier()); |
| | | if(Cools.isEmpty(combMat.getSupplier())){ |
| | | String supp = sdf.format(new Date()) + r; |
| | | pltBarcode.setSupplier(supp); |
| | | }else{ |
| | | pltBarcode.setSupplier(combMat.getSupplier()); |
| | | } |
| | | pltBarcode.setMemo(combMat.getMemo()); |
| | | pltBarcode.setColor(matCode.getColor()); |
| | | pltBarcode.setLinkErp(0); |
| | |
| | | } |
| | | pltBarcode.setWeight(matCode.getWeight()); |
| | | pltBarcode.setAllWeight(matCode.getWeight()*pltBarcode.getQty()+30); |
| | | pltBarcode.setVendor(combMat.getVendor()); |
| | | pltBarcode.setSource(combMat.getSource()); |
| | | pltBarcode.setQtyBox(matCode.getStr6()); |
| | | if (!pltBarcodeService.insert(pltBarcode)) { |
| | | throw new CoolException("保存数据失败"); |
| | | } |
| | | } |
| | | } else { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss"); |
| | | Random rand = new Random(); |
| | | Integer r = rand.nextInt(900)+ 100; |
| | | // 关联通知单组托 |
| | | for (CombParam.CombMat combMat : param.getCombMats()) { |
| | | WaitMatin waitMatin = waitMatinService.selectOne(new EntityWrapper<WaitMatin>() |
| | | |
| | | .eq("bill_no",param.getBillNo()).eq("seq_no",combMat.getSeqNo())); |
| | | |
| | | MatCode matCode = matCodeService.selectOne(new EntityWrapper<MatCode>().eq("mat_no", combMat.getMatNo())); |
| | | |
| | | if (waitMatin == null) { |
| | | throw new CoolException("通知单不存在" + combMat.getMatNo() + "数据!"); |
| | |
| | | pltBarcode.setModiTime(now); |
| | | pltBarcode.setAppeUser(userId); |
| | | pltBarcode.setAppeTime(now); |
| | | |
| | | if(Cools.isEmpty(combMat.getSupplier())){ |
| | | String supp = sdf.format(new Date()) + r; |
| | | pltBarcode.setSupplier(supp); |
| | | }else{ |
| | | pltBarcode.setSupplier(combMat.getSupplier()); |
| | | } |
| | | if(matCode.getWeight()==null){ |
| | | matCode.setWeight(0.0); |
| | | } |
| | | if(matCode.getStr6()==null){ |
| | | matCode.setStr6(0.0); |
| | | pltBarcode.setAllQty(pltBarcode.getQty()); |
| | | }else { |
| | | pltBarcode.setAllQty(matCode.getStr6()*pltBarcode.getQty()); |
| | | } |
| | | pltBarcode.setWeight(matCode.getWeight()); |
| | | pltBarcode.setAllWeight(matCode.getWeight()*pltBarcode.getQty()+30); |
| | | pltBarcode.setVendor(combMat.getVendor()); |
| | | pltBarcode.setSource(combMat.getSource()); |
| | | if (!pltBarcodeService.insert(pltBarcode)) { |
| | | throw new CoolException("保存数据失败"); |
| | | } |
| | |
| | | }else { |
| | | wrkDetl.setSupplier(dto.getSupplier()); |
| | | } |
| | | |
| | | wrkDetl.setZpallet(barcode); // 托盘条码 |
| | | wrkDetl.setAppeUser(userId); |
| | | wrkDetl.setAppeTime(new Date()); |
| | | wrkDetl.setMemo(dto.getMemo()); |
| | | wrkDetl.setModiUser(userId); |
| | | wrkDetl.setModiTime(new Date()); |
| | | //新增加字段 |
| | | if(matCode.getWeight()==null){ |
| | | matCode.setWeight(0.0); |
| | | } |
| | | if(matCode.getStr6()==null){ |
| | | matCode.setStr6(0.0); |
| | | wrkDetl.setAllQty(dto.getCount()); |
| | | }else { |
| | | wrkDetl.setAllQty(matCode.getStr6()*dto.getCount()); |
| | | } |
| | | wrkDetl.setAllWeight(matCode.getWeight()*dto.getCount()+30); |
| | | wrkDetl.setSource(dto.getSource()); |
| | | wrkDetl.setVendor(dto.getVendor()); |
| | | if (!this.insert(wrkDetl)) { |
| | | throw new CoolException("保存工作明细失败"); |
| | | } |
| | |
| | | VersionUtils.setLocDetl(locDetl, wrkDetl); // 版本控制 |
| | | locDetl.setModiTime(now); |
| | | locDetl.setAppeTime(now); |
| | | locDetl.setAllQty(wrk_no.getAllQty()); |
| | | locDetl.setAllWeight(wrk_no.getAllWeight()); |
| | | locDetl.setSource(wrk_no.getSource()); |
| | | locDetl.setVendor(wrk_no.getVendor()); |
| | | if (!Cools.isEmpty(wrk_no)){ |
| | | locDetl.setMemo(wrk_no.getMemo()); |
| | | locDetl.setSupplier(wrk_no.getSupplier()); |
| | |
| | | <result column="specs" property="specs" /> |
| | | <result column="source" property="source"/> |
| | | <result column="supplier" property="supplier"/> |
| | | <result column="vendor" property="vendor"/> |
| | | <result column="unit" property="unit" /> |
| | | <result column="size" property="size" /> |
| | | <result column="color" property="color" /> |
| | |
| | | <result column="modi_time" property="modiTime" /> |
| | | <result column="appe_user" property="appeUser" /> |
| | | <result column="appe_time" property="appeTime" /> |
| | | |
| | | <result column="qty_box" property="qtyBox"/> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | ,{field: 'matName', align: 'center',title: '产品名称'} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'qty', align: 'center',title: '数量'} |
| | | ,{field: 'allQty', align: 'center',title: '总数量'} |
| | | ,{field: 'allWeight', align: 'center',title: '总重量'} |
| | | ,{field: 'source', align: 'center',title: '来源'} |
| | | ,{field: 'vendor', align: 'center',title: '供应商'} |
| | | ,{field: 'unit', align: 'center',title: '单位', width:80, hide: true} |
| | | ,{field: 'supplier', align: 'center',title: '批号'} |
| | | ,{field: 'color', align: 'center',title: '颜色'} |
| | |
| | | function getCol() { |
| | | var cols = [ |
| | | {fixed: 'left', field: 'count', title: '数量(必填)', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'}, |
| | | {field: 'supplier', title: '批号', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'} |
| | | {field: 'supplier', title: '批号', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'}, |
| | | {field: 'source', title: '来源', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'}, |
| | | {field: 'vendor', title: '供应商', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'}, |
| | | {field: 'allqty', title: '总数量', align: 'center'}, |
| | | {field: 'allweight', title: '总重量', align: 'center'} |
| | | ]; |
| | | cols.push.apply(cols, matCols); |
| | | cols.push( |
| | |
| | | } |
| | | } |
| | | console.log(matCodeData); |
| | | debugger |
| | | $.ajax({ |
| | | url: baseUrl+"/full/store/put/start", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | |
| | | ,{field: 'billType$', align: 'center',title: '单据类型', hide: true} |
| | | ,{field: 'matNo', align: 'center',title: '物料编码'} |
| | | ,{field: 'matName', align: 'center',title: '物料名称'} |
| | | ,{field: 'qty', align: 'center',title: '数量'} |
| | | ,{field: 'qty', align: 'center',title: '入库数量'} |
| | | ,{field: 'qtyBox', align: 'center',title: '每箱数量'} |
| | | ,{field: 'allQty', align: 'center',title: '总数量'} |
| | | ,{field: 'locNo', align: 'center',title: '库位号'} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'unit', align: 'center',title: '单位'} |
| | | ,{field: 'size', align: 'center',title: '尺寸', hide: true} |
| | | ,{field: 'color', align: 'center',title: '颜色', hide: true} |
| | | ,{field: 'weight', align: 'center',title: '单重' } |
| | | ,{field: 'allWeight', align: 'center',title: '总重'} |
| | | ,{field: 'weight', align: 'center',title: '每箱重量(KG)' } |
| | | ,{field: 'allWeight', align: 'center',title: '总重量(KG)'} |
| | | ,{field: 'source', align: 'center',title: '来源'} |
| | | ,{field: 'supplier', align: 'center',title: '批号'} |
| | | ,{field: 'batchNumber', align: 'center',title: '供应商'} |
| | | ,{field: 'vendor', align: 'center',title: '供应商'} |
| | | ,{field: 'memo', align: 'center',title: '备注', hide: true} |
| | | ,{field: 'linkErp$', align: 'center',title: 'ERP连线', hide: true} |
| | | ,{field: 'ioStatus$', align: 'center',title: '完成状态'} |
| | |
| | | var cols = [ |
| | | {field: 'wrkNo', align: 'center',title: '工作号'} |
| | | ,{field: 'ioTime$', align: 'center',title: '工作时间'} |
| | | ,{field: 'allQty', align: 'center',title: '总数量'} |
| | | ,{field: 'allWeight', align: 'center',title: '总重量'} |
| | | ,{field: 'source', align: 'center',title: '来源'} |
| | | ,{field: 'vendor', align: 'center',title: '供应商'} |
| | | ]; |
| | | cols.push.apply(cols, detlCols); |
| | | cols.push({field: 'modiUser$', align: 'center',title: '修改人员',hide: true} |
| | |
| | | <span>生产日期</span> |
| | | <input id="memo" type="text"> |
| | | </div> |
| | | <!-- <div class="form-item">--> |
| | | <!-- <span>来源</span>--> |
| | | <!-- <input id="source" type="text" placeholder="扫码 / 输入" onkeyup="find(this)" autocomplete="off">--> |
| | | <!-- </div>--> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">来源</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="source" name="source" class="layui-input" type="text" style="display: none"> |
| | | <input id="Source$" name="Source$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="matTypeBymatType" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="matTypeBymatTypeSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-item"> |
| | | <span>来源</span> |
| | | <input id="source" type="text"> |
| | | </div> |
| | | |
| | | <div class="form-item"> |
| | | <span>供应商</span> |
| | | <input id="supplier1" type="text"> |
| | | <input id="vendor" type="text"> |
| | | </div> |
| | | <div class="form-item"> |
| | | <span>单位</span> |
| | |
| | | matName: $('#matName').val(), |
| | | count: countDom.val(), |
| | | supplier: $('#supplier').val(), |
| | | memo: $('#memo').val() |
| | | memo: $('#memo').val(), |
| | | vendor:$('#vendor').val(), |
| | | source:$('#source').val(), |
| | | |
| | | }; |
| | | if(countDom.val()<=0){ |
| | |
| | | ,{field: 'matName', align: 'center',title: '产品名称'} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'qty', align: 'center',title: '数量'} |
| | | ,{field: 'allQty', align: 'center',title: '总数量'} |
| | | ,{field: 'allWeight', align: 'center',title: '总重量'} |
| | | ,{field: 'source', align: 'center',title: '来源'} |
| | | ,{field: 'vendor', align: 'center',title: '供应商'} |
| | | ,{field: 'unit', align: 'center',title: '单位', width:80, hide: true} |
| | | ,{field: 'supplier', align: 'center',title: '批号'} |
| | | ,{field: 'color', align: 'center',title: '颜色'} |
| | |
| | | ,{field: 'matName', align: 'center',title: '产品名称'} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'qty', align: 'center',title: '数量'} |
| | | ,{field: 'allQty', align: 'center',title: '总数量'} |
| | | ,{field: 'allWeight', align: 'center',title: '总重量'} |
| | | ,{field: 'source', align: 'center',title: '来源'} |
| | | ,{field: 'vendor', align: 'center',title: '供应商'} |
| | | ,{field: 'unit', align: 'center',title: '单位', width:80, hide: true} |
| | | ,{field: 'supplier', align: 'center',title: '批号'} |
| | | ,{field: 'color', align: 'center',title: '颜色'} |