| | |
| | | |
| | | private Double count; |
| | | |
| | | private String batch; |
| | | |
| | | } |
| | |
| | | return R.ok().add(orderNo); |
| | | } |
| | | |
| | | @RequestMapping("/receive/init") |
| | | @ManagerAuth(memo = "生成销售订单") |
| | | public R initReceive(@RequestBody InitOrderParam param) { |
| | | return workService.initReceive(param, getUserId(), getHostId()); |
| | | } |
| | | @RequestMapping("/order/init") |
| | | @ManagerAuth(memo = "生成销售订单") |
| | | public R initOrder(@RequestBody InitOrderParam param) { |
| | |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | @TableField("update_by") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("modi_time") |
| | | @TableField("update_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date modiTime; |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | @TableField("create_by") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @TableField("appe_time") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date appeTime; |
| | | private Date createTime; |
| | | |
| | | public Quality() {} |
| | | |
| | | public Quality(Long id,Long hostId,String uuid,String billNo,Short auditStatus,String memo,Long modiUser,Date modiTime,Long appeUser,Date appeTime) { |
| | | public Quality(Long id,Long hostId,String uuid,String billNo,Short auditStatus,String memo,Long updateBy,Date updateTime,Long createBy,Date createTime) { |
| | | this.id = id; |
| | | this.hostId = hostId; |
| | | this.uuid = uuid; |
| | | this.billNo = billNo; |
| | | this.auditStatus = auditStatus; |
| | | this.memo = memo; |
| | | this.modiUser = modiUser; |
| | | this.modiTime = modiTime; |
| | | this.appeUser = appeUser; |
| | | this.appeTime = appeTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | // Quality quality = new Quality( |
| | |
| | | this.memo = memo; |
| | | } |
| | | |
| | | public Long getModiUser() { |
| | | return modiUser; |
| | | public Long getUpdateBy() { |
| | | return updateBy; |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | User user = service.selectById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | public void setUpdateBy(Long updateBy) { |
| | | this.updateBy = updateBy; |
| | | } |
| | | |
| | | public Date getModiTime() { |
| | | return modiTime; |
| | | public Date getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | public void setUpdateTime(Date updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | public Long getAppeUser() { |
| | | return appeUser; |
| | | public Long getCreateBy() { |
| | | return createBy; |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | public String getCreateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | User user = service.selectById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | public void setCreateBy(Long createBy) { |
| | | this.createBy = createBy; |
| | | } |
| | | |
| | | public Date getAppeTime() { |
| | | return appeTime; |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | |
| | |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | @TableField("update_by") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("modi_time") |
| | | @TableField("update_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date modiTime; |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | @TableField("create_by") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @TableField("appe_time") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date appeTime; |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 质检人员 |
| | | */ |
| | | @ApiModelProperty(value= "质检人员") |
| | | @TableField("qua_user") |
| | | private String quaUser; |
| | | |
| | | /** |
| | | * 质检时间 |
| | | */ |
| | | @ApiModelProperty(value= "质检时间") |
| | | @TableField("qua_date") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date quaDate; |
| | | |
| | | public QualityDetl() {} |
| | | |
| | | public QualityDetl(Long hostId,Long qualityId,String billNo,Integer seqNo,String orderNo,Double anfme,String matnr,String maktx,String specs,String model,String batch,String unit,Date prodDate,Double rejectQty,String rejectReason,Integer quaStatus,Long modiUser,Date modiTime,Long appeUser,Date appeTime) { |
| | | public QualityDetl(Long hostId,Long qualityId,String billNo,Integer seqNo,String orderNo,Double anfme,String matnr,String maktx,String specs,String model,String batch,String unit,Date prodDate,Double rejectQty,String rejectReason,Integer quaStatus,Long updateBy,Date updateTime,Long createBy,Date createTime,String quaUser,Date quaDate) { |
| | | this.hostId = hostId; |
| | | this.qualityId = qualityId; |
| | | this.billNo = billNo; |
| | |
| | | this.rejectQty = rejectQty; |
| | | this.rejectReason = rejectReason; |
| | | this.quaStatus = quaStatus; |
| | | this.modiUser = modiUser; |
| | | this.modiTime = modiTime; |
| | | this.appeUser = appeUser; |
| | | this.appeTime = appeTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.quaUser = quaUser; |
| | | this.quaDate = quaDate; |
| | | } |
| | | |
| | | // QualityDetl qualityDetl = new QualityDetl( |
| | |
| | | this.memo = memo; |
| | | } |
| | | |
| | | public Long getModiUser() { |
| | | return modiUser; |
| | | public Long getUpdateBy() { |
| | | return updateBy; |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | User user = service.selectById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | public void setUpdateBy(Long updateBy) { |
| | | this.updateBy = updateBy; |
| | | } |
| | | |
| | | public Date getModiTime() { |
| | | return modiTime; |
| | | public Date getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | public void setUpdateTime(Date updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | public Long getAppeUser() { |
| | | return appeUser; |
| | | public Long getCreateBy() { |
| | | return createBy; |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | public String getCreateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | User user = service.selectById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | public void setCreateBy(Long createBy) { |
| | | this.createBy = createBy; |
| | | } |
| | | |
| | | public Date getAppeTime() { |
| | | return appeTime; |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public Date getQuaDate() { |
| | | return quaDate; |
| | | } |
| | | public String getQuaDate$(){ |
| | | if (Cools.isEmpty(this.quaDate)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.quaDate); |
| | | } |
| | | |
| | | public void setQuaDate(Date quaDate) { |
| | | this.quaDate = quaDate; |
| | | } |
| | | } |
| | |
| | | package zy.cloud.wms.manager.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value= "") |
| | |
| | | |
| | | private Double count; |
| | | |
| | | private String batch; |
| | | |
| | | } |
| | |
| | | |
| | | R initOrder(InitOrderParam param, Long userId, Long hostId); |
| | | |
| | | R initReceive(InitOrderParam param, Long userId, Long hostId); |
| | | |
| | | R stockCheck(StoCheckParam param, Long userId, Long hostId); |
| | | |
| | | R stockCheckAuditing(Long checkId, Long userId, Long hostId); |
| | |
| | | private ReceiveService receiveService; |
| | | @Autowired |
| | | private ReceiveDetlService receiveDetlService; |
| | | |
| | | @Autowired |
| | | ReceiveLogService receiveLogService; |
| | | |
| | | |
| | | @Override |
| | |
| | | if (!pakinService.insert(pakin)) { |
| | | throw new CoolException("保存入库记录失败"); |
| | | } |
| | | |
| | | /** |
| | | * 上架完成之后,存放数据至上架统计表 man_receive_log |
| | | */ |
| | | ReceiveLog receiveLog = new ReceiveLog(); |
| | | receiveLog.setOrderNo("");//单号 |
| | | receiveLog.setNodeId(node.getId());//库位号id |
| | | receiveLog.setNodeName(node.getName());//库位名称 |
| | | receiveLog.setMatnr(dto.getMatnr());//物料编码 |
| | | receiveLog.setAnfme(dto.getCount());//数量 |
| | | receiveLog.setBatch(dto.getBatch());//批号 |
| | | receiveLog.setCreateBy(userId);//添加人员 |
| | | receiveLog.setUpdateBy(userId);//修改人员 |
| | | receiveLog.setCreateTime(now); |
| | | receiveLog.setUpdateTime(now); |
| | | receiveLog.setIoType(1); |
| | | receiveLogService.insert(receiveLog); |
| | | // 修改库存 |
| | | LocDetl locDetl = locDetlService.getLocDetl(node.getId(), dto.getMatnr()); |
| | | if (locDetl == null) { |
| | |
| | | locDetl.setZpallet(""); |
| | | locDetl.setAnfme(dto.getCount()); |
| | | VersionUtils.setLocDetl(locDetl, mat); |
| | | locDetl.setBatch(dto.getBatch()); |
| | | // locDetl.setDocId(param.getDocType().longValue()); |
| | | // locDetl.setDocNum(docNum); |
| | | locDetl.setStatus(1); |
| | |
| | | } |
| | | return R.ok("拣货单已取消"); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public R initOrder(InitOrderParam param, Long userId, Long hostId) { |
| | | public R initReceive(InitOrderParam param, Long userId, Long hostId){ |
| | | Receive order_no = receiveService.selectOne(new EntityWrapper<Receive>() |
| | | .eq("order_no", param.getOrderNo())); |
| | | // Order order = orderService.selectByOrderNo(param.getOrderNo(), hostId); |
| | | if (order_no != null) { |
| | | return R.error("抱歉单号已存在,请修改单号"); |
| | | } |
| | |
| | | now, // 修改时间 |
| | | null // 备注 |
| | | ); |
| | | if (!receiveService.insert(order_no)) { |
| | | throw new CoolException("保存订单表头失败!"); |
| | | } |
| | | |
| | | // 遍历商品数量并保存 |
| | | for (MatnrDto dto : param.getList()){ |
| | | Mat mat = matService.selectByMatnr(hostId, dto.getMatnr()); |
| | | if (mat == null) { |
| | | log.error("{}商品不存在。", dto.getMatnr()); |
| | | continue; |
| | | } |
| | | ReceiveDetl receiveDetl = new ReceiveDetl(); |
| | | receiveDetl.setHostId(hostId); |
| | | receiveDetl.setOrderId(order_no.getId()); |
| | | receiveDetl.setAnfme(dto.getCount()); |
| | | receiveDetl.setCreateTime(now); |
| | | receiveDetl.setCreateBy(userId); |
| | | receiveDetl.setUpdateBy(userId); |
| | | receiveDetl.setUpdateTime(now); |
| | | receiveDetl.setStatus(1); |
| | | receiveDetl.setMatnr(mat.getMatnr()); |
| | | receiveDetl.setMaktx(mat.getMaktx()); |
| | | receiveDetl.setName(mat.getName()); |
| | | receiveDetl.setSpecs(mat.getSpecs()); |
| | | receiveDetl.setModel(mat.getModel()); |
| | | receiveDetl.setBatch(mat.getBatch()); |
| | | receiveDetl.setUnit(mat.getUnit()); |
| | | receiveDetl.setBarcode(mat.getBarcode()); |
| | | receiveDetl.setItemNum(mat.getItemNum()); |
| | | receiveDetl.setCount(dto.getCount()); |
| | | receiveDetl.setUnitPrice(mat.getPrice()); |
| | | receiveDetl.setWeight(mat.getWeight()); |
| | | if (!receiveDetlService.insert(receiveDetl)) { |
| | | throw new CoolException("保存订单明细失败"); |
| | | } |
| | | } |
| | | return R.ok("创建订单成功"); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public R initOrder(InitOrderParam param, Long userId, Long hostId) { |
| | | // Receive order_no = receiveService.selectOne(new EntityWrapper<Receive>() |
| | | // .eq("order_no", param.getOrderNo())); |
| | | Order order = orderService.selectByOrderNo(param.getOrderNo(), hostId); |
| | | if (order != null) { |
| | | return R.error("抱歉单号已存在,请修改单号"); |
| | | } |
| | | Date now = new Date(); |
| | | Item item = itemService.selectByName(param.getItem()); |
| | | Cstmr cstmr = cstmrService.selectByName(param.getCstmr()); |
| | | // 新增订单表头 |
| | | Order order1 = new Order(); |
| | | order1.setUuid(String.valueOf(snowflakeIdWorker.nextId())); |
| | | order1.setHostId(hostId); |
| | | order1.setOrderNo(param.getOrderNo()); |
| | | order1.setOrderTime(param.getOrderTime()); |
| | | order1.setDocType(param.getDocType()); |
| | | order1.setItemId(item.getId()); |
| | | order1.setItemName(param.getItem()); |
| | | order1.setCstmr(cstmr.getId()); |
| | | order1.setCstmrName(param.getCstmr()); |
| | | order1.setSettle(1L); |
| | | order1.setStatus(1); |
| | | order1.setCreateBy(userId); |
| | | order1.setCreateTime(now); |
| | | order1.setUpdateBy(userId); |
| | | order1.setUpdateTime(now); |
| | | // order_no = new Receive( |
| | | // hostId, |
| | | // String.valueOf(snowflakeIdWorker.nextId()), // 编号[非空] |
| | | // param.getOrderNo(), // 订单编号 |
| | | // param.getOrderTime(), // 单据日期 |
| | | // param.getDocType(), // 单据类型 |
| | | // item==null?null:item.getId(), // 项目编号 |
| | | // param.getItem(), // 项目名称 |
| | | // null, // 调拨项目编号 |
| | | // null, // 初始票据号 |
| | | // null, // 票据号 |
| | | // cstmr==null?null:cstmr.getId(), // 客户编号 |
| | | // param.getCstmr(), // 客户 |
| | | // null, // 联系方式 |
| | | // null, // 操作人员 |
| | | // null, // 合计金额 |
| | | // null, // 优惠率 |
| | | // null, // 优惠金额 |
| | | // null, // 销售或采购费用合计 |
| | | // null, // 实付金额 |
| | | // null, // 付款类型 |
| | | // null, // 业务员 |
| | | // null, // 结算天数 |
| | | // null, // 邮费支付类型 |
| | | // null, // 邮费 |
| | | // null, // 付款时间 |
| | | // null, // 发货时间 |
| | | // null, // 物流名称 |
| | | // null, // 物流单号 |
| | | // 1L, // 订单状态 |
| | | // 1, // 状态 |
| | | // userId, // 添加人员 |
| | | // now, // 添加时间 |
| | | // userId, // 修改人员 |
| | | // now, // 修改时间 |
| | | // null // 备注 |
| | | // ); |
| | | // if (!orderService.insert(order)) { |
| | | // throw new CoolException("保存订单表头失败!"); |
| | | // } |
| | | if (!receiveService.insert(order_no)) { |
| | | if (!orderService.insert(order1)) { |
| | | throw new CoolException("保存订单表头失败!"); |
| | | } |
| | | |
| | |
| | | } |
| | | ReceiveDetl receiveDetl = new ReceiveDetl(); |
| | | receiveDetl.setHostId(hostId); |
| | | receiveDetl.setOrderId(order_no.getId()); |
| | | receiveDetl.setOrderId(order1.getId()); |
| | | receiveDetl.setAnfme(dto.getCount()); |
| | | receiveDetl.setCreateTime(now); |
| | | receiveDetl.setCreateBy(userId); |
| | |
| | | <result column="rejectReason" property="rejectReason" /> |
| | | <result column="qua_status" property="quaStatus" /> |
| | | <result column="memo" property="memo" /> |
| | | <result column="modi_user" property="modiUser" /> |
| | | <result column="modi_time" property="modiTime" /> |
| | | <result column="appe_user" property="appeUser" /> |
| | | <result column="appe_time" property="appeTime" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="qua_user" property="quaUser"/> |
| | | <result column="qua_date" property="quaDate"/> |
| | | |
| | | </resultMap> |
| | | |
| | |
| | | <result column="bill_no" property="billNo" /> |
| | | <result column="audit_status" property="auditStatus" /> |
| | | <result column="memo" property="memo" /> |
| | | <result column="modi_user" property="modiUser" /> |
| | | <result column="modi_time" property="modiTime" /> |
| | | <result column="appe_user" property="appeUser" /> |
| | | <result column="appe_time" property="appeTime" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="create_time" property="createTime" /> |
| | | |
| | | </resultMap> |
| | | |
| | |
| | | |
| | | var initCountVal = 0; |
| | | var initBatchVal=''; |
| | | var matCodeData = []; |
| | | function getCol() { |
| | | var cols = [ |
| | | {fixed: 'left', field: 'count', title: '数量(必填)', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'} |
| | | ,{fixed: 'left', field: 'batch', title: '批号', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'} |
| | | ]; |
| | | cols.push.apply(cols, matCols); |
| | | cols.push({fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:80}) |
| | |
| | | cols: [getCol()], |
| | | done: function (res, curr, count) { |
| | | $('td[data-field=count] div').html(initCountVal); |
| | | $('td[data-field=batch] div').html(initBatchVal); |
| | | setMatCodeData(res.data); |
| | | limit(); |
| | | } |
| | |
| | | |
| | | // 页面修改 |
| | | table.on('edit(chooseData)', function (obj) { |
| | | updateMatCodeData(obj.data.matnr, Number(obj.value)); |
| | | updateMatCodeData(obj.data.matnr, Number(obj.field.count),batch(obj.field.batch)); |
| | | |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | |
| | | matCodeData = data; |
| | | for (var i=0;i<matCodeData.length;i++){ |
| | | matCodeData[i]["count"] = initCountVal; |
| | | matCodeData[i]["batch"] = initBatchVal; |
| | | } |
| | | } |
| | | |
| | | function updateMatCodeData(matnr, count) { |
| | | function updateMatCodeData(matnr, count,batch) { |
| | | if (isNaN(count)) { |
| | | layer.msg("请输入数字"); |
| | | } else { |
| | |
| | | for (var i=0;i<matCodeData.length;i++){ |
| | | if (matCodeData[i]["matnr"] === matnr){ |
| | | matCodeData[i]["count"] = count; |
| | | matCodeData[i]["batch"] = batch; |
| | | } |
| | | } |
| | | } else { |
| | |
| | | data.splice(i--, 1); |
| | | } else { |
| | | data[i]["count"] = initCountVal; |
| | | data[i]["batch"] = initBatchVal; |
| | | } |
| | | } |
| | | matCodeData.push.apply(matCodeData, data); |
| | |
| | | page: true, |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers'}, |
| | | // {type: 'numbers'}, |
| | | // {field: 'billNo', title: '检验编号', align: 'center'}, |
| | | {field: 'seqNo', title: '单据行号', align: 'center'}, |
| | | {field: 'orderNo', title: '入库单号', align: 'center'}, |
| | | {field: 'anfme', title: '待入库数量', align: 'center'}, |
| | | {field: 'matnr', title: '产品ID', align: 'center'}, |
| | | {field: 'maktx', title: '产品名称', align: 'center'}, |
| | | {field: 'seqNo', title: '单据行号', align: 'center',width: 100}, |
| | | {field: 'orderNo', title: '入库单号', align: 'center',width: 150}, |
| | | {field: 'anfme', title: '待入库数量', align: 'center',width: 100}, |
| | | {field: 'matnr', title: '产品ID', align: 'center',width: 150}, |
| | | {field: 'maktx', title: '产品名称', align: 'center',width: 150}, |
| | | // {field: 'maktx', title: '产品名称', align: 'center'}, |
| | | {field: 'prodDate$', title: '生产日期', align: 'center'}, |
| | | {field: 'quaStatus', title: '检验状态', align: 'center'}, |
| | | {field: 'rejectQty', title: '不合格数量', align: 'center'}, |
| | | {field: 'rejectReason', title: '不合格原因', align: 'center'}, |
| | | {field: 'prodDate$', title: '生产日期', align: 'center',width: 150}, |
| | | {field: 'quaStatus$', title: '检验状态', align: 'center',width: 100}, |
| | | {field: 'rejectQty', title: '不合格数量', align: 'center',width: 100}, |
| | | {field: 'rejectReason', title: '不合格原因', align: 'center',width: 150}, |
| | | |
| | | ]], |
| | | request: { |
| | |
| | | </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="quaStatus" placeholder="请输入" disabled> |
| | | <select name="quaStatus"> |
| | | <option value="0">待检</option> |
| | | <option value="1">合格</option> |
| | | <option value="2">不合格</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | ,{field: 'prodDate$', title: '生产日期', align: 'center'} |
| | | ,{field: 'rejectQty', title: '不合格数量', align: 'center'} |
| | | ,{field: 'rejectReason', title: '不合格原因', align: 'center'} |
| | | ,{field: 'quaStatus', title: '之间状态', align: 'center'} |
| | | ,{field: 'quaStatus$', title: '质检状态', align: 'center'} |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operateCheck', width:140} |
| | | // ,{field: 'orderNo', title: '订单号', width:115, align: 'center'} |
| | | // ,{field: 'specs', align: 'center',title: '属性'} |
| | |
| | | layDateRender(); |
| | | form.val('detail', mData); |
| | | form.on('submit(editSubmit)', function (data) { |
| | | if(data.field.rejectQty<0){ |
| | | layer.msg("不合格数量不可小于0") |
| | | return; |
| | | } |
| | | if(data.field.rejectQty>data.field.anfme){ |
| | | layer.msg("不合格数量不可大于入库数量"); |
| | | return; |
| | | } |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/qualityDetl/"+(mData?'update':'add')+"/auth", |