已添加42个文件
已重命名4个文件
已修改11个文件
已复制2个文件
| | |
| | | <ProjectReference Include="..\CMS.Plugin.HIAWms.Domain.Shared\CMS.Plugin.HIAWms.Domain.Shared.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <Reference Include="CmsQueryExtensions"> |
| | | <HintPath>..\..\..\..\CommonDLL\CmsQueryExtensions.dll</HintPath> |
| | | </Reference> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CmsQueryExtensions.Extension; |
| | | using Volo.Abp.Application.Dtos; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsInOutStockRecord; |
| | | |
| | | /// <summary> |
| | | /// åºå
¥åºè®°å½è¡¨æ¥è¯¢åæ° |
| | | /// </summary> |
| | | public class GetWmsInOutStockRecordInput : ExtensiblePagedAndSortedResultRequestDto |
| | | { |
| | | |
| | | #region å
³é®åæ¥è¯¢ |
| | | |
| | | /// <summary> |
| | | /// å
³é®åæ¨¡ç³æ¥è¯¢ï¼æ³¨ææ¯å°åï¼ï¼ |
| | | /// </summary> |
| | | public string searchVal { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éç¨æ¥è¯¢é
ç½® (1:æ¨¡ç³æ¥è¯¢ , 2:ç²¾åæ¥è¯¢)ï¼æ³¨ææ¯å°åï¼ï¼ |
| | | /// </summary> |
| | | public SearchFilterModeEnum searchVal_FilterMode { get; set; } = SearchFilterModeEnum.æ¨¡ç³æ¥è¯¢; |
| | | |
| | | /// <summary> |
| | | /// åæç´¢ç»ä»¶ä¼ éçéç¨æ¥è¯¢é
ç½®ç屿§åï¼æ³¨ææ¯å°åï¼ï¼ |
| | | /// </summary> |
| | | [NoAutoQuery] |
| | | public string str_searchFormInputAttrs { get; set; } |
| | | /// <summary> |
| | | /// åæç´¢ç»ä»¶ä¼ éçéç¨æ¥è¯¢é
ç½®ç屿§åï¼æ³¨ææ¯å°åï¼ï¼ |
| | | /// </summary> |
| | | public List<string> searchFormInputAttrs |
| | | { |
| | | get |
| | | { |
| | | if (!string.IsNullOrEmpty(str_searchFormInputAttrs)) |
| | | { |
| | | return str_searchFormInputAttrs.Split(',').ToList(); |
| | | } |
| | | return new List<string>(); |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// åæ®ç¼å· |
| | | /// </summary> |
| | | public string OrderNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ®ç¼å·-æ¥è¯¢å
³ç³»è¿ç®ç¬¦ |
| | | /// </summary> |
| | | public SearchFilterModeEnum OrderNo_FilterMode { get; set; }= SearchFilterModeEnum.æ¨¡ç³æ¥è¯¢; |
| | | |
| | | /// <summary> |
| | | /// ç©æåç§° |
| | | /// </summary> |
| | | public string MaterialName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æåç§°-æ¥è¯¢å
³ç³»è¿ç®ç¬¦ |
| | | /// </summary> |
| | | public SearchFilterModeEnum MaterialName_FilterMode { get; set; }= SearchFilterModeEnum.æ¨¡ç³æ¥è¯¢; |
| | | |
| | | /// <summary> |
| | | /// ç©æä»¶å· |
| | | /// </summary> |
| | | public string MaterialNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æä»¶å·-æ¥è¯¢å
³ç³»è¿ç®ç¬¦ |
| | | /// </summary> |
| | | public SearchFilterModeEnum MaterialNo_FilterMode { get; set; }= SearchFilterModeEnum.æ¨¡ç³æ¥è¯¢; |
| | | |
| | | /// <summary> |
| | | /// æä½ç±»å |
| | | /// </summary> |
| | | public int? StockType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æä½ç±»å-æ¥è¯¢å
³ç³»è¿ç®ç¬¦ |
| | | /// </summary> |
| | | public SearchFilterModeEnum StockType_FilterMode { get; set; }= SearchFilterModeEnum.ç²¾åæ¥è¯¢; |
| | | |
| | | /// <summary> |
| | | /// 容å¨ç¼å· |
| | | /// </summary> |
| | | public string ContainerNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 容å¨ç¼å·-æ¥è¯¢å
³ç³»è¿ç®ç¬¦ |
| | | /// </summary> |
| | | public SearchFilterModeEnum ContainerNo_FilterMode { get; set; }= SearchFilterModeEnum.æ¨¡ç³æ¥è¯¢; |
| | | |
| | | /// <summary> |
| | | /// æºå |
| | | /// </summary> |
| | | public string MaterialModel { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æºå-æ¥è¯¢å
³ç³»è¿ç®ç¬¦ |
| | | /// </summary> |
| | | public SearchFilterModeEnum MaterialModel_FilterMode { get; set; }= SearchFilterModeEnum.æ¨¡ç³æ¥è¯¢; |
| | | |
| | | /// <summary> |
| | | /// æä½æ¶é´ |
| | | /// </summary> |
| | | //è¡¨ç¤ºæ¯ é«çº§æ¥è¯¢èå´æ¥è¯¢ç¹æ§ |
| | | [HighSearchRangeAttribute] |
| | | public List<string> OperateTime { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | public string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨-æ¥è¯¢å
³ç³»è¿ç®ç¬¦ |
| | | /// </summary> |
| | | public SearchFilterModeEnum Remark_FilterMode { get; set; }= SearchFilterModeEnum.æ¨¡ç³æ¥è¯¢; |
| | | |
| | | /// <summary> |
| | | /// ç©æID |
| | | /// </summary> |
| | | public string MaterialId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æID-æ¥è¯¢å
³ç³»è¿ç®ç¬¦ |
| | | /// </summary> |
| | | public SearchFilterModeEnum MaterialId_FilterMode { get; set; }= SearchFilterModeEnum.æ¨¡ç³æ¥è¯¢; |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡å· |
| | | /// </summary> |
| | | public string TaskNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡å·-æ¥è¯¢å
³ç³»è¿ç®ç¬¦ |
| | | /// </summary> |
| | | public SearchFilterModeEnum TaskNo_FilterMode { get; set; }= SearchFilterModeEnum.æ¨¡ç³æ¥è¯¢; |
| | | |
| | | /// <summary> |
| | | /// èµ·å§åºä½ |
| | | /// </summary> |
| | | public string SourcePlace { get; set; } |
| | | |
| | | /// <summary> |
| | | /// èµ·å§åºä½-æ¥è¯¢å
³ç³»è¿ç®ç¬¦ |
| | | /// </summary> |
| | | public SearchFilterModeEnum SourcePlace_FilterMode { get; set; }= SearchFilterModeEnum.æ¨¡ç³æ¥è¯¢; |
| | | |
| | | /// <summary> |
| | | /// ç®æ åºä½ |
| | | /// </summary> |
| | | public string ToPlace { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç®æ åºä½-æ¥è¯¢å
³ç³»è¿ç®ç¬¦ |
| | | /// </summary> |
| | | public SearchFilterModeEnum ToPlace_FilterMode { get; set; }= SearchFilterModeEnum.æ¨¡ç³æ¥è¯¢; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | //è¡¨ç¤ºæ¯ é«çº§æ¥è¯¢èå´æ¥è¯¢ç¹æ§ |
| | | [HighSearchRangeAttribute] |
| | | public List<string> CreationTime { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public string CreatorId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// -æ¥è¯¢å
³ç³»è¿ç®ç¬¦ |
| | | /// </summary> |
| | | public SearchFilterModeEnum CreatorId_FilterMode { get; set; }= SearchFilterModeEnum.æ¨¡ç³æ¥è¯¢; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | //è¡¨ç¤ºæ¯ é«çº§æ¥è¯¢èå´æ¥è¯¢ç¹æ§ |
| | | [HighSearchRangeAttribute] |
| | | public List<string> LastModificationTime { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public string LastModifierId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// -æ¥è¯¢å
³ç³»è¿ç®ç¬¦ |
| | | /// </summary> |
| | | public SearchFilterModeEnum LastModifierId_FilterMode { get; set; }= SearchFilterModeEnum.æ¨¡ç³æ¥è¯¢; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public bool? IsDeleted { get; set; } |
| | | |
| | | /// <summary> |
| | | /// -æ¥è¯¢å
³ç³»è¿ç®ç¬¦ |
| | | /// </summary> |
| | | public SearchFilterModeEnum IsDeleted_FilterMode { get; set; }= SearchFilterModeEnum.ç²¾åæ¥è¯¢; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public string DeleterId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// -æ¥è¯¢å
³ç³»è¿ç®ç¬¦ |
| | | /// </summary> |
| | | public SearchFilterModeEnum DeleterId_FilterMode { get; set; }= SearchFilterModeEnum.æ¨¡ç³æ¥è¯¢; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | //è¡¨ç¤ºæ¯ é«çº§æ¥è¯¢èå´æ¥è¯¢ç¹æ§ |
| | | [HighSearchRangeAttribute] |
| | | public List<string> DeletionTime { get; set; } |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsInOutStockRecord; |
| | | |
| | | /// <summary> |
| | | /// åºå
¥åºè®°å½è¡¨åå»ºåæ°å¯¹è±¡ |
| | | /// </summary> |
| | | public class WmsInOutStockRecordCreateDto : WmsInOutStockRecordCreateOrUpdateDtoBase |
| | | { |
| | | /// <summary> |
| | | /// æåº |
| | | /// </summary> |
| | | public virtual int? Sort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ç¦ç¨ |
| | | /// </summary> |
| | | public bool? IsDisabled { get; set; } = false; |
| | | } |
copy from HIAWms/server/src/CMS.Plugin.HIAWms.Domain/WmsInOutStockRecords/WmsInOutStockRecord.cs
copy to HIAWms/server/src/CMS.Plugin.HIAWms.Application.Contracts/Dtos/WmsInOutStockRecord/WmsInOutStockRecordCreateOrUpdateDtoBase.cs
Îļþ´Ó HIAWms/server/src/CMS.Plugin.HIAWms.Domain/WmsInOutStockRecords/WmsInOutStockRecord.cs ¸´ÖÆ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Enums; |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Enums; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Volo.Abp.Domain.Entities.Auditing; |
| | | using Volo.Abp.Application.Dtos; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.WmsInOutStockRecords |
| | | { |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsInOutStockRecord; |
| | | |
| | | /// <summary> |
| | | /// åºå
¥åºè®°å½. |
| | | /// åºå
¥åºè®°å½è¡¨åå»ºææ´æ°åºç±» |
| | | /// </summary> |
| | | public class WmsInOutStockRecord : FullAuditedAggregateRoot<Guid> |
| | | public abstract class WmsInOutStockRecordCreateOrUpdateDtoBase : ExtensibleEntityDto |
| | | { |
| | | /// <summary> |
| | | /// åæ®ç¼å· |
| | |
| | | public StockTypeEnum StockType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 容å¨ç¼å·. |
| | | /// 容å¨ç¼å· |
| | | /// </summary> |
| | | public string? ContainerNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åå· |
| | | /// æºå |
| | | /// </summary> |
| | | public string? MaterialModel { get; set; } |
| | | |
| | |
| | | /// </summary> |
| | | public string? ToPlace { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public string? CreatorId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public string? LastModifierId { get; set; } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsInOutStockRecordCreateOrUpdateDtoBase"/> class. |
| | | /// </summary> |
| | | public WmsInOutStockRecordCreateOrUpdateDtoBase() : base(false) |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Enums; |
| | | using Volo.Abp.Application.Dtos; |
| | | using Volo.Abp.Data; |
| | | using Volo.Abp.Domain.Entities; |
| | | |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsInOutStockRecord; |
| | | |
| | | /// <summary> |
| | | /// åºå
¥åºè®°å½è¡¨æ°æ®åæ°å¯¹è±¡ |
| | | /// </summary> |
| | | public class WmsInOutStockRecordDto: ExtensibleEntityDto<Guid>, IHasConcurrencyStamp |
| | | { |
| | | /// <summary> |
| | | /// åæ®ç¼å· |
| | | /// </summary> |
| | | public string OrderNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æåç§° |
| | | /// </summary> |
| | | public string? MaterialName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æä»¶å· |
| | | /// </summary> |
| | | public string MaterialNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æä½ç±»å |
| | | /// </summary> |
| | | public StockTypeEnum StockType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æä½ç±»å |
| | | /// </summary> |
| | | public string StockTypeDesc |
| | | { |
| | | get |
| | | { |
| | | return GetEnumDescriptionUtil.GetEnumDescription(StockType); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 容å¨ç¼å· |
| | | /// </summary> |
| | | public string? ContainerNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æºå |
| | | /// </summary> |
| | | public string? MaterialModel { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æä½æ¶é´ |
| | | /// </summary> |
| | | public DateTime? OperateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | public string? Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æID |
| | | /// </summary> |
| | | public string MaterialId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡å· |
| | | /// </summary> |
| | | public string TaskNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// èµ·å§åºä½ |
| | | /// </summary> |
| | | public string? SourcePlace { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç®æ åºä½ |
| | | /// </summary> |
| | | public string? ToPlace { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public ExtraPropertyDictionary? ExtraProperties { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public string? ConcurrencyStamp { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public DateTime CreationTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public string? CreatorId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public DateTime? LastModificationTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public string? LastModifierId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public bool IsDeleted { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public string? DeleterId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public DateTime? DeletionTime { get; set; } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// Gets the export data. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public Dictionary<string, object> GetExportData() |
| | | { |
| | | var exportData = new Dictionary<string, object>(); |
| | | foreach (var property in this.GetType().GetProperties()) |
| | | { |
| | | exportData.Add(property.Name, property.GetValue(this)); |
| | | } |
| | | |
| | | return exportData; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using MiniExcelLibs.Attributes; |
| | | using System.ComponentModel.DataAnnotations; |
| | | using System.ComponentModel; |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Enums; |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsInOutStockRecord; |
| | | |
| | | /// <summary> |
| | | /// åºå
¥åºè®°å½è¡¨å¯¼åºæ¨¡å |
| | | /// </summary> |
| | | public class WmsInOutStockRecordExportModel |
| | | { |
| | | /// <summary> |
| | | /// åæ®ç¼å· |
| | | /// </summary> |
| | | [ExcelColumn(Name = "åæ®ç¼å·", Width = 25)] |
| | | public string OrderNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æåç§° |
| | | /// </summary> |
| | | [ExcelColumn(Name = "ç©æåç§°", Width = 25)] |
| | | public string MaterialName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æä»¶å· |
| | | /// </summary> |
| | | [ExcelColumn(Name = "ç©æä»¶å·", Width = 25)] |
| | | public string MaterialNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æä½ç±»å |
| | | /// </summary> |
| | | [ExcelColumn(Name = "æä½ç±»å", Width = 25)] |
| | | public StockTypeEnum StockType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 容å¨ç¼å· |
| | | /// </summary> |
| | | [ExcelColumn(Name = "容å¨ç¼å·", Width = 25)] |
| | | public string ContainerNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æºå |
| | | /// </summary> |
| | | [ExcelColumn(Name = "æºå", Width = 25)] |
| | | public string MaterialModel { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æä½æ¶é´ |
| | | /// </summary> |
| | | [ExcelColumn(Name = "æä½æ¶é´", Width = 25)] |
| | | public DateTime OperateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | [ExcelColumn(Name = "夿³¨", Width = 25)] |
| | | public string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æID |
| | | /// </summary> |
| | | [ExcelColumn(Name = "ç©æID", Width = 25)] |
| | | public string MaterialId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡å· |
| | | /// </summary> |
| | | [ExcelColumn(Name = "ä»»å¡å·", Width = 25)] |
| | | public string TaskNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// èµ·å§åºä½ |
| | | /// </summary> |
| | | [ExcelColumn(Name = "èµ·å§åºä½", Width = 25)] |
| | | public string SourcePlace { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç®æ åºä½ |
| | | /// </summary> |
| | | [ExcelColumn(Name = "ç®æ åºä½", Width = 25)] |
| | | public string ToPlace { get; set; } |
| | | |
| | | |
| | | |
| | | public Dictionary<string, object> GetExportData() |
| | | { |
| | | var exportData = new Dictionary<string, object>(); |
| | | foreach (var property in this.GetType().GetProperties()) |
| | | { |
| | | exportData.Add(property.Name, property.GetValue(this)); |
| | | } |
| | | |
| | | return exportData; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.Domain.Entities; |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsInOutStockRecord; |
| | | |
| | | /// <summary> |
| | | /// åºå
¥åºè®°å½è¡¨æ´æ°åæ°å¯¹è±¡ |
| | | /// </summary> |
| | | public class WmsInOutStockRecordUpdateDto : WmsInOutStockRecordCreateOrUpdateDtoBase, IHasConcurrencyStamp |
| | | { |
| | | /// <summary> |
| | | /// å¹¶åæ³ |
| | | /// </summary> |
| | | public string ConcurrencyStamp { get; set; } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsInOutStockRecord |
| | | { |
| | | /// <summary> |
| | | /// åºå
¥åºè®°å½è¡¨å¯¼å
¥æ¨¡å |
| | | /// </summary> |
| | | public class WmsInOutStockRecordsImportModel |
| | | { |
| | | private List<WmsInOutStockRecordImportModel> _WmsInOutStockRecords = new(); |
| | | |
| | | public List<WmsInOutStockRecordImportModel> WmsInOutStockRecords |
| | | { |
| | | get => _WmsInOutStockRecords; |
| | | set |
| | | { |
| | | _WmsInOutStockRecords = value; |
| | | var rowIndex = 2; |
| | | _WmsInOutStockRecords?.ForEach(x => x.RowIndex = rowIndex++); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åºå
¥åºè®°å½è¡¨å¯¼å
¥æ¨¡å |
| | | /// </summary> |
| | | public class WmsInOutStockRecordImportModel : WmsInOutStockRecordExportModel |
| | | { |
| | | /// <summary> |
| | | /// è¡å· |
| | | /// </summary> |
| | | public int RowIndex { get; set; } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsInOutStockRecord; |
| | | using Volo.Abp.Application.Services; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Services; |
| | | |
| | | /// <summary> |
| | | /// åºå
¥åºè®°å½è¡¨åºç¨æå¡æ¥å£ |
| | | /// </summary> |
| | | public interface IWmsInOutStockRecordAppService : ICrudAppService<WmsInOutStockRecordDto, Guid, GetWmsInOutStockRecordInput, WmsInOutStockRecordCreateDto, WmsInOutStockRecordUpdateDto> |
| | | { |
| | | /// <summary> |
| | | /// å
éåºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="ids"></param> |
| | | /// <returns></returns> |
| | | Task<List<WmsInOutStockRecordDto>> CloneAsync(IEnumerable<Guid> ids); |
| | | |
| | | /// <summary> |
| | | /// å é¤åºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="ids"></param> |
| | | /// <returns></returns> |
| | | Task DeleteManyAsync(IEnumerable<Guid> ids); |
| | | |
| | | /// <summary> |
| | | /// è°æ´æåºåºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | /// <param name="sort"></param> |
| | | /// <returns></returns> |
| | | Task AdjustSortAsync(Guid id, int sort); |
| | | |
| | | /// <summary> |
| | | /// 导å
¥åºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | Task ImportAsync(WmsInOutStockRecordsImportModel input); |
| | | |
| | | /// <summary> |
| | | /// 导åºåºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | Task<(Dictionary<string, object> Sheets, string FileName)> ExportAsync(GetWmsInOutStockRecordInput input); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsInOutStockRecord; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Services; |
| | | using CMS.Plugin.HIAWms.Domain.Shared; |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Util; |
| | | using CMS.Plugin.HIAWms.Domain.WmsInOutStockRecord; |
| | | using CmsQueryExtensions.Extension; |
| | | using System.Linq.Expressions; |
| | | using Volo.Abp; |
| | | using Volo.Abp.Application.Dtos; |
| | | using Volo.Abp.Data; |
| | | using Volo.Abp.ObjectExtending; |
| | | using Volo.Abp.ObjectMapping; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Implements; |
| | | |
| | | /// <summary> |
| | | /// åºå
¥åºè®°å½è¡¨åºç¨æå¡ |
| | | /// </summary> |
| | | public class WmsInOutStockRecordAppService : CMSPluginAppService, IWmsInOutStockRecordAppService |
| | | { |
| | | private readonly IWmsInOutStockRecordRepository _wmsInOutStockRecordRepository; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsInOutStockRecordAppService"/> class. |
| | | /// </summary> |
| | | /// <param name="WmsInOutStockRecordRepository">The task job repository.</param> |
| | | public WmsInOutStockRecordAppService(IWmsInOutStockRecordRepository wmsInOutStockRecordRepository) |
| | | { |
| | | _wmsInOutStockRecordRepository = wmsInOutStockRecordRepository; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åæå®åºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | /// <returns></returns> |
| | | public virtual async Task<WmsInOutStockRecordDto> GetAsync(Guid id) |
| | | { |
| | | return ObjectMapper.Map<WmsInOutStockRecord, WmsInOutStockRecordDto>(await _wmsInOutStockRecordRepository.GetAsync(id)); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å页è·ååºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | public virtual async Task<PagedResultDto<WmsInOutStockRecordDto>> GetListAsync(GetWmsInOutStockRecordInput input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | |
| | | if (input.Sorting.IsNullOrWhiteSpace()) |
| | | { |
| | | input.Sorting = nameof(WmsInOutStockRecord.Sort); |
| | | } |
| | | |
| | | #region 卿æé æ¥è¯¢æ¡ä»¶ |
| | | |
| | | //卿æé æ¥è¯¢æ¡ä»¶ |
| | | var whereConditions = DynamicGetQueryParams(input); |
| | | |
| | | #endregion |
| | | |
| | | var count = await _wmsInOutStockRecordRepository.GetCountAsync(whereConditions); |
| | | var list = await _wmsInOutStockRecordRepository.GetListAsync(whereConditions, input.Sorting, input.MaxResultCount, input.SkipCount); |
| | | |
| | | return new PagedResultDto<WmsInOutStockRecordDto>(count, ObjectMapper.Map<List<WmsInOutStockRecord>, List<WmsInOutStockRecordDto>>(list)); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 卿æé æ¥è¯¢æ¡ä»¶ |
| | | /// </summary> |
| | | /// <param name="input">è¾å
¥åæ°</param> |
| | | /// <returns></returns> |
| | | private FunReturnResultModel<Expression<Func<WmsInOutStockRecord, bool>>> DynamicGetQueryParams(GetWmsInOutStockRecordInput input) |
| | | { |
| | | //卿æé æ¥è¯¢æ¡ä»¶ |
| | | var whereConditions = WhereConditionsExtensions.GetWhereConditions<WmsInOutStockRecord, GetWmsInOutStockRecordInput>(input); |
| | | if (!whereConditions.IsSuccess) |
| | | { |
| | | throw new Exception("卿æé æ¥è¯¢æ¡ä»¶å¤±è´¥:" + whereConditions.ErrMsg); |
| | | } |
| | | |
| | | //ä¹å¯å次èªå®ä¹æå»ºæ¥è¯¢æ¡ä»¶ |
| | | Expression<Func<WmsInOutStockRecord, bool>> extendExpression = a => a.IsDeleted == false; |
| | | // ä½¿ç¨ System.Linq.PredicateBuilder ç And |
| | | var pres = (System.Linq.Expressions.Expression<Func<WmsInOutStockRecord, bool>>)(whereConditions.data); |
| | | whereConditions.data = System.Linq.PredicateBuilder.And(pres, extendExpression); |
| | | |
| | | return whereConditions; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ°å»ºåºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | /// <exception cref="UserFriendlyException"></exception> |
| | | public virtual async Task<WmsInOutStockRecordDto> CreateAsync(WmsInOutStockRecordCreateDto input) |
| | | { |
| | | await CheckCreateOrUpdateDtoAsync(input); |
| | | |
| | | |
| | | |
| | | var maxSort = await _wmsInOutStockRecordRepository.GetMaxSortAsync(); |
| | | var sort = input.Sort ?? maxSort; |
| | | |
| | | var insertObj = ObjectMapper.Map<WmsInOutStockRecordCreateDto, WmsInOutStockRecord>(input); |
| | | insertObj.Sort = sort; |
| | | input.MapExtraPropertiesTo(insertObj, MappingPropertyDefinitionChecks.None); |
| | | |
| | | await _wmsInOutStockRecordRepository.InsertAsync(insertObj); |
| | | |
| | | if (input.Sort.HasValue && insertObj.Sort != maxSort) |
| | | { |
| | | await AdjustSortAsync(insertObj.Id, insertObj.Sort); |
| | | } |
| | | |
| | | return ObjectMapper.Map<WmsInOutStockRecord, WmsInOutStockRecordDto>(insertObj); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ´æ°åºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | /// <exception cref="UserFriendlyException"></exception> |
| | | public virtual async Task<WmsInOutStockRecordDto> UpdateAsync(Guid id, WmsInOutStockRecordUpdateDto input) |
| | | { |
| | | await CheckCreateOrUpdateDtoAsync(input); |
| | | |
| | | var updateObj = await _wmsInOutStockRecordRepository.GetAsync(id); |
| | | |
| | | |
| | | updateObj.SetConcurrencyStampIfNotNull(input.ConcurrencyStamp); |
| | | input.MapExtraPropertiesTo(updateObj, MappingPropertyDefinitionChecks.None); |
| | | |
| | | updateObj.OrderNo = input.OrderNo; |
| | | updateObj.MaterialName = input.MaterialName; |
| | | updateObj.MaterialNo = input.MaterialNo; |
| | | updateObj.StockType = input.StockType; |
| | | updateObj.ContainerNo = input.ContainerNo; |
| | | updateObj.MaterialModel = input.MaterialModel; |
| | | updateObj.OperateTime = input.OperateTime; |
| | | updateObj.Remark = input.Remark; |
| | | updateObj.MaterialId = input.MaterialId; |
| | | updateObj.TaskNo = input.TaskNo; |
| | | updateObj.SourcePlace = input.SourcePlace; |
| | | updateObj.ToPlace = input.ToPlace; |
| | | |
| | | |
| | | await _wmsInOutStockRecordRepository.UpdateAsync(updateObj); |
| | | |
| | | return ObjectMapper.Map<WmsInOutStockRecord, WmsInOutStockRecordDto>(updateObj); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å
éåºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="ids"></param> |
| | | /// <returns></returns> |
| | | public async Task<List<WmsInOutStockRecordDto>> CloneAsync(IEnumerable<Guid> ids) |
| | | { |
| | | //var wmsInOutStockRecords = new List<WmsInOutStockRecord>(); |
| | | //if (ids != null) |
| | | //{ |
| | | // var sort = await wmsInOutStockRecordRepository.GetMaxSortAsync(); |
| | | // foreach (var id in ids) |
| | | // { |
| | | // var WmsInOutStockRecord = await wmsInOutStockRecordRepository.FindAsync(id); |
| | | // if (WmsInOutStockRecord != null) |
| | | // { |
| | | // var name = WmsInOutStockRecord.Name + WmsInOutStockRecordConsts.CloneTag; |
| | | // var notExist = false; |
| | | // while (!notExist) |
| | | // { |
| | | // var exist = await wmsInOutStockRecordRepository.NameExistAsync(name); |
| | | // if (exist || wmsInOutStockRecords.Any(x => x.Name == name)) |
| | | // { |
| | | // name += WmsInOutStockRecordConsts.CloneTag; |
| | | // continue; |
| | | // } |
| | | |
| | | // notExist = true; |
| | | // } |
| | | |
| | | // //WmsInOutStockRecord = await wmsInOutStockRecordRepository.InsertAsync(WmsInOutStockRecord.Clone(GuidGenerator.Create(), name, sort++)); |
| | | // wmsInOutStockRecords.Add(WmsInOutStockRecord); |
| | | // } |
| | | // } |
| | | //} |
| | | |
| | | //return ObjectMapper.Map<List<WmsInOutStockRecord>, List<WmsInOutStockRecordDto>>(wmsInOutStockRecords); |
| | | return new List<WmsInOutStockRecordDto>(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å é¤å个åºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | /// <returns></returns> |
| | | public virtual Task DeleteAsync(Guid id) |
| | | { |
| | | return _wmsInOutStockRecordRepository.DeleteAsync(id); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å é¤å¤ä¸ªåºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="ids"></param> |
| | | /// <returns></returns> |
| | | public async Task DeleteManyAsync(IEnumerable<Guid> ids) |
| | | { |
| | | foreach (var id in ids) |
| | | { |
| | | await DeleteAsync(id); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è°æ´æåºåºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | /// <param name="sort"></param> |
| | | /// <returns></returns> |
| | | public virtual async Task AdjustSortAsync(Guid id, int sort) |
| | | { |
| | | var list = await _wmsInOutStockRecordRepository.GetListAsync(null, nameof(WmsInOutStockRecord.Sort)); |
| | | if (list != null && list.Any()) |
| | | { |
| | | var initSort = 1; |
| | | list.ForEach(x => x.AdjustSort(initSort++)); |
| | | var entity = list.FirstOrDefault(x => x.Id == id); |
| | | if (entity != null) |
| | | { |
| | | if (sort == 1) |
| | | { |
| | | list.Where(x => x.Id != id).ToList()?.ForEach(x => x.AdjustSort(x.Sort + 1)); |
| | | } |
| | | else if (entity.Sort > sort) |
| | | { |
| | | list.Where(x => x.Id != id && x.Sort >= sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort + 1)); |
| | | list.Where(x => x.Id != id && x.Sort < sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort - 1)); |
| | | } |
| | | else if (entity.Sort < sort) |
| | | { |
| | | list.Where(x => x.Id != id && x.Sort > sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort + 1)); |
| | | list.Where(x => x.Id != id && x.Sort <= sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort - 1)); |
| | | } |
| | | |
| | | entity.AdjustSort(sort); |
| | | } |
| | | } |
| | | |
| | | await _wmsInOutStockRecordRepository.UpdateManyAsync(list); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 导å
¥åºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | /// <exception cref="UserFriendlyException"></exception> |
| | | public async Task ImportAsync(WmsInOutStockRecordsImportModel input) |
| | | { |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 导åºåºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | public async Task<(Dictionary<string, object> Sheets, string FileName)> ExportAsync(GetWmsInOutStockRecordInput input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | |
| | | if (input.Sorting.IsNullOrWhiteSpace()) |
| | | { |
| | | input.Sorting = nameof(WmsInOutStockRecord.Sort); |
| | | } |
| | | |
| | | #region 卿æé æ¥è¯¢æ¡ä»¶ |
| | | |
| | | //卿æé æ¥è¯¢æ¡ä»¶ |
| | | var whereConditions = DynamicGetQueryParams(input); |
| | | |
| | | #endregion |
| | | |
| | | |
| | | var list = await _wmsInOutStockRecordRepository.GetListAsync(whereConditions, input.Sorting, input.MaxResultCount, input.SkipCount, includeDetails: true); |
| | | var result = ObjectMapper.Map<List<WmsInOutStockRecord>, List<WmsInOutStockRecordDto>>(list); |
| | | |
| | | var sheets = new Dictionary<string, object> |
| | | { |
| | | ["é
ç½®"] = ExportHelper.ConvertListToExportData(result), |
| | | }; |
| | | |
| | | var fileName = result.Count > 1 ? "WmsInOutStockRecordå表" : result.Count == 1 ? result[0]?.MaterialName : "WmsInOutStockRecord模ç"; |
| | | return (sheets, fileName); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¡éªåºå
¥åºè®°å½è¡¨ï¼å½æ°å»ºææ´æ°æ¶ |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | protected Task CheckCreateOrUpdateDtoAsync(WmsInOutStockRecordCreateOrUpdateDtoBase input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | Check.NotNullOrWhiteSpace(input.OrderNo, "åæ®ç¼å·", 50); |
| | | Check.NotNullOrWhiteSpace(input.MaterialNo, "ç©æä»¶å·", 50); |
| | | Check.NotNull(input.StockType, "æä½ç±»å"); |
| | | Check.NotNullOrWhiteSpace(input.MaterialId, "ç©æID", 50); |
| | | Check.NotNullOrWhiteSpace(input.TaskNo, "ä»»å¡å·", 50); |
| | | |
| | | return Task.CompletedTask; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared.Enums |
| | | { |
| | | /// <summary> |
| | | /// åä»»å¡ç±»å |
| | | /// </summary> |
| | | [Description("åä»»å¡ç±»å")] |
| | | public enum SonTaskTypeEnum |
| | | { |
| | | /// <summary> |
| | | /// èªå¨å
¥åº |
| | | /// </summary> |
| | | [Description("èªå¨å
¥åº")] |
| | | ZDRUKU = 1, |
| | | |
| | | /// <summary> |
| | | /// 人工å
¥åº |
| | | /// </summary> |
| | | [Description("人工å
¥åº")] |
| | | RGRUKU = 2, |
| | | |
| | | /// <summary> |
| | | /// 人工åºåº |
| | | /// </summary> |
| | | [Description("人工åºåº")] |
| | | RGCHUKU = 3, |
| | | /// <summary> |
| | | /// èªå¨åºåº |
| | | /// </summary> |
| | | [Description("èªå¨åºåº")] |
| | | ZDCHUKU = 4, |
| | | |
| | | /// <summary> |
| | | /// 空æå¼å« |
| | | /// </summary> |
| | | [Description("空æå¼å«")] |
| | | KTHUJIOA = 5, |
| | | |
| | | /// <summary> |
| | | /// ååº |
| | | /// </summary> |
| | | [Description("ååº")] |
| | | HUIKU = 6, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared.Enums |
| | | { |
| | | /// <summary> |
| | | /// ä»»å¡ç±»å |
| | | /// </summary> |
| | | [Description("ä»»å¡ç±»å")] |
| | | public enum TaskTypeEnum |
| | | { |
| | | /// <summary> |
| | | /// åºåº |
| | | /// </summary> |
| | | [Description("åºåº")] |
| | | CHUKU = 1, |
| | | |
| | | /// <summary> |
| | | /// å
¥åº |
| | | /// </summary> |
| | | [Description("å
¥åº")] |
| | | RUKU = 2, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared.Enums |
| | | { |
| | | /// <summary> |
| | | /// ä»»å¡ç¶æ |
| | | /// </summary> |
| | | [Description("ä»»å¡ç¶æ")] |
| | | public enum WmsTaskStatus |
| | | { |
| | | /// <summary> |
| | | /// æªæ§è¡ |
| | | /// </summary> |
| | | [Description("æªæ§è¡")] |
| | | WEIZHIXING = 1, |
| | | /// <summary> |
| | | /// å¾
æ§è¡ |
| | | /// </summary> |
| | | [Description("å¾
æ§è¡")] |
| | | DAIZHIXINGZHONG = 2, |
| | | /// <summary> |
| | | /// æ§è¡ä¸ |
| | | /// </summary> |
| | | [Description("æ§è¡ä¸")] |
| | | ZHIXINGZHONG = 3, |
| | | /// <summary> |
| | | /// 宿 |
| | | /// </summary> |
| | | [Description("宿")] |
| | | WANCHENG = 4, |
| | | /// <summary> |
| | | /// åæ¶ |
| | | /// </summary> |
| | | [Description("åæ¶")] |
| | | QUXIAO = 5 |
| | | } |
| | | } |
| | |
| | | <ItemGroup> |
| | | <Folder Include="WmsInOutStockOrders\" /> |
| | | <Folder Include="WmsInOutStockOrderDetails\" /> |
| | | <Folder Include="WmsTasks\" /> |
| | | <Folder Include="WmsMaterialContainers\" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <Reference Include="CmsQueryExtensions"> |
| | | <HintPath>..\..\..\..\CommonDLL\CmsQueryExtensions.dll</HintPath> |
| | | </Reference> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
| | |
| | | /// æçç¼å· |
| | | /// </summary> |
| | | public string ContainerNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æåº |
| | | /// </summary> |
| | | public virtual int Sort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ç¦ç¨ |
| | | /// </summary> |
| | | public virtual bool? IsDisabled { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Adjusts the sort. |
| | | /// </summary> |
| | | /// <param name="sort">The sort.</param> |
| | | public void AdjustSort(int sort) |
| | | { |
| | | Sort = sort; |
| | | } |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CmsQueryExtensions.Extension; |
| | | using System.Linq.Expressions; |
| | | using Volo.Abp.Domain.Repositories; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.WmsInOutStockRecord; |
| | | |
| | | /// <summary> |
| | | /// åºå
¥åºè®°å½è¡¨ä»å¨ |
| | | /// </summary> |
| | | public interface IWmsInOutStockRecordRepository : IBasicRepository<WmsInOutStockRecord, Guid> |
| | | { |
| | | /// <summary> |
| | | /// æç
§åç§°æ¥æ¾åºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="materialNo"></param> |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | Task<WmsInOutStockRecord> FindByNameAsync(string materialNo, CancellationToken cancellationToken = default); |
| | | |
| | | /// <summary> |
| | | /// éªè¯åç§°æ¯å¦åå¨åºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="materialNo"></param> |
| | | /// <param name="id"></param> |
| | | /// <returns></returns> |
| | | Task<bool> NameExistAsync(string materialNo, Guid? id = null); |
| | | |
| | | /// <summary> |
| | | /// è·åæå¤§æåºåºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | Task<int> GetMaxSortAsync(); |
| | | |
| | | /// <summary> |
| | | /// è·åå页å表åºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="whereConditions"></param> |
| | | /// <param name="sorting"></param> |
| | | /// <param name="maxResultCount"></param> |
| | | /// <param name="skipCount"></param> |
| | | /// <param name="includeDetails"></param> |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | Task<List<WmsInOutStockRecord>> GetListAsync(FunReturnResultModel<Expression<Func<WmsInOutStockRecord, bool>>> whereConditions, string sorting = null, int maxResultCount = int.MaxValue, int skipCount = 0, bool includeDetails = false, CancellationToken cancellationToken = default); |
| | | |
| | | /// <summary> |
| | | /// è·åæ»æ°åºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="whereConditions"></param> |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | Task<long> GetCountAsync(FunReturnResultModel<Expression<Func<WmsInOutStockRecord, bool>>> whereConditions, CancellationToken cancellationToken = default); |
| | | } |
ÎļþÃû´Ó HIAWms/server/src/CMS.Plugin.HIAWms.Domain/WmsInOutStockRecords/WmsInOutStockRecord.cs ÐÞ¸Ä |
| | |
| | | using System.Threading.Tasks; |
| | | using Volo.Abp.Domain.Entities.Auditing; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.WmsInOutStockRecords |
| | | namespace CMS.Plugin.HIAWms.Domain.WmsInOutStockRecord |
| | | { |
| | | /// <summary> |
| | | /// åºå
¥åºè®°å½. |
| | |
| | | /// </summary> |
| | | public string? ToPlace { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æåº |
| | | /// </summary> |
| | | public virtual int Sort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ç¦ç¨ |
| | | /// </summary> |
| | | public virtual bool? IsDisabled { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Adjusts the sort. |
| | | /// </summary> |
| | | /// <param name="sort">The sort.</param> |
| | | public void AdjustSort(int sort) |
| | | { |
| | | Sort = sort; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Enums; |
| | | using NPOI.SS.Formula.Functions; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Volo.Abp.Domain.Entities.Auditing; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.WmsTask |
| | | { |
| | | /// <summary> |
| | | /// ä»»å¡ |
| | | /// </summary>W |
| | | public class WmsTask : FullAuditedAggregateRoot<Guid> |
| | | { |
| | | /// <summary> |
| | | /// ä»»å¡å· |
| | | /// </summary> |
| | | public string TaskNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡ç±»å |
| | | /// </summary> |
| | | public TaskTypeEnum TaskType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡ç级 |
| | | /// </summary> |
| | | public int TaskLevel { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡ç¶æ |
| | | /// </summary> |
| | | public WmsTaskStatus TaskStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æçç¼å· |
| | | /// </summary> |
| | | public string? ContainerNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// èµ·å§åºä½ |
| | | /// </summary> |
| | | public string? SourcePlace { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç®æ åºä½ |
| | | /// </summary> |
| | | public string? ToPlace { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å··é |
| | | /// </summary> |
| | | public int? Aisle { get; set; } |
| | | /// <summary> |
| | | /// å åæºID |
| | | /// </summary> |
| | | public int? DodeviceId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 设å¤ç±»å |
| | | /// </summary> |
| | | public int Dodevicetype { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 设å¤ä»»å¡ç¶æ |
| | | /// </summary> |
| | | public int TaskDodeviceStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// WCSæ¯å¦å¯ä»¥è¯»å |
| | | /// </summary> |
| | | public bool IsRead { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä»»å¡ç±»å |
| | | /// </summary> |
| | | public SonTaskTypeEnum? SonTaskType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¥æºåæ®å· |
| | | /// </summary> |
| | | public string? SourceOrderNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡å
³èçä¸ä¸ªä»»å¡æ¯å¦çææåï¼å¤±è´¥ä¸º1ï¼å
¶ä»æ æä½ |
| | | /// </summary> |
| | | public int? IsNextTask { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¯ååé1 |
| | | /// </summary> |
| | | public string? MutableParam1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¯ååé2 |
| | | /// </summary> |
| | | public string? MutableParam2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¯ååé3 |
| | | /// </summary> |
| | | public string? MutableParam3 { get; set; } |
| | | /// <summary> |
| | | /// æåº |
| | | /// </summary> |
| | | public virtual int Sort { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ç¦ç¨ |
| | | /// </summary> |
| | | public virtual bool? IsDisabled { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Adjusts the sort. |
| | | /// </summary> |
| | | /// <param name="sort">The sort.</param> |
| | | public void AdjustSort(int sort) |
| | | { |
| | | Sort = sort; |
| | | } |
| | | } |
| | | } |
| | |
| | | <ProjectReference Include="..\CMS.Plugin.HIAWms.Domain\CMS.Plugin.HIAWms.Domain.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <Reference Include="CmsQueryExtensions"> |
| | | <HintPath>..\..\..\..\CommonDLL\CmsQueryExtensions.dll</HintPath> |
| | | </Reference> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
| | |
| | | using CMS.Plugin.HIAWms.Domain; |
| | | using CMS.Plugin.HIAWms.Domain.WmsContainerPlaces; |
| | | using CMS.Plugin.HIAWms.Domain.WmsInOutStockRecords; |
| | | using CMS.Plugin.HIAWms.Domain.WmsInOutStockRecord; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Volo.Abp; |
| | | using Volo.Abp.EntityFrameworkCore.Modeling; |
| | | |
| | |
| | | .IsRequired(false) |
| | | .HasComment("ç®æ åºä½"); |
| | | |
| | | b.Property(x => x.Sort).HasComment("æåº"); |
| | | b.Property(x => x.IsDisabled).IsRequired(false).HasComment("æ¯å¦ç¦ç¨"); |
| | | |
| | | // Indexes |
| | | b.HasIndex(x => x.OrderNo); |
| | | b.HasIndex(x => x.MaterialNo); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain; |
| | | using CMS.Plugin.HIAWms.Domain.WmsContainerPlaces; |
| | | using CMS.Plugin.HIAWms.Domain.WmsTask; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Volo.Abp; |
| | | using Volo.Abp.EntityFrameworkCore.Modeling; |
| | | |
| | | namespace CMS.Plugin.HIAWms.EntityFrameworkCore.Extensions |
| | | { |
| | | /// <summary> |
| | | /// EfCoreæ©å± |
| | | /// </summary> |
| | | public static partial class CMSPluginEfCoreExtensions |
| | | { |
| | | /// <summary> |
| | | /// Includes the details. |
| | | /// </summary> |
| | | /// <param name="queryable">The queryable.</param> |
| | | /// <param name="include">if set to <c>true</c> [include].</param> |
| | | /// <returns></returns> |
| | | public static IQueryable<WmsTask> IncludeDetails(this IQueryable<WmsTask> queryable, bool include = true) |
| | | { |
| | | if (!include) |
| | | { |
| | | return queryable; |
| | | } |
| | | |
| | | return queryable; |
| | | } |
| | | /// <summary> |
| | | /// Configures the WMS task entity. |
| | | /// </summary> |
| | | /// <param name="builder">The builder.</param> |
| | | public static void ConfigureWmsTask(this ModelBuilder builder) |
| | | { |
| | | Check.NotNull(builder, nameof(builder)); |
| | | |
| | | builder.Entity<WmsTask>(b => |
| | | { |
| | | b.ToTable((CMSPluginDbProperties.DbTablePrefix + "_WmsTasks").ToLower(), CMSPluginDbProperties.DbSchema) |
| | | .HasComment("ä»»å¡è¡¨"); |
| | | |
| | | b.ConfigureByConvention(); |
| | | |
| | | // Primary key configuration (inherited from FullAuditedAggregateRoot<Guid>) |
| | | b.HasKey(x => x.Id); |
| | | |
| | | // Properties configuration |
| | | b.Property(x => x.TaskNo) |
| | | .HasMaxLength(50) |
| | | .IsRequired() |
| | | .HasComment("ä»»å¡å·"); |
| | | |
| | | b.Property(x => x.TaskType) |
| | | .IsRequired() |
| | | .HasComment("ä»»å¡ç±»å"); |
| | | |
| | | b.Property(x => x.TaskLevel) |
| | | .IsRequired() |
| | | .HasComment("ä»»å¡ç级"); |
| | | |
| | | b.Property(x => x.TaskStatus) |
| | | .IsRequired() |
| | | .HasComment("ä»»å¡ç¶æ"); |
| | | |
| | | b.Property(x => x.ContainerNo) |
| | | .HasMaxLength(50) |
| | | .IsRequired(false) |
| | | .HasComment("æçç¼å·"); |
| | | |
| | | b.Property(x => x.SourcePlace) |
| | | .HasMaxLength(50) |
| | | .IsRequired(false) |
| | | .HasComment("èµ·å§åºä½"); |
| | | |
| | | b.Property(x => x.ToPlace) |
| | | .HasMaxLength(50) |
| | | .IsRequired(false) |
| | | .HasComment("ç®æ åºä½"); |
| | | |
| | | b.Property(x => x.Aisle) |
| | | .IsRequired(false) |
| | | .HasComment("å··é"); |
| | | |
| | | b.Property(x => x.DodeviceId) |
| | | .IsRequired(false) |
| | | .HasComment("å åæºID"); |
| | | |
| | | b.Property(x => x.Dodevicetype) |
| | | .IsRequired() |
| | | .HasComment("设å¤ç±»å"); |
| | | |
| | | b.Property(x => x.TaskDodeviceStatus) |
| | | .IsRequired() |
| | | .HasComment("设å¤ä»»å¡ç¶æ"); |
| | | |
| | | b.Property(x => x.IsRead) |
| | | .IsRequired() |
| | | .HasComment("WCSæ¯å¦å¯ä»¥è¯»å"); |
| | | |
| | | b.Property(x => x.SonTaskType) |
| | | .IsRequired(false) |
| | | .HasComment("åä»»å¡ç±»å"); |
| | | |
| | | b.Property(x => x.SourceOrderNo) |
| | | .HasMaxLength(50) |
| | | .IsRequired(false) |
| | | .HasComment("æ¥æºåæ®å·"); |
| | | |
| | | b.Property(x => x.IsNextTask) |
| | | .IsRequired(false) |
| | | .HasComment("ä¸ä¸ªä»»å¡æ¯å¦çææå"); |
| | | |
| | | b.Property(x => x.MutableParam1) |
| | | .HasMaxLength(200) |
| | | .IsRequired(false) |
| | | .HasComment("å¯ååé1"); |
| | | |
| | | b.Property(x => x.MutableParam2) |
| | | .HasMaxLength(200) |
| | | .IsRequired(false) |
| | | .HasComment("å¯ååé2"); |
| | | |
| | | b.Property(x => x.MutableParam3) |
| | | .HasMaxLength(200) |
| | | .IsRequired(false) |
| | | .HasComment("å¯ååé3"); |
| | | |
| | | b.Property(x => x.Sort) |
| | | .IsRequired() |
| | | .HasComment("æåº"); |
| | | |
| | | b.Property(x => x.IsDisabled) |
| | | .IsRequired(false) |
| | | .HasComment("æ¯å¦ç¦ç¨"); |
| | | |
| | | // Indexes configuration |
| | | b.HasIndex(x => x.TaskNo).IsUnique(); |
| | | b.HasIndex(x => x.TaskType); |
| | | b.HasIndex(x => x.TaskStatus); |
| | | b.HasIndex(x => x.ContainerNo); |
| | | b.HasIndex(x => x.SourcePlace); |
| | | b.HasIndex(x => x.ToPlace); |
| | | b.HasIndex(x => x.DodeviceId); |
| | | b.HasIndex(x => x.IsRead); |
| | | b.HasIndex(x => x.SourceOrderNo); |
| | | b.HasIndex(x => x.Sort); |
| | | |
| | | b.ApplyObjectExtensionMappings(); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.WmsInOutStockRecord; |
| | | using CMS.Plugin.HIAWms.EntityFrameworkCore.Extensions; |
| | | using CmsQueryExtensions.Extension; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using System.Linq.Dynamic.Core; |
| | | using System.Linq.Expressions; |
| | | using Volo.Abp.Domain.Repositories.EntityFrameworkCore; |
| | | using Volo.Abp.EntityFrameworkCore; |
| | | |
| | | |
| | | namespace CMS.Plugin.HIAWms.EntityFrameworkCore.Repositories; |
| | | |
| | | /// <summary> |
| | | /// åºå
¥åºè®°å½è¡¨ä»å¨å®ç° |
| | | /// </summary> |
| | | public class EfCoreWmsInOutStockRecordRepository : EfCoreRepository<ICMSPluginDbContext, WmsInOutStockRecord, Guid>, IWmsInOutStockRecordRepository |
| | | { |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="EfCoreWmsInOutStockRecordRepository"/> class. |
| | | /// </summary> |
| | | /// <param name="dbContextProvider">The database context provider.</param> |
| | | public EfCoreWmsInOutStockRecordRepository(IDbContextProvider<ICMSPluginDbContext> dbContextProvider) |
| | | : base(dbContextProvider) |
| | | { |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æç
§åç§°æ¥æ¾åºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="materialNo"></param> |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | public virtual async Task<WmsInOutStockRecord> FindByNameAsync(string materialNo, CancellationToken cancellationToken = default) |
| | | { |
| | | return await (await GetDbSetAsync()) |
| | | .IncludeDetails() |
| | | .Where(x => !x.IsDeleted) |
| | | .OrderBy(t => t.Sort) |
| | | .FirstOrDefaultAsync(t => t.MaterialNo == materialNo, GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// éªè¯åç§°æ¯å¦åå¨åºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="materialCode"></param> |
| | | /// <param name="id"></param> |
| | | /// <returns></returns> |
| | | public async Task<bool> NameExistAsync(string materialCode, Guid? id = null) |
| | | { |
| | | return await (await GetDbSetAsync()).WhereIf(id.HasValue, p => p.Id != id).Where(x => !x.IsDeleted).AnyAsync(x => x.MaterialName == materialCode); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åæå¤§æåºåºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public async Task<int> GetMaxSortAsync() |
| | | { |
| | | var hasAny = await (await GetQueryableAsync()) |
| | | .Where(x => !x.IsDeleted).AnyAsync(); |
| | | if (!hasAny) |
| | | { |
| | | return 1; |
| | | } |
| | | |
| | | var sort = await (await GetQueryableAsync()) |
| | | .Where(x => !x.IsDeleted).MaxAsync(x => x.Sort); |
| | | return sort + 1; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åå页å表åºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="whereConditions"></param> |
| | | /// <param name="sorting"></param> |
| | | /// <param name="maxResultCount"></param> |
| | | /// <param name="skipCount"></param> |
| | | /// <param name="includeDetails"></param> |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | public async Task<List<WmsInOutStockRecord>> GetListAsync(FunReturnResultModel<Expression<Func<WmsInOutStockRecord, bool>>> whereConditions, string sorting = null, int maxResultCount = int.MaxValue, int skipCount = 0, bool includeDetails = false, CancellationToken cancellationToken = default) |
| | | { |
| | | return await (await GetDbSetAsync()) |
| | | .IncludeDetails(includeDetails) |
| | | .WhereIf(whereConditions != null, whereConditions.data) |
| | | .Where(x => !x.IsDeleted) |
| | | .OrderBy(sorting.IsNullOrEmpty() ? nameof(WmsInOutStockRecord.Sort) : sorting) |
| | | .PageBy(skipCount, maxResultCount) |
| | | .ToListAsync(GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åæ»æ°åºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="whereConditions"></param> |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | public async Task<long> GetCountAsync(FunReturnResultModel<Expression<Func<WmsInOutStockRecord, bool>>> whereConditions, CancellationToken cancellationToken = default) |
| | | { |
| | | return await (await GetQueryableAsync()) |
| | | .WhereIf(whereConditions != null, whereConditions.data) |
| | | .Where(x => !x.IsDeleted) |
| | | .CountAsync(cancellationToken: GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | |
| | | /// <inheritdoc /> |
| | | public override async Task<IQueryable<WmsInOutStockRecord>> WithDetailsAsync() |
| | | { |
| | | return (await GetQueryableAsync()) |
| | | .Where(x => !x.IsDeleted).IncludeDetails(); |
| | | } |
| | | } |
| | |
| | | builder.ConfigureWmsMaterialInfo(); |
| | | builder.ConfigureWmsInOutStockRecord(); |
| | | builder.ConfigureWmsContainerPlace(); |
| | | builder.ConfigureWmsTask(); |
| | | |
| | | /* Configure your own tables/entities inside here */ |
| | | |
ÎļþÃû´Ó HIAWms/server/src/CMS.Plugin.HIAWms.MySQL/Migrations/20250506054001_InitialCreate7.Designer.cs ÐÞ¸Ä |
| | |
| | | namespace CMS.Plugin.HIAWms.MySQL.Migrations |
| | | { |
| | | [DbContext(typeof(CMSPluginDbContext))] |
| | | [Migration("20250506054001_InitialCreate7")] |
| | | partial class InitialCreate7 |
| | | [Migration("20250506070902_InitialCreate6")] |
| | | partial class InitialCreate6 |
| | | { |
| | | protected override void BuildTargetModel(ModelBuilder modelBuilder) |
| | | { |
| | |
| | | .HasDefaultValue(false) |
| | | .HasColumnName("IsDeleted"); |
| | | |
| | | b.Property<bool?>("IsDisabled") |
| | | .HasColumnType("tinyint(1)"); |
| | | |
| | | b.Property<DateTime?>("LastModificationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("LastModificationTime"); |
| | |
| | | b.Property<Guid?>("LastModifierId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("LastModifierId"); |
| | | |
| | | b.Property<int>("Sort") |
| | | .HasColumnType("int"); |
| | | |
| | | b.HasKey("PlaceNo", "ContainerNo"); |
| | | |
| | |
| | | b.HasComment("æçä¿¡æ¯è¡¨"); |
| | | }); |
| | | |
| | | modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsInOutStockRecords.WmsInOutStockRecord", b => |
| | | modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsInOutStockRecord.WmsInOutStockRecord", b => |
| | | { |
| | | b.Property<Guid>("Id") |
| | | .ValueGeneratedOnAdd() |
| | |
| | | .HasColumnType("tinyint(1)") |
| | | .HasDefaultValue(false) |
| | | .HasColumnName("IsDeleted"); |
| | | |
| | | b.Property<bool?>("IsDisabled") |
| | | .HasColumnType("tinyint(1)") |
| | | .HasComment("æ¯å¦ç¦ç¨"); |
| | | |
| | | b.Property<DateTime?>("LastModificationTime") |
| | | .HasColumnType("datetime(6)") |
| | |
| | | .HasColumnType("varchar(500)") |
| | | .HasComment("夿³¨"); |
| | | |
| | | b.Property<int>("Sort") |
| | | .HasColumnType("int") |
| | | .HasComment("æåº"); |
| | | |
| | | b.Property<string>("SourcePlace") |
| | | .HasMaxLength(50) |
| | | .HasColumnType("varchar(50)") |
ÎļþÃû´Ó HIAWms/server/src/CMS.Plugin.HIAWms.MySQL/Migrations/20250506054001_InitialCreate7.cs ÐÞ¸Ä |
| | |
| | | |
| | | namespace CMS.Plugin.HIAWms.MySQL.Migrations |
| | | { |
| | | public partial class InitialCreate7 : Migration |
| | | public partial class InitialCreate6 : Migration |
| | | { |
| | | protected override void Up(MigrationBuilder migrationBuilder) |
| | | { |
| | |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | ContainerNo = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "æçç¼å·") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | Sort = table.Column<int>(type: "int", nullable: false), |
| | | IsDisabled = table.Column<bool>(type: "tinyint(1)", nullable: true), |
| | | Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
| | | ExtraProperties = table.Column<string>(type: "longtext", nullable: true) |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | ToPlace = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "ç®æ åºä½") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | Sort = table.Column<int>(type: "int", nullable: false, comment: "æåº"), |
| | | IsDisabled = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "æ¯å¦ç¦ç¨"), |
| | | ExtraProperties = table.Column<string>(type: "longtext", nullable: true) |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true) |
| | |
| | | }, |
| | | comment: "åºå
¥åºè®°å½è¡¨") |
| | | .Annotation("MySql:CharSet", "utf8mb4"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmsmaterialstocks_MaterialNo", |
| | | table: "scms_wmsmaterialstocks", |
| | | column: "MaterialNo"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmscontainerplaces_ContainerNo", |
| | |
| | | |
| | | migrationBuilder.DropTable( |
| | | name: "scms_wmsinoutstockrecords"); |
| | | |
| | | migrationBuilder.DropIndex( |
| | | name: "IX_scms_wmsmaterialstocks_MaterialNo", |
| | | table: "scms_wmsmaterialstocks"); |
| | | } |
| | | } |
| | | } |
copy from HIAWms/server/src/CMS.Plugin.HIAWms.MySQL/Migrations/20250506054001_InitialCreate7.Designer.cs
copy to HIAWms/server/src/CMS.Plugin.HIAWms.MySQL/Migrations/20250506074429_InitialCreate7.Designer.cs
Îļþ´Ó HIAWms/server/src/CMS.Plugin.HIAWms.MySQL/Migrations/20250506054001_InitialCreate7.Designer.cs ¸´ÖÆ |
| | |
| | | namespace CMS.Plugin.HIAWms.MySQL.Migrations |
| | | { |
| | | [DbContext(typeof(CMSPluginDbContext))] |
| | | [Migration("20250506054001_InitialCreate7")] |
| | | [Migration("20250506074429_InitialCreate7")] |
| | | partial class InitialCreate7 |
| | | { |
| | | protected override void BuildTargetModel(ModelBuilder modelBuilder) |
| | |
| | | .HasDefaultValue(false) |
| | | .HasColumnName("IsDeleted"); |
| | | |
| | | b.Property<bool?>("IsDisabled") |
| | | .HasColumnType("tinyint(1)"); |
| | | |
| | | b.Property<DateTime?>("LastModificationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("LastModificationTime"); |
| | |
| | | b.Property<Guid?>("LastModifierId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("LastModifierId"); |
| | | |
| | | b.Property<int>("Sort") |
| | | .HasColumnType("int"); |
| | | |
| | | b.HasKey("PlaceNo", "ContainerNo"); |
| | | |
| | |
| | | b.HasComment("æçä¿¡æ¯è¡¨"); |
| | | }); |
| | | |
| | | modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsInOutStockRecords.WmsInOutStockRecord", b => |
| | | modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsInOutStockRecord.WmsInOutStockRecord", b => |
| | | { |
| | | b.Property<Guid>("Id") |
| | | .ValueGeneratedOnAdd() |
| | |
| | | .HasColumnType("tinyint(1)") |
| | | .HasDefaultValue(false) |
| | | .HasColumnName("IsDeleted"); |
| | | |
| | | b.Property<bool?>("IsDisabled") |
| | | .HasColumnType("tinyint(1)") |
| | | .HasComment("æ¯å¦ç¦ç¨"); |
| | | |
| | | b.Property<DateTime?>("LastModificationTime") |
| | | .HasColumnType("datetime(6)") |
| | |
| | | .HasMaxLength(500) |
| | | .HasColumnType("varchar(500)") |
| | | .HasComment("夿³¨"); |
| | | |
| | | b.Property<int>("Sort") |
| | | .HasColumnType("int") |
| | | .HasComment("æåº"); |
| | | |
| | | b.Property<string>("SourcePlace") |
| | | .HasMaxLength(50) |
| | |
| | | |
| | | b.HasComment("ä»åºä¿¡æ¯è¡¨"); |
| | | }); |
| | | |
| | | modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsTask.WmsTask", b => |
| | | { |
| | | b.Property<Guid>("Id") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("char(36)"); |
| | | |
| | | b.Property<int?>("Aisle") |
| | | .HasColumnType("int") |
| | | .HasComment("å··é"); |
| | | |
| | | b.Property<string>("ConcurrencyStamp") |
| | | .IsConcurrencyToken() |
| | | .HasMaxLength(40) |
| | | .HasColumnType("varchar(40)") |
| | | .HasColumnName("ConcurrencyStamp"); |
| | | |
| | | b.Property<string>("ContainerNo") |
| | | .HasMaxLength(50) |
| | | .HasColumnType("varchar(50)") |
| | | .HasComment("æçç¼å·"); |
| | | |
| | | b.Property<DateTime>("CreationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("CreationTime"); |
| | | |
| | | b.Property<Guid?>("CreatorId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("CreatorId"); |
| | | |
| | | b.Property<Guid?>("DeleterId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("DeleterId"); |
| | | |
| | | b.Property<DateTime?>("DeletionTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("DeletionTime"); |
| | | |
| | | b.Property<int?>("DodeviceId") |
| | | .HasColumnType("int") |
| | | .HasComment("å åæºID"); |
| | | |
| | | b.Property<int>("Dodevicetype") |
| | | .HasColumnType("int") |
| | | .HasComment("设å¤ç±»å"); |
| | | |
| | | b.Property<string>("ExtraProperties") |
| | | .HasColumnType("longtext") |
| | | .HasColumnName("ExtraProperties"); |
| | | |
| | | b.Property<bool>("IsDeleted") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("tinyint(1)") |
| | | .HasDefaultValue(false) |
| | | .HasColumnName("IsDeleted"); |
| | | |
| | | b.Property<bool?>("IsDisabled") |
| | | .HasColumnType("tinyint(1)") |
| | | .HasComment("æ¯å¦ç¦ç¨"); |
| | | |
| | | b.Property<int?>("IsNextTask") |
| | | .HasColumnType("int") |
| | | .HasComment("ä¸ä¸ªä»»å¡æ¯å¦çææå"); |
| | | |
| | | b.Property<bool>("IsRead") |
| | | .HasColumnType("tinyint(1)") |
| | | .HasComment("WCSæ¯å¦å¯ä»¥è¯»å"); |
| | | |
| | | b.Property<DateTime?>("LastModificationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("LastModificationTime"); |
| | | |
| | | b.Property<Guid?>("LastModifierId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("LastModifierId"); |
| | | |
| | | b.Property<string>("MutableParam1") |
| | | .HasMaxLength(200) |
| | | .HasColumnType("varchar(200)") |
| | | .HasComment("å¯ååé1"); |
| | | |
| | | b.Property<string>("MutableParam2") |
| | | .HasMaxLength(200) |
| | | .HasColumnType("varchar(200)") |
| | | .HasComment("å¯ååé2"); |
| | | |
| | | b.Property<string>("MutableParam3") |
| | | .HasMaxLength(200) |
| | | .HasColumnType("varchar(200)") |
| | | .HasComment("å¯ååé3"); |
| | | |
| | | b.Property<int?>("SonTaskType") |
| | | .HasColumnType("int") |
| | | .HasComment("åä»»å¡ç±»å"); |
| | | |
| | | b.Property<int>("Sort") |
| | | .HasColumnType("int") |
| | | .HasComment("æåº"); |
| | | |
| | | b.Property<string>("SourceOrderNo") |
| | | .HasMaxLength(50) |
| | | .HasColumnType("varchar(50)") |
| | | .HasComment("æ¥æºåæ®å·"); |
| | | |
| | | b.Property<string>("SourcePlace") |
| | | .HasMaxLength(50) |
| | | .HasColumnType("varchar(50)") |
| | | .HasComment("èµ·å§åºä½"); |
| | | |
| | | b.Property<int>("TaskDodeviceStatus") |
| | | .HasColumnType("int") |
| | | .HasComment("设å¤ä»»å¡ç¶æ"); |
| | | |
| | | b.Property<int>("TaskLevel") |
| | | .HasColumnType("int") |
| | | .HasComment("ä»»å¡ç级"); |
| | | |
| | | b.Property<string>("TaskNo") |
| | | .IsRequired() |
| | | .HasMaxLength(50) |
| | | .HasColumnType("varchar(50)") |
| | | .HasComment("ä»»å¡å·"); |
| | | |
| | | b.Property<int>("TaskStatus") |
| | | .HasColumnType("int") |
| | | .HasComment("ä»»å¡ç¶æ"); |
| | | |
| | | b.Property<int>("TaskType") |
| | | .HasColumnType("int") |
| | | .HasComment("ä»»å¡ç±»å"); |
| | | |
| | | b.Property<string>("ToPlace") |
| | | .HasMaxLength(50) |
| | | .HasColumnType("varchar(50)") |
| | | .HasComment("ç®æ åºä½"); |
| | | |
| | | b.HasKey("Id"); |
| | | |
| | | b.HasIndex("ContainerNo"); |
| | | |
| | | b.HasIndex("DodeviceId"); |
| | | |
| | | b.HasIndex("IsRead"); |
| | | |
| | | b.HasIndex("Sort"); |
| | | |
| | | b.HasIndex("SourceOrderNo"); |
| | | |
| | | b.HasIndex("SourcePlace"); |
| | | |
| | | b.HasIndex("TaskNo") |
| | | .IsUnique(); |
| | | |
| | | b.HasIndex("TaskStatus"); |
| | | |
| | | b.HasIndex("TaskType"); |
| | | |
| | | b.HasIndex("ToPlace"); |
| | | |
| | | b.ToTable("scms_wmstasks", (string)null); |
| | | |
| | | b.HasComment("ä»»å¡è¡¨"); |
| | | }); |
| | | #pragma warning restore 612, 618 |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using Microsoft.EntityFrameworkCore.Migrations; |
| | | |
| | | #nullable disable |
| | | |
| | | namespace CMS.Plugin.HIAWms.MySQL.Migrations |
| | | { |
| | | public partial class InitialCreate7 : Migration |
| | | { |
| | | protected override void Up(MigrationBuilder migrationBuilder) |
| | | { |
| | | migrationBuilder.CreateTable( |
| | | name: "scms_wmstasks", |
| | | columns: table => new |
| | | { |
| | | Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
| | | TaskNo = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "ä»»å¡å·") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | TaskType = table.Column<int>(type: "int", nullable: false, comment: "ä»»å¡ç±»å"), |
| | | TaskLevel = table.Column<int>(type: "int", nullable: false, comment: "ä»»å¡ç级"), |
| | | TaskStatus = table.Column<int>(type: "int", nullable: false, comment: "ä»»å¡ç¶æ"), |
| | | ContainerNo = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "æçç¼å·") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | SourcePlace = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "èµ·å§åºä½") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | ToPlace = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "ç®æ åºä½") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | Aisle = table.Column<int>(type: "int", nullable: true, comment: "å··é"), |
| | | DodeviceId = table.Column<int>(type: "int", nullable: true, comment: "å åæºID"), |
| | | Dodevicetype = table.Column<int>(type: "int", nullable: false, comment: "设å¤ç±»å"), |
| | | TaskDodeviceStatus = table.Column<int>(type: "int", nullable: false, comment: "设å¤ä»»å¡ç¶æ"), |
| | | IsRead = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "WCSæ¯å¦å¯ä»¥è¯»å"), |
| | | SonTaskType = table.Column<int>(type: "int", nullable: true, comment: "åä»»å¡ç±»å"), |
| | | SourceOrderNo = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "æ¥æºåæ®å·") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | IsNextTask = table.Column<int>(type: "int", nullable: true, comment: "ä¸ä¸ªä»»å¡æ¯å¦çææå"), |
| | | MutableParam1 = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "å¯ååé1") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | MutableParam2 = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "å¯ååé2") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | MutableParam3 = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "å¯ååé3") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | Sort = table.Column<int>(type: "int", nullable: false, comment: "æåº"), |
| | | IsDisabled = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "æ¯å¦ç¦ç¨"), |
| | | ExtraProperties = table.Column<string>(type: "longtext", nullable: true) |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true) |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
| | | CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
| | | LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
| | | LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
| | | IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false), |
| | | DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
| | | DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true) |
| | | }, |
| | | constraints: table => |
| | | { |
| | | table.PrimaryKey("PK_scms_wmstasks", x => x.Id); |
| | | }, |
| | | comment: "ä»»å¡è¡¨") |
| | | .Annotation("MySql:CharSet", "utf8mb4"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmstasks_ContainerNo", |
| | | table: "scms_wmstasks", |
| | | column: "ContainerNo"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmstasks_DodeviceId", |
| | | table: "scms_wmstasks", |
| | | column: "DodeviceId"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmstasks_IsRead", |
| | | table: "scms_wmstasks", |
| | | column: "IsRead"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmstasks_Sort", |
| | | table: "scms_wmstasks", |
| | | column: "Sort"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmstasks_SourceOrderNo", |
| | | table: "scms_wmstasks", |
| | | column: "SourceOrderNo"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmstasks_SourcePlace", |
| | | table: "scms_wmstasks", |
| | | column: "SourcePlace"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmstasks_TaskNo", |
| | | table: "scms_wmstasks", |
| | | column: "TaskNo", |
| | | unique: true); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmstasks_TaskStatus", |
| | | table: "scms_wmstasks", |
| | | column: "TaskStatus"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmstasks_TaskType", |
| | | table: "scms_wmstasks", |
| | | column: "TaskType"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmstasks_ToPlace", |
| | | table: "scms_wmstasks", |
| | | column: "ToPlace"); |
| | | } |
| | | |
| | | protected override void Down(MigrationBuilder migrationBuilder) |
| | | { |
| | | migrationBuilder.DropTable( |
| | | name: "scms_wmstasks"); |
| | | } |
| | | } |
| | | } |
| | |
| | | .HasDefaultValue(false) |
| | | .HasColumnName("IsDeleted"); |
| | | |
| | | b.Property<bool?>("IsDisabled") |
| | | .HasColumnType("tinyint(1)"); |
| | | |
| | | b.Property<DateTime?>("LastModificationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("LastModificationTime"); |
| | |
| | | b.Property<Guid?>("LastModifierId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("LastModifierId"); |
| | | |
| | | b.Property<int>("Sort") |
| | | .HasColumnType("int"); |
| | | |
| | | b.HasKey("PlaceNo", "ContainerNo"); |
| | | |
| | |
| | | b.HasComment("æçä¿¡æ¯è¡¨"); |
| | | }); |
| | | |
| | | modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsInOutStockRecords.WmsInOutStockRecord", b => |
| | | modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsInOutStockRecord.WmsInOutStockRecord", b => |
| | | { |
| | | b.Property<Guid>("Id") |
| | | .ValueGeneratedOnAdd() |
| | |
| | | .HasColumnType("tinyint(1)") |
| | | .HasDefaultValue(false) |
| | | .HasColumnName("IsDeleted"); |
| | | |
| | | b.Property<bool?>("IsDisabled") |
| | | .HasColumnType("tinyint(1)") |
| | | .HasComment("æ¯å¦ç¦ç¨"); |
| | | |
| | | b.Property<DateTime?>("LastModificationTime") |
| | | .HasColumnType("datetime(6)") |
| | |
| | | .HasMaxLength(500) |
| | | .HasColumnType("varchar(500)") |
| | | .HasComment("夿³¨"); |
| | | |
| | | b.Property<int>("Sort") |
| | | .HasColumnType("int") |
| | | .HasComment("æåº"); |
| | | |
| | | b.Property<string>("SourcePlace") |
| | | .HasMaxLength(50) |
| | |
| | | |
| | | b.HasComment("ä»åºä¿¡æ¯è¡¨"); |
| | | }); |
| | | |
| | | modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsTask.WmsTask", b => |
| | | { |
| | | b.Property<Guid>("Id") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("char(36)"); |
| | | |
| | | b.Property<int?>("Aisle") |
| | | .HasColumnType("int") |
| | | .HasComment("å··é"); |
| | | |
| | | b.Property<string>("ConcurrencyStamp") |
| | | .IsConcurrencyToken() |
| | | .HasMaxLength(40) |
| | | .HasColumnType("varchar(40)") |
| | | .HasColumnName("ConcurrencyStamp"); |
| | | |
| | | b.Property<string>("ContainerNo") |
| | | .HasMaxLength(50) |
| | | .HasColumnType("varchar(50)") |
| | | .HasComment("æçç¼å·"); |
| | | |
| | | b.Property<DateTime>("CreationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("CreationTime"); |
| | | |
| | | b.Property<Guid?>("CreatorId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("CreatorId"); |
| | | |
| | | b.Property<Guid?>("DeleterId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("DeleterId"); |
| | | |
| | | b.Property<DateTime?>("DeletionTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("DeletionTime"); |
| | | |
| | | b.Property<int?>("DodeviceId") |
| | | .HasColumnType("int") |
| | | .HasComment("å åæºID"); |
| | | |
| | | b.Property<int>("Dodevicetype") |
| | | .HasColumnType("int") |
| | | .HasComment("设å¤ç±»å"); |
| | | |
| | | b.Property<string>("ExtraProperties") |
| | | .HasColumnType("longtext") |
| | | .HasColumnName("ExtraProperties"); |
| | | |
| | | b.Property<bool>("IsDeleted") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("tinyint(1)") |
| | | .HasDefaultValue(false) |
| | | .HasColumnName("IsDeleted"); |
| | | |
| | | b.Property<bool?>("IsDisabled") |
| | | .HasColumnType("tinyint(1)") |
| | | .HasComment("æ¯å¦ç¦ç¨"); |
| | | |
| | | b.Property<int?>("IsNextTask") |
| | | .HasColumnType("int") |
| | | .HasComment("ä¸ä¸ªä»»å¡æ¯å¦çææå"); |
| | | |
| | | b.Property<bool>("IsRead") |
| | | .HasColumnType("tinyint(1)") |
| | | .HasComment("WCSæ¯å¦å¯ä»¥è¯»å"); |
| | | |
| | | b.Property<DateTime?>("LastModificationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("LastModificationTime"); |
| | | |
| | | b.Property<Guid?>("LastModifierId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("LastModifierId"); |
| | | |
| | | b.Property<string>("MutableParam1") |
| | | .HasMaxLength(200) |
| | | .HasColumnType("varchar(200)") |
| | | .HasComment("å¯ååé1"); |
| | | |
| | | b.Property<string>("MutableParam2") |
| | | .HasMaxLength(200) |
| | | .HasColumnType("varchar(200)") |
| | | .HasComment("å¯ååé2"); |
| | | |
| | | b.Property<string>("MutableParam3") |
| | | .HasMaxLength(200) |
| | | .HasColumnType("varchar(200)") |
| | | .HasComment("å¯ååé3"); |
| | | |
| | | b.Property<int?>("SonTaskType") |
| | | .HasColumnType("int") |
| | | .HasComment("åä»»å¡ç±»å"); |
| | | |
| | | b.Property<int>("Sort") |
| | | .HasColumnType("int") |
| | | .HasComment("æåº"); |
| | | |
| | | b.Property<string>("SourceOrderNo") |
| | | .HasMaxLength(50) |
| | | .HasColumnType("varchar(50)") |
| | | .HasComment("æ¥æºåæ®å·"); |
| | | |
| | | b.Property<string>("SourcePlace") |
| | | .HasMaxLength(50) |
| | | .HasColumnType("varchar(50)") |
| | | .HasComment("èµ·å§åºä½"); |
| | | |
| | | b.Property<int>("TaskDodeviceStatus") |
| | | .HasColumnType("int") |
| | | .HasComment("设å¤ä»»å¡ç¶æ"); |
| | | |
| | | b.Property<int>("TaskLevel") |
| | | .HasColumnType("int") |
| | | .HasComment("ä»»å¡ç级"); |
| | | |
| | | b.Property<string>("TaskNo") |
| | | .IsRequired() |
| | | .HasMaxLength(50) |
| | | .HasColumnType("varchar(50)") |
| | | .HasComment("ä»»å¡å·"); |
| | | |
| | | b.Property<int>("TaskStatus") |
| | | .HasColumnType("int") |
| | | .HasComment("ä»»å¡ç¶æ"); |
| | | |
| | | b.Property<int>("TaskType") |
| | | .HasColumnType("int") |
| | | .HasComment("ä»»å¡ç±»å"); |
| | | |
| | | b.Property<string>("ToPlace") |
| | | .HasMaxLength(50) |
| | | .HasColumnType("varchar(50)") |
| | | .HasComment("ç®æ åºä½"); |
| | | |
| | | b.HasKey("Id"); |
| | | |
| | | b.HasIndex("ContainerNo"); |
| | | |
| | | b.HasIndex("DodeviceId"); |
| | | |
| | | b.HasIndex("IsRead"); |
| | | |
| | | b.HasIndex("Sort"); |
| | | |
| | | b.HasIndex("SourceOrderNo"); |
| | | |
| | | b.HasIndex("SourcePlace"); |
| | | |
| | | b.HasIndex("TaskNo") |
| | | .IsUnique(); |
| | | |
| | | b.HasIndex("TaskStatus"); |
| | | |
| | | b.HasIndex("TaskType"); |
| | | |
| | | b.HasIndex("ToPlace"); |
| | | |
| | | b.ToTable("scms_wmstasks", (string)null); |
| | | |
| | | b.HasComment("ä»»å¡è¡¨"); |
| | | }); |
| | | #pragma warning restore 612, 618 |
| | | } |
| | | } |
| | |
| | | builder.ConfigureWmsMaterialInfo(); |
| | | builder.ConfigureWmsInOutStockRecord(); |
| | | builder.ConfigureWmsContainerPlace(); |
| | | builder.ConfigureWmsTask(); |
| | | /* Configure your own tables/entities inside here */ |
| | | |
| | | //builder.Entity<YourEntity>(b => |
| | |
| | | builder.ConfigureWmsMaterialInfo(); |
| | | builder.ConfigureWmsInOutStockRecord(); |
| | | builder.ConfigureWmsContainerPlace(); |
| | | builder.ConfigureWmsTask(); |
| | | |
| | | /* Configure your own tables/entities inside here */ |
| | | |
| | |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <Reference Include="CmsQueryExtensions"> |
| | | <HintPath>..\..\..\..\CommonDLL\CmsQueryExtensions.dll</HintPath> |
| | | </Reference> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <Resource Include="Flows\50001_1.pfd"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </Resource> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Ao.Lang; |
| | | using CMS.Extensions.Abp.AspNetCore.Mvc.Filters; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsInOutStockRecord; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Services; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using MiniExcelLibs; |
| | | using System.Reflection; |
| | | using Volo.Abp; |
| | | using Volo.Abp.Application.Dtos; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Controller |
| | | { |
| | | /// <summary> |
| | | /// åºå
¥åºè®°å½è¡¨æå¡ |
| | | /// </summary> |
| | | [ApiController] |
| | | [TypeFilter(typeof(CMSLanguageFilter))] |
| | | [TypeFilter(typeof(CMSUowActionFilter))] |
| | | [TypeFilter(typeof(CMSAuditActionFilter))] |
| | | [TypeFilter(typeof(CMSExceptionFilter))] |
| | | [Route("api/v{version:apiVersion}/HIAWms/[controller]")] |
| | | public class WmsInOutStockRecordController : ControllerBase |
| | | { |
| | | private readonly IWmsInOutStockRecordAppService _wmsInOutStockRecordAppService; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsInOutStockRecordController"/> class. |
| | | /// </summary> |
| | | /// <param name="wmsInOutStockRecordAppService">The wmsInOutStockRecord application service.</param> |
| | | public WmsInOutStockRecordController(IWmsInOutStockRecordAppService wmsInOutStockRecordAppService) |
| | | { |
| | | _wmsInOutStockRecordAppService = wmsInOutStockRecordAppService; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·ååºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [Route("{id}")] |
| | | public virtual Task<WmsInOutStockRecordDto> GetAsync(Guid id) |
| | | { |
| | | return _wmsInOutStockRecordAppService.GetAsync(id); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å页è·ååºå
¥åºè®°å½è¡¨çå表. |
| | | /// </summary> |
| | | /// <param name="input">è¾å
¥.</param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [Route("Page")] |
| | | public virtual Task<PagedResultDto<WmsInOutStockRecordDto>> GetListAsync([FromQuery] GetWmsInOutStockRecordInput input) |
| | | { |
| | | return _wmsInOutStockRecordAppService.GetListAsync(input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å建åºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="input">è¾å
¥.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpPost] |
| | | public virtual Task<WmsInOutStockRecordDto> CreateAsync(WmsInOutStockRecordCreateDto input) |
| | | { |
| | | return _wmsInOutStockRecordAppService.CreateAsync(input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ´æ°åºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <param name="input">è¾å
¥.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpPut] |
| | | [Route("{id}")] |
| | | public virtual Task<WmsInOutStockRecordDto> UpdateAsync(Guid id, WmsInOutStockRecordUpdateDto input) |
| | | { |
| | | return _wmsInOutStockRecordAppService.UpdateAsync(id, input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å
éåºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="ids">Idéå.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpPost] |
| | | [Route("Clone")] |
| | | public virtual Task<List<WmsInOutStockRecordDto>> CloneAsync([FromBody] IEnumerable<Guid> ids) |
| | | { |
| | | return _wmsInOutStockRecordAppService.CloneAsync(ids); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å é¤åºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpDelete] |
| | | [Route("{id}")] |
| | | public virtual Task DeleteAsync(Guid id) |
| | | { |
| | | return _wmsInOutStockRecordAppService.DeleteAsync(id); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¹éå é¤åºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="ids">The ids.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpDelete] |
| | | public virtual Task DeleteAsync([FromBody] IEnumerable<Guid> ids) |
| | | { |
| | | return _wmsInOutStockRecordAppService.DeleteManyAsync(ids); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è°æ´æåºåºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <returns></returns> |
| | | [HttpPut] |
| | | [Route("{id}/AdjustSort/{sort}")] |
| | | public virtual Task AdjustSortAsync(Guid id, int sort) |
| | | { |
| | | return _wmsInOutStockRecordAppService.AdjustSortAsync(id, sort); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 导å
¥åºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Authorize] |
| | | [HttpPost] |
| | | [Route("Import")] |
| | | public virtual async Task<IActionResult> ImportAsync(IFormFile file) |
| | | { |
| | | using var stream = new MemoryStream(); |
| | | await file.CopyToAsync(stream); |
| | | stream.Seek(0L, SeekOrigin.Begin); |
| | | |
| | | var sheetNames = stream.GetSheetNames(); |
| | | var wmsInOutStockRecordRows = sheetNames.Contains("é
ç½®") ? MiniExcel.Query<WmsInOutStockRecordsImportModel.WmsInOutStockRecordImportModel>(stream, sheetName: "é
ç½®").ToList() : new(); |
| | | |
| | | if (!wmsInOutStockRecordRows.Any()) |
| | | { |
| | | throw new UserFriendlyException("è¯·æ£æ¥å¯¼å
¥çè¡¨æ ¼"); |
| | | } |
| | | |
| | | await _wmsInOutStockRecordAppService.ImportAsync(new WmsInOutStockRecordsImportModel |
| | | { |
| | | WmsInOutStockRecords = wmsInOutStockRecordRows, |
| | | }); |
| | | |
| | | return Ok(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 导åºåºå
¥åºè®°å½è¡¨ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [Route("Export")] |
| | | public virtual async Task<IActionResult> ExportAsync([FromQuery] GetWmsInOutStockRecordInput input) |
| | | { |
| | | input.MaxResultCount = int.MaxValue; |
| | | var exportData = await _wmsInOutStockRecordAppService.ExportAsync(input); |
| | | var templatePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $"Resources/Templates/WmsInOutStockRecordå¯¼åºæ¨¡æ¿.xlsx"); |
| | | if (!System.IO.File.Exists(templatePath)) |
| | | { |
| | | templatePath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? string.Empty, $"Resources/Templates/WmsInOutStockRecordå¯¼åºæ¨¡æ¿.xlsx"); |
| | | } |
| | | |
| | | var memoryStream = new MemoryStream(); |
| | | await memoryStream.SaveAsByTemplateAsync(templatePath, exportData.Sheets); |
| | | memoryStream.Seek(0L, SeekOrigin.Begin); |
| | | return new FileStreamResult(memoryStream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") { FileDownloadName = $"{exportData.FileName}_{DateTime.Now:yyyyMMddhhmmss}.xlsx" }; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .informationDrawerPosition { |
| | | position: relative; |
| | | } |
| | | .informationDrawer { |
| | | background: linear-gradient(180deg, #dee4ff 0%, #ffffff 40%, #ffffff 100%); |
| | | box-shadow: 0px -4px 30px 1px rgba(0, 0, 0, 0.16); |
| | | |
| | | border-radius: 6px 6px 0px 0px; |
| | | opacity: 1; |
| | | border: 1px solid #f0f3fd; |
| | | |
| | | @keyframes iconFrames { |
| | | 0% { |
| | | opacity: 1; |
| | | } |
| | | 25% { |
| | | opacity: 0.66; |
| | | } |
| | | 50% { |
| | | opacity: 0.33; |
| | | } |
| | | 75% { |
| | | opacity: 0.66; |
| | | } |
| | | |
| | | 100% { |
| | | opacity: 1; |
| | | } |
| | | } |
| | | .iconPosition { |
| | | position: absolute; |
| | | top: 38px; |
| | | right: 111px; |
| | | user-select: none; |
| | | -webkit-user-drag: none; |
| | | animation: iconFrames 2s infinite linear; |
| | | } |
| | | :global(.cs-drawer__header) { |
| | | padding-top: 36px; |
| | | .cs-drawer__close-btn { |
| | | margin-top: -16px; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | > span { |
| | | font-size: 18px; |
| | | font-family: Source Han Sans CN, Source Han Sans CN; |
| | | font-weight: bold; |
| | | color: #464e54; |
| | | line-height: 0px; |
| | | } |
| | | } |
| | | :global(.cs-drawer__close-btn) { |
| | | margin-top: -16px; |
| | | font-size: 16px; |
| | | } |
| | | :global(.cs-drawer__body) { |
| | | padding: 30px; |
| | | padding-top: 13px; |
| | | } |
| | | } |
| | | |
| | | .modal { |
| | | width: var(--drawer-width); |
| | | left: calc(100% - var(--drawer-width)) !important; |
| | | } |
| | | |
| | | .csDialogFooter { |
| | | padding: 0 18px; |
| | | .csBaseBtn { |
| | | width: 98px; |
| | | height: 26px; |
| | | } |
| | | .dialogBtn { |
| | | background: #efeded; |
| | | color: #666666; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { computed, defineComponent, onMounted, ref } from 'vue' |
| | | import styles from './BaseQueryDrawer.module.scss' |
| | | import Icon from '../Icon/Icon' |
| | | //@ts-ignore |
| | | export default defineComponent<{ |
| | | [key: string]: any |
| | | }>({ |
| | | // @ts-ignore |
| | | name: 'BaseDrawer', |
| | | props: { |
| | | // é®ç½©æ¯å¦å¯ç¹å» |
| | | clickable: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | title: { |
| | | type: String, |
| | | default: '', |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '', |
| | | }, |
| | | // modelValue: { |
| | | // type: Boolean, |
| | | // default: false, |
| | | // }, |
| | | }, |
| | | emits: ['close','reset', 'confirmQueryForBase', 'update:modelValue', 'open', 'beforeClose'], |
| | | setup(props: any, { emit, slots, attrs }: any) { |
| | | // const size = computed(() => { |
| | | // if (attrs.size.includes('px')) { |
| | | // return attrs.size |
| | | // } |
| | | // }) |
| | | |
| | | // const model = computed(() => { |
| | | // if (attrs.model.includes('')) { |
| | | // return attrs.model |
| | | // } |
| | | // }) |
| | | |
| | | return () => { |
| | | return ( |
| | | <div |
| | | class={styles.drawContent} |
| | | //@ts-ignore |
| | | // style={props.clickable ? { '--drawer-width': size.value } : {}} |
| | | > |
| | | <el-drawer |
| | | // modal-class={props.clickable ? styles.modal : ''} |
| | | class={{ |
| | | [styles.informationDrawer]: true, |
| | | // [styles.informationDrawerPosition]: props.clickable, |
| | | }} |
| | | onOpen={() => emit('open')} |
| | | onClose={() => emit('close')} |
| | | v-slots={{ |
| | | footer() { |
| | | return ( |
| | | <div class={styles.csDialogFooter}> |
| | | <el-button |
| | | onClick={() => emit('close')} |
| | | type="info" |
| | | plain |
| | | class={{ |
| | | [styles.dialogBtn]: true, |
| | | [styles.csBaseBtn]: true, |
| | | }} |
| | | > |
| | | å
³é |
| | | </el-button> |
| | | <el-button |
| | | onClick={() => emit('reset')} |
| | | type="info" |
| | | plain |
| | | class={{ |
| | | [styles.dialogBtn]: true, |
| | | [styles.csBaseBtn]: true, |
| | | }} |
| | | > |
| | | éç½® |
| | | </el-button> |
| | | <el-button |
| | | onClick={() => emit('confirmQueryForBase')} |
| | | type="primary" |
| | | class={{ |
| | | [styles.csBaseBtn]: true, |
| | | }} |
| | | > |
| | | æ¥è¯¢ |
| | | </el-button> |
| | | </div> |
| | | ) |
| | | }, |
| | | }} |
| | | {...attrs} |
| | | title={props.title} |
| | | size={props.width || attrs.size} |
| | | > |
| | | <Icon |
| | | width={167} |
| | | height={54} |
| | | class={styles.iconPosition} |
| | | icon="drawer_bg" |
| | | /> |
| | | {slots.default?.()} |
| | | </el-drawer> |
| | | </div> |
| | | ) |
| | | } |
| | | }, |
| | | }) |
| | |
| | | "notPage": false |
| | | }, |
| | | { |
| | | "name": "åºå
¥åºè®°å½", |
| | | "path": "/information-base/WmsInOutStockRecord", |
| | | "patchName": "WmsInOutStockRecord", |
| | | "icon": "p", |
| | | "notPage": false |
| | | }, |
| | | { |
| | | "name": "Wmsæç管ç", |
| | | "path": "/information-base/WmsContainer", |
| | | "patchName": "WmsContainer", |
| | |
| | | "icon": "p", |
| | | "notPage": false |
| | | }, |
| | | "WmsInOutStockRecord": { |
| | | "name": "åºå
¥åºè®°å½", |
| | | "path": "/information-base/WmsInOutStockRecord", |
| | | "patchName": "WmsInOutStockRecord", |
| | | "icon": "p", |
| | | "notPage": false |
| | | }, |
| | | "WmsContainer": { |
| | | "name": "Wmsæç管ç", |
| | | "path": "/information-base/WmsContainer", |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { importFileToService, exportFileToClient } from '@/api/file' |
| | | import { ElMessage } from 'element-plus' |
| | | import { downloadFile } from '@/utils' |
| | | import dayjs from 'dayjs' |
| | | |
| | | export const useFile = () => { |
| | | /** |
| | | * 导å
¥æä»¶ |
| | | * @param url |
| | | */ |
| | | const importFile = async (url: string, file: File) => { |
| | | const formData = new FormData() |
| | | formData.append('file', file) |
| | | await importFileToService(url, formData) |
| | | ElMessage('导å
¥æå') |
| | | } |
| | | /** |
| | | * å¯¼åºæä»¶ |
| | | * @param url |
| | | */ |
| | | const exportFile = async (url: string, params: any, name: string) => { |
| | | const res = await exportFileToClient(url, params) |
| | | downloadFile(res, `${name}_${dayjs().format('YYYYMMDDHHMMss')}.xlsx`) |
| | | ElMessage.success('å¯¼åºæå') |
| | | } |
| | | |
| | | return { |
| | | importFile, |
| | | exportFile, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { ref, onMounted, reactive, Ref, nextTick, computed } from 'vue' |
| | | import { injectModel } from '@/libs/Provider/Provider' |
| | | import { WmsInOutStockRecord } from '../Models/WmsInOutStockRecord' |
| | | import { ElMessage } from 'element-plus' |
| | | import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox' |
| | | import { useFile } from './File' |
| | | |
| | | interface CurrentType { |
| | | row: any |
| | | index: number |
| | | } |
| | | export const useWmsInOutStockRecord = (props: any, ctx?: any) => { |
| | | const wmsInOutStockRecord = injectModel<WmsInOutStockRecord>('wmsInOutStockRecord') |
| | | const { exportFile } = useFile() |
| | | /** |
| | | * 头é¨é
ç½® |
| | | */ |
| | | const headers = ref({}) |
| | | /** |
| | | * 卿åé
ç½® |
| | | */ |
| | | const wmsInOutStockRecordColumns = ref<Record<string, any>>([]) |
| | | /** |
| | | * æç´¢å¼ |
| | | */ |
| | | const search = ref('') |
| | | |
| | | /** |
| | | * æåº |
| | | */ |
| | | const sort = ref(0) |
| | | /** |
| | | * 鿩项 |
| | | */ |
| | | const selection = ref([]) |
| | | /** |
| | | * å½åéä¸çè¡ |
| | | */ |
| | | const current = ref<any>(null) |
| | | /** |
| | | * æ°æ®æº |
| | | */ |
| | | const dataSource: Ref<any[]> = ref([]) |
| | | |
| | | /** |
| | | * è¡¨æ ¼ |
| | | */ |
| | | const tableRef = ref() |
| | | const dialogConfig = reactive({ |
| | | visible: false, |
| | | title: '', |
| | | isAdd: false, |
| | | }) |
| | | const dialogConfigForQuery = reactive({ |
| | | visible: false, |
| | | title: '', |
| | | isAdd: false, |
| | | }) |
| | | |
| | | |
| | | const dialogSettingConfig = reactive({ |
| | | visible: false, |
| | | title: '', |
| | | }) |
| | | |
| | | /** |
| | | * åé¡µæ°æ® |
| | | */ |
| | | const paginationParams = ref({}) |
| | | |
| | | /** |
| | | * æå¼è¯¦æ
|
| | | * @param row |
| | | */ |
| | | const openDetail = (row: any) => { |
| | | current.value = row |
| | | dialogConfig.visible = true |
| | | dialogConfig.title = row.name |
| | | dialogConfig.isAdd = false |
| | | sort.value = row.sort |
| | | } |
| | | |
| | | const contextMenu = [ |
| | | { |
| | | label: 'å±å¼è¯¦æ
', |
| | | fn: (c: CurrentType) => { |
| | | current.value = null |
| | | sort.value = c.row.sort |
| | | nextTick(() => openDetail(c.row)) |
| | | }, |
| | | divided: true, |
| | | icon: 'o', |
| | | }, |
| | | // { |
| | | // label: 'å䏿·»å ', |
| | | // fn: (c: CurrentType, pageNum: number) => { |
| | | // current.value = null |
| | | // sort.value = c.index + 1 + (pageNum - 1) * 50 |
| | | // dialogConfig.visible = true |
| | | // dialogConfig.title = 'æ·»å ' |
| | | // dialogConfig.isAdd = false |
| | | // }, |
| | | // divided: true, |
| | | // icon: 'up', |
| | | // }, |
| | | // { |
| | | // label: 'å䏿·»å ', |
| | | // fn: (c: CurrentType, pageNum: number) => { |
| | | // current.value = null |
| | | // sort.value = c.index + 2 + (pageNum - 1) * 50 |
| | | // dialogConfig.visible = true |
| | | // dialogConfig.title = 'æ·»å ' |
| | | // dialogConfig.isAdd = false |
| | | // }, |
| | | // divided: true, |
| | | // icon: 'down', |
| | | // }, |
| | | // { |
| | | // label: 'åå»ºå¯æ¬', |
| | | // fn: async ({ row }: CurrentType) => { |
| | | // await wmsInOutStockRecord.cloneData([row.id]) |
| | | // ElMessage.success('åå»ºå¯æ¬æå') |
| | | // tableRef.value?.getList() |
| | | // }, |
| | | // divided: true, |
| | | // icon: 'copy', |
| | | // }, |
| | | { |
| | | label: 'å é¤', |
| | | fn: async (c: CurrentType) => { |
| | | const names = selection.value.map((item: { name: string }) => item.name) |
| | | ConfirmBox( |
| | | `æ¯å¦å é¤${names.length ? names.join(',') : c.row.name}` |
| | | ).then(async () => { |
| | | const ids = selection.value.map((item: { id: string }) => item.id) |
| | | await wmsInOutStockRecord.deleteWmsInOutStockRecords(ids.length ? ids : [c.row.id]) |
| | | ElMessage.success('å 餿å') |
| | | tableRef.value.getList() |
| | | }) |
| | | }, |
| | | icon: 'close', |
| | | }, |
| | | ] |
| | | |
| | | const onCheck = (records: any) => { |
| | | selection.value = records |
| | | } |
| | | |
| | | const onAddWmsInOutStockRecord = () => { |
| | | const params = tableRef.value?.getPaginationParams() |
| | | current.value = null |
| | | dialogConfig.visible = true |
| | | dialogConfig.isAdd = true |
| | | dialogConfig.title = 'æ·»å ' |
| | | sort.value = params.totalCount + 1 |
| | | } |
| | | |
| | | //ç¹å»æé®ãé«çº§æ¥è¯¢ã |
| | | const onAdvancedQuery = () => { |
| | | const params = tableRef.value?.getPaginationParams() |
| | | current.value = null |
| | | dialogConfigForQuery.visible = true |
| | | dialogConfigForQuery.isAdd = true |
| | | dialogConfigForQuery.title = 'é«çº§æ¥è¯¢' |
| | | } |
| | | |
| | | const onConfirmWmsInOutStockRecord = async () => { |
| | | dialogConfig.visible = false |
| | | if (dialogConfig.isAdd) { |
| | | tableRef.value?.scrollToRow({ |
| | | skip: true, |
| | | }) |
| | | } else { |
| | | await tableRef.value?.getList() |
| | | } |
| | | } |
| | | /** |
| | | * è¡ç¹å»æ¶æ´æ°current |
| | | */ |
| | | const onRowClick = ({ row }: any) => { |
| | | if (dialogConfig.visible && current.value) { |
| | | current.value = row |
| | | } |
| | | } |
| | | /** |
| | | * å¯¼åº |
| | | */ |
| | | const onExport = (data={}) => { |
| | | //const params = tableRef.value?.getParams() |
| | | exportFile('/api/v1/hIAWms/wmsInOutStockRecord/export', data, 'hIAWms') |
| | | } |
| | | |
| | | /** |
| | | * å
³é®åæç´¢ |
| | | */ |
| | | const onSearch = () => { |
| | | tableRef.value?.getList({ |
| | | Filter: search.value, |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * éç½®è¡¨æ ¼æ°æ® |
| | | */ |
| | | const reloadList = () => { |
| | | tableRef.value?.getList() |
| | | } |
| | | /** |
| | | * ä¸ä¼ æå |
| | | */ |
| | | const onSuccess = () => { |
| | | tableRef.value?.getList() |
| | | ElMessage.success('导å
¥æå') |
| | | } |
| | | /** |
| | | * 失败 |
| | | * @param err |
| | | */ |
| | | const onError = (err: any) => { |
| | | try { |
| | | const message = JSON.parse(err.message) |
| | | ElMessage.error(message.msg) |
| | | } catch (error) { |
| | | ElMessage.error('导å
¥å¤±è´¥') |
| | | } |
| | | } |
| | | /** |
| | | * ä¸ä¼ é©å |
| | | */ |
| | | const onBeforeUpload = (file: File) => { |
| | | const format = ['xlsx', 'xls', 'csv'] |
| | | if (!format.includes(file.name.split('.')[1])) { |
| | | ElMessage.error('导å
¥æä»¶æ ¼å¼ä¸æ£ç¡®ï¼è¯·å¯¼å
¥.xlsx/.xlsä¸.csvæ ¼å¼çæä»¶') |
| | | return false |
| | | } |
| | | return true |
| | | } |
| | | |
| | | onMounted(() => { |
| | | headers.value = { |
| | | Authorization: `Bearer ${sessionStorage.getItem('Token')}`, |
| | | 'X-Project': sessionStorage.getItem('X-Project'), |
| | | } |
| | | }) |
| | | |
| | | ctx.expose({ |
| | | reloadList, |
| | | }) |
| | | |
| | | return { |
| | | dataSource, |
| | | contextMenu, |
| | | dialogConfig, |
| | | dialogConfigForQuery, |
| | | dialogSettingConfig, |
| | | tableRef, |
| | | current, |
| | | search, |
| | | sort, |
| | | wmsInOutStockRecordColumns, |
| | | paginationParams, |
| | | headers, |
| | | onBeforeUpload, |
| | | onError, |
| | | onSuccess, |
| | | openDetail, |
| | | onSearch, |
| | | onExport, |
| | | onRowClick, |
| | | onConfirmWmsInOutStockRecord, |
| | | onCheck, |
| | | onAddWmsInOutStockRecord, |
| | | onAdvancedQuery |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { |
| | | ref, |
| | | onMounted, |
| | | reactive, |
| | | computed, |
| | | Ref, |
| | | watch, |
| | | SetupContext, |
| | | h, |
| | | } from 'vue' |
| | | import { injectModel } from '@/libs/Provider/Provider' |
| | | import { WmsInOutStockRecordDrawer } from '../Models/WmsInOutStockRecordDrawer' |
| | | import { ElMessage } from 'element-plus' |
| | | import isEqual from 'lodash/isEqual' |
| | | import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox' |
| | | import { cloneDeep } from 'lodash' |
| | | |
| | | export const useWmsInOutStockRecordDrawer = (props: any, ctx?: any) => { |
| | | const wmsInOutStockRecordDrawer = injectModel<WmsInOutStockRecordDrawer>('wmsInOutStockRecordDrawer') |
| | | /** |
| | | * ç¨æ¥å¯¹æ¯çåå§åæ°æ® |
| | | */ |
| | | const initiateData: Ref<Record<string, any>> = ref({}) |
| | | const formData = ref<Record<string, any>>({}) |
| | | // ref |
| | | const formRef = ref() |
| | | |
| | | const disabled = ref(false) |
| | | |
| | | const current = computed(() => { |
| | | return props.row || null |
| | | }) |
| | | |
| | | const inputNumber = (attrs) => { |
| | | return ( |
| | | <el-input-number |
| | | min="1" |
| | | step="1" |
| | | precision="0" |
| | | {...attrs} |
| | | ></el-input-number> |
| | | ) |
| | | } |
| | | |
| | | const visible = computed({ |
| | | get() { |
| | | return props.modelValue |
| | | }, |
| | | set(val) { |
| | | ctx.emit('update:modelValue', val) |
| | | }, |
| | | }) |
| | | /** |
| | | * æ·»å çformåæ®µ |
| | | */ |
| | | const formItems = reactive([ |
| | | { |
| | | label: 'åæ®ç¼å·', |
| | | prop: 'orderNo', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥åæ®ç¼å·', |
| | | rules: [{required: true, message: 'åæ®ç¼å·ä¸è½ä¸ºç©º', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: 'ç©æåç§°', |
| | | prop: 'materialName', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ç©æåç§°', |
| | | }, |
| | | { |
| | | label: 'ç©æä»¶å·', |
| | | prop: 'materialNo', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ç©æä»¶å·', |
| | | rules: [{required: true, message: 'ç©æä»¶å·ä¸è½ä¸ºç©º', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: 'æä½ç±»å', |
| | | prop: 'stockType', |
| | | el: 'select', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æä½ç±»å', |
| | | rules: [{required: true, message: 'æä½ç±»åä¸è½ä¸ºç©º', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '容å¨ç¼å·', |
| | | prop: 'containerNo', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å®¹å¨ç¼å·', |
| | | }, |
| | | { |
| | | label: 'æºå', |
| | | prop: 'materialModel', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æºå', |
| | | }, |
| | | { |
| | | label: 'æä½æ¶é´', |
| | | prop: 'operateTime', |
| | | type: 'datetimerange', |
| | | el: 'date-picker', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æä½æ¶é´', |
| | | }, |
| | | { |
| | | label: '夿³¨', |
| | | prop: 'remark', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å¤æ³¨', |
| | | }, |
| | | { |
| | | label: 'ç©æID', |
| | | prop: 'materialId', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ç©æID', |
| | | rules: [{required: true, message: 'ç©æIDä¸è½ä¸ºç©º', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: 'ä»»å¡å·', |
| | | prop: 'taskNo', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ä»»å¡å·', |
| | | rules: [{required: true, message: 'ä»»å¡å·ä¸è½ä¸ºç©º', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: 'èµ·å§åºä½', |
| | | prop: 'sourcePlace', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥èµ·å§åºä½', |
| | | }, |
| | | { |
| | | label: 'ç®æ åºä½', |
| | | prop: 'toPlace', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ç®æ åºä½', |
| | | }, |
| | | ]) |
| | | /** |
| | | * æ ¡éªæ¯å¦ææ°æ®åå |
| | | */ |
| | | const checkIsEqualObject = () => { |
| | | const data = { |
| | | formData: formData.value, |
| | | } |
| | | const check = isEqual(initiateData.value, data) |
| | | return check |
| | | } |
| | | |
| | | const onClose = (done: () => void) => { |
| | | if (visible.value) { |
| | | if (checkIsEqualObject()) { |
| | | visible.value = false |
| | | done && done() |
| | | } else { |
| | | ConfirmBox('æ¯å¦ä¿å设置ï¼') |
| | | .then(() => { |
| | | onConfirm() |
| | | }) |
| | | .catch(() => { |
| | | visible.value = false |
| | | done && done() |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | /** |
| | | * ä¿å |
| | | */ |
| | | const onConfirm = async () => { |
| | | await formRef.value?.validate() |
| | | const data = { |
| | | orderNo: formData.value.orderNo, |
| | | materialName: formData.value.materialName, |
| | | materialNo: formData.value.materialNo, |
| | | stockType: formData.value.stockType, |
| | | containerNo: formData.value.containerNo, |
| | | materialModel: formData.value.materialModel, |
| | | operateTime: formData.value.operateTime, |
| | | remark: formData.value.remark, |
| | | materialId: formData.value.materialId, |
| | | taskNo: formData.value.taskNo, |
| | | sourcePlace: formData.value.sourcePlace, |
| | | toPlace: formData.value.toPlace, |
| | | } |
| | | if (!current.value) { |
| | | await wmsInOutStockRecordDrawer.addWmsInOutStockRecord(data) |
| | | } else { |
| | | const id = current.value.id |
| | | await wmsInOutStockRecordDrawer.updateWmsInOutStockRecord(id, data) |
| | | } |
| | | ElMessage.success('ä¿åæå') |
| | | ctx.emit('confirm') |
| | | } |
| | | |
| | | const updateCheckData = () => { |
| | | initiateData.value = { |
| | | formData: { |
| | | ...formData.value, |
| | | }, |
| | | } |
| | | } |
| | | const updateFormItemOptions = (propName: string, enumData: any[]) => { |
| | | const item = formItems.find((item) => item.prop === propName) |
| | | if (item && enumData) { |
| | | item.options = enumData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | | } |
| | | } |
| | | /** |
| | | * éç¨æ¥è¯¢æä¸¾ |
| | | */ |
| | | const commonQueryEnumForFrom = async () => { |
| | | const stockTypeEnumEnum = await wmsInOutStockRecordDrawer.getWmsEnumData({ |
| | | EnumName: 'StockTypeEnum', |
| | | }) |
| | | updateFormItemOptions('stockType', stockTypeEnumEnum) |
| | | |
| | | } |
| | | commonQueryEnumForFrom() |
| | | /** |
| | | * å¼¹çªæå¼è·å详æ
|
| | | */ |
| | | const onOpen = async () => { |
| | | if (current.value) { |
| | | const res = await wmsInOutStockRecordDrawer.getWmsInOutStockRecordDetail(current.value) |
| | | |
| | | formData.value = { |
| | | orderNo: res.orderNo, |
| | | materialName: res.materialName, |
| | | materialNo: res.materialNo, |
| | | stockType: res.stockType, |
| | | containerNo: res.containerNo, |
| | | materialModel: res.materialModel, |
| | | operateTime: res.operateTime, |
| | | remark: res.remark, |
| | | materialId: res.materialId, |
| | | taskNo: res.taskNo, |
| | | sourcePlace: res.sourcePlace, |
| | | toPlace: res.toPlace, |
| | | id: res.id, |
| | | } |
| | | disabled.value = true |
| | | updateCheckData() |
| | | } else { |
| | | formData.value = {} |
| | | |
| | | disabled.value = false |
| | | updateCheckData() |
| | | } |
| | | } |
| | | |
| | | watch(() => current.value, onOpen) |
| | | |
| | | return { |
| | | formItems, |
| | | formData, |
| | | visible, |
| | | formRef, |
| | | onOpen, |
| | | onClose, |
| | | onConfirm, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { |
| | | ref, |
| | | onMounted, |
| | | reactive, |
| | | computed, |
| | | Ref, |
| | | watch, |
| | | SetupContext, |
| | | h, |
| | | } from 'vue' |
| | | import { injectModel } from '@/libs/Provider/Provider' |
| | | import { WmsInOutStockRecordDrawer } from '../Models/WmsInOutStockRecordDrawer' |
| | | import { ElMessage } from 'element-plus' |
| | | import isEqual from 'lodash/isEqual' |
| | | import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox' |
| | | import { cloneDeep } from 'lodash' |
| | | |
| | | export const useWmsInOutStockRecordQueryDrawer = (props: any, ctx?: any) => { |
| | | const wmsInOutStockRecordDrawer = injectModel<WmsInOutStockRecordDrawer>('WmsInOutStockRecordDrawer') |
| | | /** |
| | | * ç¨æ¥å¯¹æ¯çåå§åæ°æ® |
| | | */ |
| | | const initiateData: Ref<Record<string, any>> = ref({}) |
| | | const formData = ref<Record<string, any>>({}) |
| | | // ref |
| | | const formRef = ref() |
| | | |
| | | const disabled = ref(false) |
| | | |
| | | const current = computed(() => { |
| | | return props.row || null |
| | | }) |
| | | |
| | | const inputNumber = (attrs) => { |
| | | return ( |
| | | <el-input-number |
| | | min="1" |
| | | step="1" |
| | | precision="0" |
| | | {...attrs} |
| | | ></el-input-number> |
| | | ) |
| | | } |
| | | |
| | | |
| | | const visible = computed({ |
| | | get() { |
| | | return props.modelValue |
| | | }, |
| | | set(val) { |
| | | ctx.emit('update:modelValue', val) |
| | | }, |
| | | }) |
| | | /** |
| | | * æ·»å çformåæ®µ |
| | | */ |
| | | const formItems = reactive([ |
| | | { |
| | | label: 'åæ®ç¼å·', |
| | | prop: 'orderNo', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥åæ®ç¼å·', |
| | | }, |
| | | { |
| | | label: 'ç©æåç§°', |
| | | prop: 'materialName', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ç©æåç§°', |
| | | }, |
| | | { |
| | | label: 'ç©æä»¶å·', |
| | | prop: 'materialNo', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ç©æä»¶å·', |
| | | }, |
| | | { |
| | | label: 'æä½ç±»å', |
| | | prop: 'stockType', |
| | | el: 'select', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æä½ç±»å', |
| | | }, |
| | | { |
| | | label: '容å¨ç¼å·', |
| | | prop: 'containerNo', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å®¹å¨ç¼å·', |
| | | }, |
| | | { |
| | | label: 'æºå', |
| | | prop: 'materialModel', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æºå', |
| | | }, |
| | | { |
| | | label: 'æä½æ¶é´', |
| | | prop: 'operateTime', |
| | | type: 'datetimerange', |
| | | el: 'date-picker', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æä½æ¶é´', |
| | | }, |
| | | { |
| | | label: '夿³¨', |
| | | prop: 'remark', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å¤æ³¨', |
| | | }, |
| | | { |
| | | label: 'ç©æID', |
| | | prop: 'materialId', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ç©æID', |
| | | }, |
| | | { |
| | | label: 'ä»»å¡å·', |
| | | prop: 'taskNo', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ä»»å¡å·', |
| | | }, |
| | | { |
| | | label: 'èµ·å§åºä½', |
| | | prop: 'sourcePlace', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥èµ·å§åºä½', |
| | | }, |
| | | { |
| | | label: 'ç®æ åºä½', |
| | | prop: 'toPlace', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ç®æ åºä½', |
| | | }, |
| | | ]) |
| | | /** |
| | | * æ ¡éªæ¯å¦ææ°æ®åå |
| | | */ |
| | | const checkIsEqualObject = () => { |
| | | const data = { |
| | | formData: formData.value, |
| | | } |
| | | const check = isEqual(initiateData.value, data) |
| | | return check |
| | | } |
| | | const commonGetFormData=()=>{ |
| | | const data = { |
| | | OrderNo: formData.value.OrderNo, |
| | | MaterialName: formData.value.MaterialName, |
| | | MaterialNo: formData.value.MaterialNo, |
| | | StockType: formData.value.StockType, |
| | | ContainerNo: formData.value.ContainerNo, |
| | | MaterialModel: formData.value.MaterialModel, |
| | | OperateTime: formData.value.OperateTime, |
| | | Remark: formData.value.Remark, |
| | | MaterialId: formData.value.MaterialId, |
| | | TaskNo: formData.value.TaskNo, |
| | | SourcePlace: formData.value.SourcePlace, |
| | | ToPlace: formData.value.ToPlace, |
| | | materialCode: formData.value.materialCode, |
| | | materialName: formData.value.materialName, |
| | | purchaseType: formData.value.purchaseType, |
| | | materialType: formData.value.materialType, |
| | | primaryUnit: formData.value.primaryUnit, |
| | | standard: formData.value.standard, |
| | | outerDiameter: formData.value.outerDiameter, |
| | | wallThickness: formData.value.wallThickness, |
| | | materialQuality: formData.value.materialQuality, |
| | | length: formData.value.length, |
| | | isMainBranch: formData.value.isMainBranch, |
| | | factory: formData.value.factory, |
| | | certification: formData.value.certification, |
| | | remark: formData.value.remark, |
| | | } |
| | | return data; |
| | | } |
| | | const onClose = (done: () => void) => { |
| | | if (visible.value) { |
| | | visible.value = false |
| | | const data =commonGetFormData(); |
| | | ctx.emit('close', data) |
| | | } |
| | | } |
| | | /** |
| | | * 确认æ¥è¯¢ |
| | | */ |
| | | const onConfirmQuery = async () => { |
| | | const data =commonGetFormData(); |
| | | ctx.emit('confirmQuery', data) |
| | | } |
| | | /** |
| | | * éç½®æ¥è¯¢ |
| | | */ |
| | | const onReset = async () => { |
| | | formData.value = {} |
| | | formData.value.OrderNo = '' |
| | | formData.value.MaterialName = '' |
| | | formData.value.MaterialNo = '' |
| | | formData.value.StockType = '' |
| | | formData.value.ContainerNo = '' |
| | | formData.value.MaterialModel = '' |
| | | formData.value.OperateTime = '' |
| | | formData.value.Remark = '' |
| | | formData.value.MaterialId = '' |
| | | formData.value.TaskNo = '' |
| | | formData.value.SourcePlace = '' |
| | | formData.value.ToPlace = '' |
| | | formData.value.materialCode = '' |
| | | formData.value.materialName = '' |
| | | formData.value.purchaseType = '' |
| | | formData.value.materialType = '' |
| | | formData.value.primaryUnit = '' |
| | | formData.value.standard = '' |
| | | formData.value.outerDiameter = '' |
| | | formData.value.wallThickness = '' |
| | | formData.value.materialQuality = '' |
| | | formData.value.length = '' |
| | | formData.value.isMainBranch = '' |
| | | formData.value.factory = '' |
| | | formData.value.certification = '' |
| | | formData.value.remark = '' |
| | | //åç¶ç»ä»¶åéèªå®ä¹äºä»¶ |
| | | ctx.emit('restQuery'); |
| | | } |
| | | |
| | | const updateCheckData = () => { |
| | | initiateData.value = { |
| | | formData: { |
| | | ...formData.value, |
| | | }, |
| | | } |
| | | } |
| | | const updateFormItemOptions = (propName: string, enumData: any[]) => { |
| | | const item = formItems.find((item) => item.prop === propName) |
| | | if (item && enumData) { |
| | | item.options = enumData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | | } |
| | | } |
| | | /** |
| | | * éç¨æ¥è¯¢æä¸¾ |
| | | */ |
| | | const commonQueryEnumForFrom = async () => { |
| | | const stockTypeEnumEnum = await wmsInOutStockRecordDrawer.getWmsEnumData({ |
| | | EnumName: 'StockTypeEnum', |
| | | }) |
| | | updateFormItemOptions('stockType', stockTypeEnumEnum) |
| | | |
| | | } |
| | | commonQueryEnumForFrom() |
| | | /** |
| | | * å¼¹çªæå¼è·å详æ
|
| | | */ |
| | | const onOpen = async () => { |
| | | disabled.value = false |
| | | updateCheckData() |
| | | } |
| | | |
| | | watch(() => current.value, onOpen) |
| | | |
| | | return { |
| | | formItems, |
| | | formData, |
| | | visible, |
| | | formRef, |
| | | onOpen, |
| | | onClose, |
| | | onConfirmQuery, |
| | | onReset, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | const request = Base.request |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @returns |
| | | */ |
| | | export const addWmsInOutStockRecord = (data: any) => { |
| | | return request.post('/api/v1/HIAWms/wmsInOutStockRecord', data) |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * @returns |
| | | */ |
| | | export const deleteWmsInOutStockRecord = (ids: string[]) => { |
| | | return request({ |
| | | data: ids, |
| | | url: '/api/v1/HIAWms/wmsInOutStockRecord', |
| | | method: 'delete', |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * å
é |
| | | * @returns |
| | | */ |
| | | export const cloneData = (data: any) => { |
| | | return request.post('/api/v1/HIAWms/wmsInOutStockRecord/clone', data) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | const request = Base.request |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @returns |
| | | */ |
| | | export const addWmsInOutStockRecord = (data: any) => { |
| | | return request.post('/api/v1/HIAWms/wmsInOutStockRecord', data) |
| | | } |
| | | |
| | | /** |
| | | * è·å详æ
|
| | | * @returns |
| | | */ |
| | | export const getWmsInOutStockRecord = (id: string) => { |
| | | return request.get(`/api/v1/HIAWms/wmsInOutStockRecord/${id}`) |
| | | } |
| | | |
| | | /** |
| | | * æ´æ° |
| | | * @returns |
| | | */ |
| | | export const updateWmsInOutStockRecord = (id: string, data: Record<string, any>) => { |
| | | return request.put(`/api/v1/HIAWms/wmsInOutStockRecord/${id}`, data) |
| | | } |
| | | |
| | | /** |
| | | * è·åæä¸¾ |
| | | * @returns |
| | | */ |
| | | export const getWmsEnumData = (data: any) => { |
| | | return request.post('/api/v1/HIAWms/WmsEnum', data) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | const request = Base.request |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @returns |
| | | */ |
| | | export const addWmsInOutStockRecord = (data: any) => { |
| | | return request.post('/api/v1/HIAWms/wmsInOutStockRecord', data) |
| | | } |
| | | |
| | | /** |
| | | * è·å详æ
|
| | | * @returns |
| | | */ |
| | | export const getWmsInOutStockRecord = (id: string) => { |
| | | return request.get(`/api/v1/HIAWms/wmsInOutStockRecord/${id}`) |
| | | } |
| | | |
| | | /** |
| | | * æ´æ° |
| | | * @returns |
| | | */ |
| | | export const updateWmsInOutStockRecord = (id: string, data: Record<string, any>) => { |
| | | return request.put(`/api/v1/HIAWms/wmsInOutStockRecord/${id}`, data) |
| | | } |
| | | |
| | | /** |
| | | * è·åæä¸¾ |
| | | * @returns |
| | | */ |
| | | export const getWmsEnumData = (data: any) => { |
| | | return request.post('/api/v1/HIAWms/WmsEnum', data) |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | import { |
| | | deleteWmsInOutStockRecord, |
| | | addWmsInOutStockRecord, |
| | | cloneData, |
| | | } from './Service/WmsInOutStockRecord' |
| | | |
| | | export class WmsInOutStockRecord extends Base<{ [key: string]: any }> { |
| | | constructor() { |
| | | super({ |
| | | data: [], |
| | | }) |
| | | } |
| | | onMounted() {} |
| | | /** |
| | | * å é¤ |
| | | * @param id |
| | | * @returns |
| | | */ |
| | | async deleteWmsInOutStockRecords(ids: string[]) { |
| | | return deleteWmsInOutStockRecord(ids) |
| | | } |
| | | |
| | | /** |
| | | * æ·»å æ°æ® |
| | | * @param data |
| | | * @returns |
| | | */ |
| | | addWmsInOutStockRecord(data: Record<string, any>) { |
| | | return addWmsInOutStockRecord(data) |
| | | } |
| | | |
| | | /** |
| | | * å
é |
| | | * @param ids |
| | | * @returns |
| | | */ |
| | | cloneData(ids: string[]) { |
| | | return cloneData(ids) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | import { |
| | | addWmsInOutStockRecord, |
| | | getWmsInOutStockRecord, |
| | | updateWmsInOutStockRecord, |
| | | getWmsEnumData, |
| | | } from './Service/WmsInOutStockRecordDrawer' |
| | | import { useGlobalState } from '@/libs/Store/Store' |
| | | |
| | | export class WmsInOutStockRecordDrawer extends Base<{ [key: string]: any }> { |
| | | constructor() { |
| | | super({ |
| | | data: [], |
| | | wmsMaterial: {}, |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @param data |
| | | */ |
| | | async addWmsInOutStockRecord(data: Record<string, any>) { |
| | | return addWmsInOutStockRecord(data) |
| | | } |
| | | /** |
| | | * æ´æ° |
| | | * @param data |
| | | */ |
| | | async updateWmsInOutStockRecord(id: string, data: Record<string, any>) { |
| | | return updateWmsInOutStockRecord(id, data) |
| | | } |
| | | |
| | | /** |
| | | * è·å详æ
|
| | | */ |
| | | async getWmsInOutStockRecordDetail(current: any, id?: string) { |
| | | return getWmsInOutStockRecord(id || current?.id) |
| | | } |
| | | |
| | | // è·åæä¸¾å¼ |
| | | async getWmsEnumData(data: Record<string, any>) { |
| | | return getWmsEnumData(data) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | import { |
| | | addWmsInOutStockRecord, |
| | | getWmsInOutStockRecord, |
| | | updateWmsInOutStockRecord, |
| | | getWmsEnumData, |
| | | } from './Service/WmsInOutStockRecordQueryDrawer' |
| | | import { useGlobalState } from '@/libs/Store/Store' |
| | | |
| | | export class WmsInOutStockRecordQueryDrawer extends Base<{ [key: string]: any }> { |
| | | constructor() { |
| | | super({ |
| | | data: [], |
| | | wmsMaterial: {}, |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @param data |
| | | */ |
| | | async addWmsInOutStockRecord(data: Record<string, any>) { |
| | | return addWmsInOutStockRecord(data) |
| | | } |
| | | /** |
| | | * æ´æ° |
| | | * @param data |
| | | */ |
| | | async updateWmsInOutStockRecord(id: string, data: Record<string, any>) { |
| | | return updateWmsInOutStockRecord(id, data) |
| | | } |
| | | |
| | | /** |
| | | * è·å详æ
|
| | | */ |
| | | async getWmsInOutStockRecordDetail(current: any, id?: string) { |
| | | return getWmsInOutStockRecord(id || current?.id) |
| | | } |
| | | |
| | | // è·åæä¸¾å¼ |
| | | async getWmsEnumData(data: Record<string, any>) { |
| | | return getWmsEnumData(data) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .drawer { |
| | | width: 800px; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { SetupContext, defineComponent } from 'vue' |
| | | import BaseDrawer from '@/components/BaseDrawer/BaseDrawer' |
| | | import styles from './WmsInOutStockRecordDrawer.module.scss' |
| | | import { useWmsInOutStockRecordDrawer } from '../../../../Controllers/WmsInOutStockRecordDrawer.tsx' |
| | | import DyForm from '@/components/DyForm/DyForm' |
| | | |
| | | // @ts-ignore |
| | | export default defineComponent<{ |
| | | [key: string]: any |
| | | }>({ |
| | | name: 'å¼¹çª', |
| | | props: { |
| | | modelValue: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | title: { |
| | | type: String, |
| | | default: '', |
| | | }, |
| | | row: { |
| | | type: Object, |
| | | }, |
| | | sort: { |
| | | type: Number, |
| | | default: 0, |
| | | }, |
| | | }, |
| | | emits: ['update:modelValue', 'close', 'submit', 'confirm'], |
| | | setup(props: Record<string, any>, ctx: SetupContext) { |
| | | const { |
| | | onClose, |
| | | onConfirm, |
| | | onOpen, |
| | | formRef, |
| | | visible, |
| | | formItems, |
| | | formData, |
| | | } = useWmsInOutStockRecordDrawer(props, ctx) |
| | | return () => ( |
| | | <BaseDrawer |
| | | class={styles.drawer} |
| | | size="800px" |
| | | title={props.title || 'æ·»å '} |
| | | v-model={visible.value} |
| | | close-on-click-modal={true} |
| | | onConfirm={onConfirm} |
| | | onOpen={onOpen} |
| | | before-close={onClose} |
| | | onClose={onClose} |
| | | > |
| | | <DyForm |
| | | ref={formRef} |
| | | formData={formData.value} |
| | | labelWidth="106px" |
| | | formItemProps={formItems} |
| | | ></DyForm> |
| | | </BaseDrawer> |
| | | ) |
| | | }, |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .drawer { |
| | | width: 800px; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * ç©æåºç¡ä¿¡æ¯æ¥è¯¢å¼¹åºæ¡ |
| | | */ |
| | | import { SetupContext, defineComponent } from 'vue' |
| | | import BaseQueryDrawer from '@/components/BaseQueryDrawer/BaseQueryDrawer' |
| | | import styles from './WmsInOutStockRecordQueryDrawer.module.scss' |
| | | import { useWmsInOutStockRecordQueryDrawer } from '../../../../Controllers/WmsInOutStockRecordQueryDrawer.tsx' |
| | | import DyForm from '@/components/DyForm/DyForm' |
| | | |
| | | // @ts-ignore |
| | | export default defineComponent<{ |
| | | [key: string]: any |
| | | }>({ |
| | | name: 'å¼¹çª', |
| | | props: { |
| | | //æä¸¾ç±»ååå
¸ |
| | | enumListDict:{ |
| | | type: Array as () => Array<{ key: string; value: object }>, // å®ä¹æ°ç»å
ç´ ç±»å |
| | | default: () => [] // é»è®¤å¼ |
| | | }, |
| | | modelValue: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | title: { |
| | | type: String, |
| | | default: '', |
| | | }, |
| | | row: { |
| | | type: Object, |
| | | }, |
| | | sort: { |
| | | type: Number, |
| | | default: 0, |
| | | }, |
| | | }, |
| | | emits: ['update:modelValue', 'close', 'submit', 'confirmquery1'], |
| | | setup(props: Record<string, any>, ctx: SetupContext) { |
| | | const { |
| | | onClose, |
| | | onConfirmQuery, |
| | | onOpen, |
| | | onReset, |
| | | formRef, |
| | | visible, |
| | | formItems, |
| | | formData, |
| | | } = useWmsInOutStockRecordQueryDrawer(props, ctx) |
| | | return () => ( |
| | | <BaseQueryDrawer |
| | | class={styles.drawer} |
| | | size="800px" |
| | | title={props.title || 'é«çº§æ¥è¯¢'} |
| | | v-model={visible.value} |
| | | close-on-click-modal={true} |
| | | onReset={onReset} |
| | | onConfirmQueryForBase={onConfirmQuery} |
| | | onOpen={onOpen} |
| | | before-close={onClose} |
| | | onClose={onClose} |
| | | > |
| | | <DyForm |
| | | ref={formRef} |
| | | formData={formData.value} |
| | | labelWidth="106px" |
| | | formItemProps={formItems} |
| | | ></DyForm> |
| | | </BaseQueryDrawer> |
| | | ) |
| | | }, |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export const columns = [ |
| | | { |
| | | type: 'seq', |
| | | width: 60, |
| | | title: 'åºå·', |
| | | }, |
| | | { |
| | | field: 'orderNo', |
| | | title: 'åæ®ç¼å·', |
| | | }, |
| | | { |
| | | field: 'materialName', |
| | | title: 'ç©æåç§°', |
| | | }, |
| | | { |
| | | field: 'materialNo', |
| | | title: 'ç©æä»¶å·', |
| | | }, |
| | | { |
| | | field: 'stockTypeDesc', |
| | | title: 'æä½ç±»å', |
| | | }, |
| | | { |
| | | field: 'containerNo', |
| | | title: '容å¨ç¼å·', |
| | | }, |
| | | { |
| | | field: 'materialModel', |
| | | title: 'æºå', |
| | | }, |
| | | { |
| | | field: 'operateTime', |
| | | title: 'æä½æ¶é´', |
| | | }, |
| | | { |
| | | field: 'remark', |
| | | title: '夿³¨', |
| | | }, |
| | | { |
| | | field: 'materialId', |
| | | title: 'ç©æID', |
| | | }, |
| | | { |
| | | field: 'taskNo', |
| | | title: 'ä»»å¡å·', |
| | | }, |
| | | { |
| | | field: 'sourcePlace', |
| | | title: 'èµ·å§åºä½', |
| | | }, |
| | | { |
| | | field: 'toPlace', |
| | | title: 'ç®æ åºä½', |
| | | }, |
| | | { |
| | | field: 'creationTime', |
| | | title: '', |
| | | }, |
| | | { |
| | | field: 'deletionTime', |
| | | title: '', |
| | | }, |
| | | ] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .wmsInOutStockRecordContent { |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | .wmsInOutStockRecordList { |
| | | width: 100%; |
| | | height: calc(100% - 70px); |
| | | } |
| | | .headerContent { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | height: 43px; |
| | | } |
| | | .header { |
| | | margin-bottom: 12px; |
| | | display: flex; |
| | | justify-content: flex-start; |
| | | align-items: center; |
| | | } |
| | | } |
| | | |
| | | .tagBox { |
| | | width: auto; |
| | | min-width: 80px; |
| | | height: 24px; |
| | | background: #ffffff; |
| | | border-radius: 19px 19px 19px 19px; |
| | | opacity: 1; |
| | | border: 1px dashed #bcc4cc; |
| | | width: 50px; |
| | | height: 20px; |
| | | font-size: 14px; |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: 400; |
| | | color: #5a84ff; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | // cursor: pointer; |
| | | } |
| | | |
| | | .group { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .groupTable { |
| | | width: 100%; |
| | | } |
| | | |
| | | .overBox { |
| | | width: 100%; |
| | | height: calc(100% - 20px); |
| | | overflow: auto; |
| | | :global(.cs-collapse-item__header) { |
| | | background-color: #f1f1f1; |
| | | padding: 0 20px; |
| | | height: 35px; |
| | | font-size: 16px; |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: 500; |
| | | } |
| | | :global(.cs-collapse-item__content) { |
| | | padding-bottom: 0px; |
| | | } |
| | | } |
| | | .groupHeader { |
| | | width: 100%; |
| | | height: 30px; |
| | | background: #ccc; |
| | | } |
| | | |
| | | .hideBlock { |
| | | display: none; |
| | | } |
| | | .queryForm { |
| | | padding: 10px; |
| | | background: #f5f7fa; |
| | | margin-bottom: 0px; |
| | | border-radius: 4px; |
| | | |
| | | .el-form-item { |
| | | margin-right: 20px; |
| | | margin-bottom: 0; |
| | | |
| | | // ç»ä¸è¾å
¥æ¡åéæ©æ¡ç宽度 |
| | | .el-input, .el-select { |
| | | width: 200px; // 设置ç»ä¸ç宽度 |
| | | } |
| | | |
| | | // éæ©æ¡å
é¨è¾å
¥æ¡æ ·å¼ |
| | | .el-select .el-input__wrapper { |
| | | height: 32px; // ä¸è¾å
¥æ¡é«åº¦ä¸è´ |
| | | padding: 1px 11px; // ä¸è¾å
¥æ¡å
è¾¹è·ä¸è´ |
| | | } |
| | | |
| | | // æ¥æéæ©å¨å®½åº¦ |
| | | .el-date-editor { |
| | | width: 220px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 妿éè¦æ´ç²¾ç¡®çæ§å¶ï¼å¯ä»¥åç¬è®¾ç½® |
| | | .formItem { |
| | | width: 200px; |
| | | |
| | | &.el-input, &.el-select { |
| | | width: 100%; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { computed, defineComponent, onMounted, reactive, ref } from 'vue' |
| | | import type { Ref } from 'vue' |
| | | import BaseTable from '@/components/Table/Table' |
| | | import styles from './WmsInOutStockRecord.module.scss' |
| | | import { useWmsInOutStockRecord } from '../../../Controllers/WmsInOutStockRecord' |
| | | import IconButton from '@/components/IconButton/IconButton' |
| | | import WmsInOutStockRecordDrawer from '../Dialog/WmsInOutStockRecordDrawer/WmsInOutStockRecordDrawer' |
| | | import WmsInOutStockRecordQueryDrawer from '../Dialog/WmsInOutStockRecordQueryDrawer/WmsInOutStockRecordQueryDrawer' |
| | | import Search from '@/components/Search/Search' |
| | | import { columns } from './Config' |
| | | import TdButton from '@/components/TdButton/TdButton' |
| | | import { vPermission } from '@/libs/Permission/Permission' |
| | | import { |
| | | getWmsEnumData |
| | | } from '@/widgets/WmsInOutStockRecord/Models/Service/WmsInOutStockRecordDrawer' |
| | | import { |
| | | ElInput, |
| | | ElSelect, |
| | | ElOption, |
| | | ElDatePicker, |
| | | ElForm, |
| | | ElFormItem, |
| | | } from 'element-plus' |
| | | import { injectModel } from '@/libs/Provider/Provider' |
| | | |
| | | interface RenderTableType { |
| | | url?: string |
| | | dataSource: Ref<any[]> |
| | | isDrag?: boolean |
| | | isChecked?: boolean |
| | | isHidePagination?: boolean |
| | | params?: Record<string, any> |
| | | autoHeight?: boolean |
| | | } |
| | | |
| | | export default defineComponent({ |
| | | name: 'WmsInOutStockRecord', |
| | | directives: { |
| | | permission: vPermission, |
| | | }, |
| | | setup(props, ctx) { |
| | | const { |
| | | dataSource, |
| | | contextMenu, |
| | | dialogConfig, |
| | | dialogConfigForQuery, |
| | | tableRef, |
| | | current, |
| | | search, |
| | | sort, |
| | | headers, |
| | | onError, |
| | | onSearch, |
| | | onRowClick, |
| | | onConfirmWmsInOutStockRecord, |
| | | onCheck, |
| | | onAddWmsInOutStockRecord, |
| | | onAdvancedQuery, |
| | | onExport, |
| | | openDetail, |
| | | onSuccess, |
| | | onBeforeUpload, |
| | | } = useWmsInOutStockRecord(props, ctx) |
| | | |
| | | //å®ä¹é«çº§æ¥è¯¢å¼ç¨ |
| | | const wmsInOutStockRecordQueryDrawerRef=ref(null); |
| | | // æ°å¢çæ¥è¯¢æ¡ä»¶ |
| | | const queryForm = ref({ |
| | | searchVal: '', |
| | | str_searchFormInputAttrs:[] |
| | | }) |
| | | //å®ä¹æ´ä½æ¨¡ç³æ¥è¯¢çåæ°ç»(注æï¼å¿
须大å°åè·å端çå®ä½ç±»å±æ§åä¸è´ï¼å¦åä¼å¯¼è´å¹é
ä¸å¯¹çé®é¢) |
| | | const _searchFormInputAttrs = ref([ |
| | | 'MaterialNo', 'MaterialName', 'Remark' |
| | | ]); |
| | | const searchFormInputAttrs_Placeholder = ref('请è¾å
¥ç©æç¼ç /ç©æåç§°/夿³¨'); |
| | | |
| | | |
| | | // 卿æä¸¾é项 |
| | | const enumOptions = reactive({ |
| | | stockType: [] as Array<{label: string; value: any }>, |
| | | }) |
| | | |
| | | // è·åæä¸¾æ°æ® |
| | | const fetchEnumData = async () => { |
| | | try { |
| | | const stockTypeEnumData = await getWmsEnumData({ |
| | | EnumName: 'StockTypeEnum', |
| | | }) |
| | | enumOptions.stockType = stockTypeEnumData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | | |
| | | } catch (error) { |
| | | console.error('è·åæä¸¾æ°æ®å¤±è´¥:', error) |
| | | } |
| | | } |
| | | |
| | | // ç»ä»¶æè½½æ¶è·åæä¸¾æ°æ® |
| | | onMounted(() => { |
| | | fetchEnumData() |
| | | }) |
| | | |
| | | // å®ä¹ååºå¼æ¥è¯¢æ°æ® |
| | | const _curHighQueryData = ref({ searchVal: '',str_searchFormInputAttrs:[] }); |
| | | // æ°ççæ¥è¯¢æ¹æ³ï¼ä¸»é¡µé¢ä¸çæé®ãæ¥è¯¢ãï¼ |
| | | const handleQueryForMain = async () => { |
| | | _curHighQueryData.value.searchVal = queryForm.value.searchVal; |
| | | _curHighQueryData.value.str_searchFormInputAttrs = _searchFormInputAttrs.value; |
| | | tableRef.value.getList(_curHighQueryData.value) |
| | | } |
| | | // æ°ççæ¥è¯¢æ¹æ³ï¼é«çº§æ¥è¯¢ä¸çæé®ãæ¥è¯¢ãï¼ |
| | | const handleQuery = async (extraParams = {}) => { |
| | | let filteredData = commonGetHighQueryForm(extraParams); |
| | | commonSaveCurHighQueryData(filteredData); |
| | | tableRef.value.getList(filteredData) |
| | | } |
| | | // æ°ççæ¥è¯¢éç½® |
| | | const resetQuery = () => { |
| | | queryForm.value.searchVal = '' |
| | | queryForm.value.str_searchFormInputAttrs=_searchFormInputAttrs.value; |
| | | } |
| | | //æ°ççå¯¼åºæ¹æ³ |
| | | const handleExport=()=>{ |
| | | onExport(_curHighQueryData.value); |
| | | } |
| | | // æ°ççæ¥è¯¢å¼¹åºæ¡å
³éæ¹æ³ |
| | | const closeQuery = (extraParams={}) => { |
| | | let filteredData = commonGetHighQueryForm(extraParams); |
| | | console.log("closeQueryæ¹æ³"); |
| | | console.log(filteredData); |
| | | commonSaveCurHighQueryData(filteredData); |
| | | } |
| | | //ä¿åæ¥è¯¢å¼ |
| | | const commonSaveCurHighQueryData=(filteredData={})=>{ |
| | | _curHighQueryData.value = { ..._curHighQueryData.value, ...filteredData }; |
| | | _curHighQueryData.value.searchVal = queryForm.value.searchVal |
| | | _curHighQueryData.value.str_searchFormInputAttrs =_searchFormInputAttrs.value; |
| | | } |
| | | //è·åé«çº§æ¥è¯¢å¼¹åºæ¡çæ¥è¯¢å¼ |
| | | const commonGetHighQueryForm=(extraParams={})=>{ |
| | | // è¿æ»¤æ undefined çå¼ |
| | | let filteredData = Object.assign( |
| | | {}, |
| | | ...Object.entries(extraParams).map(([key, value]) => |
| | | value !== undefined ? { [key]: value } : {} |
| | | ) |
| | | ) |
| | | //ç»åæ¨¡ç³æ¥è¯¢ |
| | | filteredData.searchVal = queryForm.value.searchVal |
| | | filteredData.str_searchFormInputAttrs =_searchFormInputAttrs.value; |
| | | return filteredData; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @returns è¡¨æ ¼ |
| | | */ |
| | | const RenderBaseTable = (props: RenderTableType) => { |
| | | const { |
| | | url, |
| | | dataSource, |
| | | isDrag, |
| | | isChecked, |
| | | isHidePagination, |
| | | params, |
| | | autoHeight, |
| | | } = props |
| | | |
| | | return ( |
| | | <div |
| | | class={{ |
| | | [styles.wmsInOutStockRecordList]: true, |
| | | }} |
| | | > |
| | | <BaseTable |
| | | ref={tableRef} |
| | | url={url} |
| | | sortUrlTpl="/api/v1/HIAWms/wmsInOutStockRecord/{id}/adjustsort/{sort}" |
| | | v-model:dataSource={dataSource.value} |
| | | columns={columns} |
| | | contextMenu={contextMenu} |
| | | params={params} |
| | | isDrag={isDrag} |
| | | isChecked={isChecked} |
| | | autoHeight={autoHeight} |
| | | onCheck={onCheck} |
| | | onRowClick={onRowClick} |
| | | isHidePagination={isHidePagination} |
| | | pageSize={20} |
| | | v-slots={{ |
| | | name: ({ row }: any) => { |
| | | return row?.name ? ( |
| | | <TdButton |
| | | onClick={() => openDetail(row)} |
| | | text={<span style="color:#5a84ff">详æ
</span>} |
| | | icon="scale" |
| | | tip={row?.name} |
| | | hover |
| | | > |
| | | {row?.name} |
| | | </TdButton> |
| | | ) : ( |
| | | '-' |
| | | ) |
| | | }, |
| | | }} |
| | | ></BaseTable> |
| | | </div> |
| | | ) |
| | | } |
| | | |
| | | return () => { |
| | | return ( |
| | | <div class={styles.wmsInOutStockRecordContent}> |
| | | {/* æ·»å /ç¼è¾ */} |
| | | <WmsInOutStockRecordDrawer |
| | | v-model={dialogConfig.visible} |
| | | title={dialogConfig.title} |
| | | row={current.value} |
| | | sort={sort.value} |
| | | onConfirm={onConfirmWmsInOutStockRecord} |
| | | /> |
| | | {/* é«çº§æ¥è¯¢ */} |
| | | <WmsInOutStockRecordQueryDrawer |
| | | ref="wmsInOutStockRecordQueryDrawerRef" |
| | | v-model={dialogConfigForQuery.visible} |
| | | title={dialogConfigForQuery.title} |
| | | row={current.value} |
| | | sort={sort.value} |
| | | onConfirmQuery={handleQuery} |
| | | onRestQuery={resetQuery} |
| | | onClose={closeQuery} |
| | | /> |
| | | |
| | | <div class={styles.headerContent}> |
| | | <div class={styles.header}> |
| | | <IconButton |
| | | v-permission="wmsInOutStockRecord-add" |
| | | icon="add-p" |
| | | onClick={onAddWmsInOutStockRecord} |
| | | type="primary" |
| | | > |
| | | æ·»å |
| | | </IconButton> |
| | | <el-divider direction="vertical" /> |
| | | |
| | | <el-divider direction="vertical" /> |
| | | <el-upload |
| | | v-permission="wmsInOutStockRecord-import" |
| | | name="file" |
| | | accept=".xlsx,.xls,.csv" |
| | | show-file-list={false} |
| | | onError={onError} |
| | | onSuccess={onSuccess} |
| | | before-upload={onBeforeUpload} |
| | | headers={headers.value} |
| | | action="/api/v1/HIAWms/wmsInOutStockRecord/import" |
| | | > |
| | | <IconButton icon="in">导å
¥</IconButton> |
| | | </el-upload> |
| | | |
| | | <IconButton |
| | | v-permission="wmsInOutStockRecord-output" |
| | | icon="out" |
| | | onClick={handleExport} |
| | | > |
| | | å¯¼åº |
| | | </IconButton> |
| | | </div> |
| | | <ElFormItem style={{ marginTop: '15px' }}> |
| | | <ElFormItem label="å
³é®å"> |
| | | <ElInput |
| | | v-model={queryForm.value.searchVal} |
| | | placeholder={searchFormInputAttrs_Placeholder.value} |
| | | clearable |
| | | class={styles.formItem} |
| | | /> |
| | | </ElFormItem> |
| | | <IconButton type="primary" icon="search" onClick={handleQueryForMain}> |
| | | æ¥è¯¢ |
| | | </IconButton> |
| | | {/* <IconButton style="" icon="refresh" onClick={resetQuery}> |
| | | éç½® |
| | | </IconButton> */} |
| | | <IconButton |
| | | v-permission="wmsInOutStockRecord-add" |
| | | icon="search" |
| | | onClick={onAdvancedQuery} |
| | | type="primary" |
| | | > |
| | | é«çº§æ¥è¯¢ |
| | | </IconButton> |
| | | </ElFormItem> |
| | | </div> |
| | | |
| | | <RenderBaseTable |
| | | url="/api/v1/HIAWms/wmsInOutStockRecord/page" |
| | | dataSource={dataSource} |
| | | isChecked={true} |
| | | isDrag={true} |
| | | /> |
| | | </div> |
| | | ) |
| | | } |
| | | }, |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .WmsInOutStockRecord { |
| | | background-color: #fff; |
| | | border-radius: 5px 5px 0 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | border: 1px solid #dbdbdb; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { |
| | | Component, |
| | | DefineComponent, |
| | | defineComponent, |
| | | markRaw, |
| | | ref, |
| | | SetupContext, |
| | | onMounted, |
| | | } from 'vue' |
| | | import styles from './WmsInOutStockRecord.module.scss' |
| | | import Tab from '@/components/Tab/Tab' |
| | | import { useProvideModels } from '@/libs/Provider/app' |
| | | import { usePermission } from '@/libs/Permission/Permission' |
| | | import { permissionCodes } from '../enum' |
| | | import { ModuleType, TabItem } from '../type/Type' |
| | | import { getEntityNames } from '@/hooks/hook' |
| | | import TabPane from '@/components/Tab/TabPane' |
| | | |
| | | const Models: ModuleType = import.meta.glob('./config/*.json', { |
| | | eager: true, |
| | | }) |
| | | |
| | | const entityNames = getEntityNames(Models) |
| | | |
| | | const nameToLabelMap = [{ name: 'WmsInOutStockRecord', label: 'åºå
¥åºè®°å½' }] |
| | | |
| | | export default defineComponent({ |
| | | name: 'WmsInOutStockRecord', |
| | | |
| | | setup(props, ctx: SetupContext) { |
| | | useProvideModels() |
| | | usePermission(props, permissionCodes) |
| | | |
| | | const rf = ref<{ |
| | | [key: string]: any |
| | | }>({}) |
| | | |
| | | const tabData = ref<TabItem[]>([]) |
| | | |
| | | const onTabChange = (v: string) => { |
| | | rf.value?.[v]?.reloadList() |
| | | } |
| | | |
| | | const initTableData = async () => { |
| | | for (const i in entityNames) { |
| | | const name = entityNames[i] |
| | | const module = await import(`./Pages/${name}/${name}.tsx`) |
| | | const WmsInOutStockRecord = markRaw(module.default) |
| | | const foundLabel = |
| | | nameToLabelMap.find((item) => item.name === name)?.label || name |
| | | tabData.value.push({ |
| | | label: foundLabel, |
| | | name, |
| | | component: WmsInOutStockRecord, |
| | | }) |
| | | } |
| | | } |
| | | |
| | | initTableData() |
| | | |
| | | return () => { |
| | | return ( |
| | | <div class={styles.WmsInOutStockRecord}> |
| | | <Tab data={tabData.value} type="list" onTab={onTabChange}> |
| | | {tabData.value.map((widgetInfo) => { |
| | | const Widget: any = widgetInfo.component |
| | | return ( |
| | | <TabPane label={widgetInfo.label} name={widgetInfo.name}> |
| | | <Widget |
| | | ref={(r: any) => (rf.value['WmsInOutStockRecord'] = r)} |
| | | ></Widget> |
| | | </TabPane> |
| | | ) |
| | | })} |
| | | </Tab> |
| | | </div> |
| | | ) |
| | | } |
| | | }, |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "name": "WmsInOutStockRecord" |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export interface TabType { |
| | | label: string |
| | | name: string |
| | | columns?: any[] |
| | | data?: any[] |
| | | isFooter: boolean |
| | | [key: string]: any |
| | | } |
| | | |
| | | export const permissionCodes = { |
| | | 'wmsInOutStockRecord-list': 'å表-å表', |
| | | 'wmsInOutStockRecord-add': 'å表-æ·»å ', |
| | | 'wmsInOutStockRecord-import': 'å表-导å
¥', |
| | | 'wmsInOutStockRecord-output': 'å表-è¾åº', |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import WmsInOutStockRecord from './Views/WmsInOutStockRecord' |
| | | import Setting from '@/components/Setting/Setting' |
| | | import { provider } from '@/provider/index' |
| | | import p from '../../assets/svg/p.svg' |
| | | |
| | | export default { |
| | | is: 'WmsInOutStockRecord', |
| | | name: 'åºå
¥åºè®°å½', |
| | | category: 'run', |
| | | icon: p, |
| | | authorizationRequired: false, |
| | | canvasView: provider(WmsInOutStockRecord), |
| | | settingsView: Setting, |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Component } from 'vue' |
| | | |
| | | export interface DataItemType { |
| | | id?: string |
| | | name?: string |
| | | code?: string |
| | | description?: string |
| | | label?: string |
| | | value?: string | number |
| | | } |
| | | |
| | | export interface WmsInOutStockRecordBaseType { |
| | | id?: string |
| | | name?: string |
| | | code?: string |
| | | value?: number |
| | | description?: string |
| | | options?: Array<DataItemType> |
| | | abilityValue?: number | string |
| | | data?: DataItemType |
| | | defaultValue?: string | number |
| | | flow: string |
| | | } |
| | | |
| | | export interface FlowDefinitionType { |
| | | id?: string |
| | | name?: string |
| | | code?: string |
| | | description?: string |
| | | } |
| | | |
| | | export type ModuleType = Record< |
| | | string, |
| | | { |
| | | default: Record<string, string> |
| | | name: string |
| | | } |
| | | > |
| | | |
| | | export interface TabItem { |
| | | name: string |
| | | label: string |
| | | component: Component |
| | | hidden?: boolean |
| | | } |