Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn
| | |
| | | _taskService = taskService; |
| | | _taskRepository = taskRepository; |
| | | } |
| | | [HttpPost, HttpGet, Route("AGVFinish"), AllowAnonymous] |
| | | public WebResponseContent AGVFinish(string barcode) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | var task = _taskRepository.QueryFirst(x => x.PalletCode == barcode); |
| | | if (task == null) throw new Exception($"æªæ¾å°ä»»å¡,æçå·ã{barcode}ã"); |
| | | AgvUpdateDTO updateDTO = new AgvUpdateDTO() |
| | | { |
| | | TaskCode = task.AgvTaskNum, |
| | | Method = "end" |
| | | }; |
| | | var agvResponseContent = CtuCallback(updateDTO); |
| | | if (agvResponseContent.Code == "1") throw new Exception(agvResponseContent.Message); |
| | | content.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | |
| | | #region å®å
¨ä¿¡å·ç³è¯· |
| | | /// <summary> |
| | |
| | | const table = ref({ |
| | | key: "id", |
| | | footer: "Foots", |
| | | cnName: "å
¥åºå", |
| | | cnName: "éè´å", |
| | | name: "purchaseOrder", |
| | | url: "/PurchaseOrder/", |
| | | sortName: "id", |
| | |
| | | }, |
| | | ]); |
| | | const detail = ref({ |
| | | cnName: "å
¥åºåæç»", |
| | | cnName: "éè´åæç»", |
| | | table: "InboundOrderDetail", |
| | | columns: [ |
| | | { |
| | |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | bind: { key: "outStockStatus", data: [] }, |
| | | bind: { key: "stockStatusEmun", data: [] }, |
| | | }, |
| | | { |
| | | field: "creater", |
| | |
| | | { |
| | | public enum PalletTypeEnum |
| | | { |
| | | /// <summary> |
| | | /// 空箱 |
| | | /// </summary> |
| | | Empty = -1, |
| | | |
| | | None = 0, |
| | | |
| | | /// <summary> |
| | |
| | | [Description("åºåºå®æ")] |
| | | åºåºå®æ = 2, |
| | | |
| | | [Description("æ£é宿")] |
| | | æ£é宿 = 3, |
| | | |
| | | [Description("æ¤é")] |
| | | æ¤é = 99 |
| | | } |
| | |
| | | WebResponseContent GetInboundOrders(SaveModel saveModel); |
| | | WebResponseContent MaterielGroup(int inboundOrderId, string palletCode, string serNum); |
| | | |
| | | WebResponseContent InPinKu(string inboundOrderId,int warehouseId, List<string> serNums); |
| | | WebResponseContent MaterielGroup(string palletCode, int Initiallife, int warehouseId, List<string> serNums); |
| | | |
| | | //WebResponseContent FeedbackInboundOrder(int id); |
| | |
| | | /// <returns></returns> |
| | | //WebResponseContent RequestInboundTask(string palletCode, string stationCode); |
| | | WebResponseContent RequestInboundTask(SaveModel saveModel); |
| | | /// <summary> |
| | | /// 空箱å
¥åº |
| | | /// </summary> |
| | | /// <param name="barcode"></param> |
| | | /// <param name="address"></param> |
| | | /// <returns></returns> |
| | | WebResponseContent InEmpty(string barcode, string address, int WarehouseId); |
| | | |
| | | /// <summary> |
| | | /// WCSç³è¯·å
¥åº |
| | |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// å
¥å¹³åºï¼ç´æ¥æ·»å åºå |
| | | /// </summary> |
| | | /// <param name="warehouseId"></param> |
| | | /// <param name="serNums"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent InPinKu(string inboundOrderId, int warehouseId, List<string> serNums) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | Dt_Warehouse warehouse = _warehouseService.Repository.QueryFirst(x => x.WarehouseId == warehouseId); |
| | | if (warehouse == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°è¯¥ä»åºä¿¡æ¯"); |
| | | } |
| | | Dt_InboundOrder inboundOrder = BaseDal.Db.Queryable<Dt_InboundOrder>().Where(x => x.InboundOrderNo == inboundOrderId && x.WarehouseId == warehouse.WarehouseId).Includes(x => x.Details).First(); |
| | | if (inboundOrder == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°å
¥åºåä¿¡æ¯"); |
| | | } |
| | | if (inboundOrder.Details == null || inboundOrder.Details.Count <= 0) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°å
¥åºåæç»ä¿¡æ¯"); |
| | | } |
| | | |
| | | //å
¥åºæç»å宿æ°é |
| | | int oldCount = inboundOrder.Details.Where(x => x.OrderDetailStatus == OrderDetailStatusEnum.Over.ObjToInt()).ToList().Count; |
| | | |
| | | Dt_ReceiveOrder receiveOrder = _inboundRepository.ReceiveOrderRepository.Db.Queryable<Dt_ReceiveOrder>().Where(x => x.ReceiveOrderNo == inboundOrder.UpperOrderNo).Includes(x => x.Details).First(); |
| | | if (receiveOrder == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°å¯¹åºçæ¶è´§å"); |
| | | } |
| | | if (receiveOrder.Details == null || receiveOrder.Details.Count <= 0) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°å¯¹åºçæ¶è´§åæç»"); |
| | | } |
| | | |
| | | List<string> purchaseOrderNos = receiveOrder.Details.Select(x => x.PurchaseOrderNo).ToList(); |
| | | |
| | | List<MatSerNumAnalysisModel> models = CodeAnalysisHelper.CodeAnalysis<MatSerNumAnalysisModel>(AnalysisCodeEnum.MatSerNumAnalysis, serNums); |
| | | |
| | | if (models.Select(x => x.MaterielCode).Distinct().Count() > 1) |
| | | { |
| | | return WebResponseContent.Instance.Error($"ç©æä¸å¯æ··æ¾"); |
| | | } |
| | | |
| | | string materielCode = models.FirstOrDefault()?.MaterielCode ?? ""; |
| | | Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterielCode == materielCode); |
| | | if (materielInfo == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°è¯¥ç©æçä¿¡æ¯"); |
| | | } |
| | | |
| | | List<Dt_InboundOrderDetail> inboundOrderDetails = inboundOrder.Details.Where(x => x.MaterielCode == materielCode).ToList(); |
| | | |
| | | if (inboundOrderDetails == null || inboundOrderDetails.Count <= 0) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªå¨å
¥åºåæç»ä¸æ¾å°è¯¥ç©æä¿¡æ¯"); |
| | | } |
| | | foreach (var model in models) |
| | | { |
| | | if (!inboundOrderDetails.Any(x => x.BatchNo == model.LotNo)) |
| | | return WebResponseContent.Instance.Error($"æªå¨å
¥åºåæç»ä¸æ¾å°è¯¥ç©ææ¹æ¬¡ã{model.LotNo}ã"); |
| | | } |
| | | if (receiveOrder.Details.FirstOrDefault(x => x.MaterielCode == materielCode) == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªå¨æ¶è´§åæç»ä¸æ¾å°è¯¥ç©æä¿¡æ¯"); |
| | | } |
| | | float beforeQuantity = 0; |
| | | Dt_StockInfo stockInfo = new Dt_StockInfo() |
| | | { |
| | | PalletCode = DateTime.Now.ToString("yyyyMMddHHmmss"), |
| | | StockStatus = StockStatusEmun.å
¥åºå®æ.ObjToInt(), |
| | | WarehouseId = inboundOrder.WarehouseId, |
| | | PalletType = PalletTypeEnum.SmallPallet.ObjToInt(), |
| | | LocationCode = "å¹³åºä½", |
| | | Details = new List<Dt_StockInfoDetail>() |
| | | }; |
| | | |
| | | List<Dt_StockInfoDetail> stockInfoDetails = new List<Dt_StockInfoDetail>(); |
| | | List<int> detailKeys = new List<int>(); |
| | | foreach (var model in models) |
| | | { |
| | | if (purchaseOrderNos.FirstOrDefault(x => x == model.PurchaseOrderNo) == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªå¨æ¶è´§åæç»ä¸æ¾å°è¯¥éè´å"); |
| | | } |
| | | |
| | | Dt_InboundOrderDetail? notGroupDetail = inboundOrderDetails.Where(x => x.OrderDetailStatus == OrderDetailStatusEnum.New.ObjToInt() && x.OrderQuantity == model.Quantity && !detailKeys.Contains(x.Id) && x.OrderQuantity > x.ReceiptQuantity).FirstOrDefault(); |
| | | |
| | | if (notGroupDetail == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"è¯¥ç©æå¨è¯¥å
¥åºåä¸å·²å
¨é¨ç»ç宿"); |
| | | } |
| | | detailKeys.Add(notGroupDetail.Id); |
| | | |
| | | Dt_StockInfoDetail stockInfoDetail = new Dt_StockInfoDetail() |
| | | { |
| | | BatchNo = model.LotNo, |
| | | MaterielCode = materielInfo.MaterielCode, |
| | | MaterielName = materielInfo.MaterielName, |
| | | OrderNo = inboundOrder.InboundOrderNo, |
| | | SerialNumber = model.SerialNumber, |
| | | StockQuantity = model.Quantity, |
| | | OutboundQuantity = 0, |
| | | Unit = materielInfo.MaterielUnit, |
| | | Status = StockStatusEmun.å
¥åºå®æ.ObjToInt(), |
| | | ProductionDate = model.ProductionDate, |
| | | EffectiveDate = model.EffectiveDate, |
| | | InboundOrderRowNo = notGroupDetail.RowNo, |
| | | }; |
| | | |
| | | if (stockInfo.Id > 0) |
| | | { |
| | | stockInfoDetail.StockId = stockInfo.Id; |
| | | } |
| | | stockInfo.Details.Add(stockInfoDetail); |
| | | |
| | | stockInfoDetails.Add(stockInfoDetail); |
| | | |
| | | notGroupDetail.ReceiptQuantity = model.Quantity; |
| | | notGroupDetail.OverInQuantity = model.Quantity; |
| | | notGroupDetail.OrderDetailStatus = OrderDetailStatusEnum.Over.ObjToInt(); |
| | | } |
| | | |
| | | //å
¥åºæç»æ°å¢å®ææ°é |
| | | int newCount = inboundOrderDetails.Where(x => x.OrderDetailStatus == OrderDetailStatusEnum.Over.ObjToInt()).ToList().Count; |
| | | if (inboundOrder.Details.Count == (newCount + oldCount)) |
| | | { |
| | | inboundOrder.OrderStatus = InOrderStatusEnum.å
¥åºå®æ.ObjToInt(); |
| | | } |
| | | else |
| | | inboundOrder.OrderStatus = InOrderStatusEnum.å
¥åºä¸.ObjToInt(); |
| | | float totalQuantity = stockInfo.Details.Sum(x => x.StockQuantity); |
| | | |
| | | _unitOfWorkManage.BeginTran(); |
| | | if (stockInfo.Id == 0) |
| | | { |
| | | _stockRepository.StockInfoRepository.Db.InsertNav(stockInfo).Include(x => x.Details).ExecuteCommand(); |
| | | } |
| | | else |
| | | { |
| | | _stockRepository.StockInfoRepository.Db.UpdateNav(stockInfo).Include(x => x.Details, new UpdateNavOptions() { OneToManyInsertOrUpdate = true }).ExecuteCommand(); |
| | | } |
| | | _inboundRepository.InboundOrderDetailRepository.UpdateData(inboundOrderDetails); |
| | | _inboundRepository.InboundOrderRepository.UpdateData(inboundOrder); |
| | | _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfoDetails, beforeQuantity, totalQuantity, StockChangeTypeEnum.Inbound); |
| | | _unitOfWorkManage.CommitTran(); |
| | | content.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ç»ç |
| | | /// </summary> |
| | |
| | | return content; |
| | | } |
| | | |
| | | |
| | | public WebResponseContent MaterielGroup(string palletCode, int Initiallife, int warehouseId, List<string> serNums) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | |
| | | Dt_PurchaseOrderDetail? purchaseOrderDetail = purchaseOrder.Details.FirstOrDefault(x => x.MaterielCode == model.MaterielCode && (x.PurchaseDetailStatus == PurchaseOrderDetailStatusEnum.NotReceived.ObjToInt() || x.PurchaseDetailStatus == PurchaseOrderDetailStatusEnum.Receiving.ObjToInt())); |
| | | if (purchaseOrderDetail == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"该æç»æ¶è´§å·²å®æ"); |
| | | return WebResponseContent.Instance.Error($"该éè´åæç»æ¶è´§å·²å®æ"); |
| | | } |
| | | //夿æ¯å¦åå¨å¯¹åºéè´æç»çæ¶è´§æç» |
| | | Dt_ReceiveOrderDetail? detail = receiveOrder.Details.FirstOrDefault(x => x.PurchaseOrderNo == model.PurchaseOrderNo && x.PurchaseOrderDetailRowNo == purchaseOrderDetail.RowNo); |
| | | if (detail != null && detail.ReceivedQuantity == purchaseOrderDetail.PurchaseDetailQuantity) |
| | | { |
| | | return WebResponseContent.Instance.Error($"该æç»å·²æ¶è´§"); |
| | | return WebResponseContent.Instance.Error($"该æ¶è´§åæç»å·²æ¶è´§"); |
| | | } |
| | | |
| | | lock (_rowNoLocker) |
| | |
| | | { |
| | | purchaseOrderDetail.PurchaseDetailStatus = PurchaseOrderDetailStatusEnum.Received.ObjToInt(); |
| | | } |
| | | float sumQty = purchaseOrder.Details.Sum(x => x.PurchaseDetailReceiveQty) + model.Quantity; |
| | | _unitOfWorkManage.BeginTran(); |
| | | else |
| | | { |
| | | purchaseOrderDetail.PurchaseDetailStatus = PurchaseOrderDetailStatusEnum.Receiving.ObjToInt(); |
| | | } |
| | | float sumQty = purchaseOrder.Details.Sum(x => x.PurchaseDetailReceiveQty); //+ model.Quantity; |
| | | if (purchaseOrder.OrderQuantity == sumQty) |
| | | { |
| | | purchaseOrder.PurchaseOrderStatus = PurchaseOrderStatusEnum.Received.ObjToInt(); |
| | | _inboundRepository.PurchaseOrderRepository.UpdateData(purchaseOrder); |
| | | } |
| | | else |
| | | { |
| | | purchaseOrder.PurchaseOrderStatus = PurchaseOrderStatusEnum.Receiving.ObjToInt(); |
| | | } |
| | | _unitOfWorkManage.BeginTran(); |
| | | _inboundRepository.PurchaseOrderRepository.UpdateData(purchaseOrder); |
| | | BaseDal.UpdateData(detail); |
| | | _inboundRepository.PurchaseOrderDetailRepository.UpdateData(purchaseOrderDetail); |
| | | _unitOfWorkManage.CommitTran(); |
| | |
| | | { |
| | | purchaseOrderDetail.PurchaseDetailStatus = PurchaseOrderDetailStatusEnum.Received.ObjToInt(); |
| | | } |
| | | float sumQty = purchaseOrder.Details.Sum(x => x.PurchaseDetailReceiveQty) + model.Quantity; |
| | | float sumQty = purchaseOrder.Details.Sum(x => x.PurchaseDetailReceiveQty);// + model.Quantity; |
| | | _unitOfWorkManage.BeginTran(); |
| | | BaseDal.AddData(receiveOrderDetail); |
| | | if (purchaseOrder.OrderQuantity == sumQty) |
| | |
| | | receiveOrder.ReceiveOrderStatus = ReceiveOrderStatusEnum.Completed.ObjToInt(); |
| | | receiveOrder.UploadStatus = WhetherEnum.True.ObjToInt(); |
| | | BaseDal.UpdateData(receiveOrder); |
| | | //å建å
¥åºå |
| | | CreateInboundOrder(orderId); |
| | | //æ¶è´§æ¨éè³ERP æµè¯æ³¨é |
| | | _invokeERPService.InvokeMatReceiveApi(receiveModel); |
| | | //_invokeERPService.InvokeMatReceiveApi(receiveModel); |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | var palletCode = saveModel.MainData["barcode"].ToString(); |
| | | var warehouseId = saveModel.MainData["warehouseId"].ObjToInt(); |
| | | Dt_StockInfo stockInfo = BaseDal.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode && x.WarehouseId == warehouseId).Includes(x => x.Details).First(); |
| | | if (stockInfo.StockStatus != StockStatusEmun.åºåºå®æ.ObjToInt()) |
| | | { |
| | | throw new Exception($"该æçè¿æªåºåºå®æ"); |
| | | } |
| | | if (stockInfo == null) |
| | | { |
| | | throw new Exception($"æªæ¾å°åºåä¿¡æ¯"); |
| | |
| | | { |
| | | throw new Exception($"æªæ¾å°åºå详æ
"); |
| | | } |
| | | List<Dt_OutStockLockInfo> stockLockInfos = BaseDal.QueryData(x => x.StockId == stockInfo.Id && x.Status < OutLockStockStatusEnum.åºåºå®æ.ObjToInt()); |
| | | List<Dt_OutStockLockInfo> stockLockInfos = BaseDal.QueryData(x => x.StockId == stockInfo.Id && x.Status == OutLockStockStatusEnum.åºåºå®æ.ObjToInt()); |
| | | return stockLockInfos; |
| | | } |
| | | catch (Exception ex) |
| | |
| | | List<Dt_OutStockLockInfo> outStockLockInfos = Repository.QueryData(x => x.PalletCode == palletCode); |
| | | for (int i = 0; i < outStockLockInfos.Count; i++) |
| | | { |
| | | outStockLockInfos[i].Status = OutLockStockStatusEnum.åºåºå®æ.ObjToInt(); |
| | | outStockLockInfos[i].Status = OutLockStockStatusEnum.æ£é宿.ObjToInt(); |
| | | } |
| | | List<Dt_StockInfoDetail> beforeDetaile = stockInfo.Details.GroupBy(x => x.MaterielCode).Select(x => new Dt_StockInfoDetail { MaterielCode = x.Key, StockQuantity = x.Sum(v => v.StockQuantity) }).ToList(); |
| | | |
| | |
| | | #endregion << ç æ¬ 注 é >> |
| | | |
| | | using AutoMapper; |
| | | using Microsoft.AspNetCore.Mvc.ApiExplorer; |
| | | using Newtonsoft.Json; |
| | | using SqlSugar; |
| | | using System.Reflection.Emit; |
| | |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// æ¾è´§å®æ |
| | | /// </summary> |
| | | /// <param name="code"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent PutFinish(string code) |
| | | { |
| | | try |
| | | { |
| | | string response = HttpHelper.Post("http://127.0.0.1:9281/api/CTU_AGV/PutFinish", code); |
| | | |
| | | return JsonConvert.DeserializeObject<WebResponseContent>(response) ?? WebResponseContent.Instance.Error("è¿åé误"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å
¥åºä»»å¡å®æ |
| | |
| | | using System; |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// å
¥ç©ºç®± |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public WebResponseContent InEmpty(string barcode, string address, int WarehouseId) |
| | | { |
| | | try |
| | | { |
| | | Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == WarehouseId); |
| | | if (warehouse == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°åºåº"); |
| | | } |
| | | Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.QueryFirst(x => x.PalletCode == barcode && x.StockStatus != StockStatusEmun.åºåºå®æ.ObjToInt()); |
| | | if (stockInfo != null) throw new Exception($"æçå·å·²åå¨"); |
| | | stockInfo = new Dt_StockInfo() |
| | | { |
| | | PalletCode = barcode, |
| | | StockStatus = StockStatusEmun.å
¥åºç¡®è®¤.ObjToInt(), |
| | | WarehouseId = WarehouseId, |
| | | PalletType = PalletTypeEnum.Empty.ObjToInt(), |
| | | Details = new List<Dt_StockInfoDetail>() |
| | | }; |
| | | Dt_LocationInfo locationInfo = _basicRepository.LocationInfoRepository.QueryFirst(x => x.WarehouseId == WarehouseId); |
| | | if (locationInfo == null) return WebResponseContent.Instance.Error($"æªæ¾å°å½ååºåºè´§ä½ä¿¡æ¯"); |
| | | locationInfo = _basicService.LocationInfoService.AssignLocation(locationInfo.RoadwayNo, (PalletTypeEnum)stockInfo.PalletType, stockInfo.WarehouseId); |
| | | if (locationInfo == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"è´§ä½åé
失败,æªæ¾å°å¯åé
è´§ä½"); |
| | | } |
| | | |
| | | Dt_Task newTask = new Dt_Task() |
| | | { |
| | | CurrentAddress = address, |
| | | Grade = 0, |
| | | NextAddress = locationInfo.LocationCode, |
| | | PalletCode = barcode, |
| | | Roadway = locationInfo.RoadwayNo, |
| | | SourceAddress = address, |
| | | TargetAddress = locationInfo.LocationCode, |
| | | TaskType = TaskTypeEnum.Inbound.ObjToInt(), |
| | | TaskStatus = TaskStatusEnum.New.ObjToInt(), |
| | | WarehouseId = stockInfo.WarehouseId, |
| | | PalletType = stockInfo.PalletType |
| | | }; |
| | | |
| | | _unitOfWorkManage.BeginTran(); |
| | | int taskId = BaseDal.AddData(newTask); |
| | | newTask.TaskId = taskId; |
| | | _stockRepository.StockInfoRepository.AddData(stockInfo); |
| | | _unitOfWorkManage.CommitTran(); |
| | | PushTasksToWCS(new List<Dt_Task> { newTask }); |
| | | PutFinish(address); |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | public WebResponseContent OutEmpty(int qty, string address, int WarehouseId) |
| | | { |
| | | try |
| | | { |
| | | Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == WarehouseId); |
| | | if (warehouse == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°åºåº"); |
| | | } |
| | | var stockInfos = _stockRepository.StockInfoRepository.QueryData(x => x.WarehouseId == WarehouseId && x.PalletType == PalletTypeEnum.Empty.ObjToInt() && x.StockStatus == StockStatusEmun.å
¥åºå®æ.ObjToInt(), qty, nameof(Dt_StockInfo.CreateDate)); |
| | | if (stockInfos == null) return WebResponseContent.Instance.Error($"{warehouse.WarehouseName}æªæ¾å°ç©ºç®±åºå"); |
| | | if (stockInfos.Count < qty) return WebResponseContent.Instance.Error($"{warehouse.WarehouseName}空箱åºåä¸è¶³,åºåæ°ã{stockInfos.Count}ã"); |
| | | List<Dt_Task> tasks = GetTasks(stockInfos); |
| | | stockInfos.ForEach(x => |
| | | { |
| | | x.StockStatus = StockStatusEmun.åºåºéå®.ObjToInt(); |
| | | }); |
| | | _unitOfWorkManage.BeginTran(); |
| | | BaseDal.AddData(tasks); |
| | | _stockRepository.StockInfoRepository.UpdateData(stockInfos); |
| | | _unitOfWorkManage.CommitTran(); |
| | | PushTasksToWCS(tasks); |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | public WebResponseContent DeviceRequestInboundTask(string stationCode, string roadwayNo, string palletCode) |
| | | { |
| | | try |
| | |
| | | WMSTaskDTO wMSTaskDTO = _mapper.Map<WMSTaskDTO>(newTask); |
| | | |
| | | PushTasksToWCS(new List<Dt_Task> { newTask }); |
| | | if (newTask.WarehouseId == 5) PutFinish(stationCode); |
| | | return WebResponseContent.Instance.OK(data: wMSTaskDTO); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å
¥å¹³åº |
| | | /// </summary> |
| | | /// <param name="orderNo"></param> |
| | | /// <param name="warehouseId"></param> |
| | | /// <param name="serNums"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("InPinKu")] |
| | | public WebResponseContent InPinKu(string orderNo, int warehouseId, [FromBody] List<string> serNums) |
| | | { |
| | | return Service.InPinKu(orderNo, warehouseId, serNums); |
| | | } |
| | | /// <summary> |
| | | /// åä¸ªç©æç ç»ç |
| | | /// </summary> |
| | | /// <param name="inboundOrderId"></param> |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// 空箱å
¥åº |
| | | /// </summary> |
| | | /// <param name="stationCode"></param> |
| | | /// <param name="roadwayNo"></param> |
| | | /// <param name="palletCode"></param> |
| | | /// <param name="barcode">æçå·</param> |
| | | /// <param name="address">å°å</param> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("InEmpty"), AllowAnonymous] |
| | | public WebResponseContent InEmpty(string barcode, string address, int WarehouseId) |
| | | { |
| | | return Service.InEmpty(barcode, address, WarehouseId); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 空箱åºåº |
| | | /// </summary> |
| | | /// <param name="qty">æ°é</param> |
| | | /// <param name="address">å°å</param> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("OutEmpty"), AllowAnonymous] |
| | | public WebResponseContent OutEmpty(int qty, string address, int WarehouseId) |
| | | { |
| | | return Service.OutEmpty(qty, address, WarehouseId); |
| | | } |
| | | |
| | | [HttpPost, HttpGet, Route("DeviceRequestInboundTask"), AllowAnonymous] |
| | | public WebResponseContent DeviceRequestInboundTask(string stationCode, string roadwayNo, string palletCode) |
| | | { |
| | |
| | | /// <param name="stockSelectViews"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("GenerateOutboundTask"), AllowAnonymous] |
| | | public WebResponseContent GenerateOutboundTask(int orderDetailId, [FromBody]List<StockSelectViewDTO> stockSelectViews) |
| | | public WebResponseContent GenerateOutboundTask(int orderDetailId, [FromBody] List<StockSelectViewDTO> stockSelectViews) |
| | | { |
| | | return Service.GenerateOutboundTask(orderDetailId, stockSelectViews); |
| | | } |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/stash/AGVFinish", |
| | | "style": { |
| | | "navigationBarTitleText": "AGV宿", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/stash/InEmpty", |
| | | "style": { |
| | | "navigationBarTitleText": "空箱å
¥åº", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/stash/OutEmpty", |
| | | "style": { |
| | | "navigationBarTitleText": "空箱åºåº", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/stash/pickingMat", |
| | | "style": { |
| | | "navigationBarTitleText": "æ£é", |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <view class="itemstyle"> |
| | | <uni-forms label-width="180"> |
| | | <uni-forms-item label="æçæ¡ç :"> |
| | | <uni-easyinput type="text" placeholder="è¯·æ«ææçæ¡ç " ref='midInput' :focus="!focus" v-model="barcode" |
| | | @input="barcodeInput" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item> |
| | | <button @click="AGVFinish" type="primary" size="default" style="margin-top: 2%;">ç¡®è®¤å®æ</button> |
| | | </uni-forms-item> |
| | | </uni-forms> |
| | | </view> |
| | | <u-toast ref="uToast" /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | const innerAudioContext = uni.createInnerAudioContext(); |
| | | export default { |
| | | data() { |
| | | return { |
| | | focus: false, |
| | | barcode: "", |
| | | } |
| | | }, |
| | | onShow() {}, |
| | | onLoad(res) { |
| | | this.focus = false; |
| | | }, |
| | | methods: { |
| | | voiceSpeech(src) { |
| | | innerAudioContext.src = src; // '../../static/success.mp3'; |
| | | innerAudioContext.play(); |
| | | }, |
| | | barcodeInput() { |
| | | this.$nextTick(function(x) { |
| | | if (this.barcode.length > 0) { |
| | | this.focus = true; |
| | | } |
| | | }) |
| | | }, |
| | | AGVFinish() { |
| | | if (this.barcode == "") { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«ææçç ", |
| | | type: 'error' |
| | | }) |
| | | return; |
| | | } |
| | | this.$u.post('http://127.0.0.1:9291/api/CTU_AGV/AGVFinish?&barcode=' + this.barcode).then( |
| | | res => { |
| | | if (res.status) { |
| | | this.$refs.uToast.show({ |
| | | title: "宿æå", |
| | | type: "success" |
| | | }) |
| | | this.barcode = ""; |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import '@/common/uni-ui.scss'; |
| | | |
| | | .content { |
| | | display: flex; |
| | | height: 150px; |
| | | } |
| | | |
| | | .content-text { |
| | | font-size: 14px; |
| | | color: #666; |
| | | } |
| | | |
| | | .itemstyle { |
| | | margin-top: 30px; |
| | | margin-left: 5%; |
| | | } |
| | | |
| | | .headerstyle { |
| | | width: 90%; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <view class="itemstyle"> |
| | | <uni-forms label-width="180"> |
| | | <uni-forms-item label="æçæ¡ç :"> |
| | | <uni-easyinput type="text" placeholder="è¯·æ«ææçæ¡ç " ref='midInput' :focus="!focus" v-model="barcode" |
| | | @input="barcodeInput" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item> |
| | | <button @click="InEmpty" type="primary" size="default" style="margin-top: 2%;">空箱å
¥åº</button> |
| | | </uni-forms-item> |
| | | </uni-forms> |
| | | </view> |
| | | <u-toast ref="uToast" /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | const innerAudioContext = uni.createInnerAudioContext(); |
| | | export default { |
| | | data() { |
| | | return { |
| | | focus: false, |
| | | barcode: "", |
| | | address: "", |
| | | WarehouseId: "" |
| | | } |
| | | }, |
| | | onShow() {}, |
| | | onLoad(res) { |
| | | this.WarehouseId = res.warehouseId; |
| | | this.focus = false; |
| | | if (res.warehouseId == 5) { |
| | | this.address = "8005"; |
| | | } |
| | | }, |
| | | methods: { |
| | | voiceSpeech(src) { |
| | | innerAudioContext.src = src; // '../../static/success.mp3'; |
| | | innerAudioContext.play(); |
| | | }, |
| | | barcodeInput() { |
| | | this.$nextTick(function(x) { |
| | | if (this.barcode.length > 0) { |
| | | this.focus = true; |
| | | } |
| | | }) |
| | | }, |
| | | InEmpty() { |
| | | if (this.barcode == "") { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«ææçç ", |
| | | type: 'error' |
| | | }) |
| | | return; |
| | | } |
| | | this.$u.post('/api/Task/InEmpty?barcode=' + this.barcode + '&address=' + this.address + '&WarehouseId=' + |
| | | this.WarehouseId).then( |
| | | res => { |
| | | if (res.status) { |
| | | this.$refs.uToast.show({ |
| | | title: "æå", |
| | | type: "success" |
| | | }) |
| | | this.barcode = ""; |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import '@/common/uni-ui.scss'; |
| | | |
| | | .content { |
| | | display: flex; |
| | | height: 150px; |
| | | } |
| | | |
| | | .content-text { |
| | | font-size: 14px; |
| | | color: #666; |
| | | } |
| | | |
| | | .itemstyle { |
| | | margin-top: 30px; |
| | | margin-left: 5%; |
| | | } |
| | | |
| | | .headerstyle { |
| | | width: 90%; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <view class="itemstyle"> |
| | | <uni-forms label-width="180"> |
| | | <uni-forms-item label="æ°é:"> |
| | | <uni-easyinput type="text" placeholder="请è¾å
¥æ°é" ref='midInput' :focus="!focus" v-model="qty" |
| | | @input="barcodeInput" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item> |
| | | <button @click="OutEmpty" type="primary" size="default" style="margin-top: 2%;">空箱åºåº</button> |
| | | </uni-forms-item> |
| | | </uni-forms> |
| | | </view> |
| | | <u-toast ref="uToast" /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | const innerAudioContext = uni.createInnerAudioContext(); |
| | | export default { |
| | | data() { |
| | | return { |
| | | focus: false, |
| | | qty: "", |
| | | address: "", |
| | | } |
| | | }, |
| | | onShow() {}, |
| | | onLoad(res) { |
| | | this.WarehouseId = res.warehouseId; |
| | | this.focus = false; |
| | | if (res.warehouseId == 5) { |
| | | this.address = "8001"; |
| | | } |
| | | }, |
| | | methods: { |
| | | voiceSpeech(src) { |
| | | innerAudioContext.src = src; // '../../static/success.mp3'; |
| | | innerAudioContext.play(); |
| | | }, |
| | | barcodeInput() { |
| | | // this.$nextTick(function(x) { |
| | | // if (this.barcode.length > 0) { |
| | | // this.focus = true; |
| | | // } |
| | | // }) |
| | | }, |
| | | OutEmpty() { |
| | | if (this.qty == "") { |
| | | this.$refs.uToast.show({ |
| | | title: "请è¾å
¥æ°é", |
| | | type: 'error' |
| | | }) |
| | | return; |
| | | } |
| | | this.$u.post('/api/Task/OutEmpty?qty=' + this.qty + '&address=' + this.address + '&WarehouseId=' + |
| | | this.WarehouseId).then( |
| | | res => { |
| | | if (res.status) { |
| | | this.$refs.uToast.show({ |
| | | title: "æå", |
| | | type: "success" |
| | | }) |
| | | this.qty = ""; |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import '@/common/uni-ui.scss'; |
| | | |
| | | .content { |
| | | display: flex; |
| | | height: 150px; |
| | | } |
| | | |
| | | .content-text { |
| | | font-size: 14px; |
| | | color: #666; |
| | | } |
| | | |
| | | .itemstyle { |
| | | margin-top: 30px; |
| | | margin-left: 5%; |
| | | } |
| | | |
| | | .headerstyle { |
| | | width: 90%; |
| | | } |
| | | </style> |
| | |
| | | } |
| | | this.$u.post('/api/OutStockLockInfo/MaterialPick?palletCode=' + this.barcode, {}).then(res => { |
| | | if (res.status) { |
| | | if(this.warehouseId==5){ |
| | | this.Finish("8005"); |
| | | } |
| | | |
| | | uni.$showMsg('æ£éæå!') |
| | | this.barcode = ""; |
| | | this.matInfos = []; |
| | |
| | | } |
| | | }) |
| | | }, |
| | | Finish(code){ |
| | | this.$u.post('http://127.0.0.1:9291/api/CTU_AGV/PutFinish?&code=' + code).then( |
| | | res => { |
| | | if (res.status) { |
| | | // this.$refs.uToast.show({ |
| | | // title: "宿æå", |
| | | // type: "success" |
| | | // }) |
| | | // this.barcode = ""; |
| | | } else { |
| | | // this.$refs.uToast.show({ |
| | | // title: res.message, |
| | | // type: "error" |
| | | // }) |
| | | } |
| | | }) |
| | | }, |
| | | inputChange(e) { |
| | | this.$nextTick(() => { |
| | | this.istrue = false; |
| | |
| | | <uni-easyinput type="text" placeholder="è¯·æ«æå
ç®±æ ç¾" ref='midInput' :focus="focus" |
| | | v-model="materSn" @input="snInput" /> |
| | | </uni-forms-item> |
| | | |
| | | |
| | | <uni-forms-item :label="Testlabel" v-if="Test"> |
| | | <uni-easyinput type="text" :placeholder="Testplaceholder" ref='midInput' |
| | | v-model="Initiallife" /> |
| | | </uni-forms-item> |
| | | |
| | | |
| | | <!-- <uni-forms-item> |
| | | <checkbox checked="check">æ¯å¦æ»¡ç</checkbox> |
| | | </uni-forms-item> --> |
| | |
| | | </view> |
| | | <view v-if="current === 3" class="headerstyle"> |
| | | <view class="itemstyle"> |
| | | <uni-forms label-width="120"> |
| | | <uni-forms-item> |
| | | <uni-easyinput type="text" @input="releaseboxInput" v-model="value" placeholder="请æ«ç " |
| | | ref='midInput' :focus="true" /> |
| | | <uni-forms label-width="180"> |
| | | <uni-forms-item label="å
ç®±æ ç¾:"> |
| | | <uni-easyinput type="text" placeholder="è¯·æ«æå
ç®±æ ç¾" ref='midInput' :focus="pkfocus" |
| | | v-model="pkmaterSn" @input="pksnInput" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item> |
| | | <button @click="releasebox" type="primary" size="default">è§£ç</button> |
| | | <button @click="pksubmit" type="primary" size="default" style="margin-top: 2%;">å
¥å¹³åº</button> |
| | | </uni-forms-item> |
| | | </uni-forms> |
| | | <uni-list> |
| | | <uni-list-item direction="column" v-if="value2"> |
| | | <uni-list-item direction="column" v-for="(item,index) in pkmatInfos" :key="index"> |
| | | <template v-slot:body> |
| | | <view class="uni-list-box"> |
| | | <uni-icons type="trash" size="22" style="position: absolute;right: 5%;" |
| | | @click="pkdeleteList(index)"> |
| | | </uni-icons> |
| | | <view class="uni-content"> |
| | | <view class="uni-title-sub uni-ellipsis-2">æçå·ï¼{{value2}}</view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | </uni-list-item> |
| | | <uni-list-item direction="column" v-for="item in matTotal" :key="item.matCode"> |
| | | <template v-slot:body> |
| | | <view class="uni-list-box"> |
| | | <view class="uni-content"> |
| | | <view class="uni-title-sub uni-ellipsis-2">ç©æç¼ç ï¼{{item.matCode}}</view> |
| | | <view class="uni-title-sub uni-ellipsis-2">æ°éï¼{{item.matQuantity}}</view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | </uni-list-item> |
| | | |
| | | <uni-list-item direction="column" v-for="(item,index) in matInfo" :key="index"> |
| | | <template v-slot:body> |
| | | <view class="uni-list-box"> |
| | | <view class="uni-content"> |
| | | <view class="uni-title-sub uni-ellipsis-2" style="font-size: 1.1em;"> |
| | | ç©æç¼ç ï¼{{item.matCode}} |
| | | </view> |
| | | <view class="uni-title-sub uni-ellipsis-2" style="font-size: 1.1em;"> |
| | | ç©æåç§°ï¼{{item.matName}} |
| | | </view> |
| | | <view class="uni-title-sub uni-ellipsis-2" style="font-size: 1.1em;"> |
| | | æ°éï¼{{item.matQty}} |
| | | </view> |
| | | <view class="uni-title-sub uni-ellipsis-2">éè´åå·ï¼{{item.purchaseOrderNo}}</view> |
| | | <view class="uni-note">ç©æç¼ç ï¼{{item.materielCode}}</view> |
| | | <view class="uni-note">æ¹æ¬¡å·ï¼{{item.lotNo}}</view> |
| | | <view class="uni-note">æ°éï¼{{item.quantity}}</view> |
| | | <view class="uni-note">çäº§æ¥æï¼{{item.productionDate}}</view> |
| | | <view class="uni-note">æææï¼{{item.effectiveDate}}</view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | |
| | | label: "", |
| | | orderInfo: [], |
| | | focus: false, |
| | | pkfocus:false, |
| | | barcode: "", |
| | | materSn: "", |
| | | Initiallife: 1000, |
| | | sns: [], |
| | | pksns:[], |
| | | addressFocus: false, |
| | | inboundBarcode: "", |
| | | address: "", |
| | |
| | | Testlabel: "", |
| | | Testplaceholder: "", |
| | | Testcheck: false, |
| | | pkmaterSn: "", |
| | | pkmatInfos: [] |
| | | } |
| | | }, |
| | | onShow() {}, |
| | |
| | | this.Testlabel = "æ°é:"; |
| | | this.Testplaceholder = "请è¾å
¥æ°é"; |
| | | this.Initiallife = 16; |
| | | } else if (this.warehouseId == 5) { //è¾
æ |
| | | this.items.push("å
¥å¹³åº"); |
| | | this.items[1] = "å
¥ç«åº"; |
| | | this.address = "8005"; |
| | | } |
| | | this.label = "åæ®ç¼å·ï¼" + this.orderNo; |
| | | this.getData(); |
| | |
| | | this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + matSn, {}).then((res) => { |
| | | this.Testcheck = false; |
| | | if (res.status) { |
| | | // debugger |
| | | // this.matTotal.push({ |
| | | // matCode: res.data.materielCode, |
| | | // matQuantity: parseInt(res.data.quantity) |
| | | // }); |
| | | this.sns.push(res.data.serialNumber); |
| | | |
| | | // this.matInfos.splice(0, this.matInfos.length); |
| | | this.matInfos.push(res.data); |
| | | if (res.message) { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | // setTimeout(this.updateFocus,200); |
| | | setTimeout(() => { |
| | | this.voiceSpeech('../../static/fail.mp3'); |
| | | }, 100); |
| | | return; |
| | | } |
| | | // setTimeout(this.updateFocus,200); |
| | | setTimeout(() => { |
| | | this.voiceSpeech('../../static/success.mp3'); |
| | | }, 100); |
| | | } else { |
| | | // this.innerCode = ""; |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | // setTimeout(this.updateFocus,200); |
| | | setTimeout(() => { |
| | | this.voiceSpeech('../../static/fail.mp3'); |
| | | }, 100); |
| | | } |
| | | }) |
| | | |
| | | |
| | | // var matInfo = matSn.split('|'); |
| | | |
| | | // if (matInfo.length == 7) { |
| | | // var matObj = { |
| | | // matCode: matInfo[1], |
| | | // matProductionDate: matInfo[3], |
| | | // matQty: matInfo[5], |
| | | // orderNo: matInfo[6], |
| | | // sn: matSn |
| | | // } |
| | | // var temp = this.matInfos.find(x => x.orderNo == matObj.orderNo); |
| | | // if (!temp) { |
| | | // var tmp = this.matTotal.find(x => x.matCode == matObj.matCode); |
| | | // if (!tmp) { |
| | | // this.matTotal.push({ |
| | | // matCode: matObj.matCode, |
| | | // matQuantity: parseInt(matObj.matQty) |
| | | // }) |
| | | // } else { |
| | | // tmp.matQuantity += parseInt(matObj.matQty); |
| | | // } |
| | | // this.sns.push(matSn); |
| | | // this.matInfos.push(matObj); |
| | | // setTimeout(this.updateFocus, 200); |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/success.mp3'); |
| | | // }, 100); |
| | | // } else { |
| | | // this.$refs.uToast.show({ |
| | | // title: "æ«ç éå¤", |
| | | // type: "error" |
| | | // }) |
| | | // setTimeout(this.updateFocus, 200); |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/fail.mp3'); |
| | | // }, 100); |
| | | // } |
| | | // } else { |
| | | // this.$refs.uToast.show({ |
| | | // title: "æ«ç é误,è¯·æ«ææ£ç¡®å
ç®±ç ", |
| | | // type: "error" |
| | | // }) |
| | | // setTimeout(this.updateFocus, 200); |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/fail.mp3'); |
| | | // }, 100); |
| | | // } |
| | | } |
| | | }) |
| | | }, |
| | | pksnInput() { |
| | | this.$nextTick(() => { |
| | | if (this.pkmaterSn != "") { |
| | | this.focus = false; |
| | | var matSn = this.pkmaterSn; |
| | | setTimeout(() => { |
| | | this.pkmaterSn = ""; |
| | | }, 10); |
| | | this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + matSn, {}).then((res) => { |
| | | if (res.status) { |
| | | this.pksns.push(res.data.serialNumber); |
| | | this.pkmatInfos.push(res.data); |
| | | if (res.message) { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | setTimeout(() => { |
| | | this.voiceSpeech('../../static/fail.mp3'); |
| | | }, 100); |
| | | return; |
| | | } |
| | | setTimeout(() => { |
| | | this.voiceSpeech('../../static/success.mp3'); |
| | | }, 100); |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | setTimeout(() => { |
| | | this.voiceSpeech('../../static/fail.mp3'); |
| | | }, 100); |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | |
| | | } |
| | | this.$u.post('/api/Task/RequestInboundTask', postData).then(res => { |
| | | if (res.status) { |
| | | uni.$showMsg(res.message); |
| | | this.inboundBarcode = ""; |
| | | this.address = ""; |
| | | if (this.warehouseId != 5) this.address = ""; |
| | | setTimeout(() => { |
| | | this.addressFocus = false; |
| | | this.$refs.uToast.show({ |
| | | title: "æå", |
| | | type: "success" |
| | | }) |
| | | }, 200); |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | |
| | | this.matInfos.splice(res, 1); |
| | | this.sns.splice(res, 1); |
| | | }, |
| | | pkdeleteList(res) { |
| | | this.pkmatInfos.splice(res, 1); |
| | | this.pksns.splice(res, 1); |
| | | }, |
| | | pksubmit(){ |
| | | if (this.pkmatInfos.length == 0) { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«æå
ç®±æ ç¾", |
| | | type: 'error' |
| | | }) |
| | | return; |
| | | } |
| | | this.$u.post('/api/InboundOrder/InPinKu?warehouseId=' + this.warehouseId+"&orderNo="+ this.orderNo, this.pksns).then(res => { |
| | | if (res.status) { |
| | | this.$refs.uToast.show({ |
| | | title: "å
¥åºæå", |
| | | type: "success" |
| | | }) |
| | | this.focus = false; |
| | | this.pkmatInfos = []; |
| | | this.pksns = []; |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | submit() { |
| | | if (this.barcode == "") { |
| | | this.$refs.uToast.show({ |
| | |
| | | title: "确认æ¶è´§æå", |
| | | type: "success" |
| | | }) |
| | | this.orderInfo=[]; |
| | | this.sns = ""; |
| | | } else { |
| | | this.$refs.uToast.show({ |