| | |
| | | /// </summary> |
| | | [Description("åå§æ°æ®")] |
| | | BD, |
| | | /// <summary> |
| | | /// é¨ä»¶å· |
| | | /// </summary> |
| | | [Description("交货åå·")] |
| | | DN, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Magicodes.ExporterAndImporter.Core; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEA_Core.DB.Models |
| | | { |
| | | public interface IBaseHistoryEntity |
| | | { |
| | | /// <summary> |
| | | /// åè¡¨ä¸»é® |
| | | /// </summary> |
| | | [ImporterHeader(Name = "å表主é®")] |
| | | [ExporterHeader(DisplayName = "å表主é®")] |
| | | [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "å表主é®")] |
| | | public int SourceId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æä½ç±»å |
| | | /// </summary> |
| | | [ImporterHeader(Name = "æä½ç±»å")] |
| | | [ExporterHeader(DisplayName = "æä½ç±»å")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æä½ç±»å")] |
| | | public string OperateType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç§»å
¥å岿¶é´ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "ç§»å
¥å岿¶é´")] |
| | | [ExporterHeader(DisplayName = "ç§»å
¥å岿¶é´")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ç§»å
¥å岿¶é´")] |
| | | public DateTime InsertTime { get; set; } |
| | | } |
| | | } |
| | |
| | | public decimal Quantity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éè´§åå· |
| | | /// </summary> |
| | | [AnalysisItemRule(AnalysisFormatTypeEnum.DN), PropertyValidate("éè´§åå·", NotNullAndEmpty = true)] |
| | | public string DeliveryNote { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åå§æ°æ® |
| | | /// </summary> |
| | | [AnalysisItemRule(AnalysisFormatTypeEnum.BD), PropertyValidate("åå§æ°æ®", NotNullAndEmpty = true)] |
| | |
| | | StockStatus = (int)StockStatusEmun.ç»çæå, |
| | | Creater = "WMS", |
| | | CreateDate = DateTime.Now, |
| | | MaterialType = (int)InventoryMaterialType.æå, |
| | | MaterialType = (int)InventoryMaterialType.åææ, |
| | | Materialweight = 0, |
| | | Wlstatus = (int)InventoryMaterialStatus.åæ ¼, |
| | | Mgeneratetime = DateTime.Now, |
| | |
| | | Creater = "WMS", |
| | | CreateDate = DateTime.Now, |
| | | Id = inboundOrderDet.LinId.ObjToInt(), |
| | | DeliveryNote = model.DeliveryNote |
| | | }; |
| | | |
| | | if (stockInfo.Id > 0) |
| | |
| | | [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "å®çæ°é", DefaultValue = "0")] |
| | | public decimal FinishQty { get; set; } |
| | | |
| | | [ExporterHeader(DisplayName = "éè´§åå·")] |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "éè´§åå·")] |
| | | public string DeliveryNote { get; set; } |
| | | |
| | | [ExporterHeader(IsIgnore = true)] |
| | | [Navigate(NavigateType.OneToOne, nameof(Dt_StockQuantityChangeRecord.StockDetailId), nameof(Id))] |
| | | public Dt_StockQuantityChangeRecord StockQuantityChangeRecord { get; set; } |
| | |
| | | |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | [SugarTable(nameof(Dt_StockInfoDetail_Hty), "åºåä¿¡æ¯æç»")] |
| | | public class Dt_StockInfoDetail_Hty |
| | | /// <summary> |
| | | /// åºåä¿¡æ¯æç»åå² |
| | | /// </summary> |
| | | [SugarTable(nameof(Dt_StockInfoDetail_Hty), "åºåä¿¡æ¯æç»åå²")] |
| | | public class Dt_StockInfoDetail_Hty : Dt_StockInfoDetail, IBaseHistoryEntity |
| | | { |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºåä¿¡æ¯ä¸»é®")] |
| | | public int StockId { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ç©æç¼å·")] |
| | | public string MaterielCode { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 200, ColumnDescription = "ç©æåç§°")] |
| | | public string MaterielName { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "åæ®ç¼å·")] |
| | | public string OrderNo { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "æ¹æ¬¡å·")] |
| | | public string BatchNo { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 100, ColumnDescription = "åºåå·")] |
| | | public string SerialNumber { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "åºåæ°é")] |
| | | public decimal StockQuantity { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "åºåºæ°é", DefaultValue = "0")] |
| | | public decimal OutboundQuantity { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºåæç»ç¶æ")] |
| | | public int Status { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | |
| | | [Navigate(NavigateType.OneToOne, nameof(Dt_StockQuantityChangeRecord.StockDetailId), nameof(Id))] |
| | | public Dt_StockQuantityChangeRecord StockQuantityChangeRecord { get; set; } |
| | | |
| | | |
| | | [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "æºä¸»é®")] |
| | | /// <summary> |
| | | /// åè¡¨ä¸»é® |
| | | /// </summary> |
| | | [ImporterHeader(Name = "å表主é®")] |
| | | [ExporterHeader(DisplayName = "å表主é®")] |
| | | [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "å表主é®")] |
| | | public int SourceId { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "夿³¨")] |
| | | /// <summary> |
| | | /// æä½ç±»å |
| | | /// </summary> |
| | | [ImporterHeader(Name = "æä½ç±»å")] |
| | | [ExporterHeader(DisplayName = "æä½ç±»å")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æä½ç±»å")] |
| | | public string OperateType { get; set; } |
| | | /// <summary> |
| | | /// å建人 |
| | | /// </summary> |
| | | [ImporterHeader(Name = "å建人")] |
| | | [ExporterHeader(DisplayName = "å建人")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "å建人")] |
| | | public string Creater { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å建æ¶é´ |
| | | /// ç§»å
¥å岿¶é´ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "å建æ¶é´")] |
| | | [ExporterHeader(DisplayName = "å建æ¶é´")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å建æ¶é´")] |
| | | public DateTime CreateDate { get; set; } = DateTime.Now; |
| | | |
| | | /// <summary> |
| | | /// æ´æ°è
|
| | | /// </summary> |
| | | [ImporterHeader(Name = "ä¿®æ¹äºº")] |
| | | [ExporterHeader(DisplayName = "ä¿®æ¹äºº")] |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "ä¿®æ¹äºº")] |
| | | public string Modifier { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä¿®æ¹æ¥æ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "ä¿®æ¹æ¥æ")] |
| | | [ExporterHeader(DisplayName = "ä¿®æ¹æ¥æ")] |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "ä¿®æ¹æ¥æ")] |
| | | public DateTime? ModifyDate { get; set; } |
| | | [ImporterHeader(Name = "ç§»å
¥å岿¶é´")] |
| | | [ExporterHeader(DisplayName = "ç§»å
¥å岿¶é´")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ç§»å
¥å岿¶é´")] |
| | | public DateTime InsertTime { get; set; } |
| | | } |
| | | } |
| | |
| | | |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | /// <summary> |
| | | /// åºåä¿¡æ¯åå² |
| | | /// </summary> |
| | | [SugarTable(nameof(Dt_StockInfo_Hty), "åºåä¿¡æ¯")] |
| | | public class Dt_StockInfo_Hty |
| | | public class Dt_StockInfo_Hty : Dt_StockInfo, IBaseHistoryEntity |
| | | { |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æçç¼å·")] |
| | | public string PalletCode { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, Length = 20, ColumnDescription = "è´§ä½ç¼å·")] |
| | | public string LocationCode { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "æ¯å¦æ»¡ç", DefaultValue = "0")] |
| | | public bool IsFull { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºåç¶æ")] |
| | | public int StockStatus { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "æºä¸»é®")] |
| | | /// <summary> |
| | | /// åè¡¨ä¸»é® |
| | | /// </summary> |
| | | [ImporterHeader(Name = "å表主é®")] |
| | | [ExporterHeader(DisplayName = "å表主é®")] |
| | | [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "å表主é®")] |
| | | public int SourceId { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "夿³¨")] |
| | | /// <summary> |
| | | /// æä½ç±»å |
| | | /// </summary> |
| | | [ImporterHeader(Name = "æä½ç±»å")] |
| | | [ExporterHeader(DisplayName = "æä½ç±»å")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æä½ç±»å")] |
| | | public string OperateType { get; set; } |
| | | /// <summary> |
| | | /// å建人 |
| | | /// </summary> |
| | | [ImporterHeader(Name = "å建人")] |
| | | [ExporterHeader(DisplayName = "å建人")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "å建人")] |
| | | public string Creater { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å建æ¶é´ |
| | | /// ç§»å
¥å岿¶é´ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "å建æ¶é´")] |
| | | [ExporterHeader(DisplayName = "å建æ¶é´")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å建æ¶é´")] |
| | | public DateTime CreateDate { get; set; } = DateTime.Now; |
| | | |
| | | /// <summary> |
| | | /// æ´æ°è
|
| | | /// </summary> |
| | | [ImporterHeader(Name = "ä¿®æ¹äºº")] |
| | | [ExporterHeader(DisplayName = "ä¿®æ¹äºº")] |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "ä¿®æ¹äºº")] |
| | | public string Modifier { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä¿®æ¹æ¥æ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "ä¿®æ¹æ¥æ")] |
| | | [ExporterHeader(DisplayName = "ä¿®æ¹æ¥æ")] |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "ä¿®æ¹æ¥æ")] |
| | | public DateTime? ModifyDate { get; set; } |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ç±»å")] |
| | | public int MaterialType { get; set; } |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ç©æç¶æ")] |
| | | public int Wlstatus { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "éé")] |
| | | public decimal Materialweight { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "ç产æ¶é´")] |
| | | public DateTime Mgeneratetime { get; set; } |
| | | [ImporterHeader(Name = "ç§»å
¥å岿¶é´")] |
| | | [ExporterHeader(DisplayName = "ç§»å
¥å岿¶é´")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ç§»å
¥å岿¶é´")] |
| | | public DateTime InsertTime { get; set; } |
| | | } |
| | | } |
| | |
| | | { |
| | | // æ´æ°å
¥åºåæç»ç¶æ |
| | | UpdateInboundOrderDetails(stockInfo, inboundOrder, ref inboundOrderDetail); |
| | | |
| | | ///æ´æ°åºåç¶æ |
| | | stockInfo.StockStatus = StockStatusEmun.å
¥åºå®æ.ObjToInt(); |
| | | // æ´æ°åºåæç»ç¶æ |
| | | stockInfo.Details.ForEach(x => x.Status = StockStatusEmun.å
¥åºå®æ.ObjToInt()); |
| | | |
| | |
| | | int lastStatus = locationInfo.LocationStatus; |
| | | locationInfo.LocationStatus = LocationStatusEnum.InStock.ObjToInt(); |
| | | |
| | | |
| | | |
| | | Dt_OutboundOrderDetail outboundOrderDetails = _outboundService.OutboundOrderService.Db.Queryable<Dt_OutboundOrderDetail>() |
| | | .Where(x => x.BatchNo == stockInfo.Details.FirstOrDefault().BatchNo) |
| | | .First(); |
| | | if (outboundOrderDetails == null) return WebResponseContent.Instance.Error("æªæ¾å°åºåºåä¿¡æ¯"); |
| | | |
| | | Dt_OutboundOrder inboundOrder = _outboundService.OutboundOrderService.Db.Queryable<Dt_OutboundOrder>() |
| | | .Where(x => x.Id == outboundOrderDetails.OrderId) |
| | | .Includes(x => x.Details) |
| | | .First(); |
| | | .Where(x => x.Id == outboundOrderDetails.OrderId) |
| | | .Includes(x => x.Details) |
| | | .First(); |
| | | |
| | | if (inboundOrder == null) return WebResponseContent.Instance.Error("æªæ¾å°åºåºåä¿¡æ¯"); |
| | | // 2. å¤çåºåºè®¢å详æ
|
| | |
| | | UpdateOutboundOrderDetails(stockInfo, inboundOrder, ref outboundOrderDetails); |
| | | |
| | | // 3. æ§è¡æ ¸å¿åºåºé»è¾ |
| | | return ExecuteOutboundLogic(task, stockInfo, locationInfo, outboundOrderDetails); |
| | | return ExecuteOutboundLogic(task, stockInfo, locationInfo, outboundOrderDetails, inboundOrder); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | //} |
| | | |
| | | private WebResponseContent ExecuteOutboundLogic(Dt_Task task, Dt_StockInfo stockInfo, |
| | | Dt_LocationInfo locationInfo, Dt_OutboundOrderDetail outboundOrderDetails) |
| | | Dt_LocationInfo locationInfo, Dt_OutboundOrderDetail outboundOrderDetails,Dt_OutboundOrder inboundOrder) |
| | | { |
| | | try |
| | | { |
| | | _unitOfWorkManage.BeginTran(); |
| | | |
| | | |
| | | ///æ´æ°åºåºå |
| | | _outboundService.OutboundOrderService.Repository.UpdateData(inboundOrder); |
| | | // æ´æ°åºåºè®¢å详æ
|
| | | _outboundService.OutboundOrderDetailService.Repository.UpdateData(outboundOrderDetails); |
| | | |
| | | // æ´æ°åºåç¶æ |
| | | UpdateStockStatus(stockInfo, locationInfo); |
| | | DeleteAndMoveIntoHtStockStatus(stockInfo); |
| | | |
| | | // æ´æ°è´§ä½ç¶æ |
| | | UpdateLocationStatus(locationInfo); |
| | |
| | | throw; |
| | | } |
| | | } |
| | | private void UpdateOutboundOrderDetails(Dt_StockInfo stockInfo, Dt_OutboundOrder inboundOrder, |
| | | ref Dt_OutboundOrderDetail inboundOrderDetail) |
| | | private void UpdateOutboundOrderDetails(Dt_StockInfo stockInfo, Dt_OutboundOrder inboundOrder,ref Dt_OutboundOrderDetail inboundOrderDetail) |
| | | { |
| | | int overCount = inboundOrder.Details.Count(x => x.OrderDetailStatus == OrderDetailStatusEnum.Over.ObjToInt()); |
| | | inboundOrderDetail = inboundOrder.Details.FirstOrDefault(x => x.BatchNo == stockInfo.Details.FirstOrDefault()?.BatchNo); |
| | |
| | | } |
| | | } |
| | | |
| | | private void UpdateStockStatus(Dt_StockInfo stockInfo, Dt_LocationInfo locationInfo) |
| | | private void DeleteAndMoveIntoHtStockStatus(Dt_StockInfo stockInfo) |
| | | { |
| | | stockInfo.LocationCode = ""; |
| | | stockInfo.StockStatus = StockStatusEmun.åºåºå®æ.ObjToInt(); |
| | | stockInfo.Details.ForEach(x => |
| | | { |
| | | x.Status = StockStatusEmun.åºåºå®æ.ObjToInt(); |
| | | }); |
| | | _stockRepository.StockInfoRepository.UpdateData(stockInfo); |
| | | _stockRepository.StockInfoDetailRepository.UpdateData(stockInfo.Details); |
| | | _stockService.StockInfoService.Repository.DeleteAndMoveIntoHty(stockInfo, App.User.UserId == 0 ? OperateType.èªå¨å®æ : OperateType.äººå·¥å®æ); |
| | | _stockService.StockInfoDetailService.Repository.DeleteAndMoveIntoHty(stockInfo.Details, App.User.UserId == 0 ? OperateType.èªå¨å®æ : OperateType.äººå·¥å®æ); |
| | | } |
| | | |
| | | private void UpdateLocationStatus(Dt_LocationInfo locationInfo) |
| | |
| | | |
| | | private void CompleteTask(Dt_Task task) |
| | | { |
| | | task.TaskStatus = OutTaskStatusEnum.OutFinish.ObjToInt(); |
| | | BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateType.èªå¨å®æ : OperateType.äººå·¥å®æ); |
| | | } |
| | | |
| | |
| | | |
| | | private void SendNormalOutboundToWMS(Dt_Task task, Dt_OutboundOrder outboundOrder, |
| | | Dt_StockInfoDetail stockInfoDetail, Dt_OutboundOrderDetail outDetail) |
| | | { |
| | | |
| | | |
| | | //List<Dt_StockInfo> StockInfos = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.WarehouseId == task.WarehouseId).Includes(x => x.Details).Where(x => x.Details.Any(v => v.BatchNo == outDetail.BatchNo)).ToList(); |
| | | List<Dt_OutStockLockInfo> outStockLockInfos = _outboundService.OutboundStockLockInfoService.Repository.QueryData(x => x.OrderNo == outboundOrder.OrderNo); |
| | | |
| | | |
| | | if (outStockLockInfos.Count == 0) throw new Exception("æªæ¾å°åºåä¿¡æ¯"); |
| | | |
| | | // æå»ºåä¼ æ°æ®ï¼å°ææå¹é
çåºåæç»å å
¥ DetailList |
| | | var passBack = new HouseoutboundPassBack |
| | | { |
| | | ApiType = "InventoryAllocateController", |
| | | Method = "AsrsFinishedStockCount", |
| | | Parameters = new List<HouseoutboundPassBack.datas> |
| | | { |
| | | new HouseoutboundPassBack.datas |
| | | { |
| | | Value = new List<HouseoutboundPassBack.datas.data1> |
| | | { |
| | | new HouseoutboundPassBack.datas.data1 |
| | | |
| | | //List<Dt_StockInfo> StockInfos = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.WarehouseId == task.WarehouseId).Includes(x => x.Details).Where(x => x.Details.Any(v => v.BatchNo == outDetail.BatchNo)).ToList(); |
| | | List<Dt_OutStockLockInfo> outStockLockInfos = _outboundService.OutboundStockLockInfoService.Repository.QueryData(x => x.OrderNo == outboundOrder.OrderNo); |
| | | |
| | | if (outStockLockInfos.Count == 0) throw new Exception("æªæ¾å°åºåä¿¡æ¯"); |
| | | |
| | | // æå»ºåä¼ æ°æ®ï¼å°ææå¹é
çåºåæç»å å
¥ DetailList |
| | | var passBack = new HouseoutboundPassBack |
| | | { |
| | | No = outboundOrder.OrderNo, |
| | | OutWareHouse = task.Roadway, |
| | | TransactionCode = outboundOrder.TransactionCode, |
| | | InoutType = outboundOrder.OrderType, |
| | | OrderType = outboundOrder.InoutType, |
| | | DetailList = outStockLockInfos.Select(d => new HouseoutboundPassBack.datas.data1.Inbound |
| | | { |
| | | LinId = d.LinId?? "", |
| | | LPN_No = d.PalletCode, |
| | | MaterielCode = d.MaterielCode?? "", |
| | | OrderQuantity = d.OrderQuantity, |
| | | BatchNo = d.BatchNo, |
| | | FinishQty = d.OrderQuantity, |
| | | LocationName = d.LocationCode |
| | | }) |
| | | .ToList() |
| | | ApiType = "InventoryAllocateController", |
| | | Method = "AsrsFinishedStockCount", |
| | | Parameters = new List<HouseoutboundPassBack.datas> |
| | | { |
| | | new HouseoutboundPassBack.datas |
| | | { |
| | | Value = new List<HouseoutboundPassBack.datas.data1> |
| | | { |
| | | new HouseoutboundPassBack.datas.data1 |
| | | { |
| | | No = outboundOrder.OrderNo, |
| | | OutWareHouse = task.Roadway, |
| | | TransactionCode = outboundOrder.TransactionCode, |
| | | InoutType = outboundOrder.OrderType, |
| | | OrderType = outboundOrder.InoutType, |
| | | DetailList = outStockLockInfos.Select(d => new HouseoutboundPassBack.datas.data1.Inbound |
| | | { |
| | | LinId = d.LinId?? "", |
| | | LPN_No = d.PalletCode, |
| | | MaterielCode = d.MaterielCode?? "", |
| | | OrderQuantity = d.OrderQuantity, |
| | | BatchNo = d.BatchNo, |
| | | FinishQty = d.OrderQuantity, |
| | | LocationName = d.LocationCode |
| | | }) |
| | | .ToList() |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | |
| | |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("CodeAnalysis")] |
| | | public WebResponseContent CodeAnalysis(string serNum) |
| | | |
| | | |
| | | { |
| | | try |
| | | { |
| | |
| | | let config = { |
| | | baseUrl: 'http://127.0.0.1:9290', |
| | | // baseUrl: 'http://10.168.1.226:9290', |
| | | //baseUrl: 'http://10.168.1.226:9290', |
| | | urls: [ |
| | | 'http://10.30.4.92:9283', |
| | | 'http://10.30.4.92:9283' |
| | |
| | | <view class="card"> |
| | | <view class="top"> |
| | | <view class="userImage"> |
| | | <!-- <open-data type="userAvatarUrl"></open-data> --> |
| | | <u-avatar :src="src" size="146"></u-avatar> |
| | | </view> |
| | | </view> |
| | | <view class="bottom" @tap.native="Login"> |
| | | <view class="left"> |
| | | <view class="user-text"> |
| | | <!-- <open-data type="userNickName"></open-data> --> |
| | | <text style="text-align: center;">{{userNickName}}</text> |
| | | </view> |
| | | <!-- <view class="user-phone"> 171****4133 </view> --> |
| | | </view> |
| | | <view class="right flex-center"> |
| | | <u-icon class="icon" name="arrow-right"></u-icon> |
| | | </view> |
| | | </view> |
| | | <!-- <view class="settings" @click="settings"> |
| | | <view class="left"> |
| | | <view class="settings-text"> |
| | | <open-data type="userNickName"></open-data> |
| | | <text style="text-align: center;">设置</text> |
| | | </view> |
| | | <view class="user-phone"> 171****4133 </view> |
| | | </view> |
| | | <view class="right flex-center"> |
| | | <u-icon class="icon" name="arrow-right"></u-icon> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | </view> |
| | | <view class="list-card"> |
| | | </view> |
| | | <view class="quit flex-center"> |
| | | <!-- <view class="btn flex-center" @click="LastLogin"> |
| | | æ´æ°ç¨åº |
| | | </view> --> |
| | | <view class="btn flex-center" @click="LastLogin"> |
| | | éåºç»å½ |
| | | </view> |
| | |
| | | </style> |
| | | |
| | | <script> |
| | | //import { } from "@/common/api/{$}.js"; |
| | | import httpInterceptor from '@/common/http.interceptor.js' |
| | | export default { |
| | | data() { |
| | | return { |
| | | src: "", |
| | | userNickName: '请ç»å½', |
| | | // è¿ææ¶é´æ£æ¥å®æ¶å¨ |
| | | checkExpirationTimer: null |
| | | }; |
| | | }, |
| | | //çå¬é¡µé¢åå§åï¼å
¶åæ°å onLoad åæ°ï¼ä¸ºä¸ä¸ªé¡µé¢ä¼ éçæ°æ®ï¼åæ°ç±»å为 Objectï¼ç¨äºé¡µé¢ä¼ åï¼ï¼è§¦åæ¶æºæ©äº onLoad |
| | | onInit() {}, |
| | | //çå¬é¡µé¢å è½½ï¼å
¶åæ°ä¸ºä¸ä¸ªé¡µé¢ä¼ éçæ°æ®ï¼åæ°ç±»å为 Objectï¼ç¨äºé¡µé¢ä¼ åï¼ |
| | | onLoad() { |
| | | let isLogin = this.hasLogin(); |
| | | if (isLogin) { |
| | | let haslogin = uni.getStorageSync('jo_user') |
| | | this.userNickName = haslogin.userName; |
| | | this.src = httpInterceptor.baseUrl + "/" + haslogin.img; |
| | | // æ£æ¥ç»å½ç¶æåæ¯å¦è¿æ |
| | | this.checkLoginStatus(); |
| | | |
| | | // è®¾ç½®å®æ¶æ£æ¥ï¼æ¯30å鿣æ¥ä¸æ¬¡ |
| | | this.checkExpirationTimer = setInterval(() => { |
| | | this.checkLoginExpiration(); |
| | | }, 30 * 60 * 1000); |
| | | }, |
| | | onUnload() { |
| | | // 页é¢å¸è½½æ¶æ¸
é¤å®æ¶å¨ |
| | | if (this.checkExpirationTimer) { |
| | | clearInterval(this.checkExpirationTimer); |
| | | } |
| | | }, |
| | | //çå¬é¡µé¢å次渲æå®æã注æå¦ææ¸²æé度快ï¼ä¼å¨é¡µé¢è¿å
¥å¨ç»å®æå触å |
| | | onReady() {}, |
| | | //çå¬é¡µé¢æ¾ç¤ºã页颿¯æ¬¡åºç°å¨å±å¹ä¸é½è§¦åï¼å
æ¬ä»ä¸çº§é¡µé¢ç¹è¿åé²åºå½åé¡µé¢ |
| | | beforeDestroy() {}, |
| | | //页颿»å¨å°åºé¨çäºä»¶ï¼ä¸æ¯scroll-viewæ»å°åºï¼ï¼å¸¸ç¨äºä¸æä¸ä¸é¡µæ°æ®ã |
| | | onReachBottom() {}, |
| | | onShareAppMessage(res) {}, |
| | | created() {}, |
| | | onShow() { |
| | | // 页颿¾ç¤ºæ¶åæ¬¡æ£æ¥ |
| | | this.checkLoginStatus(); |
| | | }, |
| | | methods: { |
| | | // æ£æ¥ç»å½ç¶æ |
| | | checkLoginStatus() { |
| | | let isLogin = this.hasLogin(); |
| | | if (isLogin) { |
| | | // æ£æ¥æ¯å¦è¿æ |
| | | if (this.checkLoginExpiration()) { |
| | | let haslogin = uni.getStorageSync('jo_user') |
| | | this.userNickName = haslogin.userName; |
| | | this.src = httpInterceptor.baseUrl + "/" + haslogin.img; |
| | | } |
| | | } |
| | | }, |
| | | |
| | | // æ£æ¥ç»å½æ¯å¦è¿æ |
| | | checkLoginExpiration() { |
| | | const expirationTime = uni.getStorageSync('jo_expiration_time'); |
| | | const currentTime = new Date().getTime(); |
| | | |
| | | // å¦ææ²¡æè®¾ç½®è¿ææ¶é´ï¼è§ä¸ºæªç»å½ |
| | | if (!expirationTime) { |
| | | this.logout(); |
| | | return false; |
| | | } |
| | | |
| | | // æ£æ¥æ¯å¦è¿æ |
| | | if (currentTime > expirationTime) { |
| | | uni.showToast({ |
| | | title: 'ç»å½å·²è¿æï¼è¯·éæ°ç»å½', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }); |
| | | this.logout(); |
| | | return false; |
| | | } |
| | | return true; |
| | | }, |
| | | |
| | | hasLogin() { |
| | | let haslogin = uni.getStorageSync('jo_user') |
| | | if (haslogin == null || haslogin == "") { |
| | |
| | | } |
| | | }, |
| | | |
| | | // éåºç»å½ |
| | | LastLogin() { |
| | | //uni.clearStorage(); |
| | | this.logout(); |
| | | }, |
| | | |
| | | // ç»ä¸çéåºç»å½å¤ç |
| | | logout() { |
| | | uni.removeStorageSync('jo_id_token'); |
| | | uni.removeStorageSync('jo_user'); |
| | | uni.removeStorageSync('jo_userImg'); |
| | | uni.removeStorageSync('jo_expiration_time'); // æ¸
é¤è¿ææ¶é´ |
| | | this.userNickName = '请ç»å½'; |
| | | this.src = ""; |
| | | this.$u.route('/pages/login/login'); |
| | | }, |
| | | |
| | |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | </script> |
| | |
| | | <view class="uni-note">æ°éï¼{{item.quantity}}</view> |
| | | <view class="uni-note">çäº§æ¥æï¼{{item.productionDate}}</view> |
| | | <view class="uni-note">æææï¼{{item.effectiveDate}}</view> |
| | | <view class="uni-note">交货åå·ï¼{{item.deliveryNote}}</view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | |
| | | <view class="uni-note">æ°éï¼{{item.quantity}}</view> |
| | | <view class="uni-note">çäº§æ¥æï¼{{item.productionDate}}</view> |
| | | <view class="uni-note">æææï¼{{item.effectiveDate}}</view> |
| | | <view class="uni-note">交货åå·ï¼{{item.deliveryNote}}</view> |
| | | </view> |
| | | </view> |
| | | </template> |