分拣任务新增功能增加物料选择;开发分拣码垛的绑定任务功能、结批功能
New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 箱码明细表输出参数 |
| | | /// </summary> |
| | | public class WcsBoxInfoDto |
| | | { |
| | | /// <summary> |
| | | /// 主键Id |
| | | /// </summary> |
| | | public long Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 托盘号 |
| | | /// </summary> |
| | | public string? PalletNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料编码 |
| | | /// </summary> |
| | | public string? SkuNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料名称 |
| | | /// </summary> |
| | | public string? SkuName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 批次号 |
| | | /// </summary> |
| | | public string? LotNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 批次描述 |
| | | /// </summary> |
| | | public string? LotText { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 供应商代码 |
| | | /// </summary> |
| | | public string? Custom { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 供应商名称 |
| | | /// </summary> |
| | | public string? CustomName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 生产日期 |
| | | /// </summary> |
| | | public DateTime? ProductionTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 过期日期 |
| | | /// </summary> |
| | | public DateTime? ExpirationTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 产线 |
| | | /// </summary> |
| | | public string? LineNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料规格 |
| | | /// </summary> |
| | | public string? Standard { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 包装规格 |
| | | /// </summary> |
| | | public string? PackageStandard { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 包装单位 |
| | | /// </summary> |
| | | public string? PackUnit { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 存储期至 |
| | | /// </summary> |
| | | public DateTime? StoreTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 零箱标记 |
| | | /// </summary> |
| | | public string? BitBoxMark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 箱码 |
| | | /// </summary> |
| | | public string? BoxNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 盒码 |
| | | /// </summary> |
| | | public string? BoxNo2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 包装级别 |
| | | /// </summary> |
| | | public string? Level { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建时间 |
| | | /// </summary> |
| | | public DateTime? CreateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 更新时间 |
| | | /// </summary> |
| | | public DateTime? UpdateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者Id |
| | | /// </summary> |
| | | public long? CreateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者姓名 |
| | | /// </summary> |
| | | public string? CreateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者Id |
| | | /// </summary> |
| | | public long? UpdateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者姓名 |
| | | /// </summary> |
| | | public string? UpdateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门Id |
| | | /// </summary> |
| | | public long? CreateOrgId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门名称 |
| | | /// </summary> |
| | | public string? CreateOrgName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 软删除 |
| | | /// </summary> |
| | | public bool IsDelete { get; set; } |
| | | |
| | | } |
New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | using Admin.NET.Core; |
| | | using System.ComponentModel.DataAnnotations; |
| | | |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 箱码明细表基础输入参数 |
| | | /// </summary> |
| | | public class WcsBoxInfoBaseInput |
| | | { |
| | | /// <summary> |
| | | /// 托盘号 |
| | | /// </summary> |
| | | public virtual string? PalletNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料编码 |
| | | /// </summary> |
| | | public virtual string? SkuNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料名称 |
| | | /// </summary> |
| | | public virtual string? SkuName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 批次号 |
| | | /// </summary> |
| | | public virtual string? LotNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 批次描述 |
| | | /// </summary> |
| | | public virtual string? LotText { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 供应商代码 |
| | | /// </summary> |
| | | public virtual string? Custom { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 供应商名称 |
| | | /// </summary> |
| | | public virtual string? CustomName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 生产日期 |
| | | /// </summary> |
| | | public virtual DateTime? ProductionTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 过期日期 |
| | | /// </summary> |
| | | public virtual DateTime? ExpirationTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 产线 |
| | | /// </summary> |
| | | public virtual string? LineNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料规格 |
| | | /// </summary> |
| | | public virtual string? Standard { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 包装规格 |
| | | /// </summary> |
| | | public virtual string? PackageStandard { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 包装单位 |
| | | /// </summary> |
| | | public virtual string? PackUnit { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 存储期至 |
| | | /// </summary> |
| | | public virtual DateTime? StoreTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 零箱标记 |
| | | /// </summary> |
| | | public virtual string? BitBoxMark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 箱码 |
| | | /// </summary> |
| | | public virtual string? BoxNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 盒码 |
| | | /// </summary> |
| | | public virtual string? BoxNo2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 包装级别 |
| | | /// </summary> |
| | | public virtual string? Level { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建时间 |
| | | /// </summary> |
| | | public virtual DateTime? CreateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 更新时间 |
| | | /// </summary> |
| | | public virtual DateTime? UpdateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者Id |
| | | /// </summary> |
| | | public virtual long? CreateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者姓名 |
| | | /// </summary> |
| | | public virtual string? CreateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者Id |
| | | /// </summary> |
| | | public virtual long? UpdateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者姓名 |
| | | /// </summary> |
| | | public virtual string? UpdateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门Id |
| | | /// </summary> |
| | | public virtual long? CreateOrgId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门名称 |
| | | /// </summary> |
| | | public virtual string? CreateOrgName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 软删除 |
| | | /// </summary> |
| | | public virtual bool IsDelete { get; set; } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 箱码明细表分页查询输入参数 |
| | | /// </summary> |
| | | public class PageWcsBoxInfoInput : BasePageInput |
| | | { |
| | | /// <summary> |
| | | /// 关键字查询 |
| | | /// </summary> |
| | | public string? SearchKey { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 托盘号 |
| | | /// </summary> |
| | | public string? PalletNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料编码 |
| | | /// </summary> |
| | | public string? SkuNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料名称 |
| | | /// </summary> |
| | | public string? SkuName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 批次号 |
| | | /// </summary> |
| | | public string? LotNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 批次描述 |
| | | /// </summary> |
| | | public string? LotText { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 供应商代码 |
| | | /// </summary> |
| | | public string? Custom { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 供应商名称 |
| | | /// </summary> |
| | | public string? CustomName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 生产日期 |
| | | /// </summary> |
| | | public DateTime? ProductionTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 生产日期范围 |
| | | /// </summary> |
| | | public DateTime?[] ProductionTimeRange { get; set; } |
| | | /// <summary> |
| | | /// 过期日期 |
| | | /// </summary> |
| | | public DateTime? ExpirationTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 过期日期范围 |
| | | /// </summary> |
| | | public DateTime?[] ExpirationTimeRange { get; set; } |
| | | /// <summary> |
| | | /// 产线 |
| | | /// </summary> |
| | | public string? LineNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料规格 |
| | | /// </summary> |
| | | public string? Standard { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 包装规格 |
| | | /// </summary> |
| | | public string? PackageStandard { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 包装单位 |
| | | /// </summary> |
| | | public string? PackUnit { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 存储期至 |
| | | /// </summary> |
| | | public DateTime? StoreTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 存储期至范围 |
| | | /// </summary> |
| | | public DateTime?[] StoreTimeRange { get; set; } |
| | | /// <summary> |
| | | /// 零箱标记 |
| | | /// </summary> |
| | | public string? BitBoxMark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 箱码 |
| | | /// </summary> |
| | | public string? BoxNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 盒码 |
| | | /// </summary> |
| | | public string? BoxNo2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 包装级别 |
| | | /// </summary> |
| | | public string? Level { get; set; } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 箱码明细表增加输入参数 |
| | | /// </summary> |
| | | public class AddWcsBoxInfoInput : WcsBoxInfoBaseInput |
| | | { |
| | | /// <summary> |
| | | /// 软删除 |
| | | /// </summary> |
| | | [Required(ErrorMessage = "软删除不能为空")] |
| | | public override bool IsDelete { get; set; } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 箱码明细表删除输入参数 |
| | | /// </summary> |
| | | public class DeleteWcsBoxInfoInput : BaseIdInput |
| | | { |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 箱码明细表更新输入参数 |
| | | /// </summary> |
| | | public class UpdateWcsBoxInfoInput : WcsBoxInfoBaseInput |
| | | { |
| | | /// <summary> |
| | | /// 主键Id |
| | | /// </summary> |
| | | [Required(ErrorMessage = "主键Id不能为空")] |
| | | public long Id { get; set; } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 箱码明细表主键查询输入参数 |
| | | /// </summary> |
| | | public class QueryByIdWcsBoxInfoInput : DeleteWcsBoxInfoInput |
| | | { |
| | | |
| | | } |
New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 箱码明细表输出参数 |
| | | /// </summary> |
| | | public class WcsBoxInfoOutput |
| | | { |
| | | /// <summary> |
| | | /// 主键Id |
| | | /// </summary> |
| | | public long Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 托盘号 |
| | | /// </summary> |
| | | public string? PalletNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料编码 |
| | | /// </summary> |
| | | public string? SkuNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料名称 |
| | | /// </summary> |
| | | public string? SkuName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 批次号 |
| | | /// </summary> |
| | | public string? LotNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 批次描述 |
| | | /// </summary> |
| | | public string? LotText { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 供应商代码 |
| | | /// </summary> |
| | | public string? Custom { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 供应商名称 |
| | | /// </summary> |
| | | public string? CustomName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 生产日期 |
| | | /// </summary> |
| | | public DateTime? ProductionTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 过期日期 |
| | | /// </summary> |
| | | public DateTime? ExpirationTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 产线 |
| | | /// </summary> |
| | | public string? LineNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料规格 |
| | | /// </summary> |
| | | public string? Standard { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 包装规格 |
| | | /// </summary> |
| | | public string? PackageStandard { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 包装单位 |
| | | /// </summary> |
| | | public string? PackUnit { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 存储期至 |
| | | /// </summary> |
| | | public DateTime? StoreTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 零箱标记 |
| | | /// </summary> |
| | | public string? BitBoxMark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 箱码 |
| | | /// </summary> |
| | | public string? BoxNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 盒码 |
| | | /// </summary> |
| | | public string? BoxNo2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 包装级别 |
| | | /// </summary> |
| | | public string? Level { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建时间 |
| | | /// </summary> |
| | | public DateTime? CreateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 更新时间 |
| | | /// </summary> |
| | | public DateTime? UpdateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者Id |
| | | /// </summary> |
| | | public long? CreateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者姓名 |
| | | /// </summary> |
| | | public string? CreateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者Id |
| | | /// </summary> |
| | | public long? UpdateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者姓名 |
| | | /// </summary> |
| | | public string? UpdateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门Id |
| | | /// </summary> |
| | | public long? CreateOrgId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门名称 |
| | | /// </summary> |
| | | public string? CreateOrgName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 软删除 |
| | | /// </summary> |
| | | public bool IsDelete { get; set; } |
| | | |
| | | } |
| | | |
| | | |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WCS.Application.Service.WcsBoxInfo.Dto; |
| | | public class WcsGroupBoxInfoDto |
| | | { |
| | | /// <summary> |
| | | /// 物料编码 |
| | | /// </summary> |
| | | public string? SkuNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料名称 |
| | | /// </summary> |
| | | public string? SkuName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 批次号 |
| | | /// </summary> |
| | | public string? LotNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 批次描述 |
| | | /// </summary> |
| | | public string? LotText { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 供应商代码 |
| | | /// </summary> |
| | | public string? Custom { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 供应商名称 |
| | | /// </summary> |
| | | public string? CustomName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 生产日期 |
| | | /// </summary> |
| | | public DateTime? ProductionTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 过期日期 |
| | | /// </summary> |
| | | public DateTime? ExpirationTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料规格 |
| | | /// </summary> |
| | | public string? Standard { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 包装规格 |
| | | /// </summary> |
| | | public string? PackageStandard { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 包装单位 |
| | | /// </summary> |
| | | public string? PackUnit { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 存储期至 |
| | | /// </summary> |
| | | public DateTime? StoreTime { get; set; } |
| | | } |
New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | using Admin.NET.Core.Service; |
| | | using Microsoft.AspNetCore.Http; |
| | | using System.Security.AccessControl; |
| | | using WCS.Application.Entity; |
| | | using WCS.Application.Service.WcsBoxInfo.Dto; |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 箱码明细表服务 |
| | | /// </summary> |
| | | [ApiDescriptionSettings(ApplicationConst.GroupName, Order = 100)] |
| | | public class WcsBoxInfoService : IDynamicApiController, ITransient |
| | | { |
| | | private readonly SqlSugarRepository<WcsBoxInfo> _wcsBoxInfoRep; |
| | | public WcsBoxInfoService(SqlSugarRepository<WcsBoxInfo> wcsBoxInfoRep) |
| | | { |
| | | _wcsBoxInfoRep = wcsBoxInfoRep; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 分页查询箱码明细表 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ApiDescriptionSettings(Name = "Page")] |
| | | [DisplayName("分页查询箱码明细表")] |
| | | public async Task<SqlSugarPagedList<WcsBoxInfoOutput>> Page(PageWcsBoxInfoInput input) |
| | | { |
| | | input.SearchKey = input.SearchKey?.Trim(); |
| | | var query = _wcsBoxInfoRep.AsQueryable() |
| | | .WhereIF(!string.IsNullOrEmpty(input.SearchKey), u => |
| | | u.PalletNo.Contains(input.SearchKey) |
| | | || u.SkuNo.Contains(input.SearchKey) |
| | | || u.SkuName.Contains(input.SearchKey) |
| | | || u.LotNo.Contains(input.SearchKey) |
| | | || u.LotText.Contains(input.SearchKey) |
| | | || u.Custom.Contains(input.SearchKey) |
| | | || u.CustomName.Contains(input.SearchKey) |
| | | || u.LineNo.Contains(input.SearchKey) |
| | | || u.Standard.Contains(input.SearchKey) |
| | | || u.PackageStandard.Contains(input.SearchKey) |
| | | || u.PackUnit.Contains(input.SearchKey) |
| | | || u.BitBoxMark.Contains(input.SearchKey) |
| | | || u.BoxNo.Contains(input.SearchKey) |
| | | || u.BoxNo2.Contains(input.SearchKey) |
| | | || u.Level.Contains(input.SearchKey) |
| | | ) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.PalletNo), u => u.PalletNo.Contains(input.PalletNo.Trim())) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.SkuNo), u => u.SkuNo.Contains(input.SkuNo.Trim())) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.SkuName), u => u.SkuName.Contains(input.SkuName.Trim())) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.LotNo), u => u.LotNo.Contains(input.LotNo.Trim())) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.LotText), u => u.LotText.Contains(input.LotText.Trim())) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.Custom), u => u.Custom.Contains(input.Custom.Trim())) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.CustomName), u => u.CustomName.Contains(input.CustomName.Trim())) |
| | | .WhereIF(input.ProductionTimeRange != null && input.ProductionTimeRange.Length == 2, u => u.ProductionTime >= input.ProductionTimeRange[0] && u.ProductionTime <= input.ProductionTimeRange[1]) |
| | | .WhereIF(input.ExpirationTimeRange != null && input.ExpirationTimeRange.Length == 2, u => u.ExpirationTime >= input.ExpirationTimeRange[0] && u.ExpirationTime <= input.ExpirationTimeRange[1]) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.LineNo), u => u.LineNo.Contains(input.LineNo.Trim())) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.Standard), u => u.Standard.Contains(input.Standard.Trim())) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.PackageStandard), u => u.PackageStandard.Contains(input.PackageStandard.Trim())) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.PackUnit), u => u.PackUnit.Contains(input.PackUnit.Trim())) |
| | | .WhereIF(input.StoreTimeRange != null && input.StoreTimeRange.Length == 2, u => u.StoreTime >= input.StoreTimeRange[0] && u.StoreTime <= input.StoreTimeRange[1]) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.BitBoxMark), u => u.BitBoxMark.Contains(input.BitBoxMark.Trim())) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.BoxNo), u => u.BoxNo.Contains(input.BoxNo.Trim())) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.BoxNo2), u => u.BoxNo2.Contains(input.BoxNo2.Trim())) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.Level), u => u.Level.Contains(input.Level.Trim())) |
| | | .Select<WcsBoxInfoOutput>(); |
| | | return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 增加箱码明细表 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ApiDescriptionSettings(Name = "Add")] |
| | | [DisplayName("增加箱码明细表")] |
| | | public async Task<long> Add(AddWcsBoxInfoInput input) |
| | | { |
| | | var entity = input.Adapt<WcsBoxInfo>(); |
| | | await _wcsBoxInfoRep.InsertAsync(entity); |
| | | return entity.Id; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 删除箱码明细表 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ApiDescriptionSettings(Name = "Delete")] |
| | | [DisplayName("删除箱码明细表")] |
| | | public async Task Delete(DeleteWcsBoxInfoInput input) |
| | | { |
| | | var entity = await _wcsBoxInfoRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); |
| | | await _wcsBoxInfoRep.FakeDeleteAsync(entity); //假删除 |
| | | //await _wcsBoxInfoRep.DeleteAsync(entity); //真删除 |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新箱码明细表 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ApiDescriptionSettings(Name = "Update")] |
| | | [DisplayName("更新箱码明细表")] |
| | | public async Task Update(UpdateWcsBoxInfoInput input) |
| | | { |
| | | var entity = input.Adapt<WcsBoxInfo>(); |
| | | await _wcsBoxInfoRep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取箱码明细表 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [ApiDescriptionSettings(Name = "Detail")] |
| | | [DisplayName("获取箱码明细表")] |
| | | public async Task<WcsBoxInfo> Detail([FromQuery] QueryByIdWcsBoxInfoInput input) |
| | | { |
| | | return await _wcsBoxInfoRep.GetFirstAsync(u => u.Id == input.Id); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取箱码明细表列表 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [ApiDescriptionSettings(Name = "List")] |
| | | [DisplayName("获取箱码明细表列表")] |
| | | public async Task<List<WcsBoxInfoOutput>> List([FromQuery] PageWcsBoxInfoInput input) |
| | | { |
| | | return await _wcsBoxInfoRep.AsQueryable().Select<WcsBoxInfoOutput>().ToListAsync(); |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取箱码明细表列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [ApiDescriptionSettings(Name = "GroupSkuList")] |
| | | [DisplayName("获取分组箱码信息")] |
| | | public async Task<List<WcsGroupBoxInfoDto>> GroupSkuList() |
| | | { |
| | | return await _wcsBoxInfoRep.AsQueryable() |
| | | .Select<WcsBoxInfo>() |
| | | .GroupBy(m => new { m.SkuNo, m.SkuName, m.LotNo, m.LotText, m.Custom, m.CustomName, m.ProductionTime, m.ExpirationTime, m.Standard, m.PackageStandard, m.PackUnit, m.StoreTime }) |
| | | .Select(a => new WcsGroupBoxInfoDto() |
| | | { |
| | | SkuNo = a.SkuNo, |
| | | SkuName = a.SkuName, |
| | | LotNo = a.LotNo, |
| | | LotText = a.LotText, |
| | | Custom = a.Custom, |
| | | CustomName = a.CustomName, |
| | | ProductionTime = a.ProductionTime, |
| | | ExpirationTime = a.ExpirationTime, |
| | | Standard = a.Standard, |
| | | PackageStandard = a.PackageStandard, |
| | | PackUnit = a.PackUnit, |
| | | StoreTime = a.StoreTime |
| | | }) |
| | | .ToListAsync(); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 分拣任务表输出参数 |
| | | /// </summary> |
| | | public class WcsCheckTaskDto |
| | | { |
| | | /// <summary> |
| | | /// 主键Id |
| | | /// </summary> |
| | | public long Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// WMS下发单号 |
| | | /// </summary> |
| | | public string? OrderNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 机器人编号 |
| | | /// </summary> |
| | | public string? RoboatNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 分拣线编号 |
| | | /// </summary> |
| | | public string? LineNO { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 码盘工位号 |
| | | /// </summary> |
| | | public string? Port { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 批次号 |
| | | /// </summary> |
| | | public string? LotNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料编码 |
| | | /// </summary> |
| | | public string? SkuNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料名称 |
| | | /// </summary> |
| | | public string? SkuName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 规格 |
| | | /// </summary> |
| | | public string? BoxType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 工位绑定状态 |
| | | /// </summary> |
| | | public string? Status { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 品种号 |
| | | /// </summary> |
| | | public string? PZNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 托盘号 |
| | | /// </summary> |
| | | public string? PalletNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 插码数量 |
| | | /// </summary> |
| | | public int? BoxInsert { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 托盘上箱数量 |
| | | /// </summary> |
| | | public int? BoxCount { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 总箱数/计划箱数/预估箱数 |
| | | /// </summary> |
| | | public int? Qty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 已码箱数 |
| | | /// </summary> |
| | | public int? FinishQty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 绑定时间 |
| | | /// </summary> |
| | | public DateTime? BindTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 绑定者Id |
| | | /// </summary> |
| | | public long? BindUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建时间 |
| | | /// </summary> |
| | | public DateTime? CreateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 更新时间 |
| | | /// </summary> |
| | | public DateTime? UpdateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者Id |
| | | /// </summary> |
| | | public long? CreateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者姓名 |
| | | /// </summary> |
| | | public string? CreateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者Id |
| | | /// </summary> |
| | | public long? UpdateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者姓名 |
| | | /// </summary> |
| | | public string? UpdateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门Id |
| | | /// </summary> |
| | | public long? CreateOrgId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门名称 |
| | | /// </summary> |
| | | public string? CreateOrgName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 软删除 |
| | | /// </summary> |
| | | public bool IsDelete { get; set; } |
| | | |
| | | } |
New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | using Admin.NET.Core; |
| | | using System.ComponentModel.DataAnnotations; |
| | | |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 分拣任务表基础输入参数 |
| | | /// </summary> |
| | | public class WcsCheckTaskBaseInput |
| | | { |
| | | /// <summary> |
| | | /// WMS下发单号 |
| | | /// </summary> |
| | | public virtual string? OrderNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 机器人编号 |
| | | /// </summary> |
| | | public virtual string? RoboatNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 分拣线编号 |
| | | /// </summary> |
| | | public virtual string? LineNO { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 码盘工位号 |
| | | /// </summary> |
| | | public virtual string? Port { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 批次号 |
| | | /// </summary> |
| | | public virtual string? LotNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料编码 |
| | | /// </summary> |
| | | public virtual string? SkuNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料名称 |
| | | /// </summary> |
| | | public virtual string? SkuName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 规格 |
| | | /// </summary> |
| | | public virtual string? BoxType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 工位绑定状态 |
| | | /// </summary> |
| | | public virtual string? Status { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 品种号 |
| | | /// </summary> |
| | | public virtual string? PZNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 托盘号 |
| | | /// </summary> |
| | | public virtual string? PalletNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 插码数量 |
| | | /// </summary> |
| | | public virtual int? BoxInsert { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 托盘上箱数量 |
| | | /// </summary> |
| | | public virtual int? BoxCount { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 总箱数/计划箱数/预估箱数 |
| | | /// </summary> |
| | | public virtual int? Qty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 已码箱数 |
| | | /// </summary> |
| | | public virtual int? FinishQty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 绑定时间 |
| | | /// </summary> |
| | | public virtual DateTime? BindTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 绑定者Id |
| | | /// </summary> |
| | | public virtual long? BindUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建时间 |
| | | /// </summary> |
| | | public virtual DateTime? CreateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 更新时间 |
| | | /// </summary> |
| | | public virtual DateTime? UpdateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者Id |
| | | /// </summary> |
| | | public virtual long? CreateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者姓名 |
| | | /// </summary> |
| | | public virtual string? CreateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者Id |
| | | /// </summary> |
| | | public virtual long? UpdateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者姓名 |
| | | /// </summary> |
| | | public virtual string? UpdateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门Id |
| | | /// </summary> |
| | | public virtual long? CreateOrgId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门名称 |
| | | /// </summary> |
| | | public virtual string? CreateOrgName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 软删除 |
| | | /// </summary> |
| | | public virtual bool IsDelete { get; set; } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 分拣任务表分页查询输入参数 |
| | | /// </summary> |
| | | public class PageWcsCheckTaskInput : BasePageInput |
| | | { |
| | | /// <summary> |
| | | /// 关键字查询 |
| | | /// </summary> |
| | | public string? SearchKey { get; set; } |
| | | |
| | | /// <summary> |
| | | /// WMS下发单号 |
| | | /// </summary> |
| | | public string? OrderNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 机器人编号 |
| | | /// </summary> |
| | | public string? RoboatNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 分拣线编号 |
| | | /// </summary> |
| | | public string? LineNO { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 码盘工位号 |
| | | /// </summary> |
| | | public string? Port { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 批次号 |
| | | /// </summary> |
| | | public string? LotNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料编码 |
| | | /// </summary> |
| | | public string? SkuNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料名称 |
| | | /// </summary> |
| | | public string? SkuName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 规格 |
| | | /// </summary> |
| | | public string? BoxType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 工位绑定状态 |
| | | /// </summary> |
| | | public string? Status { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 品种号 |
| | | /// </summary> |
| | | public string? PZNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 托盘号 |
| | | /// </summary> |
| | | public string? PalletNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 插码数量 |
| | | /// </summary> |
| | | public int? BoxInsert { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 托盘上箱数量 |
| | | /// </summary> |
| | | public int? BoxCount { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 总箱数/计划箱数/预估箱数 |
| | | /// </summary> |
| | | public int? Qty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 已码箱数 |
| | | /// </summary> |
| | | public int? FinishQty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 绑定时间 |
| | | /// </summary> |
| | | public DateTime? BindTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 绑定时间范围 |
| | | /// </summary> |
| | | public DateTime?[] BindTimeRange { get; set; } |
| | | /// <summary> |
| | | /// 绑定者Id |
| | | /// </summary> |
| | | public long? BindUserId { get; set; } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 分拣任务表增加输入参数 |
| | | /// </summary> |
| | | public class AddWcsCheckTaskInput : WcsCheckTaskBaseInput |
| | | { |
| | | /// <summary> |
| | | /// 软删除 |
| | | /// </summary> |
| | | [Required(ErrorMessage = "软删除不能为空")] |
| | | public override bool IsDelete { get; set; } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 分拣任务表删除输入参数 |
| | | /// </summary> |
| | | public class DeleteWcsCheckTaskInput : BaseIdInput |
| | | { |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 分拣任务表更新输入参数 |
| | | /// </summary> |
| | | public class UpdateWcsCheckTaskInput : WcsCheckTaskBaseInput |
| | | { |
| | | /// <summary> |
| | | /// 主键Id |
| | | /// </summary> |
| | | [Required(ErrorMessage = "主键Id不能为空")] |
| | | public long Id { get; set; } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 分拣任务表主键查询输入参数 |
| | | /// </summary> |
| | | public class QueryByIdWcsCheckTaskInput : DeleteWcsCheckTaskInput |
| | | { |
| | | |
| | | } |
New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 分拣任务表输出参数 |
| | | /// </summary> |
| | | public class WcsCheckTaskOutput |
| | | { |
| | | /// <summary> |
| | | /// 主键Id |
| | | /// </summary> |
| | | public long Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// WMS下发单号 |
| | | /// </summary> |
| | | public string? OrderNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 机器人编号 |
| | | /// </summary> |
| | | public string? RoboatNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 分拣线编号 |
| | | /// </summary> |
| | | public string? LineNO { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 码盘工位号 |
| | | /// </summary> |
| | | public string? Port { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 批次号 |
| | | /// </summary> |
| | | public string? LotNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料编码 |
| | | /// </summary> |
| | | public string? SkuNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料名称 |
| | | /// </summary> |
| | | public string? SkuName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 规格 |
| | | /// </summary> |
| | | public string? BoxType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 工位绑定状态 |
| | | /// </summary> |
| | | public string? Status { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 品种号 |
| | | /// </summary> |
| | | public string? PZNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 托盘号 |
| | | /// </summary> |
| | | public string? PalletNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 插码数量 |
| | | /// </summary> |
| | | public int? BoxInsert { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 托盘上箱数量 |
| | | /// </summary> |
| | | public int? BoxCount { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 总箱数/计划箱数/预估箱数 |
| | | /// </summary> |
| | | public int? Qty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 已码箱数 |
| | | /// </summary> |
| | | public int? FinishQty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 绑定时间 |
| | | /// </summary> |
| | | public DateTime? BindTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 绑定者Id |
| | | /// </summary> |
| | | public long? BindUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建时间 |
| | | /// </summary> |
| | | public DateTime? CreateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 更新时间 |
| | | /// </summary> |
| | | public DateTime? UpdateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者Id |
| | | /// </summary> |
| | | public long? CreateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者姓名 |
| | | /// </summary> |
| | | public string? CreateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者Id |
| | | /// </summary> |
| | | public long? UpdateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者姓名 |
| | | /// </summary> |
| | | public string? UpdateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门Id |
| | | /// </summary> |
| | | public long? CreateOrgId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门名称 |
| | | /// </summary> |
| | | public string? CreateOrgName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 软删除 |
| | | /// </summary> |
| | | public bool IsDelete { get; set; } |
| | | |
| | | } |
| | | |
| | | |
New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | using Admin.NET.Core.Service; |
| | | using AngleSharp.Dom; |
| | | using Elastic.Clients.Elasticsearch.Tasks; |
| | | using Microsoft.AspNetCore.Http; |
| | | using WCS.Application.Entity; |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 分拣任务表服务 |
| | | /// </summary> |
| | | [ApiDescriptionSettings(ApplicationConst.GroupName, Order = 100)] |
| | | public class WcsCheckTaskService : IDynamicApiController, ITransient |
| | | { |
| | | private readonly SqlSugarRepository<WcsCheckTask> _wcsCheckTaskRep; |
| | | private readonly SqlSugarRepository<WcsDevice> _wcsDeviceRep; |
| | | private readonly SqlSugarRepository<WcsOderTask> _wcsOderTaskRep; |
| | | public WcsCheckTaskService(SqlSugarRepository<WcsCheckTask> wcsCheckTaskRep, SqlSugarRepository<WcsDevice> wcsDeviceRep, SqlSugarRepository<WcsOderTask> wcsOderTaskRep) |
| | | { |
| | | _wcsCheckTaskRep = wcsCheckTaskRep; |
| | | _wcsDeviceRep = wcsDeviceRep; |
| | | _wcsOderTaskRep = wcsOderTaskRep; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 分页查询分拣任务表 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ApiDescriptionSettings(Name = "Page")] |
| | | [DisplayName("分页查询分拣任务表")] |
| | | public async Task<SqlSugarPagedList<WcsCheckTaskOutput>> Page(PageWcsCheckTaskInput input) |
| | | { |
| | | input.SearchKey = input.SearchKey?.Trim(); |
| | | var query = _wcsCheckTaskRep.AsQueryable() |
| | | .WhereIF(!string.IsNullOrEmpty(input.SearchKey), u => |
| | | u.OrderNo.Contains(input.SearchKey) |
| | | || u.RoboatNo.Contains(input.SearchKey) |
| | | || u.LineNO.Contains(input.SearchKey) |
| | | || u.Port.Contains(input.SearchKey) |
| | | || u.LotNo.Contains(input.SearchKey) |
| | | || u.SkuNo.Contains(input.SearchKey) |
| | | || u.SkuName.Contains(input.SearchKey) |
| | | || u.BoxType.Contains(input.SearchKey) |
| | | || u.Status.Contains(input.SearchKey) |
| | | || u.PZNo.Contains(input.SearchKey) |
| | | || u.PalletNo.Contains(input.SearchKey) |
| | | ) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.OrderNo), u => u.OrderNo.Contains(input.OrderNo.Trim())) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.RoboatNo), u => u.RoboatNo.Contains(input.RoboatNo.Trim())) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.LineNO), u => u.LineNO.Contains(input.LineNO.Trim())) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.Port), u => u.Port.Contains(input.Port.Trim())) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.LotNo), u => u.LotNo.Contains(input.LotNo.Trim())) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.SkuNo), u => u.SkuNo.Contains(input.SkuNo.Trim())) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.SkuName), u => u.SkuName.Contains(input.SkuName.Trim())) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.BoxType), u => u.BoxType.Contains(input.BoxType.Trim())) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.Status), u => u.Status.Contains(input.Status.Trim())) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.PZNo), u => u.PZNo.Contains(input.PZNo.Trim())) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.PalletNo), u => u.PalletNo.Contains(input.PalletNo.Trim())) |
| | | .WhereIF(input.BoxInsert>0, u => u.BoxInsert == input.BoxInsert) |
| | | .WhereIF(input.BoxCount>0, u => u.BoxCount == input.BoxCount) |
| | | .WhereIF(input.Qty>0, u => u.Qty == input.Qty) |
| | | .WhereIF(input.FinishQty>0, u => u.FinishQty == input.FinishQty) |
| | | .WhereIF(input.BindTimeRange != null && input.BindTimeRange.Length == 2, u => u.BindTime >= input.BindTimeRange[0] && u.BindTime <= input.BindTimeRange[1]) |
| | | .WhereIF(input.BindUserId>0, u => u.BindUserId == input.BindUserId) |
| | | .Select<WcsCheckTaskOutput>(); |
| | | return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 增加分拣任务表 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ApiDescriptionSettings(Name = "Add")] |
| | | [DisplayName("增加分拣任务表")] |
| | | public async Task<long> Add(AddWcsCheckTaskInput input) |
| | | { |
| | | var entity = input.Adapt<WcsCheckTask>(); |
| | | await _wcsCheckTaskRep.InsertAsync(entity); |
| | | return entity.Id; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 删除分拣任务表 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ApiDescriptionSettings(Name = "Delete")] |
| | | [DisplayName("删除分拣任务表")] |
| | | public async Task Delete(DeleteWcsCheckTaskInput input) |
| | | { |
| | | var entity = await _wcsCheckTaskRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); |
| | | await _wcsCheckTaskRep.FakeDeleteAsync(entity); //假删除 |
| | | //await _wcsCheckTaskRep.DeleteAsync(entity); //真删除 |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新分拣任务表 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ApiDescriptionSettings(Name = "Update")] |
| | | [DisplayName("更新分拣任务表")] |
| | | public async Task Update(UpdateWcsCheckTaskInput input) |
| | | { |
| | | var entity = input.Adapt<WcsCheckTask>(); |
| | | await _wcsCheckTaskRep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取分拣任务表 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [ApiDescriptionSettings(Name = "Detail")] |
| | | [DisplayName("获取分拣任务表")] |
| | | public async Task<WcsCheckTask> Detail([FromQuery] QueryByIdWcsCheckTaskInput input) |
| | | { |
| | | return await _wcsCheckTaskRep.GetFirstAsync(u => u.Id == input.Id); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取分拣任务表列表 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [ApiDescriptionSettings(Name = "List")] |
| | | [DisplayName("获取分拣任务表列表")] |
| | | public async Task<List<WcsCheckTaskOutput>> List([FromQuery] PageWcsCheckTaskInput input) |
| | | { |
| | | return await _wcsCheckTaskRep.AsQueryable().Select<WcsCheckTaskOutput>().ToListAsync(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 手动绑定任务到PLC |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ApiDescriptionSettings(Name = "BindTaskForPLC")] |
| | | [DisplayName("手动绑定任务到PLC")] |
| | | public async Task BindTaskForPLC(BindTaskPLCInput input) |
| | | { |
| | | var deviceInfo = await _wcsDeviceRep.GetByIdAsync(input.deviceId); |
| | | if (deviceInfo == null) |
| | | { |
| | | throw Oops.Oh("设备工位信息不存在"); |
| | | } |
| | | var taskInfo = await _wcsOderTaskRep.GetByIdAsync(input.oderTaskId); |
| | | if (taskInfo == null) |
| | | { |
| | | throw Oops.Oh("任务信息不存在"); |
| | | } |
| | | if (taskInfo.Status > TaskStatusEnum.Doing) |
| | | { |
| | | throw Oops.Oh("任务状态异常"); |
| | | } |
| | | //分拣任务信息 |
| | | var checkTaskInfo = await _wcsCheckTaskRep.Context.Queryable<WcsCheckTask>().Where(w => w.Port == deviceInfo.StationNum).FirstAsync(); |
| | | if (checkTaskInfo == null) |
| | | { |
| | | throw Oops.Oh("分拣任务信息不存在"); |
| | | } |
| | | if (checkTaskInfo.Status != "0") |
| | | { |
| | | throw Oops.Oh("该工位已绑定任务,请勿再次绑定"); |
| | | } |
| | | checkTaskInfo.OrderNo = taskInfo.OrderNo; |
| | | checkTaskInfo.LotNo = taskInfo.LotNo; |
| | | checkTaskInfo.SkuNo = taskInfo.SkuNo; |
| | | checkTaskInfo.SkuName = taskInfo.SkuName; |
| | | checkTaskInfo.BoxType = taskInfo.BoxType; |
| | | checkTaskInfo.Qty = taskInfo.Qty; |
| | | checkTaskInfo.Status = "1";//已绑定 |
| | | //更新分拣任务 |
| | | await _wcsCheckTaskRep.AsUpdateable(checkTaskInfo).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); |
| | | } |
| | | |
| | | [HttpPost] |
| | | [ApiDescriptionSettings(Name = "CloseTaskForPLC")] |
| | | [DisplayName("任务结批")] |
| | | public async Task CloseTaskForPLC(BindTaskPLCInput input) |
| | | { |
| | | #region 请求PLC接口 |
| | | #endregion |
| | | //分拣任务信息 |
| | | var checkTaskList = _wcsCheckTaskRep.Context.Queryable<WcsCheckTask>().Where(w => w.LotNo == input.lotNo && w.Status == "1").ToList(); |
| | | foreach (var item in checkTaskList) |
| | | { |
| | | item.OrderNo = ""; |
| | | item.LotNo = ""; |
| | | item.SkuNo = ""; |
| | | item.SkuName = ""; |
| | | item.BoxType = ""; |
| | | item.Qty = 0; |
| | | item.Status = "0";//未绑定 |
| | | } |
| | | //更新分拣任务 |
| | | await _wcsCheckTaskRep.AsUpdateable(checkTaskList).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WCS.Application.Service.WcsDevice.Dto; |
| | | public class WcsDeviceTaskOrderDto |
| | | { |
| | | public long Id { get; set; } |
| | | public string Text { get; set; } |
| | | public string? OrderNo { get; set; } |
| | | public string? LotNo { get; set; } |
| | | public string? SkuNo { get; set; } |
| | | public string? SkuName { get; set; } |
| | | public string? Status { get; set; } |
| | | /// <summary> |
| | | /// 总箱数/计划箱数/预估箱数 |
| | | /// </summary> |
| | | public int? Qty { get; set; } |
| | | } |
| | |
| | | |
| | | using Admin.NET.Core.Service; |
| | | using Elastic.Clients.Elasticsearch; |
| | | using WCS.Application.Entity; |
| | | using WCS.Application.Service.WcsDevice.Dto; |
| | | |
| | | namespace WCS.Application; |
| | | |
| | |
| | | [HttpGet] |
| | | [ApiDescriptionSettings(Name = "WcsPackStationPlcList")] |
| | | [DisplayName("获取设备对应工位列表")] |
| | | public async Task<List<WcsDevice>> WcsPackStationPlcList([FromQuery]WcsDeviceBaseInput entry) |
| | | { |
| | | public async Task<List<WcsDeviceTaskOrderDto>> WcsPackStationPlcList([FromQuery]WcsDeviceBaseInput entry) |
| | | { |
| | | return await _wcsDeviceRep.Context.Queryable<WcsDevice>() |
| | | .Where(w => w.PlcId == entry.PlcId) |
| | | .OrderBy(o => o.CreateTime) |
| | | .LeftJoin<WcsCheckTask>((device, task) => device.StationNum == task.Port) |
| | | .Where((device, task) => device.PlcId == entry.PlcId) |
| | | .OrderBy((device, task) => device.CreateTime) |
| | | .Select((device, task) => new WcsDeviceTaskOrderDto() |
| | | { |
| | | Id=device.Id, |
| | | Text=device.Text, |
| | | OrderNo=task.OrderNo, |
| | | LotNo=task.LotNo, |
| | | SkuNo=task.SkuNo, |
| | | SkuName=task.SkuName, |
| | | Status=task.Status, |
| | | Qty=task.Qty |
| | | }) |
| | | .ToListAsync(); |
| | | } |
| | | #endregion |
| | |
| | | { |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 绑定任务到PLC参数 |
| | | /// </summary> |
| | | public class BindTaskPLCInput |
| | | { |
| | | public long deviceId { get; set; } |
| | | |
| | | public long oderTaskId { get; set; } |
| | | |
| | | public string lotNo { get; set; } |
| | | } |
| | |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | using Admin.NET.Core.Service; |
| | | using AngleSharp.Dom; |
| | | using Microsoft.AspNetCore.Http; |
| | | using WCS.Application.Entity; |
| | | namespace WCS.Application; |
| | |
| | | { |
| | | return await _wcsOderTaskRep.AsQueryable().Select<WcsOderTaskOutput>().ToListAsync(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | UpdateWcsOderTask = '/api/wcsOderTask/update', |
| | | PageWcsOderTask = '/api/wcsOderTask/page', |
| | | DetailWcsOderTask = '/api/wcsOderTask/detail', |
| | | |
| | | GetGroupSkuList = '/api/WcsBoxInfo/GroupSkuList', |
| | | } |
| | | |
| | | // 增加分拣任务 |
| | |
| | | data: { id }, |
| | | }); |
| | | |
| | | // 分页查询分拣任务 |
| | | export const GetGroupSkuList = () => |
| | | request({ |
| | | url: Api.GetGroupSkuList, |
| | | method: 'get', |
| | | }); |
| | | |
| | | |
New file |
| | |
| | | import request from '/@/utils/request'; |
| | | enum Api { |
| | | AddWcsBoxInfo = '/api/wcsBoxInfo/add', |
| | | DeleteWcsBoxInfo = '/api/wcsBoxInfo/delete', |
| | | UpdateWcsBoxInfo = '/api/wcsBoxInfo/update', |
| | | PageWcsBoxInfo = '/api/wcsBoxInfo/page', |
| | | DetailWcsBoxInfo = '/api/wcsBoxInfo/detail', |
| | | } |
| | | |
| | | // 增加箱码明细表 |
| | | export const addWcsBoxInfo = (params?: any) => |
| | | request({ |
| | | url: Api.AddWcsBoxInfo, |
| | | method: 'post', |
| | | data: params, |
| | | }); |
| | | |
| | | // 删除箱码明细表 |
| | | export const deleteWcsBoxInfo = (params?: any) => |
| | | request({ |
| | | url: Api.DeleteWcsBoxInfo, |
| | | method: 'post', |
| | | data: params, |
| | | }); |
| | | |
| | | // 编辑箱码明细表 |
| | | export const updateWcsBoxInfo = (params?: any) => |
| | | request({ |
| | | url: Api.UpdateWcsBoxInfo, |
| | | method: 'post', |
| | | data: params, |
| | | }); |
| | | |
| | | // 分页查询箱码明细表 |
| | | export const pageWcsBoxInfo = (params?: any) => |
| | | request({ |
| | | url: Api.PageWcsBoxInfo, |
| | | method: 'post', |
| | | data: params, |
| | | }); |
| | | |
| | | // 详情箱码明细表 |
| | | export const detailWcsBoxInfo = (id: any) => |
| | | request({ |
| | | url: Api.DetailWcsBoxInfo, |
| | | method: 'get', |
| | | data: { id }, |
| | | }); |
| | | |
| | | |
New file |
| | |
| | | import request from '/@/utils/request'; |
| | | enum Api { |
| | | AddWcsCheckTask = '/api/wcsCheckTask/add', |
| | | DeleteWcsCheckTask = '/api/wcsCheckTask/delete', |
| | | UpdateWcsCheckTask = '/api/wcsCheckTask/update', |
| | | PageWcsCheckTask = '/api/wcsCheckTask/page', |
| | | DetailWcsCheckTask = '/api/wcsCheckTask/detail', |
| | | } |
| | | |
| | | // 增加分拣任务表 |
| | | export const addWcsCheckTask = (params?: any) => |
| | | request({ |
| | | url: Api.AddWcsCheckTask, |
| | | method: 'post', |
| | | data: params, |
| | | }); |
| | | |
| | | // 删除分拣任务表 |
| | | export const deleteWcsCheckTask = (params?: any) => |
| | | request({ |
| | | url: Api.DeleteWcsCheckTask, |
| | | method: 'post', |
| | | data: params, |
| | | }); |
| | | |
| | | // 编辑分拣任务表 |
| | | export const updateWcsCheckTask = (params?: any) => |
| | | request({ |
| | | url: Api.UpdateWcsCheckTask, |
| | | method: 'post', |
| | | data: params, |
| | | }); |
| | | |
| | | // 分页查询分拣任务表 |
| | | export const pageWcsCheckTask = (params?: any) => |
| | | request({ |
| | | url: Api.PageWcsCheckTask, |
| | | method: 'post', |
| | | data: params, |
| | | }); |
| | | |
| | | // 详情分拣任务表 |
| | | export const detailWcsCheckTask = (id: any) => |
| | | request({ |
| | | url: Api.DetailWcsCheckTask, |
| | | method: 'get', |
| | | data: { id }, |
| | | }); |
| | | |
| | | |
| | |
| | | |
| | | GetWcsPackPlcList='/api/wcsDevice/WcsPackPlcList', |
| | | GetWcsPackStationPlcList='/api/wcsDevice/WcsPackStationPlcList', |
| | | BindTaskForPLC='/api/WcsCheckTask/BindTaskForPLC', |
| | | CloseTaskForPLC='/api/WcsCheckTask/CloseTaskForPLC', |
| | | } |
| | | |
| | | // 增加设备信息 |
| | |
| | | |
| | | export const GetWcsPackPlcList = () => |
| | | request({ |
| | | url: Api.GetWcsPackPlcList, |
| | | method: 'get' |
| | | url: Api.GetWcsPackPlcList, |
| | | method: 'get' |
| | | }); |
| | | |
| | | export const GetWcsPackStationPlcList = (params?: any) => |
| | | request({ |
| | | url: Api.GetWcsPackStationPlcList, |
| | | method: 'get', |
| | | data: params |
| | | url: Api.GetWcsPackStationPlcList, |
| | | method: 'get', |
| | | data: params |
| | | }); |
| | | |
| | | // 手动绑定任务到PLC |
| | | export const BindTaskForPLC = (params?: any) => |
| | | request({ |
| | | url: Api.BindTaskForPLC, |
| | | method: 'post', |
| | | data: params, |
| | | }); |
| | | //任务结批 |
| | | export const CloseTaskForPLC = (params?: any) => |
| | | request({ |
| | | url: Api.CloseTaskForPLC, |
| | | method: 'post', |
| | | data: params, |
| | | }); |
| | |
| | | <el-card class="other-box-card" v-for="deviceInfo in devicePointData" :key="deviceInfo.id"> |
| | | <div slot="header" class="linefix"> |
| | | <span>{{ deviceInfo.text }}</span> |
| | | <div :class="['lineStatus', { 'device-status-0': deviceInfo.status === 0 }, { 'device-status-1': deviceInfo.status === 1 }]"></div> |
| | | <div :class="['lineStatus', 'device-status-0']"></div> |
| | | <!-- <div :class="['lineStatus', { 'device-status-0': deviceInfo.status === 0 }, { 'device-status-1': deviceInfo.status === 1 }]"></div> --> |
| | | </div> |
| | | <div class="otherValuefix" > |
| | | <el-form label-position="left" label-width="90px"> |
| | | <el-form-item label="WMS明细单号"> |
| | | <el-input></el-input> |
| | | <el-input v-model="deviceInfo.orderNo" readonly></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="任务号"> |
| | | <el-input v-model="deviceInfo.taskNumber"></el-input> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="任务号"> |
| | | <el-input v-model=""></el-input> |
| | | </el-form-item> --> |
| | | <el-form-item label="批次号"> |
| | | <el-input></el-input> |
| | | <el-input v-model="deviceInfo.lotNo" readonly></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="物料编码"> |
| | | <el-input></el-input> |
| | | <el-input v-model="deviceInfo.skuNo" readonly></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="物料名称"> |
| | | <el-input></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="包装名称"> |
| | | <el-input></el-input> |
| | | <el-input v-model="deviceInfo.skuName" readonly></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="绑定状态"> |
| | | <el-input></el-input> |
| | | <el-input :value="deviceInfo.status === '0' ? '未绑定' : '已绑定'" readonly></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="抓箱品种"> |
| | | <el-input></el-input> |
| | | <el-input readonly></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="托盘号"> |
| | | <el-input></el-input> |
| | | <el-input readonly></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="插码数量"> |
| | | <el-input></el-input> |
| | | <el-input readonly></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="托盘上箱数量"> |
| | | <el-input></el-input> |
| | | <el-input readonly></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="WMS下发数量"> |
| | | <el-input></el-input> |
| | | <el-input v-model="deviceInfo.qty" readonly></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="otherButtonfix"> |
| | | <el-form label-position="left"> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="openBindDialog()">绑定</el-button> |
| | | <el-button>结批</el-button> |
| | | <el-button type="primary" @click="openBindDialog(deviceInfo.id)">绑定</el-button> |
| | | <el-button @click="closeBindDialog(deviceInfo.lotNo)">结批</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | |
| | | :data="bindData" |
| | | highlight-current-row |
| | | @row-click="handleRowClick" |
| | | > |
| | | <el-table-column type="selection" width="55"/> |
| | | |
| | | > |
| | | <el-table-column prop="orderNo" label="WMS下发单号" show-overflow-tooltip="" /> |
| | | <el-table-column prop="taskNo" label="任务号" show-overflow-tooltip="" /> |
| | | <el-table-column prop="lotNo" label="批次号" show-overflow-tooltip="" /> |
| | |
| | | |
| | | <script lang="ts" setup> |
| | | import { ref } from 'vue'; |
| | | import { GetWcsPackPlcList,GetWcsPackStationPlcList } from '/@/api/wcs/wcsDevice'; |
| | | import { GetWcsPackPlcList,GetWcsPackStationPlcList,BindTaskForPLC,CloseTaskForPLC } from '/@/api/wcs/wcsDevice'; |
| | | import { pageWcsOderTask } from '/@/api/device/wcsOderTask'; |
| | | import { ElMessageBox,ElMessage } from 'element-plus'; |
| | | |
| | | //设备数据 |
| | | const deviceList=ref<any>([]); |
| | |
| | | const devicePointData = ref<any>([]); |
| | | //选中设备ID |
| | | const selectedDeviceId=ref<any>(); |
| | | //选中工位ID |
| | | const selectedStationId=ref<any>(); |
| | | |
| | | const bindDialogVisible = ref(false); |
| | | const bindData = ref<any>([]); |
| | |
| | | //切换设备 |
| | | function chooseDevice(id) { |
| | | selectedDeviceId.value = id; |
| | | fetchStationData(id); |
| | | fetchStationData(selectedDeviceId.value); |
| | | } |
| | | |
| | | const handleQuery = async () => { |
| | |
| | | tableParams.value.total = res.data.result?.total; |
| | | }; |
| | | //打开绑定弹框 |
| | | function openBindDialog() { |
| | | function openBindDialog(id) { |
| | | selectedStationId.value=null; |
| | | selectedRow.value=null; |
| | | |
| | | selectedStationId.value=id; |
| | | bindDialogVisible.value = true; |
| | | // Mock data for binding |
| | | |
| | | handleQuery(); |
| | | } |
| | | //点击行时设置选中行 |
| | |
| | | //确认绑定操作 |
| | | function confirmBinding() { |
| | | if (selectedRow.value) { |
| | | console.log('Selected Row:', selectedRow.value); |
| | | // Do binding logic here |
| | | //手动绑定任务到PLC |
| | | bindTaskForPLC(selectedStationId.value,selectedRow.value.id); |
| | | |
| | | bindDialogVisible.value = false; |
| | | } else { |
| | | console.error('No row selected'); |
| | | ElMessage.error('请选择要绑定的任务!'); |
| | | } |
| | | } |
| | | const bindTaskForPLC = async (deviceId: any,oderTaskId:any) => { |
| | | const res = await BindTaskForPLC({ deviceId,oderTaskId }); |
| | | if(res.status==200){ |
| | | ElMessage.success('绑定成功!'); |
| | | // 刷新 |
| | | fetchStationData(selectedDeviceId.value); |
| | | } |
| | | } |
| | | //结批操作 |
| | | function closeBindDialog(lotNo){ |
| | | if(lotNo==''){ |
| | | ElMessage.error('该工位未绑定任务!'); |
| | | return; |
| | | } |
| | | ElMessageBox.confirm(`确定对该批次任务结批吗?`, '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then(async () => { |
| | | closeTaskForPLC(lotNo); |
| | | }) |
| | | .catch(() => {}); |
| | | } |
| | | const closeTaskForPLC = async (lotNo: string) => { |
| | | const res = await CloseTaskForPLC({ lotNo }); |
| | | if(res.status==200){ |
| | | ElMessage.success('结批成功!'); |
| | | // 刷新 |
| | | fetchStationData(selectedDeviceId.value); |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | |
| | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="物料名称" prop="skuName"> |
| | | <el-input v-model="ruleForm.skuName" placeholder="请输入物料名称" maxlength="50" show-word-limit clearable /> |
| | | |
| | | <el-input v-model="ruleForm.skuName" placeholder="请输入物料名称" maxlength="50" show-word-limit clearable/> |
| | | <el-button type="primary" icon="el-icon-search" @click="openBindDialog()">搜索物料</el-button> |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <!-- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="是否回馈成功" prop="isSuccess"> |
| | | <el-select clearable v-model="ruleForm.isSuccess" placeholder="请选择是否回馈成功"> |
| | | <el-option v-for="(item,index) in dl('TaskSuccessEnum')" :key="index" :value="Number(item.value)" :label="`${item.name} (${item.code}) [${item.value}]`"></el-option> |
| | |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | </el-col> --> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | <!-- 绑定任务弹框 --> |
| | | <el-dialog v-model="bindDialogVisible" title="选择数据"> |
| | | <el-table |
| | | :data="bindBoxData" |
| | | highlight-current-row |
| | | @row-click="handleRowClick" |
| | | > |
| | | <el-table-column prop="skuNo" label="物料编码" show-overflow-tooltip="" /> |
| | | <el-table-column prop="skuName" label="物料名称" show-overflow-tooltip="" /> |
| | | <el-table-column prop="lotNo" label="批次号" show-overflow-tooltip="" /> |
| | | <el-table-column prop="lotText" label="批次描述" show-overflow-tooltip="" /> |
| | | <el-table-column prop="custom" label="供应商代码" show-overflow-tooltip="" /> |
| | | <el-table-column prop="customName" label="供应商名称" show-overflow-tooltip="" /> |
| | | <el-table-column prop="productionTime" label="生产日期" show-overflow-tooltip="" /> |
| | | <el-table-column prop="expirationTime" label="过期日期" show-overflow-tooltip="" /> |
| | | <el-table-column prop="standard" label="物料规格" show-overflow-tooltip="" /> |
| | | <el-table-column prop="packageStandard" label="包装规格" show-overflow-tooltip="" /> |
| | | <el-table-column prop="packUnit" label="包装单位" show-overflow-tooltip="" /> |
| | | <el-table-column prop="storeTime" label="存储期至" show-overflow-tooltip="" /> |
| | | </el-table> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="bindDialogVisible = false">取消</el-button> |
| | | <el-button type="primary" @click="confirmBinding">确认</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <style lang="scss" scoped> |
| | |
| | | import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils'; |
| | | import { getDictLabelByVal as dv } from '/@/utils/dict-utils'; |
| | | import { formatDate } from '/@/utils/formatTime'; |
| | | import { addWcsOderTask, updateWcsOderTask, detailWcsOderTask } from "/@/api/device/wcsOderTask"; |
| | | import { addWcsOderTask, updateWcsOderTask, detailWcsOderTask,GetGroupSkuList } from "/@/api/device/wcsOderTask"; |
| | | import { getAPI } from '/@/utils/axios-utils'; |
| | | import { SysEnumApi } from '/@/api-services/api'; |
| | | |
| | |
| | | onMounted(() => { |
| | | |
| | | }); |
| | | |
| | | const bindDialogVisible = ref(false); |
| | | const bindBoxData = ref<any>([]); |
| | | const selectedRow = ref<any>(null); |
| | | |
| | | // 打开弹窗 |
| | | const openDialog = async (row: any) => { |
| | |
| | | }; |
| | | |
| | | |
| | | const handleQuery = async () => { |
| | | var res = await GetGroupSkuList(); |
| | | console.log('res:'+res) |
| | | bindBoxData.value = res.data.result; |
| | | }; |
| | | //打开绑定弹框 |
| | | function openBindDialog() { |
| | | selectedRow.value=null; |
| | | |
| | | bindDialogVisible.value = true; |
| | | |
| | | handleQuery(); |
| | | } |
| | | |
| | | //点击行时设置选中行 |
| | | function handleRowClick(row) { |
| | | selectedRow.value = row; |
| | | } |
| | | |
| | | |
| | | //确认选择物料操作 |
| | | function confirmBinding() { |
| | | if (selectedRow.value) { |
| | | ruleForm.value.skuNo=selectedRow.value.skuNo; |
| | | ruleForm.value.skuName=selectedRow.value.skuName; |
| | | ruleForm.value.lotNo=selectedRow.value.lotNo; |
| | | ruleForm.value.Standard=selectedRow.value.Standard; |
| | | bindDialogVisible.value = false; |
| | | } else { |
| | | ElMessage.error('请选择物料!'); |
| | | } |
| | | } |
| | | //将属性或者函数暴露给父组件 |
| | | defineExpose({ openDialog }); |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <div class="wcsBoxInfo-container"> |
| | | <el-dialog v-model="isShowDialog" :width="800" draggable="" :close-on-click-modal="false"> |
| | | <template #header> |
| | | <div style="color: #fff"> |
| | | <!--<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-Edit /> </el-icon>--> |
| | | <span>{{ props.title }}</span> |
| | | </div> |
| | | </template> |
| | | <el-form :model="ruleForm" ref="ruleFormRef" label-width="auto" :rules="rules"> |
| | | <el-row :gutter="35"> |
| | | <el-form-item v-show="false"> |
| | | <el-input v-model="ruleForm.id" /> |
| | | </el-form-item> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="托盘号" prop="palletNo"> |
| | | <el-input v-model="ruleForm.palletNo" placeholder="请输入托盘号" maxlength="20" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="物料编码" prop="skuNo"> |
| | | <el-input v-model="ruleForm.skuNo" placeholder="请输入物料编码" maxlength="20" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="物料名称" prop="skuName"> |
| | | <el-input v-model="ruleForm.skuName" placeholder="请输入物料名称" maxlength="20" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="批次号" prop="lotNo"> |
| | | <el-input v-model="ruleForm.lotNo" placeholder="请输入批次号" maxlength="20" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="批次描述" prop="lotText"> |
| | | <el-input v-model="ruleForm.lotText" placeholder="请输入批次描述" maxlength="50" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="供应商代码" prop="custom"> |
| | | <el-input v-model="ruleForm.custom" placeholder="请输入供应商代码" maxlength="20" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="供应商名称" prop="customName"> |
| | | <el-input v-model="ruleForm.customName" placeholder="请输入供应商名称" maxlength="50" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="生产日期" prop="productionTime"> |
| | | <el-date-picker v-model="ruleForm.productionTime" type="date" placeholder="生产日期" /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="过期日期" prop="expirationTime"> |
| | | <el-date-picker v-model="ruleForm.expirationTime" type="date" placeholder="过期日期" /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="产线" prop="lineNo"> |
| | | <el-input v-model="ruleForm.lineNo" placeholder="请输入产线" maxlength="20" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="物料规格" prop="standard"> |
| | | <el-input v-model="ruleForm.standard" placeholder="请输入物料规格" maxlength="20" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="包装规格" prop="packageStandard"> |
| | | <el-input v-model="ruleForm.packageStandard" placeholder="请输入包装规格" maxlength="20" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="包装单位" prop="packUnit"> |
| | | <el-input v-model="ruleForm.packUnit" placeholder="请输入包装单位" maxlength="20" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="存储期至" prop="storeTime"> |
| | | <el-date-picker v-model="ruleForm.storeTime" type="date" placeholder="存储期至" /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="零箱标记" prop="bitBoxMark"> |
| | | <el-input v-model="ruleForm.bitBoxMark" placeholder="请输入零箱标记" maxlength="3" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="箱码" prop="boxNo"> |
| | | <el-input v-model="ruleForm.boxNo" placeholder="请输入箱码" maxlength="30" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="盒码" prop="boxNo2"> |
| | | <el-input v-model="ruleForm.boxNo2" placeholder="请输入盒码" maxlength="30" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="包装级别" prop="level"> |
| | | <el-input v-model="ruleForm.level" placeholder="请输入包装级别" maxlength="3" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | <el-button type="primary" @click="submit">确 定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <style lang="scss" scoped> |
| | | :deep(.el-select), |
| | | :deep(.el-input-number) { |
| | | width: 100%; |
| | | } |
| | | </style> |
| | | <script lang="ts" setup> |
| | | import { ref,onMounted } from "vue"; |
| | | import { ElMessage } from "element-plus"; |
| | | import type { FormRules } from "element-plus"; |
| | | import { formatDate } from '/@/utils/formatTime'; |
| | | import { addWcsBoxInfo, updateWcsBoxInfo, detailWcsBoxInfo } from "/@/api/main/wcsBoxInfo"; |
| | | |
| | | //父级传递来的参数 |
| | | var props = defineProps({ |
| | | title: { |
| | | type: String, |
| | | default: "", |
| | | }, |
| | | }); |
| | | //父级传递来的函数,用于回调 |
| | | const emit = defineEmits(["reloadTable"]); |
| | | const ruleFormRef = ref(); |
| | | const isShowDialog = ref(false); |
| | | const ruleForm = ref<any>({}); |
| | | //自行添加其他规则 |
| | | const rules = ref<FormRules>({ |
| | | }); |
| | | |
| | | // 页面加载时 |
| | | onMounted(() => { |
| | | |
| | | }); |
| | | |
| | | // 打开弹窗 |
| | | const openDialog = async (row: any) => { |
| | | // ruleForm.value = JSON.parse(JSON.stringify(row)); |
| | | // 改用detail获取最新数据来编辑 |
| | | let rowData = JSON.parse(JSON.stringify(row)); |
| | | if (rowData.id) |
| | | ruleForm.value = (await detailWcsBoxInfo(rowData.id)).data.result; |
| | | else |
| | | ruleForm.value = rowData; |
| | | isShowDialog.value = true; |
| | | }; |
| | | |
| | | // 关闭弹窗 |
| | | const closeDialog = () => { |
| | | emit("reloadTable"); |
| | | isShowDialog.value = false; |
| | | }; |
| | | |
| | | // 取消 |
| | | const cancel = () => { |
| | | isShowDialog.value = false; |
| | | }; |
| | | |
| | | // 提交 |
| | | const submit = async () => { |
| | | ruleFormRef.value.validate(async (isValid: boolean, fields?: any) => { |
| | | if (isValid) { |
| | | let values = ruleForm.value; |
| | | if (ruleForm.value.id == undefined || ruleForm.value.id == null || ruleForm.value.id == "" || ruleForm.value.id == 0) { |
| | | await addWcsBoxInfo(values); |
| | | } else { |
| | | await updateWcsBoxInfo(values); |
| | | } |
| | | closeDialog(); |
| | | } else { |
| | | ElMessage({ |
| | | message: `表单有${Object.keys(fields).length}处验证失败,请修改后再提交`, |
| | | type: "error", |
| | | }); |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //将属性或者函数暴露给父组件 |
| | | defineExpose({ openDialog }); |
| | | </script> |
| | | |
| | | |
| | | |
| | | |
New file |
| | |
| | | <template> |
| | | <div class="wcsBoxInfo-container"> |
| | | <el-card shadow="hover" :body-style="{ paddingBottom: '0' }"> |
| | | <el-form :model="queryParams" ref="queryForm" labelWidth="90"> |
| | | <el-row> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10"> |
| | | <el-form-item label="关键字"> |
| | | <el-input v-model="queryParams.searchKey" clearable="" placeholder="请输入模糊查询关键字"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="托盘号"> |
| | | <el-input v-model="queryParams.palletNo" clearable="" placeholder="请输入托盘号"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="物料编码"> |
| | | <el-input v-model="queryParams.skuNo" clearable="" placeholder="请输入物料编码"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="物料名称"> |
| | | <el-input v-model="queryParams.skuName" clearable="" placeholder="请输入物料名称"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="批次号"> |
| | | <el-input v-model="queryParams.lotNo" clearable="" placeholder="请输入批次号"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="批次描述"> |
| | | <el-input v-model="queryParams.lotText" clearable="" placeholder="请输入批次描述"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="供应商代码"> |
| | | <el-input v-model="queryParams.custom" clearable="" placeholder="请输入供应商代码"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="供应商名称"> |
| | | <el-input v-model="queryParams.customName" clearable="" placeholder="请输入供应商名称"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="生产日期"> |
| | | <el-date-picker type="daterange" v-model="queryParams.productionTimeRange" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" /> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="过期日期"> |
| | | <el-date-picker type="daterange" v-model="queryParams.expirationTimeRange" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" /> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="产线"> |
| | | <el-input v-model="queryParams.lineNo" clearable="" placeholder="请输入产线"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="物料规格"> |
| | | <el-input v-model="queryParams.standard" clearable="" placeholder="请输入物料规格"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="包装规格"> |
| | | <el-input v-model="queryParams.packageStandard" clearable="" placeholder="请输入包装规格"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="包装单位"> |
| | | <el-input v-model="queryParams.packUnit" clearable="" placeholder="请输入包装单位"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="存储期至"> |
| | | <el-date-picker type="daterange" v-model="queryParams.storeTimeRange" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" /> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="零箱标记"> |
| | | <el-input v-model="queryParams.bitBoxMark" clearable="" placeholder="请输入零箱标记"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="箱码"> |
| | | <el-input v-model="queryParams.boxNo" clearable="" placeholder="请输入箱码"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="盒码"> |
| | | <el-input v-model="queryParams.boxNo2" clearable="" placeholder="请输入盒码"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="包装级别"> |
| | | <el-input v-model="queryParams.level" clearable="" placeholder="请输入包装级别"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10"> |
| | | <el-form-item > |
| | | <el-button-group style="display: flex; align-items: center;"> |
| | | <el-button type="primary" icon="ele-Search" @click="handleQuery" v-auth="'wcsBoxInfo:page'"> 查询 </el-button> |
| | | <el-button icon="ele-Refresh" @click="() => queryParams = {}"> 重置 </el-button> |
| | | <el-button icon="ele-ZoomIn" @click="changeAdvanceQueryUI" v-if="!showAdvanceQueryUI" style="margin-left:5px;"> 高级查询 </el-button> |
| | | <el-button icon="ele-ZoomOut" @click="changeAdvanceQueryUI" v-if="showAdvanceQueryUI" style="margin-left:5px;"> 隐藏 </el-button> |
| | | <el-button type="primary" style="margin-left:5px;" icon="ele-Plus" @click="openAddWcsBoxInfo" v-auth="'wcsBoxInfo:add'"> 新增 </el-button> |
| | | |
| | | </el-button-group> |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </el-card> |
| | | <el-card class="full-table" shadow="hover" style="margin-top: 5px"> |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | v-loading="loading" |
| | | tooltip-effect="light" |
| | | row-key="id" |
| | | @sort-change="sortChange" |
| | | border=""> |
| | | <el-table-column type="index" label="序号" width="55" align="center"/> |
| | | <el-table-column prop="palletNo" label="托盘号" show-overflow-tooltip="" /> |
| | | <el-table-column prop="skuNo" label="物料编码" show-overflow-tooltip="" /> |
| | | <el-table-column prop="skuName" label="物料名称" show-overflow-tooltip="" /> |
| | | <el-table-column prop="lotNo" label="批次号" show-overflow-tooltip="" /> |
| | | <el-table-column prop="lotText" label="批次描述" show-overflow-tooltip="" /> |
| | | <el-table-column prop="custom" label="供应商代码" show-overflow-tooltip="" /> |
| | | <el-table-column prop="customName" label="供应商名称" show-overflow-tooltip="" /> |
| | | <el-table-column prop="productionTime" label="生产日期" show-overflow-tooltip="" /> |
| | | <el-table-column prop="expirationTime" label="过期日期" show-overflow-tooltip="" /> |
| | | <el-table-column prop="lineNo" label="产线" show-overflow-tooltip="" /> |
| | | <el-table-column prop="standard" label="物料规格" show-overflow-tooltip="" /> |
| | | <el-table-column prop="packageStandard" label="包装规格" show-overflow-tooltip="" /> |
| | | <el-table-column prop="packUnit" label="包装单位" show-overflow-tooltip="" /> |
| | | <el-table-column prop="storeTime" label="存储期至" show-overflow-tooltip="" /> |
| | | <el-table-column prop="bitBoxMark" label="零箱标记" show-overflow-tooltip="" /> |
| | | <el-table-column prop="boxNo" label="箱码" show-overflow-tooltip="" /> |
| | | <el-table-column prop="boxNo2" label="盒码" show-overflow-tooltip="" /> |
| | | <el-table-column prop="level" label="包装级别" show-overflow-tooltip="" /> |
| | | <el-table-column label="操作" width="140" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('wcsBoxInfo:update') || auth('wcsBoxInfo:delete')"> |
| | | <template #default="scope"> |
| | | <el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditWcsBoxInfo(scope.row)" v-auth="'wcsBoxInfo:update'"> 编辑 </el-button> |
| | | <el-button icon="ele-Delete" size="small" text="" type="primary" @click="delWcsBoxInfo(scope.row)" v-auth="'wcsBoxInfo:delete'"> 删除 </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination |
| | | v-model:currentPage="tableParams.page" |
| | | v-model:page-size="tableParams.pageSize" |
| | | :total="tableParams.total" |
| | | :page-sizes="[10, 20, 50, 100, 200, 500]" |
| | | size="small" |
| | | background="" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | /> |
| | | <printDialog |
| | | ref="printDialogRef" |
| | | :title="printWcsBoxInfoTitle" |
| | | @reloadTable="handleQuery" /> |
| | | <editDialog |
| | | ref="editDialogRef" |
| | | :title="editWcsBoxInfoTitle" |
| | | @reloadTable="handleQuery" |
| | | /> |
| | | </el-card> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts" setup="" name="wcsBoxInfo"> |
| | | import { ref } from "vue"; |
| | | import { ElMessageBox, ElMessage } from "element-plus"; |
| | | import { auth } from '/@/utils/authFunction'; |
| | | |
| | | import { formatDate } from '/@/utils/formatTime'; |
| | | |
| | | |
| | | import printDialog from '/@/views/system/print/component/hiprint/preview.vue' |
| | | import editDialog from '/@/views/main/wcsBoxInfo/component/editDialog.vue' |
| | | import { pageWcsBoxInfo, deleteWcsBoxInfo } from '/@/api/main/wcsBoxInfo'; |
| | | |
| | | const showAdvanceQueryUI = ref(false); |
| | | const printDialogRef = ref(); |
| | | const editDialogRef = ref(); |
| | | const loading = ref(false); |
| | | const tableData = ref<any>([]); |
| | | const queryParams = ref<any>({}); |
| | | const tableParams = ref({ |
| | | page: 1, |
| | | pageSize: 10, |
| | | total: 0, |
| | | }); |
| | | |
| | | const printWcsBoxInfoTitle = ref(""); |
| | | const editWcsBoxInfoTitle = ref(""); |
| | | |
| | | // 改变高级查询的控件显示状态 |
| | | const changeAdvanceQueryUI = () => { |
| | | showAdvanceQueryUI.value = !showAdvanceQueryUI.value; |
| | | } |
| | | |
| | | // 查询操作 |
| | | const handleQuery = async () => { |
| | | loading.value = true; |
| | | var res = await pageWcsBoxInfo(Object.assign(queryParams.value, tableParams.value)); |
| | | tableData.value = res.data.result?.items ?? []; |
| | | tableParams.value.total = res.data.result?.total; |
| | | loading.value = false; |
| | | }; |
| | | |
| | | // 列排序 |
| | | const sortChange = async (column: any) => { |
| | | queryParams.value.field = column.prop; |
| | | queryParams.value.order = column.order; |
| | | await handleQuery(); |
| | | }; |
| | | |
| | | // 打开新增页面 |
| | | const openAddWcsBoxInfo = () => { |
| | | editWcsBoxInfoTitle.value = '添加箱码明细表'; |
| | | editDialogRef.value.openDialog({}); |
| | | }; |
| | | |
| | | // 打开打印页面 |
| | | const openPrintWcsBoxInfo = async (row: any) => { |
| | | printWcsBoxInfoTitle.value = '打印箱码明细表'; |
| | | } |
| | | |
| | | // 打开编辑页面 |
| | | const openEditWcsBoxInfo = (row: any) => { |
| | | editWcsBoxInfoTitle.value = '编辑箱码明细表'; |
| | | editDialogRef.value.openDialog(row); |
| | | }; |
| | | |
| | | // 删除 |
| | | const delWcsBoxInfo = (row: any) => { |
| | | ElMessageBox.confirm(`确定要删除吗?`, "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(async () => { |
| | | await deleteWcsBoxInfo(row); |
| | | handleQuery(); |
| | | ElMessage.success("删除成功"); |
| | | }) |
| | | .catch(() => {}); |
| | | }; |
| | | |
| | | // 改变页面容量 |
| | | const handleSizeChange = (val: number) => { |
| | | tableParams.value.pageSize = val; |
| | | handleQuery(); |
| | | }; |
| | | |
| | | // 改变页码序号 |
| | | const handleCurrentChange = (val: number) => { |
| | | tableParams.value.page = val; |
| | | handleQuery(); |
| | | }; |
| | | |
| | | handleQuery(); |
| | | </script> |
| | | <style scoped> |
| | | :deep(.el-input), |
| | | :deep(.el-select), |
| | | :deep(.el-input-number) { |
| | | width: 100%; |
| | | } |
| | | </style> |
| | | |
New file |
| | |
| | | <template> |
| | | <div class="wcsCheckTask-container"> |
| | | <el-dialog v-model="isShowDialog" :width="800" draggable="" :close-on-click-modal="false"> |
| | | <template #header> |
| | | <div style="color: #fff"> |
| | | <!--<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-Edit /> </el-icon>--> |
| | | <span>{{ props.title }}</span> |
| | | </div> |
| | | </template> |
| | | <el-form :model="ruleForm" ref="ruleFormRef" label-width="auto" :rules="rules"> |
| | | <el-row :gutter="35"> |
| | | <el-form-item v-show="false"> |
| | | <el-input v-model="ruleForm.id" /> |
| | | </el-form-item> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="WMS下发单号" prop="orderNo"> |
| | | <el-input v-model="ruleForm.orderNo" placeholder="请输入WMS下发单号" maxlength="20" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="机器人编号" prop="roboatNo"> |
| | | <el-input v-model="ruleForm.roboatNo" placeholder="请输入机器人编号" maxlength="5" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="分拣线编号" prop="lineNO"> |
| | | <el-input v-model="ruleForm.lineNO" placeholder="请输入分拣线编号" maxlength="5" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="码盘工位号" prop="port"> |
| | | <el-input v-model="ruleForm.port" placeholder="请输入码盘工位号" maxlength="5" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="批次号" prop="lotNo"> |
| | | <el-input v-model="ruleForm.lotNo" placeholder="请输入批次号" maxlength="50" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="物料编码" prop="skuNo"> |
| | | <el-input v-model="ruleForm.skuNo" placeholder="请输入物料编码" maxlength="20" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="物料名称" prop="skuName"> |
| | | <el-input v-model="ruleForm.skuName" placeholder="请输入物料名称" maxlength="50" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="规格" prop="boxType"> |
| | | <el-input v-model="ruleForm.boxType" placeholder="请输入规格" maxlength="20" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="工位绑定状态" prop="status"> |
| | | <el-input v-model="ruleForm.status" placeholder="请输入工位绑定状态" maxlength="2" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="品种号" prop="pZNo"> |
| | | <el-input v-model="ruleForm.pZNo" placeholder="请输入品种号" maxlength="10" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="托盘号" prop="palletNo"> |
| | | <el-input v-model="ruleForm.palletNo" placeholder="请输入托盘号" maxlength="20" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="插码数量" prop="boxInsert"> |
| | | <el-input-number v-model="ruleForm.boxInsert" placeholder="请输入插码数量" clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="托盘上箱数量" prop="boxCount"> |
| | | <el-input-number v-model="ruleForm.boxCount" placeholder="请输入托盘上箱数量" clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="总箱数/计划箱数/预估箱数" prop="qty"> |
| | | <el-input-number v-model="ruleForm.qty" placeholder="请输入总箱数/计划箱数/预估箱数" clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="已码箱数" prop="finishQty"> |
| | | <el-input-number v-model="ruleForm.finishQty" placeholder="请输入已码箱数" clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="绑定时间" prop="bindTime"> |
| | | <el-date-picker v-model="ruleForm.bindTime" type="date" placeholder="绑定时间" /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="绑定者Id" prop="bindUserId"> |
| | | <el-input v-model="ruleForm.bindUserId" placeholder="请输入绑定者Id" maxlength="19" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | <el-button type="primary" @click="submit">确 定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <style lang="scss" scoped> |
| | | :deep(.el-select), |
| | | :deep(.el-input-number) { |
| | | width: 100%; |
| | | } |
| | | </style> |
| | | <script lang="ts" setup> |
| | | import { ref,onMounted } from "vue"; |
| | | import { ElMessage } from "element-plus"; |
| | | import type { FormRules } from "element-plus"; |
| | | import { formatDate } from '/@/utils/formatTime'; |
| | | import { addWcsCheckTask, updateWcsCheckTask, detailWcsCheckTask } from "/@/api/main/wcsCheckTask"; |
| | | |
| | | //父级传递来的参数 |
| | | var props = defineProps({ |
| | | title: { |
| | | type: String, |
| | | default: "", |
| | | }, |
| | | }); |
| | | //父级传递来的函数,用于回调 |
| | | const emit = defineEmits(["reloadTable"]); |
| | | const ruleFormRef = ref(); |
| | | const isShowDialog = ref(false); |
| | | const ruleForm = ref<any>({}); |
| | | //自行添加其他规则 |
| | | const rules = ref<FormRules>({ |
| | | }); |
| | | |
| | | // 页面加载时 |
| | | onMounted(() => { |
| | | |
| | | }); |
| | | |
| | | // 打开弹窗 |
| | | const openDialog = async (row: any) => { |
| | | // ruleForm.value = JSON.parse(JSON.stringify(row)); |
| | | // 改用detail获取最新数据来编辑 |
| | | let rowData = JSON.parse(JSON.stringify(row)); |
| | | if (rowData.id) |
| | | ruleForm.value = (await detailWcsCheckTask(rowData.id)).data.result; |
| | | else |
| | | ruleForm.value = rowData; |
| | | isShowDialog.value = true; |
| | | }; |
| | | |
| | | // 关闭弹窗 |
| | | const closeDialog = () => { |
| | | emit("reloadTable"); |
| | | isShowDialog.value = false; |
| | | }; |
| | | |
| | | // 取消 |
| | | const cancel = () => { |
| | | isShowDialog.value = false; |
| | | }; |
| | | |
| | | // 提交 |
| | | const submit = async () => { |
| | | ruleFormRef.value.validate(async (isValid: boolean, fields?: any) => { |
| | | if (isValid) { |
| | | let values = ruleForm.value; |
| | | if (ruleForm.value.id == undefined || ruleForm.value.id == null || ruleForm.value.id == "" || ruleForm.value.id == 0) { |
| | | await addWcsCheckTask(values); |
| | | } else { |
| | | await updateWcsCheckTask(values); |
| | | } |
| | | closeDialog(); |
| | | } else { |
| | | ElMessage({ |
| | | message: `表单有${Object.keys(fields).length}处验证失败,请修改后再提交`, |
| | | type: "error", |
| | | }); |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //将属性或者函数暴露给父组件 |
| | | defineExpose({ openDialog }); |
| | | </script> |
| | | |
| | | |
| | | |
| | | |
New file |
| | |
| | | <template> |
| | | <div class="wcsCheckTask-container"> |
| | | <el-card shadow="hover" :body-style="{ paddingBottom: '0' }"> |
| | | <el-form :model="queryParams" ref="queryForm" labelWidth="90"> |
| | | <el-row> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10"> |
| | | <el-form-item label="关键字"> |
| | | <el-input v-model="queryParams.searchKey" clearable="" placeholder="请输入模糊查询关键字"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="WMS下发单号"> |
| | | <el-input v-model="queryParams.orderNo" clearable="" placeholder="请输入WMS下发单号"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="机器人编号"> |
| | | <el-input v-model="queryParams.roboatNo" clearable="" placeholder="请输入机器人编号"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="分拣线编号"> |
| | | <el-input v-model="queryParams.lineNO" clearable="" placeholder="请输入分拣线编号"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="码盘工位号"> |
| | | <el-input v-model="queryParams.port" clearable="" placeholder="请输入码盘工位号"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="批次号"> |
| | | <el-input v-model="queryParams.lotNo" clearable="" placeholder="请输入批次号"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="物料编码"> |
| | | <el-input v-model="queryParams.skuNo" clearable="" placeholder="请输入物料编码"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="物料名称"> |
| | | <el-input v-model="queryParams.skuName" clearable="" placeholder="请输入物料名称"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="规格"> |
| | | <el-input v-model="queryParams.boxType" clearable="" placeholder="请输入规格"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="工位绑定状态"> |
| | | <el-input v-model="queryParams.status" clearable="" placeholder="请输入工位绑定状态"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="品种号"> |
| | | <el-input v-model="queryParams.pZNo" clearable="" placeholder="请输入品种号"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="托盘号"> |
| | | <el-input v-model="queryParams.palletNo" clearable="" placeholder="请输入托盘号"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="插码数量"> |
| | | <el-input-number v-model="queryParams.boxInsert" clearable="" placeholder="请输入插码数量"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="托盘上箱数量"> |
| | | <el-input-number v-model="queryParams.boxCount" clearable="" placeholder="请输入托盘上箱数量"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="总箱数/计划箱数/预估箱数"> |
| | | <el-input-number v-model="queryParams.qty" clearable="" placeholder="请输入总箱数/计划箱数/预估箱数"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="已码箱数"> |
| | | <el-input-number v-model="queryParams.finishQty" clearable="" placeholder="请输入已码箱数"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="绑定时间"> |
| | | <el-date-picker type="daterange" v-model="queryParams.bindTimeRange" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" /> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="绑定者Id"> |
| | | <el-input v-model="queryParams.bindUserId" clearable="" placeholder="请输入绑定者Id"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10"> |
| | | <el-form-item > |
| | | <el-button-group style="display: flex; align-items: center;"> |
| | | <el-button type="primary" icon="ele-Search" @click="handleQuery" v-auth="'wcsCheckTask:page'"> 查询 </el-button> |
| | | <el-button icon="ele-Refresh" @click="() => queryParams = {}"> 重置 </el-button> |
| | | <el-button icon="ele-ZoomIn" @click="changeAdvanceQueryUI" v-if="!showAdvanceQueryUI" style="margin-left:5px;"> 高级查询 </el-button> |
| | | <el-button icon="ele-ZoomOut" @click="changeAdvanceQueryUI" v-if="showAdvanceQueryUI" style="margin-left:5px;"> 隐藏 </el-button> |
| | | <el-button type="primary" style="margin-left:5px;" icon="ele-Plus" @click="openAddWcsCheckTask" v-auth="'wcsCheckTask:add'"> 新增 </el-button> |
| | | |
| | | </el-button-group> |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </el-card> |
| | | <el-card class="full-table" shadow="hover" style="margin-top: 5px"> |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | v-loading="loading" |
| | | tooltip-effect="light" |
| | | row-key="id" |
| | | @sort-change="sortChange" |
| | | border=""> |
| | | <el-table-column type="index" label="序号" width="55" align="center"/> |
| | | <el-table-column prop="orderNo" label="WMS下发单号" show-overflow-tooltip="" /> |
| | | <el-table-column prop="roboatNo" label="机器人编号" show-overflow-tooltip="" /> |
| | | <el-table-column prop="lineNO" label="分拣线编号" show-overflow-tooltip="" /> |
| | | <el-table-column prop="port" label="码盘工位号" show-overflow-tooltip="" /> |
| | | <el-table-column prop="lotNo" label="批次号" show-overflow-tooltip="" /> |
| | | <el-table-column prop="skuNo" label="物料编码" show-overflow-tooltip="" /> |
| | | <el-table-column prop="skuName" label="物料名称" show-overflow-tooltip="" /> |
| | | <el-table-column prop="boxType" label="规格" show-overflow-tooltip="" /> |
| | | <el-table-column prop="status" label="工位绑定状态" show-overflow-tooltip="" /> |
| | | <el-table-column prop="pZNo" label="品种号" show-overflow-tooltip="" /> |
| | | <el-table-column prop="palletNo" label="托盘号" show-overflow-tooltip="" /> |
| | | <el-table-column prop="boxInsert" label="插码数量" show-overflow-tooltip="" /> |
| | | <el-table-column prop="boxCount" label="托盘上箱数量" show-overflow-tooltip="" /> |
| | | <el-table-column prop="qty" label="总箱数/计划箱数/预估箱数" show-overflow-tooltip="" /> |
| | | <el-table-column prop="finishQty" label="已码箱数" show-overflow-tooltip="" /> |
| | | <el-table-column prop="bindTime" label="绑定时间" show-overflow-tooltip="" /> |
| | | <el-table-column prop="bindUserId" label="绑定者Id" show-overflow-tooltip="" /> |
| | | <el-table-column label="操作" width="140" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('wcsCheckTask:update') || auth('wcsCheckTask:delete')"> |
| | | <template #default="scope"> |
| | | <el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditWcsCheckTask(scope.row)" v-auth="'wcsCheckTask:update'"> 编辑 </el-button> |
| | | <el-button icon="ele-Delete" size="small" text="" type="primary" @click="delWcsCheckTask(scope.row)" v-auth="'wcsCheckTask:delete'"> 删除 </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination |
| | | v-model:currentPage="tableParams.page" |
| | | v-model:page-size="tableParams.pageSize" |
| | | :total="tableParams.total" |
| | | :page-sizes="[10, 20, 50, 100, 200, 500]" |
| | | size="small" |
| | | background="" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | /> |
| | | <printDialog |
| | | ref="printDialogRef" |
| | | :title="printWcsCheckTaskTitle" |
| | | @reloadTable="handleQuery" /> |
| | | <editDialog |
| | | ref="editDialogRef" |
| | | :title="editWcsCheckTaskTitle" |
| | | @reloadTable="handleQuery" |
| | | /> |
| | | </el-card> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts" setup="" name="wcsCheckTask"> |
| | | import { ref } from "vue"; |
| | | import { ElMessageBox, ElMessage } from "element-plus"; |
| | | import { auth } from '/@/utils/authFunction'; |
| | | |
| | | import { formatDate } from '/@/utils/formatTime'; |
| | | |
| | | |
| | | import printDialog from '/@/views/system/print/component/hiprint/preview.vue' |
| | | import editDialog from '/@/views/main/wcsCheckTask/component/editDialog.vue' |
| | | import { pageWcsCheckTask, deleteWcsCheckTask } from '/@/api/main/wcsCheckTask'; |
| | | |
| | | const showAdvanceQueryUI = ref(false); |
| | | const printDialogRef = ref(); |
| | | const editDialogRef = ref(); |
| | | const loading = ref(false); |
| | | const tableData = ref<any>([]); |
| | | const queryParams = ref<any>({}); |
| | | const tableParams = ref({ |
| | | page: 1, |
| | | pageSize: 10, |
| | | total: 0, |
| | | }); |
| | | |
| | | const printWcsCheckTaskTitle = ref(""); |
| | | const editWcsCheckTaskTitle = ref(""); |
| | | |
| | | // 改变高级查询的控件显示状态 |
| | | const changeAdvanceQueryUI = () => { |
| | | showAdvanceQueryUI.value = !showAdvanceQueryUI.value; |
| | | } |
| | | |
| | | // 查询操作 |
| | | const handleQuery = async () => { |
| | | loading.value = true; |
| | | var res = await pageWcsCheckTask(Object.assign(queryParams.value, tableParams.value)); |
| | | tableData.value = res.data.result?.items ?? []; |
| | | tableParams.value.total = res.data.result?.total; |
| | | loading.value = false; |
| | | }; |
| | | |
| | | // 列排序 |
| | | const sortChange = async (column: any) => { |
| | | queryParams.value.field = column.prop; |
| | | queryParams.value.order = column.order; |
| | | await handleQuery(); |
| | | }; |
| | | |
| | | // 打开新增页面 |
| | | const openAddWcsCheckTask = () => { |
| | | editWcsCheckTaskTitle.value = '添加分拣任务表'; |
| | | editDialogRef.value.openDialog({}); |
| | | }; |
| | | |
| | | // 打开打印页面 |
| | | const openPrintWcsCheckTask = async (row: any) => { |
| | | printWcsCheckTaskTitle.value = '打印分拣任务表'; |
| | | } |
| | | |
| | | // 打开编辑页面 |
| | | const openEditWcsCheckTask = (row: any) => { |
| | | editWcsCheckTaskTitle.value = '编辑分拣任务表'; |
| | | editDialogRef.value.openDialog(row); |
| | | }; |
| | | |
| | | // 删除 |
| | | const delWcsCheckTask = (row: any) => { |
| | | ElMessageBox.confirm(`确定要删除吗?`, "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(async () => { |
| | | await deleteWcsCheckTask(row); |
| | | handleQuery(); |
| | | ElMessage.success("删除成功"); |
| | | }) |
| | | .catch(() => {}); |
| | | }; |
| | | |
| | | // 改变页面容量 |
| | | const handleSizeChange = (val: number) => { |
| | | tableParams.value.pageSize = val; |
| | | handleQuery(); |
| | | }; |
| | | |
| | | // 改变页码序号 |
| | | const handleCurrentChange = (val: number) => { |
| | | tableParams.value.page = val; |
| | | handleQuery(); |
| | | }; |
| | | |
| | | handleQuery(); |
| | | </script> |
| | | <style scoped> |
| | | :deep(.el-input), |
| | | :deep(.el-select), |
| | | :deep(.el-input-number) { |
| | | width: 100%; |
| | | } |
| | | </style> |
| | | |