| | |
| | | printWindow.focus(); |
| | | printWindow.print(); |
| | | printWindow.close(); |
| | | this.http |
| | | .post("api/palletCodeInfo/PrintStatusUp?printCode="+this.palletCode, null, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | | this.$parent.refresh(); |
| | | this.showDetialBox = false; |
| | | }); |
| | | }, |
| | | }, |
| | | |
| | | created() {}, |
| | | }; |
| | | </script> |
| | |
| | | }); |
| | | }, |
| | | outbound() { |
| | | if(this.selection.length<=0){ |
| | | return this.$message.error("请å¾é"); |
| | | } |
| | | this.http |
| | | .post( |
| | | "api/Task/GenerateOutboundTask?id=" + this.row.id, |
| | | "api/Task/GenerateOutboundTask?orderDetailId=" + this.row.id, |
| | | this.selection, |
| | | "æ°æ®å¤çä¸" |
| | | ) |
| | |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | let InOrder = this.buttons.find(x => x.value == 'StockOutbound'); |
| | | if (InOrder) { |
| | | InOrder.onClick = function () { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©æ°æ®!"); |
| | | if (rows.length > 1) return this.$error("è¯·éæ©åæ¡æ°æ®!"); |
| | | var keys = rows.map(x => { return x.stockId }); |
| | | this.http |
| | | .post("api/Task/Outbound?id="+keys[0], null, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | | this.refresh(); |
| | | }); |
| | | } |
| | | } |
| | | // let InOrder = this.buttons.find(x => x.value == 'StockOutbound'); |
| | | // if (InOrder) { |
| | | // InOrder.onClick = function () { |
| | | // let rows = this.$refs.table.getSelected(); |
| | | // if (rows.length == 0) return this.$error("è¯·éæ©æ°æ®!"); |
| | | // if (rows.length > 1) return this.$error("è¯·éæ©åæ¡æ°æ®!"); |
| | | // var keys = rows.map(x => { return x.stockId }); |
| | | // this.http |
| | | // .post("api/Task/Outbound?id="+keys[0], null, "æ°æ®å¤çä¸") |
| | | // .then((x) => { |
| | | // if (!x.status) return this.$message.error(x.message); |
| | | // this.$message.success("æä½æå"); |
| | | // this.refresh(); |
| | | // }); |
| | | // } |
| | | // } |
| | | this.columns.forEach(column => { |
| | | if (column.field == 'materielCode') { |
| | | column.formatter = (row) => { |
| | |
| | | return '<span style="color: #F56C6C">'+ daysSinceClosest+"天"+'</span>'; |
| | | } |
| | | } |
| | | if (column.field == 'sumStock') { |
| | | column.formatter = (row) => { |
| | | var sum=0; |
| | | const closestDate = row.details |
| | | .map(x => { |
| | | sum+=(x.stockQuantity) |
| | | }) |
| | | return '<span style="color: #F56C6C">'+ sum+row.details[0].unit+'</span>'; |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | onInited() { |
| | |
| | | }, |
| | | { |
| | | field: "modifier", |
| | | title: "ä¿®æ¹äºº", |
| | | title: "æåæå°äººå", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifyDate", |
| | | title: "ä¿®æ¹æ¶é´", |
| | | title: "æåæå°æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | |
| | | field: "orderNo", |
| | | title: "åæ®ç¼å·", |
| | | type: "string", |
| | | readonly:true |
| | | }, |
| | | { |
| | | title: "䏿¸¸åæ®ç¼å·", |
| | |
| | | type: "string", |
| | | width: 160, |
| | | align: "left", |
| | | link: true, |
| | | // link: true, |
| | | }, |
| | | { |
| | | field: "upperOrderNo", |
| | |
| | | required: true, |
| | | }, |
| | | { |
| | | field: "rowNo", |
| | | title: "è¡å·", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | edit: { type: "number" }, |
| | | required: true, |
| | | }, |
| | | { |
| | | field: "lockQuantity", |
| | | title: "é宿°é", |
| | | type: "int", |
| | |
| | | align: "left", |
| | | hidden:true |
| | | }, |
| | | |
| | | { |
| | | field: "materielCode", |
| | | title: "æå«ç©æç¼å·", |
| | |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "sumStock", |
| | | title: "æ»åºå", |
| | | type: "string", |
| | | width: 140, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "row", |
| | | title: "è´§ä½è¡", |
| | | type: "string", |
| | |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common.CommonEnum; |
| | | using WIDESEA_Common.WareHouseEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | |
| | | return base.AddData(palletCodeInfos); |
| | | } |
| | | } |
| | | public WebResponseContent PrintStatusUp(string printCode) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | Dt_PalletCodeInfo palletCodeInfo = BaseDal.QueryFirst(x=>x.PalletCode==printCode); |
| | | if (palletCodeInfo==null) |
| | | { |
| | | return content.Error("æå°çæçç ä¸åå¨"); |
| | | } |
| | | palletCodeInfo.Status = PrintStatusEnum.Printed.ObjToInt(); |
| | | BaseDal.UpdateData(palletCodeInfo); |
| | | return content.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error("é误:"+ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | } |
| | | } |
| | |
| | | public enum PrintStatusEnum |
| | | { |
| | | /// <summary> |
| | | /// å·²æå° |
| | | /// </summary> |
| | | [Description("å·²æå°")] |
| | | Printed = 0, |
| | | /// <summary> |
| | | /// æªæå° |
| | | /// </summary> |
| | | [Description("æªæå°")] |
| | | UnPrinted =1 |
| | | UnPrinted = 0, |
| | | /// <summary> |
| | | /// å·²æå° |
| | | /// </summary> |
| | | [Description("å·²æå°")] |
| | | Printed = 1 |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | public string ToolCode { get; set; } |
| | | /// <summary> |
| | | /// æµè¯æ¶ç©æåç§° |
| | | /// </summary> |
| | | public string MaterialName { get; set; } |
| | | /// <summary> |
| | | /// åå§å¯¿å½ |
| | | /// </summary> |
| | | public int Life { get; set; } |
| | |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Model.Models; |
| | | |
| | |
| | | { |
| | | public interface IPalletCodeInfoService : IService<Dt_PalletCodeInfo> |
| | | { |
| | | //æ´æ°æå°ç¶æ |
| | | WebResponseContent PrintStatusUp(string printCode); |
| | | } |
| | | } |
| | |
| | | |
| | | WebResponseContent MaterielGroup(string palletCode, int Initiallife, int warehouseId, List<string> serNums); |
| | | |
| | | WebResponseContent FeedbackInboundOrder(int id); |
| | | //WebResponseContent FeedbackInboundOrder(int id); |
| | | |
| | | WebResponseContent MaterielGroup(SaveModel saveModel); |
| | | /// <summary> |
| | |
| | | if (warehouse.WarehouseCode == WarehouseEnum.HA64.ToString()) |
| | | { |
| | | stockInfo.Remark = Initiallife.ToString(); |
| | | string batchNo = models.FirstOrDefault()?.LotNo ?? ""; |
| | | Dt_StockInfoDetail existDetail = _stockRepository.StockInfoDetailRepository.QueryFirst(x => x.BatchNo == batchNo); |
| | | if (existDetail != null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"{batchNo}æµè¯æ¶å·²åå¨"); |
| | | } |
| | | if (models.Count>=2) |
| | | { |
| | | return WebResponseContent.Instance.Error($"ç»çæç»ä¸å¯ä¸"); |
| | | } |
| | | if (palletCode.Substring(0, 1) == "6") |
| | | { |
| | | stockInfo.PalletType = PalletTypeEnum.MediumPallet.ObjToInt(); |
| | |
| | | _inboundRepository.InboundOrderRepository.UpdateData(inboundOrder); |
| | | _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfoDetails, beforeQuantity, totalQuantity, StockChangeTypeEnum.MaterielGroup); |
| | | _unitOfWorkManage.CommitTran(); |
| | | //if (warehouse.WarehouseCode==WarehouseEnum.HA153.ToString()) |
| | | //{ |
| | | // //忥æµè¯æ¶ä¿¡æ¯ |
| | | // foreach (var model in models) |
| | | // { |
| | | // _taskService.TestSynStock(new TestToolSynInfo() { ToolCode = model.LotNo, Life = Initiallife }); |
| | | // } |
| | | //} |
| | | content.OK(); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | float beforeQuantity = 0; |
| | | |
| | | Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode).Includes(x => x.Details).First(); |
| | | |
| | | if (stockInfo == null) |
| | | { |
| | | stockInfo = new Dt_StockInfo() |
| | |
| | | |
| | | if (warehouse.WarehouseCode == WarehouseEnum.HA64.ToString()) |
| | | { |
| | | string batchNo = models.FirstOrDefault()?.LotNo ?? ""; |
| | | Dt_StockInfoDetail existDetail = _stockRepository.StockInfoDetailRepository.QueryFirst(x => x.BatchNo == batchNo); |
| | | if (existDetail != null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"{batchNo}æµè¯æ¶å·²åå¨"); |
| | | } |
| | | if (models.Count >= 2) |
| | | { |
| | | return WebResponseContent.Instance.Error($"ç»çæç»ä¸å¯ä¸"); |
| | | } |
| | | stockInfo.Remark = Initiallife.ToString(); |
| | | if (palletCode.Substring(0, 1) == "6") |
| | | { |
| | |
| | | } |
| | | _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfoDetails, beforeQuantity, totalQuantity, StockChangeTypeEnum.MaterielGroup); |
| | | _unitOfWorkManage.CommitTran(); |
| | | //忥æµè¯æ¶ä¿¡æ¯ |
| | | //foreach (var model in models) |
| | | //{ |
| | | // _taskService.TestSynStock(new TestToolSynInfo() { ToolCode = model.LotNo, Life = Initiallife }); |
| | | //} |
| | | content.OK(); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent FeedbackInboundOrder(int id) |
| | | { |
| | | try |
| | | { |
| | | Dt_InboundOrder inboundOrder = Db.Queryable<Dt_InboundOrder>().Where(x => x.Id == id).Includes(x => x.Details).First(); |
| | | if (inboundOrder == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°å
¥åºåä¿¡æ¯"); |
| | | } |
| | | if (inboundOrder.Details == null || inboundOrder.Details.Count == 0) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°å
¥åºåæç»ä¿¡æ¯"); |
| | | } |
| | | if (inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºå®æ.ObjToInt()) |
| | | { |
| | | return WebResponseContent.Instance.Error($"å
¥åºåæ®å·²å®æ"); |
| | | } |
| | | //public WebResponseContent FeedbackInboundOrder(int id) |
| | | //{ |
| | | // try |
| | | // { |
| | | // Dt_InboundOrder inboundOrder = Db.Queryable<Dt_InboundOrder>().Where(x => x.Id == id).Includes(x => x.Details).First(); |
| | | // if (inboundOrder == null) |
| | | // { |
| | | // return WebResponseContent.Instance.Error($"æªæ¾å°å
¥åºåä¿¡æ¯"); |
| | | // } |
| | | // if (inboundOrder.Details == null || inboundOrder.Details.Count == 0) |
| | | // { |
| | | // return WebResponseContent.Instance.Error($"æªæ¾å°å
¥åºåæç»ä¿¡æ¯"); |
| | | // } |
| | | // if (inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºå®æ.ObjToInt()) |
| | | // { |
| | | // return WebResponseContent.Instance.Error($"å
¥åºåæ®å·²å®æ"); |
| | | // } |
| | | |
| | | List<Dt_StockInfo> stockInfos = Db.Queryable<Dt_StockInfo>().Where(x => x.Details.Any(v => v.OrderNo == inboundOrder.InboundOrderNo)).Includes(x => x.Details).ToList(); |
| | | List<Dt_Warehouse> warehouses = Db.Queryable<Dt_Warehouse>().ToList(); |
| | | // List<Dt_StockInfo> stockInfos = Db.Queryable<Dt_StockInfo>().Where(x => x.Details.Any(v => v.OrderNo == inboundOrder.InboundOrderNo)).Includes(x => x.Details).ToList(); |
| | | // List<Dt_Warehouse> warehouses = Db.Queryable<Dt_Warehouse>().ToList(); |
| | | |
| | | List<ERPInboundDetailModel> detailModels = new List<ERPInboundDetailModel>(); |
| | | foreach (var item in inboundOrder.Details) |
| | | { |
| | | Dt_StockInfo? stockInfo = stockInfos.FirstOrDefault(x => x.Details.Any(v => v.InboundOrderRowNo == item.RowNo && v.MaterielCode == item.MaterielCode)); |
| | | if (stockInfo == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°åºåä¿¡æ¯"); |
| | | } |
| | | // List<ERPInboundDetailModel> detailModels = new List<ERPInboundDetailModel>(); |
| | | // foreach (var item in inboundOrder.Details) |
| | | // { |
| | | // Dt_StockInfo? stockInfo = stockInfos.FirstOrDefault(x => x.Details.Any(v => v.InboundOrderRowNo == item.RowNo && v.MaterielCode == item.MaterielCode)); |
| | | // if (stockInfo == null) |
| | | // { |
| | | // return WebResponseContent.Instance.Error($"æªæ¾å°åºåä¿¡æ¯"); |
| | | // } |
| | | |
| | | Dt_Warehouse? warehouse = warehouses.FirstOrDefault(x => x.WarehouseId == stockInfo.WarehouseId); |
| | | if (warehouse == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°ä»åºä¿¡æ¯"); |
| | | } |
| | | // Dt_Warehouse? warehouse = warehouses.FirstOrDefault(x => x.WarehouseId == stockInfo.WarehouseId); |
| | | // if (warehouse == null) |
| | | // { |
| | | // return WebResponseContent.Instance.Error($"æªæ¾å°ä»åºä¿¡æ¯"); |
| | | // } |
| | | |
| | | ERPInboundDetailModel detailModel = new ERPInboundDetailModel() |
| | | { |
| | | ExpiryDate = stockInfo.Details.FirstOrDefault()?.EffectiveDate ?? "", |
| | | LocationCode = warehouse.WarehouseCode, |
| | | MaterialsCode = item.MaterielCode, |
| | | MfgDate = stockInfo.Details.FirstOrDefault()?.ProductionDate ?? "", |
| | | QtyCustoms = "0", |
| | | Quantity = stockInfo.Details.Sum(x => x.StockQuantity).ToString(), |
| | | Rack = stockInfo.LocationCode, |
| | | ReceiptCode = inboundOrder.UpperOrderNo, |
| | | ReceiptSerNo = item.RowNo.ToString() |
| | | }; |
| | | detailModels.Add(detailModel); |
| | | } |
| | | Dt_Warehouse? warehouse2 = warehouses.FirstOrDefault(x => x.WarehouseId == inboundOrder.WarehouseId); |
| | | if (warehouse2 == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°ä»åºä¿¡æ¯"); |
| | | } |
| | | ERPInboundModel model = new ERPInboundModel() |
| | | { |
| | | Code = inboundOrder.InboundOrderNo, |
| | | CreatorCode = inboundOrder.Creater,//æµè¯ |
| | | EntDate = inboundOrder.CreateDate.ToString("yyyy-MM-dd HH:mm:ss"), |
| | | StockDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), |
| | | SuppliersId = inboundOrder.SupplierId, |
| | | Type = "S", |
| | | UniqueTag = inboundOrder.Id.ToString(), |
| | | WarehouseCode = warehouse2.WarehouseCode, |
| | | Way = 1, |
| | | Details = detailModels |
| | | }; |
| | | //æµè¯æ³¨é |
| | | _invokeERPService.InvokeInboundOrderApi(model); |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | // ERPInboundDetailModel detailModel = new ERPInboundDetailModel() |
| | | // { |
| | | // ExpiryDate = stockInfo.Details.FirstOrDefault()?.EffectiveDate ?? "", |
| | | // LocationCode = warehouse.WarehouseCode, |
| | | // MaterialsCode = item.MaterielCode, |
| | | // MfgDate = stockInfo.Details.FirstOrDefault()?.ProductionDate ?? "", |
| | | // QtyCustoms = "0", |
| | | // Quantity = stockInfo.Details.Sum(x => x.StockQuantity).ToString(), |
| | | // Rack = stockInfo.LocationCode, |
| | | // ReceiptCode = inboundOrder.UpperOrderNo, |
| | | // ReceiptSerNo = item.RowNo.ToString() |
| | | // }; |
| | | // detailModels.Add(detailModel); |
| | | // } |
| | | // Dt_Warehouse? warehouse2 = warehouses.FirstOrDefault(x => x.WarehouseId == inboundOrder.WarehouseId); |
| | | // if (warehouse2 == null) |
| | | // { |
| | | // return WebResponseContent.Instance.Error($"æªæ¾å°ä»åºä¿¡æ¯"); |
| | | // } |
| | | // ERPInboundModel model = new ERPInboundModel() |
| | | // { |
| | | // Code = inboundOrder.InboundOrderNo, |
| | | // CreatorCode = inboundOrder.Creater,//æµè¯ |
| | | // EntDate = inboundOrder.CreateDate.ToString("yyyy-MM-dd HH:mm:ss"), |
| | | // StockDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), |
| | | // SuppliersId = inboundOrder.SupplierId, |
| | | // Type = "S", |
| | | // UniqueTag = inboundOrder.Id.ToString(), |
| | | // WarehouseCode = warehouse2.WarehouseCode, |
| | | // Way = 1, |
| | | // Details = detailModels |
| | | // }; |
| | | // //æµè¯æ³¨é |
| | | // _invokeERPService.InvokeInboundOrderApi(model); |
| | | // return WebResponseContent.Instance.OK(); |
| | | // } |
| | | // catch (Exception ex) |
| | | // { |
| | | // return WebResponseContent.Instance.Error(ex.Message); |
| | | // } |
| | | //} |
| | | } |
| | | } |
| | |
| | | /// <summary> |
| | | /// æ¹æ¬¡å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "æ¹æ¬¡å·")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æ¹æ¬¡å·")] |
| | | public string BatchNo { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// <summary> |
| | | /// è´§ä½ç¼å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 30, ColumnDescription = "è´§ä½ç¼å·")] |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "è´§ä½ç¼å·")] |
| | | public string LocationCode { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æçç¼å·")] |
| | | public string PalletCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "åä½")] |
| | | public string Unit { get; set; } |
| | | /// <summary> |
| | | /// ä»»å¡å· |
| | | /// </summary> |
| | |
| | | /// <summary> |
| | | /// æ¹æ¬¡å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 20, ColumnDescription = "æ¹æ¬¡å·")] |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "æ¹æ¬¡å·")] |
| | | public string BatchNo { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "订åæç»ç¶æ")] |
| | | public int OrderDetailStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "åä½")] |
| | | public string Unit { get; set; } |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "æ¹æ¬¡å·")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æ¹æ¬¡å·")] |
| | | public string BatchNo { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | public int SourceId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "åä½")] |
| | | public string Unit { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "夿³¨")] |
| | |
| | | PalletCode = outStock.PalletCode, |
| | | AssignQuantity = assignQuantity, |
| | | MaterielCode = outboundOrderDetail.MaterielCode, |
| | | BatchNo = outboundOrderDetail.BatchNo, |
| | | BatchNo = outboundOrderDetail.BatchNo ?? outStock.Details.FirstOrDefault()?.BatchNo, |
| | | LocationCode = outStock.LocationCode, |
| | | MaterielName = outboundOrderDetail.MaterielName, |
| | | OrderDetailId = outboundOrderDetail.Id, |
| | |
| | | Status = taskNum == null ? OutLockStockStatusEnum.å·²åé
.ObjToInt() : OutLockStockStatusEnum.åºåºä¸.ObjToInt(), |
| | | StockId = outStock.Id, |
| | | TaskNum = taskNum, |
| | | OrderQuantity = outboundOrderDetail.OrderQuantity |
| | | OrderQuantity = outboundOrderDetail.OrderQuantity, |
| | | Unit=outboundOrderDetail.Unit, |
| | | }; |
| | | |
| | | return outStockLockInfo; |
| | |
| | | _invokeERPService = invokeERPService; |
| | | _outStockLockInfoService = outStockLockInfoService; |
| | | } |
| | | |
| | | public override WebResponseContent AddData(SaveModel saveModel) |
| | | { |
| | | if (saveModel.MainData.TryGetValue(nameof(Dt_OutboundOrder.UpperOrderNo).FirstLetterToLower(), out object? upperOrderNo) && upperOrderNo != null && !string.IsNullOrEmpty(upperOrderNo.ToString())) |
| | | { |
| | | Dt_OutboundOrder outboundOrder = BaseDal.QueryFirst(x => x.UpperOrderNo == upperOrderNo.ToString() && x.WarehouseId == Convert.ToInt32(saveModel.MainData[nameof(Dt_OutboundOrder.WarehouseId).FirstLetterToLower()])); |
| | | if (outboundOrder != null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"{upperOrderNo}颿åå·å·²åå¨"); |
| | | } |
| | | } |
| | | saveModel.DetailData[0].Add("orderDetailStatus", OrderDetailStatusEnum.New.ObjToInt()); |
| | | return base.AddData(saveModel); |
| | | } |
| | | public WebResponseContent ReceiveOutOrder(ErpOutOrderDTO model) |
| | | { |
| | | try |
| | |
| | | MaterielName = materielInfo.MaterielName, |
| | | OrderDetailStatus = OrderDetailStatusEnum.New.ObjToInt(), |
| | | OrderQuantity = model.Qty, |
| | | Unit=materielInfo.MaterielUnit |
| | | }; |
| | | Dt_OutboundOrder outboundOrder = new Dt_OutboundOrder() |
| | | { |
| | |
| | | ERPIssueModel issueModel = new ERPIssueModel(); |
| | | List<Dt_StockInfo> stockInfos = new List<Dt_StockInfo>(); |
| | | List<Dt_OutStockLockInfo> _OutStockLockInfos=new List<Dt_OutStockLockInfo>(); |
| | | if (outboundOrder==null) |
| | | { |
| | | return WebResponseContent.Instance.Error("åºåºåä¸åå¨"); |
| | | } |
| | | if (outboundOrder.CreateType == OrderCreateTypeEnum.CreateInSystem.ObjToInt()) |
| | | { |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | //æµè¯æ¶åºç»ERP䏿¥åºåºå®æ |
| | | if (outStockLockInfos.Count<=0 || outStockLockInfos==null) |
| | | if (warehouse.WarehouseCode==WarehouseEnum.HA64.ToString()) |
| | | { |
| | | stockInfos = TestOutStocksUpdate(warehouse).Data as List<Dt_StockInfo> ?? new List<Dt_StockInfo>(); |
| | | List<ERPPickItemModel> eRPOutPick =new List<ERPPickItemModel>(); |
| | |
| | | { |
| | | foreach (var model in stockInfo.Details) |
| | | { |
| | | TestSynStock(new TestToolSynInfo() { ToolCode = model.BatchNo, Life = int.TryParse(model.Remark, out int val) ? val : 1000 }); |
| | | TestSynStock(new TestToolSynInfo() { ToolCode = model.BatchNo,MaterialName=model.MaterielName ,Life = int.TryParse(model.Remark, out int val) ? val : 1000 }); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | task.TaskStatus = TaskStatusEnum.Finish.ObjToInt(); |
| | | _unitOfWorkManage.BeginTran(); |
| | | if (outboundOrderDetails.Count > 0) |
| | | { |
| | |
| | | |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, (LocationStatusEnum)beforeStatus, LocationStatusEnum.Free, LocationChangeType.OutboundCompleted, stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", task.TaskNum); |
| | | _unitOfWorkManage.CommitTran(); |
| | | |
| | | if (warehouse.WarehouseCode != WarehouseEnum.HA64.ToString()) |
| | | { |
| | | _outboundService.OutboundOrderService.TestOutUpload(outboundOrderDetails.FirstOrDefault().Id, outStockLockInfos); |
| | |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°å¯¹åºçç»ç¹è´§ä½ä¿¡æ¯"); |
| | | } |
| | | |
| | | task.TaskStatus = TaskStatusEnum.Finish.ObjToInt(); |
| | | _unitOfWorkManage.BeginTran(); |
| | | stockInfo.LocationCode = locationInfoEnd.LocationCode; |
| | | _stockService.StockInfoService.Repository.UpdateData(stockInfo); |
| | |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_Model.Models; |
| | |
| | | public PalletCodeInfoController(IPalletCodeInfoService service) : base(service) |
| | | { |
| | | } |
| | | [HttpPost,Route("PrintStatusUp")] |
| | | public WebResponseContent PrintStatusUp(string printCode) |
| | | { |
| | | return Service.PrintStatusUp(printCode); |
| | | } |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("FeedbackInboundOrder")] |
| | | public WebResponseContent FeedbackInboundOrder(int id) |
| | | { |
| | | return Service.FeedbackInboundOrder(id); |
| | | } |
| | | //[HttpPost, HttpGet, Route("FeedbackInboundOrder")] |
| | | //public WebResponseContent FeedbackInboundOrder(int id) |
| | | //{ |
| | | // return Service.FeedbackInboundOrder(id); |
| | | //} |
| | | |
| | | [HttpPost, HttpGet, Route("ManualMaterielGroup")] |
| | | public WebResponseContent MaterielGroup(string palletCode, int initiallife, int warehouseId, [FromBody] List<string> serNums) |
| | |
| | | "Microsoft.AspNetCore": "Warning" |
| | | } |
| | | }, |
| | | "dics": "inOrderType,outOrderType,inboundState,createType,enableEnum,enableStatusEnum,locationStatusEnum,locationTypeEnum,taskTypeEnum,taskStatusEnum,outboundStatusEnum,orderDetailStatusEnum,stockStatusEmun,stockChangeType,outStockStatus,receiveOrderTypeEnum,authorityScope,authorityScopes,locationChangeType,warehouses,suppliers,taskType,receiveStatus,purchaseType", |
| | | "dics": "inOrderType,outOrderType,inboundState,createType,enableEnum,enableStatusEnum,locationStatusEnum,locationTypeEnum,taskTypeEnum,taskStatusEnum,outboundStatusEnum,orderDetailStatusEnum,stockStatusEmun,stockChangeType,outStockStatus,receiveOrderTypeEnum,authorityScope,authorityScopes,locationChangeType,warehouses,suppliers,taskType,receiveStatus,purchaseType,purchaseOrderStatus,printStatus", |
| | | "AllowedHosts": "*", |
| | | "ConnectionStringsEncryption": false, |
| | | "MainDB": "DB_WIDESEA", //å½å项ç®ç主åºï¼æå¯¹åºçè¿æ¥å符串çEnabledå¿
须为true |