From 8fcd7a67e4391a5f1fbdb590c2a3f913aeb2a0a0 Mon Sep 17 00:00:00 2001
From: helongyang <647556386@qq.com>
Date: 星期二, 31 三月 2026 14:11:23 +0800
Subject: [PATCH] PP平库功能上线,PDA优化,部分问题点优化
---
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseModels/PageDataOptions.cs | 4
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/PP_AGVController.cs | 101 +
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesPPOutboundOrderService.cs | 126 ++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs | 494 ++++++--
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs | 88 +
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs | 98 +
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/CodeAnalysisHelper.cs | 86 +
代码管理/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/mesPPCutOutOrderDetail.vue | 10
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IMesPPOutboundOrderService.cs | 5
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs | 16
代码管理/WMS/WIDESEA_WMSClient/src/views/basic/locationInfo.vue | 5
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs | 4
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/MaterielInfoController.cs | 19
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Filter/CustomProfile.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs | 29
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs | 147 ++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs | 40
代码管理/淮安PDA/pages/stash/boxing.vue | 63
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs | 9
代码管理/淮安PDA/pages/stash/raworderboxing.vue | 113 +
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP仓/AGV_PPExtend.cs | 69
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs | 11
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_MaterielCodeInfo.cs | 6
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/CodeConfigEnum/AnalysisFormatTypeEnum.cs | 6
代码管理/淮安PDA/pages/stash/PPTaskMove.vue | 727 ++++++++++++
代码管理/淮安PDA/pages/stash/PPPKboxing.vue | 517 ++++++++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/LocationInfoRepository.cs | 12
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/MatSerNumAnalysisModel.cs | 6
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/阻焊仓/AGV_ZHExtend.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/ILocationInfoRepository.cs | 3
代码管理/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPCutOutboundOrderDetail.vue | 82
代码管理/淮安PDA/pages/stash/ProEmptyBack.vue | 40
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Common/WareHouseEnum/WarehouseEnum.cs | 7
代码管理/WMS/WIDESEA_WMSClient/src/extension/outbound/mesPPOutboundOrderDetail.js | 18
代码管理/WMS/WIDESEA_WMSClient/src/extension/basic/extend/materielcodeprintView.vue | 146 +-
代码管理/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPCutOutboundOrder.vue | 13
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs | 4
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs | 14
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 77
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs | 12
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderService.cs | 4
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs | 26
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 77 +
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesPPCutOutboundOrderDetail.cs | 4
代码管理/WMS/WIDESEA_WMSClient/src/extension/outbound/mesPPCutOutboundOrderDetail.js | 18
代码管理/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPOutboundOrder.vue | 12
代码管理/WMS/WIDESEA_WMSClient/src/views/basic/materielCodeInfo.vue | 11
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/CodeConfigEnum/AnalysisCodeEnum.cs | 3
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs | 23
代码管理/淮安PDA/pages/stash/PPTaskTransport.vue | 8
代码管理/WCS/WIDESEAWCS_Client/src/views/Index.vue | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesPPCutOutboundOrderDetailService.cs | 6
53 files changed, 2,973 insertions(+), 454 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/Index.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/Index.vue"
index 3fd3bd8..2212023 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/Index.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/Index.vue"
@@ -322,7 +322,7 @@
//鍒涘缓WebSocket杩炴帴
//"ws://127.0.0.1:9295/admin"
//client = new WebSocket("ws://192.168.0.250:9260/");
- client = new WebSocket("ws:localhost:9260/");
+ client = new WebSocket("ws:10.30.4.92:9260/");
client.onopen = function() {
//client.onmessage = handleMessage;
// store.commit("setWebsocket", client);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs"
index 86e6ab7..01b4dc1 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs"
@@ -55,10 +55,21 @@
MesOutbound = 200,
/// <summary>
+ /// MES澶у嵎PP鍑哄簱
+ /// </summary>
+ [Description("MES澶у嵎PP鍑哄簱")]
+ MesPPOutbound = 205,
+ /// <summary>
/// MES鎵嬪姩鍑哄簱
/// </summary>
[Description("MES鎵嬪姩鍑哄簱")]
MesHandOutbound = 210,
+
+ /// <summary>
+ /// MES灏忓嵎PP鍑哄簱
+ /// </summary>
+ [Description("MES灏忓嵎PP鍑哄簱")]
+ MesPPCutOutbound = 215,
/// <summary>
/// MES鎵嬪姩鎷i�夊嚭搴�
@@ -108,6 +119,12 @@
/// </summary>
[Description("闃茬剨鍒扮嚎杈瑰ぇ浠�")]
MaskOutLarge = 275,
+
+ /// <summary>
+ /// PP鎼繍鑷崇嚎杈�
+ /// </summary>
+ [Description("PP鎼繍鑷崇嚎杈�")]
+ MesPPMove = 280,
/// <summary>
/// 閲囪喘鍏ュ簱
/// </summary>
@@ -160,6 +177,12 @@
MesPalletSmallReturn = 585,
/// <summary>
+ /// PP鍏ュ钩搴�
+ /// </summary>
+ [Description("PP鍏ュ钩搴�")]
+ PPPKInbound = 590,
+
+ /// <summary>
/// 绌虹鍏ュ簱
/// </summary>
[Description("绌虹鍏ュ簱")]
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/PP_AGVController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/PP_AGVController.cs"
new file mode 100644
index 0000000..7a909ac
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/PP_AGVController.cs"
@@ -0,0 +1,101 @@
+锘縰sing Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using WIDESEA_DTO.Agv;
+using WIDESEAWCS_Common.TaskEnum;
+using WIDESEAWCS_Core;
+using WIDESEAWCS_Core.Enums;
+using WIDESEAWCS_Core.Helper;
+using WIDESEAWCS_IBasicInfoRepository;
+using WIDESEAWCS_ITaskInfoRepository;
+using WIDESEAWCS_ITaskInfoService;
+using WIDESEAWCS_Model.Models;
+using WIDESEAWCS_QuartzJob;
+using WIDESEAWCS_Tasks;
+
+namespace WIDESEAWCS_Server.Controllers
+{
+ [Route("api/[controller]")]
+ [ApiController]
+ public class PP_AGVController : ControllerBase
+ {
+ private readonly IStationMangerRepository _stationMangerRepository;
+ private readonly ITaskService _taskService;
+ private readonly ITaskRepository _taskRepository;
+
+ public PP_AGVController(IStationMangerRepository stationMangerRepository, ITaskService taskService, ITaskRepository taskRepository)
+ {
+ _stationMangerRepository = stationMangerRepository;
+ _taskService = taskService;
+ _taskRepository = taskRepository;
+ }
+
+ /// <summary>
+ /// AGV浠诲姟鏇存柊/瀹屾垚
+ /// </summary>
+ /// <param name="agvUpdateModel"></param>
+ /// <returns></returns>
+ [HttpPost, HttpGet, Route("AgvCallback"), AllowAnonymous]
+ public AgvResponseContent AgvUpdateTask([FromBody] AgvUpdateDTO agvUpdateModel)
+ {
+ AgvResponseContent agvResponseContent = new AgvResponseContent();
+ try
+ {
+ if (agvUpdateModel == null) throw new Exception("鏈幏鍙栧埌璇锋眰鍙傛暟");
+ agvResponseContent.ReqCode = agvUpdateModel.ReqCode;
+ var task = _taskRepository.QueryFirst(x => agvUpdateModel.TaskCode == x.AgvTaskNum);
+ if (task == null && agvUpdateModel.Method != "begin") throw new Exception($"鏈壘鍒颁换鍔�,浠诲姟鍙枫�恵agvUpdateModel.TaskCode}銆�");
+ switch (agvUpdateModel.Method)
+ {
+ case "start":
+ break;
+ case "begin":
+ break;
+ case "outbin"://鍑哄簱鏍规嵁杩欎釜淇″彿鍒ゆ柇鍙栬揣瀹屾垚
+ if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
+ {
+ task.TaskState = TaskStatusEnum.AGV_Finish.ObjToInt();
+ var up = _taskRepository.DeleteAndMoveIntoHty(task, OperateTypeEnum.鑷姩瀹屾垚);
+ _taskService.TaskCompleted(task.TaskNum);
+ agvResponseContent.Code = up ? "0" : "1";
+ agvResponseContent.Message = up ? "鎴愬姛" : "澶辫触";
+ return agvResponseContent;
+ }
+ break;
+ case "getSafetySignal"://瀹夊叏淇″彿鐢宠
+ {
+ break;
+ }
+ case "end"://鍏ュ簱鏍规嵁杩欎釜淇″彿鍒ゆ柇鏀捐揣瀹屾垚
+ if (task.TaskType != TaskTypeEnum.Outbound.ObjToInt())
+ {
+ task.TaskState = TaskStatusEnum.AGV_Finish.ObjToInt();
+ var up = _taskRepository.DeleteAndMoveIntoHty(task, OperateTypeEnum.鑷姩瀹屾垚);
+ _taskService.TaskCompleted(task.TaskNum);
+ agvResponseContent.Code = up ? "0" : "1";
+ agvResponseContent.Message = up ? "鎴愬姛" : "澶辫触";
+ return agvResponseContent;
+ }
+ break;
+ case "cancel":
+ task.TaskState = TaskStatusEnum.Cancel.ObjToInt();
+ _taskRepository.UpdateData(task);
+ break;
+ default:
+ throw new Exception($"鏈畾涔夋柟娉曞悕銆恵agvUpdateModel.Method}銆�");
+ }
+ agvResponseContent.Code = "0";
+ agvResponseContent.Message = "鎴愬姛";
+ }
+ catch (Exception ex)
+ {
+ agvResponseContent.Code = "1";
+ agvResponseContent.Message = ex.Message;
+ }
+ return agvResponseContent;
+ //return _taskService.AgvUpdateTask(agvUpdateModel);
+ }
+
+
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
index 8ef1ce2..7274af6 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -354,49 +354,66 @@
if (taskTypeGroup == TaskTypeGroup.OutbondGroup)
{
task.AgvTaskNum = item.AGVArea + DateTime.Now.ToString("yyMMdd") + item.TaskNum;
- List<Dt_Router> routers = routersAll.Where(x => x.InOutType == item.TaskType && item.AGVArea == x.NextPosi).ToList();
- if (routers.FirstOrDefault() == null)
+ if(item.AGVArea == "AGV_PP")
{
- return WebResponseContent.Instance.Error($"鏈壘鍒拌矾鐢遍厤缃俊鎭�");
- }
- router = routers.FirstOrDefault();
- task.NextAddress = router?.StartPosi ?? "";
- task.DeviceCode = item.RoadWay;
- if (item.RoadWay.Contains("ZH"))
- {
- task.TaskState = TaskStatusEnum.New.ObjToInt();
+ task.NextAddress = item.TargetAddress;
+ task.DeviceCode = item.RoadWay;
}
else
{
- task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt();
+ List<Dt_Router> routers = routersAll.Where(x => x.InOutType == item.TaskType && item.AGVArea == x.NextPosi).ToList();
+ if (routers.FirstOrDefault() == null)
+ {
+ return WebResponseContent.Instance.Error($"鏈壘鍒拌矾鐢遍厤缃俊鎭�");
+ }
+ router = routers.FirstOrDefault();
+ task.NextAddress = router?.StartPosi ?? "";
+ task.DeviceCode = item.RoadWay;
+ if (item.RoadWay.Contains("ZH"))
+ {
+ task.TaskState = TaskStatusEnum.New.ObjToInt();
+ }
+ else
+ {
+ task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt();
+ }
}
}
else
{
- if (task.Roadway!="SC01_ZH")
+ if (item.AGVArea == "AGV_PP")
{
task.AgvTaskNum = item.AGVArea + DateTime.Now.ToString("yyMMdd") + item.TaskNum;
- }
- List<Dt_Router> routers = routersAll.Where(x => x.InOutType == item.TaskType && item.AGVArea == x.StartPosi).ToList();
- if (routers.FirstOrDefault() == null)
- {
- return WebResponseContent.Instance.Error($"鏈壘鍒拌矾鐢遍厤缃俊鎭�");
- }
- router = routers.FirstOrDefault();
- Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x=>x.StationCode== router?.NextPosi);
- if (stationManger == null)
- {
- return WebResponseContent.Instance.Error($"鏈壘鍒扮珯鍙伴厤缃俊鎭�");
- }
- task.NextAddress = stationManger?.AGVStationCode ?? "";
- task.DeviceCode = stationManger?.Remark ?? "";
- if (task.Roadway != "SC01_ZH")
- {
- task.TaskState = TaskStatusEnum.AGV_Execute.ObjToInt();
+ task.NextAddress = item.TargetAddress;
+ task.DeviceCode = item.RoadWay;
}
else
{
- task.TaskState = TaskStatusEnum.AGV_Executing.ObjToInt();
+ if (task.Roadway != "SC01_ZH")
+ {
+ task.AgvTaskNum = item.AGVArea + DateTime.Now.ToString("yyMMdd") + item.TaskNum;
+ }
+ List<Dt_Router> routers = routersAll.Where(x => x.InOutType == item.TaskType && item.AGVArea == x.StartPosi).ToList();
+ if (routers.FirstOrDefault() == null)
+ {
+ return WebResponseContent.Instance.Error($"鏈壘鍒拌矾鐢遍厤缃俊鎭�");
+ }
+ router = routers.FirstOrDefault();
+ Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.StationCode == router?.NextPosi);
+ if (stationManger == null)
+ {
+ return WebResponseContent.Instance.Error($"鏈壘鍒扮珯鍙伴厤缃俊鎭�");
+ }
+ task.NextAddress = stationManger?.AGVStationCode ?? "";
+ task.DeviceCode = stationManger?.Remark ?? "";
+ if (task.Roadway != "SC01_ZH")
+ {
+ task.TaskState = TaskStatusEnum.AGV_Execute.ObjToInt();
+ }
+ else
+ {
+ task.TaskState = TaskStatusEnum.AGV_Executing.ObjToInt();
+ }
}
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/AGV_PPExtend.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/AGV_PPExtend.cs"
index 5b734fc..8dc77cd 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/AGV_PPExtend.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/AGV_PPExtend.cs"
@@ -20,45 +20,70 @@
try
{
var newTasks = _taskService.Db.Queryable<Dt_Task>().Where(x => (x.TaskState == TaskStatusEnum.New.ObjToInt()||x.TaskState==TaskStatusEnum.AGV_Execute.ObjToInt()) && nameof(AGV_PPJob).Contains(x.DeviceCode) && !string.IsNullOrEmpty(x.DeviceCode)).ToList().OrderBy(x => x.Grade).ThenBy(x => x.CreateDate).ToList();
- foreach (var task in newTasks)
+ foreach (var agvTask in newTasks)
{
try
{
- AgvTaskDTO TaskDTO = new AgvTaskDTO()
+ string taskTyp;
+ if (agvTask.TaskType == TaskTypeEnum.MesPPMove.ObjToInt())
{
- TaskCode = task.AgvTaskNum,
- ReqCode = DateTime.Now.ToString("yyMMddHHmmss") + task.AgvTaskNum,
- TaskTyp = task.TaskType < TaskTypeEnum.Inbound.ObjToInt() ? "FLC" : "FLR",
- ctnrCode = task.PalletCode,
+ taskTyp = "110";
+ }
+ else if (agvTask.PalletType < 2)
+ {
+ taskTyp = "008";
+ }
+ else
+ {
+ taskTyp = "004";
+ }
+
+ AgvTaskDTO taskDTO = new AgvTaskDTO()
+ {
+ ReqCode = Guid.NewGuid().ToString().Replace("-", ""),
+ TaskTyp = taskTyp,
PositionCodePath = new List<CodePath>()
- {
- new CodePath()
{
- type="00",
- positionCode=task.CurrentAddress
+ new CodePath()
+ {
+ type = "00",
+ positionCode = agvTask.CurrentAddress
+ },
+ new CodePath()
+ {
+ type = (agvTask.TaskType == TaskTypeEnum.PPPKInbound.ObjToInt()||agvTask.TaskType == TaskTypeEnum.MesPPCutOutbound.ObjToInt()) ? "00" : "04",
+ positionCode = agvTask.NextAddress
+ }
},
- new CodePath()
- {
- type="00",
- positionCode=task.NextAddress
- }
- },
+ TaskCode = agvTask.AgvTaskNum,
};
- WebResponseContent content = _taskService.AgvSendTask(TaskDTO, APIEnum.Agv_PPSendTask);
- if (!content.Status) throw new Exception(content.Message);
- task.TaskState = TaskStatusEnum.AGV_Executing.ObjToInt();
+ WebResponseContent content = _taskService.AgvSendTask(taskDTO);
+ if (content.Status)
+ {
+ agvTask.TaskState = TaskStatusEnum.AGV_Executing.ObjToInt();
+ //agvTask.Remark = content.Data.ObjToString();
+ _taskService.UpdateTask(agvTask, TaskStatusEnum.AGV_Executing);
+ }
+ else
+ {
+ agvTask.TaskState = TaskStatusEnum.Exception.ObjToInt();
+ //agvTask.Remark = content.Data.ObjToString();
+ agvTask.ExceptionMessage = content.Message;
+ }
}
catch (Exception ex)
{
- task.TaskState = TaskStatusEnum.Exception.ObjToInt();
- task.ExceptionMessage = ex.Message;
+ agvTask.TaskState = TaskStatusEnum.Exception.ObjToInt();
+ //agvTask.Remark = content.Data.ObjToString();
+ agvTask.ExceptionMessage = ex.Message;
+ WriteError(nameof(AGV_PPJob), ex.Message, ex);
}
}
_taskService.UpdateData(newTasks);
}
catch (Exception ex)
{
- WriteError(nameof(AGV_FLJob), ex.Message, ex);
+ WriteError(nameof(AGV_PPJob), ex.Message, ex);
}
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/AGV_ZHExtend.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/AGV_ZHExtend.cs"
index 5289c17..6db1568 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/AGV_ZHExtend.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/AGV_ZHExtend.cs"
@@ -78,7 +78,7 @@
}
catch (Exception ex)
{
- WriteError(nameof(AGV_FLJob), ex.Message, ex);
+ WriteError(nameof(AGV_ZHJob), ex.Message, ex);
}
}
/// <summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/extend/materielcodeprintView.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/extend/materielcodeprintView.vue"
index 43f8429..108ba91 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/extend/materielcodeprintView.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/extend/materielcodeprintView.vue"
@@ -7,42 +7,35 @@
:padding="15"
title="鎵撳嵃"
>
- <div
- id="printContent"
- style="display: flex; justify-content: center; align-items: center"
- >
- <div
- style="display: flex; justify-content: center; align-items: center"
- >
+ <div id="printContent" style="display: flex; justify-content: center; align-items: center">
+ <div style="display: flex; justify-content: center; align-items: center">
<VueQrcode id="qrcode" :value="Code" :size="200"></VueQrcode>
</div>
</div>
<div id="palletcode">
- <!-- <span
- style="display: flex; justify-content: center; align-items: center"
- >{{ Code }}</span
- > -->
- <span
- style="display: flex; justify-content: center; align-items: center"
+ <span style="display: flex; justify-content: center; align-items: center"
>鐗╂枡缂栫爜:{{ materielCode }}</span
+ >
+ <!-- decimal鏈夊�兼墠鏄剧ず鐗╂枡闀垮害锛屾棤鍊煎垯闅愯棌 -->
+ <span
+ v-if="isHasMaterielLength"
+ style="display: flex; justify-content: center; align-items: center; margin-top: 8px"
+ >鐗╂枡闀垮害:{{ materielLength }}</span
>
</div>
<template #footer>
<el-button type="primary" size="small" @click="print()">鎵撳嵃</el-button>
- <el-button type="danger" size="small" @click="showDetialBox = false"
- >鍏抽棴</el-button
- >
+ <el-button type="danger" size="small" @click="showDetialBox = false">鍏抽棴</el-button>
</template>
</vol-box>
</div>
</template>
-
- <script>
+
+<script>
import VolBox from "@/components/basic/VolBox.vue";
import VueQrcode from "vue-qrcode";
import QRCode from "qrcode";
-import { da } from "element-plus/es/locales.mjs";
export default {
components: { VolBox, VueQrcode },
data() {
@@ -57,102 +50,131 @@
quantity: "",
productionDate: "",
effectiveDate: "",
+ materielLength: null, // decimal绫诲瀷鍒濆鍖栦负null锛屽尮閰嶅悗绔暟鍊肩被鍨�
};
+ },
+ computed: {
+ // 璁$畻灞炴�э細缁熶竴鍒ゆ柇鏄惁鏈夌墿鏂欓暱搴︼紙decimal鏈夋湁鏁堟暟鍊硷級锛屾ā鏉垮拰閫昏緫澶嶇敤
+ isHasMaterielLength() {
+ return this.materielLength !== null && this.materielLength !== undefined&& this.materielLength !== 0;
+ },
},
methods: {
open(row) {
this.row = row;
this.showDetialBox = true;
+ // 姣忔鎵撳紑閲嶇疆鎵�鏈夊�硷紝閬垮厤缂撳瓨
+ this.resetForm();
if (row && row.materielCode) {
- this.materielCode = row.materielCode;
- this.lotNo = row.lotNo;
- this.purchaseOrderNo = row.purchaseOrderNo;
- this.quantity = row.quantity;
+ // 璧嬪�煎熀纭�瀛楁
+ this.materielCode = row.materielCode || "";
+ this.lotNo = row.lotNo || "";
+ this.purchaseOrderNo = row.purchaseOrderNo || "";
+ this.quantity = row.quantity || "";
this.productionDate = formatDate(row.productionDate);
this.effectiveDate = formatDate(row.effectiveDate);
+ // 璧嬪�糳ecimal绫诲瀷鐗╂枡闀垮害锛岀洿鎺ュ彇鍚庣鍊硷紙null/undefined/鏁板�奸兘鍏煎锛�
+ this.materielLength = row.materielLength;
}
- this.Code =
- "M:" +
- this.materielCode +
- ",BS:" +
- this.lotNo +
- ",DM:" +
- this.productionDate +
- ",DE:" +
- this.effectiveDate +
- ",Q:" +
- this.quantity +
- ",PO:" +
- this.purchaseOrderNo;
+ // 鏍稿績锛氭嫾鎺ヤ簩缁寸爜Code锛屾棤闀垮害鍒欏畬鍏ㄤ笉鍑虹幇,ML
+ this.Code = this.spliceQrCode();
+ },
+ // 鎶界浜岀淮鐮佹嫾鎺ラ�昏緫锛屼唬鐮佹洿娓呮櫚
+ spliceQrCode() {
+ // 鍩虹鍥哄畾鎷兼帴閮ㄥ垎
+ let baseStr = [
+ `M:${this.materielCode}`,
+ `BS:${this.lotNo}`,
+ `DM:${this.productionDate}`,
+ `DE:${this.effectiveDate}`,
+ `Q:${this.quantity}`,
+ `PO:${this.purchaseOrderNo}`,
+ ].join(",");
+ // 浠呭綋鏈夌墿鏂欓暱搴︽椂锛岃拷鍔�,ML:鏁板�硷紱鏃犲�煎垯鐩存帴杩斿洖鍩虹涓�
+ if (this.isHasMaterielLength) {
+ baseStr += `,ML:${this.materielLength}`;
+ }
+ return baseStr;
},
print() {
- let printContent = document.getElementById("printContent");
- let palletcode = document.getElementById("palletcode");
- var printWindow = window.open("", "");
- printWindow.document.write(printContent.innerHTML);
- printWindow.document.write(palletcode.innerHTML);
+ const printContent = document.getElementById("printContent");
+ const palletcode = document.getElementById("palletcode");
+ const printWindow = window.open("", "");
+ // 瀹屽杽鎵撳嵃椤甸潰缁撴瀯锛岄伩鍏嶆牱寮忛敊涔�
+ printWindow.document.write(`
+ <html>
+ <head><meta charset="utf-8"><title>鎵撳嵃</title></head>
+ <body style="text-align: center; padding: 20px;">
+ ${printContent.innerHTML}
+ ${palletcode.innerHTML}
+ </body>
+ </html>
+ `);
printWindow.document.close();
printWindow.focus();
printWindow.print();
printWindow.close();
},
- formatDate(dateStr) {
- let date = new Date(dateStr);
- let year = date.getFullYear();
- let month = String(date.getMonth() + 1).padStart(2, "0");
- let day = String(date.getDate()).padStart(2, "0");
- return year + "-" + month + "-" + day;
+ // 閲嶇疆琛ㄥ崟锛岄伩鍏嶅娆℃墦寮�寮圭獥缂撳瓨涓婁竴娆℃暟鎹�
+ resetForm() {
+ this.materielCode = "";
+ this.lotNo = "";
+ this.purchaseOrderNo = "";
+ this.quantity = "";
+ this.productionDate = "";
+ this.effectiveDate = "";
+ this.materielLength = null;
+ this.Code = "";
},
},
-
- created() {},
};
+// 鏃ユ湡鏍煎紡鍖栧伐鍏峰嚱鏁帮紝鍔犵┖鍊煎垽鏂伩鍏嶆姤閿�
function formatDate(dateStr) {
+ if (!dateStr) return "";
const date = new Date(dateStr);
- return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(
- 2,
- "0"
- )}-${String(date.getDate()).padStart(2, "0")}`;
+ return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`;
}
</script>
-
- <style scoped>
+
+<style scoped>
.el-col {
border-radius: 4px;
}
-
.grid-content {
border-radius: 4px;
min-height: 36px;
}
-
.content-text {
display: flex;
align-items: center;
justify-content: center;
}
-
.right-text {
display: flex;
align-items: center;
justify-content: flex-end;
}
</style>
- <style>
+
+<style>
.el-table .warning-row {
background: #e6a23c;
}
-
.el-table .success-row {
background: #f0f9eb;
}
-
.el-table .error-row {
background: #f56c6c;
}
-
canvas {
display: block;
margin: auto;
}
+/* 鎵撳嵃鏍峰紡浼樺寲锛岄�傞厤鎵撳嵃鏈� */
+@media print {
+ body {
+ margin: 0;
+ padding: 0;
+ }
+}
</style>
\ No newline at end of file
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/mesPPCutOutOrderDetail.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/mesPPCutOutOrderDetail.vue"
index 9a5ce39..23af84b 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/mesPPCutOutOrderDetail.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/mesPPCutOutOrderDetail.vue"
@@ -129,30 +129,28 @@
hidden: true,
},
{
- prop: "materielCode",
+ prop: "materialCode",
title: "鐗╂枡缂栧彿",
type: "string",
width: 150,
},
{
- prop: "materielName",
+ prop: "materialName",
title: "鐗╂枡鍚嶇О",
type: "string",
width: 150,
},
{
- field: "targetAddressCode",
+ prop: "targetAddressCode",
title: "绾胯竟浠撳湴鍧�鐮�",
type: "string",
width: 100,
- align: "left",
},
{
- field: "width",
+ prop: "width",
title: "瑁佸垏瀹�",
type: "string",
width: 100,
- align: "left",
},
{
prop: "orderQuantity",
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/mesPPCutOutboundOrderDetail.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/mesPPCutOutboundOrderDetail.js"
index 7d1cbad..58420a3 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/mesPPCutOutboundOrderDetail.js"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/mesPPCutOutboundOrderDetail.js"
@@ -4,7 +4,7 @@
components: {
//鏌ヨ鐣岄潰鎵╁睍缁勪欢
gridHeader: '',
- gridBody: gridBody,
+ gridBody: '',
gridFooter: '',
//鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
modelHeader: '',
@@ -17,21 +17,7 @@
//涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
onInit() {
//鎵╁睍椤甸潰鍒濆鍖栨搷浣�
- this.columns.push({
- field: '鎿嶄綔',
- title: '鎿嶄綔',
- width: 90,
- fixed: 'right',
- align: 'center',
- formatter: (row) => {
- return (
- '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">鏌ョ湅鏄庣粏</i>'
- );
- },
- click: (row) => {
- this.$refs.gridBody.open(row);
- }
- });
+
},
onInited() {
//妗嗘灦鍒濆鍖栭厤缃悗
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/mesPPOutboundOrderDetail.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/mesPPOutboundOrderDetail.js"
index 04c9401..142d1f1 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/mesPPOutboundOrderDetail.js"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/mesPPOutboundOrderDetail.js"
@@ -4,7 +4,7 @@
components: {
//鏌ヨ鐣岄潰鎵╁睍缁勪欢
gridHeader: '',
- gridBody: gridBody,
+ gridBody: '',
gridFooter: '',
//鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
modelHeader: '',
@@ -17,21 +17,7 @@
//涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
onInit() {
//鎵╁睍椤甸潰鍒濆鍖栨搷浣�
- this.columns.push({
- field: '鎿嶄綔',
- title: '鎿嶄綔',
- width: 90,
- fixed: 'right',
- align: 'center',
- formatter: (row) => {
- return (
- '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">鏌ョ湅鏄庣粏</i>'
- );
- },
- click: (row) => {
- this.$refs.gridBody.open(row);
- }
- });
+
},
onInited() {
//妗嗘灦鍒濆鍖栭厤缃悗
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/locationInfo.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/locationInfo.vue"
index b6a588f..6bea3d5 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/locationInfo.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/locationInfo.vue"
@@ -40,9 +40,6 @@
locationType: "",
enableStatus: "",
locationStatus: "",
- row: "",
- column: "",
- layer: "",
});
const searchFormOptions = ref([
[
@@ -109,7 +106,7 @@
{
field: "column",
title: "璐т綅鍒�",
- type: "int",
+ type: "string",
width: 120,
align: "left",
hidden: true,
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/materielCodeInfo.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/materielCodeInfo.vue"
index 8a1f871..532b4e3 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/materielCodeInfo.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/materielCodeInfo.vue"
@@ -76,7 +76,7 @@
],
[
{
- title: "鏁伴噺",
+ title: "鏁伴噺",
field: "quantity",
type:"int"
},
@@ -105,6 +105,8 @@
[
{ title: "閲囪喘鍗曞彿", field: "purchaseOrderNo", type: "like" },
{ title: "鐗╂枡缂栧彿", field: "materielCode", type: "like" },
+ {title: "鎵�灞炰粨搴�", field:"warehouseId",type:"select",dataKey:"warehouses",data:[]},
+ { title: "鎵规鍙�", field: "lotNo", type: "like" },
],
]);
const columns = ref([
@@ -176,6 +178,13 @@
align: "left",
},
{
+ field: "materielLength",
+ title: "鐗╂枡闀垮害",
+ type: "int",
+ width: 80,
+ align: "left",
+ },
+ {
field: "productionDate",
title: "鐢熶骇鏃ユ湡",
type: "date",
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPCutOutboundOrder.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPCutOutboundOrder.vue"
index 22e5153..f39e5ae 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPCutOutboundOrder.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPCutOutboundOrder.vue"
@@ -85,6 +85,7 @@
const searchFormOptions = ref([
[
{ title: "鍗曟嵁缂栧彿", field: "orderNo", type: "like" },
+ { title: "涓婃父鍗曟嵁缂栧彿", field: "taskNo", type: "like" },
{
title: "鍗曟嵁绫诲瀷",
field: "orderType",
@@ -134,6 +135,14 @@
{
field: "orderNo",
title: "鍗曟嵁缂栧彿",
+ type: "string",
+ width: 160,
+ align: "left",
+ // link: true
+ },
+ {
+ field: "taskNo",
+ title: "涓婃父鍗曟嵁缂栧彿",
type: "string",
width: 160,
align: "left",
@@ -214,14 +223,14 @@
hidden: true,
},
{
- field: "materielCode",
+ field: "materialCode",
title: "鐗╂枡缂栧彿",
type: "string",
width: 150,
align: "left",
},
{
- field: "materielName",
+ field: "materialName",
title: "鐗╂枡鍚嶇О",
type: "string",
width: 150,
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPCutOutboundOrderDetail.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPCutOutboundOrderDetail.vue"
index a51f590..8d2cac0 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPCutOutboundOrderDetail.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPCutOutboundOrderDetail.vue"
@@ -27,14 +27,7 @@
sortName: "id",
});
const editFormFields = ref({
- deviceCode: "",
- deviceName: "",
- deviceType: "",
- deviceStatus: "",
- deviceIp: "",
- devicePort: "",
- devicePlcType: "",
- deviceRemark: "",
+
});
const editFormOptions = ref([
[
@@ -63,37 +56,23 @@
type: "string",
},
],
- [
- { title: "璁惧IP", required: true, field: "deviceIp", type: "string" },
- {
- title: "璁惧绔彛",
- required: true,
- field: "devicePort",
- type: "string",
- },
- {
- title: "PLC绫诲瀷",
- required: true,
- field: "devicePlcType",
- type: "string",
- },
- {
- title: "澶囨敞",
- field: "deviceRemark",
- type: "string",
- },
- ],
+
]);
const searchFormFields = ref({
- deviceCode: "",
- deviceType: "",
- deviceStatus: "",
+
});
const searchFormOptions = ref([
[
- { title: "璁惧缂栧彿", field: "deviceCode" },
- { title: "璁惧绫诲瀷", field: "deviceType" },
- { title: "璁惧鐘舵��", field: "deviceStatus" },
+ { title: "鐗╂枡鍚嶇О", field: "materialName", type: "like" },
+ { title: "鐗╂枡缂栧彿", field: "materialCode", type: "like" },
+ { title: "鎵规鍙�", field: "batchNo", type: "like" },
+ {
+ title: "鍗曟嵁鏄庣粏鐘舵��",
+ field: "orderDetailStatus",
+ type: "select",
+ dataKey: "orderDetailStatusEnum",
+ data: [],
+ },
],
]);
const columns = ref([
@@ -115,14 +94,14 @@
hidden: true,
},
{
- field: "materielCode",
+ field: "materialCode",
title: "鐗╂枡缂栧彿",
type: "string",
width: 150,
align: "left",
},
{
- field: "materielName",
+ field: "materialName",
title: "鐗╂枡鍚嶇О",
type: "string",
width: 150,
@@ -180,9 +159,10 @@
{
field: "orderDetailStatus",
title: "璁㈠崟鏄庣粏鐘舵��",
- type: "string",
+ type: "select",
width: 180,
align: "left",
+ bind: { key: "orderDetailStatusEnum", data: [] },
},
{
field: "LayerCode",
@@ -235,21 +215,21 @@
},
]);
const detail = ref({
- cnName: "#detailCnName",
- table: "",
- columns: [],
- sortName: "",
- });
+ cnName: "MES鍑哄簱鍗曟槑缁�",
+ table: "",
+ columns: [],
+ sortName: "",
+ });
return {
- table,
- extend,
- editFormFields,
- editFormOptions,
- searchFormFields,
- searchFormOptions,
- columns,
- detail,
- };
+ table,
+ extend,
+ editFormFields,
+ editFormOptions,
+ searchFormFields,
+ searchFormOptions,
+ columns,
+ detail,
+ };
},
});
</script>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPOutboundOrder.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPOutboundOrder.vue"
index 622fcdd..55d9e39 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPOutboundOrder.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/mesPPOutboundOrder.vue"
@@ -36,8 +36,18 @@
const searchFormOptions = ref([
[
{ title: "鍗曟嵁缂栧彿", field: "orderNo", type: "like" },
+ { title: "浠诲姟鍗曞彿", field: "taskNo", type: "like" },
{ title: "鐗╂枡缂栧彿", field: "materialCode", type: "like" },
{ title: "鎵规鍙�", field: "batchNo", type: "like" },
+ ],
+ [
+ {
+ title: "鍗曟嵁鐘舵��",
+ field: "orderStatus",
+ type: "select",
+ dataKey: "orderDetailStatusEnum",
+ data: [],
+ },
],
]);
const columns = ref([
@@ -85,7 +95,7 @@
type: "decimal",
width: 90,
align: "left",
- bind: { key: "outboundStatusEnum", data: [] },
+ bind: { key: "orderDetailStatusEnum", data: [] },
},
{
field: "materialCode",
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/LocationInfoRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/LocationInfoRepository.cs"
index 0338b2f..334ea93 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/LocationInfoRepository.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/LocationInfoRepository.cs"
@@ -5,6 +5,7 @@
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Common.LocationEnum;
+using WIDESEA_Common.WareHouseEnum;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.Enums;
using WIDESEA_Core.Helper;
@@ -84,6 +85,17 @@
{
return QueryData(x => x.LocationCode, x => x.WarehouseId == warehouseId && x.LocationStatus == LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())).Distinct().ToList();
}
+ /// <summary>
+ /// PP澶у嵎鍑哄簱锛屽钩搴撲紭鍏堬紝绔嬪簱琛ュ伩鍑哄簱鐨勮揣浣嶇紪鍙烽泦鍚�
+ /// </summary>
+ /// <param name="warehouseId"></param>
+ /// <returns></returns>
+ public List<string> GetCanOutPPLocationCodes(int warehouseId)
+ {
+ //鏌ュ钩搴撹揣浣�
+ Dt_Warehouse warehouse = Db.Queryable<Dt_Warehouse>().Where(x => x.WarehouseCode == WarehouseEnum.HA581.ToString()).First();
+ return QueryData(x => x.LocationCode, x => (x.WarehouseId == warehouseId || x.WarehouseId == warehouse.WarehouseId) && x.LocationStatus == LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())).Distinct().ToList();
+ }
/// <summary>
/// 鑾峰彇鍙嚭搴撹揣浣嶇紪鍙�
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs"
index ccc5b9a..ad8d9ae 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs"
@@ -59,6 +59,7 @@
"HA153" => AssignLocation(roadwayNo),
"HA71" or "HA72" or "HA73" => AssignLocation(roadwayNo),
"HA60" => AssignLocation(roadwayNo),
+ "HA581" => AssignLocation_PPPK(roadwayNo,palletTypeInfo.PalletType),
_ => throw new Exception($"鏈壘鍒颁粨搴撹揣浣嶅垎閰嶆柟娉�")
};
}
@@ -675,6 +676,34 @@
}
return groupLocations;
}
+
+
+ public Dt_LocationInfo? AssignLocation_PPPK(string roadwayNo, int palletType)
+ {
+ lock (_locker)
+ {
+ List<LocationCache> removeItems = locationCaches.Where(x => (DateTime.Now - x.DateTime).TotalMinutes > 5).ToList();//鏌ヨ娣诲姞闈欐�佸彉閲忚秴杩�5鍒嗛挓鐨勮揣浣�
+ int count = removeItems.Count;
+ for (int i = 0; i < count; i++)
+ {
+ locationCaches.Remove(removeItems[i]);//绉婚櫎鏌ヨ娣诲姞闈欐�佸彉閲忚秴杩�5鍒嗛挓鐨勮揣浣�
+ }
+
+ List<string> lockLocations = locationCaches.Select(x => x.LocationCode).ToList();
+
+ List<Dt_LocationInfo> locationInfos = BaseDal.QueryData(x => x.RoadwayNo == roadwayNo);//鏌ヨ宸烽亾鎵�鏈夎揣浣嶄俊鎭�
+
+ Dictionary<string, OrderByType> orderBy = new Dictionary<string, OrderByType>()
+ {
+ { nameof(Dt_LocationInfo.Layer),OrderByType.Asc },
+ { nameof(Dt_LocationInfo.Column),OrderByType.Asc },
+ { nameof(Dt_LocationInfo.Depth),OrderByType.Desc },
+ { nameof(Dt_LocationInfo.Row),OrderByType.Asc }
+ };
+
+ return BaseDal.QueryFirst(x => x.RoadwayNo == roadwayNo && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus != EnableStatusEnum.Disable.ObjToInt() && x.LocationType == palletType && !lockLocations.Contains(x.LocationCode), orderBy);
+ }
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs"
index 746dff9..180b8a6 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs"
@@ -63,10 +63,23 @@
MesOutbound = 200,
/// <summary>
+ /// MES澶у嵎PP鍑哄簱
+ /// </summary>
+ [Description("MES澶у嵎PP鍑哄簱")]
+ MesPPOutbound = 205,
+
+ /// <summary>
/// MES鎵嬪姩鍑哄簱
/// </summary>
[Description("MES鎵嬪姩鍑哄簱")]
MesHandOutbound = 210,
+
+
+ /// <summary>
+ /// MES灏忓嵎PP鍑哄簱
+ /// </summary>
+ [Description("MES灏忓嵎PP鍑哄簱")]
+ MesPPCutOutbound = 215,
/// <summary>
/// MES鎵嬪姩鎷i�夊嚭搴�
@@ -116,6 +129,13 @@
/// </summary>
[Description("闃茬剨鍒扮嚎杈瑰ぇ浠�")]
MaskOutLarge = 275,
+
+ /// <summary>
+ /// PP鎼繍鑷崇嚎杈�
+ /// </summary>
+ [Description("PP鎼繍鑷崇嚎杈�")]
+ MesPPMove = 280,
+
/// <summary>
/// 閲囪喘鍏ュ簱
/// </summary>
@@ -168,6 +188,12 @@
MesPalletSmallReturn = 585,
/// <summary>
+ /// PP鍏ュ钩搴�
+ /// </summary>
+ [Description("PP鍏ュ钩搴�")]
+ PPPKInbound = 590,
+
+ /// <summary>
/// 绌虹鍏ュ簱
/// </summary>
[Description("绌虹鍏ュ簱")]
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/WareHouseEnum/WarehouseEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/WareHouseEnum/WarehouseEnum.cs"
index cf9f55b..0c765b2 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/WareHouseEnum/WarehouseEnum.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/WareHouseEnum/WarehouseEnum.cs"
@@ -76,7 +76,12 @@
/// 闃荤剨浠�
/// </summary>
[Description("闃荤剨浠�")]
- HA154
+ HA154,
+ /// <summary>
+ /// PP骞冲簱
+ /// </summary>
+ [Description("PP骞冲簱")]
+ HA581
}
public enum WarehouseTypEnum
{
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseModels/PageDataOptions.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseModels/PageDataOptions.cs"
index 1fff57b..7f3be60 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseModels/PageDataOptions.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseModels/PageDataOptions.cs"
@@ -75,7 +75,7 @@
LinqExpressionType expressionType = searchParametersList[i].DisplayType.GetLinqCondition();
if (expressionType == LinqExpressionType.Equal)
{
- where += $"{searchParametersList[i].Name} {HtmlElementType.Equal} '{results[j].Item3}'";
+ where += $"[{searchParametersList[i].Name}] {HtmlElementType.Equal} '{results[j].Item3}'";
}
else if (expressionType == LinqExpressionType.ThanOrEqual)
{
@@ -95,7 +95,7 @@
}
else if (expressionType == LinqExpressionType.Contains)
{
- where += $"{searchParametersList[i].Name} {HtmlElementType.like} '%{searchParametersList[i].Value}%'";
+ where += $"[{searchParametersList[i].Name}] {HtmlElementType.like} '%{searchParametersList[i].Value}%'";
}
else
{
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/CodeConfigEnum/AnalysisCodeEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/CodeConfigEnum/AnalysisCodeEnum.cs"
index 5a722d3..c9c317c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/CodeConfigEnum/AnalysisCodeEnum.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/CodeConfigEnum/AnalysisCodeEnum.cs"
@@ -25,6 +25,7 @@
OutterCode,
MatSerNumAnalysis,
- ProSerNumAnalysis
+ ProSerNumAnalysis,
+ PPPKSerNumAnalysis
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/CodeConfigEnum/AnalysisFormatTypeEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/CodeConfigEnum/AnalysisFormatTypeEnum.cs"
index 146eccc..cc64b05 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/CodeConfigEnum/AnalysisFormatTypeEnum.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/CodeConfigEnum/AnalysisFormatTypeEnum.cs"
@@ -62,5 +62,11 @@
/// </summary>
[Description("鍘熷鏁版嵁")]
BD,
+
+ /// <summary>
+ /// 鐗╂枡闀垮害
+ /// </summary>
+ [Description("鐗╂枡闀垮害")]
+ ML,
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/CodeAnalysisHelper.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/CodeAnalysisHelper.cs"
index dd90e9b..a81c3b5 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/CodeAnalysisHelper.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/CodeAnalysisHelper.cs"
@@ -200,5 +200,91 @@
}
return list;
}
+
+ public static T PPPKCodeAnalysis<T>(AnalysisCodeEnum analysisCode, string code)
+ {
+ Type type = typeof(T);
+ object? obj = Activator.CreateInstance(type);
+ if (obj == null)
+ throw new Exception("瀹炰緥鍖栧璞¢敊璇�");
+ T result = (T)obj;
+ try
+ {
+ AnalysisRuleAttribute? analysisRule = type.GetCustomAttribute<AnalysisRuleAttribute>();
+ if (analysisRule != null)
+ {
+ SqlSugarClient sugarClient = new SqlSugarClient(new ConnectionConfig
+ {
+ ConfigId = MainDb.CurrentDbConnId,
+ ConnectionString = DBContext.GetMainConnectionDb().Connection,
+ IsAutoCloseConnection = true,
+ DbType = MainDb.DbType,
+ });
+
+ dynamic ruleConfig = sugarClient.Queryable(MainDb.AnalysisRuleConfig, "x").Where(MainDb.AnalysisCode, "=", analysisCode.ToString()).First();
+ if (ruleConfig != null)
+ {
+ string format = ruleConfig.Format;
+ string splitStr = ruleConfig.SplitStr;
+ List<string> items = format.Split(splitStr).ToList();
+ List<string> codes = code.Split(splitStr).ToList();
+ if (items.Count == codes.Count)
+ {
+ PropertyInfo[] propertyInfos = type.GetProperties();
+ if (AnalysisRuleEnum.Split == analysisRule.AnalysisRule)
+ {
+ for (int i = 0; i < propertyInfos.Length; i++)
+ {
+ PropertyInfo propertyInfo = propertyInfos[i];
+ AnalysisItemRuleAttribute? analysisItemRule = propertyInfo.GetCustomAttribute<AnalysisItemRuleAttribute>();
+ if (analysisItemRule != null)
+ {
+ if (analysisItemRule.AnalysisFormaType == AnalysisFormatTypeEnum.BD)
+ {
+ propertyInfo.SetValue(result, code.ChangeType(propertyInfo.PropertyType));
+ }
+ else
+ {
+ int index = items.IndexOf($"[{analysisItemRule.AnalysisFormaType}]");
+ if (index != -1)
+ {
+ propertyInfo.SetValue(result, codes[index]);
+ }
+ else
+ {
+ string? codeItem = items.FirstOrDefault(x => x.Contains($"[{analysisItemRule.AnalysisFormaType}]"));
+ if (!string.IsNullOrEmpty(codeItem))
+ {
+ index = items.IndexOf(codeItem);
+ if (index != -1)
+ {
+ string value = codes[index];
+ string replaceStr = codeItem.Replace($"[{analysisItemRule.AnalysisFormaType}]", "");
+
+ propertyInfo.SetValue(result, value.Replace(replaceStr, "").ChangeType(propertyInfo.PropertyType));
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ throw new Exception($"瑙f瀽閿欒,{ex.Message}");
+ }
+
+ (bool, string, object?) validateResult = ModelValidate.ValidateModelData(result, type);
+ if (!validateResult.Item1)
+ {
+ throw new Exception($"瑙f瀽閿欒,{validateResult.Item2}");
+ }
+
+ return result;
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/MatSerNumAnalysisModel.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/MatSerNumAnalysisModel.cs"
index d8c83e1..803eb26 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/MatSerNumAnalysisModel.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/MatSerNumAnalysisModel.cs"
@@ -55,5 +55,11 @@
/// </summary>
[AnalysisItemRule(AnalysisFormatTypeEnum.BD), PropertyValidate("鍘熷鏁版嵁", NotNullAndEmpty = true)]
public string SerialNumber { get; set; }
+
+ /// <summary>
+ /// 鐗╂枡闀垮害
+ /// </summary>
+ [AnalysisItemRule(AnalysisFormatTypeEnum.ML), PropertyValidate("鍘熷鏁版嵁", NotNullAndEmpty = false)]
+ public string MaterielLength { get; set; }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/ILocationInfoRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/ILocationInfoRepository.cs"
index f29220d..acc810b 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/ILocationInfoRepository.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/ILocationInfoRepository.cs"
@@ -53,6 +53,9 @@
/// <returns></returns>
List<string> GetCanOutLocationCodes(int warehouseId);
+
+ List<string> GetCanOutPPLocationCodes(int warehouseId);
+
List<string> PPGetCanOutLocationCodes(int warehouseId);
/// <summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs"
index 1dff918..5458c6a 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs"
@@ -53,5 +53,14 @@
/// 鎴愬搧鍏ュ簱涓婁紶ERP
/// </summary>
WebResponseContent FeedbackProIn(Dt_MesProInOrder mesProInOrder);
+ /// <summary>
+ /// PP骞冲簱缁勭洏
+ /// </summary>
+ /// <param name="palletCode"></param>
+ /// <param name="Initiallife"></param>
+ /// <param name="warehouseId"></param>
+ /// <param name="serNums"></param>
+ /// <returns></returns>
+ WebResponseContent PPPKMaterielGroup(string palletCode, int Initiallife, int warehouseId, List<string> serNums);
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IMesPPOutboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IMesPPOutboundOrderService.cs"
index 6974ddd..0432093 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IMesPPOutboundOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IMesPPOutboundOrderService.cs"
@@ -16,6 +16,9 @@
//(List<Dt_StockInfo>, Dt_MesPPOutboundOrder, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignStockOutbound(Dt_MesPPOutboundOrder mesOutboundOrder);
//(List<Dt_StockInfo>, Dt_MesPPCutOutboundOrderDetail, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignStockOutbound(Dt_MesPPCutOutboundOrder mesPPOutboundOrder, Dt_MesPPCutOutboundOrderDetail mesPPCutOutboundOrderDetail);
-
+
+ public (List<Dt_StockInfo>, Dt_MesPPOutboundOrder, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignPPStockOutbound(Dt_MesPPOutboundOrder mesPPOutboundOrder);
+
+ public (List<Dt_StockInfo>, List<Dt_MesPPCutOutboundOrderDetail>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignPPCutStockOutbound(Dt_MesPPCutOutboundOrder mesPPCutOutboundOrder, List<Dt_MesPPCutOutboundOrderDetail> mesPPCutOutboundOrderDetails);
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs"
index 822d536..ea4e7a3 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs"
@@ -58,8 +58,10 @@
/// <param name="assignQuantity"></param>
/// <param name="taskNum"></param>
/// <returns></returns>
- List<Dt_OutStockLockInfo> GetOutStockLockInfos(Dt_MesPPCutOutboundOrder mesPPCutOutboundOrder,Dt_MesPPCutOutboundOrderDetail mesPPCutOutboundOrderDetail, List<Dt_StockInfo> outStock, int? taskNum = null);
+ Dt_OutStockLockInfo GetOutStockLockInfos(Dt_MesPPCutOutboundOrder mesPPCutOutboundOrder,Dt_MesPPCutOutboundOrderDetail mesPPCutOutboundOrderDetail, Dt_StockInfo outStock, int? taskNum = null);
+
+ List<Dt_OutStockLockInfo> GetOutStockLockInfos(Dt_MesPPCutOutboundOrder mesPPCutOutboundOrder, Dt_MesPPCutOutboundOrderDetail mesPPCutOutboundOrderDetail, List<Dt_StockInfo> outStock, int? taskNum = null);
/// <summary>
///
/// </summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs"
index 84a3914..30e25d2 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs"
@@ -20,8 +20,12 @@
List<Dt_StockInfo> GetOutboundStocks(List<Dt_StockInfo> stockInfos, string materielCode, float needQuantity, out float residueQuantity);
+ List<Dt_StockInfo> GetOutboundPPStocks(List<Dt_StockInfo> stockInfos, string materielCode, float needQuantity, out float residueQuantity,string targetAddressCode = "");
+
List<Dt_StockInfo> GetUseableStocks(string materielCode, string batchNo, int warehoseId);
+ List<Dt_StockInfo> GetUseablePPStocks(string materielCode, string batchNo, int warehoseId);
+
//List<Dt_StockInfo> GetUseableStocks(string materielCode, string batchNo,,string , int warehoseId);
List<Dt_StockInfo> GetUseableStocks(string materielCode, string batchNo, string palletcode, int warehoseId);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs"
index f1d6d3e..c581fcf 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs"
@@ -405,5 +405,21 @@
/// <param name="warehouseId"></param>
/// <returns></returns>
public Task<WebResponseContent> TaskHandCancel(int taskNum);
+
+ /// <summary>
+ /// PP骞冲簱鐢宠鍏ュ簱浠诲姟
+ /// </summary>
+ /// <param name="palletCode">鎵樼洏鍙�</param>
+ /// <param name="stationCode">绔欏彴鍙�</param>
+ /// <returns></returns>
+ WebResponseContent PPPKRequestInboundTask(SaveModel saveModel);
+
+ /// <summary>
+ /// PP骞冲簱鐢熸垚鎼繍浠诲姟
+ /// </summary>
+ /// <param name="palletCode">鎵樼洏鍙�</param>
+ /// <param name="stationCode">绔欏彴鍙�</param>
+ /// <returns></returns>
+ public WebResponseContent PPTaskMove(string palletCode, string startPoint, int warehouseId, List<string> serNums);
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
index 19140ee..c354503 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
@@ -1853,6 +1853,15 @@
{
return 4;
}
+ else if (warehouse.WarehouseCode == WarehouseEnum.HA581.ObjToString())
+ {
+ Dt_PalletTypeInfo palletTypeInfo = _palletTypeInfoRepository.QueryFirst(x => x.CodeStartStr == palletCode.Substring(0, 2));
+ if (palletTypeInfo == null)
+ {
+ throw new Exception($"鎵樼洏鍙烽敊璇�");
+ }
+ return palletTypeInfo.PalletType;
+ }
return -1;
}
/// <summary>
@@ -1900,5 +1909,143 @@
}
return WebResponseContent.Instance.OK();
}
+
+ public WebResponseContent PPPKMaterielGroup(string palletCode, int Initiallife, 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($"鏈壘鍒拌浠撳簱淇℃伅");
+ }
+
+ List<MatSerNumAnalysisModel> models = CodeAnalysisHelper.CodeAnalysis<MatSerNumAnalysisModel>(AnalysisCodeEnum.PPPKSerNumAnalysis, serNums);
+
+ if (models.Select(x => x.MaterielCode).Distinct().Count() > 1)
+ {
+ return WebResponseContent.Instance.Error($"鐗╂枡涓嶅彲娣锋斁");
+ }
+ //楠岃瘉鍒ゆ柇鏃堕棿鏍煎紡
+ WebResponseContent IsValidContent = IsValidMCDates(models);
+ if (!IsValidContent.Status)
+ {
+ return content.Error(IsValidContent.Message);
+ }
+ string materielCode = models.FirstOrDefault()?.MaterielCode ?? "";
+
+ int materielWidth = 0;
+
+ if (materielCode.Contains("-"))
+ {
+ var model = models.FirstOrDefault();
+ if (model != null && !string.IsNullOrEmpty(model.MaterielCode))
+ {
+ var codeParts = model.MaterielCode.Split("-");
+ if (codeParts.Length >= 2)
+ {
+ if (int.TryParse(codeParts[1], out int widthValue))
+ {
+ materielWidth = widthValue;
+ }
+ else
+ {
+ materielWidth = 0;
+ }
+
+ materielCode = codeParts[0];
+ }
+ }
+ }
+ Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterielCode == materielCode);
+ if (materielInfo == null)
+ {
+ return WebResponseContent.Instance.Error($"鏈壘鍒拌鐗╂枡鐨勪俊鎭�");
+ }
+
+ 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()
+ {
+ PalletCode = palletCode,
+ StockStatus = StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt(),
+ WarehouseId = warehouse.WarehouseId,
+ PalletType = GetPalletType(warehouse, palletCode),
+ Details = new List<Dt_StockInfoDetail>()
+ };
+ }
+ else
+ {
+ if (stockInfo.StockStatus != StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt())
+ {
+ return WebResponseContent.Instance.Error($"鎵樼洏鍙烽噸澶�");
+ }
+ beforeQuantity = stockInfo.Details.Sum(x => x.StockQuantity);
+ }
+ if(materielWidth != 0&& materielWidth < 650 && stockInfo.PalletType > 1)
+ {
+ return WebResponseContent.Instance.Error("浣庝簬650瑁佸垏瀹界殑鐗╂枡璇风敤灏忔墭鐩樻潯鐮侀噸鏂扮粍鐩橈紒");
+ }
+ else if(materielWidth != 0 && materielWidth >= 650 && stockInfo.PalletType < 2)
+ {
+ return WebResponseContent.Instance.Error("650瑁佸垏瀹戒互涓婄殑鐗╂枡璇风敤澶ф墭鐩樻潯鐮侀噸鏂扮粍鐩橈紒");
+ }
+ List<Dt_StockInfoDetail> stockInfoDetails = new List<Dt_StockInfoDetail>();
+ List<int> detailKeys = new List<int>();
+ foreach (var model in models)
+ {
+ Dt_StockInfoDetail stockInfoDetail = new Dt_StockInfoDetail()
+ {
+ BatchNo = model.LotNo,
+ MaterielCode = model.MaterielCode,
+ MaterielName = materielInfo.MaterielName,
+ MaterielSpec = materielInfo.MaterielSpec,
+ OrderNo = "",
+ SerialNumber = model.SerialNumber,
+ StockQuantity = model.MaterielCode.Contains("-")? model.MaterielLength.ObjToInt():model.Quantity,
+ OutboundQuantity = 0,
+ Unit = materielInfo.MaterielUnit,
+ Status = StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt(),
+ ProductionDate = model.ProductionDate,
+ EffectiveDate = model.EffectiveDate,
+ InboundOrderRowNo = 0,
+ };
+
+ if (stockInfo.Id > 0)
+ {
+ stockInfoDetail.StockId = stockInfo.Id;
+ }
+ stockInfo.Details.Add(stockInfoDetail);
+
+ stockInfoDetails.Add(stockInfoDetail);
+ }
+
+ 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();
+ }
+ _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfoDetails, beforeQuantity, totalQuantity, StockChangeTypeEnum.MaterielGroup);
+ _unitOfWorkManage.CommitTran();
+ content.OK();
+ }
+ catch (Exception ex)
+ {
+ _unitOfWorkManage.RollbackTran();
+ content.Error(ex.Message);
+ }
+ return content;
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderService.cs"
index 08f1072..2d21e5e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderService.cs"
@@ -295,6 +295,10 @@
{
throw new Exception(mesResponseContent.StrMsg);
}
+ if (mesResponseContent.Content == null)
+ {
+ throw new Exception("QMS杩斿洖妫�楠岀粨鏋滀负绌�");
+ }
//QMS鍥炰紶缁撴灉
ReceiveResultDTO? receiveResult = JsonConvert.DeserializeObject<ReceiveResultDTO>(mesResponseContent.Content.ToString());
if (receiveResult == null)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_MaterielCodeInfo.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_MaterielCodeInfo.cs"
index dfda82a..746dac1 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_MaterielCodeInfo.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_MaterielCodeInfo.cs"
@@ -84,5 +84,11 @@
/// </summary>
[SugarColumn(IsNullable = false,Length =500,ColumnDescription = "鐗╂枡瑙勬牸")]
public string MaterielSpec { get; set; }
+
+ /// <summary>
+ /// 鐗╂枡闀垮害
+ /// </summary>
+ [SugarColumn(IsNullable = true, ColumnDescription = "鐗╂枡闀垮害")]
+ public decimal MaterielLength { get; set; }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesPPCutOutboundOrderDetail.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesPPCutOutboundOrderDetail.cs"
index cbdfe2a..c457aca 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesPPCutOutboundOrderDetail.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesPPCutOutboundOrderDetail.cs"
@@ -30,13 +30,13 @@
/// 鐗╂枡缂栧彿
/// </summary>
[SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鐗╂枡缂栧彿")]
- public string MaterielCode { get; set; }
+ public string MaterialCode { get; set; }
/// <summary>
/// 鐗╂枡鍚嶇О
/// </summary>
[SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "鐗╂枡鍚嶇О")]
- public string MaterielName { get; set; }
+ public string MaterialName { get; set; }
/// <summary>
/// 鎵规鍙�
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesPPCutOutboundOrderDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesPPCutOutboundOrderDetailService.cs"
index 263ac9b..3c09503 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesPPCutOutboundOrderDetailService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesPPCutOutboundOrderDetailService.cs"
@@ -133,9 +133,9 @@
needQuantity -= assignQuantity;
if (mesPPOutboundOrderDetails.OrderQuantity > mesPPOutboundOrderDetails.LockQuantity)
{
- List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseableStocks(mesPPOutboundOrderDetails.MaterielCode, mesPPOutboundOrderDetails.BatchNo, OutboundOrder.WarehouseId);
+ List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseableStocks(mesPPOutboundOrderDetails.MaterialCode, mesPPOutboundOrderDetails.BatchNo, OutboundOrder.WarehouseId);
stockInfos = stockInfos.Where(x => !stockSelectViews.Select(v => v.PalletCode).Contains(x.PalletCode)).ToList();
- List<Dt_StockInfo> autoAssignStocks = _stockService.StockInfoService.GetOutboundStocks(stockInfos, mesPPOutboundOrderDetails.MaterielCode, needQuantity, out float residueQuantity);
+ List<Dt_StockInfo> autoAssignStocks = _stockService.StockInfoService.GetOutboundStocks(stockInfos, mesPPOutboundOrderDetails.MaterialCode, needQuantity, out float residueQuantity);
mesPPOutboundOrderDetails.LockQuantity += needQuantity - residueQuantity;
outStocks.AddRange(autoAssignStocks);
mesPPOutboundOrderDetails.OrderDetailStatus = OrderDetailStatusEnum.AssignOver.ObjToInt();
@@ -145,7 +145,7 @@
}
}
- List<Dt_OutStockLockInfo> outStockLockInfos = _outStockLockInfoService.GetOutStockLockInfos(OutboundOrder, mesPPOutboundOrderDetails, outStocks);
+ List<Dt_OutStockLockInfo> outStockLockInfos = _outStockLockInfoService.GetOutStockLockInfos(OutboundOrder,mesPPOutboundOrderDetails,outStocks);
List<Dt_LocationInfo> locationInfos = _basicService.LocationInfoService.Repository.GetLocationInfos(outStocks.Select(x => x.LocationCode).ToList());
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesPPOutboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesPPOutboundOrderService.cs"
index 31d97cd..dd44300 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesPPOutboundOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesPPOutboundOrderService.cs"
@@ -33,7 +33,7 @@
_basicService = basicService;
_recordService = recordService;
}
-
+ #region PP鍑哄簱锛堟棫锛�
//public (List<Dt_StockInfo>, Dt_MesPPOutboundOrder, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignStockOutbound(Dt_MesPPOutboundOrder mesPPOutboundOrder)
//{
// List<Dt_StockInfo> outStocks = new List<Dt_StockInfo>();
@@ -138,6 +138,128 @@
// return (outStocks, mesPPCutOutboundOrderDetail, outStockLockInfos, locationInfos);
//}
-
+ #endregion
+
+
+ /// <summary>
+ /// PP澶у嵎鍑哄簱锛堟柊锛�
+ /// </summary>
+ /// <param name="mesPPOutboundOrder"></param>
+ /// <returns></returns>
+ /// <exception cref="Exception"></exception>
+ public (List<Dt_StockInfo>, Dt_MesPPOutboundOrder, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignPPStockOutbound(Dt_MesPPOutboundOrder mesPPOutboundOrder)
+ {
+ List<Dt_StockInfo> outStocks = new List<Dt_StockInfo>();
+
+ List<Dt_OutStockLockInfo> outStockLockInfos = new List<Dt_OutStockLockInfo>();
+ List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>();
+
+ float originalNeedQuantity = mesPPOutboundOrder.OrderQuantity;
+
+ float needQuantity = originalNeedQuantity;
+ //鑾峰彇搴撳瓨
+ List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseablePPStocks(mesPPOutboundOrder.MaterialCode, "", mesPPOutboundOrder.WarehouseId);
+ if (!stockInfos.Any())
+ {
+ throw new Exception($"鏈壘鍒板彲鍒嗛厤搴撳瓨");
+ }
+ List<Dt_StockInfo> autoAssignStocks = _stockService.StockInfoService.GetOutboundPPStocks(stockInfos, mesPPOutboundOrder.MaterialCode, needQuantity, out float residueQuantity);
+ if (residueQuantity > 0)
+ {
+ throw new Exception($"搴撳瓨涓嶈冻");
+ }
+ autoAssignStocks.OrderBy(x => x.Details.FirstOrDefault()?.StockQuantity).ToList();
+ outStocks.AddRange(autoAssignStocks);
+ for (int j = 0; j < autoAssignStocks.Count; j++)
+ {
+ float detailAssignQuantity = outStockLockInfos.Where(x => x.MaterielCode == mesPPOutboundOrder.MaterialCode).Sum(x => x.AssignQuantity);//鍑哄簱璁㈠崟鏄庣粏宸插垎閰嶆暟閲�
+
+ float palletAssignQuantity = outStockLockInfos.Where(x => x.MaterielCode == mesPPOutboundOrder.MaterialCode && x.PalletCode == autoAssignStocks[j].PalletCode).Sum(x => x.AssignQuantity);//鍑哄簱璇︽儏宸插垎閰嶆暟閲�
+
+ float palletOutboundQuantity = autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity);
+ if (palletAssignQuantity < palletOutboundQuantity)//濡傛灉鍑哄簱璇︽儏宸插垎閰嶆暟閲忓皬浜庢墭鐩樺凡鍒嗛厤鏁伴噺锛屽垯鍙互缁х画娣诲姞璇ユ墭鐩樺嚭搴撲俊鎭�
+ {
+ float orderDetailNeedQuantity = mesPPOutboundOrder.OrderQuantity - detailAssignQuantity;
+ if (orderDetailNeedQuantity > autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity) - palletAssignQuantity)
+ {
+ mesPPOutboundOrder.LockQuantity += autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity) - palletAssignQuantity;
+ Dt_OutStockLockInfo outStockLockInfo = _outStockLockInfoService.GetOutStockLockInfo(mesPPOutboundOrder, autoAssignStocks[j], autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity) - palletAssignQuantity);
+ outStockLockInfos.Add(outStockLockInfo);
+ }
+ else
+ {
+ Dt_OutStockLockInfo outStockLockInfo = _outStockLockInfoService.GetOutStockLockInfo(mesPPOutboundOrder, autoAssignStocks[j], mesPPOutboundOrder.OrderQuantity - mesPPOutboundOrder.LockQuantity);
+ outStockLockInfos.Add(outStockLockInfo);
+ mesPPOutboundOrder.LockQuantity = mesPPOutboundOrder.OrderQuantity;
+ break;
+ }
+ }
+ }
+ locationInfos.AddRange(_basicService.LocationInfoService.Repository.GetLocationInfos(outStocks.Select(x => x.LocationCode).ToList()));
+
+ return (outStocks, mesPPOutboundOrder, outStockLockInfos, locationInfos);
+ }
+
+ /// <summary>
+ /// PP灏忓嵎鍑哄簱锛堟柊锛�
+ /// </summary>
+ /// <param name="mesPPOutboundOrder"></param>
+ /// <returns></returns>
+ /// <exception cref="Exception"></exception>
+ public (List<Dt_StockInfo>, List<Dt_MesPPCutOutboundOrderDetail>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignPPCutStockOutbound(Dt_MesPPCutOutboundOrder mesPPCutOutboundOrder,List<Dt_MesPPCutOutboundOrderDetail> mesPPCutOutboundOrderDetails)
+ {
+ List<Dt_StockInfo> outStocks = new List<Dt_StockInfo>();
+
+ List<Dt_OutStockLockInfo> outStockLockInfos = new List<Dt_OutStockLockInfo>();
+ List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>();
+
+ foreach (var item in mesPPCutOutboundOrderDetails)
+ {
+ float originalNeedQuantity = item.OrderQuantity;
+
+ float needQuantity = originalNeedQuantity;
+ //鑾峰彇搴撳瓨
+ List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseablePPStocks(item.MaterialCode, "", mesPPCutOutboundOrder.WarehouseId);
+ if (!stockInfos.Any())
+ {
+ throw new Exception($"鏈壘鍒板彲鍒嗛厤搴撳瓨");
+ }
+ List<Dt_StockInfo> autoAssignStocks = _stockService.StockInfoService.GetOutboundPPStocks(stockInfos, item.MaterialCode, needQuantity, out float residueQuantity,item.TargetAddressCode);
+ if (residueQuantity > 0)
+ {
+ throw new Exception($"搴撳瓨涓嶈冻");
+ }
+ autoAssignStocks.OrderBy(x => x.Details.FirstOrDefault()?.StockQuantity).ToList();
+ outStocks.AddRange(autoAssignStocks);
+ for (int j = 0; j < autoAssignStocks.Count; j++)
+ {
+ float detailAssignQuantity = outStockLockInfos.Where(x => x.MaterielCode == item.MaterialCode).Sum(x => x.AssignQuantity);//鍑哄簱璁㈠崟鏄庣粏宸插垎閰嶆暟閲�
+
+ float palletAssignQuantity = outStockLockInfos.Where(x => x.MaterielCode == item.MaterialCode && x.PalletCode == autoAssignStocks[j].PalletCode).Sum(x => x.AssignQuantity);//鍑哄簱璇︽儏宸插垎閰嶆暟閲�
+
+ float palletOutboundQuantity = autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity);
+ if (palletAssignQuantity < palletOutboundQuantity)//濡傛灉鍑哄簱璇︽儏宸插垎閰嶆暟閲忓皬浜庢墭鐩樺凡鍒嗛厤鏁伴噺锛屽垯鍙互缁х画娣诲姞璇ユ墭鐩樺嚭搴撲俊鎭�
+ {
+ float orderDetailNeedQuantity = item.OrderQuantity - detailAssignQuantity;
+ if (orderDetailNeedQuantity > autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity) - palletAssignQuantity)
+ {
+ item.LockQuantity += autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity) - palletAssignQuantity;
+ Dt_OutStockLockInfo outStockLockInfo = _outStockLockInfoService.GetOutStockLockInfos(mesPPCutOutboundOrder, item, autoAssignStocks[j]);
+ outStockLockInfos.Add(outStockLockInfo);
+ }
+ else
+ {
+ Dt_OutStockLockInfo outStockLockInfo = _outStockLockInfoService.GetOutStockLockInfos(mesPPCutOutboundOrder, item , autoAssignStocks[j]);
+ outStockLockInfos.Add(outStockLockInfo);
+ item.LockQuantity = item.OrderQuantity;
+ break;
+ }
+ }
+ }
+ }
+ locationInfos.AddRange(_basicService.LocationInfoService.Repository.GetLocationInfos(outStocks.Select(x => x.LocationCode).ToList()));
+
+ return (outStocks, mesPPCutOutboundOrderDetails, outStockLockInfos, locationInfos);
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs"
index cba7d6c..fe82a8b 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs"
@@ -132,6 +132,34 @@
/// <param name="assignQuantity"></param>
/// <param name="taskNum"></param>
/// <returns></returns>
+ public Dt_OutStockLockInfo GetOutStockLockInfos(Dt_MesPPCutOutboundOrder mesPPCutOutboundOrder, Dt_MesPPCutOutboundOrderDetail mesPPCutOutboundOrderDetail, Dt_StockInfo outStock, int? taskNum = null)
+ {
+
+ Dt_OutStockLockInfo outStockLockInfo = new Dt_OutStockLockInfo()
+ {
+ PalletCode = outStock.PalletCode,
+ AssignQuantity = outStock.Details.Where(x => x.MaterielCode == mesPPCutOutboundOrderDetail.MaterialCode).Sum(x => x.OutboundQuantity),
+ MaterielCode = mesPPCutOutboundOrderDetail.MaterialCode,
+ BatchNo = outStock.Details.FirstOrDefault().BatchNo,
+ LocationCode = outStock.LocationCode,
+ MaterielName = mesPPCutOutboundOrderDetail.MaterialName,
+ OrderDetailId = mesPPCutOutboundOrderDetail.Id,
+ OrderNo = mesPPCutOutboundOrder.OrderNo,
+ OrderType = mesPPCutOutboundOrder.OrderType,
+ OriginalQuantity = outStock.Details.Where(x => x.MaterielCode == mesPPCutOutboundOrderDetail.MaterialCode).Sum(x => x.StockQuantity),
+ Status = taskNum == null ? OutLockStockStatusEnum.宸插垎閰�.ObjToInt() : OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt(),
+ StockId = outStock.Id,
+ TaskNum = taskNum,
+ OrderQuantity = mesPPCutOutboundOrderDetail.OrderQuantity,
+ Unit = mesPPCutOutboundOrderDetail.Unit,
+ ProductionDate = outStock.Details.Where(x => x.MaterielCode == mesPPCutOutboundOrderDetail.MaterialCode).FirstOrDefault()?.ProductionDate,
+ EffectiveDate = outStock.Details.Where(x => x.MaterielCode == mesPPCutOutboundOrderDetail.MaterialCode).FirstOrDefault()?.EffectiveDate
+ };
+
+
+ return outStockLockInfo;
+ }
+
public List<Dt_OutStockLockInfo> GetOutStockLockInfos(Dt_MesPPCutOutboundOrder mesPPCutOutboundOrder, Dt_MesPPCutOutboundOrderDetail mesPPCutOutboundOrderDetail, List<Dt_StockInfo> outStock, int? taskNum = null)
{
List<Dt_OutStockLockInfo> outStockLockInfos = new List<Dt_OutStockLockInfo>();
@@ -141,22 +169,22 @@
Dt_OutStockLockInfo outStockLockInfo = new Dt_OutStockLockInfo()
{
PalletCode = item.PalletCode,
- AssignQuantity = item.Details.Where(x => x.MaterielCode == mesPPCutOutboundOrderDetail.MaterielCode).Sum(x => x.OutboundQuantity),
- MaterielCode = mesPPCutOutboundOrderDetail.MaterielCode,
+ AssignQuantity = item.Details.Where(x => x.MaterielCode == mesPPCutOutboundOrderDetail.MaterialCode).Sum(x => x.OutboundQuantity),
+ MaterielCode = mesPPCutOutboundOrderDetail.MaterialCode,
BatchNo = item.Details.FirstOrDefault().BatchNo,
LocationCode = item.LocationCode,
- MaterielName = mesPPCutOutboundOrderDetail.MaterielName,
+ MaterielName = mesPPCutOutboundOrderDetail.MaterialName,
OrderDetailId = mesPPCutOutboundOrderDetail.Id,
OrderNo = mesPPCutOutboundOrder.OrderNo,
OrderType = mesPPCutOutboundOrder.OrderType,
- OriginalQuantity = item.Details.Where(x => x.MaterielCode == mesPPCutOutboundOrderDetail.MaterielCode).Sum(x => x.StockQuantity),
+ OriginalQuantity = item.Details.Where(x => x.MaterielCode == mesPPCutOutboundOrderDetail.MaterialCode).Sum(x => x.StockQuantity),
Status = taskNum == null ? OutLockStockStatusEnum.宸插垎閰�.ObjToInt() : OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt(),
StockId = item.Id,
TaskNum = taskNum,
OrderQuantity = mesPPCutOutboundOrderDetail.OrderQuantity,
Unit = mesPPCutOutboundOrderDetail.Unit,
- ProductionDate = item.Details.Where(x => x.MaterielCode == mesPPCutOutboundOrderDetail.MaterielCode).FirstOrDefault()?.ProductionDate,
- EffectiveDate = item.Details.Where(x => x.MaterielCode == mesPPCutOutboundOrderDetail.MaterielCode).FirstOrDefault()?.EffectiveDate
+ ProductionDate = item.Details.Where(x => x.MaterielCode == mesPPCutOutboundOrderDetail.MaterialCode).FirstOrDefault()?.ProductionDate,
+ EffectiveDate = item.Details.Where(x => x.MaterielCode == mesPPCutOutboundOrderDetail.MaterialCode).FirstOrDefault()?.EffectiveDate
};
outStockLockInfos.Add(outStockLockInfo);
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs"
index 2fe284f..e169788 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs"
@@ -11,6 +11,7 @@
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Common.StockEnum;
+using WIDESEA_Common.WareHouseEnum;
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Enums;
@@ -290,8 +291,86 @@
residueQuantity = needQuantity;
return outStocks;
}
+ //PP澶у嵎鍑哄簱锛堟柊锛�
+ public List<Dt_StockInfo> GetOutboundPPStocks(List<Dt_StockInfo> stockInfos, string materielCode, float needQuantity, out float residueQuantity,string targetAddressCode = "")
+ {
+ List<Dt_StockInfo> outStocks = new List<Dt_StockInfo>();
+ stockInfos = stockInfos.OrderBy(x =>
+ x.WarehouseId == WarehouseEnum.HA581.ObjToInt()? 0 :
+ x.WarehouseId == WarehouseEnum.HA58.ObjToInt()? 1 :
+ 2
+ ).ToList();
- public List<Dt_StockInfo> GetUseableStocks(string materielCode, string batchNo, int warehoseId)
+ // 璁$畻鎬诲彲鐢ㄥ簱瀛橈紙浠呯粺璁℃寚瀹氱墿鏂欑紪鐮侊級
+ float stockTotalQuantity = stockInfos
+ .Select(x => x.Details
+ .Where(d => d.MaterielCode == materielCode)
+ .Sum(v => v.StockQuantity - v.OutboundQuantity)
+ ).Sum(x => x);
+
+ if (stockTotalQuantity >= needQuantity)//搴撳瓨澶�
+ {
+ int index = 0;
+ while (needQuantity > 0 && index < stockInfos.Count)
+ {
+ Dt_StockInfo stockInfo = stockInfos[index];
+ decimal useableStockQuantity = stockInfo.Details
+ .Where(x => x.MaterielCode == materielCode)
+ .Sum(x => (decimal)x.StockQuantity - (decimal)x.OutboundQuantity);
+
+ if (useableStockQuantity < (decimal)needQuantity && useableStockQuantity > 0)
+ {
+ // 鍙敤閲忎笉瓒筹紝鍏ㄩ儴鍑哄簱
+ stockInfo.Details.ForEach(x =>
+ {
+ if (x.MaterielCode == materielCode)
+ x.OutboundQuantity = x.StockQuantity;
+ });
+ needQuantity = (float)((decimal)needQuantity - useableStockQuantity);
+ }
+ else if (useableStockQuantity > 0)
+ {
+ stockInfo.Details.ForEach(x =>
+ {
+ if (x.StockQuantity > x.OutboundQuantity && x.MaterielCode == materielCode)
+ {
+ decimal currentStock = (decimal)x.StockQuantity;
+ decimal currentOutbound = (decimal)x.OutboundQuantity;
+ decimal currentNeed = (decimal)needQuantity;
+ decimal available = currentStock - currentOutbound;
+
+ if (available >= currentNeed)
+ {
+ x.OutboundQuantity = (float)(currentOutbound + currentNeed);
+ needQuantity = 0;
+ }
+ else
+ {
+ needQuantity = (float)(currentNeed - available);
+ x.OutboundQuantity = x.StockQuantity;
+ }
+ }
+ });
+ }
+ // 浠呭皢鏈夊疄闄呭嚭搴撶殑搴撳瓨鍔犲叆缁撴灉闆�
+ if (useableStockQuantity > 0)
+ {
+ stockInfo.Remark = targetAddressCode;
+ outStocks.Add(stockInfo);
+ }
+
+ index++;
+ }
+ }
+ else
+ {
+ throw new Exception("搴撳瓨涓嶈冻");
+ }
+ residueQuantity = needQuantity;
+ return outStocks;
+ }
+
+ public List<Dt_StockInfo> GetUseableStocks(string materielCode, string batchNo, int warehoseId)
{
if ((materielCode.Equals("405000585")|| materielCode.Equals("405000831") || materielCode.Equals("405005565") || materielCode.Equals("405405097") || materielCode.Equals("405005461")) && warehoseId == 5)
{
@@ -301,6 +380,13 @@
return BaseDal.GetStockInfos(materielCode, batchNo, locationCodes);
}
+ //PP澶у嵎鍑哄簱(鏂�)
+ public List<Dt_StockInfo> GetUseablePPStocks(string materielCode, string batchNo, int warehoseId)
+ {
+ List<string> locationCodes = _basicRepository.LocationInfoRepository.GetCanOutPPLocationCodes(warehoseId);
+
+ return BaseDal.GetStockInfos(materielCode, batchNo, locationCodes);
+ }
public List<Dt_StockInfo> GetUseableStocks(string materielCode, string batchNo, string palletcode, int warehoseId)
{
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
index 4c88553..fa02772 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
@@ -31,6 +31,10 @@
using SqlSugar;
using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
+using WIDESEA_Core.CodeConfigEnum;
+using WIDESEA_DTO.Basic;
+using System.Globalization;
+using System.Collections;
namespace WIDESEA_TaskInfoService
{
@@ -518,6 +522,29 @@
return model;
}
+ public MesMaterialLotaAceptModel PPGetMesMaterialLotaAceptModel(Dt_StockInfo stockInfo, Dt_StockInfoDetail stockInfoDetail, string taskNo, string warehouseCode, float quantity, string cutedType = "", float ppWidth = 0)
+ {
+ MesMaterialLotaAceptModel model = new MesMaterialLotaAceptModel()
+ {
+ CarrierCode = stockInfo.PalletCode,
+ CutedType = cutedType,
+ ExpirationDate = stockInfoDetail.EffectiveDate,
+ MaterialBarCode = stockInfoDetail.SerialNumber,
+ MaterialCode = stockInfoDetail.MaterielCode,
+ MaterialLot = stockInfoDetail.MaterielCode + "," + stockInfoDetail.BatchNo,
+ MaterialName = stockInfoDetail.MaterielName,
+ PPWidth = ppWidth,
+ ProductionDate = stockInfoDetail.ProductionDate,
+ Quantity = quantity,
+ Supplier = "",
+ TaskNo = taskNo,
+ Type = 2,
+ WarehouseArea = warehouseCode,
+ WarehouseLocation = warehouseCode
+ };
+
+ return model;
+ }
/// <summary>
/// 鍩烘澘鍑哄簱
/// </summary>
@@ -719,7 +746,6 @@
MesResponseContent modelCount = new MesResponseContent();
try
{
-
Dt_Warehouse warehouse = _basicService.WarehouseService.Repository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA58.ToString());
if (warehouse == null)
{
@@ -742,7 +768,7 @@
};
mesPPOutboundOrderDetail.Add(dt_MesPPOutboundOrderDetail);
}
- Dt_MesPPOutboundOrder mesOutboundOrder = new Dt_MesPPOutboundOrder()
+ Dt_MesPPOutboundOrder mesPPOutboundOrder1 = new Dt_MesPPOutboundOrder()
{
CreateType = OrderCreateTypeEnum.UpperSystemPush.ObjToInt(),
MaterialCode = model.MaterialCode,
@@ -758,67 +784,111 @@
Details = mesPPOutboundOrderDetail
};
#region
- //Db.InsertNav(mesOutboundOrder).Include(x=>x.Details).ExecuteCommand();
- // List<Dt_Task> tasks = new List<Dt_Task>();
+ List<Dt_Task> tasks = new List<Dt_Task>();
- // List<Dt_StockInfo>? stockInfos = null;
- // List<Dt_OutStockLockInfo>? outStockLockInfos = null;
- // List<Dt_LocationInfo>? locationInfos = null;
- // {
- //(List<Dt_StockInfo>, Dt_MesPPOutboundOrder, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.MesPPOutboundOrderService.AssignStockOutbound(mesOutboundOrder);
- // if (result.Item1 != null && result.Item1.Count > 0)
- // {
- // tasks = GetTasks(result.Item1, TaskTypeEnum.MesOutbound);
- // result.Item2.OrderStatus = OrderDetailStatusEnum.Outbound.ObjToInt();
- // result.Item3.ForEach(x =>
- // {
- // x.Status = OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt();
- // });
+ List<Dt_StockInfo>? stockInfos = null;
+ List<Dt_OutStockLockInfo>? outStockLockInfos = null;
+ List<Dt_LocationInfo>? locationInfos = null;
+ List<Dt_MaterielCodeInfo> materielCodes = new List<Dt_MaterielCodeInfo>();
+ {
+ (List<Dt_StockInfo>, Dt_MesPPOutboundOrder, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.MesPPOutboundOrderService.AssignPPStockOutbound(mesPPOutboundOrder1);
+ if (result.Item1 != null && result.Item1.Count > 0)
+ {
+ tasks = GetTasks(result.Item1, TaskTypeEnum.MesPPOutbound);
+ result.Item2.OrderStatus = OrderDetailStatusEnum.Outbound.ObjToInt();
+ result.Item3.ForEach(x =>
+ {
+ x.Status = OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt();
+ });
- // stockInfos = result.Item1;
- // mesOutboundOrder = result.Item2;
- // outStockLockInfos = result.Item3;
- // locationInfos = result.Item4;
- // mesPPOutboundOrderDetail.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt();
+ stockInfos = result.Item1;
+ mesPPOutboundOrder1 = result.Item2;
+ outStockLockInfos = result.Item3;
+ locationInfos = result.Item4;
+ foreach (var item in mesPPOutboundOrderDetail)
+ {
+ item.OrderDetailStatus = OrderDetailStatusEnum.Over.ObjToInt();
+ }
- // }
- // else
- // {
- // throw new Exception("鏃犲簱瀛�");
- // }
- // }
- // tasks.ForEach(x =>
- // {
- // x.TargetAddress = model.TargetAddressCode;
- // });
- // _unitOfWorkManage.BeginTran();
-
- // int id = BaseDal.AddData(tasks);
- // outStockLockInfos.ForEach(x =>
- // {
- // x.OrderNo = mesOutboundOrder.TaskNo;
- // x.OrderDetailId = id;
- // });
- // //_outboundService.MesPPOutboundOrderService.Repository.AddData(mesOutboundOrder);
- // Db.InsertNav(mesOutboundOrder).Include(x => x.Details).ExecuteCommand();
- // if (stockInfos != null && stockInfos.Count > 0 && outStockLockInfos != null && outStockLockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0)
- // {
- // WebResponseContent content = _outboundService.MesOutboundOrderService.LockOutboundStockDataUpdate(stockInfos, outStockLockInfos, locationInfos, tasks: tasks);
-
- // if (!content.Status)
- // {
- // _unitOfWorkManage.RollbackTran();
- // return MesResponseContent.Instance.Error(content.Message);
- // }
- // }
- // _unitOfWorkManage.CommitTran();
- // PushTasksToWCS(tasks);
-
- //}
- #endregion
+ }
+ else
+ {
+ throw new Exception("鏃犲簱瀛�");
+ }
+ }
+ tasks.ForEach(x =>
+ {
+ if (x.Roadway.Contains("AGV_PP"))
+ {
+ x.TargetAddress = model.TargetAddressCode;
+ }
+
+ });
_unitOfWorkManage.BeginTran();
- Db.InsertNav(mesOutboundOrder).Include(x => x.Details).ExecuteCommand();
+
+ int id = BaseDal.AddData(tasks);
+ outStockLockInfos.ForEach(x =>
+ {
+ x.OrderNo = mesPPOutboundOrder1.TaskNo;
+ x.OrderDetailId = id;
+ });
+ Db.InsertNav(mesPPOutboundOrder1).Include(x => x.Details).ExecuteCommand();
+ if (stockInfos.Count > 0 && stockInfos != null)
+ {
+ var lkstockInfo = stockInfos.Where(x => x.LocationCode.Contains("SC01_PP")).ToList();
+ if(lkstockInfo != null)
+ {
+ foreach (var item in lkstockInfo)
+ {
+ Dt_MaterielInfo materielInfo = BaseDal.Db.Queryable<Dt_MaterielInfo>().Where(x => x.MaterielCode == item.Details.FirstOrDefault().MaterielCode).First();
+ if(materielInfo == null)
+ {
+ return MesResponseContent.Instance.Error($"鏈壘鍒扮墿鏂欑紪鍙穥item.Details.FirstOrDefault().MaterielCode}鐨勭墿鏂欎俊鎭�");
+ }
+ Dt_MaterielCodeInfo materielCodeInfo = new Dt_MaterielCodeInfo()
+ {
+ MaterielCode = item.Details.FirstOrDefault().MaterielCode,
+ MaterielName = materielInfo.MaterielName,
+ MaterielSpec = materielInfo.MaterielSpec,
+ LotNo = item.Details.FirstOrDefault().BatchNo,
+ ProductionDate = item.Details.FirstOrDefault().ProductionDate.ObjToDate(),
+ EffectiveDate = item.Details.FirstOrDefault().EffectiveDate.ObjToDate(),
+ PurchaseOrderNo = DateTime.Now.ToString("yyMMdd") + item.Details.FirstOrDefault().BatchNo,
+ Quantity = item.Details.FirstOrDefault().StockQuantity,
+ MaterielLength = (decimal)materielInfo.MaterielLength,
+ WarehouseId = warehouse.WarehouseId
+ };
+ materielCodes.Add(materielCodeInfo);
+ }
+ Db.Insertable(materielCodes).ExecuteCommand();
+ }
+ }
+ if (stockInfos != null && stockInfos.Count > 0 && outStockLockInfos != null && outStockLockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0)
+ {
+ WebResponseContent content = _outboundService.MesOutboundOrderService.LockOutboundStockDataUpdate(stockInfos, outStockLockInfos, locationInfos, tasks: tasks);
+
+ if (!content.Status)
+ {
+ _unitOfWorkManage.RollbackTran();
+ return MesResponseContent.Instance.Error(content.Message);
+ }
+ }
_unitOfWorkManage.CommitTran();
+ var pktask = tasks.Where(x => x.Roadway.Contains("AGV_PP")).ToList();
+ if(pktask != null&& pktask.Count>0)
+ {
+ PushTasksToWCS(pktask, "AGV_PP");
+ }
+ var lktask = tasks.Where(x => x.Roadway.Contains("SC01_PP")).ToList();
+ if (lktask != null&& lktask.Count>0)
+ {
+ PushTasksToWCS(lktask);
+ }
+
+ #endregion
+ //_unitOfWorkManage.BeginTran();
+ //Db.InsertNav(mesOutboundOrder).Include(x => x.Details).ExecuteCommand();
+ //_unitOfWorkManage.CommitTran();
return MesResponseContent.Instance.OK();
}
catch (Exception ex)
@@ -839,7 +909,7 @@
try
{
- Dt_Warehouse warehouse = _basicService.WarehouseService.Repository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA58.ToString());
+ Dt_Warehouse warehouse = _basicService.WarehouseService.Repository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA581.ToString());
if (warehouse == null)
{
return MesResponseContent.Instance.Error("浠撳簱鍩虹淇℃伅鏈厤缃�");
@@ -859,67 +929,65 @@
CreateType = OrderCreateTypeEnum.UpperSystemPush.ObjToInt(),
TaskNo = model.TaskNo,
OrderType = OutOrderTypeEnum.Issue.ObjToInt(),
- OrderStatus = OutOrderStatusEnum.鏈紑濮�.ObjToInt(),
+ OrderStatus = OutOrderStatusEnum.鍑哄簱涓�.ObjToInt(),
WarehouseId = warehouse.WarehouseId,
Details = mesPPCutOutboundOrderDetail,
};
_unitOfWorkManage.BeginTran();
Db.InsertNav(mesPPOutboundOrder).Include(x => x.Details).ExecuteCommand();
- _unitOfWorkManage.CommitTran();
+
#region
- //List<Dt_Task> tasks = new List<Dt_Task>();
+ List<Dt_Task> tasks = new List<Dt_Task>();
- //List<Dt_StockInfo>? stockInfos = null;
- //List<Dt_OutStockLockInfo>? outStockLockInfos = null;
- //List<Dt_LocationInfo>? locationInfos = null;
- //{
- //(List<Dt_StockInfo>, Dt_MesPPCutOutboundOrderDetail, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.MesPPOutboundOrderService.AssignStockOutbound(mesPPOutboundOrder, mesPPCutOutboundOrderDetail);
- // if (result.Item1 != null && result.Item1.Count > 0)
- // {
- // tasks = GetTasks(result.Item1, TaskTypeEnum.MesOutbound);
- // result.Item2.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt();
- // result.Item3.ForEach(x =>
- // {
- // x.Status = OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt();
- // });
+ List<Dt_StockInfo>? stockInfos = null;
+ List<Dt_OutStockLockInfo>? outStockLockInfos = null;
+ List<Dt_LocationInfo>? locationInfos = null;
+ {
+ (List<Dt_StockInfo>, List<Dt_MesPPCutOutboundOrderDetail>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.MesPPOutboundOrderService.AssignPPCutStockOutbound(mesPPOutboundOrder, mesPPCutOutboundOrderDetail);
+ if (result.Item1 != null && result.Item1.Count > 0)
+ {
+ tasks = GetTasks(result.Item1, TaskTypeEnum.MesPPCutOutbound);
+ result.Item2.ForEach(x =>
+ {
+ x.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt();
+ });
+ result.Item3.ForEach(x =>
+ {
+ x.Status = OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt();
+ });
- // stockInfos = result.Item1;
- // mesPPCutOutboundOrderDetail = result.Item2;
- // outStockLockInfos = result.Item3;
- // locationInfos = result.Item4;
+ stockInfos = result.Item1;
+ mesPPCutOutboundOrderDetail = result.Item2;
+ outStockLockInfos = result.Item3;
+ locationInfos = result.Item4;
- // }
- // else
- // {
- // throw new Exception("鏃犲簱瀛�");
- // }
- //}
- //tasks.ForEach(x =>
- //{
- // x.TargetAddress = mesPPCutOutboundOrderDetail.TargetAddressCode;
- //});
- //_unitOfWorkManage.BeginTran();
+ }
+ else
+ {
+ throw new Exception("鏃犲簱瀛�");
+ }
+ }
+
- //int id = BaseDal.AddData(tasks);
- //outStockLockInfos.ForEach(x =>
- //{
- // x.OrderNo = mesPPOutboundOrder.TaskNo;
- // x.OrderDetailId = id;
- //});
- ////_outboundService.MesPPOutboundOrderService.Repository.AddData(mesOutboundOrder);
+ int id = BaseDal.AddData(tasks);
+ outStockLockInfos.ForEach(x =>
+ {
+ x.OrderNo = mesPPOutboundOrder.TaskNo;
+ });
+
+ if (stockInfos != null && stockInfos.Count > 0 && outStockLockInfos != null && outStockLockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0)
+ {
+ WebResponseContent content = _outboundService.MesOutboundOrderService.LockOutboundStockDataUpdate(stockInfos, outStockLockInfos, locationInfos, tasks: tasks);
+
+ if (!content.Status)
+ {
+ _unitOfWorkManage.RollbackTran();
+ return MesResponseContent.Instance.Error(content.Message);
+ }
+ }
//Db.InsertNav(mesPPOutboundOrder).Include(x => x.Details).ExecuteCommand();
- //if (stockInfos != null && stockInfos.Count > 0 && outStockLockInfos != null && outStockLockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0)
- //{
- // WebResponseContent content = _outboundService.MesOutboundOrderService.LockOutboundStockDataUpdate(stockInfos, outStockLockInfos, locationInfos, tasks: tasks);
-
- // if (!content.Status)
- // {
- // _unitOfWorkManage.RollbackTran();
- // return MesResponseContent.Instance.Error(content.Message);
- // }
- //}
- //_unitOfWorkManage.CommitTran();
- //PushTasksToWCS(tasks, "AGV_PP");
+ _unitOfWorkManage.CommitTran();
+ PushTasksToWCS(tasks, "AGV_PP");
#endregion
return MesResponseContent.Instance.OK();
}
@@ -1105,36 +1173,88 @@
MesResponseContent content = new MesResponseContent();
try
{
- //闇�鍒ゆ柇鏌ヨ绔嬪簱,骞冲簱
- Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA58.ToString());
- List<Dt_StockInfo> stockInfos = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x =>
- x.WarehouseId == warehouse.WarehouseId &&
- x.StockStatus == (int)StockStatusEmun.鍏ュ簱瀹屾垚).Includes(x => x.Details).ToList();
- Dt_StockInfo? stockInfo = stockInfos.FirstOrDefault(x => x.Details.Any(x => x.MaterielCode == model.MaterialCode && x.CutedWidth == model.CutedWidth));
- if (stockInfo == null)
+ Dt_Warehouse lkwarehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA58.ToString());
+ Dt_Warehouse pkwarehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA581.ToString());
+
+ if (lkwarehouse == null || pkwarehouse == null)
{
- return content.Error($"PP浠撶珛搴�/骞冲簱锛氱墿鏂欑紪鍙�:{model.MaterialCode},瑁佸垏瀹�:{model.CutedWidth},鏈壘鍒版鐗╂枡搴撳瓨淇℃伅");
+ return content.Error("绔嬪簱鎴栧钩搴撲粨搴撲俊鎭笉瀛樺湪");
}
- var stock = stockInfo.Details.FirstOrDefault();
- if (stock != null)
+
+ List<Dt_StockInfo> lkstockInfos = _stockRepository.StockInfoRepository.Db
+ .Queryable<Dt_StockInfo>()
+ .Where(x => x.WarehouseId == lkwarehouse.WarehouseId
+ && x.StockStatus == (int)StockStatusEmun.鍏ュ簱瀹屾垚)
+ .Includes(x => x.Details)
+ .ToList();
+
+ List<Dt_StockInfo> lkTargetStockInfos = lkstockInfos
+ .Where(x => x.Details != null && x.Details.Any(d => d.MaterielCode == model.MaterialCode))
+ .ToList();
+
+ List<Dt_StockInfo> pkstockInfos = _stockRepository.StockInfoRepository.Db
+ .Queryable<Dt_StockInfo>()
+ .Where(x => x.WarehouseId == pkwarehouse.WarehouseId
+ && x.StockStatus == (int)StockStatusEmun.鍏ュ簱瀹屾垚)
+ .Includes(x => x.Details)
+ .ToList();
+
+ List<Dt_StockInfo> pkTargetStockInfos = pkstockInfos
+ .Where(x => x.Details != null && x.Details.Any(d => d.MaterielCode == model.MaterialCode))
+ .ToList();
+
+
+ decimal lkTotalQuantity = (decimal)lkTargetStockInfos
+ .SelectMany(x => x.Details ?? new List<Dt_StockInfoDetail>())
+ .Where(d => d.MaterielCode == model.MaterialCode)
+ .Sum(d => d.StockQuantity);
+
+ // 骞冲簱鎬绘暟
+ decimal pkTotalQuantity = (decimal)pkTargetStockInfos
+ .SelectMany(x => x.Details ?? new List<Dt_StockInfoDetail>())
+ .Where(d => d.MaterielCode == model.MaterialCode)
+ .Sum(d => d.StockQuantity);
+
+ if (lkTotalQuantity <= 0 && pkTotalQuantity <= 0)
{
- content.Content = new
- {
- MaterialCode = stock.MaterielCode,
- Quantity = stock.StockQuantity,
- Unit = stock.Unit,
- Warehouse = warehouse.WarehouseCode,
- WarehouseName = warehouse.WarehouseName,
- CutedWidth = stock.CutedWidth,
- CarrierCode = stockInfo.PalletCode,
- MaterialLot = stock.BatchNo,
- };
+ return content.Error($"PP浠撶珛搴�/骞冲簱锛氱墿鏂欑紪鍙�:{model.MaterialCode},鏈壘鍒版鐗╂枡搴撳瓨淇℃伅");
}
+
+ content.Content = new List<object>
+ {
+ new
+ {
+ MaterialCode = model.MaterialCode,
+ Quantity = lkTotalQuantity,
+ Unit = lkTargetStockInfos.SelectMany(x => x.Details ?? new List<Dt_StockInfoDetail>())
+ .Where(d => d.MaterielCode == model.MaterialCode)
+ .FirstOrDefault()?.Unit ?? "绠�",
+ Warehouse = lkwarehouse.WarehouseCode,
+ WarehouseName = lkwarehouse.WarehouseName,
+ CutedWidth = 0,
+ CarrierCode = "",
+ MaterialLot = "",
+ },
+ new
+ {
+ MaterialCode = model.MaterialCode,
+ Quantity = pkTotalQuantity,
+ Unit = pkTargetStockInfos.SelectMany(x => x.Details ?? new List<Dt_StockInfoDetail>())
+ .Where(d => d.MaterielCode == model.MaterialCode)
+ .FirstOrDefault()?.Unit ?? "绠�",
+ Warehouse = pkwarehouse.WarehouseCode,
+ WarehouseName = pkwarehouse.WarehouseName,
+ CutedWidth = 0,
+ CarrierCode = "",
+ MaterialLot = "",
+ }
+ };
+
return content.OK();
}
catch (Exception ex)
{
- return MesResponseContent.Instance.Error(ex.Message);
+ return MesResponseContent.Instance.Error($"鏌ヨ搴撳瓨澶辫触锛歿ex.Message}");
}
}
@@ -1672,5 +1792,117 @@
}
return content;
}
+
+ public WebResponseContent PPTaskMove(string palletCode, string startPoint, int warehouseId, List<string> serNums)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == warehouseId);
+ if (warehouse == null)
+ {
+ return WebResponseContent.Instance.Error($"鏈壘鍒拌浠撳簱淇℃伅");
+ }
+
+ Dt_Task task = Repository.QueryFirst(x => x.PalletCode == palletCode && x.WarehouseId == warehouseId);
+ if (task != null)
+ {
+ return WebResponseContent.Instance.Error($"璇ユ墭鐩樺凡鐢熸垚浠诲姟");
+ }
+
+ List<MatSerNumAnalysisModel> models = CodeAnalysisHelper.CodeAnalysis<MatSerNumAnalysisModel>(AnalysisCodeEnum.PPPKSerNumAnalysis, serNums);
+ //楠岃瘉鍒ゆ柇鏃堕棿鏍煎紡
+ WebResponseContent IsValidContent = IsValidMCDates(models);
+ if (!IsValidContent.Status)
+ {
+ return content.Error(IsValidContent.Message);
+ }
+
+ Dt_Task newTask = new Dt_Task()
+ {
+ CurrentAddress = startPoint,
+ Grade = 0,
+ NextAddress = "PPCuttingWarehouse",
+ PalletCode = palletCode,
+ Roadway = "AGV_PP",
+ SourceAddress = startPoint,
+ TargetAddress = "PPCuttingWarehouse",
+ TaskType = TaskTypeEnum.MesPPMove.ObjToInt(),
+ TaskStatus = TaskStatusEnum.New.ObjToInt(),
+ WarehouseId = warehouseId,
+ PalletType = 0,
+ MaterielCode = models.FirstOrDefault()?.MaterielCode,
+ Quantity = (float)models.FirstOrDefault()?.Quantity,
+ BatchNo = models.FirstOrDefault()?.LotNo
+ };
+ if (palletCode.Contains("DJ"))
+ {
+ newTask.PalletType = 2;
+ }
+ else if (palletCode.Contains("XJ"))
+ {
+ newTask.PalletType = 1;
+ }
+ else
+ {
+ return WebResponseContent.Instance.Error("璇ユ墭鐩樼爜閿欒锛屾垨涓嶅睘浜嶱P骞冲簱");
+ }
+ _unitOfWorkManage.BeginTran();
+ int taskId = BaseDal.AddData(newTask);
+ newTask.TaskId = taskId;
+ _unitOfWorkManage.CommitTran();
+ PushTasksToWCS(new List<Dt_Task> { newTask }, "AGV_PP");
+ content.OK();
+ }
+ catch (Exception ex)
+ {
+ _unitOfWorkManage.RollbackTran();
+ content.Error(ex.Message);
+ }
+ return content;
+ }
+
+ public WebResponseContent IsValidMCDates(List<MatSerNumAnalysisModel> analysisModels)
+ {
+ string[] effDates = analysisModels.Select(x => x.EffectiveDate).Distinct().ToArray();
+ string[] ProDates = analysisModels.Select(x => x.ProductionDate).Distinct().ToArray();
+ foreach (string effDate in effDates)
+ {
+ string format = "yyyy-MM-dd"; // 鐩爣鏍煎紡
+ DateTime parsedDate;
+ // 瑙f瀽骞堕獙璇佹牸寮�
+ bool isValid = DateTime.TryParseExact(
+ effDate,
+ format,
+ CultureInfo.InvariantCulture,
+ DateTimeStyles.None,
+ out parsedDate
+ );
+
+ if (!isValid)
+ {
+ return WebResponseContent.Instance.Error("鏍煎紡鏃犳晥鎴栨棩鏈熶笉鍚堟硶");
+ }
+ }
+ foreach (string ProDate in ProDates)
+ {
+ string format = "yyyy-MM-dd"; // 鐩爣鏍煎紡
+ DateTime parsedDate;
+ // 瑙f瀽骞堕獙璇佹牸寮�
+ bool isValid = DateTime.TryParseExact(
+ ProDate,
+ format,
+ CultureInfo.InvariantCulture,
+ DateTimeStyles.None,
+ out parsedDate
+ );
+
+ if (!isValid)
+ {
+ return WebResponseContent.Instance.Error("鏍煎紡鏃犳晥鎴栨棩鏈熶笉鍚堟硶");
+ }
+ }
+ return WebResponseContent.Instance.OK();
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
index 154201c..efff555 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
@@ -603,6 +603,14 @@
}
Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.GetStockInfo(task.PalletCode);
+ if(task.TaskType == TaskTypeEnum.MesPPMove.ObjToInt())
+ {
+
+ task.TaskStatus = TaskStatusEnum.Finish.ObjToInt();
+ BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateTypeEnum.鑷姩瀹屾垚 : OperateTypeEnum.浜哄伐瀹屾垚);
+ FeedBackWCSTaskCompleted(taskNum);
+ return WebResponseContent.Instance.OK();
+ }
Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.SourceAddress);
if (stockInfo == null)
{
@@ -620,8 +628,11 @@
List<Dt_OutboundOrderDetail> outboundOrderDetails = new List<Dt_OutboundOrderDetail>();
List<Dt_MesOutboundOrder> mesOutboundOrders = new List<Dt_MesOutboundOrder>();
List<Dt_MesPPOutboundOrder> mesPPOutboundOrders = new List<Dt_MesPPOutboundOrder>();
+ List<Dt_MesPPCutOutboundOrder> mesPPCutOutboundOrders = new List<Dt_MesPPCutOutboundOrder>();
+ List<Dt_MesPPCutOutboundOrderDetail> mesPPCutOutboundOrderDetails = new List<Dt_MesPPCutOutboundOrderDetail>();
Dt_CheckOrder? checkOrder = null;
Dt_OutboundOrder? outboundOrder = null;
+ Dt_MesPPCutOutboundOrder mesPPCutOutboundOrder = null;
if ((outStockLockInfos == null || outStockLockInfos.Count == 0) && warehouse.WarehouseCode != WarehouseEnum.HA64.ToString() && warehouse.WarehouseCode != WarehouseEnum.HA154.ToString() && (task.TaskType != TaskTypeEnum.OutEmpty.ObjToInt()))
{
return WebResponseContent.Instance.Error($"鏈壘鍒板嚭搴撹鎯呬俊鎭�");
@@ -643,10 +654,10 @@
mesOutboundOrders.Add(mesOutboundOrder);
}
}
- //PP鍑哄簱浠诲姟瀹屾垚鍒ゆ柇銆傘�傘�傘�傘�傘�傘�傘�傘�傘�傘�傘�傘�傘�傘�傘�傘��
- else if (task.TaskType == TaskTypeEnum.Outbound.ObjToInt() && warehouse.WarehouseCode == WarehouseEnum.HA58.ToString())
+ //PP澶у嵎鍑哄簱浠诲姟瀹屾垚鍒ゆ柇
+ else if (task.TaskType == TaskTypeEnum.MesPPOutbound.ObjToInt() && (warehouse.WarehouseCode == WarehouseEnum.HA581.ToString()|| warehouse.WarehouseCode == WarehouseEnum.HA58.ToString()))
{
- Dt_MesPPOutboundOrder mesPPOutboundOrder = _outboundService.MesPPOutboundOrderService.Repository.QueryFirst(x => x.OrderNo == item.OrderNo);
+ Dt_MesPPOutboundOrder mesPPOutboundOrder = _outboundService.MesPPOutboundOrderService.Repository.QueryFirst(x => x.TaskNo == item.OrderNo);
if (mesPPOutboundOrder != null)
{
mesPPOutboundOrder.OverOutQuantity = item.AssignQuantity;
@@ -655,6 +666,25 @@
mesPPOutboundOrder.OrderStatus = OrderDetailStatusEnum.Over.ObjToInt();
}
mesPPOutboundOrders.Add(mesPPOutboundOrder);
+ }
+ }
+ else if (task.TaskType == TaskTypeEnum.MesPPCutOutbound.ObjToInt() && warehouse.WarehouseCode == WarehouseEnum.HA581.ToString())
+ {
+ Dt_MesPPCutOutboundOrderDetail mesPPCutOutboundOrderDetail = _outboundService.MesPPCutOutboundOrderDetailService.Repository.QueryFirst(x => x.Id == item.OrderDetailId);
+
+ if (mesPPCutOutboundOrderDetail != null)
+ {
+ mesPPCutOutboundOrder = _outboundService.MesPPCutOutboundOrderService.Repository.QueryFirst(x => x.Id == mesPPCutOutboundOrderDetail.OrderId);
+ if (mesPPCutOutboundOrder == null)
+ {
+ return WebResponseContent.Instance.Error($"鏈壘鍒癕ES灏忓嵎鍑哄簱鍗曚俊鎭�");
+ }
+ mesPPCutOutboundOrderDetail.OverOutQuantity = item.AssignQuantity;
+ if (mesPPCutOutboundOrderDetail.OverOutQuantity == mesPPCutOutboundOrderDetail.OrderQuantity)
+ {
+ mesPPCutOutboundOrderDetail.OrderDetailStatus = OrderDetailStatusEnum.Over.ObjToInt();
+ }
+ mesPPCutOutboundOrderDetails.Add(mesPPCutOutboundOrderDetail);
}
}
else
@@ -768,17 +798,36 @@
BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateTypeEnum.鑷姩瀹屾垚 : OperateTypeEnum.浜哄伐瀹屾垚);
_recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, (LocationStatusEnum)beforeStatus, LocationStatusEnum.Free, LocationChangeType.OutboundCompleted, stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", task.TaskNum);
- _unitOfWorkManage.CommitTran();
- //PP鍑哄簱浠诲姟瀹屾垚鍒ゆ柇銆傘�傘�傘�傘�傘�傘�傘�傘�傘�傘�傘�傘�傘�傘�傘�傘��
- //if (warehouse.WarehouseCode == WarehouseEnum.HA58.ToString() && task.TaskType == TaskTypeEnum.Outbound.ObjToInt())
- //{
- // _outboundService.MesPPOutboundOrderService.Repository.UpdateData(mesPPOutboundOrders);
- // MesMaterialLotaAceptModel model = GetMesMaterialLotaAceptModel(stockInfo, stockInfo.Details.FirstOrDefault(), mesPPOutboundOrders.FirstOrDefault().TaskNo, warehouse.WarehouseCode, stockInfo.Details.Where(x => x.MaterielCode == mesPPOutboundOrders.FirstOrDefault().MaterialCode).Sum(x => x.StockQuantity));
- // UploadMesMaterialLotaAcept(model);
- // _stockService.StockInfoService.Repository.DeleteAndMoveIntoHty(stockInfo, App.User.UserId == 0 ? OperateTypeEnum.鑷姩瀹屾垚 : OperateTypeEnum.浜哄伐瀹屾垚);
- // _stockService.StockInfoDetailService.Repository.DeleteAndMoveIntoHty(stockInfo.Details, App.User.UserId == 0 ? OperateTypeEnum.鑷姩瀹屾垚 : OperateTypeEnum.浜哄伐瀹屾垚);
- //}
+
+ //PP澶у嵎鍑哄簱浠诲姟瀹屾垚鍒ゆ柇
+ if (task.TaskType == TaskTypeEnum.MesPPOutbound.ObjToInt() && (warehouse.WarehouseCode == WarehouseEnum.HA581.ToString() || warehouse.WarehouseCode == WarehouseEnum.HA58.ToString()))
+ {
+ _outboundService.MesPPOutboundOrderService.Repository.UpdateData(mesPPOutboundOrders);
+ MesMaterialLotaAceptModel model = PPGetMesMaterialLotaAceptModel(stockInfo, stockInfo.Details.FirstOrDefault(), mesPPOutboundOrders.FirstOrDefault().TaskNo, warehouse.WarehouseCode, stockInfo.Details.Where(x => x.MaterielCode == mesPPOutboundOrders.FirstOrDefault().MaterialCode).Sum(x => x.StockQuantity));
+ UploadMesMaterialLotaAcept(model);
+ _stockService.StockInfoService.Repository.DeleteAndMoveIntoHty(stockInfo, App.User.UserId == 0 ? OperateTypeEnum.鑷姩瀹屾垚 : OperateTypeEnum.浜哄伐瀹屾垚);
+ _stockService.StockInfoDetailService.Repository.DeleteAndMoveIntoHty(stockInfo.Details, App.User.UserId == 0 ? OperateTypeEnum.鑷姩瀹屾垚 : OperateTypeEnum.浜哄伐瀹屾垚);
+ }
+ //PP灏忓嵎鍑哄簱浠诲姟瀹屾垚鍒ゆ柇
+ if (task.TaskType == TaskTypeEnum.MesPPCutOutbound.ObjToInt() && warehouse.WarehouseCode == WarehouseEnum.HA581.ToString())
+ {
+ _outboundService.MesPPCutOutboundOrderDetailService.Repository.UpdateData(mesPPCutOutboundOrderDetails);
+
+ int completedDetailCount = mesPPCutOutboundOrderDetails.Count(x => x.OrderDetailStatus == OrderDetailStatusEnum.Over.ObjToInt());
+ // 鍒ゆ柇鎵�鏈夋槑缁嗘槸鍚﹀畬鎴�
+ if (completedDetailCount == mesPPCutOutboundOrderDetails.Count)
+ {
+ mesPPCutOutboundOrder.OrderStatus = OutOrderStatusEnum.鍑哄簱瀹屾垚.ObjToInt();
+ _outboundService.MesPPCutOutboundOrderService.UpdateData(mesPPCutOutboundOrder);
+ }
+ MesMaterialLotaAceptModel model = PPGetMesMaterialLotaAceptModel(stockInfo, stockInfo.Details.FirstOrDefault(), mesPPCutOutboundOrder.TaskNo, warehouse.WarehouseCode, stockInfo.Details.Where(x => x.MaterielCode == mesPPCutOutboundOrderDetails.FirstOrDefault().MaterialCode).Sum(x => x.StockQuantity));
+ UploadMesMaterialLotaAcept(model);
+ _stockService.StockInfoService.Repository.DeleteAndMoveIntoHty(stockInfo, App.User.UserId == 0 ? OperateTypeEnum.鑷姩瀹屾垚 : OperateTypeEnum.浜哄伐瀹屾垚);
+ _stockService.StockInfoDetailService.Repository.DeleteAndMoveIntoHty(stockInfo.Details, App.User.UserId == 0 ? OperateTypeEnum.鑷姩瀹屾垚 : OperateTypeEnum.浜哄伐瀹屾垚);
+ }
+
+
if (warehouse.WarehouseCode != WarehouseEnum.HA64.ToString() && task.TaskType == TaskTypeEnum.Outbound.ObjToInt())
{
_outboundService.OutboundOrderService.TestOutUpload(outboundOrderDetails.FirstOrDefault().OrderId, outStockLockInfos);
@@ -788,7 +837,7 @@
MesMaterialLotaAceptModel model = GetMesMaterialLotaAceptModel(stockInfo, stockInfo.Details.FirstOrDefault(), mesOutboundOrders.FirstOrDefault().TaskNo, warehouse.WarehouseCode, stockInfo.Details.Where(x => x.MaterielCode == mesOutboundOrders.FirstOrDefault().MaterialCode).Sum(x => x.StockQuantity));
UploadMesMaterialLotaAcept(model);
}
-
+ _unitOfWorkManage.CommitTran();
return WebResponseContent.Instance.OK();
}
catch (Exception ex)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
index 581e147..a40c4b3 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
@@ -867,6 +867,12 @@
{
return content.Error($"搴撳瓨淇℃伅宸插瓨鍦�");
}
+
+ Dt_Task task = BaseDal.QueryFirst(x => x.PalletCode == palletCode);
+ if(task != null)
+ {
+ return content.Error($"鎵樼洏{palletCode}宸茬粡瀛樺湪浠诲姟锛岃鍕块噸澶嶄笅杈�");
+ }
Dt_PalletTypeInfo palletTypeInfo = _palletTypeInfoRepository.QueryFirst(x=>x.CodeStartStr== palletType);
if (palletTypeInfo == null)
{
@@ -1143,5 +1149,97 @@
}
}
+
+ /// <summary>
+ /// PP骞冲簱鐢宠鍏ュ簱浠诲姟
+ /// </summary>
+ /// <param name="saveModel"></param>
+ /// <returns></returns>
+ public WebResponseContent PPPKRequestInboundTask(SaveModel saveModel)
+ {
+ try
+ {
+ var palletCode = saveModel.MainData["barcode"].ToString();
+ var warehouseId = saveModel.MainData["warehouseId"].ObjToInt();
+ var stationCode = saveModel.MainData["startPoint"].ToString();
+ Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == warehouseId);
+ if (warehouse == null)
+ {
+ return WebResponseContent.Instance.Error($"鏈壘鍒板簱鍖�");
+ }
+
+ Dt_Task task = Repository.QueryFirst(x => x.PalletCode == palletCode && x.WarehouseId == warehouseId);
+ if (task != null)
+ {
+ return WebResponseContent.Instance.Error($"璇ユ墭鐩樺凡鐢熸垚浠诲姟");
+ }
+
+ Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode).Includes(x => x.Details).First();
+ if (stockInfo == null)
+ {
+ return WebResponseContent.Instance.Error($"鏈壘鍒扮粍鐩樹俊鎭�");
+ }
+ if (stockInfo.StockStatus != StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鎷i�夊畬鎴�.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.閫佹搴撳瓨瀹屾垚.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鐩樼偣搴撳瓨瀹屾垚.ObjToInt())
+ {
+ return WebResponseContent.Instance.Error($"璇ユ墭鐩樼姸鎬佷笉姝g‘,涓嶅彲鐢宠鍏ュ簱");
+ }
+ if (!string.IsNullOrEmpty(stockInfo.LocationCode))
+ {
+ return WebResponseContent.Instance.Error($"璇ユ墭鐩樺凡缁戝畾璐т綅");
+ }
+ if (warehouseId != stockInfo.WarehouseId)
+ {
+ return WebResponseContent.Instance.Error($"浠撳簱涓嶆纭�");
+ }
+
+ Dt_LocationInfo? locationInfoPPPK = _basicService.LocationInfoService.AssignLocation("AGV_PP", stockInfo.PalletType, stockInfo.WarehouseId);
+ if (locationInfoPPPK == null)
+ {
+ return WebResponseContent.Instance.Error($"璐т綅鍒嗛厤澶辫触,鏈壘鍒板彲鍒嗛厤璐т綅");
+ }
+ Dt_Task newTask = new Dt_Task()
+ {
+ CurrentAddress = stationCode,
+ Grade = 0,
+ NextAddress = "",
+ PalletCode = palletCode,
+ Roadway = "AGV_PP",
+ SourceAddress = stationCode,
+ TargetAddress = locationInfoPPPK.LocationCode,
+ TaskType = TaskTypeEnum.PPPKInbound.ObjToInt(),
+ TaskStatus = TaskStatusEnum.New.ObjToInt(),
+ WarehouseId = stockInfo.WarehouseId,
+ PalletType = stockInfo.PalletType,
+ MaterielCode = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode,
+ Quantity = (float)stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity),
+ BatchNo = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.BatchNo
+ };
+ if (stockInfo.StockStatus == StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt())
+ {
+ stockInfo.StockStatus = StockStatusEmun.鎵嬪姩缁勭洏鍏ュ簱纭.ObjToInt();
+ }
+ else
+ {
+ stockInfo.StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt();
+ }
+
+ _unitOfWorkManage.BeginTran();
+ LocationStatusEnum lastStatusPPorGM = (LocationStatusEnum)locationInfoPPPK.LocationStatus;
+ _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfoPPPK, lastStatusPPorGM, LocationStatusEnum.Lock, LocationChangeType.InboundAssignLocation);
+ _basicService.LocationInfoService.UpdateLocationStatus(locationInfoPPPK, newTask.PalletType, LocationStatusEnum.Lock, newTask.WarehouseId);
+ int taskId = BaseDal.AddData(newTask);
+ newTask.TaskId = taskId;
+ _stockRepository.StockInfoRepository.UpdateData(stockInfo);
+ _unitOfWorkManage.CommitTran();
+ PushTasksToWCS(new List<Dt_Task> { newTask },"AGV_PP");
+ return WebResponseContent.Instance.OK(data: newTask);
+
+ }
+ catch (Exception ex)
+ {
+ _unitOfWorkManage.RollbackTran();
+ return WebResponseContent.Instance.Error(ex.Message);
+ }
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
index cd41e35..1c4c828 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
@@ -789,7 +789,7 @@
NextAddress = "",
Roadway = locationInfo.RoadwayNo,
SourceAddress = stockInfo.LocationCode,
- TargetAddress = "",
+ TargetAddress = stockInfo.Remark??"",
TaskStatus = TaskStatusEnum.New.ObjToInt(),
TaskType = taskType.ObjToInt(),
TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/MaterielInfoController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/MaterielInfoController.cs"
index 5df2a98..4078831 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/MaterielInfoController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/MaterielInfoController.cs"
@@ -51,5 +51,24 @@
{
return Service.GetWarehouseMaterielInfos(warehouseId);
}
+
+ /// <summary>
+ /// PP骞冲簱鐗╂枡鐮佽В鏋�
+ /// </summary>
+ /// <param name="serNum"></param>
+ /// <returns></returns>
+ [HttpPost, HttpGet, Route("PPPKCodeAnalysis")]
+ public WebResponseContent PPPKCodeAnalysis(string serNum)
+ {
+ try
+ {
+ MatSerNumAnalysisModel model = CodeAnalysisHelper.PPPKCodeAnalysis<MatSerNumAnalysisModel>(AnalysisCodeEnum.PPPKSerNumAnalysis, serNum);
+ return WebResponseContent.Instance.OK(data: model);
+ }
+ catch (Exception ex)
+ {
+ return WebResponseContent.Instance.Error(ex.Message);
+ }
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs"
index 6bb636a..9c001cd 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs"
@@ -118,5 +118,19 @@
{
return Service.MaterielGroup(palletCode, initiallife, warehouseId, serNums);
}
+
+ /// <summary>
+ /// 鏃犲叆搴撳崟缁勭洏
+ /// </summary>
+ /// <param name="palletCode"></param>
+ /// <param name="initiallife"></param>
+ /// <param name="warehouseId"></param>
+ /// <param name="serNums"></param>
+ /// <returns></returns>
+ [HttpPost, HttpGet, Route("PPPKManualMaterielGroup")]
+ public WebResponseContent PPPKMaterielGroup(string palletCode, int initiallife, int warehouseId, [FromBody] List<string> serNums)
+ {
+ return Service.PPPKMaterielGroup(palletCode, initiallife, warehouseId, serNums);
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs"
index f6e80fc..d4dc914 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs"
@@ -301,5 +301,17 @@
}
return MesResponseContent.Instance.OK("鎴愬姛");
}
+
+ /// <summary>
+ /// 鐢熸垚骞冲簱鎼繍浠诲姟
+ /// </summary>
+ /// <param name="orderDetailId"></param>
+ /// <param name="stockSelectViews"></param>
+ /// <returns></returns>
+ [HttpPost, HttpGet, Route("PPTaskMove"), AllowAnonymous]
+ public WebResponseContent PPTaskMove(string palletCode, string startPoint, int warehouseId, [FromBody] List<string> serNums)
+ {
+ return _taskService.PPTaskMove(palletCode, startPoint,warehouseId,serNums);
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
index 7654ae2..1a0ddba 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
@@ -429,5 +429,16 @@
{
return await Service.TaskHandCancel(taskNum);
}
+
+ /// <summary>
+ /// PP鐢宠鍏ュ簱浠诲姟
+ /// </summary>
+ /// <param name="saveModel"></param>
+ /// <returns></returns>
+ [HttpPost, HttpGet, Route("PPPKRequestInboundTask"), AllowAnonymous]
+ public WebResponseContent PPPKRequestInboundTask([FromBody] SaveModel saveModel)
+ {
+ return Service.PPPKRequestInboundTask(saveModel);
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Filter/CustomProfile.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Filter/CustomProfile.cs"
index fa699e3..3c48e0f 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Filter/CustomProfile.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Filter/CustomProfile.cs"
@@ -42,6 +42,8 @@
CreateMap<ErpProductWarehousingOrderDTO, Dt_ErpProInOrder>().ForMember(x => x.ProSaleOrderNo, b => b.MapFrom(b => b.SaleOrder)).ForMember(x => x.Remark, b => b.MapFrom(b => b.Note)).ForMember(x => x.UpperOrderNo, b => b.MapFrom(b => b.TransferNo)).ForMember(x => x.ProStockAttribute, b => b.MapFrom(b => ProStockAttributeEnum.鎴愬搧.ObjToInt())).ForMember(x => x.ProInStatus, b => b.MapFrom(b => InOrderStatusEnum.鏈紑濮�.ObjToInt()));
CreateMap<ErpProductTransferOrderDTO, Dt_ErpProTransferOrder>().ForMember(x => x.ProSaleOrderNo, b => b.MapFrom(b => b.SaleOrder)).ForMember(x => x.Remark, b => b.MapFrom(b => b.Note)).ForMember(x => x.UpperOrderNo, b => b.MapFrom(b => b.TransferNo)).ForMember(x => x.OrderType, b => b.MapFrom(b => ErpProOutTypeEnum.ProOutAllocat.ObjToInt())).ForMember(x => x.ProStockAttribute, b => b.MapFrom(b => ProStockAttributeEnum.鐮斿彂.ObjToInt()));
CreateMap<ErpProOutLingOrder, Dt_ProCollectOutOrderDetail>().ForMember(x => x.ProOrderDetailStatus, b => b.MapFrom(b => 0)).ForMember(x => x.OverQtyPcs, b => b.MapFrom(b => 0)).ForMember(x => x.LockQtyPcs, b => b.MapFrom(b => 0));
+
+ CreateMap<MaterialDetail, Dt_MesPPCutOutboundOrderDetail>().ForMember(x => x.OrderDetailStatus, b => b.MapFrom(b => 0)).ForMember(x => x.OrderQuantity, b => b.MapFrom(b => b.RequiredQuantity));
}
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/PPPKboxing.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/PPPKboxing.vue"
new file mode 100644
index 0000000..104809b
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/PPPKboxing.vue"
@@ -0,0 +1,517 @@
+<template>
+ <view class="page-container">
+ <!-- 椤堕儴瀵艰埅鏍� -->
+ <view class="nav-header">
+ <uni-segmented-control
+ :current="current"
+ :values="items"
+ @clickItem="onClickItem"
+ class="segmented-control"
+ >
+ </uni-segmented-control>
+ </view>
+
+ <!-- 涓诲唴瀹瑰尯 -->
+ <view class="main-content">
+ <!-- 缁勭洏妯″潡 -->
+ <view v-if="current === 0" class="card-container">
+ <!-- 缁勭洏琛ㄥ崟鍗$墖 -->
+ <view class="form-card">
+ <uni-forms class="form-wrapper" label-width="80px">
+ <uni-forms-item label="鎵樼洏鏉$爜:" class="form-item">
+ <uni-easyinput
+ type="text"
+ placeholder="璇锋壂鎻忔墭鐩樻潯鐮�"
+ :focus="barcodeFocus"
+ v-model="barcode"
+ @confirm="onBarcodeConfirm"
+ class="input-field"
+ :disabled="isSubmitting"
+ />
+ </uni-forms-item>
+
+ <uni-forms-item label="鍐呯鏍囩:" class="form-item">
+ <uni-easyinput
+ type="text"
+ placeholder="璇锋壂鎻忓唴绠辨爣绛�"
+ :focus="materSnFocus"
+ v-model="materSn"
+ @confirm="onMaterSnConfirm"
+ class="input-field"
+ :disabled="isSubmitting"
+ />
+ </uni-forms-item>
+
+ <uni-forms-item :label="Testlabel" v-if="Test" class="form-item">
+ <uni-easyinput
+ type="text"
+ :placeholder="Testplaceholder"
+ v-model="Initiallife"
+ class="input-field"
+ :disabled="isSubmitting"
+ />
+ </uni-forms-item>
+
+ <view class="form-actions">
+ <button
+ @click="submit"
+ type="primary"
+ class="btn-primary"
+ :disabled="isSubmitting"
+ >
+ <uni-icons type="refresh" size="16" v-if="isSubmitting"></uni-icons>
+ {{isSubmitting ? '缁勭洏涓�...' : '缁勭洏'}}
+ </button>
+ </view>
+ </uni-forms>
+ </view>
+
+ <!-- 鐗╂枡淇℃伅鍒楄〃 -->
+ <view class="list-card" v-if="matInfos.length > 0">
+ <view class="list-header">
+ <text class="list-title">鐗╂枡淇℃伅</text>
+ <text class="count-badge">1</text>
+ </view>
+
+ <uni-list class="material-list">
+ <uni-list-item
+ direction="column"
+ v-for="(item,index) in matInfos"
+ :key="index"
+ class="list-item"
+ >
+ <template v-slot:body>
+ <view class="list-item-content">
+ <uni-icons
+ type="trash"
+ size="20"
+ class="delete-icon"
+ @click="deleteList(index)"
+ :disabled="isSubmitting"
+ >
+ </uni-icons>
+
+ <view class="info-grid">
+ <view class="info-row">
+ <text class="label">閲囪喘鍗曞彿锛�</text>
+ <text class="value">{{item.purchaseOrderNo}}</text>
+ </view>
+ <view class="info-row">
+ <text class="label">鐗╂枡缂栫爜锛�</text>
+ <text class="value">{{item.materielCode}}</text>
+ </view>
+ <view class="info-row">
+ <text class="label">鎵规鍙凤細</text>
+ <text class="value">{{item.lotNo}}</text>
+ </view>
+ <view class="info-row">
+ <text class="label">鏁伴噺锛�</text>
+ <text class="value">{{item.quantity}}</text>
+ </view>
+ <view class="info-row">
+ <text class="label">鐢熶骇鏃ユ湡锛�</text>
+ <text class="value">{{item.productionDate}}</text>
+ </view>
+ <view class="info-row">
+ <text class="label">鏈夋晥鏈燂細</text>
+ <text class="value">{{item.effectiveDate}}</text>
+ </view>
+ <view class="info-row">
+ <text class="label">鐗╂枡闀垮害锛�</text>
+ <text class="value">{{item.materielLength}}</text>
+ </view>
+ </view>
+ </view>
+ </template>
+ </uni-list-item>
+ </uni-list>
+ </view>
+
+ <!-- 绌虹姸鎬佹彁绀� -->
+ <view class="empty-state" v-if="matInfos.length === 0 && barcode">
+ <uni-icons type="empty" size="60" color="#ccc"></uni-icons>
+ <text class="empty-text">鏆傛棤鐗╂枡淇℃伅锛岃鎵弿鍐呯鏍囩</text>
+ </view>
+ </view>
+
+ <!-- 鍏ュ簱妯″潡锛堜繚鎸佷笉鍙橈級 -->
+ <view v-if="current === 1" class="card-container">
+ <view class="form-card">
+ <uni-forms class="form-wrapper" label-width="80px">
+ <uni-forms-item label="鎵樼洏鏉$爜:" class="form-item">
+ <uni-easyinput
+ type="text"
+ placeholder="璇锋壂鎻忔墭鐩樻潯鐮�"
+ :focus="!addressFocus"
+ v-model="inboundBarcode"
+ @confirm="inputChangebarcode"
+ class="input-field"
+ :disabled="isInboundSubmitting"
+ />
+ </uni-forms-item>
+
+ <uni-forms-item label="鍦板潃鏉$爜:" class="form-item">
+ <uni-easyinput
+ type="text"
+ placeholder="璇锋壂鎻忓湴鍧�鏉$爜"
+ :focus="addressFocus"
+ v-model="address"
+ class="input-field"
+ :disabled="addressdisabled || isInboundSubmitting"
+ />
+ </uni-forms-item>
+
+ <view class="form-actions">
+ <button
+ @click="inbound"
+ type="primary"
+ class="btn-primary"
+ :disabled="isInboundSubmitting"
+ >
+ <uni-icons type="refresh" size="16" v-if="isInboundSubmitting"></uni-icons>
+ {{isInboundSubmitting ? '鍏ュ簱涓�...' : '鍏ュ簱纭'}}
+ </button>
+ </view>
+ </uni-forms>
+ </view>
+
+ <view class="list-card" v-if="inboundBarcode">
+ <view class="summary-card" v-if="Summmary > 0">
+ <text class="summary-label">缁勭洏鎬绘暟閲忥細</text>
+ <text class="summary-value">{{Summmary}}</text>
+ </view>
+
+ <uni-list class="material-list" v-if="stockInfoDetail.length > 0">
+ <uni-list-item direction="column" v-for="(item,index) in stockInfoDetail" :key="index">
+ <template v-slot:body>
+ <view class="list-item-content">
+ <view class="info-grid">
+ <view class="info-row"><text class="label">鐗╂枡缂栧彿锛�</text><text class="value">{{item.materielCode}}</text></view>
+ <view class="info-row"><text class="label">鐗╂枡鍚嶇О锛�</text><text class="value">{{item.materielName}}</text></view>
+ <view class="info-row"><text class="label">鐗╂枡鎵规锛�</text><text class="value">{{item.batchNo}}</text></view>
+ <view class="info-row"><text class="label">缁勭洏鏁伴噺锛�</text><text class="value">{{item.stockQuantity}}</text></view>
+ <view class="info-row"><text class="label">鐢熶骇鏃ユ湡锛�</text><text class="value">{{item.productionDate}}</text></view>
+ <view class="info-row"><text class="label">鏈夋晥鏈燂細</text><text class="value">{{item.effectiveDate}}</text></view>
+ </view>
+ </view>
+ </template>
+ </uni-list-item>
+ </uni-list>
+ </view>
+ </view>
+ </view>
+
+ <u-toast ref="uToast" />
+ </view>
+</template>
+
+<script>
+ const innerAudioContext = uni.createInnerAudioContext();
+ export default {
+ data() {
+ return {
+ items: ['缁勭洏', '鍏ュ簱'],
+ current: 0,
+ // 缁勭洏妯″潡鏁版嵁
+ matInfos: [],
+ orderNo: "",
+ barcode: "",
+ materSn: "",
+ Initiallife: 1000,
+ sns: [],
+ // 缁勭洏鐒︾偣鎺у埗
+ barcodeFocus: true, // 鎵樼洏鏉$爜鍒濆鑾峰緱鐒︾偣
+ materSnFocus: false, // 鍐呯鏍囩鐒︾偣
+ // 鍏ュ簱妯″潡鏁版嵁
+ addressFocus: false,
+ inboundBarcode: "",
+ address: "",
+ warehouseId: "",
+ Test: false,
+ Testlabel: "",
+ Testplaceholder: "",
+ Testcheck: false,
+ Summmary: 0,
+ stockInfoDetail: [],
+ addressdisabled: false,
+ isSubmitting: false,
+ isInboundSubmitting: false
+ }
+ },
+ onLoad(res) {
+ this.orderNo = res.orderNo;
+ this.warehouseId = res.warehouseId;
+
+ if (this.warehouseId == 6) {
+ this.Test = true;
+ this.Testlabel = "鍒濆瀵垮懡:";
+ this.Testplaceholder = "璇疯緭鍏ュ垵濮嬪鍛�";
+ } else if (this.warehouseId == 2) {
+ this.Test = true;
+ this.Testlabel = "鏁伴噺:";
+ this.Testplaceholder = "璇疯緭鍏ユ暟閲�";
+ this.Initiallife = 16;
+ } else if (this.warehouseId == 3) {
+ this.address = "1011";
+ this.addressdisabled = true;
+ }
+
+ // 纭繚鍒濆鐒︾偣鍦ㄦ墭鐩樻潯鐮�
+ this.barcodeFocus = true;
+ this.materSnFocus = false;
+ },
+ methods: {
+ getData() {},
+ onClickItem(e) {
+ this.current = e.currentIndex;
+ // 鍒囨崲閫夐」鍗℃椂閲嶇疆鐒︾偣
+ if (this.current === 0) {
+ this.barcodeFocus = true;
+ this.materSnFocus = false;
+ } else {
+ this.addressFocus = false;
+ }
+ },
+
+ // ==================== 缁勭洏妯″潡鐒︾偣璺宠浆 ====================
+ /**
+ * 鎵樼洏鏉$爜鎵弿纭
+ * 鎵弿鍚庤嚜鍔ㄨ烦杞埌鍐呯鏍囩杈撳叆妗�
+ */
+ onBarcodeConfirm() {
+ if (!this.barcode || this.barcode.trim() === '') {
+ this.$refs.uToast.show({
+ title: "璇锋壂鎻忔墭鐩樻潯鐮�",
+ type: 'error'
+ });
+ // 淇濇寔鐒︾偣鍦ㄦ墭鐩樻潯鐮佹
+ this.barcodeFocus = true;
+ this.materSnFocus = false;
+ return;
+ }
+ // 鎵樼洏鐮佹湁鏁堬紝璺宠浆鍒板唴绠辨爣绛�
+ this.barcodeFocus = false;
+ this.materSnFocus = true;
+ },
+
+ /**
+ * 鍐呯鏍囩鎵弿纭
+ * 鑷姩瑙f瀽鍐呯鐮侊紝娓呯┖杈撳叆妗嗭紝鐒︾偣淇濈暀鍦ㄥ唴绠辨爣绛炬
+ */
+ onMaterSnConfirm() {
+ if (!this.materSn || this.materSn.trim() === '') {
+ this.$refs.uToast.show({
+ title: "璇锋壂鎻忓唴绠辨爣绛�",
+ type: 'error'
+ });
+ return;
+ }
+
+ // 鐗规畩澶勭悊锛氫粨搴�11鏃跺幓鎺夊悗缂�
+ let snToProcess = this.materSn;
+ if (this.warehouseId == 11) {
+ snToProcess = snToProcess.replace(/,SC.*/, '');
+ }
+
+ // 鍐呯鐮佹牸寮忔牎楠岋紙蹇呴』鍖呭惈7涓瓧娈碉紝浠ラ�楀彿鍒嗛殧锛�
+ if (snToProcess.split(',').length != 7) {
+ this.$refs.uToast.show({
+ title: "鍐呯鐮佹牸寮忛敊璇紝璇烽噸鏂版壂鎻�",
+ type: 'error'
+ });
+ // 娓呯┖杈撳叆妗嗭紝渚夸簬閲嶆柊鎵弿
+ this.materSn = "";
+ // 鐒︾偣涓嶅姩锛坢aterSnFocus 宸叉槸 true锛�
+ return;
+ }
+
+ // 鍙戣捣鍚庣瑙f瀽璇锋眰
+ this.$u.post('/api/MaterielInfo/PPPKCodeAnalysis?serNum=' + snToProcess, {})
+ .then(res => {
+ if (res.status) {
+ // 瑙f瀽鎴愬姛锛氭浛鎹负鏈�鏂扮殑鍐呯鐮侊紙鍙繚鐣欎竴涓級
+ this.sns = [res.data.serialNumber];
+ this.matInfos = [res.data];
+
+ this.$refs.uToast.show({
+ title: "鍐呯鐮佸凡鏇存柊",
+ type: "success",
+ duration: 1500
+ });
+ // 娓呯┖杈撳叆妗嗭紝涓轰笅涓�娆℃壂鎻忓仛鍑嗗锛堢劍鐐逛粛鍦ㄥ唴绠辩爜妗嗭級
+ this.materSn = "";
+ // 鐒︾偣涓嶅姩锛屼繚鎸佸湪鍐呯鐮佹锛坢aterSnFocus 宸叉槸 true锛�
+ } else {
+ this.$refs.uToast.show({
+ title: res.message,
+ type: "error"
+ });
+ // 瑙f瀽澶辫触锛屾竻绌鸿緭鍏ユ锛岃鐢ㄦ埛閲嶆柊鎵弿
+ this.materSn = "";
+ }
+ })
+ .catch(err => {
+ this.$refs.uToast.show({
+ title: err.message || "瑙f瀽澶辫触",
+ type: "error"
+ });
+ this.materSn = "";
+ });
+ },
+
+ // 鍒犻櫎鍐呯鐮侊紙娓呯┖锛�
+ deleteList() {
+ if (this.isSubmitting) return;
+ this.matInfos = [];
+ this.sns = [];
+ this.$refs.uToast.show({
+ title: "鍐呯鐮佸凡娓呯┖",
+ type: "info"
+ });
+ // 鐒︾偣淇濈暀鍦ㄥ唴绠辩爜妗�
+ },
+
+ // ==================== 缁勭洏鎻愪氦 ====================
+ submit() {
+ if (this.isSubmitting) return;
+ if (!this.barcode) {
+ this.$refs.uToast.show({ title: "璇锋壂鎻忔墭鐩樻潯鐮�", type: 'error' });
+ this.resetFocusToBarcode();
+ return;
+ }
+ if (this.matInfos.length === 0) {
+ this.$refs.uToast.show({ title: "璇锋壂鎻忓唴绠辨爣绛�", type: 'error' });
+ this.resetFocusToMaterSn();
+ return;
+ }
+ if (this.Test && !this.Testcheck) {
+ this.Testcheck = true;
+ this.$refs.uToast.show({
+ title: this.warehouseId == 2 ? "璇风‘璁ゆ暟閲�" : "璇风‘璁ゅ垵濮嬪鍛�",
+ type: 'error'
+ });
+ return;
+ }
+
+ if (this.warehouseId == 2) {
+ let sn = this.sns[0];
+ this.sns = Array(this.Initiallife).fill(sn);
+ }
+
+ this.isSubmitting = true;
+ let url = `palletCode=${this.barcode}&initiallife=${this.Initiallife}&warehouseId=${this.warehouseId}`;
+
+ this.$u.post('/api/InboundOrder/PPPKManualMaterielGroup?' + url, this.sns)
+ .then(res => {
+ if (res.status) {
+ this.$refs.uToast.show({ title: "缁勭洏鎴愬姛", type: "success" });
+ // 閲嶇疆琛ㄥ崟
+ this.barcode = "";
+ this.matInfos = [];
+ this.sns = [];
+ // 閲嶇疆鐒︾偣锛氬洖鍒版墭鐩樻潯鐮佹锛屽紑濮嬫柊鐨勪竴杞�
+ this.resetFocusToBarcode();
+ } else {
+ this.$refs.uToast.show({ title: res.message, type: "error" });
+ }
+ })
+ .finally(() => {
+ this.isSubmitting = false;
+ });
+ },
+
+ // ==================== 鐒︾偣閲嶇疆杈呭姪 ====================
+ resetFocusToBarcode() {
+ this.barcodeFocus = true;
+ this.materSnFocus = false;
+ },
+ resetFocusToMaterSn() {
+ this.barcodeFocus = false;
+ this.materSnFocus = true;
+ },
+
+ // ==================== 鍏ュ簱妯″潡锛堜繚鎸佸師閫昏緫锛� ====================
+ inputChangebarcode() {
+ this.addressFocus = false;
+ this.$nextTick(() => {
+ if (!this.inboundBarcode) return;
+ this.addressFocus = true;
+ this.$u.post('/api/StockInfo/StockQueryData', {
+ MainData: { barcode: this.inboundBarcode, warehouseId: this.warehouseId }
+ }).then(res => {
+ this.stockInfoDetail = [];
+ this.Summmary = 0;
+ if (res.status) {
+ this.stockInfoDetail = res.data.details;
+ this.stockInfoDetail.forEach(item => {
+ this.Summmary += item.stockQuantity;
+ });
+ } else {
+ this.$refs.uToast.show({ title: res.message, type: "error" });
+ }
+ })
+ })
+ },
+
+ inbound() {
+ if (this.isInboundSubmitting) return;
+ if (!this.inboundBarcode) {
+ this.$refs.uToast.show({ title: "璇锋壂鎻忔墭鐩樻潯鐮�", type: "error" });
+ return;
+ }
+ if (!this.address) {
+ this.$refs.uToast.show({ title: "璇锋壂鎻忓湴鍧�鏉$爜", type: "error" });
+ return;
+ }
+
+ this.isInboundSubmitting = true;
+ this.$u.post('/api/Task/PPPKRequestInboundTask', {
+ MainData: {
+ barcode: this.inboundBarcode,
+ startPoint: this.address,
+ warehouseId: this.warehouseId
+ }
+ }).then(res => {
+ if (res.status) {
+ this.inboundBarcode = "";
+ if (this.warehouseId != 3) this.address = "";
+ this.stockInfoDetail = [];
+ this.Summmary = 0;
+ this.$refs.uToast.show({ title: "鍏ュ簱鎴愬姛", type: "success" });
+ } else {
+ this.$refs.uToast.show({ title: res.message, type: "error" });
+ }
+ }).finally(() => {
+ this.isInboundSubmitting = false;
+ });
+ }
+ }
+ }
+</script>
+
+<style lang="scss">
+ @import '@/common/uni-ui.scss';
+ page { background-color: #f5f7fa; font-size: 14px; color: #333; }
+ .page-container { min-height: 100vh; display: flex; flex-direction: column; }
+ .nav-header { background: #fff; padding: 12px 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
+ .segmented-control { border-radius: 8px; --uni-segmented-control-height: 40px; }
+ .main-content { flex: 1; padding: 16px; }
+ .card-container { display: flex; flex-direction: column; gap: 16px; }
+ .form-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 2px 12px rgba(0,0,0,0.04); }
+ .form-item { margin-bottom: 16px; }
+ .input-field { border-radius: 8px; height: 44px; }
+ .form-actions { margin-top: 10px; }
+ .btn-primary { width: 100%; height: 48px; border-radius: 8px; }
+ .list-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.04); }
+ .list-header { padding: 16px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; }
+ .count-badge { background: #e6f4ff; color: #165dff; padding: 2px 8px; border-radius: 20px; font-size: 12px; }
+ .list-item-content { position: relative; padding: 16px; }
+ .delete-icon { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: #ef4444; }
+ .info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
+ .info-row { display: flex; flex-direction: column; }
+ .label { font-size: 12px; color: #6b7280; }
+ .value { font-size: 14px; color: #222; font-weight: 500; }
+ .summary-card { padding: 16px; background: #e6f4ff; font-size: 15px; }
+ .summary-value { font-weight: bold; color: #165dff; margin-left: 6px; }
+ .empty-state { padding: 50px 20px; text-align: center; color: #999; }
+</style>
\ No newline at end of file
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/PPTaskMove.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/PPTaskMove.vue"
new file mode 100644
index 0000000..387d1c4
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/PPTaskMove.vue"
@@ -0,0 +1,727 @@
+<template>
+ <view class="page-container">
+ <!-- 椤堕儴瀵艰埅鏍� -->
+ <view class="nav-header">
+ <uni-segmented-control
+ :current="current"
+ :values="items"
+ @clickItem="onClickItem"
+ class="segmented-control"
+ >
+ </uni-segmented-control>
+ </view>
+
+ <!-- 涓诲唴瀹瑰尯 -->
+ <view class="main-content">
+ <!-- 鐢熸垚PP鎼繍浠诲姟妯″潡 -->
+ <view v-if="current === 0" class="card-container">
+ <!-- 琛ㄥ崟鍗$墖 -->
+ <view class="form-card">
+ <uni-forms class="form-wrapper" label-width="80px">
+ <!-- 鎵樼洏鏉$爜杈撳叆妗嗭細鍒濆鑾峰緱鐒︾偣锛屾壂鎻忓悗鑷姩璺宠浆鍒拌捣濮嬪湴鍧� -->
+ <uni-forms-item label="鎵樼洏鏉$爜:" class="form-item">
+ <uni-easyinput
+ type="text"
+ placeholder="璇锋壂鎻忔墭鐩樻潯鐮�"
+ :focus="barcodeFocus"
+ v-model="barcode"
+ @confirm="onBarcodeConfirm"
+ class="input-field"
+ />
+ </uni-forms-item>
+
+ <!-- 璧峰鍦板潃鎵弿妗嗭細鎵樼洏鐮佹壂鎻忓悗鑷姩鑱氱劍锛屾壂鎻忓悗璺宠浆鍒板唴绠辩爜 -->
+ <uni-forms-item label="璧峰鍦板潃:" class="form-item">
+ <uni-easyinput
+ type="text"
+ placeholder="璇锋壂鎻忚捣濮嬪湴鍧�"
+ :focus="startPointFocus"
+ v-model="startPoint"
+ @confirm="onStartPointConfirm"
+ class="input-field"
+ />
+ </uni-forms-item>
+
+ <!-- 鍐呯鏍囩杈撳叆妗嗭細璧峰鍦板潃鎵弿鍚庤嚜鍔ㄨ仛鐒︼紝鎵弿鍚庤Е鍙戝悗绔В鏋愶紝涓嶈嚜鍔ㄨ烦杞� -->
+ <uni-forms-item label="鍐呯鏍囩:" class="form-item">
+ <uni-easyinput
+ type="text"
+ placeholder="璇锋壂鎻忓唴绠辨爣绛�"
+ :focus="materSnFocus"
+ v-model="materSn"
+ @confirm="onMaterSnConfirm"
+ class="input-field"
+ />
+ <!-- 宸查�夊唴绠辩爜鎻愮ず -->
+ <view class="selected-tip" v-if="matInfos.length > 0">
+ <text class="tip-text">褰撳墠宸查�夛細</text>
+ <text class="sn-text">{{matInfos[0].serialNumber || matInfos[0].materielCode}}</text>
+ <uni-icons type="clear" size="14" class="clear-icon" @click="clearSn"></uni-icons>
+ </view>
+ </uni-forms-item>
+
+ <!-- 鐗规畩浠撳簱瀛楁锛堟祴璇曟灦/娌瑰ⅷ锛� -->
+ <uni-forms-item :label="Testlabel" v-if="Test" class="form-item">
+ <uni-easyinput
+ type="text"
+ :placeholder="Testplaceholder"
+ v-model="Initiallife"
+ class="input-field"
+ />
+ </uni-forms-item>
+
+ <view class="form-actions">
+ <button
+ @click="generatePPTask"
+ type="primary"
+ class="btn-primary"
+ :disabled="isSubmitting"
+ >
+ <uni-icons type="refresh" size="16" v-if="isSubmitting"></uni-icons>
+ {{isSubmitting ? '鐢熸垚涓�...' : '鐢熸垚PP鎼繍浠诲姟'}}
+ </button>
+ </view>
+ </uni-forms>
+ </view>
+
+ <!-- 鍒楄〃鍗$墖锛氬睍绀哄唴绠辩爜鐗╂枡淇℃伅 -->
+ <view class="list-card" v-if="matInfos.length > 0">
+ <view class="list-header">
+ <text class="list-title">鐗╂枡淇℃伅</text>
+ <text class="count-badge">1</text>
+ </view>
+
+ <uni-list class="material-list">
+ <uni-list-item
+ direction="column"
+ v-for="(item,index) in matInfos"
+ :key="index"
+ class="list-item"
+ >
+ <template v-slot:body>
+ <view class="list-item-content">
+ <uni-icons
+ type="trash"
+ size="20"
+ class="delete-icon"
+ @click="deleteList(index)"
+ >
+ </uni-icons>
+
+ <view class="info-grid">
+ <view class="info-row">
+ <text class="label">閲囪喘鍗曞彿锛�</text>
+ <text class="value">{{item.purchaseOrderNo}}</text>
+ </view>
+ <view class="info-row">
+ <text class="label">鐗╂枡缂栫爜锛�</text>
+ <text class="value">{{item.materielCode}}</text>
+ </view>
+ <view class="info-row">
+ <text class="label">鎵规鍙凤細</text>
+ <text class="value">{{item.lotNo}}</text>
+ </view>
+ <view class="info-row">
+ <text class="label">鏁伴噺锛�</text>
+ <text class="value">{{item.quantity}}</text>
+ </view>
+ <view class="info-row">
+ <text class="label">鐢熶骇鏃ユ湡锛�</text>
+ <text class="value">{{item.productionDate}}</text>
+ </view>
+ <view class="info-row">
+ <text class="label">鏈夋晥鏈燂細</text>
+ <text class="value">{{item.effectiveDate}}</text>
+ </view>
+ <view class="info-row">
+ <text class="label">鐗╂枡闀垮害锛�</text>
+ <text class="value">{{item.materielLength}}</text>
+ </view>
+ </view>
+ </view>
+ </template>
+ </uni-list-item>
+ </uni-list>
+ </view>
+
+ <!-- 绌虹姸鎬佹彁绀� -->
+ <view class="empty-state" v-if="matInfos.length === 0 && barcode">
+ <uni-icons type="empty" size="60" color="#ccc"></uni-icons>
+ <text class="empty-text">鏆傛棤鐗╂枡淇℃伅锛岃鎵弿鍐呯鏍囩</text>
+ </view>
+ </view>
+ </view>
+
+ <u-toast ref="uToast" />
+ </view>
+</template>
+
+<script>
+ const innerAudioContext = uni.createInnerAudioContext();
+ export default {
+ data() {
+ return {
+ // 鏍囩椤甸厤缃�
+ items: ['鐢熸垚PP鎼繍浠诲姟'],
+ current: 0,
+ // 琛ㄥ崟鏁版嵁
+ barcode: "", // 鎵樼洏鏉$爜
+ startPoint: "", // 璧峰鍦板潃
+ materSn: "", // 鍐呯鏍囩鍘熷杈撳叆
+ Initiallife: 1000, // 鐗规畩浠撳簱瀛楁锛堝鍛�/鏁伴噺锛�
+ // 鍐呯鐮佽В鏋愮粨鏋�
+ matInfos: [], // 鐗╂枡淇℃伅锛堝綋鍓嶄粎淇濈暀涓�鏉★級
+ sns: [], // 搴忓垪鍙锋暟缁勶紙鐢ㄤ簬鎻愪氦锛�
+ // 鐒︾偣鎺у埗锛堝疄鐜癙DA鎵弿鑷姩璺宠浆锛�
+ barcodeFocus: true, // 鎵樼洏鏉$爜杈撳叆妗嗙劍鐐�
+ startPointFocus: false,// 璧峰鍦板潃杈撳叆妗嗙劍鐐�
+ materSnFocus: false, // 鍐呯鏍囩杈撳叆妗嗙劍鐐�
+ // 鐗规畩浠撳簱鏍囪瘑
+ Test: false,
+ Testlabel: "",
+ Testplaceholder: "",
+ Testcheck: false,
+ // 鍏朵粬杈呭姪鏁版嵁
+ orderNo: "",
+ warehouseId: "",
+ orderInfo: [],
+ // 闃查噸澶嶆彁浜ゆ爣璇�
+ isSubmitting: false
+ }
+ },
+ onLoad(res) {
+ // 鎺ユ敹椤甸潰鍙傛暟
+ this.orderNo = res.orderNo;
+ this.warehouseId = res.warehouseId;
+
+ // 鐗规畩浠撳簱閫昏緫锛氭祴璇曟灦浠撳簱(6) 鎴� 娌瑰ⅷ浠撳簱(2)
+ if (this.warehouseId == 6) {
+ this.Test = true;
+ this.Testlabel = "鍒濆瀵垮懡:";
+ this.Testplaceholder = "璇疯緭鍏ュ垵濮嬪鍛�";
+ } else if (this.warehouseId == 2) {
+ this.Test = true;
+ this.Testlabel = "鏁伴噺:";
+ this.Testplaceholder = "璇疯緭鍏ユ暟閲�";
+ this.Initiallife = 16;
+ }
+
+ // 鍔犺浇鍗曟嵁淇℃伅
+ this.getData();
+ },
+ onReady() {
+ // 纭繚椤甸潰鍔犺浇鍚庢墭鐩樼爜杈撳叆妗嗚幏寰楃劍鐐癸紙PDA鑷姩鑱氱劍锛�
+ this.barcodeFocus = true;
+ this.startPointFocus = false;
+ this.materSnFocus = false;
+ },
+ methods: {
+ // ==================== 鏁版嵁鑾峰彇 ====================
+ getData() {
+ var postData = {
+ MainData: {
+ orderNo: this.orderNo
+ },
+ }
+ this.$u.post('/api/InboundOrderDetail/GetInboundOrderDetails', postData).then((res) => {
+ if (res.status) {
+ this.orderInfo = res.data;
+ }
+ })
+ },
+
+ // ==================== 鏍囩椤靛垏鎹� ====================
+ onClickItem(e) {
+ if (this.current !== e.currentIndex) {
+ this.current = e.currentIndex;
+ }
+ },
+
+ // ==================== 鐒︾偣璺宠浆鏍稿績閫昏緫 ====================
+ /**
+ * 鎵樼洏鏉$爜鎵弿纭
+ * PDA鎵弿鍚庤嚜鍔ㄥ洖杞﹁Е鍙戯紝鏍¢獙闈炵┖鍚庤烦杞劍鐐瑰埌璧峰鍦板潃
+ */
+ onBarcodeConfirm() {
+ if (!this.barcode || this.barcode.trim() === '') {
+ this.$refs.uToast.show({
+ title: "璇锋壂鎻忔墭鐩樻潯鐮�",
+ type: 'error'
+ });
+ // 淇濇寔鐒︾偣鍦ㄦ墭鐩樻潯鐮佹锛岀瓑寰呴噸鏂版壂鎻�
+ this.barcodeFocus = true;
+ this.startPointFocus = false;
+ this.materSnFocus = false;
+ return;
+ }
+ // 鎵樼洏鐮佹湁鏁堬紝璺宠浆鐒︾偣鍒拌捣濮嬪湴鍧�杈撳叆妗�
+ this.barcodeFocus = false;
+ this.startPointFocus = true;
+ this.materSnFocus = false;
+ },
+
+ /**
+ * 璧峰鍦板潃鎵弿纭
+ * PDA鎵弿鍚庤嚜鍔ㄥ洖杞﹁Е鍙戯紝鏍¢獙闈炵┖鍚庤烦杞劍鐐瑰埌鍐呯鏍囩
+ */
+ onStartPointConfirm() {
+ if (!this.startPoint || this.startPoint.trim() === '') {
+ this.$refs.uToast.show({
+ title: "璇锋壂鎻忚捣濮嬪湴鍧�",
+ type: 'error'
+ });
+ // 淇濇寔鐒︾偣鍦ㄨ捣濮嬪湴鍧�妗�
+ this.barcodeFocus = false;
+ this.startPointFocus = true;
+ this.materSnFocus = false;
+ return;
+ }
+ // 璧峰鍦板潃鏈夋晥锛岃烦杞劍鐐瑰埌鍐呯鏍囩杈撳叆妗�
+ this.barcodeFocus = false;
+ this.startPointFocus = false;
+ this.materSnFocus = true;
+ },
+
+ /**
+ * 鍐呯鏍囩鎵弿纭
+ * PDA鎵弿鍚庤嚜鍔ㄥ洖杞﹁Е鍙戯紝瑙f瀽鍐呯鐮侊紝涓嶈嚜鍔ㄨ烦杞劍鐐癸紙鍋滅暀鍦ㄥ唴绠辩爜妗嗭紝鏂逛究瑕嗙洊鎵弿锛�
+ * 娉ㄦ剰锛氬繀椤荤瓑寰呰緭鍏ユ鍐呭瀹屾暣鍚庡洖杞︽墠瑙﹀彂锛岀鍚圥DA鎵弿涔犳儻
+ */
+ onMaterSnConfirm() {
+ if (!this.materSn || this.materSn.trim() === '') {
+ this.$refs.uToast.show({
+ title: "璇锋壂鎻忓唴绠辨爣绛�",
+ type: 'error'
+ });
+ // 淇濇寔鐒︾偣鍦ㄥ唴绠辩爜妗�
+ return;
+ }
+
+ // 鐗规畩澶勭悊锛氫粨搴�11鏃跺幓鎺夊悗缂�
+ let snToProcess = this.materSn;
+ if (this.warehouseId == 11) {
+ snToProcess = snToProcess.replace(/,SC.*/, '');
+ }
+
+ // 鍐呯鐮佹牸寮忔牎楠岋紙蹇呴』鍖呭惈7涓瓧娈碉紝浠ラ�楀彿鍒嗛殧锛�
+ if (snToProcess.split(',').length != 7) {
+ this.$refs.uToast.show({
+ title: "鍐呯鐮佹牸寮忛敊璇紝璇烽噸鏂版壂鎻�",
+ type: 'error'
+ });
+ // 娓呯┖杈撳叆妗嗭紝渚夸簬閲嶆柊鎵弿
+ this.materSn = "";
+ // 淇濇寔鐒︾偣
+ return;
+ }
+
+ // 鍙戣捣鍚庣瑙f瀽璇锋眰
+ this.$u.post('/api/MaterielInfo/PPPKCodeAnalysis?serNum=' + snToProcess, {})
+ .then(res => {
+ if (res.status) {
+ // 瑙f瀽鎴愬姛锛氭浛鎹负鏈�鏂扮殑鍐呯鐮侊紙鍙繚鐣欎竴涓級
+ this.sns = [res.data.serialNumber];
+ this.matInfos = [res.data];
+
+ this.$refs.uToast.show({
+ title: "鍐呯鐮佸凡鏇存柊",
+ type: "success",
+ duration: 1500
+ });
+ // 娓呯┖杈撳叆妗嗭紝涓轰笅涓�娆℃壂鎻忓仛鍑嗗锛堢劍鐐逛粛鍦ㄥ唴绠辩爜妗嗭級
+ this.materSn = "";
+ // 鐒︾偣涓嶅姩锛屼繚鎸佸湪鍐呯鐮佹锛坢aterSnFocus 宸叉槸 true锛�
+ } else {
+ this.$refs.uToast.show({
+ title: res.message,
+ type: "error"
+ });
+ // 瑙f瀽澶辫触锛屾竻绌鸿緭鍏ユ锛岃鐢ㄦ埛閲嶆柊鎵弿
+ this.materSn = "";
+ }
+ })
+ .catch(err => {
+ this.$refs.uToast.show({
+ title: err.message || "瑙f瀽澶辫触",
+ type: "error"
+ });
+ this.materSn = "";
+ });
+ },
+
+ // ==================== 杈呭姪鎿嶄綔 ====================
+ /**
+ * 娓呯┖褰撳墠鍐呯鐮佹暟鎹�
+ */
+ clearSn() {
+ this.matInfos = [];
+ this.sns = [];
+ this.materSn = "";
+ this.$refs.uToast.show({
+ title: "鍐呯鐮佸凡娓呯┖",
+ type: "info"
+ });
+ // 娓呯┖鍚庣劍鐐逛粛鍙暀鍦ㄥ唴绠辩爜妗嗭紝鏂逛究閲嶆柊鎵弿锛堜笉璺宠浆锛�
+ },
+
+ /**
+ * 鍒犻櫎鍒楄〃椤癸紙瀹為檯涔熸槸娓呯┖鍐呯鐮侊級
+ */
+ deleteList(index) {
+ this.matInfos = [];
+ this.sns = [];
+ this.materSn = "";
+ this.$refs.uToast.show({
+ title: "鍐呯鐮佸凡绉婚櫎",
+ type: "info"
+ });
+ },
+
+ // ==================== 鐢熸垚PP鎼繍浠诲姟 ====================
+ generatePPTask() {
+ // 鍩虹鏍¢獙
+ if (!this.barcode) {
+ this.$refs.uToast.show({
+ title: "璇锋壂鎻忔墭鐩樻潯鐮�",
+ type: 'error'
+ });
+ // 鐒︾偣璺宠浆鍒版墭鐩樻潯鐮佹
+ this.resetFocusToBarcode();
+ return;
+ }
+ if (!this.startPoint) {
+ this.$refs.uToast.show({
+ title: "璇锋壂鎻忚捣濮嬪湴鍧�",
+ type: 'error'
+ });
+ this.resetFocusToStartPoint();
+ return;
+ }
+ if (this.matInfos.length === 0) {
+ this.$refs.uToast.show({
+ title: "璇锋壂鎻忓唴绠辨爣绛�",
+ type: 'error'
+ });
+ this.resetFocusToMaterSn();
+ return;
+ }
+
+ // 鐗规畩浠撳簱瀛楁鏍¢獙锛堟祴璇曟灦/娌瑰ⅷ锛�
+ if (this.Test) {
+ if (!this.Testcheck) {
+ this.Testcheck = true;
+ if (this.warehouseId == 2) {
+ this.$refs.uToast.show({
+ title: "璇风‘璁ゆ暟閲�",
+ type: 'error'
+ });
+ } else if (this.warehouseId == 6) {
+ this.$refs.uToast.show({
+ title: "璇风‘璁ゅ垵濮嬪鍛�",
+ type: 'error'
+ });
+ }
+ return;
+ }
+ }
+
+ // 娌瑰ⅷ浠撳簱鏁伴噺澶勭悊锛氬鍒跺簭鍒楀彿
+ if (this.warehouseId == 2) {
+ const baseSn = this.sns[0];
+ for (let i = 0; i < this.Initiallife - 1; i++) {
+ this.sns.push(baseSn);
+ }
+ }
+
+ // 闃查噸澶嶆彁浜�
+ if (this.isSubmitting) return;
+ this.isSubmitting = true;
+
+ // 鎻愪氦浠诲姟
+ let url = 'palletCode=' + this.barcode + '&startPoint=' + this.startPoint + '&warehouseId=' + this.warehouseId;
+ this.$u.post('/api/Mes/PPTaskMove?' + url, this.sns)
+ .then(res => {
+ this.Testcheck = false;
+ if (res.status) {
+ this.$refs.uToast.show({
+ title: "PP鎼繍浠诲姟鐢熸垚鎴愬姛",
+ type: "success"
+ });
+ // 閲嶇疆琛ㄥ崟鎵�鏈夋暟鎹�
+ this.barcode = "";
+ this.startPoint = "";
+ this.materSn = "";
+ this.matInfos = [];
+ this.sns = [];
+ // 閲嶇疆鐒︾偣锛氬洖鍒版墭鐩樻潯鐮佹锛屽紑濮嬫柊鐨勪竴杞壂鎻�
+ this.resetFocusToBarcode();
+ } else {
+ this.$refs.uToast.show({
+ title: res.message,
+ type: "error"
+ });
+ }
+ })
+ .catch(err => {
+ this.$refs.uToast.show({
+ title: err.message || "璇锋眰澶辫触",
+ type: "error"
+ });
+ })
+ .finally(() => {
+ this.isSubmitting = false;
+ });
+ },
+
+ // ==================== 鐒︾偣閲嶇疆杈呭姪鏂规硶 ====================
+ resetFocusToBarcode() {
+ this.barcodeFocus = true;
+ this.startPointFocus = false;
+ this.materSnFocus = false;
+ },
+ resetFocusToStartPoint() {
+ this.barcodeFocus = false;
+ this.startPointFocus = true;
+ this.materSnFocus = false;
+ },
+ resetFocusToMaterSn() {
+ this.barcodeFocus = false;
+ this.startPointFocus = false;
+ this.materSnFocus = true;
+ }
+ }
+ }
+</script>
+
+<style lang="scss">
+ @import '@/common/uni-ui.scss';
+
+ page {
+ background-color: #f5f7fa;
+ font-size: 14px;
+ color: #333;
+ }
+
+ .page-container {
+ min-height: 100vh;
+ display: flex;
+ flex-direction: column;
+ }
+
+ .nav-header {
+ background-color: #fff;
+ padding: 12px 16px;
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
+
+ .segmented-control {
+ --uni-segmented-control-border-color: #e5e7eb;
+ --uni-segmented-control-bg-color: #f9fafb;
+ --uni-segmented-control-active-color: #165dff;
+ --uni-segmented-control-inactive-color: #666;
+ --uni-segmented-control-height: 40px;
+ border-radius: 8px;
+ }
+ }
+
+ .main-content {
+ flex: 1;
+ padding: 16px;
+ }
+
+ .card-container {
+ display: flex;
+ flex-direction: column;
+ gap: 16px;
+ }
+
+ .form-card {
+ background-color: #fff;
+ border-radius: 12px;
+ padding: 20px;
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
+ }
+
+ .form-item {
+ margin-bottom: 16px;
+
+ &:last-of-type {
+ margin-bottom: 24px;
+ }
+ }
+
+ .input-field {
+ --uni-easyinput-border-color: #e5e7eb;
+ --uni-easyinput-bg-color: #f9fafb;
+ --uni-easyinput-input-color: #333;
+ --uni-easyinput-placeholder-color: #9ca3af;
+ border-radius: 8px;
+ padding: 10px 12px;
+ height: 44px;
+ transition: all 0.2s ease;
+
+ &:focus {
+ --uni-easyinput-border-color: #165dff;
+ box-shadow: 0 0 0 2px rgba(22, 93, 255, 0.1);
+ }
+ }
+
+ .selected-tip {
+ display: flex;
+ align-items: center;
+ margin-top: 8px;
+ padding: 6px 10px;
+ background-color: #f0f7ff;
+ border-radius: 6px;
+
+ .tip-text {
+ font-size: 12px;
+ color: #6b7280;
+ margin-right: 6px;
+ }
+
+ .sn-text {
+ flex: 1;
+ font-size: 12px;
+ color: #165dff;
+ font-weight: 500;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+
+ .clear-icon {
+ color: #94a3b8;
+ margin-left: 6px;
+ transition: color 0.2s ease;
+
+ &:active {
+ color: #ef4444;
+ }
+ }
+ }
+
+ .form-actions {
+ display: flex;
+ justify-content: center;
+ }
+
+ .btn-primary {
+ --button-primary-background-color: #165dff;
+ --button-primary-border-color: #165dff;
+ --button-primary-text-color: #fff;
+ --button-disabled-background-color: #94a3b8;
+ --button-disabled-border-color: #94a3b8;
+ border-radius: 8px;
+ width: 100%;
+ height: 48px;
+ font-size: 16px;
+ font-weight: 500;
+ box-shadow: 0 4px 12px rgba(22, 93, 255, 0.2);
+ transition: all 0.2s ease;
+
+ &:not([disabled]):active {
+ transform: translateY(1px);
+ box-shadow: 0 2px 8px rgba(22, 93, 255, 0.2);
+ }
+ }
+
+ .list-card {
+ background-color: #fff;
+ border-radius: 12px;
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
+ overflow: hidden;
+ }
+
+ .list-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 16px 20px;
+ border-bottom: 1px solid #f0f0f0;
+
+ .list-title {
+ font-size: 16px;
+ font-weight: 600;
+ color: #1f2937;
+ }
+
+ .count-badge {
+ background-color: #e6f4ff;
+ color: #165dff;
+ padding: 2px 8px;
+ border-radius: 100px;
+ font-size: 12px;
+ font-weight: 500;
+ }
+ }
+
+ .material-list {
+ --uni-list-item-border-color: #f9fafb;
+ }
+
+ .list-item {
+ padding: 0;
+
+ &:last-child {
+ --uni-list-item-border-color: transparent;
+ }
+ }
+
+ .list-item-content {
+ position: relative;
+ padding: 16px 20px;
+ }
+
+ .delete-icon {
+ position: absolute;
+ right: 20px;
+ top: 50%;
+ transform: translateY(-50%);
+ color: #ef4444;
+ transition: all 0.2s ease;
+
+ &:active {
+ transform: translateY(-50%) scale(0.95);
+ }
+ }
+
+ .info-grid {
+ display: grid;
+ grid-template-columns: repeat(2, 1fr);
+ gap: 8px 16px;
+ }
+
+ .info-row {
+ display: flex;
+ flex-direction: column;
+
+ .label {
+ font-size: 12px;
+ color: #6b7280;
+ margin-bottom: 2px;
+ }
+
+ .value {
+ font-size: 14px;
+ color: #1f2937;
+ font-weight: 500;
+ }
+ }
+
+ .empty-state {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ padding: 48px 20px;
+ background-color: #fff;
+ border-radius: 12px;
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
+
+ .empty-text {
+ margin-top: 16px;
+ font-size: 14px;
+ color: #9ca3af;
+ }
+ }
+</style>
\ No newline at end of file
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/PPTaskTransport.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/PPTaskTransport.vue"
new file mode 100644
index 0000000..02409e3
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/PPTaskTransport.vue"
@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>
\ No newline at end of file
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/ProEmptyBack.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/ProEmptyBack.vue"
index 4d9cd85..4d3491c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/ProEmptyBack.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/ProEmptyBack.vue"
@@ -11,7 +11,16 @@
@input="addressInput" />
</uni-forms-item>
<uni-forms-item>
- <button @click="InEmpty" type="primary" size="default" style="margin-top: 2%;">绌烘鍥炲簱</button>
+ <!-- 绌烘鍥炲簱鎸夐挳娣诲姞绂佺敤鐘舵�佸拰鏂囧瓧鎻愮ず -->
+ <button
+ @click="InEmpty"
+ type="primary"
+ size="default"
+ style="margin-top: 2%;"
+ :disabled="isSubmitting"
+ >
+ {{ isSubmitting ? '鎻愪氦涓�...' : '绌烘鍥炲簱' }}
+ </button>
</uni-forms-item>
</uni-forms>
</view>
@@ -25,10 +34,12 @@
data() {
return {
focus: false,
- focusStart:false,
+ focusStart: false,
barcode: "",
address: "",
- WarehouseId: ""
+ WarehouseId: "",
+ // 鏂板锛氶槻閲嶅鐐瑰嚮鐘舵�佸彉閲�
+ isSubmitting: false
}
},
onShow() {},
@@ -36,15 +47,11 @@
},
methods: {
- // voiceSpeech(src) {
- // innerAudioContext.src = src; // '../../static/success.mp3';
- // innerAudioContext.play();
- // },
barcodeInput() {
this.$nextTick(function(x) {
if (this.barcode.length > 0) {
this.focus = true;
- this.focusStart=true;
+ this.focusStart = true;
}
})
},
@@ -56,6 +63,7 @@
})
},
InEmpty() {
+ // 1. 鍓嶇疆鏍¢獙
if (this.barcode == "") {
this.$refs.uToast.show({
title: "璇锋壂鎻忔墭鐩樼爜",
@@ -70,6 +78,13 @@
})
return;
}
+
+ // 2. 闃叉閲嶅鐐瑰嚮锛氳姹備腑鍒欑洿鎺ヨ繑鍥�
+ if (this.isSubmitting) return;
+
+ // 3. 鏍囪涓鸿姹備腑锛岀鐢ㄦ寜閽�
+ this.isSubmitting = true;
+
this.$u.post('/api/Task/EmptyBackTask?barcode=' + this.barcode + '&startPoint=' + this.address).then(
res => {
if (res.status) {
@@ -85,6 +100,15 @@
type: "error"
})
}
+ }).catch(err => {
+ // 鎹曡幏璇锋眰寮傚父锛屾彁绀洪敊璇�
+ this.$refs.uToast.show({
+ title: err.message || "璇锋眰澶辫触",
+ type: "error"
+ })
+ }).finally(() => {
+ // 4. 璇锋眰瀹屾垚锛堟垚鍔�/澶辫触/寮傚父锛夋仮澶嶆寜閽姸鎬�
+ this.isSubmitting = false;
})
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/boxing.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/boxing.vue"
index 06517fe..e611a7a 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/boxing.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/boxing.vue"
@@ -18,24 +18,20 @@
<uni-easyinput type="text" :placeholder="Testplaceholder" ref='midInput'
v-model="Initiallife" />
</uni-forms-item>
- <!-- <uni-forms-item>
- <checkbox checked="check">鏄惁婊$洏</checkbox>
- </uni-forms-item> -->
<uni-forms-item>
- <button @click="submit" type="primary" size="default" style="margin-top: 2%;">缁勭洏</button>
+ <!-- 缁勭洏鎸夐挳娣诲姞绂佺敤鐘舵�� -->
+ <button
+ @click="submit"
+ type="primary"
+ size="default"
+ style="margin-top: 2%;"
+ :disabled="isSubmitting"
+ >
+ {{ isSubmitting ? '缁勭洏涓�...' : '缁勭洏' }}
+ </button>
</uni-forms-item>
</uni-forms>
<uni-list>
- <!-- <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 matInfos" :key="index">
<template v-slot:body>
<view class="uni-list-box">
@@ -68,7 +64,16 @@
placeholder="璇锋壂鎻忓湴鍧�鏉$爜" ref='midInput' :focus="addressFocus" />
</uni-forms-item>
<uni-forms-item>
- <button @click="inbound" type="primary" size="default" style="margin-top: 2%;">鍏ュ簱纭</button>
+ <!-- 鍏ュ簱鎸夐挳娣诲姞绂佺敤鐘舵�� -->
+ <button
+ @click="inbound"
+ type="primary"
+ size="default"
+ style="margin-top: 2%;"
+ :disabled="isInbounding"
+ >
+ {{ isInbounding ? '鍏ュ簱涓�...' : '鍏ュ簱纭' }}
+ </button>
</uni-forms-item>
</uni-forms>
</view>
@@ -174,7 +179,11 @@
addressdisabled: false,
pksns: [],
pkmaterSn: "",
- pkmatInfos: []
+ pkmatInfos: [],
+ // 鏂板锛氱粍鐩樿姹傜姸鎬侊紙闃叉閲嶅鐐瑰嚮锛�
+ isSubmitting: false,
+ // 鏂板锛氬叆搴撹姹傜姸鎬侊紙闃叉閲嶅鐐瑰嚮锛�
+ isInbounding: false
}
},
onShow() {},
@@ -473,6 +482,7 @@
})
},
inbound() {
+ // 1. 鍓嶇疆鏍¢獙
if (this.inboundBarcode == "") {
this.$refs.uToast.show({
title: "璇锋壂鎻忔墭鐩樻潯鐮�",
@@ -487,6 +497,13 @@
})
return;
}
+
+ // 2. 闃叉閲嶅鐐瑰嚮锛氬鏋滄鍦ㄨ姹傦紝鐩存帴杩斿洖
+ if (this.isInbounding) return;
+
+ // 3. 鏍囪涓鸿姹備腑锛岀鐢ㄦ寜閽�
+ this.isInbounding = true;
+
var postData = {
MainData: {
"barcode": this.inboundBarcode,
@@ -519,6 +536,9 @@
title: err.message,
type: "error"
})
+ }).finally(() => {
+ // 4. 璇锋眰瀹屾垚锛堟垚鍔�/澶辫触锛夊悗锛屾仮澶嶆寜閽姸鎬�
+ this.isInbounding = false;
})
},
inputChangebarcode() {
@@ -562,6 +582,7 @@
this.sns.splice(res, 1);
},
submit() {
+ // 1. 鍓嶇疆鏍¢獙
if (this.barcode == "") {
this.$refs.uToast.show({
title: "璇锋壂鎻忔墭鐩樻潯鐮�",
@@ -593,6 +614,13 @@
return;
}
}
+
+ // 2. 闃叉閲嶅鐐瑰嚮锛氬鏋滄鍦ㄨ姹傦紝鐩存帴杩斿洖
+ if (this.isSubmitting) return;
+
+ // 3. 鏍囪涓鸿姹備腑锛岀鐢ㄦ寜閽�
+ this.isSubmitting = true;
+
if (this.warehouseId == 2) { //娌瑰ⅷ浠撳簱鍖篒D
this.sn = this.sns[0];
for (var i = 0; i < this.Initiallife - 1; i++) {
@@ -620,6 +648,9 @@
type: "error"
})
}
+ }).finally(() => {
+ // 4. 璇锋眰瀹屾垚锛堟垚鍔�/澶辫触锛夊悗锛屾仮澶嶆寜閽姸鎬�
+ this.isSubmitting = false;
})
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/raworderboxing.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/raworderboxing.vue"
index ad79014..b1cc3da 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/raworderboxing.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/raworderboxing.vue"
@@ -22,28 +22,19 @@
v-model="Initiallife" />
</uni-forms-item>
- <!-- <uni-forms-item>
- <checkbox checked="check">鏄惁婊$洏</checkbox>
- </uni-forms-item> -->
<uni-forms-item>
<view style="display: flex;justify-content: space-around;margin-top: 2%;">
<button @click="reset" type="default" size="default"
style="width: 160rpx;border: 1rpx solid #007aff;color: #007aff;">閲嶇疆</button>
- <button @click="submit" type="primary" size="default" style="width: 160rpx;">缁勭洏</button>
+ <!-- 缁勭洏鎸夐挳娣诲姞绂佺敤鐘舵�佸拰鏂囧瓧鎻愮ず -->
+ <button @click="submit" type="primary" size="default" style="width: 160rpx;"
+ :disabled="isSubmitting">
+ {{ isSubmitting ? '缁勭洏涓�...' : '缁勭洏' }}
+ </button>
</view>
</uni-forms-item>
</uni-forms>
<uni-list>
- <!-- <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 matInfos" :key="index">
<template v-slot:body>
<view class="uni-list-box">
@@ -76,7 +67,11 @@
placeholder="璇锋壂鎻忓湴鍧�鏉$爜" ref='midInput' :focus="addressFocus" />
</uni-forms-item>
<uni-forms-item>
- <button @click="inbound" type="primary" size="default" style="margin-top: 2%;">鍏ュ簱纭</button>
+ <!-- 鍏ュ簱纭鎸夐挳娣诲姞绂佺敤鐘舵�佸拰鏂囧瓧鎻愮ず -->
+ <button @click="inbound" type="primary" size="default" style="margin-top: 2%;"
+ :disabled="isInbounding">
+ {{ isInbounding ? '鍏ュ簱涓�...' : '鍏ュ簱纭' }}
+ </button>
</uni-forms-item>
</uni-forms>
</view>
@@ -92,7 +87,6 @@
<view style="font-size: 18px;">鐗╂枡缂栫爜锛歿{item.materielCode}}</view>
<view>鐗╂枡鍚嶇О锛歿{item.materielName}}</view>
<view>鐗╂枡瑙勬牸锛歿{item.materielSpec}}</view>
- <!-- <view style="font-size: 18px;">鐗╂枡鍚嶇О锛歿{item.matName}}</view> -->
<view style="font-size: 18px;">鏁伴噺锛歿{item.orderQuantity+item.unit}}</view>
<view style="font-size: 18px;">缁勭洏鏁伴噺锛歿{item.receiptQuantity}}</view>
</view>
@@ -114,8 +108,11 @@
<view style="display: flex;justify-content: space-around;margin-top: 2%;">
<button @click="resetInPk" type="default" size="default"
style="width: 160rpx;border: 1rpx solid #007aff;color: #007aff;">閲嶇疆</button>
+ <!-- 鍏ュ钩搴撴寜閽坊鍔犵鐢ㄧ姸鎬佸拰鏂囧瓧鎻愮ず -->
<button @click="pksubmit" type="primary" size="default"
- style="margin-top: 2%;">鍏ュ钩搴�</button>
+ style="margin-top: 2%;" :disabled="isPkSubmitting">
+ {{ isPkSubmitting ? '鍏ュ簱涓�...' : '鍏ュ钩搴�' }}
+ </button>
</view>
</uni-forms-item>
@@ -180,7 +177,11 @@
Testcheck: false,
pkmaterSn: "",
pkmatInfos: [],
- addressdisabled: false
+ addressdisabled: false,
+ // 鏂板锛氶槻閲嶅鐐瑰嚮鐘舵�佸彉閲�
+ isSubmitting: false, // 缁勭洏璇锋眰鐘舵��
+ isInbounding: false, // 鍏ュ簱纭璇锋眰鐘舵��
+ isPkSubmitting: false // 鍏ュ钩搴撹姹傜姸鎬�
}
},
onShow() {},
@@ -210,10 +211,6 @@
this.getData();
},
methods: {
- // voiceSpeech(src) {
- // innerAudioContext.src = src; // '../../static/success.mp3';
- // innerAudioContext.play();
- // },
updateFocus() {
debugger
this.$nextTick(() => {
@@ -258,14 +255,7 @@
barcodeInput() {
this.$nextTick(function(x) {
if (this.barcode.length > 0) {
- // if (this.barcode.substring(0, 1) == 'A' || this.barcode.substring(0, 2) == 'TP') {
this.focus = true;
- // } else {
- // this.$refs.uToast.show({
- // title: "鎵爜閿欒,璇锋壂鎻忔墭鐩樼爜",
- // type: "error"
- // })
- // }
}
})
},
@@ -283,29 +273,19 @@
this.Testcheck = false;
if (res.status) {
this.sns.push(res.data.serialNumber);
-
this.matInfos.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);
}
})
}
@@ -318,9 +298,7 @@
pksnInput() {
this.$nextTick(() => {
if (this.pkmaterSn != "") {
-
var matSn = this.pkmaterSn;
-
if(matSn.indexOf("POHA")>0){
this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + matSn, {}).then((res) => {
if (res.status) {
@@ -331,23 +309,14 @@
title: res.message,
type: "error"
})
- // setTimeout(() => {
- // this.voiceSpeech('../../static/fail.mp3');
- // }, 100);
return;
}
- // setTimeout(() => {
- // this.voiceSpeech('../../static/success.mp3');
- // }, 100);
return;
} else {
this.$refs.uToast.show({
title: res.message,
type: "error"
})
- // setTimeout(() => {
- // this.voiceSpeech('../../static/fail.mp3');
- // }, 100);
}
})
}
@@ -358,6 +327,7 @@
})
},
inbound() {
+ // 1. 鍓嶇疆鏍¢獙
if (this.inboundBarcode == "") {
this.$refs.uToast.show({
title: "璇锋壂鎻忔墭鐩樻潯鐮�",
@@ -372,6 +342,13 @@
})
return;
}
+
+ // 2. 闃叉閲嶅鐐瑰嚮锛氳姹備腑鍒欑洿鎺ヨ繑鍥�
+ if (this.isInbounding) return;
+
+ // 3. 鏍囪涓鸿姹備腑锛岀鐢ㄦ寜閽�
+ this.isInbounding = true;
+
var postData = {
MainData: {
"barcode": this.inboundBarcode,
@@ -401,6 +378,9 @@
title: err.message,
type: "error"
})
+ }).finally(() => {
+ // 4. 璇锋眰瀹屾垚锛堟垚鍔�/澶辫触锛夋仮澶嶆寜閽姸鎬�
+ this.isInbounding = false;
})
},
inputChangebarcode() {
@@ -435,6 +415,7 @@
this.pksns = [];
},
pksubmit() {
+ // 1. 鍓嶇疆鏍¢獙
if (this.pkmatInfos.length == 0) {
this.$refs.uToast.show({
title: "璇锋壂鎻忓唴绠辨爣绛�",
@@ -442,6 +423,13 @@
})
return;
}
+
+ // 2. 闃叉閲嶅鐐瑰嚮锛氳姹備腑鍒欑洿鎺ヨ繑鍥�
+ if (this.isPkSubmitting) return;
+
+ // 3. 鏍囪涓鸿姹備腑锛岀鐢ㄦ寜閽�
+ this.isPkSubmitting = true;
+
this.$u.post('/api/InboundOrder/InPinKu?warehouseId=' + this.warehouseId + "&orderNo=" + this.orderNo, this
.pksns).then(res => {
if (res.status) {
@@ -458,9 +446,18 @@
type: "error"
})
}
+ }).catch(err => {
+ this.$refs.uToast.show({
+ title: err.message,
+ type: "error"
+ })
+ }).finally(() => {
+ // 4. 璇锋眰瀹屾垚锛堟垚鍔�/澶辫触锛夋仮澶嶆寜閽姸鎬�
+ this.isPkSubmitting = false;
})
},
submit() {
+ // 1. 鍓嶇疆鏍¢獙
if (this.barcode == "") {
this.$refs.uToast.show({
title: "璇锋壂鎻忔墭鐩樻潯鐮�",
@@ -492,6 +489,13 @@
return;
}
}
+
+ // 2. 闃叉閲嶅鐐瑰嚮锛氳姹備腑鍒欑洿鎺ヨ繑鍥�
+ if (this.isSubmitting) return;
+
+ // 3. 鏍囪涓鸿姹備腑锛岀鐢ㄦ寜閽�
+ this.isSubmitting = true;
+
if (this.warehouseId == 2) { //娌瑰ⅷ浠撳簱鍖篒D
this.sn = this.sns[0];
for (var i = 0; i < this.Initiallife - 1; i++) {
@@ -503,7 +507,6 @@
"palletCode": this.barcode,
"orderNo": this.orderNo,
"initiallife": this.Initiallife,
- // "isFull": this.check
"warehouseId": this.warehouseId
},
DelKeys: this.sns
@@ -528,6 +531,14 @@
type: "error"
})
}
+ }).catch(err => {
+ this.$refs.uToast.show({
+ title: err.message,
+ type: "error"
+ })
+ }).finally(() => {
+ // 4. 璇锋眰瀹屾垚锛堟垚鍔�/澶辫触锛夋仮澶嶆寜閽姸鎬�
+ this.isSubmitting = false;
})
}
}
--
Gitblit v1.9.3