WMS首页优化,WCS优化AGV和产线、输送线交互逻辑
已删除4个文件
已修改29个文件
已添加6个文件
已重命名3个文件
| | |
| | | window.webConfig = { |
| | | "webApiBaseUrl": "http://192.168.188.49:9291/", |
| | | "webApiProduction":"http://192.168.188.61:8098/" |
| | | "webApiBaseUrl": "http://192.168.10.86:9291/", |
| | | "webApiProduction":"http://192.168.10.88:8098/" |
| | | } |
| | |
| | | /// <param name="saveModel"></param> |
| | | /// <returns></returns> |
| | | WebResponseContent AGVUpdateTaskState(AGVUpdateTaskDTO saveModel); |
| | | WebResponseContent OutTaskFinish(string address); |
| | | } |
| | | } |
| | |
| | | { |
| | | return AGVsignal.AGVRequestin(saveModel); |
| | | } |
| | | /// <summary> |
| | | /// è¾é线å
¥å£æ¾è´§å®æ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("ReleaseCompleted")] |
| | | public WebResponseContent ReleaseCompleted() |
| | | { |
| | | return AGVsignal.ReleaseCompleted(); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | return Service.AGVUpdateTaskState(saveModel); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 人工使ç¨PDAåºåºå®æï¼éæ¾å¹³åºåºä½ |
| | | /// </summary> |
| | | /// <param name="saveModel">请æ±åæ°</param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("OutTaskFinish"), AllowAnonymous] |
| | | public WebResponseContent OutTaskFinish(string Address) |
| | | { |
| | | return Service.OutTaskFinish(Address); |
| | | } |
| | | } |
| | | } |
| | |
| | | app.ConfigureApplication();//é
ç½®æä»¶ |
| | | app.UseApplicationSetup();//å¯å¨é
ç½® |
| | | app.UseSession(); |
| | | if (app.Environment.IsDevelopment()) |
| | | { |
| | | //todo |
| | | //app.UseSwaggerAuthorized(); |
| | | app.UseSwaggerMiddle(() => Assembly.GetExecutingAssembly().GetManifestResourceStream("WIDESEAWCS_Server.index.html")); |
| | | }//夿æ¯å¦éè¦æå¼swagger |
| | | //if (app.Environment.IsDevelopment()) |
| | | //{ |
| | | //todo |
| | | //app.UseSwaggerAuthorized(); |
| | | app.UseSwaggerMiddle(() => Assembly.GetExecutingAssembly().GetManifestResourceStream("WIDESEAWCS_Server.index.html")); |
| | | //}//夿æ¯å¦éè¦æå¼swagger |
| | | |
| | | app.UseIpLimitMiddle(); |
| | | app.UseApiLogMiddleware(); |
| | |
| | | <Project> |
| | | <PropertyGroup> |
| | | <_PublishTargetUrl>E:\IISText\èæ¹ä¸ä¸\WCS</_PublishTargetUrl> |
| | | <History>True|2025-02-14T09:36:18.5767695Z;True|2025-02-14T14:39:49.5856199+08:00;</History> |
| | | <History>True|2025-03-27T08:23:43.2657011Z;True|2025-03-25T12:01:47.0052741+08:00;True|2025-02-14T17:36:18.5767695+08:00;True|2025-02-14T14:39:49.5856199+08:00;</History> |
| | | <LastFailureDetails /> |
| | | </PropertyGroup> |
| | | </Project> |
| | |
| | | "ApiName": "WIDESEA", |
| | | "WMSIP": "http://127.0.0.1:9290", |
| | | "wmsInterfaceAddress": "/api/WCS/GetPosition,/api/WCS/ConveyorLineRequestInbound,/api/WCS/StackerCraneRequestInbound,/api/WCS/UpdateTaskStatus,/api/ProductionLine/ProductionlineRequest", |
| | | "AGVIP": "http://192.168.1.20:81", |
| | | "agvInterfaceAddress": "/pt/taskSent,/pt/taskResult?outID=", |
| | | "AGVIP": "http://192.168.10.140:81", |
| | | "agvInterfaceAddress": "/pt/taskSent,/pt/taskResult", |
| | | "OKAddress": "104", |
| | | "NGAddress": "101", |
| | | "ExpMinutes": 120, |
| | |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Common.TaskEnum; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_DTO.TaskInfo; |
| | | using WIDESEAWCS_DTO.WMSInfo; |
| | | using WIDESEAWCS_ITaskInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_QuartzJob.Models; |
| | |
| | | // message = content.Message, |
| | | //}; |
| | | } |
| | | /// <summary> |
| | | /// åºåºä»»å¡å®æ |
| | | /// </summary> |
| | | /// <param name="Address"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent OutTaskFinish(string Address) |
| | | { |
| | | try |
| | | { |
| | | Dt_Task dt_Task = BaseDal.QueryFirst(x => x.TargetAddress == Address); |
| | | if (dt_Task != null && dt_Task.TaskState != TaskOutStatusEnum.AGV_OutFinish.ObjToInt()) |
| | | throw new Exception($"å°åã{Address}ãå卿ªå®æAGVä»»å¡"); |
| | | Dt_Router _Router = _routerRepository.QueryFirst(x => x.NextPosi == Address); |
| | | if (_Router == null) throw new Exception($"å°åã{Address}ãæªé
置路ç±"); |
| | | _Router.Remark = "æªå ç¨"; |
| | | Db.Ado.BeginTran(); |
| | | _routerRepository.UpdateData(_Router); |
| | | if (dt_Task != null) |
| | | { |
| | | dt_Task.TaskState = TaskOutStatusEnum.OutFinish.ObjToInt(); |
| | | WMSTaskDTO WMStask = _mapper.Map<WMSTaskDTO>(dt_Task); |
| | | AddTask_Hty(dt_Task, TaskOperateTypeEnum.AutoComplete); |
| | | HttpHelper.PostAsync(WMSInterfaceAddress.UpdateTaskStatus, WMStask.ToJson(), headers: new Dictionary<string, string>()); |
| | | } |
| | | Db.Ado.CommitTran(); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Db.Ado.RollbackTran(); |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | public static string GetEnumDescription<T>(T value) where T : Enum |
| | | { |
| | | FieldInfo fieldInfo = typeof(T).GetField(value.ToString()); |
| | |
| | | using WIDESEAWCS_ITaskInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_QuartzJob.Models; |
| | | using WIDESEAWCS_QuartzJob.Repository; |
| | | using WIDESEAWCS_QuartzJob.Service; |
| | | |
| | | namespace WIDESEAWCS_TaskInfoService |
| | |
| | | public partial class TaskService : ServiceBase<Dt_Task, ITaskRepository>, ITaskService |
| | | { |
| | | private readonly IRouterService _routerService; |
| | | private readonly IRouterRepository _routerRepository; |
| | | private readonly ITaskExecuteDetailService _taskExecuteDetailService; |
| | | private readonly ITaskExecuteDetailRepository _taskExecuteDetailRepository; |
| | | private readonly ITaskHtyService _taskHtyService; |
| | |
| | | |
| | | public List<int> TaskRelocationTypes => typeof(TaskRelocationTypeEnum).GetEnumIndexList(); |
| | | |
| | | public TaskService(ITaskRepository BaseDal, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, ITaskExecuteDetailRepository taskExecuteDetailRepository, ITaskHtyService taskHtyService, IMapper mapper) : base(BaseDal) |
| | | public TaskService(ITaskRepository BaseDal, IRouterService routerService, IRouterRepository routerRepository, ITaskExecuteDetailService taskExecuteDetailService, ITaskExecuteDetailRepository taskExecuteDetailRepository, ITaskHtyService taskHtyService, IMapper mapper) : base(BaseDal) |
| | | { |
| | | _routerService = routerService; |
| | | _routerRepository = routerRepository; |
| | | _taskExecuteDetailService = taskExecuteDetailService; |
| | | _taskExecuteDetailRepository = taskExecuteDetailRepository; |
| | | _taskHtyService = taskHtyService; |
| | |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Reflection.Metadata; |
| | | using System.Security.Cryptography; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Common.TaskEnum; |
| | |
| | | { |
| | | try |
| | | { |
| | | |
| | | #region 任塿´æ° |
| | | var Tasks = _taskService.Db.Queryable<Dt_Task>().Where(x => |
| | | x.TaskState > (int)TaskInStatusEnum.InNew && |
| | |
| | | x.TaskState < (int)TaskOutStatusEnum.AGV_OutFinish).ToList().OrderBy(x => x.Grade).ThenBy(x => x.CreateDate).ToList(); |
| | | foreach (var Task in Tasks) |
| | | { |
| | | var ResultData = HttpHelper.PostAsync(AGVInterfaceAddress.taskResult + Task.TaskNum, null, headers: new Dictionary<string, string>()); |
| | | var obj = new |
| | | { |
| | | outID = Task.TaskNum.ToString() |
| | | }; |
| | | var ResultData = HttpHelper.PostAsync(AGVInterfaceAddress.taskResult, obj.ToJson(), headers: new Dictionary<string, string>()); |
| | | if (ResultData.Result != null) |
| | | { |
| | | var content = JsonConvert.DeserializeObject<AGVReturnInfo>(ResultData.Result); |
| | |
| | | { |
| | | Task.TaskState = _taskService.TaskInboundTypes.Contains(Task.TaskType) ? (int)TaskInStatusEnum.AGV_InFinish : TaskOutStatusEnum.AGV_OutFinish.ObjToInt(); |
| | | Task.CurrentAddress = Task.NextAddress; |
| | | Task.NextAddress = ""; |
| | | List<Dt_Router> routers = _routerService.QueryNextRoutes(Task.CurrentAddress, Task.TargetAddress); |
| | | if (routers.Count > 0) |
| | | { |
| | | Task.NextAddress = routers.FirstOrDefault()?.ChildPosi ?? ""; |
| | | } |
| | | if (Task.TaskState == TaskOutStatusEnum.AGV_OutFinish.ObjToInt()) |
| | | { |
| | | #region åWMSåé¦å åæºä»»å¡å®æ |
| | | WMSTaskDTO WMStask = _mapper.Map<WMSTaskDTO>(Task); |
| | | HttpHelper.PostAsync(WMSInterfaceAddress.UpdateTaskStatus, WMStask.ToJson(), headers: new Dictionary<string, string>()); |
| | | #endregion |
| | | } |
| | | } |
| | | break; |
| | |
| | | if (content.code == "20000") |
| | | { |
| | | var task = newTasks.Where(x => x.TaskNum == agvTaskDTO.outID.ObjToInt()).First(); |
| | | task.TaskState = _taskService.TaskInboundTypes.Contains(task.TaskType)? TaskInStatusEnum.AGV_InSend.ObjToInt(): TaskOutStatusEnum.AGV_OutSend.ObjToInt(); |
| | | task.TaskState = _taskService.TaskInboundTypes.Contains(task.TaskType) ? TaskInStatusEnum.AGV_InSend.ObjToInt() : TaskOutStatusEnum.AGV_OutSend.ObjToInt(); |
| | | UpnewTasks.Add(task); |
| | | } |
| | | else |
| | |
| | | CommonConveyorLine? conveyorLine = Storage.Devices.FirstOrDefault(x => x.DeviceName == "è¾é线") as CommonConveyorLine; |
| | | if (conveyorLine == null) throw new Exception("æªæ¾å°è¾é线设å¤ä¿¡æ¯"); |
| | | if (!conveyorLine.IsConnected) throw new Exception($"è¾é线设å¤é讯å¼å¸¸"); |
| | | //conveyorLine.SetValue(ConveyorLine_AGV.WriteRGPutComplete, true, "1001");//人工æ¾è´§å®æ |
| | | switch (conveyor.Type) |
| | | { |
| | | case 1: |
| | |
| | | } |
| | | break; |
| | | case 2: |
| | | break; |
| | | case 3: |
| | | { |
| | | if (conveyor.Station == "1001") |
| | | { |
| | |
| | | } |
| | | } |
| | | } |
| | | break; |
| | | case 3: |
| | | |
| | | break; |
| | | case 4: |
| | | |
| | |
| | | { |
| | | case 1: |
| | | if (agvState != conveyor.Type) throw new Exception("产线ä¸å
许è¿å
¥ä½ä¸"); |
| | | content.OK(); |
| | | break; |
| | | case 2: |
| | | if (agvState != conveyor.Type) throw new Exception("产线ä¸å
许离å¼"); |
| | | //if (agvState != conveyor.Type) throw new Exception("产线ä¸å
许离å¼"); |
| | | content.OK(); |
| | | break; |
| | | case 3: |
| | | content.Status = ProductionLine.SetValue(ProductionLineDBName.Wrequest, 2); |
| | |
| | | } |
| | | return content; |
| | | } |
| | | /// <summary> |
| | | /// å
¥åºè¾é线人工æ¾è´§å®æ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static WebResponseContent ReleaseCompleted() |
| | | { |
| | | try |
| | | { |
| | | CommonConveyorLine? conveyorLine = Storage.Devices.FirstOrDefault(x => x.DeviceName == "è¾é线") as CommonConveyorLine; |
| | | if (conveyorLine == null) throw new Exception("æªæ¾å°è¾é线设å¤ä¿¡æ¯"); |
| | | if (!conveyorLine.IsConnected) throw new Exception($"è¾é线设å¤é讯å¼å¸¸"); |
| | | conveyorLine.SetValue(ConveyorLine_AGV.WriteRGPutComplete, true, "1001");//人工æ¾è´§å®æ |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | task.TaskState = TaskOutStatusEnum.Line_OutFinish.ObjToInt(); |
| | | task.CurrentAddress = childDeviceCode; |
| | | task.NextAddress = router.ChildPosi; |
| | | task.NextAddress = router.NextPosi; |
| | | router.Remark = "å ç¨"; |
| | | _routerRepository.UpdateData(router); |
| | | _taskService.UpdateData(task); |
| | |
| | | OtherDevice ProductionLine = (OtherDevice)context.JobDetail.JobDataMap.Get("JobParams"); |
| | | if (ProductionLine != null) |
| | | { |
| | | //ProductionLineDTO MaterielGroupDTO = new ProductionLineDTO() |
| | | //{ |
| | | // stationCode = ProductionLine.DeviceCode, |
| | | // traytype = 4, |
| | | // Barcode = "25000037", |
| | | // batchNo = "250325T1", |
| | | //}; |
| | | //var content = ProductionLineToWMSRequest(MaterielGroupDTO); |
| | | #region MyRegion |
| | | var request = ProductionLine.GetValue<ProductionLineDBName, short>(ProductionLineDBName.request); |
| | | if (request == 1) |
| | | { |
| | |
| | | if (traytype == 4) |
| | | { |
| | | var Barcode = ProductionLine.GetValue<ProductionLineDBName, string>(ProductionLineDBName.trayBarcode).Replace("\0", ""); |
| | | var batchNo = ProductionLine.GetValue<ProductionLineDBName, string>(ProductionLineDBName.batchNo).Replace("\0", ""); |
| | | ProductionLineDTO MaterielGroupDTO = new ProductionLineDTO() |
| | | var task = _taskRepository.QueryFirst(x => x.PalletCode == Barcode); |
| | | if (task == null) |
| | | { |
| | | stationCode = ProductionLine.DeviceCode, |
| | | traytype = traytype, |
| | | Barcode = Barcode, |
| | | batchNo = batchNo, |
| | | }; |
| | | var content = ProductionLineToWMSRequest(MaterielGroupDTO); |
| | | if (content.Status) |
| | | ProductionLine.SetValue(ProductionLineDBName.Wrequest, request); |
| | | var batchNo = ProductionLine.GetValue<ProductionLineDBName, string>(ProductionLineDBName.batchNo).Replace("\0", ""); |
| | | ProductionLineDTO MaterielGroupDTO = new ProductionLineDTO() |
| | | { |
| | | stationCode = ProductionLine.DeviceCode, |
| | | traytype = traytype, |
| | | Barcode = Barcode, |
| | | batchNo = batchNo, |
| | | }; |
| | | var content = ProductionLineToWMSRequest(MaterielGroupDTO); |
| | | if (content.Status) |
| | | ProductionLine.SetValue(ProductionLineDBName.Wrequest, request); |
| | | } |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | #endregion |
| | | } |
| | |
| | | <template> |
| | | <div class="title"></div> |
| | | <div> |
| | | <!-- height:40px --> |
| | | <div class="title">åºä½å¹³é¢å¾</div> |
| | | |
| | | <!-- <div>åªæ¾ç¤ºä¸ä¸ªåºåçä¸ä¸ªå åæºå¯¹åºçç¶æ</div> --> |
| | | <div class="main" :style="{ height: mian_height }"> |
| | | <!-- å¹³é¢å¾æ¾ç¤ºåºå --> |
| | | <div class="right"> |
| | | <div v-for="layer in locationData" :key="layer.index"> |
| | | <div class="row_tip">第{{ layer.index }}å±</div> |
| | | <div class="row" v-for="row in layer.rows" :key="row.index"> |
| | | <el-tooltip |
| | | v-for="col in row.cols" |
| | | :key="col.column" |
| | | effect="dark" |
| | | :content="getTooltipContent(col)" |
| | | placement="top" |
| | | :show-after="200" |
| | | :hide-after="0" |
| | | ><div |
| | | class="item" |
| | | :style="{ 'background-color': GetBgColor(col) }" |
| | | > |
| | | {{ row.index }}-{{ col.column }}-{{ layer.index }} |
| | | </div> |
| | | </el-tooltip> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- éæ©æç¤ºåºå --> |
| | | <div class="left"> |
| | | <!-- <div>åºåï¼</div> |
| | | <el-select |
| | | size="mini" |
| | | filterable |
| | | v-model="Area.shelf_code" |
| | | placeholder="è¯·éæ©" |
| | | > |
| | | <el-option |
| | | v-for="item in slectData" |
| | | :value="item.shelf_code" |
| | | :label="item.house_name" |
| | | :key="item.house_name" |
| | | ></el-option> |
| | | </el-select> --> |
| | | <!-- <div class="tipText">å åæºï¼</div> |
| | | <el-select |
| | | size="mini" |
| | | clearable |
| | | filterable |
| | | @change="SCChange" |
| | | v-model="Area.tunnel" |
| | | placeholder="è¯·éæ©" |
| | | > |
| | | <el-option |
| | | v-for="item in scList" |
| | | :value="item" |
| | | :label="item" |
| | | :key="item" |
| | | ></el-option> |
| | | </el-select> --> |
| | | <!-- <div class="tipText">å±ï¼</div> |
| | | <el-select |
| | | size="mini" |
| | | clearable |
| | | filterable |
| | | @change="SCChange" |
| | | v-model="Area.layer" |
| | | placeholder="è¯·éæ©" |
| | | > |
| | | <el-option |
| | | v-for="item in layers" |
| | | :value="item" |
| | | :label="item" |
| | | :key="item" |
| | | ></el-option> |
| | | </el-select> --> |
| | | <br /> |
| | | <ElButton type="success" class="btn" @click="GetViewData" |
| | | >å·æ°</ElButton |
| | | > |
| | | |
| | | <div style="margin-top: 80px"> |
| | | <div>说æ</div> |
| | | <div v-for="item in infoMsg" :key="item.bgcolor"> |
| | | <div class="infoMsg" :style="{ 'background-color': item.bgcolor }"> |
| | | {{ item.msg }} |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { ref, reactive } from 'vue' |
| | | import { ElButton } from "element-plus"; |
| | | |
| | | export default { |
| | | setup() { |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | } |
| | | } |
| | | slectData: [], |
| | | scList: [], |
| | | layers: [], |
| | | Area: { house_name: "", tunnel: "", shelf_code: "" }, |
| | | mian_height: "", |
| | | infoMsg: [ |
| | | { bgcolor: "lightgreen", msg: "空货ä½", state: 0 }, |
| | | { bgcolor: "orange", msg: "æè´§", state: "Stored" }, |
| | | { bgcolor: "#2BB3D5", msg: "æ§è¡ä¸", state: "InAssigned" }, |
| | | { bgcolor: "#ccc", msg: "ç¦ç¨", state: "Lock" }, |
| | | { bgcolor: "red", msg: "å¼å¸¸", state: "error" }, |
| | | { bgcolor: "#b7ba6b", msg: "空æ", state: 99 }, |
| | | ], |
| | | locationData: [], |
| | | }; |
| | | }, |
| | | computed: { |
| | | GetBgColor() { |
| | | return (col) => { |
| | | var bgColor = "#b7ba6b"; |
| | | //ä¼å
æ¾ç¤ºç¦ç¨ç¶æ |
| | | if (col.enalbeStatus == 3) { |
| | | this.infoMsg.forEach((el) => { |
| | | if (el.state == "Lock") { |
| | | bgColor = el.bgcolor; |
| | | } |
| | | }); |
| | | } else { |
| | | this.infoMsg.forEach((el) => { |
| | | if ( |
| | | col.locationStatus == 4 || |
| | | col.locationStatus == 6 || |
| | | col.locationStatus == 7 |
| | | ) { |
| | | if (el.state == "InAssigned") { |
| | | bgColor = el.bgcolor; |
| | | } |
| | | } else if (col.locationStatus == 2 || col.locationStatus == 3) { |
| | | if (el.state == "Stored") { |
| | | bgColor = el.bgcolor; |
| | | } |
| | | } else if (el.state == col.locationStatus) { |
| | | bgColor = el.bgcolor; |
| | | } |
| | | }); |
| | | } |
| | | return bgColor; |
| | | }; |
| | | }, |
| | | }, |
| | | watch: { |
| | | //忢åºåº |
| | | "Area.shelf_code"(newValue, oldValue) { |
| | | this.scList = []; |
| | | this.layers = []; |
| | | this.slectData.forEach((e) => { |
| | | if (e.areaName == newValue) { |
| | | this.Area.tunnel = e.tunnel[0]; |
| | | this.scList = e.tunnel; |
| | | this.Area.layer = "第" + e.layers[0] + "å±"; |
| | | this.layers = e.layers; |
| | | } |
| | | }); |
| | | this.GetViewData(); |
| | | }, |
| | | }, |
| | | methods: { |
| | | getTooltipContent(col) { |
| | | return `ç¶æ: ${this.getStatusText(col.locationStatus)} |
| | | å¯ç¨ç¶æ: ${this.getEnableStatusText(col.enalbeStatus)} |
| | | æçå·: ${col.palletNo || "æ "}`; |
| | | }, |
| | | getStatusText(status) { |
| | | const statusMap = { |
| | | 0: "空货ä½", |
| | | 2: "æè´§", |
| | | 3: "æè´§", |
| | | 4: "æ§è¡ä¸", |
| | | 6: "æ§è¡ä¸", |
| | | 7: "æ§è¡ä¸", |
| | | 99: "空æ", |
| | | }; |
| | | return statusMap[status] || "æªç¥ç¶æ"; |
| | | }, |
| | | getEnableStatusText(status) { |
| | | const enableMap = { |
| | | 1: "æ£å¸¸", |
| | | 3: "ç¦ç¨", |
| | | }; |
| | | return enableMap[status] || "æªç¥"; |
| | | }, |
| | | GetViewData() { |
| | | var _this = this; |
| | | this.http |
| | | .post("/api/StockView/GetLocationStockView", {}, "æ¥è¯¢ä¸") |
| | | .then((x) => { |
| | | _this.locationData = x.data; |
| | | // console.log("å端è¿å:", x.data); |
| | | // console.log("è¿åæ°æ®:", _this.locationData); |
| | | }); |
| | | }, |
| | | // 忢å åæº |
| | | SCChange() { |
| | | this.GetViewData(); |
| | | }, |
| | | }, |
| | | mounted() { |
| | | var mainHeight = document.getElementById("vol-main"); |
| | | this.mian_height = mainHeight.offsetHeight - 40 + "px"; |
| | | var _this = this; |
| | | //å è½½ä¸æé项 |
| | | this.http |
| | | .get("/api/LocationInfo/GetLocationLayer", {}, "æ¥è¯¢ä¸") |
| | | .then((x) => { |
| | | _this.slectData = x; |
| | | //å 载第ä¸ä¸ªåºåï¼ç¬¬ä¸ä¸ªå åæº |
| | | _this.Area.shelf_code = _this.slectData[0].areaName; |
| | | _this.scList = _this.slectData[0].tunnel; |
| | | _this.layers = _this.slectData[0].layers; |
| | | }); |
| | | this.GetViewData(); |
| | | }, |
| | | components: { ElButton }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .left { |
| | | height: 100%; |
| | | float: left; |
| | | width: 18%; |
| | | /* background: lightblue; */ |
| | | padding-top: 20px; |
| | | padding-left: 20px; |
| | | } |
| | | |
| | | .right { |
| | | padding: 9px; |
| | | height: 98%; |
| | | overflow-y: auto; |
| | | overflow-x: auto; |
| | | float: left; |
| | | width: 82%; |
| | | padding-top: 5px; |
| | | } |
| | | |
| | | .title { |
| | | line-height: 70vh; |
| | | text-align: center; |
| | | font-size: 28px; |
| | | color: orange; |
| | | padding: 5px 0px; |
| | | font-size: 20px; |
| | | font-weight: bold; |
| | | width: 82%; |
| | | } |
| | | |
| | | .row_tip { |
| | | font-size: 16px; |
| | | padding-left: 5px; |
| | | } |
| | | |
| | | .row { |
| | | overflow: auto; |
| | | margin-bottom: 11px; |
| | | } |
| | | |
| | | .item { |
| | | float: left; |
| | | width: 66px; |
| | | height: 38px; |
| | | margin: 3px; |
| | | background-color: lightblue; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | border-radius: 3px; |
| | | line-height: 38px; |
| | | } |
| | | |
| | | .tipText { |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .btn { |
| | | margin-top: 15px; |
| | | } |
| | | |
| | | .infoMsg { |
| | | float: left; |
| | | width: 63px; |
| | | height: 35px; |
| | | margin: 3px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | border-radius: 3px; |
| | | line-height: 38px; |
| | | } |
| | | </style> |
| | | |
| | | <style> |
| | | .el-input { |
| | | width: 180px; |
| | | } |
| | | </style> |
| | |
| | | using System.Reflection.Metadata; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Core.BaseServices; |
| | |
| | | } |
| | | return content; |
| | | } |
| | | |
| | | public object GetLocationLayer() |
| | | { |
| | | List<object> list = new List<object>(); |
| | | var data = Db.Ado.SqlQuery<LocationArea>(@"SELECT areaName,areaCode,roadwayNo,layer from Dt_AreaInfo as t1 |
| | | INNER JOIN |
| | | ( |
| | | select DISTINCT AreaId,RoadwayNo,Layer from Dt_LocationInfo |
| | | ) as t2 |
| | | on t1.Id=t2.AreaId"); |
| | | foreach (var item in data.GroupBy(t => t.areaName)) |
| | | { |
| | | var obj = new |
| | | { |
| | | areaName = item.Key, |
| | | areaCode = item.Max(x => x.areaCode), |
| | | tunnel = item.Select(t => t.roadwayNo).OrderBy(t => t).Distinct().ToList(), |
| | | Layers = item.Select(t => t.layer).OrderBy(t => t).ToList(), |
| | | }; |
| | | list.Add(obj); |
| | | } |
| | | return list; |
| | | } |
| | | public WebResponseContent InitializationLocation(InitializationLocationDTO initializationLocationDTO) |
| | | { |
| | | try |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEA_Common |
| | | { |
| | | public class LocationArea |
| | | { |
| | | /// <summary> |
| | | /// åºåºåç§° |
| | | /// </summary> |
| | | public string areaName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåºç¼å· |
| | | /// </summary> |
| | | public string areaCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å åæº |
| | | /// </summary> |
| | | public string roadwayNo { get; set; } |
| | | /// <summary> |
| | | /// å± |
| | | /// </summary> |
| | | public string layer { get; set; } |
| | | } |
| | | |
| | | } |
| | |
| | | [Navigate(NavigateType.OneToMany, nameof(Dt_StockInfoDetail.StockId), nameof(StockId))] |
| | | public List<Dt_StockInfoDetail> Details { get; set; } |
| | | } |
| | | public class LocationStockView |
| | | { |
| | | public int AreaId { get; set; } |
| | | |
| | | public string LocationCode { get; set; } |
| | | |
| | | public string LocationName { get; set; } |
| | | |
| | | public int Column { get; set; } |
| | | |
| | | public int Row { get; set; } |
| | | |
| | | public int Layer { get; set; } |
| | | |
| | | public int Depth { get; set; } |
| | | |
| | | public int LocationStatus { get; set; } |
| | | |
| | | public int LocationType { get; set; } |
| | | |
| | | public string RoadwayNo { get; set; } |
| | | |
| | | public int EnalbeStatus { get; set; } |
| | | |
| | | public string PalletCode { get; set; } |
| | | |
| | | public int Quantity { get; set; } |
| | | |
| | | public DateTime? InDate { get; set; } |
| | | |
| | | public string MaterielCode { get; set; } |
| | | |
| | | public string MaterielName { get; set; } |
| | | |
| | | public string OrderNo { get; set; } |
| | | |
| | | public string BatchNo { get; set; } |
| | | } |
| | | public class LocationLayer |
| | | { |
| | | public int index { get; set; } |
| | | public List<LocationRow> rows { get; set; } |
| | | } |
| | | public class LocationRow |
| | | { |
| | | public int index { get; set; } |
| | | |
| | | public List<LocationStockView> cols { get; set; } |
| | | } |
| | | } |
| | |
| | | /// <returns></returns> |
| | | WebResponseContent UpdateStatus(List<string> locationCodes,int Statu); |
| | | WebResponseContent GetLocationCodes(); |
| | | object GetLocationLayer(); |
| | | } |
| | | } |
| | |
| | | PageGridData<StockViewDTO> GetPageData(PageDataOptions options); |
| | | |
| | | object GetDetailPage(PageDataOptions pageData); |
| | | WebResponseContent GetLocationStockView(int Layer); |
| | | } |
| | | } |
| | |
| | |  |
| | | using MailKit.Search; |
| | | using Microsoft.AspNetCore.Http; |
| | | using SqlSugar; |
| | | using System; |
| | |
| | | using System.Reflection; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Core.BaseServices; |
| | |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_Core.Utilities; |
| | | using WIDESEA_DTO.Stock; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IStockRepository; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | |
| | | public partial class StockViewService : IStockViewService |
| | | { |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | private readonly IStockRepository _stockRepository; |
| | | private readonly SqlSugarClient _dbBase; |
| | | |
| | | public StockViewService(IUnitOfWorkManage unitOfWorkManage) |
| | | public StockViewService(IUnitOfWorkManage unitOfWorkManage, IStockRepository stockRepository) |
| | | { |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | _dbBase = unitOfWorkManage.GetDbClient(); |
| | | _stockRepository = stockRepository; |
| | | } |
| | | |
| | | public virtual PageGridData<StockViewDTO> GetPageData(PageDataOptions options) |
| | |
| | | |
| | | } |
| | | |
| | | public virtual WebResponseContent GetLocationStockView(int Layer) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | List<LocationStockView> locationStockViews = new List<LocationStockView>(); |
| | | ISugarQueryable<Dt_LocationInfo> sugarQueryable = _dbBase.Queryable<Dt_LocationInfo>(); |
| | | List<Dt_LocationInfo> dt_LocationInfos = sugarQueryable.ToList(); |
| | | |
| | | ISugarQueryable<Dt_StockInfo> sugarQueryable1 = _dbBase.Queryable<Dt_StockInfo>().Where(x => dt_LocationInfos.Select(x => x.LocationCode).ToList().Contains(x.LocationCode)).Includes(x => x.Details); |
| | | List<Dt_StockInfo> StockInfos = sugarQueryable1.OrderBy(x => x.InDate).ToList(); |
| | | foreach (var dt_LocationInfo in dt_LocationInfos) |
| | | { |
| | | LocationStockView locationStockView = new LocationStockView() |
| | | { |
| | | AreaId = dt_LocationInfo.AreaId, |
| | | Column = dt_LocationInfo.Column, |
| | | Depth = dt_LocationInfo.Depth, |
| | | EnalbeStatus = dt_LocationInfo.EnableStatus, |
| | | Layer = dt_LocationInfo.Layer, |
| | | LocationCode = dt_LocationInfo.LocationCode, |
| | | LocationName = dt_LocationInfo.LocationName, |
| | | LocationStatus = dt_LocationInfo.LocationStatus, |
| | | LocationType = dt_LocationInfo.LocationType, |
| | | RoadwayNo = dt_LocationInfo.RoadwayNo, |
| | | Row = dt_LocationInfo.Row |
| | | }; |
| | | List<Dt_StockInfo> dt_StockInfos = StockInfos.Where(x => x.LocationCode == dt_LocationInfo.LocationCode).ToList(); |
| | | if (dt_StockInfos.Count > 0 && dt_StockInfos != null) |
| | | { |
| | | locationStockView.BatchNo = dt_StockInfos.First().Details.First().BatchNo; |
| | | locationStockView.InDate = dt_StockInfos.First().InDate; |
| | | locationStockView.MaterielCode = dt_StockInfos.First().Details.First().MaterielCode; |
| | | locationStockView.MaterielName = dt_StockInfos.First().Details.First().MaterielName; |
| | | locationStockView.OrderNo = dt_StockInfos.First().Details.First().OrderNo; |
| | | locationStockView.PalletCode = string.Join(",", dt_StockInfos.Select(x => x.PalletCode).ToList()); |
| | | locationStockView.Quantity = dt_StockInfos.Count; |
| | | } |
| | | locationStockViews.Add(locationStockView); |
| | | } |
| | | if (locationStockViews.Count > 0) |
| | | { |
| | | #region MyRegion |
| | | List<LocationLayer> layers = new List<LocationLayer>(); |
| | | foreach (var layer in locationStockViews.GroupBy(x => x.Layer)) |
| | | { |
| | | var rows = new List<LocationRow>(); |
| | | var data_rows = layer.GroupBy(t => t.Row); |
| | | foreach (var data_row in data_rows) |
| | | { |
| | | rows.Add(new LocationRow() |
| | | { |
| | | index = data_row.Key, |
| | | cols = data_row.OrderBy(x => x.Column).ToList() |
| | | }); |
| | | } |
| | | //rows=rows.OrderBy(x=>x.index).ToList(); |
| | | layers.Add(new LocationLayer() |
| | | { |
| | | index = layer.Key, |
| | | rows = rows |
| | | }); |
| | | } |
| | | #endregion |
| | | layers = layers.OrderBy(x => x.index).ToList(); |
| | | content.OK(data: layers); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | |
| | | public virtual object GetDetailPage(PageDataOptions pageData) |
| | | { |
| | | Type t = typeof(StockViewDTO); |
| | |
| | | using Magicodes.IE.Core; |
| | | using MailKit.Search; |
| | | using System; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | |
| | | if (stockInfo != null) throw new Exception($"æçã{productionlineDTO.Barcode}ãå·²åå¨åºåä¿¡æ¯"); |
| | | stockInfo = new Dt_StockInfo(); |
| | | stockInfo.Details = new List<Dt_StockInfoDetail>(); |
| | | var OrderNo = productionlineDTO.batchNo.Split('T')[0]; |
| | | Dt_InboundOrder inboundOrder = _inboundService.InbounOrderService.GetInboundOrder(OrderNo); |
| | | if (inboundOrder == null) throw new Exception($"æªæ¾å°å
¥åºåã{OrderNo}ã"); |
| | | Dt_InboundOrderDetail inboundOrderDetail = inboundOrder.Details.FirstOrDefault(x => x.BatchNo == productionlineDTO.batchNo); |
| | | if (inboundOrderDetail == null) throw new Exception($"æªæ¾å°æ¹å·ã{productionlineDTO.batchNo}ãçå
¥åºè¯¦æ
"); |
| | | if (inboundOrderDetail.OrderQuantity - inboundOrderDetail.ReceiptQuantity < 1) throw new Exception($"æ¹å·ã{productionlineDTO.batchNo}ãç»çæ°éè¶
åº"); |
| | | #region MyRegion |
| | | Dt_InboundOrderDetail inboundOrderDetail = _inboundService.InboundOrderDetailService.Repository.QueryFirst(x => x.BatchNo == productionlineDTO.batchNo); |
| | | if (inboundOrderDetail == null) |
| | | throw new Exception($"æªæ¾å°æ¹å·ã{productionlineDTO.batchNo}ãçå
¥åºè¯¦æ
"); |
| | | if (inboundOrderDetail.OrderQuantity - inboundOrderDetail.ReceiptQuantity < 1) |
| | | throw new Exception($"æ¹å·ã{productionlineDTO.batchNo}ãç»çæ°éè¶
åº"); |
| | | Dt_InboundOrder inboundOrder = _inboundService.InbounOrderService.Repository.QueryFirst(x => x.Id == inboundOrderDetail.OrderId); |
| | | if (inboundOrder == null) throw new Exception($"æªæ¾å°æ¹å·ã{productionlineDTO.batchNo}ãçå
¥åºå¤´è¡¨"); |
| | | inboundOrder.Details = new List<Dt_InboundOrderDetail>() { inboundOrderDetail }; |
| | | #endregion |
| | | #region MyRegion |
| | | //var OrderNo = productionlineDTO.batchNo.Split('T')[0]; |
| | | //Dt_InboundOrder inboundOrder = _inboundService.InbounOrderService.GetInboundOrder(OrderNo); |
| | | //if (inboundOrder == null) throw new Exception($"æªæ¾å°å
¥åºåã{OrderNo}ã"); |
| | | //Dt_InboundOrderDetail inboundOrderDetail = inboundOrder.Details.FirstOrDefault(x => x.BatchNo == productionlineDTO.batchNo); |
| | | //if (inboundOrderDetail == null) throw new Exception($"æªæ¾å°æ¹å·ã{productionlineDTO.batchNo}ãçå
¥åºè¯¦æ
"); |
| | | //if (inboundOrderDetail.OrderQuantity - inboundOrderDetail.ReceiptQuantity < 1) throw new Exception($"æ¹å·ã{productionlineDTO.batchNo}ãç»çæ°éè¶
åº"); |
| | | #endregion |
| | | |
| | | Dt_Task dt_Task = new Dt_Task() |
| | | { |
| | |
| | | Creater = "System", |
| | | PalletCode = productionlineDTO.Barcode, |
| | | Roadway = "SC01", |
| | | OrderNo = OrderNo, |
| | | OrderNo = inboundOrder.OrderNo, |
| | | TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)), |
| | | TaskState = InTaskStatusEnum.InNew.ObjToInt(), |
| | | TaskType = TaskTypeEnum.Inbound.ObjToInt(), |
| | |
| | | return Service.GetLocationCodes(); |
| | | } |
| | | |
| | | [HttpGet, Route("GetLocationLayer")] |
| | | public object GetLocationLayer() |
| | | { |
| | | return Service.GetLocationLayer(); |
| | | } |
| | | |
| | | [HttpPost, Route("UpdateEnableStatus")] |
| | | public WebResponseContent UpdateEnableStatus([FromBody] SaveModel saveModel) |
| | |
| | | public class StockViewController : Controller |
| | | { |
| | | private readonly IStockViewService _stockViewService; |
| | | public StockViewController(IStockViewService stockViewService) |
| | | public StockViewController(IStockViewService stockViewService) |
| | | { |
| | | _stockViewService = stockViewService; |
| | | } |
| | |
| | | { |
| | | return _stockViewService.GetDetailPage(pageData); |
| | | } |
| | | |
| | | [HttpPost, Route("GetLocationStockView")] |
| | | public WebResponseContent GetLocationStockView(int Layer) |
| | | { |
| | | return _stockViewService.GetLocationStockView(Layer); |
| | | } |
| | | } |
| | | } |
| | |
| | | at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() |
| | | --- End of stack trace from previous location --- |
| | | at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) |
| | | -------------------------------- |
| | | 2025/3/24 11:19:09| |
| | | åå 'layer' æ æã |
| | | ãèªå®ä¹é误ãï¼åå 'layer' æ æã |
| | | ãå¼å¸¸ç±»åãï¼SqlException |
| | | ãå¼å¸¸ä¿¡æ¯ãï¼åå 'layer' æ æã |
| | | ãå æ è°ç¨ãï¼ at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) |
| | | at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) |
| | | at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) |
| | | at Microsoft.Data.SqlClient.SqlDataReader.TryConsumeMetaData() |
| | | at Microsoft.Data.SqlClient.SqlDataReader.get_MetaData() |
| | | at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) |
| | | at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean isAsync, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) |
| | | at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String method) |
| | | at Microsoft.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) |
| | | at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) |
| | | at SqlSugar.AdoProvider.GetDataReader(String sql, SugarParameter[] parameters) |
| | | at SqlSugar.AdoProvider.SqlQuery[T,T2,T3,T4,T5,T6,T7](String sql, Object parameters) |
| | | at SqlSugar.AdoProvider.SqlQuery[T](String sql, SugarParameter[] parameters) |
| | | at SqlSugar.AdoProvider.SqlQuery[T](String sql, Object parameters) |
| | | at WIDESEA_BasicService.LocationInfoService.GetLocationLayer() in E:\项ç®é\ChuanSuoCheKu\项ç®ä»£ç \WMS\WIDESEA_WMSServer\WIDESEA_BasicService\Base\LocationInfoService.cs:line 126 |
| | | at Castle.Proxies.Invocations.ILocationInfoService_GetLocationLayer.InvokeMethodOnTarget() |
| | | at Castle.DynamicProxy.AbstractInvocation.Proceed() |
| | | at Castle.Proxies.IService`1Proxy_1.GetLocationLayer() |
| | | at WIDESEA_WMSServer.Controllers.Basic.LocationInfoController.GetLocationLayer() in E:\项ç®é\ChuanSuoCheKu\项ç®ä»£ç \WMS\WIDESEA_WMSServer\WIDESEA_WMSServer\Controllers\Basic\LocationInfoController.cs:line 52 |
| | | at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) |
| | | at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker) |
| | | at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) |
| | | at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) |
| | | at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) |
| | | at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() |
| | | --- End of stack trace from previous location --- |
| | | at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) |
| | |
| | | <Project> |
| | | <PropertyGroup> |
| | | <_PublishTargetUrl>E:\IISText\èæ¹ä¸ä¸\WMS</_PublishTargetUrl> |
| | | <History>True|2025-03-18T08:14:40.3832855Z;True|2025-02-18T14:43:41.4214052+08:00;True|2025-02-17T16:47:47.1464719+08:00;True|2025-02-14T13:02:33.0683296+08:00;True|2025-02-11T13:55:27.2837544+08:00;True|2025-02-11T13:54:12.7390669+08:00;True|2025-02-10T16:40:04.5645895+08:00;True|2025-02-10T16:24:19.3540916+08:00;True|2025-02-10T14:24:04.2140946+08:00;True|2025-02-10T14:01:37.7817950+08:00;True|2025-02-10T13:58:35.5650499+08:00;True|2025-02-10T13:49:31.5513866+08:00;False|2025-02-10T13:49:18.2135044+08:00;True|2025-02-10T11:32:33.6168149+08:00;False|2025-02-10T11:31:56.1964136+08:00;False|2025-02-10T11:31:03.0326897+08:00;True|2025-02-10T11:25:27.6553142+08:00;True|2025-01-18T15:10:06.4957375+08:00;False|2025-01-18T15:09:32.6588841+08:00;True|2025-01-18T15:07:28.0952526+08:00;True|2025-01-18T15:05:38.5243008+08:00;True|2025-01-18T15:03:32.1684791+08:00;True|2025-01-18T15:00:14.2579995+08:00;False|2025-01-18T14:59:17.3888861+08:00;False|2025-01-18T14:57:59.9512472+08:00;True|2025-01-18T13:57:17.7790615+08:00;True|2025-01-18T12:53:22.4660853+08:00;True|2025-01-17T17:26:35.1781925+08:00;True|2025-01-17T16:54:55.6218094+08:00;</History> |
| | | <History>True|2025-03-27T08:24:43.5017432Z;True|2025-03-18T16:14:40.3832855+08:00;True|2025-02-18T14:43:41.4214052+08:00;True|2025-02-17T16:47:47.1464719+08:00;True|2025-02-14T13:02:33.0683296+08:00;True|2025-02-11T13:55:27.2837544+08:00;True|2025-02-11T13:54:12.7390669+08:00;True|2025-02-10T16:40:04.5645895+08:00;True|2025-02-10T16:24:19.3540916+08:00;True|2025-02-10T14:24:04.2140946+08:00;True|2025-02-10T14:01:37.7817950+08:00;True|2025-02-10T13:58:35.5650499+08:00;True|2025-02-10T13:49:31.5513866+08:00;False|2025-02-10T13:49:18.2135044+08:00;True|2025-02-10T11:32:33.6168149+08:00;False|2025-02-10T11:31:56.1964136+08:00;False|2025-02-10T11:31:03.0326897+08:00;True|2025-02-10T11:25:27.6553142+08:00;True|2025-01-18T15:10:06.4957375+08:00;False|2025-01-18T15:09:32.6588841+08:00;True|2025-01-18T15:07:28.0952526+08:00;True|2025-01-18T15:05:38.5243008+08:00;True|2025-01-18T15:03:32.1684791+08:00;True|2025-01-18T15:00:14.2579995+08:00;False|2025-01-18T14:59:17.3888861+08:00;False|2025-01-18T14:57:59.9512472+08:00;True|2025-01-18T13:57:17.7790615+08:00;True|2025-01-18T12:53:22.4660853+08:00;True|2025-01-17T17:26:35.1781925+08:00;True|2025-01-17T16:54:55.6218094+08:00;</History> |
| | | <LastFailureDetails /> |
| | | </PropertyGroup> |
| | | </Project> |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/stash/OutTaskFinish", |
| | | "style": { |
| | | "navigationBarTitleText": "åºåºå®æ", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/stash/pickingMat", |
| | | "style": { |
| | | "navigationBarTitleText": "æ£é", |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <view class="itemstyle"> |
| | | <uni-forms label-width="180"> |
| | | <uni-forms-item label="å¹³åºæ¡ç :"> |
| | | <uni-easyinput type="text" placeholder="è¯·æ«æå¹³åºæ¡ç " ref='midInput' :focus="!focus" v-model="barcode" |
| | | @input="barcodeInput" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item> |
| | | <button @click="OutTaskFinish" type="primary" size="default" style="margin-top: 2%;">åºåºç¡®è®¤</button> |
| | | </uni-forms-item> |
| | | </uni-forms> |
| | | </view> |
| | | <u-toast ref="uToast" /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | const innerAudioContext = uni.createInnerAudioContext(); |
| | | export default { |
| | | data() { |
| | | return { |
| | | focus: false, |
| | | barcode: "", |
| | | address: "", |
| | | WarehouseId: "" |
| | | } |
| | | }, |
| | | onShow() {}, |
| | | onLoad(res) { |
| | | this.WarehouseId = res.warehouseId; |
| | | this.focus = false; |
| | | if (res.warehouseId == 5) { |
| | | this.address = "8005"; |
| | | } |
| | | }, |
| | | methods: { |
| | | voiceSpeech(src) { |
| | | innerAudioContext.src = src; // '../../static/success.mp3'; |
| | | innerAudioContext.play(); |
| | | }, |
| | | barcodeInput() { |
| | | this.$nextTick(function(x) { |
| | | if (this.barcode.length > 0) { |
| | | this.focus = true; |
| | | } |
| | | }) |
| | | }, |
| | | OutTaskFinish() { |
| | | if (this.barcode == "") { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«æå¹³åºæ¡ç ", |
| | | type: 'error' |
| | | }) |
| | | return; |
| | | } |
| | | this.$u.post('http://127.0.0.1:9291/api/Task/OutTaskFinish?Address=' + this.barcode).then( |
| | | res => { |
| | | if (res.status) { |
| | | this.$refs.uToast.show({ |
| | | title: "åºåºæå", |
| | | type: "success" |
| | | }) |
| | | this.barcode = ""; |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import '@/common/uni-ui.scss'; |
| | | |
| | | .content { |
| | | display: flex; |
| | | height: 150px; |
| | | } |
| | | |
| | | .content-text { |
| | | font-size: 14px; |
| | | color: #666; |
| | | } |
| | | |
| | | .itemstyle { |
| | | margin-top: 30px; |
| | | margin-left: 5%; |
| | | } |
| | | |
| | | .headerstyle { |
| | | width: 90%; |
| | | } |
| | | </style> |
| | |
| | | return this.datas.find(x => x.text == text); |
| | | }, |
| | | clickCoupon(url) { |
| | | var _this=this; |
| | | var _this = this; |
| | | if (url == "åºç©ºæ") { |
| | | uni.showModal({ |
| | | title: 'æç¤ºï¼', |
| | |
| | | if (res.confirm) { |
| | | _this.PdaOutEmpty() |
| | | //console.log('确认') |
| | | } else if (res.cancel) |
| | | { |
| | | } else if (res.cancel) { |
| | | // console.log('åæ¶') |
| | | } |
| | | } |
| | | }) |
| | | } else if (url == "å
¥åºæ¾è´§å®æ") { |
| | | uni.showModal({ |
| | | title: 'æç¤ºï¼', |
| | | content: 'æ¯å¦ç¡®å®æ¾è´§å®æï¼', |
| | | success: function(res) { |
| | | if (res.confirm) { |
| | | _this.ReleaseCompleted() |
| | | //console.log('确认') |
| | | } else if (res.cancel) { |
| | | // console.log('åæ¶') |
| | | } |
| | | } |
| | |
| | | }); |
| | | } |
| | | }, |
| | | PdaOutEmpty(){ |
| | | PdaOutEmpty() { |
| | | this.$u.post('/api/PDA/OutEmpty').then( |
| | | res => { |
| | | if (res.status) { |
| | |
| | | } |
| | | }) |
| | | }, |
| | | ReleaseCompleted() { |
| | | this.$u.post('http://127.0.0.1:9291/api/AGV/ReleaseCompleted').then( |
| | | res => { |
| | | if (res.status) { |
| | | this.$refs.uToast.show({ |
| | | title: "æ¾è´§å®ææå", |
| | | type: "success" |
| | | }) |
| | | this.qty = ""; |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | lock() { |
| | | console.log("lock") |
| | | if (this.hasLogin()) { |