0531
parent
fc7d38306f
commit
36cbd6b1d1
Admin.NET/Admin.NET.Application
Service
ReportDetailTable/Dto
SysUnit
Web/src
views
inventoryManagement
invoice
component
outbound
component
productWarehousing
component
warehousing
component
productionCenter/reportDetailTable/component
warehouseManagement
warehouseDetails
component
warehousingStatistics
component
|
@ -0,0 +1,214 @@
|
|||
using Admin.NET.Core;
|
||||
namespace Admin.NET.Application.Entity;
|
||||
|
||||
/// <summary>
|
||||
/// 产品入库
|
||||
/// </summary>
|
||||
[SugarTable("ProductWarehousing","产品入库")]
|
||||
public class ProductWarehousing : EntityTenant
|
||||
{
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Name", ColumnDescription = "名称", Length = 32)]
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商品条码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "GoodCode", ColumnDescription = "商品条码", Length = 32)]
|
||||
public string? GoodCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料ID
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "MaterialsId", ColumnDescription = "物料ID")]
|
||||
public long? MaterialsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "MaterialsNum", ColumnDescription = "物料编码", Length = 32)]
|
||||
public string? MaterialsNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Specifications", ColumnDescription = "规格", Length = 32)]
|
||||
public string? Specifications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分类
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Classify", ColumnDescription = "分类", Length = 32)]
|
||||
public string? Classify { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库数量
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Count", ColumnDescription = "入库数量")]
|
||||
public int? Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库存单位
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Unit", ColumnDescription = "库存单位", Length = 32)]
|
||||
public string? Unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本数量
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "BaseCount", ColumnDescription = "基本数量")]
|
||||
public int? BaseCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本单位
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "BaseUnit", ColumnDescription = "基本单位", Length = 32)]
|
||||
public string? BaseUnit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 包装比例
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "PackageScale", ColumnDescription = "包装比例", Length = 32)]
|
||||
public string? PackageScale { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批次
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Batch", ColumnDescription = "批次", Length = 32)]
|
||||
public string? Batch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 公司
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Custom", ColumnDescription = "公司", Length = 32)]
|
||||
public string? Custom { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 品牌
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Brand", ColumnDescription = "品牌", Length = 32)]
|
||||
public string? Brand { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 条码类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "CodeType", ColumnDescription = "条码类型", Length = 32)]
|
||||
public string? CodeType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 条码数量
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "CodeCount", ColumnDescription = "条码数量")]
|
||||
public int? CodeCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库位
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "WarehouseLocation", ColumnDescription = "库位", Length = 32)]
|
||||
public string? WarehouseLocation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产日期
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "ProductDate", ColumnDescription = "生产日期")]
|
||||
public DateTime? ProductDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 失效日期
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "LoseDate", ColumnDescription = "失效日期")]
|
||||
public DateTime? LoseDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单重
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "SingleWeight", ColumnDescription = "单重", Length = 10, DecimalDigits=0 )]
|
||||
public decimal? SingleWeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总重
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "TotalWeight", ColumnDescription = "总重", Length = 10, DecimalDigits=0 )]
|
||||
public decimal? TotalWeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单价
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "UnitPrice", ColumnDescription = "单价", Length = 10, DecimalDigits=0 )]
|
||||
public decimal? UnitPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总价
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "TotalPrice", ColumnDescription = "总价", Length = 10, DecimalDigits=0 )]
|
||||
public decimal? TotalPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Remarks", ColumnDescription = "备注", Length = 32)]
|
||||
public string? Remarks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源ID
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "SourceId", ColumnDescription = "源ID")]
|
||||
public long? SourceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 仓库ID
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "WarehouseId", ColumnDescription = "仓库ID")]
|
||||
public long? WarehouseId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 拓展字段
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "ExpandField", ColumnDescription = "拓展字段", Length = 32)]
|
||||
public string? ExpandField { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "WarehousingType", ColumnDescription = "入库类型", Length = 32)]
|
||||
public string? WarehousingType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "CodeNum", ColumnDescription = "物料编码", Length = 32)]
|
||||
public string? CodeNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库日期
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "WarehousingDate", ColumnDescription = "入库日期")]
|
||||
public DateTime? WarehousingDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 供应商
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Supplier", ColumnDescription = "供应商", Length = 32)]
|
||||
public string? Supplier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Status", ColumnDescription = "状态")]
|
||||
public int? Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "OddNumber", ColumnDescription = "单号", Length = 32)]
|
||||
public string? OddNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产线
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "ProductionLine", ColumnDescription = "生产线", Length = 32)]
|
||||
public string? ProductionLine { get; set; }
|
||||
|
||||
}
|
|
@ -159,4 +159,10 @@ public class ReportDetailTable : EntityTenant
|
|||
[SugarColumn(ColumnName = "Remarks", ColumnDescription = "备注", Length = 32)]
|
||||
public string? Remarks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料ID
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "MaterialsId", ColumnDescription = "物料ID")]
|
||||
public long? MaterialsId { get; set; }
|
||||
|
||||
}
|
||||
|
|
|
@ -48,7 +48,13 @@ public class ReportTable : EntityTenant
|
|||
/// </summary>
|
||||
[SugarColumn(ColumnName = "SourceNumber", ColumnDescription = "源单号", Length = 32)]
|
||||
public string? SourceNumber { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 物料ID
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "MaterialsId", ColumnDescription = "物料ID")]
|
||||
public long? MaterialsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
|
|
|
@ -0,0 +1,172 @@
|
|||
using Admin.NET.Core;
|
||||
namespace Admin.NET.Application.Entity;
|
||||
|
||||
/// <summary>
|
||||
/// 仓库统计
|
||||
/// </summary>
|
||||
[SugarTable("WarehouseDetails","仓库统计")]
|
||||
public class WarehouseDetails : EntityTenant
|
||||
{
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Name", ColumnDescription = "名称", Length = 32)]
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商品条码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "GoodCode", ColumnDescription = "商品条码", Length = 32)]
|
||||
public string? GoodCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "MaterialsNum", ColumnDescription = "物料编码", Length = 32)]
|
||||
public string? MaterialsNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Specifications", ColumnDescription = "规格", Length = 32)]
|
||||
public string? Specifications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分类
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Classify", ColumnDescription = "分类", Length = 32)]
|
||||
public string? Classify { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库存数量
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Count", ColumnDescription = "库存数量")]
|
||||
public int? Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库存单位
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Unit", ColumnDescription = "库存单位", Length = 32)]
|
||||
public string? Unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本数量
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "BaseCount", ColumnDescription = "基本数量")]
|
||||
public int? BaseCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本单位
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "BaseUnit", ColumnDescription = "基本单位", Length = 32)]
|
||||
public string? BaseUnit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 包装比例
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "PackageScale", ColumnDescription = "包装比例", Length = 32)]
|
||||
public string? PackageScale { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批次
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Batch", ColumnDescription = "批次", Length = 32)]
|
||||
public string? Batch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 公司
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Custom", ColumnDescription = "公司", Length = 32)]
|
||||
public string? Custom { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 品牌
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Brand", ColumnDescription = "品牌", Length = 32)]
|
||||
public string? Brand { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 条码类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "CodeType", ColumnDescription = "条码类型", Length = 32)]
|
||||
public string? CodeType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 条码数量
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "CodeCount", ColumnDescription = "条码数量")]
|
||||
public int? CodeCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库位
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "WarehouseLocation", ColumnDescription = "库位", Length = 32)]
|
||||
public string? WarehouseLocation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产日期
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "ProductDate", ColumnDescription = "生产日期")]
|
||||
public DateTime? ProductDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 失效日期
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "LoseDate", ColumnDescription = "失效日期")]
|
||||
public DateTime? LoseDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单重
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "SingleWeight", ColumnDescription = "单重", Length = 32, DecimalDigits=0 )]
|
||||
public decimal? SingleWeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总重
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "TotalWeight", ColumnDescription = "总重", Length = 32, DecimalDigits=0 )]
|
||||
public decimal? TotalWeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单价
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "UnitPrice", ColumnDescription = "单价", Length = 10, DecimalDigits=0 )]
|
||||
public decimal? UnitPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总价
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "TotalPrice", ColumnDescription = "总价", Length = 10, DecimalDigits=0 )]
|
||||
public decimal? TotalPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Remarks", ColumnDescription = "备注", Length = 32)]
|
||||
public string? Remarks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源ID
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "SourceId", ColumnDescription = "源ID")]
|
||||
public long? SourceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 仓库ID
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "WarehouseId", ColumnDescription = "仓库ID", Length = 32)]
|
||||
public string? WarehouseId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 拓展字段
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "ExpandField", ColumnDescription = "拓展字段", Length = 32)]
|
||||
public string? ExpandField { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料ID
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "MaterialsId", ColumnDescription = "物料ID")]
|
||||
public long? MaterialsId { get; set; }
|
||||
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
using Admin.NET.Core;
|
||||
namespace Admin.NET.Application.Entity;
|
||||
|
||||
/// <summary>
|
||||
/// 入库统计
|
||||
/// </summary>
|
||||
[SugarTable("WarehousingStatistics","入库统计")]
|
||||
public class WarehousingStatistics : EntityTenant
|
||||
{
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Name", ColumnDescription = "名称", Length = 32)]
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "CodeNum", ColumnDescription = "物料编码", Length = 32)]
|
||||
public string? CodeNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库数量
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Count", ColumnDescription = "入库数量")]
|
||||
public int? Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库单位
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Unit", ColumnDescription = "入库单位", Length = 32)]
|
||||
public string? Unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本数量
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "BaseCount", ColumnDescription = "基本数量")]
|
||||
public int? BaseCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本单位
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "BaseUnit", ColumnDescription = "基本单位", Length = 32)]
|
||||
public string? BaseUnit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 品牌
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Brand", ColumnDescription = "品牌", Length = 32)]
|
||||
public string? Brand { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Specifications", ColumnDescription = "规格", Length = 32)]
|
||||
public string? Specifications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "WarehousingType", ColumnDescription = "入库类型", Length = 32)]
|
||||
public string? WarehousingType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料ID
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "MaterialsId", ColumnDescription = "物料ID")]
|
||||
public long? MaterialsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 来源ID
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "SourceId", ColumnDescription = "来源ID")]
|
||||
public long? SourceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库日期
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "WarehousingDate", ColumnDescription = "入库日期")]
|
||||
public DateTime? WarehousingDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库仓库ID
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "WarehouseId", ColumnDescription = "入库仓库ID")]
|
||||
public long? WarehouseId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库位
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "WarehouseLocation", ColumnDescription = "库位", Length = 32)]
|
||||
public string? WarehouseLocation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 供应商
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Supplier", ColumnDescription = "供应商", Length = 32)]
|
||||
public string? Supplier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Remarks", ColumnDescription = "备注", Length = 32)]
|
||||
public string? Remarks { get; set; }
|
||||
|
||||
}
|
|
@ -0,0 +1,223 @@
|
|||
namespace Admin.NET.Application;
|
||||
|
||||
/// <summary>
|
||||
/// 产品入库输出参数
|
||||
/// </summary>
|
||||
public class ProductWarehousingDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商品条码
|
||||
/// </summary>
|
||||
public string? GoodCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料ID
|
||||
/// </summary>
|
||||
public long? MaterialsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
public string? MaterialsNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格
|
||||
/// </summary>
|
||||
public string? Specifications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分类
|
||||
/// </summary>
|
||||
public string? Classify { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库数量
|
||||
/// </summary>
|
||||
public int? Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库存单位
|
||||
/// </summary>
|
||||
public string? Unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本数量
|
||||
/// </summary>
|
||||
public int? BaseCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本单位
|
||||
/// </summary>
|
||||
public string? BaseUnit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 包装比例
|
||||
/// </summary>
|
||||
public string? PackageScale { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批次
|
||||
/// </summary>
|
||||
public string? Batch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 公司
|
||||
/// </summary>
|
||||
public string? Custom { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 品牌
|
||||
/// </summary>
|
||||
public string? Brand { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 条码类型
|
||||
/// </summary>
|
||||
public string? CodeType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 条码数量
|
||||
/// </summary>
|
||||
public int? CodeCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库位
|
||||
/// </summary>
|
||||
public string? WarehouseLocation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产日期
|
||||
/// </summary>
|
||||
public DateTime? ProductDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 失效日期
|
||||
/// </summary>
|
||||
public DateTime? LoseDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单重
|
||||
/// </summary>
|
||||
public decimal? SingleWeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总重
|
||||
/// </summary>
|
||||
public decimal? TotalWeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单价
|
||||
/// </summary>
|
||||
public decimal? UnitPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总价
|
||||
/// </summary>
|
||||
public decimal? TotalPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string? Remarks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源ID
|
||||
/// </summary>
|
||||
public long? SourceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 仓库ID
|
||||
/// </summary>
|
||||
public long? WarehouseId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 拓展字段
|
||||
/// </summary>
|
||||
public string? ExpandField { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库类型
|
||||
/// </summary>
|
||||
public string? WarehousingType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
public string? CodeNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库日期
|
||||
/// </summary>
|
||||
public DateTime? WarehousingDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 供应商
|
||||
/// </summary>
|
||||
public string? Supplier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public int? Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单号
|
||||
/// </summary>
|
||||
public string? OddNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产线
|
||||
/// </summary>
|
||||
public string? ProductionLine { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 租户Id
|
||||
/// </summary>
|
||||
public long? TenantId { 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>
|
||||
/// 软删除
|
||||
/// </summary>
|
||||
public bool IsDelete { get; set; }
|
||||
|
||||
}
|
|
@ -0,0 +1,456 @@
|
|||
using Admin.NET.Core;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Admin.NET.Application;
|
||||
|
||||
/// <summary>
|
||||
/// 产品入库基础输入参数
|
||||
/// </summary>
|
||||
public class ProductWarehousingBaseInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public virtual string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商品条码
|
||||
/// </summary>
|
||||
public virtual string? GoodCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料ID
|
||||
/// </summary>
|
||||
public virtual long? MaterialsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
public virtual string? MaterialsNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格
|
||||
/// </summary>
|
||||
public virtual string? Specifications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分类
|
||||
/// </summary>
|
||||
public virtual string? Classify { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库数量
|
||||
/// </summary>
|
||||
public virtual int? Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库存单位
|
||||
/// </summary>
|
||||
public virtual string? Unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本数量
|
||||
/// </summary>
|
||||
public virtual int? BaseCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本单位
|
||||
/// </summary>
|
||||
public virtual string? BaseUnit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 包装比例
|
||||
/// </summary>
|
||||
public virtual string? PackageScale { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批次
|
||||
/// </summary>
|
||||
public virtual string? Batch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 公司
|
||||
/// </summary>
|
||||
public virtual string? Custom { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 品牌
|
||||
/// </summary>
|
||||
public virtual string? Brand { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 条码类型
|
||||
/// </summary>
|
||||
public virtual string? CodeType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 条码数量
|
||||
/// </summary>
|
||||
public virtual int? CodeCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库位
|
||||
/// </summary>
|
||||
public virtual string? WarehouseLocation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产日期
|
||||
/// </summary>
|
||||
public virtual DateTime? ProductDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 失效日期
|
||||
/// </summary>
|
||||
public virtual DateTime? LoseDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单重
|
||||
/// </summary>
|
||||
public virtual decimal? SingleWeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总重
|
||||
/// </summary>
|
||||
public virtual decimal? TotalWeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单价
|
||||
/// </summary>
|
||||
public virtual decimal? UnitPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总价
|
||||
/// </summary>
|
||||
public virtual decimal? TotalPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public virtual string? Remarks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源ID
|
||||
/// </summary>
|
||||
public virtual long? SourceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 仓库ID
|
||||
/// </summary>
|
||||
public virtual long? WarehouseId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 拓展字段
|
||||
/// </summary>
|
||||
public virtual string? ExpandField { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库类型
|
||||
/// </summary>
|
||||
public virtual string? WarehousingType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
public virtual string? CodeNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库日期
|
||||
/// </summary>
|
||||
public virtual DateTime? WarehousingDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 供应商
|
||||
/// </summary>
|
||||
public virtual string? Supplier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public virtual int? Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单号
|
||||
/// </summary>
|
||||
public virtual string? OddNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产线
|
||||
/// </summary>
|
||||
public virtual string? ProductionLine { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 租户Id
|
||||
/// </summary>
|
||||
public virtual long? TenantId { 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>
|
||||
/// 软删除
|
||||
/// </summary>
|
||||
public virtual bool IsDelete { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 产品入库分页查询输入参数
|
||||
/// </summary>
|
||||
public class ProductWarehousingInput : BasePageInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 关键字查询
|
||||
/// </summary>
|
||||
public string? SearchKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商品条码
|
||||
/// </summary>
|
||||
public string? GoodCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料ID
|
||||
/// </summary>
|
||||
public long? MaterialsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
public string? MaterialsNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格
|
||||
/// </summary>
|
||||
public string? Specifications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分类
|
||||
/// </summary>
|
||||
public string? Classify { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库数量
|
||||
/// </summary>
|
||||
public int? Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库存单位
|
||||
/// </summary>
|
||||
public string? Unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本数量
|
||||
/// </summary>
|
||||
public int? BaseCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本单位
|
||||
/// </summary>
|
||||
public string? BaseUnit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 包装比例
|
||||
/// </summary>
|
||||
public string? PackageScale { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批次
|
||||
/// </summary>
|
||||
public string? Batch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 公司
|
||||
/// </summary>
|
||||
public string? Custom { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 品牌
|
||||
/// </summary>
|
||||
public string? Brand { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 条码类型
|
||||
/// </summary>
|
||||
public string? CodeType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 条码数量
|
||||
/// </summary>
|
||||
public int? CodeCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库位
|
||||
/// </summary>
|
||||
public string? WarehouseLocation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产日期
|
||||
/// </summary>
|
||||
public DateTime? ProductDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产日期范围
|
||||
/// </summary>
|
||||
public List<DateTime?> ProductDateRange { get; set; }
|
||||
/// <summary>
|
||||
/// 失效日期
|
||||
/// </summary>
|
||||
public DateTime? LoseDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 失效日期范围
|
||||
/// </summary>
|
||||
public List<DateTime?> LoseDateRange { get; set; }
|
||||
/// <summary>
|
||||
/// 单重
|
||||
/// </summary>
|
||||
public decimal? SingleWeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总重
|
||||
/// </summary>
|
||||
public decimal? TotalWeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单价
|
||||
/// </summary>
|
||||
public decimal? UnitPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总价
|
||||
/// </summary>
|
||||
public decimal? TotalPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string? Remarks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源ID
|
||||
/// </summary>
|
||||
public long? SourceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 仓库ID
|
||||
/// </summary>
|
||||
public long? WarehouseId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 拓展字段
|
||||
/// </summary>
|
||||
public string? ExpandField { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库类型
|
||||
/// </summary>
|
||||
public string? WarehousingType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
public string? CodeNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库日期
|
||||
/// </summary>
|
||||
public DateTime? WarehousingDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库日期范围
|
||||
/// </summary>
|
||||
public List<DateTime?> WarehousingDateRange { get; set; }
|
||||
/// <summary>
|
||||
/// 供应商
|
||||
/// </summary>
|
||||
public string? Supplier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public int? Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单号
|
||||
/// </summary>
|
||||
public string? OddNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产线
|
||||
/// </summary>
|
||||
public string? ProductionLine { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 产品入库增加输入参数
|
||||
/// </summary>
|
||||
public class AddProductWarehousingInput : ProductWarehousingBaseInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 软删除
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "软删除不能为空")]
|
||||
public override bool IsDelete { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 产品入库删除输入参数
|
||||
/// </summary>
|
||||
public class DeleteProductWarehousingInput : BaseIdInput
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 产品入库更新输入参数
|
||||
/// </summary>
|
||||
public class UpdateProductWarehousingInput : ProductWarehousingBaseInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "主键Id不能为空")]
|
||||
public long Id { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 产品入库主键查询输入参数
|
||||
/// </summary>
|
||||
public class QueryByIdProductWarehousingInput : DeleteProductWarehousingInput
|
||||
{
|
||||
|
||||
}
|
|
@ -0,0 +1,225 @@
|
|||
namespace Admin.NET.Application;
|
||||
|
||||
/// <summary>
|
||||
/// 产品入库输出参数
|
||||
/// </summary>
|
||||
public class ProductWarehousingOutput
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商品条码
|
||||
/// </summary>
|
||||
public string? GoodCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料ID
|
||||
/// </summary>
|
||||
public long? MaterialsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
public string? MaterialsNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格
|
||||
/// </summary>
|
||||
public string? Specifications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分类
|
||||
/// </summary>
|
||||
public string? Classify { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库数量
|
||||
/// </summary>
|
||||
public int? Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库存单位
|
||||
/// </summary>
|
||||
public string? Unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本数量
|
||||
/// </summary>
|
||||
public int? BaseCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本单位
|
||||
/// </summary>
|
||||
public string? BaseUnit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 包装比例
|
||||
/// </summary>
|
||||
public string? PackageScale { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批次
|
||||
/// </summary>
|
||||
public string? Batch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 公司
|
||||
/// </summary>
|
||||
public string? Custom { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 品牌
|
||||
/// </summary>
|
||||
public string? Brand { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 条码类型
|
||||
/// </summary>
|
||||
public string? CodeType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 条码数量
|
||||
/// </summary>
|
||||
public int? CodeCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库位
|
||||
/// </summary>
|
||||
public string? WarehouseLocation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产日期
|
||||
/// </summary>
|
||||
public DateTime? ProductDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 失效日期
|
||||
/// </summary>
|
||||
public DateTime? LoseDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单重
|
||||
/// </summary>
|
||||
public decimal? SingleWeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总重
|
||||
/// </summary>
|
||||
public decimal? TotalWeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单价
|
||||
/// </summary>
|
||||
public decimal? UnitPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总价
|
||||
/// </summary>
|
||||
public decimal? TotalPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string? Remarks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源ID
|
||||
/// </summary>
|
||||
public long? SourceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 仓库ID
|
||||
/// </summary>
|
||||
public long? WarehouseId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 拓展字段
|
||||
/// </summary>
|
||||
public string? ExpandField { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库类型
|
||||
/// </summary>
|
||||
public string? WarehousingType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
public string? CodeNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库日期
|
||||
/// </summary>
|
||||
public DateTime? WarehousingDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 供应商
|
||||
/// </summary>
|
||||
public string? Supplier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public int? Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单号
|
||||
/// </summary>
|
||||
public string? OddNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产线
|
||||
/// </summary>
|
||||
public string? ProductionLine { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 租户Id
|
||||
/// </summary>
|
||||
public long? TenantId { 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>
|
||||
/// 软删除
|
||||
/// </summary>
|
||||
public bool IsDelete { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,249 @@
|
|||
using Admin.NET.Core.Service;
|
||||
using Admin.NET.Application.Const;
|
||||
using Admin.NET.Application.Entity;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
namespace Admin.NET.Application;
|
||||
/// <summary>
|
||||
/// 产品入库服务
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(ApplicationConst.GroupName, Order = 100)]
|
||||
public class ProductWarehousingService : IDynamicApiController, ITransient
|
||||
{
|
||||
private readonly SqlSugarRepository<ProductWarehousing> _rep;
|
||||
private readonly WarehouseDetailsService _warehouseDetails;
|
||||
private readonly MaterialsService _materialsService;
|
||||
private readonly SysUnitService _sysUnitService;
|
||||
private readonly MaterialClassifyService _materialClassifyService;
|
||||
private readonly WarehousingStatisticsService _warehousingStatisticsService;
|
||||
public ProductWarehousingService(SqlSugarRepository<ProductWarehousing> rep,
|
||||
WarehouseDetailsService warehouseDetails,
|
||||
MaterialsService materialsService,
|
||||
SysUnitService sysUnitService,
|
||||
MaterialClassifyService materialClassifyService,
|
||||
WarehousingStatisticsService warehousingStatisticsService)
|
||||
{
|
||||
_rep = rep;
|
||||
_warehouseDetails = warehouseDetails;
|
||||
_materialsService = materialsService;
|
||||
_sysUnitService = sysUnitService;
|
||||
_materialClassifyService = materialClassifyService;
|
||||
_warehousingStatisticsService = warehousingStatisticsService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询产品入库
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ApiDescriptionSettings(Name = "Page")]
|
||||
public async Task<SqlSugarPagedList<ProductWarehousingOutput>> Page(ProductWarehousingInput input)
|
||||
{
|
||||
var query = _rep.AsQueryable()
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.SearchKey), u =>
|
||||
u.Name.Contains(input.SearchKey.Trim())
|
||||
|| u.GoodCode.Contains(input.SearchKey.Trim())
|
||||
|| u.MaterialsNum.Contains(input.SearchKey.Trim())
|
||||
|| u.Specifications.Contains(input.SearchKey.Trim())
|
||||
|| u.Classify.Contains(input.SearchKey.Trim())
|
||||
|| u.Unit.Contains(input.SearchKey.Trim())
|
||||
|| u.BaseUnit.Contains(input.SearchKey.Trim())
|
||||
|| u.PackageScale.Contains(input.SearchKey.Trim())
|
||||
|| u.Batch.Contains(input.SearchKey.Trim())
|
||||
|| u.Custom.Contains(input.SearchKey.Trim())
|
||||
|| u.Brand.Contains(input.SearchKey.Trim())
|
||||
|| u.CodeType.Contains(input.SearchKey.Trim())
|
||||
|| u.WarehouseLocation.Contains(input.SearchKey.Trim())
|
||||
|| u.Remarks.Contains(input.SearchKey.Trim())
|
||||
|| u.ExpandField.Contains(input.SearchKey.Trim())
|
||||
|| u.WarehousingType.Contains(input.SearchKey.Trim())
|
||||
|| u.CodeNum.Contains(input.SearchKey.Trim())
|
||||
|| u.Supplier.Contains(input.SearchKey.Trim())
|
||||
|| u.OddNumber.Contains(input.SearchKey.Trim())
|
||||
|| u.ProductionLine.Contains(input.SearchKey.Trim())
|
||||
)
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Name), u => u.Name.Contains(input.Name.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.GoodCode), u => u.GoodCode.Contains(input.GoodCode.Trim()))
|
||||
.WhereIF(input.MaterialsId>0, u => u.MaterialsId == input.MaterialsId)
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.MaterialsNum), u => u.MaterialsNum.Contains(input.MaterialsNum.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Specifications), u => u.Specifications.Contains(input.Specifications.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Classify), u => u.Classify.Contains(input.Classify.Trim()))
|
||||
.WhereIF(input.Count>0, u => u.Count == input.Count)
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Unit), u => u.Unit.Contains(input.Unit.Trim()))
|
||||
.WhereIF(input.BaseCount>0, u => u.BaseCount == input.BaseCount)
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.BaseUnit), u => u.BaseUnit.Contains(input.BaseUnit.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.PackageScale), u => u.PackageScale.Contains(input.PackageScale.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Batch), u => u.Batch.Contains(input.Batch.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Custom), u => u.Custom.Contains(input.Custom.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Brand), u => u.Brand.Contains(input.Brand.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.CodeType), u => u.CodeType.Contains(input.CodeType.Trim()))
|
||||
.WhereIF(input.CodeCount>0, u => u.CodeCount == input.CodeCount)
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.WarehouseLocation), u => u.WarehouseLocation.Contains(input.WarehouseLocation.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Remarks), u => u.Remarks.Contains(input.Remarks.Trim()))
|
||||
.WhereIF(input.SourceId>0, u => u.SourceId == input.SourceId)
|
||||
.WhereIF(input.WarehouseId>0, u => u.WarehouseId == input.WarehouseId)
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.ExpandField), u => u.ExpandField.Contains(input.ExpandField.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.WarehousingType), u => u.WarehousingType.Contains(input.WarehousingType.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.CodeNum), u => u.CodeNum.Contains(input.CodeNum.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Supplier), u => u.Supplier.Contains(input.Supplier.Trim()))
|
||||
.WhereIF(input.Status>0, u => u.Status == input.Status)
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.OddNumber), u => u.OddNumber.Contains(input.OddNumber.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.ProductionLine), u => u.ProductionLine.Contains(input.ProductionLine.Trim()))
|
||||
.Select<ProductWarehousingOutput>();
|
||||
if(input.ProductDateRange != null && input.ProductDateRange.Count >0)
|
||||
{
|
||||
DateTime? start= input.ProductDateRange[0];
|
||||
query = query.WhereIF(start.HasValue, u => u.ProductDate > start);
|
||||
if (input.ProductDateRange.Count >1 && input.ProductDateRange[1].HasValue)
|
||||
{
|
||||
var end = input.ProductDateRange[1].Value.AddDays(1);
|
||||
query = query.Where(u => u.ProductDate < end);
|
||||
}
|
||||
}
|
||||
if(input.LoseDateRange != null && input.LoseDateRange.Count >0)
|
||||
{
|
||||
DateTime? start= input.LoseDateRange[0];
|
||||
query = query.WhereIF(start.HasValue, u => u.LoseDate > start);
|
||||
if (input.LoseDateRange.Count >1 && input.LoseDateRange[1].HasValue)
|
||||
{
|
||||
var end = input.LoseDateRange[1].Value.AddDays(1);
|
||||
query = query.Where(u => u.LoseDate < end);
|
||||
}
|
||||
}
|
||||
if(input.WarehousingDateRange != null && input.WarehousingDateRange.Count >0)
|
||||
{
|
||||
DateTime? start= input.WarehousingDateRange[0];
|
||||
query = query.WhereIF(start.HasValue, u => u.WarehousingDate > start);
|
||||
if (input.WarehousingDateRange.Count >1 && input.WarehousingDateRange[1].HasValue)
|
||||
{
|
||||
var end = input.WarehousingDateRange[1].Value.AddDays(1);
|
||||
query = query.Where(u => u.WarehousingDate < end);
|
||||
}
|
||||
}
|
||||
return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加产品入库
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ApiDescriptionSettings(Name = "Add")]
|
||||
public async Task<long> Add(AddProductWarehousingInput input)
|
||||
{
|
||||
var materials = await _materialsService.Detail(new QueryByIdMaterialsInput() { Id = input.MaterialsId.Value });
|
||||
SysUnitOutput unit = null;
|
||||
string unitScale = string.Empty;
|
||||
if (materials != null)
|
||||
{
|
||||
input.Specifications = materials.Specifications;
|
||||
input.CodeNum = materials.CodeNum;
|
||||
input.Brand = materials.Brand;
|
||||
var units = await _sysUnitService.ListByGroupId(materials.UnitGroupId.Value);
|
||||
unit = units.Find(a => a.Name == input.Unit);
|
||||
if (unit != null)
|
||||
{
|
||||
input.BaseCount = input.Count * unit.Rate;
|
||||
input.BaseUnit = units.FirstOrDefault(a => a.IsBaseUnit == true).Name;
|
||||
unitScale = SysUnitService.GetUnitScale(units);
|
||||
}
|
||||
input.GoodCode = materials.BarCode;
|
||||
input.MaterialsNum = materials.CodeNum;
|
||||
input.UnitPrice = materials.Price;
|
||||
input.Custom = input.Supplier;
|
||||
if (unit != null)
|
||||
{
|
||||
input.BaseCount = input.Count * unit.Rate;
|
||||
}
|
||||
input.TotalPrice = input.BaseCount * materials.Price;
|
||||
input.PackageScale = unitScale;
|
||||
input.Classify = (await _materialClassifyService.Detail(new QueryByIdMaterialClassifyInput() { Id = materials.Classify })).Name;
|
||||
}
|
||||
|
||||
|
||||
var entity = input.Adapt<ProductWarehousing>();
|
||||
await _rep.InsertAsync(entity);
|
||||
|
||||
var details = await _warehouseDetails.List();
|
||||
if (details != null && details.Any(a => a.MaterialsId == input.MaterialsId && a.Unit == input.Unit))
|
||||
{
|
||||
var detail = details.Find(a => a.MaterialsId == input.MaterialsId && a.Unit == input.Unit);
|
||||
detail.Count += input.Count;
|
||||
if (unit != null)
|
||||
{
|
||||
detail.BaseCount = detail.Count * unit.Rate;
|
||||
}
|
||||
await _warehouseDetails.UpdateByEntity(detail.Adapt<WarehouseDetails>());
|
||||
}
|
||||
else
|
||||
{
|
||||
var newEnt = input.Adapt<AddWarehouseDetailsInput>();
|
||||
newEnt.SourceId = entity.Id;
|
||||
var addId = await _warehouseDetails.Add(newEnt);
|
||||
}
|
||||
|
||||
var newDetail = input.Adapt<AddWarehousingStatisticsInput>();
|
||||
newDetail.SourceId = entity.Id;
|
||||
await _warehousingStatisticsService.Add(newDetail);
|
||||
|
||||
return entity.Id;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除产品入库
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ApiDescriptionSettings(Name = "Delete")]
|
||||
public async Task Delete(DeleteProductWarehousingInput input)
|
||||
{
|
||||
var entity = await _rep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002);
|
||||
await _rep.FakeDeleteAsync(entity); //假删除
|
||||
//await _rep.DeleteAsync(entity); //真删除
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新产品入库
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ApiDescriptionSettings(Name = "Update")]
|
||||
public async Task Update(UpdateProductWarehousingInput input)
|
||||
{
|
||||
var entity = input.Adapt<ProductWarehousing>();
|
||||
await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取产品入库
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[ApiDescriptionSettings(Name = "Detail")]
|
||||
public async Task<ProductWarehousing> Detail([FromQuery] QueryByIdProductWarehousingInput input)
|
||||
{
|
||||
return await _rep.GetFirstAsync(u => u.Id == input.Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取产品入库列表
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[ApiDescriptionSettings(Name = "List")]
|
||||
public async Task<List<ProductWarehousingOutput>> List([FromQuery] ProductWarehousingInput input)
|
||||
{
|
||||
return await _rep.AsQueryable().Select<ProductWarehousingOutput>().ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,178 +1,183 @@
|
|||
namespace Admin.NET.Application;
|
||||
|
||||
/// <summary>
|
||||
/// 汇报单详情输出参数
|
||||
/// </summary>
|
||||
public class ReportDetailTableDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 汇报单详情输出参数
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
public class ReportDetailTableDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 产品名称
|
||||
/// </summary>
|
||||
public string ProductName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 产品编码
|
||||
/// </summary>
|
||||
public string? ProductCodeNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单号
|
||||
/// </summary>
|
||||
public string? OddNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public string State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产类型
|
||||
/// </summary>
|
||||
public string? ProductType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产线
|
||||
/// </summary>
|
||||
public string? ProductionLine { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产线编码
|
||||
/// </summary>
|
||||
public string? CodeNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源单号
|
||||
/// </summary>
|
||||
public string? SourceNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格型号
|
||||
/// </summary>
|
||||
public string? Specifications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 完工数量
|
||||
/// </summary>
|
||||
public int? ProductCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库数量
|
||||
/// </summary>
|
||||
public int? PutWarehouse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本完工数量
|
||||
/// </summary>
|
||||
public int? BaseProductCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本入库数量
|
||||
/// </summary>
|
||||
public int? BasePutWarehouse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单位
|
||||
/// </summary>
|
||||
public string? Unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本单位
|
||||
/// </summary>
|
||||
public string? BaseUnit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批次
|
||||
/// </summary>
|
||||
public string? Batch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 包装规格
|
||||
/// </summary>
|
||||
public string? Package { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 包装数量
|
||||
/// </summary>
|
||||
public int? PackageCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 采集失败数量
|
||||
/// </summary>
|
||||
public int? GatherFalseCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产日期
|
||||
/// </summary>
|
||||
public DateTime? ProductDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 班组
|
||||
/// </summary>
|
||||
public string? TeamGroup { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作工人
|
||||
/// </summary>
|
||||
public string? Operator { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 完工时间
|
||||
/// </summary>
|
||||
public DateTime? EndDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源单号
|
||||
/// </summary>
|
||||
public string? SourceOddNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string? Remarks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 租户Id
|
||||
/// </summary>
|
||||
public long? TenantId { 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>
|
||||
/// 软删除
|
||||
/// </summary>
|
||||
public bool IsDelete { get; set; }
|
||||
|
||||
}
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 产品名称
|
||||
/// </summary>
|
||||
public string ProductName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 产品编码
|
||||
/// </summary>
|
||||
public string? ProductCodeNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单号
|
||||
/// </summary>
|
||||
public string? OddNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public string State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产类型
|
||||
/// </summary>
|
||||
public string? ProductType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产线
|
||||
/// </summary>
|
||||
public string? ProductionLine { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产线编码
|
||||
/// </summary>
|
||||
public string? CodeNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源单号
|
||||
/// </summary>
|
||||
public string? SourceNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格型号
|
||||
/// </summary>
|
||||
public string? Specifications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 完工数量
|
||||
/// </summary>
|
||||
public int? ProductCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库数量
|
||||
/// </summary>
|
||||
public int? PutWarehouse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本完工数量
|
||||
/// </summary>
|
||||
public int? BaseProductCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本入库数量
|
||||
/// </summary>
|
||||
public int? BasePutWarehouse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单位
|
||||
/// </summary>
|
||||
public string? Unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本单位
|
||||
/// </summary>
|
||||
public string? BaseUnit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批次
|
||||
/// </summary>
|
||||
public string? Batch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 包装规格
|
||||
/// </summary>
|
||||
public string? Package { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 包装数量
|
||||
/// </summary>
|
||||
public int? PackageCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 采集失败数量
|
||||
/// </summary>
|
||||
public int? GatherFalseCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产日期
|
||||
/// </summary>
|
||||
public DateTime? ProductDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 班组
|
||||
/// </summary>
|
||||
public string? TeamGroup { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作工人
|
||||
/// </summary>
|
||||
public string? Operator { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 完工时间
|
||||
/// </summary>
|
||||
public DateTime? EndDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源单号
|
||||
/// </summary>
|
||||
public string? SourceOddNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料ID
|
||||
/// </summary>
|
||||
public long? MaterialsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string? Remarks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 租户Id
|
||||
/// </summary>
|
||||
public long? TenantId { 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>
|
||||
/// 软删除
|
||||
/// </summary>
|
||||
public bool IsDelete { get; set; }
|
||||
|
||||
}
|
||||
|
|
|
@ -3,372 +3,383 @@ using System.ComponentModel.DataAnnotations;
|
|||
|
||||
namespace Admin.NET.Application;
|
||||
|
||||
/// <summary>
|
||||
/// 汇报单详情基础输入参数
|
||||
/// </summary>
|
||||
public class ReportDetailTableBaseInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 汇报单详情基础输入参数
|
||||
/// 产品名称
|
||||
/// </summary>
|
||||
public class ReportDetailTableBaseInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 产品名称
|
||||
/// </summary>
|
||||
public virtual string ProductName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 产品编码
|
||||
/// </summary>
|
||||
public virtual string? ProductCodeNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单号
|
||||
/// </summary>
|
||||
public virtual string? OddNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public virtual string State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产类型
|
||||
/// </summary>
|
||||
public virtual string? ProductType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产线
|
||||
/// </summary>
|
||||
public virtual string? ProductionLine { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产线编码
|
||||
/// </summary>
|
||||
public virtual string? CodeNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源单号
|
||||
/// </summary>
|
||||
public virtual string? SourceNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格型号
|
||||
/// </summary>
|
||||
public virtual string? Specifications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 完工数量
|
||||
/// </summary>
|
||||
public virtual int? ProductCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库数量
|
||||
/// </summary>
|
||||
public virtual int? PutWarehouse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本完工数量
|
||||
/// </summary>
|
||||
public virtual int? BaseProductCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本入库数量
|
||||
/// </summary>
|
||||
public virtual int? BasePutWarehouse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单位
|
||||
/// </summary>
|
||||
public virtual string? Unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本单位
|
||||
/// </summary>
|
||||
public virtual string? BaseUnit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批次
|
||||
/// </summary>
|
||||
public virtual string? Batch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 包装规格
|
||||
/// </summary>
|
||||
public virtual string? Package { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 包装数量
|
||||
/// </summary>
|
||||
public virtual int? PackageCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 采集失败数量
|
||||
/// </summary>
|
||||
public virtual int? GatherFalseCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产日期
|
||||
/// </summary>
|
||||
public virtual DateTime? ProductDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 班组
|
||||
/// </summary>
|
||||
public virtual string? TeamGroup { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作工人
|
||||
/// </summary>
|
||||
public virtual string? Operator { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 完工时间
|
||||
/// </summary>
|
||||
public virtual DateTime? EndDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源单号
|
||||
/// </summary>
|
||||
public virtual string? SourceOddNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public virtual string? Remarks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 租户Id
|
||||
/// </summary>
|
||||
public virtual long? TenantId { 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>
|
||||
/// 软删除
|
||||
/// </summary>
|
||||
public virtual bool IsDelete { get; set; }
|
||||
|
||||
}
|
||||
public virtual string ProductName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 汇报单详情分页查询输入参数
|
||||
/// 产品编码
|
||||
/// </summary>
|
||||
public class ReportDetailTableInput : BasePageInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 关键字查询
|
||||
/// </summary>
|
||||
public string? SearchKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 产品名称
|
||||
/// </summary>
|
||||
public string? ProductName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 产品编码
|
||||
/// </summary>
|
||||
public string? ProductCodeNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单号
|
||||
/// </summary>
|
||||
public string? OddNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public string? State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产类型
|
||||
/// </summary>
|
||||
public string? ProductType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产线
|
||||
/// </summary>
|
||||
public string? ProductionLine { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产线编码
|
||||
/// </summary>
|
||||
public string? CodeNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源单号
|
||||
/// </summary>
|
||||
public string? SourceNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格型号
|
||||
/// </summary>
|
||||
public string? Specifications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 完工数量
|
||||
/// </summary>
|
||||
public int? ProductCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库数量
|
||||
/// </summary>
|
||||
public int? PutWarehouse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本完工数量
|
||||
/// </summary>
|
||||
public int? BaseProductCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本入库数量
|
||||
/// </summary>
|
||||
public int? BasePutWarehouse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单位
|
||||
/// </summary>
|
||||
public string? Unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本单位
|
||||
/// </summary>
|
||||
public string? BaseUnit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批次
|
||||
/// </summary>
|
||||
public string? Batch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 包装规格
|
||||
/// </summary>
|
||||
public string? Package { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 包装数量
|
||||
/// </summary>
|
||||
public int? PackageCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 采集失败数量
|
||||
/// </summary>
|
||||
public int? GatherFalseCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产日期
|
||||
/// </summary>
|
||||
public DateTime? ProductDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产日期范围
|
||||
/// </summary>
|
||||
public List<DateTime?> ProductDateRange { get; set; }
|
||||
/// <summary>
|
||||
/// 班组
|
||||
/// </summary>
|
||||
public string? TeamGroup { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作工人
|
||||
/// </summary>
|
||||
public string? Operator { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 完工时间
|
||||
/// </summary>
|
||||
public DateTime? EndDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 完工时间范围
|
||||
/// </summary>
|
||||
public List<DateTime?> EndDateRange { get; set; }
|
||||
/// <summary>
|
||||
/// 源单号
|
||||
/// </summary>
|
||||
public string? SourceOddNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string? Remarks { get; set; }
|
||||
|
||||
}
|
||||
public virtual string? ProductCodeNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 汇报单详情增加输入参数
|
||||
/// 单号
|
||||
/// </summary>
|
||||
public class AddReportDetailTableInput : ReportDetailTableBaseInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 产品名称
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "产品名称不能为空")]
|
||||
public override string ProductName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "状态不能为空")]
|
||||
public override string State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 软删除
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "软删除不能为空")]
|
||||
public override bool IsDelete { get; set; }
|
||||
|
||||
}
|
||||
public virtual string? OddNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 汇报单详情删除输入参数
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public class DeleteReportDetailTableInput : BaseIdInput
|
||||
{
|
||||
}
|
||||
public virtual string State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 汇报单详情更新输入参数
|
||||
/// 生产类型
|
||||
/// </summary>
|
||||
public class UpdateReportDetailTableInput : ReportDetailTableBaseInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "主键Id不能为空")]
|
||||
public long Id { get; set; }
|
||||
|
||||
}
|
||||
public virtual string? ProductType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 汇报单详情主键查询输入参数
|
||||
/// 生产线
|
||||
/// </summary>
|
||||
public class QueryByIdReportDetailTableInput : DeleteReportDetailTableInput
|
||||
{
|
||||
public virtual string? ProductionLine { get; set; }
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 生产线编码
|
||||
/// </summary>
|
||||
public virtual string? CodeNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源单号
|
||||
/// </summary>
|
||||
public virtual string? SourceNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格型号
|
||||
/// </summary>
|
||||
public virtual string? Specifications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 完工数量
|
||||
/// </summary>
|
||||
public virtual int? ProductCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库数量
|
||||
/// </summary>
|
||||
public virtual int? PutWarehouse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本完工数量
|
||||
/// </summary>
|
||||
public virtual int? BaseProductCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本入库数量
|
||||
/// </summary>
|
||||
public virtual int? BasePutWarehouse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单位
|
||||
/// </summary>
|
||||
public virtual string? Unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本单位
|
||||
/// </summary>
|
||||
public virtual string? BaseUnit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批次
|
||||
/// </summary>
|
||||
public virtual string? Batch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 包装规格
|
||||
/// </summary>
|
||||
public virtual string? Package { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 包装数量
|
||||
/// </summary>
|
||||
public virtual int? PackageCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 采集失败数量
|
||||
/// </summary>
|
||||
public virtual int? GatherFalseCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产日期
|
||||
/// </summary>
|
||||
public virtual DateTime? ProductDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 班组
|
||||
/// </summary>
|
||||
public virtual string? TeamGroup { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作工人
|
||||
/// </summary>
|
||||
public virtual string? Operator { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 完工时间
|
||||
/// </summary>
|
||||
public virtual DateTime? EndDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源单号
|
||||
/// </summary>
|
||||
public virtual string? SourceOddNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料ID
|
||||
/// </summary>
|
||||
public virtual long? MaterialsId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public virtual string? Remarks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 租户Id
|
||||
/// </summary>
|
||||
public virtual long? TenantId { 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>
|
||||
/// 软删除
|
||||
/// </summary>
|
||||
public virtual bool IsDelete { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 汇报单详情分页查询输入参数
|
||||
/// </summary>
|
||||
public class ReportDetailTableInput : BasePageInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 关键字查询
|
||||
/// </summary>
|
||||
public string? SearchKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 产品名称
|
||||
/// </summary>
|
||||
public string? ProductName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 产品编码
|
||||
/// </summary>
|
||||
public string? ProductCodeNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单号
|
||||
/// </summary>
|
||||
public string? OddNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public string? State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产类型
|
||||
/// </summary>
|
||||
public string? ProductType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产线
|
||||
/// </summary>
|
||||
public string? ProductionLine { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产线编码
|
||||
/// </summary>
|
||||
public string? CodeNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源单号
|
||||
/// </summary>
|
||||
public string? SourceNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格型号
|
||||
/// </summary>
|
||||
public string? Specifications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 完工数量
|
||||
/// </summary>
|
||||
public int? ProductCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库数量
|
||||
/// </summary>
|
||||
public int? PutWarehouse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本完工数量
|
||||
/// </summary>
|
||||
public int? BaseProductCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本入库数量
|
||||
/// </summary>
|
||||
public int? BasePutWarehouse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单位
|
||||
/// </summary>
|
||||
public string? Unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本单位
|
||||
/// </summary>
|
||||
public string? BaseUnit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批次
|
||||
/// </summary>
|
||||
public string? Batch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 包装规格
|
||||
/// </summary>
|
||||
public string? Package { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 包装数量
|
||||
/// </summary>
|
||||
public int? PackageCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 采集失败数量
|
||||
/// </summary>
|
||||
public int? GatherFalseCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产日期
|
||||
/// </summary>
|
||||
public DateTime? ProductDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产日期范围
|
||||
/// </summary>
|
||||
public List<DateTime?> ProductDateRange { get; set; }
|
||||
/// <summary>
|
||||
/// 班组
|
||||
/// </summary>
|
||||
public string? TeamGroup { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作工人
|
||||
/// </summary>
|
||||
public string? Operator { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 完工时间
|
||||
/// </summary>
|
||||
public DateTime? EndDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 完工时间范围
|
||||
/// </summary>
|
||||
public List<DateTime?> EndDateRange { get; set; }
|
||||
/// <summary>
|
||||
/// 源单号
|
||||
/// </summary>
|
||||
public string? SourceOddNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料ID
|
||||
/// </summary>
|
||||
public long? MaterialsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string? Remarks { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 汇报单详情增加输入参数
|
||||
/// </summary>
|
||||
public class AddReportDetailTableInput : ReportDetailTableBaseInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 产品名称
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "产品名称不能为空")]
|
||||
public override string ProductName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "状态不能为空")]
|
||||
public override string State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 软删除
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "软删除不能为空")]
|
||||
public override bool IsDelete { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 汇报单详情删除输入参数
|
||||
/// </summary>
|
||||
public class DeleteReportDetailTableInput : BaseIdInput
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 汇报单详情更新输入参数
|
||||
/// </summary>
|
||||
public class UpdateReportDetailTableInput : ReportDetailTableBaseInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "主键Id不能为空")]
|
||||
public long Id { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 汇报单详情主键查询输入参数
|
||||
/// </summary>
|
||||
public class QueryByIdReportDetailTableInput : DeleteReportDetailTableInput
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -9,172 +9,177 @@ public class ReportDetailTableOutput
|
|||
/// 主键Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 产品名称
|
||||
/// </summary>
|
||||
public string ProductName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 产品编码
|
||||
/// </summary>
|
||||
public string? ProductCodeNum { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 单号
|
||||
/// </summary>
|
||||
public string? OddNumber { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public string State { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 生产类型
|
||||
/// </summary>
|
||||
public string? ProductType { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 生产线
|
||||
/// </summary>
|
||||
public string? ProductionLine { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 生产线编码
|
||||
/// </summary>
|
||||
public string? CodeNum { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 源单号
|
||||
/// </summary>
|
||||
public string? SourceNumber { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 规格型号
|
||||
/// </summary>
|
||||
public string? Specifications { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 完工数量
|
||||
/// </summary>
|
||||
public int? ProductCount { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 入库数量
|
||||
/// </summary>
|
||||
public int? PutWarehouse { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 基本完工数量
|
||||
/// </summary>
|
||||
public int? BaseProductCount { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 基本入库数量
|
||||
/// </summary>
|
||||
public int? BasePutWarehouse { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 单位
|
||||
/// </summary>
|
||||
public string? Unit { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 基本单位
|
||||
/// </summary>
|
||||
public string? BaseUnit { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 批次
|
||||
/// </summary>
|
||||
public string? Batch { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 包装规格
|
||||
/// </summary>
|
||||
public string? Package { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 包装数量
|
||||
/// </summary>
|
||||
public int? PackageCount { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 采集失败数量
|
||||
/// </summary>
|
||||
public int? GatherFalseCount { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 生产日期
|
||||
/// </summary>
|
||||
public DateTime? ProductDate { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 班组
|
||||
/// </summary>
|
||||
public string? TeamGroup { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 操作工人
|
||||
/// </summary>
|
||||
public string? Operator { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 完工时间
|
||||
/// </summary>
|
||||
public DateTime? EndDate { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 源单号
|
||||
/// </summary>
|
||||
public string? SourceOddNumber { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 物料ID
|
||||
/// </summary>
|
||||
public long? MaterialsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string? Remarks { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 租户Id
|
||||
/// </summary>
|
||||
public long? TenantId { 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>
|
||||
/// 软删除
|
||||
/// </summary>
|
||||
public bool IsDelete { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,93 +1,98 @@
|
|||
namespace Admin.NET.Application;
|
||||
|
||||
/// <summary>
|
||||
/// 汇报单输出参数
|
||||
/// </summary>
|
||||
public class ReportTableDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 汇报单输出参数
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
public class ReportTableDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单号
|
||||
/// </summary>
|
||||
public string? OddNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务日期
|
||||
/// </summary>
|
||||
public DateTime? StartDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public int? State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产类型
|
||||
/// </summary>
|
||||
public string? ProductType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产线
|
||||
/// </summary>
|
||||
public string? ProductionLine { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产线编码
|
||||
/// </summary>
|
||||
public string? CodeNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源单号
|
||||
/// </summary>
|
||||
public string? SourceNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string? Remarks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 租户Id
|
||||
/// </summary>
|
||||
public long? TenantId { 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>
|
||||
/// 软删除
|
||||
/// </summary>
|
||||
public bool IsDelete { get; set; }
|
||||
|
||||
}
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单号
|
||||
/// </summary>
|
||||
public string? OddNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务日期
|
||||
/// </summary>
|
||||
public DateTime? StartDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public int? State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产类型
|
||||
/// </summary>
|
||||
public string? ProductType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产线
|
||||
/// </summary>
|
||||
public string? ProductionLine { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产线编码
|
||||
/// </summary>
|
||||
public string? CodeNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源单号
|
||||
/// </summary>
|
||||
public string? SourceNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料ID
|
||||
/// </summary>
|
||||
public long? MaterialsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string? Remarks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 租户Id
|
||||
/// </summary>
|
||||
public long? TenantId { 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>
|
||||
/// 软删除
|
||||
/// </summary>
|
||||
public bool IsDelete { get; set; }
|
||||
|
||||
}
|
||||
|
|
|
@ -3,186 +3,198 @@ using System.ComponentModel.DataAnnotations;
|
|||
|
||||
namespace Admin.NET.Application;
|
||||
|
||||
/// <summary>
|
||||
/// 汇报单基础输入参数
|
||||
/// </summary>
|
||||
public class ReportTableBaseInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 汇报单基础输入参数
|
||||
/// 单号
|
||||
/// </summary>
|
||||
public class ReportTableBaseInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 单号
|
||||
/// </summary>
|
||||
public virtual string? OddNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务日期
|
||||
/// </summary>
|
||||
public virtual DateTime? StartDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public virtual int? State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产类型
|
||||
/// </summary>
|
||||
public virtual string? ProductType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产线
|
||||
/// </summary>
|
||||
public virtual string? ProductionLine { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产线编码
|
||||
/// </summary>
|
||||
public virtual string? CodeNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源单号
|
||||
/// </summary>
|
||||
public virtual string? SourceNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public virtual string? Remarks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 租户Id
|
||||
/// </summary>
|
||||
public virtual long? TenantId { 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>
|
||||
/// 软删除
|
||||
/// </summary>
|
||||
public virtual bool IsDelete { get; set; }
|
||||
|
||||
}
|
||||
public virtual string? OddNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 汇报单分页查询输入参数
|
||||
/// 业务日期
|
||||
/// </summary>
|
||||
public class ReportTableInput : BasePageInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 关键字查询
|
||||
/// </summary>
|
||||
public string? SearchKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单号
|
||||
/// </summary>
|
||||
public string? OddNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务日期
|
||||
/// </summary>
|
||||
public DateTime? StartDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务日期范围
|
||||
/// </summary>
|
||||
public List<DateTime?> StartDateRange { get; set; }
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public int? State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产类型
|
||||
/// </summary>
|
||||
public string? ProductType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产线
|
||||
/// </summary>
|
||||
public string? ProductionLine { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产线编码
|
||||
/// </summary>
|
||||
public string? CodeNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源单号
|
||||
/// </summary>
|
||||
public string? SourceNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string? Remarks { get; set; }
|
||||
|
||||
}
|
||||
public virtual DateTime? StartDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 汇报单增加输入参数
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public class AddReportTableInput : ReportTableBaseInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 软删除
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "软删除不能为空")]
|
||||
public override bool IsDelete { get; set; }
|
||||
|
||||
}
|
||||
public virtual int? State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 汇报单删除输入参数
|
||||
/// 生产类型
|
||||
/// </summary>
|
||||
public class DeleteReportTableInput : BaseIdInput
|
||||
{
|
||||
}
|
||||
public virtual string? ProductType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 汇报单更新输入参数
|
||||
/// 生产线
|
||||
/// </summary>
|
||||
public class UpdateReportTableInput : ReportTableBaseInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "主键Id不能为空")]
|
||||
public long Id { get; set; }
|
||||
|
||||
}
|
||||
public virtual string? ProductionLine { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 汇报单主键查询输入参数
|
||||
/// 生产线编码
|
||||
/// </summary>
|
||||
public class QueryByIdReportTableInput : DeleteReportTableInput
|
||||
{
|
||||
public virtual string? CodeNum { get; set; }
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 源单号
|
||||
/// </summary>
|
||||
public virtual string? SourceNumber { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 物料ID
|
||||
/// </summary>
|
||||
public long? MaterialsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public virtual string? Remarks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 租户Id
|
||||
/// </summary>
|
||||
public virtual long? TenantId { 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>
|
||||
/// 软删除
|
||||
/// </summary>
|
||||
public virtual bool IsDelete { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 汇报单分页查询输入参数
|
||||
/// </summary>
|
||||
public class ReportTableInput : BasePageInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 关键字查询
|
||||
/// </summary>
|
||||
public string? SearchKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单号
|
||||
/// </summary>
|
||||
public string? OddNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务日期
|
||||
/// </summary>
|
||||
public DateTime? StartDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务日期范围
|
||||
/// </summary>
|
||||
public List<DateTime?> StartDateRange { get; set; }
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public int? State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产类型
|
||||
/// </summary>
|
||||
public string? ProductType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产线
|
||||
/// </summary>
|
||||
public string? ProductionLine { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产线编码
|
||||
/// </summary>
|
||||
public string? CodeNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源单号
|
||||
/// </summary>
|
||||
public string? SourceNumber { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 物料ID
|
||||
/// </summary>
|
||||
public long? MaterialsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string? Remarks { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 汇报单增加输入参数
|
||||
/// </summary>
|
||||
public class AddReportTableInput : ReportTableBaseInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 软删除
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "软删除不能为空")]
|
||||
public override bool IsDelete { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 汇报单删除输入参数
|
||||
/// </summary>
|
||||
public class DeleteReportTableInput : BaseIdInput
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 汇报单更新输入参数
|
||||
/// </summary>
|
||||
public class UpdateReportTableInput : ReportTableBaseInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "主键Id不能为空")]
|
||||
public long Id { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 汇报单主键查询输入参数
|
||||
/// </summary>
|
||||
public class QueryByIdReportTableInput : DeleteReportTableInput
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -9,87 +9,93 @@ public class ReportTableOutput
|
|||
/// 主键Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 单号
|
||||
/// </summary>
|
||||
public string? OddNumber { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 业务日期
|
||||
/// </summary>
|
||||
public DateTime? StartDate { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public int? State { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 生产类型
|
||||
/// </summary>
|
||||
public string? ProductType { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 生产线
|
||||
/// </summary>
|
||||
public string? ProductionLine { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 生产线编码
|
||||
/// </summary>
|
||||
public string? CodeNum { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 源单号
|
||||
/// </summary>
|
||||
public string? SourceNumber { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 物料ID
|
||||
/// </summary>
|
||||
public long? MaterialsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string? Remarks { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 租户Id
|
||||
/// </summary>
|
||||
public long? TenantId { 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>
|
||||
/// 软删除
|
||||
/// </summary>
|
||||
public bool IsDelete { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -216,7 +216,7 @@ public class ReportTableService : IDynamicApiController, ITransient
|
|||
if (unit == null)
|
||||
throw new ArgumentNullException(nameof(unitGroup));
|
||||
|
||||
var newReport = new AddReportTableInput() { CreateTime = DateTime.Now, IsDelete = false, OddNumber = DateTime.Now.ToString("yyyyMMddhhmmss"), State = 0,UpdateUserId = input.MaterialsId };
|
||||
var newReport = new AddReportTableInput() { CreateTime = DateTime.Now, IsDelete = false, OddNumber = DateTime.Now.ToString("yyyyMMddhhmmss"), State = 0, MaterialsId = input.MaterialsId };
|
||||
var addReport = await Add(newReport);
|
||||
var others = units.FindAll(a => a.Rate < unit.Rate).OrderBy(a => a.Rate).ToList();
|
||||
others.Reverse();
|
||||
|
|
|
@ -117,8 +117,59 @@ public class SysUnitService : IDynamicApiController, ITransient
|
|||
{
|
||||
return await _rep.AsQueryable().WhereIF(unitGroupId > 0, u => u.GroupUnitId == unitGroupId && !u.IsDelete).OrderBy(a => a.Rate).Select<SysUnitOutput>().ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
public static string GetUnitScale(List<SysUnitOutput> units)
|
||||
{
|
||||
string result = string.Empty;
|
||||
if (units.Count < 1)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
if (units.Count < 2)
|
||||
{
|
||||
return $"1{units.FirstOrDefault().Name}";
|
||||
}
|
||||
units = units.OrderBy(a => a.Rate).ToList();
|
||||
units.Reverse();
|
||||
var first = units.FirstOrDefault();
|
||||
var second = units[1];
|
||||
result += $"1{first.Name}:{first.ChildUnitCount}{second.Name}";
|
||||
for (int i = 1; i < units.Count - 1; i++)
|
||||
{
|
||||
var current = units[i];
|
||||
var next = units[i + 1];
|
||||
result += $":{current.ChildUnitCount}{next.Name}";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
public static string GetUnitScale(List<SysUnitOutput> units,string currentUnit)
|
||||
{
|
||||
string result = string.Empty;
|
||||
if (units.Count < 1)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
if (units.Count < 2)
|
||||
{
|
||||
return $"1{units.FirstOrDefault().Name}";
|
||||
}
|
||||
units = units.OrderBy(a => a.Rate).ToList();
|
||||
bool isStart = false;
|
||||
for (int i = 0; i < units.Count - 1; i++)
|
||||
{
|
||||
var current = units[i];
|
||||
var next = units[i + 1];
|
||||
if (isStart)
|
||||
{
|
||||
result += $":{current.ChildUnitCount}{next.Name}";
|
||||
}
|
||||
if (current.Name == currentUnit)
|
||||
{
|
||||
result += $"1{current.Name}:{current.ChildUnitCount}{next.Name}";
|
||||
isStart = true;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,188 @@
|
|||
namespace Admin.NET.Application;
|
||||
|
||||
/// <summary>
|
||||
/// 仓库统计输出参数
|
||||
/// </summary>
|
||||
public class WarehouseDetailsDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商品条码
|
||||
/// </summary>
|
||||
public string? GoodCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料ID
|
||||
/// </summary>
|
||||
public long? MaterialsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
public string? MaterialsNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格
|
||||
/// </summary>
|
||||
public string? Specifications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分类
|
||||
/// </summary>
|
||||
public string? Classify { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库存数量
|
||||
/// </summary>
|
||||
public int? Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库存单位
|
||||
/// </summary>
|
||||
public string? Unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本数量
|
||||
/// </summary>
|
||||
public int? BaseCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本单位
|
||||
/// </summary>
|
||||
public string? BaseUnit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 包装比例
|
||||
/// </summary>
|
||||
public string? PackageScale { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批次
|
||||
/// </summary>
|
||||
public string? Batch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 公司
|
||||
/// </summary>
|
||||
public string? Custom { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 品牌
|
||||
/// </summary>
|
||||
public string? Brand { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 条码类型
|
||||
/// </summary>
|
||||
public string? CodeType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 条码数量
|
||||
/// </summary>
|
||||
public int? CodeCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库位
|
||||
/// </summary>
|
||||
public string? WarehouseLocation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产日期
|
||||
/// </summary>
|
||||
public DateTime? ProductDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 失效日期
|
||||
/// </summary>
|
||||
public DateTime? LoseDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单重
|
||||
/// </summary>
|
||||
public decimal? SingleWeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总重
|
||||
/// </summary>
|
||||
public decimal? TotalWeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单价
|
||||
/// </summary>
|
||||
public decimal? UnitPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总价
|
||||
/// </summary>
|
||||
public decimal? TotalPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string? Remarks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源ID
|
||||
/// </summary>
|
||||
public long? SourceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 仓库ID
|
||||
/// </summary>
|
||||
public string? WarehouseId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 拓展字段
|
||||
/// </summary>
|
||||
public string? ExpandField { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 租户Id
|
||||
/// </summary>
|
||||
public long? TenantId { 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>
|
||||
/// 软删除
|
||||
/// </summary>
|
||||
public bool IsDelete { get; set; }
|
||||
|
||||
}
|
|
@ -0,0 +1,382 @@
|
|||
using Admin.NET.Core;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Admin.NET.Application;
|
||||
|
||||
/// <summary>
|
||||
/// 仓库统计基础输入参数
|
||||
/// </summary>
|
||||
public class WarehouseDetailsBaseInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public virtual string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商品条码
|
||||
/// </summary>
|
||||
public virtual string? GoodCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料ID
|
||||
/// </summary>
|
||||
public long? MaterialsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
public virtual string? MaterialsNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格
|
||||
/// </summary>
|
||||
public virtual string? Specifications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分类
|
||||
/// </summary>
|
||||
public virtual string? Classify { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库存数量
|
||||
/// </summary>
|
||||
public virtual int? Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库存单位
|
||||
/// </summary>
|
||||
public virtual string? Unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本数量
|
||||
/// </summary>
|
||||
public virtual int? BaseCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本单位
|
||||
/// </summary>
|
||||
public virtual string? BaseUnit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 包装比例
|
||||
/// </summary>
|
||||
public virtual string? PackageScale { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批次
|
||||
/// </summary>
|
||||
public virtual string? Batch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 公司
|
||||
/// </summary>
|
||||
public virtual string? Custom { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 品牌
|
||||
/// </summary>
|
||||
public virtual string? Brand { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 条码类型
|
||||
/// </summary>
|
||||
public virtual string? CodeType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 条码数量
|
||||
/// </summary>
|
||||
public virtual int? CodeCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库位
|
||||
/// </summary>
|
||||
public virtual string? WarehouseLocation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产日期
|
||||
/// </summary>
|
||||
public virtual DateTime? ProductDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 失效日期
|
||||
/// </summary>
|
||||
public virtual DateTime? LoseDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单重
|
||||
/// </summary>
|
||||
public virtual decimal? SingleWeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总重
|
||||
/// </summary>
|
||||
public virtual decimal? TotalWeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单价
|
||||
/// </summary>
|
||||
public virtual decimal? UnitPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总价
|
||||
/// </summary>
|
||||
public virtual decimal? TotalPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public virtual string? Remarks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源ID
|
||||
/// </summary>
|
||||
public virtual long? SourceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 仓库ID
|
||||
/// </summary>
|
||||
public virtual string? WarehouseId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 拓展字段
|
||||
/// </summary>
|
||||
public virtual string? ExpandField { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 租户Id
|
||||
/// </summary>
|
||||
public virtual long? TenantId { 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>
|
||||
/// 软删除
|
||||
/// </summary>
|
||||
public virtual bool IsDelete { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 仓库统计分页查询输入参数
|
||||
/// </summary>
|
||||
public class WarehouseDetailsInput : BasePageInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 关键字查询
|
||||
/// </summary>
|
||||
public string? SearchKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商品条码
|
||||
/// </summary>
|
||||
public string? GoodCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料ID
|
||||
/// </summary>
|
||||
public long? MaterialsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
public string? MaterialsNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格
|
||||
/// </summary>
|
||||
public string? Specifications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分类
|
||||
/// </summary>
|
||||
public string? Classify { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库存数量
|
||||
/// </summary>
|
||||
public int? Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库存单位
|
||||
/// </summary>
|
||||
public string? Unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本数量
|
||||
/// </summary>
|
||||
public int? BaseCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本单位
|
||||
/// </summary>
|
||||
public string? BaseUnit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 包装比例
|
||||
/// </summary>
|
||||
public string? PackageScale { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批次
|
||||
/// </summary>
|
||||
public string? Batch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 公司
|
||||
/// </summary>
|
||||
public string? Custom { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 品牌
|
||||
/// </summary>
|
||||
public string? Brand { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 条码类型
|
||||
/// </summary>
|
||||
public string? CodeType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 条码数量
|
||||
/// </summary>
|
||||
public int? CodeCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库位
|
||||
/// </summary>
|
||||
public string? WarehouseLocation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产日期
|
||||
/// </summary>
|
||||
public DateTime? ProductDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产日期范围
|
||||
/// </summary>
|
||||
public List<DateTime?> ProductDateRange { get; set; }
|
||||
/// <summary>
|
||||
/// 失效日期
|
||||
/// </summary>
|
||||
public DateTime? LoseDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 失效日期范围
|
||||
/// </summary>
|
||||
public List<DateTime?> LoseDateRange { get; set; }
|
||||
/// <summary>
|
||||
/// 单重
|
||||
/// </summary>
|
||||
public decimal? SingleWeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总重
|
||||
/// </summary>
|
||||
public decimal? TotalWeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单价
|
||||
/// </summary>
|
||||
public decimal? UnitPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总价
|
||||
/// </summary>
|
||||
public decimal? TotalPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string? Remarks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源ID
|
||||
/// </summary>
|
||||
public long? SourceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 仓库ID
|
||||
/// </summary>
|
||||
public string? WarehouseId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 拓展字段
|
||||
/// </summary>
|
||||
public string? ExpandField { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 仓库统计增加输入参数
|
||||
/// </summary>
|
||||
public class AddWarehouseDetailsInput : WarehouseDetailsBaseInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 软删除
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "软删除不能为空")]
|
||||
public override bool IsDelete { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 仓库统计删除输入参数
|
||||
/// </summary>
|
||||
public class DeleteWarehouseDetailsInput : BaseIdInput
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 仓库统计更新输入参数
|
||||
/// </summary>
|
||||
public class UpdateWarehouseDetailsInput : WarehouseDetailsBaseInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "主键Id不能为空")]
|
||||
public long Id { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 仓库统计主键查询输入参数
|
||||
/// </summary>
|
||||
public class QueryByIdWarehouseDetailsInput : DeleteWarehouseDetailsInput
|
||||
{
|
||||
|
||||
}
|
|
@ -0,0 +1,190 @@
|
|||
namespace Admin.NET.Application;
|
||||
|
||||
/// <summary>
|
||||
/// 仓库统计输出参数
|
||||
/// </summary>
|
||||
public class WarehouseDetailsOutput
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商品条码
|
||||
/// </summary>
|
||||
public string? GoodCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料ID
|
||||
/// </summary>
|
||||
public long? MaterialsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
public string? MaterialsNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格
|
||||
/// </summary>
|
||||
public string? Specifications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分类
|
||||
/// </summary>
|
||||
public string? Classify { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库存数量
|
||||
/// </summary>
|
||||
public int? Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库存单位
|
||||
/// </summary>
|
||||
public string? Unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本数量
|
||||
/// </summary>
|
||||
public int? BaseCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本单位
|
||||
/// </summary>
|
||||
public string? BaseUnit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 包装比例
|
||||
/// </summary>
|
||||
public string? PackageScale { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批次
|
||||
/// </summary>
|
||||
public string? Batch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 公司
|
||||
/// </summary>
|
||||
public string? Custom { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 品牌
|
||||
/// </summary>
|
||||
public string? Brand { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 条码类型
|
||||
/// </summary>
|
||||
public string? CodeType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 条码数量
|
||||
/// </summary>
|
||||
public int? CodeCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库位
|
||||
/// </summary>
|
||||
public string? WarehouseLocation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产日期
|
||||
/// </summary>
|
||||
public DateTime? ProductDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 失效日期
|
||||
/// </summary>
|
||||
public DateTime? LoseDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单重
|
||||
/// </summary>
|
||||
public decimal? SingleWeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总重
|
||||
/// </summary>
|
||||
public decimal? TotalWeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单价
|
||||
/// </summary>
|
||||
public decimal? UnitPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总价
|
||||
/// </summary>
|
||||
public decimal? TotalPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string? Remarks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源ID
|
||||
/// </summary>
|
||||
public long? SourceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 仓库ID
|
||||
/// </summary>
|
||||
public string? WarehouseId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 拓展字段
|
||||
/// </summary>
|
||||
public string? ExpandField { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 租户Id
|
||||
/// </summary>
|
||||
public long? TenantId { 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>
|
||||
/// 软删除
|
||||
/// </summary>
|
||||
public bool IsDelete { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,161 @@
|
|||
using Admin.NET.Core.Service;
|
||||
using Admin.NET.Application.Const;
|
||||
using Admin.NET.Application.Entity;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
namespace Admin.NET.Application;
|
||||
/// <summary>
|
||||
/// 仓库统计服务
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(ApplicationConst.GroupName, Order = 100)]
|
||||
public class WarehouseDetailsService : IDynamicApiController, ITransient
|
||||
{
|
||||
private readonly SqlSugarRepository<WarehouseDetails> _rep;
|
||||
public WarehouseDetailsService(SqlSugarRepository<WarehouseDetails> rep)
|
||||
{
|
||||
_rep = rep;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询仓库统计
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ApiDescriptionSettings(Name = "Page")]
|
||||
public async Task<SqlSugarPagedList<WarehouseDetailsOutput>> Page(WarehouseDetailsInput input)
|
||||
{
|
||||
var query = _rep.AsQueryable()
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.SearchKey), u =>
|
||||
u.Name.Contains(input.SearchKey.Trim())
|
||||
|| u.GoodCode.Contains(input.SearchKey.Trim())
|
||||
|| u.MaterialsNum.Contains(input.SearchKey.Trim())
|
||||
|| u.Specifications.Contains(input.SearchKey.Trim())
|
||||
|| u.Classify.Contains(input.SearchKey.Trim())
|
||||
|| u.Unit.Contains(input.SearchKey.Trim())
|
||||
|| u.BaseUnit.Contains(input.SearchKey.Trim())
|
||||
|| u.PackageScale.Contains(input.SearchKey.Trim())
|
||||
|| u.Batch.Contains(input.SearchKey.Trim())
|
||||
|| u.Custom.Contains(input.SearchKey.Trim())
|
||||
|| u.Brand.Contains(input.SearchKey.Trim())
|
||||
|| u.CodeType.Contains(input.SearchKey.Trim())
|
||||
|| u.WarehouseLocation.Contains(input.SearchKey.Trim())
|
||||
|| u.Remarks.Contains(input.SearchKey.Trim())
|
||||
|| u.WarehouseId.Contains(input.SearchKey.Trim())
|
||||
|| u.ExpandField.Contains(input.SearchKey.Trim())
|
||||
)
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Name), u => u.Name.Contains(input.Name.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.GoodCode), u => u.GoodCode.Contains(input.GoodCode.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.MaterialsNum), u => u.MaterialsNum.Contains(input.MaterialsNum.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Specifications), u => u.Specifications.Contains(input.Specifications.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Classify), u => u.Classify.Contains(input.Classify.Trim()))
|
||||
.WhereIF(input.Count>0, u => u.Count == input.Count)
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Unit), u => u.Unit.Contains(input.Unit.Trim()))
|
||||
.WhereIF(input.BaseCount>0, u => u.BaseCount == input.BaseCount)
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.BaseUnit), u => u.BaseUnit.Contains(input.BaseUnit.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.PackageScale), u => u.PackageScale.Contains(input.PackageScale.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Batch), u => u.Batch.Contains(input.Batch.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Custom), u => u.Custom.Contains(input.Custom.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Brand), u => u.Brand.Contains(input.Brand.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.CodeType), u => u.CodeType.Contains(input.CodeType.Trim()))
|
||||
.WhereIF(input.CodeCount>0, u => u.CodeCount == input.CodeCount)
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.WarehouseLocation), u => u.WarehouseLocation.Contains(input.WarehouseLocation.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Remarks), u => u.Remarks.Contains(input.Remarks.Trim()))
|
||||
.WhereIF(input.SourceId>0, u => u.SourceId == input.SourceId)
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.WarehouseId), u => u.WarehouseId.Contains(input.WarehouseId.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.ExpandField), u => u.ExpandField.Contains(input.ExpandField.Trim()))
|
||||
.Select<WarehouseDetailsOutput>();
|
||||
if(input.ProductDateRange != null && input.ProductDateRange.Count >0)
|
||||
{
|
||||
DateTime? start= input.ProductDateRange[0];
|
||||
query = query.WhereIF(start.HasValue, u => u.ProductDate > start);
|
||||
if (input.ProductDateRange.Count >1 && input.ProductDateRange[1].HasValue)
|
||||
{
|
||||
var end = input.ProductDateRange[1].Value.AddDays(1);
|
||||
query = query.Where(u => u.ProductDate < end);
|
||||
}
|
||||
}
|
||||
if(input.LoseDateRange != null && input.LoseDateRange.Count >0)
|
||||
{
|
||||
DateTime? start= input.LoseDateRange[0];
|
||||
query = query.WhereIF(start.HasValue, u => u.LoseDate > start);
|
||||
if (input.LoseDateRange.Count >1 && input.LoseDateRange[1].HasValue)
|
||||
{
|
||||
var end = input.LoseDateRange[1].Value.AddDays(1);
|
||||
query = query.Where(u => u.LoseDate < end);
|
||||
}
|
||||
}
|
||||
return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加仓库统计
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ApiDescriptionSettings(Name = "Add")]
|
||||
public async Task<long> Add(AddWarehouseDetailsInput input)
|
||||
{
|
||||
var entity = input.Adapt<WarehouseDetails>();
|
||||
await _rep.InsertAsync(entity);
|
||||
return entity.Id;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除仓库统计
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ApiDescriptionSettings(Name = "Delete")]
|
||||
public async Task Delete(DeleteWarehouseDetailsInput input)
|
||||
{
|
||||
var entity = await _rep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002);
|
||||
await _rep.FakeDeleteAsync(entity); //假删除
|
||||
//await _rep.DeleteAsync(entity); //真删除
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新仓库统计
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ApiDescriptionSettings(Name = "Update")]
|
||||
public async Task Update(UpdateWarehouseDetailsInput input)
|
||||
{
|
||||
var entity = input.Adapt<WarehouseDetails>();
|
||||
await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
|
||||
}
|
||||
public async Task UpdateByEntity(WarehouseDetails entity)
|
||||
{
|
||||
await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取仓库统计
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[ApiDescriptionSettings(Name = "Detail")]
|
||||
public async Task<WarehouseDetails> Detail([FromQuery] QueryByIdWarehouseDetailsInput input)
|
||||
{
|
||||
return await _rep.GetFirstAsync(u => u.Id == input.Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取仓库统计列表
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[ApiDescriptionSettings(Name = "List")]
|
||||
public async Task<List<WarehouseDetailsOutput>> List()
|
||||
{
|
||||
return await _rep.AsQueryable().Select<WarehouseDetailsOutput>().ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,133 @@
|
|||
namespace Admin.NET.Application;
|
||||
|
||||
/// <summary>
|
||||
/// 入库统计输出参数
|
||||
/// </summary>
|
||||
public class WarehousingStatisticsDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
public string? CodeNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库数量
|
||||
/// </summary>
|
||||
public int? Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库单位
|
||||
/// </summary>
|
||||
public string? Unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本数量
|
||||
/// </summary>
|
||||
public int? BaseCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本单位
|
||||
/// </summary>
|
||||
public string? BaseUnit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 品牌
|
||||
/// </summary>
|
||||
public string? Brand { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格
|
||||
/// </summary>
|
||||
public string? Specifications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库类型
|
||||
/// </summary>
|
||||
public string? WarehousingType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料ID
|
||||
/// </summary>
|
||||
public long? MaterialsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 来源ID
|
||||
/// </summary>
|
||||
public long? SourceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库日期
|
||||
/// </summary>
|
||||
public DateTime? WarehousingDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库仓库ID
|
||||
/// </summary>
|
||||
public long? WarehouseId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库位
|
||||
/// </summary>
|
||||
public string? WarehouseLocation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 供应商
|
||||
/// </summary>
|
||||
public string? Supplier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string? Remarks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 租户Id
|
||||
/// </summary>
|
||||
public long? TenantId { 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>
|
||||
/// 软删除
|
||||
/// </summary>
|
||||
public bool IsDelete { get; set; }
|
||||
|
||||
}
|
|
@ -0,0 +1,268 @@
|
|||
using Admin.NET.Core;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Admin.NET.Application;
|
||||
|
||||
/// <summary>
|
||||
/// 入库统计基础输入参数
|
||||
/// </summary>
|
||||
public class WarehousingStatisticsBaseInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public virtual string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
public virtual string? CodeNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库数量
|
||||
/// </summary>
|
||||
public virtual int? Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库单位
|
||||
/// </summary>
|
||||
public virtual string? Unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本数量
|
||||
/// </summary>
|
||||
public virtual int? BaseCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本单位
|
||||
/// </summary>
|
||||
public virtual string? BaseUnit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 品牌
|
||||
/// </summary>
|
||||
public virtual string? Brand { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格
|
||||
/// </summary>
|
||||
public virtual string? Specifications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库类型
|
||||
/// </summary>
|
||||
public virtual string? WarehousingType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料ID
|
||||
/// </summary>
|
||||
public virtual long? MaterialsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 来源ID
|
||||
/// </summary>
|
||||
public virtual long? SourceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库日期
|
||||
/// </summary>
|
||||
public virtual DateTime? WarehousingDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库仓库ID
|
||||
/// </summary>
|
||||
public virtual long? WarehouseId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库位
|
||||
/// </summary>
|
||||
public virtual string? WarehouseLocation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 供应商
|
||||
/// </summary>
|
||||
public virtual string? Supplier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public virtual string? Remarks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 租户Id
|
||||
/// </summary>
|
||||
public virtual long? TenantId { 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>
|
||||
/// 软删除
|
||||
/// </summary>
|
||||
public virtual bool IsDelete { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 入库统计分页查询输入参数
|
||||
/// </summary>
|
||||
public class WarehousingStatisticsInput : BasePageInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 关键字查询
|
||||
/// </summary>
|
||||
public string? SearchKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
public string? CodeNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库数量
|
||||
/// </summary>
|
||||
public int? Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库单位
|
||||
/// </summary>
|
||||
public string? Unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本数量
|
||||
/// </summary>
|
||||
public int? BaseCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本单位
|
||||
/// </summary>
|
||||
public string? BaseUnit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 品牌
|
||||
/// </summary>
|
||||
public string? Brand { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格
|
||||
/// </summary>
|
||||
public string? Specifications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库类型
|
||||
/// </summary>
|
||||
public string? WarehousingType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料ID
|
||||
/// </summary>
|
||||
public long? MaterialsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 来源ID
|
||||
/// </summary>
|
||||
public long? SourceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库日期
|
||||
/// </summary>
|
||||
public DateTime? WarehousingDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库日期范围
|
||||
/// </summary>
|
||||
public List<DateTime?> WarehousingDateRange { get; set; }
|
||||
/// <summary>
|
||||
/// 入库仓库ID
|
||||
/// </summary>
|
||||
public long? WarehouseId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库位
|
||||
/// </summary>
|
||||
public string? WarehouseLocation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 供应商
|
||||
/// </summary>
|
||||
public string? Supplier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string? Remarks { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 入库统计增加输入参数
|
||||
/// </summary>
|
||||
public class AddWarehousingStatisticsInput : WarehousingStatisticsBaseInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 软删除
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "软删除不能为空")]
|
||||
public override bool IsDelete { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 入库统计删除输入参数
|
||||
/// </summary>
|
||||
public class DeleteWarehousingStatisticsInput : BaseIdInput
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 入库统计更新输入参数
|
||||
/// </summary>
|
||||
public class UpdateWarehousingStatisticsInput : WarehousingStatisticsBaseInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "主键Id不能为空")]
|
||||
public long Id { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 入库统计主键查询输入参数
|
||||
/// </summary>
|
||||
public class QueryByIdWarehousingStatisticsInput : DeleteWarehousingStatisticsInput
|
||||
{
|
||||
|
||||
}
|
|
@ -0,0 +1,135 @@
|
|||
namespace Admin.NET.Application;
|
||||
|
||||
/// <summary>
|
||||
/// 入库统计输出参数
|
||||
/// </summary>
|
||||
public class WarehousingStatisticsOutput
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
public string? CodeNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库数量
|
||||
/// </summary>
|
||||
public int? Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库单位
|
||||
/// </summary>
|
||||
public string? Unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本数量
|
||||
/// </summary>
|
||||
public int? BaseCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本单位
|
||||
/// </summary>
|
||||
public string? BaseUnit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 品牌
|
||||
/// </summary>
|
||||
public string? Brand { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格
|
||||
/// </summary>
|
||||
public string? Specifications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库类型
|
||||
/// </summary>
|
||||
public string? WarehousingType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料ID
|
||||
/// </summary>
|
||||
public long? MaterialsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 来源ID
|
||||
/// </summary>
|
||||
public long? SourceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库日期
|
||||
/// </summary>
|
||||
public DateTime? WarehousingDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库仓库ID
|
||||
/// </summary>
|
||||
public long? WarehouseId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库位
|
||||
/// </summary>
|
||||
public string? WarehouseLocation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 供应商
|
||||
/// </summary>
|
||||
public string? Supplier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string? Remarks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 租户Id
|
||||
/// </summary>
|
||||
public long? TenantId { 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>
|
||||
/// 软删除
|
||||
/// </summary>
|
||||
public bool IsDelete { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,192 @@
|
|||
using Admin.NET.Core.Service;
|
||||
using Admin.NET.Application.Const;
|
||||
using Admin.NET.Application.Entity;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
namespace Admin.NET.Application;
|
||||
/// <summary>
|
||||
/// 入库统计服务
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(ApplicationConst.GroupName, Order = 100)]
|
||||
public class WarehousingStatisticsService : IDynamicApiController, ITransient
|
||||
{
|
||||
private readonly SqlSugarRepository<WarehousingStatistics> _rep;
|
||||
|
||||
public WarehousingStatisticsService(SqlSugarRepository<WarehousingStatistics> rep)
|
||||
{
|
||||
_rep = rep;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询入库统计
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ApiDescriptionSettings(Name = "Page")]
|
||||
public async Task<SqlSugarPagedList<WarehousingStatisticsOutput>> Page(WarehousingStatisticsInput input)
|
||||
{
|
||||
var query = _rep.AsQueryable()
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.SearchKey), u =>
|
||||
u.Name.Contains(input.SearchKey.Trim())
|
||||
|| u.CodeNum.Contains(input.SearchKey.Trim())
|
||||
|| u.Unit.Contains(input.SearchKey.Trim())
|
||||
|| u.BaseUnit.Contains(input.SearchKey.Trim())
|
||||
|| u.Brand.Contains(input.SearchKey.Trim())
|
||||
|| u.Specifications.Contains(input.SearchKey.Trim())
|
||||
|| u.WarehousingType.Contains(input.SearchKey.Trim())
|
||||
|| u.WarehouseLocation.Contains(input.SearchKey.Trim())
|
||||
|| u.Supplier.Contains(input.SearchKey.Trim())
|
||||
|| u.Remarks.Contains(input.SearchKey.Trim())
|
||||
)
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Name), u => u.Name.Contains(input.Name.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.CodeNum), u => u.CodeNum.Contains(input.CodeNum.Trim()))
|
||||
.WhereIF(input.Count > 0, u => u.Count == input.Count)
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Unit), u => u.Unit.Contains(input.Unit.Trim()))
|
||||
.WhereIF(input.BaseCount > 0, u => u.BaseCount == input.BaseCount)
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.BaseUnit), u => u.BaseUnit.Contains(input.BaseUnit.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Brand), u => u.Brand.Contains(input.Brand.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Specifications), u => u.Specifications.Contains(input.Specifications.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.WarehousingType), u => u.WarehousingType.Contains(input.WarehousingType.Trim()))
|
||||
.WhereIF(input.MaterialsId > 0, u => u.MaterialsId == input.MaterialsId)
|
||||
.WhereIF(input.SourceId > 0, u => u.SourceId == input.SourceId)
|
||||
.WhereIF(input.WarehouseId > 0, u => u.WarehouseId == input.WarehouseId)
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.WarehouseLocation), u => u.WarehouseLocation.Contains(input.WarehouseLocation.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Supplier), u => u.Supplier.Contains(input.Supplier.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Remarks), u => u.Remarks.Contains(input.Remarks.Trim()))
|
||||
.Select<WarehousingStatisticsOutput>();
|
||||
if (input.WarehousingDateRange != null && input.WarehousingDateRange.Count > 0)
|
||||
{
|
||||
DateTime? start = input.WarehousingDateRange[0];
|
||||
query = query.WhereIF(start.HasValue, u => u.WarehousingDate > start);
|
||||
if (input.WarehousingDateRange.Count > 1 && input.WarehousingDateRange[1].HasValue)
|
||||
{
|
||||
var end = input.WarehousingDateRange[1].Value.AddDays(1);
|
||||
query = query.Where(u => u.WarehousingDate < end);
|
||||
}
|
||||
}
|
||||
return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加入库统计
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ApiDescriptionSettings(Name = "Add")]
|
||||
public async Task<long> Add(AddWarehousingStatisticsInput input)
|
||||
{
|
||||
//input.WarehousingDate = DateTime.Now;
|
||||
//var materials = await _materialsService.Detail(new QueryByIdMaterialsInput() { Id = input.MaterialsId.Value });
|
||||
//SysUnitOutput unit = null;
|
||||
//string unitScale = string.Empty;
|
||||
//if (materials != null)
|
||||
//{
|
||||
// input.Specifications = materials.Specifications;
|
||||
// input.CodeNum = materials.CodeNum;
|
||||
// input.Brand = materials.Brand;
|
||||
// var units = await _sysUnitService.ListByGroupId(materials.UnitGroupId.Value);
|
||||
// unit = units.Find(a => a.Name == input.Unit);
|
||||
// if (unit!=null)
|
||||
// {
|
||||
// input.BaseCount = input.Count * unit.Rate;
|
||||
// input.BaseUnit = units.FirstOrDefault(a => a.IsBaseUnit == true).Name;
|
||||
// unitScale = SysUnitService.GetUnitScale(units);
|
||||
// }
|
||||
|
||||
//}
|
||||
|
||||
|
||||
var entity = input.Adapt<WarehousingStatistics>();
|
||||
await _rep.InsertAsync(entity);
|
||||
//var details = await _warehouseDetails.List();
|
||||
//if (details != null && details.Any(a => a.MaterialsId == input.MaterialsId && a.Unit == input.Unit))
|
||||
//{
|
||||
// var detail = details.Find(a => a.MaterialsId == input.MaterialsId && a.Unit == input.Unit);
|
||||
// detail.Count += input.Count;
|
||||
// if (unit != null)
|
||||
// {
|
||||
// detail.BaseCount = detail.Count * unit.Rate;
|
||||
// }
|
||||
// await _warehouseDetails.UpdateByEntity(detail.Adapt<WarehouseDetails>());
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// var newEnt = input.Adapt<AddWarehouseDetailsInput>();
|
||||
// if (materials!=null)
|
||||
// {
|
||||
// newEnt.GoodCode = materials.BarCode;
|
||||
// newEnt.MaterialsNum = materials.CodeNum;
|
||||
// newEnt.UnitPrice = materials.Price;
|
||||
// newEnt.Custom = input.Supplier;
|
||||
// if (unit != null)
|
||||
// {
|
||||
// newEnt.BaseCount = newEnt.Count * unit.Rate;
|
||||
// }
|
||||
// newEnt.TotalPrice = newEnt.BaseCount * materials.Price;
|
||||
// newEnt.PackageScale = unitScale;
|
||||
// newEnt.Classify = (await _materialClassifyService.Detail(new QueryByIdMaterialClassifyInput() { Id = materials.Classify })).Name;
|
||||
// var addId = await _warehouseDetails.Add(newEnt);
|
||||
// }
|
||||
//}
|
||||
|
||||
return entity.Id;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除入库统计
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ApiDescriptionSettings(Name = "Delete")]
|
||||
public async Task Delete(DeleteWarehousingStatisticsInput input)
|
||||
{
|
||||
var entity = await _rep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002);
|
||||
await _rep.FakeDeleteAsync(entity); //假删除
|
||||
//await _rep.DeleteAsync(entity); //真删除
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新入库统计
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ApiDescriptionSettings(Name = "Update")]
|
||||
public async Task Update(UpdateWarehousingStatisticsInput input)
|
||||
{
|
||||
var entity = input.Adapt<WarehousingStatistics>();
|
||||
await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取入库统计
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[ApiDescriptionSettings(Name = "Detail")]
|
||||
public async Task<WarehousingStatistics> Detail([FromQuery] QueryByIdWarehousingStatisticsInput input)
|
||||
{
|
||||
return await _rep.GetFirstAsync(u => u.Id == input.Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取入库统计列表
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[ApiDescriptionSettings(Name = "List")]
|
||||
public async Task<List<WarehousingStatisticsOutput>> List()
|
||||
{
|
||||
return await _rep.AsQueryable().Select<WarehousingStatisticsOutput>().ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
import request from '/@/utils/request';
|
||||
enum Api {
|
||||
AddInvoice = '/api/invoice/add',
|
||||
DeleteInvoice = '/api/invoice/delete',
|
||||
UpdateInvoice = '/api/invoice/update',
|
||||
PageInvoice = '/api/invoice/page',
|
||||
DetailInvoice = '/api/invoice/detail',
|
||||
}
|
||||
|
||||
// 增加发货通知单
|
||||
export const addInvoice = (params?: any) =>
|
||||
request({
|
||||
url: Api.AddInvoice,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
|
||||
// 删除发货通知单
|
||||
export const deleteInvoice = (params?: any) =>
|
||||
request({
|
||||
url: Api.DeleteInvoice,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
|
||||
// 编辑发货通知单
|
||||
export const updateInvoice = (params?: any) =>
|
||||
request({
|
||||
url: Api.UpdateInvoice,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
|
||||
// 分页查询发货通知单
|
||||
export const pageInvoice = (params?: any) =>
|
||||
request({
|
||||
url: Api.PageInvoice,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
|
||||
// 详情发货通知单
|
||||
export const detailInvoice = (id: any) =>
|
||||
request({
|
||||
url: Api.DetailInvoice,
|
||||
method: 'get',
|
||||
data: { id },
|
||||
});
|
||||
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
import request from '/@/utils/request';
|
||||
enum Api {
|
||||
AddOutbound = '/api/outbound/add',
|
||||
DeleteOutbound = '/api/outbound/delete',
|
||||
UpdateOutbound = '/api/outbound/update',
|
||||
PageOutbound = '/api/outbound/page',
|
||||
DetailOutbound = '/api/outbound/detail',
|
||||
}
|
||||
|
||||
// 增加出库单
|
||||
export const addOutbound = (params?: any) =>
|
||||
request({
|
||||
url: Api.AddOutbound,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
|
||||
// 删除出库单
|
||||
export const deleteOutbound = (params?: any) =>
|
||||
request({
|
||||
url: Api.DeleteOutbound,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
|
||||
// 编辑出库单
|
||||
export const updateOutbound = (params?: any) =>
|
||||
request({
|
||||
url: Api.UpdateOutbound,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
|
||||
// 分页查询出库单
|
||||
export const pageOutbound = (params?: any) =>
|
||||
request({
|
||||
url: Api.PageOutbound,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
|
||||
// 详情出库单
|
||||
export const detailOutbound = (id: any) =>
|
||||
request({
|
||||
url: Api.DetailOutbound,
|
||||
method: 'get',
|
||||
data: { id },
|
||||
});
|
||||
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
import request from '/@/utils/request';
|
||||
enum Api {
|
||||
AddProductWarehousing = '/api/productWarehousing/add',
|
||||
DeleteProductWarehousing = '/api/productWarehousing/delete',
|
||||
UpdateProductWarehousing = '/api/productWarehousing/update',
|
||||
PageProductWarehousing = '/api/productWarehousing/page',
|
||||
DetailProductWarehousing = '/api/productWarehousing/detail',
|
||||
}
|
||||
|
||||
// 增加产品入库
|
||||
export const addProductWarehousing = (params?: any) =>
|
||||
request({
|
||||
url: Api.AddProductWarehousing,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
|
||||
// 删除产品入库
|
||||
export const deleteProductWarehousing = (params?: any) =>
|
||||
request({
|
||||
url: Api.DeleteProductWarehousing,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
|
||||
// 编辑产品入库
|
||||
export const updateProductWarehousing = (params?: any) =>
|
||||
request({
|
||||
url: Api.UpdateProductWarehousing,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
|
||||
// 分页查询产品入库
|
||||
export const pageProductWarehousing = (params?: any) =>
|
||||
request({
|
||||
url: Api.PageProductWarehousing,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
|
||||
// 详情产品入库
|
||||
export const detailProductWarehousing = (id: any) =>
|
||||
request({
|
||||
url: Api.DetailProductWarehousing,
|
||||
method: 'get',
|
||||
data: { id },
|
||||
});
|
||||
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
import request from '/@/utils/request';
|
||||
enum Api {
|
||||
AddWarehouseDetails = '/api/warehouseDetails/add',
|
||||
DeleteWarehouseDetails = '/api/warehouseDetails/delete',
|
||||
UpdateWarehouseDetails = '/api/warehouseDetails/update',
|
||||
PageWarehouseDetails = '/api/warehouseDetails/page',
|
||||
DetailWarehouseDetails = '/api/warehouseDetails/detail',
|
||||
}
|
||||
|
||||
// 增加仓库统计
|
||||
export const addWarehouseDetails = (params?: any) =>
|
||||
request({
|
||||
url: Api.AddWarehouseDetails,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
|
||||
// 删除仓库统计
|
||||
export const deleteWarehouseDetails = (params?: any) =>
|
||||
request({
|
||||
url: Api.DeleteWarehouseDetails,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
|
||||
// 编辑仓库统计
|
||||
export const updateWarehouseDetails = (params?: any) =>
|
||||
request({
|
||||
url: Api.UpdateWarehouseDetails,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
|
||||
// 分页查询仓库统计
|
||||
export const pageWarehouseDetails = (params?: any) =>
|
||||
request({
|
||||
url: Api.PageWarehouseDetails,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
|
||||
// 详情仓库统计
|
||||
export const detailWarehouseDetails = (id: any) =>
|
||||
request({
|
||||
url: Api.DetailWarehouseDetails,
|
||||
method: 'get',
|
||||
data: { id },
|
||||
});
|
||||
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
import request from '/@/utils/request';
|
||||
enum Api {
|
||||
AddWarehousingStatistics = '/api/warehousingStatistics/add',
|
||||
DeleteWarehousingStatistics = '/api/warehousingStatistics/delete',
|
||||
UpdateWarehousingStatistics = '/api/warehousingStatistics/update',
|
||||
PageWarehousingStatistics = '/api/warehousingStatistics/page',
|
||||
DetailWarehousingStatistics = '/api/warehousingStatistics/detail',
|
||||
}
|
||||
|
||||
// 增加入库统计
|
||||
export const addWarehousingStatistics = (params?: any) =>
|
||||
request({
|
||||
url: Api.AddWarehousingStatistics,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
|
||||
// 删除入库统计
|
||||
export const deleteWarehousingStatistics = (params?: any) =>
|
||||
request({
|
||||
url: Api.DeleteWarehousingStatistics,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
|
||||
// 编辑入库统计
|
||||
export const updateWarehousingStatistics = (params?: any) =>
|
||||
request({
|
||||
url: Api.UpdateWarehousingStatistics,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
|
||||
// 分页查询入库统计
|
||||
export const pageWarehousingStatistics = (params?: any) =>
|
||||
request({
|
||||
url: Api.PageWarehousingStatistics,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
|
||||
// 详情入库统计
|
||||
export const detailWarehousingStatistics = (id: any) =>
|
||||
request({
|
||||
url: Api.DetailWarehousingStatistics,
|
||||
method: 'get',
|
||||
data: { id },
|
||||
});
|
||||
|
||||
|
|
@ -0,0 +1,222 @@
|
|||
<template>
|
||||
<div class="invoice-container">
|
||||
<el-dialog v-model="isShowDialog" :width="800" draggable="">
|
||||
<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="codeNum">
|
||||
<el-input v-model="ruleForm.codeNum" placeholder="请输入单号" maxlength="32" 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="startDate">
|
||||
<el-date-picker v-model="ruleForm.startDate" 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="businessType">
|
||||
<el-input v-model="ruleForm.businessType" placeholder="请输入业务类型" maxlength="32" 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="32" 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="warehouse">
|
||||
<el-input v-model="ruleForm.warehouse" placeholder="请输入仓库" maxlength="32" 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="department">
|
||||
<el-input v-model="ruleForm.department" placeholder="请输入部门" maxlength="32" 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="carNumber">
|
||||
<el-input v-model="ruleForm.carNumber" placeholder="请输入车牌号" maxlength="32" 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="parkingSpace">
|
||||
<el-input v-model="ruleForm.parkingSpace" placeholder="请输入停车位" maxlength="32" 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="salesman">
|
||||
<el-input v-model="ruleForm.salesman" placeholder="请输入业务员" maxlength="32" 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="consignee">
|
||||
<el-input v-model="ruleForm.consignee" placeholder="请输入收货单位" maxlength="32" 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="deliveryDate">
|
||||
<el-date-picker v-model="ruleForm.deliveryDate" 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="deliveryAddress">
|
||||
<el-input v-model="ruleForm.deliveryAddress" placeholder="请输入交货地址" maxlength="128" 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="remarks">
|
||||
<el-input v-model="ruleForm.remarks" placeholder="请输入备注" maxlength="128" 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="customExpand">
|
||||
<el-input v-model="ruleForm.customExpand" placeholder="请输入方案客户拓展" maxlength="32" 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="sendOutExpand">
|
||||
<el-input v-model="ruleForm.sendOutExpand" placeholder="请输入发货拓展" maxlength="32" 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 scoped>
|
||||
:deep(.el-select),
|
||||
:deep(.el-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
<script lang="ts" setup>
|
||||
import { ref,onMounted } from "vue";
|
||||
import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils';
|
||||
import { ElMessage } from "element-plus";
|
||||
import type { FormRules } from "element-plus";
|
||||
import { addInvoice, updateInvoice, detailInvoice } from "/@/api/main/invoice";
|
||||
|
||||
//父级传递来的参数
|
||||
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>({
|
||||
businessType: [{required: true, message: '请输入业务类型!', trigger: 'blur',},],
|
||||
custom: [{required: true, message: '请输入客户!', trigger: 'blur',},],
|
||||
warehouse: [{required: true, message: '请输入仓库!', trigger: 'blur',},],
|
||||
});
|
||||
|
||||
// 打开弹窗
|
||||
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 detailInvoice(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 addInvoice(values);
|
||||
} else {
|
||||
await updateInvoice(values);
|
||||
}
|
||||
closeDialog();
|
||||
} else {
|
||||
ElMessage({
|
||||
message: `表单有${Object.keys(fields).length}处验证失败,请修改后再提交`,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 页面加载时
|
||||
onMounted(async () => {
|
||||
});
|
||||
|
||||
//将属性或者函数暴露给父组件
|
||||
defineExpose({ openDialog });
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,277 @@
|
|||
<template>
|
||||
<div class="invoice-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.codeNum" 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 placeholder="请选择业务日期" value-format="YYYY/MM/DD" type="daterange" v-model="queryParams.startDateRange" />
|
||||
|
||||
</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.businessType" 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.warehouse" 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.department" 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.carNumber" 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.parkingSpace" 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.salesman" 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.consignee" 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 placeholder="请选择交货日期" value-format="YYYY/MM/DD" type="daterange" v-model="queryParams.deliveryDateRange" />
|
||||
|
||||
</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.deliveryAddress" 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.remarks" 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.customExpand" 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.sendOutExpand" clearable="" placeholder="请输入发货拓展"/>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" 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="'invoice: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="openAddInvoice" v-auth="'invoice: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="codeNum" label="单号" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="startDate" label="业务日期" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="businessType" label="业务类型" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="custom" label="客户" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="warehouse" label="仓库" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="department" label="部门" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="carNumber" label="车牌号" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="parkingSpace" label="停车位" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="salesman" label="业务员" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="consignee" label="收货单位" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="deliveryDate" label="交货日期" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="deliveryAddress" label="交货地址" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="remarks" label="备注" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="customExpand" label="方案客户拓展" width="90" show-overflow-tooltip="" />
|
||||
<el-table-column prop="sendOutExpand" label="发货拓展" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column label="操作" width="140" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('invoice:update') || auth('invoice:delete')">
|
||||
<template #default="scope">
|
||||
<el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditInvoice(scope.row)" v-auth="'invoice:update'"> 编辑 </el-button>
|
||||
<el-button icon="ele-Delete" size="small" text="" type="primary" @click="delInvoice(scope.row)" v-auth="'invoice: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]"
|
||||
small=""
|
||||
background=""
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
/>
|
||||
<printDialog
|
||||
ref="printDialogRef"
|
||||
:title="printInvoiceTitle"
|
||||
@reloadTable="handleQuery" />
|
||||
<editDialog
|
||||
ref="editDialogRef"
|
||||
:title="editInvoiceTitle"
|
||||
@reloadTable="handleQuery"
|
||||
/>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup="" name="invoice">
|
||||
import { ref } from "vue";
|
||||
import { ElMessageBox, ElMessage } from "element-plus";
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils';
|
||||
import { formatDate } from '/@/utils/formatTime';
|
||||
|
||||
|
||||
import printDialog from '/@/views/labelPrinting/print/component/hiprint/preview.vue'
|
||||
import editDialog from '/@/views/inventoryManagement/invoice/component/editDialog.vue'
|
||||
import { pageInvoice, deleteInvoice } from '/@/api/main/invoice';
|
||||
|
||||
|
||||
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 printInvoiceTitle = ref("");
|
||||
const editInvoiceTitle = ref("");
|
||||
|
||||
// 改变高级查询的控件显示状态
|
||||
const changeAdvanceQueryUI = () => {
|
||||
showAdvanceQueryUI.value = !showAdvanceQueryUI.value;
|
||||
}
|
||||
|
||||
|
||||
// 查询操作
|
||||
const handleQuery = async () => {
|
||||
loading.value = true;
|
||||
var res = await pageInvoice(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 openAddInvoice = () => {
|
||||
editInvoiceTitle.value = '添加发货通知单';
|
||||
editDialogRef.value.openDialog({});
|
||||
};
|
||||
|
||||
// 打开打印页面
|
||||
const openPrintInvoice = async (row: any) => {
|
||||
printInvoiceTitle.value = '打印发货通知单';
|
||||
}
|
||||
|
||||
// 打开编辑页面
|
||||
const openEditInvoice = (row: any) => {
|
||||
editInvoiceTitle.value = '编辑发货通知单';
|
||||
editDialogRef.value.openDialog(row);
|
||||
};
|
||||
|
||||
// 删除
|
||||
const delInvoice = (row: any) => {
|
||||
ElMessageBox.confirm(`确定要删除吗?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(async () => {
|
||||
await deleteInvoice(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-ipnut),
|
||||
:deep(.el-select),
|
||||
:deep(.el-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,186 @@
|
|||
<template>
|
||||
<div class="outbound-container">
|
||||
<el-dialog v-model="isShowDialog" :width="800" draggable="">
|
||||
<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="codeNum">
|
||||
<el-input v-model="ruleForm.codeNum" placeholder="请输入单号" maxlength="32" 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="sourceCodeNum">
|
||||
<el-input v-model="ruleForm.sourceCodeNum" placeholder="请输入来源单号" maxlength="32" 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="startDate">
|
||||
<el-input v-model="ruleForm.startDate" placeholder="请输入业务日期" maxlength="32" 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="state">
|
||||
<el-input-number v-model="ruleForm.state" 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="businessType">
|
||||
<el-input v-model="ruleForm.businessType" placeholder="请输入业务类型" maxlength="32" 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="consignee">
|
||||
<el-input v-model="ruleForm.consignee" placeholder="请输入收货单位" maxlength="32" 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="审核人ID" prop="examinerId">
|
||||
<el-input v-model="ruleForm.examinerId" placeholder="请输入审核人ID" maxlength="32" 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="outboundExpandInt">
|
||||
<el-input-number v-model="ruleForm.outboundExpandInt" 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="outboundExpandString">
|
||||
<el-input v-model="ruleForm.outboundExpandString" placeholder="请输入出库单字符串拓展字段" maxlength="64" 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="warehouse">
|
||||
<el-input v-model="ruleForm.warehouse" placeholder="请输入仓库" maxlength="255" 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 scoped>
|
||||
:deep(.el-select),
|
||||
:deep(.el-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
<script lang="ts" setup>
|
||||
import { ref,onMounted } from "vue";
|
||||
import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils';
|
||||
import { ElMessage } from "element-plus";
|
||||
import type { FormRules } from "element-plus";
|
||||
import { addOutbound, updateOutbound, detailOutbound } from "/@/api/main/outbound";
|
||||
|
||||
//父级传递来的参数
|
||||
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>({
|
||||
sourceCodeNum: [{required: true, message: '请输入来源单号!', trigger: 'blur',},],
|
||||
consignee: [{required: true, message: '请输入收货单位!', trigger: 'blur',},],
|
||||
});
|
||||
|
||||
// 打开弹窗
|
||||
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 detailOutbound(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 addOutbound(values);
|
||||
} else {
|
||||
await updateOutbound(values);
|
||||
}
|
||||
closeDialog();
|
||||
} else {
|
||||
ElMessage({
|
||||
message: `表单有${Object.keys(fields).length}处验证失败,请修改后再提交`,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 页面加载时
|
||||
onMounted(async () => {
|
||||
});
|
||||
|
||||
//将属性或者函数暴露给父组件
|
||||
defineExpose({ openDialog });
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,242 @@
|
|||
<template>
|
||||
<div class="outbound-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.codeNum" 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.sourceCodeNum" 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.startDate" 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.state" 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.businessType" 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.consignee" 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="审核人ID">
|
||||
<el-input v-model="queryParams.examinerId" clearable="" placeholder="请输入审核人ID"/>
|
||||
|
||||
</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.outboundExpandInt" 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.outboundExpandString" 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.warehouse" clearable="" placeholder="请输入仓库"/>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" 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="'outbound: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="openAddOutbound" v-auth="'outbound: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="codeNum" label="单号" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="sourceCodeNum" label="来源单号" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="startDate" label="业务日期" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="state" label="状态" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="businessType" label="业务类型" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="consignee" label="收货单位" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="examinerId" label="审核人ID" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="outboundExpandInt" label="出库单整型拓展字段" width="135" show-overflow-tooltip="" />
|
||||
<el-table-column prop="outboundExpandString" label="出库单字符串拓展字段" width="150" show-overflow-tooltip="" />
|
||||
<el-table-column prop="warehouse" label="仓库" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column label="操作" width="140" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('outbound:update') || auth('outbound:delete')">
|
||||
<template #default="scope">
|
||||
<el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditOutbound(scope.row)" v-auth="'outbound:update'"> 编辑 </el-button>
|
||||
<el-button icon="ele-Delete" size="small" text="" type="primary" @click="delOutbound(scope.row)" v-auth="'outbound: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]"
|
||||
small=""
|
||||
background=""
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
/>
|
||||
<printDialog
|
||||
ref="printDialogRef"
|
||||
:title="printOutboundTitle"
|
||||
@reloadTable="handleQuery" />
|
||||
<editDialog
|
||||
ref="editDialogRef"
|
||||
:title="editOutboundTitle"
|
||||
@reloadTable="handleQuery"
|
||||
/>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup="" name="outbound">
|
||||
import { ref } from "vue";
|
||||
import { ElMessageBox, ElMessage } from "element-plus";
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils';
|
||||
import { formatDate } from '/@/utils/formatTime';
|
||||
|
||||
|
||||
import printDialog from '/@/views/labelPrinting/print/component/hiprint/preview.vue'
|
||||
import editDialog from '/@/views/inventoryManagement/outbound/component/editDialog.vue'
|
||||
import { pageOutbound, deleteOutbound } from '/@/api/main/outbound';
|
||||
|
||||
|
||||
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 printOutboundTitle = ref("");
|
||||
const editOutboundTitle = ref("");
|
||||
|
||||
// 改变高级查询的控件显示状态
|
||||
const changeAdvanceQueryUI = () => {
|
||||
showAdvanceQueryUI.value = !showAdvanceQueryUI.value;
|
||||
}
|
||||
|
||||
|
||||
// 查询操作
|
||||
const handleQuery = async () => {
|
||||
loading.value = true;
|
||||
var res = await pageOutbound(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 openAddOutbound = () => {
|
||||
editOutboundTitle.value = '添加出库单';
|
||||
editDialogRef.value.openDialog({});
|
||||
};
|
||||
|
||||
// 打开打印页面
|
||||
const openPrintOutbound = async (row: any) => {
|
||||
printOutboundTitle.value = '打印出库单';
|
||||
}
|
||||
|
||||
// 打开编辑页面
|
||||
const openEditOutbound = (row: any) => {
|
||||
editOutboundTitle.value = '编辑出库单';
|
||||
editDialogRef.value.openDialog(row);
|
||||
};
|
||||
|
||||
// 删除
|
||||
const delOutbound = (row: any) => {
|
||||
ElMessageBox.confirm(`确定要删除吗?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(async () => {
|
||||
await deleteOutbound(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-ipnut),
|
||||
:deep(.el-select),
|
||||
:deep(.el-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,316 @@
|
|||
<template>
|
||||
<div class="productWarehousing-container">
|
||||
<el-dialog v-model="isShowDialog" :width="800" draggable="">
|
||||
<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="name">
|
||||
<el-input v-model="ruleForm.name" placeholder="请输入名称" maxlength="32" 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="goodCode">
|
||||
<el-input v-model="ruleForm.goodCode" placeholder="请输入商品条码" maxlength="32" 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="物料ID" prop="materialsId">
|
||||
<el-input v-model="ruleForm.materialsId" placeholder="请输入物料ID" 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="materialsNum">
|
||||
<el-input v-model="ruleForm.materialsNum" placeholder="请输入物料编码" maxlength="32" 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="specifications">
|
||||
<el-input v-model="ruleForm.specifications" placeholder="请输入规格" maxlength="32" 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="classify">
|
||||
<el-input v-model="ruleForm.classify" placeholder="请输入分类" maxlength="32" 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="count">
|
||||
<el-input-number v-model="ruleForm.count" 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="unit">
|
||||
<el-input v-model="ruleForm.unit" placeholder="请输入库存单位" maxlength="32" 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="baseCount">
|
||||
<el-input-number v-model="ruleForm.baseCount" 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="baseUnit">
|
||||
<el-input v-model="ruleForm.baseUnit" placeholder="请输入基本单位" maxlength="32" 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="packageScale">
|
||||
<el-input v-model="ruleForm.packageScale" placeholder="请输入包装比例" maxlength="32" 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="batch">
|
||||
<el-input v-model="ruleForm.batch" placeholder="请输入批次" maxlength="32" 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="32" 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="brand">
|
||||
<el-input v-model="ruleForm.brand" placeholder="请输入品牌" maxlength="32" 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="codeType">
|
||||
<el-input v-model="ruleForm.codeType" placeholder="请输入条码类型" maxlength="32" 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="codeCount">
|
||||
<el-input-number v-model="ruleForm.codeCount" 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="warehouseLocation">
|
||||
<el-input v-model="ruleForm.warehouseLocation" placeholder="请输入库位" maxlength="32" 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="productDate">
|
||||
<el-date-picker v-model="ruleForm.productDate" 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="loseDate">
|
||||
<el-date-picker v-model="ruleForm.loseDate" 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="singleWeight">
|
||||
<el-input v-model="ruleForm.singleWeight" 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="totalWeight">
|
||||
<el-input v-model="ruleForm.totalWeight" 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="unitPrice">
|
||||
<el-input v-model="ruleForm.unitPrice" 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="totalPrice">
|
||||
<el-input v-model="ruleForm.totalPrice" 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="remarks">
|
||||
<el-input v-model="ruleForm.remarks" placeholder="请输入备注" maxlength="32" 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="源ID" prop="sourceId">
|
||||
<el-input v-model="ruleForm.sourceId" placeholder="请输入源ID" 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="仓库ID" prop="warehouseId">
|
||||
<el-input v-model="ruleForm.warehouseId" placeholder="请输入仓库ID" 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="expandField">
|
||||
<el-input v-model="ruleForm.expandField" placeholder="请输入拓展字段" maxlength="32" 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="warehousingType">
|
||||
<el-input v-model="ruleForm.warehousingType" placeholder="请输入入库类型" maxlength="32" 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="codeNum">
|
||||
<el-input v-model="ruleForm.codeNum" placeholder="请输入物料编码" maxlength="32" 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="warehousingDate">
|
||||
<el-date-picker v-model="ruleForm.warehousingDate" 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="supplier">
|
||||
<el-input v-model="ruleForm.supplier" placeholder="请输入供应商" maxlength="32" 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-number v-model="ruleForm.status" 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="oddNumber">
|
||||
<el-input v-model="ruleForm.oddNumber" placeholder="请输入单号" maxlength="32" 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="productionLine">
|
||||
<el-input v-model="ruleForm.productionLine" placeholder="请输入生产线" maxlength="32" 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 scoped>
|
||||
:deep(.el-select),
|
||||
:deep(.el-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
<script lang="ts" setup>
|
||||
import { ref,onMounted } from "vue";
|
||||
import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils';
|
||||
import { ElMessage } from "element-plus";
|
||||
import type { FormRules } from "element-plus";
|
||||
import { addProductWarehousing, updateProductWarehousing, detailProductWarehousing } from "/@/api/main/productWarehousing";
|
||||
|
||||
//父级传递来的参数
|
||||
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>({
|
||||
});
|
||||
|
||||
// 打开弹窗
|
||||
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 detailProductWarehousing(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 addProductWarehousing(values);
|
||||
} else {
|
||||
await updateProductWarehousing(values);
|
||||
}
|
||||
closeDialog();
|
||||
} else {
|
||||
ElMessage({
|
||||
message: `表单有${Object.keys(fields).length}处验证失败,请修改后再提交`,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 页面加载时
|
||||
onMounted(async () => {
|
||||
});
|
||||
|
||||
//将属性或者函数暴露给父组件
|
||||
defineExpose({ openDialog });
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,410 @@
|
|||
<template>
|
||||
<div class="productWarehousing-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.name" 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.goodCode" 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="物料ID">
|
||||
<el-input v-model="queryParams.materialsId" clearable="" placeholder="请输入物料ID"/>
|
||||
|
||||
</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.materialsNum" 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.specifications" 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.classify" 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.count" 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.unit" 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.baseCount" 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.baseUnit" 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.packageScale" 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.batch" 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.brand" 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.codeType" 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.codeCount" 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.warehouseLocation" 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 placeholder="请选择生产日期" value-format="YYYY/MM/DD" type="daterange" v-model="queryParams.productDateRange" />
|
||||
|
||||
</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 placeholder="请选择失效日期" value-format="YYYY/MM/DD" type="daterange" v-model="queryParams.loseDateRange" />
|
||||
|
||||
</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.singleWeight" 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.totalWeight" 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.unitPrice" 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.totalPrice" 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.remarks" 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="源ID">
|
||||
<el-input v-model="queryParams.sourceId" clearable="" placeholder="请输入源ID"/>
|
||||
|
||||
</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.warehouseId" clearable="" placeholder="请输入仓库ID"/>
|
||||
|
||||
</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.expandField" 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.warehousingType" 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.codeNum" 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 placeholder="请选择入库日期" value-format="YYYY/MM/DD" type="daterange" v-model="queryParams.warehousingDateRange" />
|
||||
|
||||
</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.supplier" 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.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.oddNumber" 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.productionLine" clearable="" placeholder="请输入生产线"/>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" 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="'productWarehousing: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="openAddProductWarehousing" v-auth="'productWarehousing: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="name" label="名称" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="goodCode" label="商品条码" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="materialsId" label="物料ID" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="materialsNum" label="物料编码" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="specifications" label="规格" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="classify" label="分类" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="count" label="入库数量" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="unit" label="库存单位" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="baseCount" label="基本数量" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="baseUnit" label="基本单位" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="packageScale" label="包装比例" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="batch" label="批次" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="custom" label="公司" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="brand" label="品牌" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="codeType" label="条码类型" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="codeCount" label="条码数量" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="warehouseLocation" label="库位" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="productDate" label="生产日期" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="loseDate" label="失效日期" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="singleWeight" label="单重" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="totalWeight" label="总重" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="unitPrice" label="单价" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="totalPrice" label="总价" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="remarks" label="备注" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="sourceId" label="源ID" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="warehouseId" label="仓库ID" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="expandField" label="拓展字段" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="warehousingType" label="入库类型" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="codeNum" label="物料编码" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="warehousingDate" label="入库日期" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="supplier" label="供应商" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="status" label="状态" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="oddNumber" label="单号" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="productionLine" label="生产线" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column label="操作" width="140" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('productWarehousing:update') || auth('productWarehousing:delete')">
|
||||
<template #default="scope">
|
||||
<el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditProductWarehousing(scope.row)" v-auth="'productWarehousing:update'"> 编辑 </el-button>
|
||||
<el-button icon="ele-Delete" size="small" text="" type="primary" @click="delProductWarehousing(scope.row)" v-auth="'productWarehousing: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]"
|
||||
small=""
|
||||
background=""
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
/>
|
||||
<printDialog
|
||||
ref="printDialogRef"
|
||||
:title="printProductWarehousingTitle"
|
||||
@reloadTable="handleQuery" />
|
||||
<editDialog
|
||||
ref="editDialogRef"
|
||||
:title="editProductWarehousingTitle"
|
||||
@reloadTable="handleQuery"
|
||||
/>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup="" name="productWarehousing">
|
||||
import { ref } from "vue";
|
||||
import { ElMessageBox, ElMessage } from "element-plus";
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils';
|
||||
import { formatDate } from '/@/utils/formatTime';
|
||||
|
||||
|
||||
import printDialog from '/@/views/labelPrinting/print/component/hiprint/preview.vue'
|
||||
import editDialog from '/@/views/inventoryManagement/productWarehousing/component/editDialog.vue'
|
||||
import { pageProductWarehousing, deleteProductWarehousing } from '/@/api/main/productWarehousing';
|
||||
|
||||
|
||||
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 printProductWarehousingTitle = ref("");
|
||||
const editProductWarehousingTitle = ref("");
|
||||
|
||||
// 改变高级查询的控件显示状态
|
||||
const changeAdvanceQueryUI = () => {
|
||||
showAdvanceQueryUI.value = !showAdvanceQueryUI.value;
|
||||
}
|
||||
|
||||
|
||||
// 查询操作
|
||||
const handleQuery = async () => {
|
||||
loading.value = true;
|
||||
var res = await pageProductWarehousing(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 openAddProductWarehousing = () => {
|
||||
editProductWarehousingTitle.value = '添加产品入库';
|
||||
editDialogRef.value.openDialog({});
|
||||
};
|
||||
|
||||
// 打开打印页面
|
||||
const openPrintProductWarehousing = async (row: any) => {
|
||||
printProductWarehousingTitle.value = '打印产品入库';
|
||||
}
|
||||
|
||||
// 打开编辑页面
|
||||
const openEditProductWarehousing = (row: any) => {
|
||||
editProductWarehousingTitle.value = '编辑产品入库';
|
||||
editDialogRef.value.openDialog(row);
|
||||
};
|
||||
|
||||
// 删除
|
||||
const delProductWarehousing = (row: any) => {
|
||||
ElMessageBox.confirm(`确定要删除吗?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(async () => {
|
||||
await deleteProductWarehousing(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-ipnut),
|
||||
:deep(.el-select),
|
||||
:deep(.el-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -102,10 +102,6 @@
|
|||
@current-change="handleCurrentChange"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
/>
|
||||
<printDialog
|
||||
ref="printDialogRef"
|
||||
:title="printWarehousingTitle"
|
||||
@reloadTable="handleQuery" />
|
||||
<editDialog
|
||||
ref="editDialogRef"
|
||||
:title="editWarehousingTitle"
|
||||
|
@ -123,12 +119,11 @@
|
|||
import { formatDate } from '/@/utils/formatTime';
|
||||
|
||||
|
||||
import editDialog from '/@/views/main/warehousing/component/editDialog.vue'
|
||||
import editDialog from '/@/views/inventoryManagement/warehousing/component/editDialog.vue'
|
||||
import { pageWarehousing, deleteWarehousing } from '/@/api/main/warehousing';
|
||||
|
||||
|
||||
const showAdvanceQueryUI = ref(false);
|
||||
const printDialogRef = ref();
|
||||
const editDialogRef = ref();
|
||||
const loading = ref(false);
|
||||
const tableData = ref<any>([]);
|
||||
|
@ -139,7 +134,6 @@
|
|||
total: 0,
|
||||
});
|
||||
|
||||
const printWarehousingTitle = ref("");
|
||||
const editWarehousingTitle = ref("");
|
||||
|
||||
// 改变高级查询的控件显示状态
|
|
@ -210,6 +210,8 @@
|
|||
import { ElMessage } from "element-plus";
|
||||
import type { FormRules } from "element-plus";
|
||||
import { addReportDetailTable, updateReportDetailTable, detailReportDetailTable } from "/@/api/main/reportDetailTable";
|
||||
import { pageMaterials, deleteMaterials, detailMaterials } from '/@/api/main/materials';
|
||||
|
||||
|
||||
//父级传递来的参数
|
||||
var props = defineProps({
|
||||
|
@ -241,7 +243,8 @@
|
|||
ruleForm.value = rowData;
|
||||
|
||||
if(rowData.updateUserId){
|
||||
console.log('matertails');
|
||||
materials.value= (await detailMaterials(rowData.materialsId)).data.result;
|
||||
console.log(materials.value);
|
||||
|
||||
}
|
||||
isShowDialog.value = true;
|
||||
|
|
|
@ -0,0 +1,296 @@
|
|||
<template>
|
||||
<div class="warehouseDetails-container">
|
||||
<el-dialog v-model="isShowDialog" :width="800" draggable="">
|
||||
<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="name">
|
||||
<el-input v-model="ruleForm.name" placeholder="请输入名称" maxlength="32" 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="goodCode">
|
||||
<el-input v-model="ruleForm.goodCode" placeholder="请输入商品条码" maxlength="32" 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="materialsNum">
|
||||
<el-input v-model="ruleForm.materialsNum" placeholder="请输入物料编码" maxlength="32" 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="specifications">
|
||||
<el-input v-model="ruleForm.specifications" placeholder="请输入规格" maxlength="32" 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="classify">
|
||||
<el-input v-model="ruleForm.classify" placeholder="请输入分类" maxlength="32" 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="count">
|
||||
<el-input-number v-model="ruleForm.count" 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="unit">
|
||||
<el-input v-model="ruleForm.unit" placeholder="请输入库存单位" maxlength="32" 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="baseCount">
|
||||
<el-input-number v-model="ruleForm.baseCount" 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="baseUnit">
|
||||
<el-input v-model="ruleForm.baseUnit" placeholder="请输入基本单位" maxlength="32" 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="packageScale">
|
||||
<el-input v-model="ruleForm.packageScale" placeholder="请输入包装比例" maxlength="32" 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="batch">
|
||||
<el-input v-model="ruleForm.batch" placeholder="请输入批次" maxlength="32" 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="32" 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="brand">
|
||||
<el-input v-model="ruleForm.brand" placeholder="请输入品牌" maxlength="32" 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="codeType">
|
||||
<el-input v-model="ruleForm.codeType" placeholder="请输入条码类型" maxlength="32" 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="codeCount">
|
||||
<el-input-number v-model="ruleForm.codeCount" 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="warehouseLocation">
|
||||
<el-input v-model="ruleForm.warehouseLocation" placeholder="请输入库位" maxlength="32" 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="productDate">
|
||||
<el-date-picker v-model="ruleForm.productDate" 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="loseDate">
|
||||
<el-date-picker v-model="ruleForm.loseDate" 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="singleWeight">
|
||||
<el-input v-model="ruleForm.singleWeight" placeholder="请输入单重" maxlength="32" 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="totalWeight">
|
||||
<el-input v-model="ruleForm.totalWeight" placeholder="请输入总重" maxlength="32" 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="unitPrice">
|
||||
<el-input v-model="ruleForm.unitPrice" 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="totalPrice">
|
||||
<el-input v-model="ruleForm.totalPrice" 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="remarks">
|
||||
<el-input v-model="ruleForm.remarks" placeholder="请输入备注" maxlength="32" 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="源ID" prop="sourceId">
|
||||
<el-input v-model="ruleForm.sourceId" placeholder="请输入源ID" 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="仓库ID" prop="warehouseId">
|
||||
<el-input v-model="ruleForm.warehouseId" placeholder="请输入仓库ID" maxlength="32" 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="expandField">
|
||||
<el-input v-model="ruleForm.expandField" placeholder="请输入拓展字段" maxlength="32" 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 scoped>
|
||||
:deep(.el-select),
|
||||
:deep(.el-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
<script lang="ts" setup>
|
||||
import { ref,onMounted } from "vue";
|
||||
import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils';
|
||||
import { ElMessage } from "element-plus";
|
||||
import type { FormRules } from "element-plus";
|
||||
import { addWarehouseDetails, updateWarehouseDetails, detailWarehouseDetails } from "/@/api/main/warehouseDetails";
|
||||
|
||||
//父级传递来的参数
|
||||
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>({
|
||||
});
|
||||
|
||||
// 打开弹窗
|
||||
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 detailWarehouseDetails(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 addWarehouseDetails(values);
|
||||
} else {
|
||||
await updateWarehouseDetails(values);
|
||||
}
|
||||
closeDialog();
|
||||
} else {
|
||||
ElMessage({
|
||||
message: `表单有${Object.keys(fields).length}处验证失败,请修改后再提交`,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 页面加载时
|
||||
onMounted(async () => {
|
||||
});
|
||||
|
||||
//将属性或者函数暴露给父组件
|
||||
defineExpose({ openDialog });
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,344 @@
|
|||
<template>
|
||||
<div class="warehouseDetails-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.name" 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.goodCode" 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.materialsNum" 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.specifications" 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.classify" 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.count" 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.unit" 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.baseCount" 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.baseUnit" 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.packageScale" 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.batch" 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.brand" 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.codeType" 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.codeCount" 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.warehouseLocation" 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 placeholder="请选择生产日期" value-format="YYYY/MM/DD" type="daterange" v-model="queryParams.productDateRange" />
|
||||
|
||||
</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 placeholder="请选择失效日期" value-format="YYYY/MM/DD" type="daterange" v-model="queryParams.loseDateRange" />
|
||||
|
||||
</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.singleWeight" 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.totalWeight" 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.unitPrice" 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.totalPrice" 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.remarks" 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="源ID">
|
||||
<el-input v-model="queryParams.sourceId" clearable="" placeholder="请输入源ID"/>
|
||||
|
||||
</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.warehouseId" clearable="" placeholder="请输入仓库ID"/>
|
||||
|
||||
</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.expandField" clearable="" placeholder="请输入拓展字段"/>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" 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="'warehouseDetails: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="openAddWarehouseDetails" v-auth="'warehouseDetails: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="name" label="名称" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="goodCode" label="商品条码" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="materialsNum" label="物料编码" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="specifications" label="规格" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="classify" label="分类" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="count" label="库存数量" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="unit" label="库存单位" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="baseCount" label="基本数量" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="baseUnit" label="基本单位" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="packageScale" label="包装比例" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="batch" label="批次" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="custom" label="公司" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="brand" label="品牌" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="codeType" label="条码类型" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="codeCount" label="条码数量" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="warehouseLocation" label="库位" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="productDate" label="生产日期" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="loseDate" label="失效日期" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="singleWeight" label="单重" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="totalWeight" label="总重" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="unitPrice" label="单价" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="totalPrice" label="总价" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="remarks" label="备注" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="sourceId" label="源ID" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="warehouseId" label="仓库ID" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="expandField" label="拓展字段" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column label="操作" width="140" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('warehouseDetails:update') || auth('warehouseDetails:delete')">
|
||||
<template #default="scope">
|
||||
<el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditWarehouseDetails(scope.row)" v-auth="'warehouseDetails:update'"> 编辑 </el-button>
|
||||
<el-button icon="ele-Delete" size="small" text="" type="primary" @click="delWarehouseDetails(scope.row)" v-auth="'warehouseDetails: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]"
|
||||
small=""
|
||||
background=""
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
/>
|
||||
|
||||
<editDialog
|
||||
ref="editDialogRef"
|
||||
:title="editWarehouseDetailsTitle"
|
||||
@reloadTable="handleQuery"
|
||||
/>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup="" name="warehouseDetails">
|
||||
import { ref } from "vue";
|
||||
import { ElMessageBox, ElMessage } from "element-plus";
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils';
|
||||
import { formatDate } from '/@/utils/formatTime';
|
||||
|
||||
|
||||
import editDialog from '/@/views/warehouseManagement/warehouseDetails/component/editDialog.vue'
|
||||
import { pageWarehouseDetails, deleteWarehouseDetails } from '/@/api/main/warehouseDetails';
|
||||
|
||||
|
||||
const showAdvanceQueryUI = ref(false);
|
||||
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 editWarehouseDetailsTitle = ref("");
|
||||
|
||||
// 改变高级查询的控件显示状态
|
||||
const changeAdvanceQueryUI = () => {
|
||||
showAdvanceQueryUI.value = !showAdvanceQueryUI.value;
|
||||
}
|
||||
|
||||
|
||||
// 查询操作
|
||||
const handleQuery = async () => {
|
||||
loading.value = true;
|
||||
var res = await pageWarehouseDetails(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 openAddWarehouseDetails = () => {
|
||||
editWarehouseDetailsTitle.value = '添加仓库统计';
|
||||
editDialogRef.value.openDialog({});
|
||||
};
|
||||
|
||||
|
||||
// 打开编辑页面
|
||||
const openEditWarehouseDetails = (row: any) => {
|
||||
editWarehouseDetailsTitle.value = '编辑仓库统计';
|
||||
editDialogRef.value.openDialog(row);
|
||||
};
|
||||
|
||||
// 删除
|
||||
const delWarehouseDetails = (row: any) => {
|
||||
ElMessageBox.confirm(`确定要删除吗?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(async () => {
|
||||
await deleteWarehouseDetails(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-ipnut),
|
||||
:deep(.el-select),
|
||||
:deep(.el-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,226 @@
|
|||
<template>
|
||||
<div class="warehousingStatistics-container">
|
||||
<el-dialog v-model="isShowDialog" :width="800" draggable="">
|
||||
<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="name">
|
||||
<el-input v-model="ruleForm.name" placeholder="请输入名称" maxlength="32" 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="codeNum">
|
||||
<el-input v-model="ruleForm.codeNum" placeholder="请输入物料编码" maxlength="32" 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="count">
|
||||
<el-input-number v-model="ruleForm.count" 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="unit">
|
||||
<el-input v-model="ruleForm.unit" placeholder="请输入入库单位" maxlength="32" 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="baseCount">
|
||||
<el-input-number v-model="ruleForm.baseCount" 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="baseUnit">
|
||||
<el-input v-model="ruleForm.baseUnit" placeholder="请输入基本单位" maxlength="32" 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="brand">
|
||||
<el-input v-model="ruleForm.brand" placeholder="请输入品牌" maxlength="32" 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="specifications">
|
||||
<el-input v-model="ruleForm.specifications" placeholder="请输入规格" maxlength="32" 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="warehousingType">
|
||||
<el-input v-model="ruleForm.warehousingType" placeholder="请输入入库类型" maxlength="32" 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="物料ID" prop="materialsId">
|
||||
<el-input v-model="ruleForm.materialsId" placeholder="请输入物料ID" 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="来源ID" prop="sourceId">
|
||||
<el-input v-model="ruleForm.sourceId" placeholder="请输入来源ID" 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="warehousingDate">
|
||||
<el-date-picker v-model="ruleForm.warehousingDate" 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="warehouseId">
|
||||
<el-input v-model="ruleForm.warehouseId" placeholder="请输入入库仓库ID" 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="warehouseLocation">
|
||||
<el-input v-model="ruleForm.warehouseLocation" placeholder="请输入库位" maxlength="32" 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="supplier">
|
||||
<el-input v-model="ruleForm.supplier" placeholder="请输入供应商" maxlength="32" 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="remarks">
|
||||
<el-input v-model="ruleForm.remarks" placeholder="请输入备注" maxlength="32" 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 scoped>
|
||||
:deep(.el-select),
|
||||
:deep(.el-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
<script lang="ts" setup>
|
||||
import { ref,onMounted } from "vue";
|
||||
import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils';
|
||||
import { ElMessage } from "element-plus";
|
||||
import type { FormRules } from "element-plus";
|
||||
import { addWarehousingStatistics, updateWarehousingStatistics, detailWarehousingStatistics } from "/@/api/main/warehousingStatistics";
|
||||
|
||||
//父级传递来的参数
|
||||
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>({
|
||||
});
|
||||
|
||||
// 打开弹窗
|
||||
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 detailWarehousingStatistics(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 addWarehousingStatistics(values);
|
||||
} else {
|
||||
await updateWarehousingStatistics(values);
|
||||
}
|
||||
closeDialog();
|
||||
} else {
|
||||
ElMessage({
|
||||
message: `表单有${Object.keys(fields).length}处验证失败,请修改后再提交`,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 页面加载时
|
||||
onMounted(async () => {
|
||||
});
|
||||
|
||||
//将属性或者函数暴露给父组件
|
||||
defineExpose({ openDialog });
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,284 @@
|
|||
<template>
|
||||
<div class="warehousingStatistics-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.name" 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.codeNum" 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.count" 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.unit" 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.baseCount" 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.baseUnit" 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.brand" 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.specifications" 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.warehousingType" 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="物料ID">
|
||||
<el-input v-model="queryParams.materialsId" clearable="" placeholder="请输入物料ID"/>
|
||||
|
||||
</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.sourceId" clearable="" placeholder="请输入来源ID"/>
|
||||
|
||||
</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 placeholder="请选择入库日期" value-format="YYYY/MM/DD" type="daterange" v-model="queryParams.warehousingDateRange" />
|
||||
|
||||
</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.warehouseId" clearable="" placeholder="请输入入库仓库ID"/>
|
||||
|
||||
</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.warehouseLocation" 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.supplier" 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.remarks" clearable="" placeholder="请输入备注"/>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" 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="'warehousingStatistics: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="openAddWarehousingStatistics" v-auth="'warehousingStatistics: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="name" label="名称" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="codeNum" label="物料编码" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="count" label="入库数量" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="unit" label="入库单位" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="baseCount" label="基本数量" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="baseUnit" label="基本单位" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="brand" label="品牌" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="specifications" label="规格" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="warehousingType" label="入库类型" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="materialsId" label="物料ID" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="sourceId" label="来源ID" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="warehousingDate" label="入库日期" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="warehouseId" label="入库仓库ID" width="90" show-overflow-tooltip="" />
|
||||
<el-table-column prop="warehouseLocation" label="库位" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="supplier" label="供应商" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column prop="remarks" label="备注" width="140" show-overflow-tooltip="" />
|
||||
<el-table-column label="操作" width="140" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('warehousingStatistics:update') || auth('warehousingStatistics:delete')">
|
||||
<template #default="scope">
|
||||
<el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditWarehousingStatistics(scope.row)" v-auth="'warehousingStatistics:update'"> 编辑 </el-button>
|
||||
<el-button icon="ele-Delete" size="small" text="" type="primary" @click="delWarehousingStatistics(scope.row)" v-auth="'warehousingStatistics: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]"
|
||||
small=""
|
||||
background=""
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
/>
|
||||
<printDialog
|
||||
ref="printDialogRef"
|
||||
:title="printWarehousingStatisticsTitle"
|
||||
@reloadTable="handleQuery" />
|
||||
<editDialog
|
||||
ref="editDialogRef"
|
||||
:title="editWarehousingStatisticsTitle"
|
||||
@reloadTable="handleQuery"
|
||||
/>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup="" name="warehousingStatistics">
|
||||
import { ref } from "vue";
|
||||
import { ElMessageBox, ElMessage } from "element-plus";
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils';
|
||||
import { formatDate } from '/@/utils/formatTime';
|
||||
|
||||
|
||||
import printDialog from '/@/views/labelPrinting/print/component/hiprint/preview.vue'
|
||||
import editDialog from '/@/views/warehouseManagement/warehousingStatistics/component/editDialog.vue'
|
||||
import { pageWarehousingStatistics, deleteWarehousingStatistics } from '/@/api/main/warehousingStatistics';
|
||||
|
||||
|
||||
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 printWarehousingStatisticsTitle = ref("");
|
||||
const editWarehousingStatisticsTitle = ref("");
|
||||
|
||||
// 改变高级查询的控件显示状态
|
||||
const changeAdvanceQueryUI = () => {
|
||||
showAdvanceQueryUI.value = !showAdvanceQueryUI.value;
|
||||
}
|
||||
|
||||
|
||||
// 查询操作
|
||||
const handleQuery = async () => {
|
||||
loading.value = true;
|
||||
var res = await pageWarehousingStatistics(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 openAddWarehousingStatistics = () => {
|
||||
editWarehousingStatisticsTitle.value = '添加入库统计';
|
||||
editDialogRef.value.openDialog({});
|
||||
};
|
||||
|
||||
// 打开打印页面
|
||||
const openPrintWarehousingStatistics = async (row: any) => {
|
||||
printWarehousingStatisticsTitle.value = '打印入库统计';
|
||||
}
|
||||
|
||||
// 打开编辑页面
|
||||
const openEditWarehousingStatistics = (row: any) => {
|
||||
editWarehousingStatisticsTitle.value = '编辑入库统计';
|
||||
editDialogRef.value.openDialog(row);
|
||||
};
|
||||
|
||||
// 删除
|
||||
const delWarehousingStatistics = (row: any) => {
|
||||
ElMessageBox.confirm(`确定要删除吗?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(async () => {
|
||||
await deleteWarehousingStatistics(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-ipnut),
|
||||
:deep(.el-select),
|
||||
:deep(.el-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue