已修改38个文件
已添加2个文件
已重命名1个文件
| | |
| | | path: '/task', |
| | | name: 'task', |
| | | component: () => import('@/views/taskinfo/task.vue') |
| | | }, { |
| | | }, { |
| | | path: '/task_Hty', |
| | | name: 'task_Hty', |
| | | component: () => import('@/views/taskinfo/task_Hty.vue') |
| | | },{ |
| | | path: '/router', |
| | | name: 'router', |
| | | component: () => import('@/views/basicinfo/router.vue') |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | <template> |
| | | <view-grid |
| | | ref="grid" |
| | | :columns="columns" |
| | | :detail="detail" |
| | | :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :searchFormFields="searchFormFields" |
| | | :searchFormOptions="searchFormOptions" |
| | | :table="table" |
| | | :extend="extend" |
| | | > |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/taskinfo/task_Hty.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: "taskId", |
| | | footer: "Foots", |
| | | cnName: "ä»»å¡ä¿¡æ¯", |
| | | name: "task_Hty", |
| | | url: "/Task_Hty/", |
| | | sortName: "CreateDate", |
| | | }); |
| | | const editFormFields = ref({}); |
| | | const editFormOptions = ref([]); |
| | | const searchFormFields = ref({ |
| | | taskNum: "", |
| | | palletCode: "", |
| | | roadway: "", |
| | | sourceAddress: "", |
| | | targetAddress: "", |
| | | currentAddress: "", |
| | | nextAddress: "", |
| | | creater: "", |
| | | createDate: "", |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "ä»»å¡å·", field: "taskNum", type: "int" }, |
| | | { title: "æçç¼å·", field: "palletCode", type: "like" }, |
| | | { |
| | | title: "ä»»å¡ç±»å", |
| | | field: "taskType", |
| | | type: "selectList", |
| | | dataKey: "taskType", |
| | | data: [], |
| | | }, |
| | | { |
| | | title: "ä»»å¡ç¶æ", |
| | | field: "taskState", |
| | | type: "selectList", |
| | | dataKey: "taskState", |
| | | data: [], |
| | | }, |
| | | ], |
| | | [ |
| | | { title: "èµ·å§å°å", field: "sourceAddress", type: "like" }, |
| | | { title: "ç®æ å°å", field: "targetAddress", type: "like" }, |
| | | { title: "å½åä½ç½®", field: "currentAddress", type: "like" }, |
| | | { title: "ä¸ä¸ä½ç½®", field: "nextAddress", type: "like" }, |
| | | ], |
| | | [ |
| | | { title: "å··éå·", field: "roadway", type: "like" }, |
| | | { title: "å建人", field: "creater", type: "like" }, |
| | | { title: "å建æ¶é´", field: "createDate", type: "datetime" }, |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | | { |
| | | field: "taskId", |
| | | title: "TaskId", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | readonly: true, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "taskNum", |
| | | title: "ä»»å¡å·", |
| | | type: "int", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "palletCode", |
| | | title: "æçç¼å·", |
| | | type: "string", |
| | | width: 200, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "roadway", |
| | | title: "å··éå·", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "taskType", |
| | | title: "ä»»å¡ç±»å", |
| | | type: "int", |
| | | width: 90, |
| | | align: "left", |
| | | bind: { key: "taskType", data: [] }, |
| | | }, |
| | | { |
| | | field: "taskState", |
| | | title: "ä»»å¡ç¶æ", |
| | | type: "int", |
| | | width: 150, |
| | | align: "left", |
| | | bind: { key: "taskState", data: [] }, |
| | | }, |
| | | { |
| | | field: "sourceAddress", |
| | | title: "èµ·å§å°å", |
| | | type: "int", |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "targetAddress", |
| | | title: "ç®æ å°å", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "currentAddress", |
| | | title: "å½åä½ç½®", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "nextAddress", |
| | | title: "ä¸ä¸ä½ç½®", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "exceptionMessage", |
| | | title: "å¼å¸¸ä¿¡æ¯", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | hidden: true, |
| | | }, |
| | | { |
| | | field: "grade", |
| | | title: "ä¼å
级", |
| | | type: "int", |
| | | width: 80, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "dispatchertime", |
| | | title: "ä»»å¡ä¸åæ¶é´", |
| | | type: "datetime", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "wMSId", |
| | | title: "WMSä»»å¡ä¸»é®", |
| | | type: "int", |
| | | width: 120, |
| | | align: "left", |
| | | hidden: true, |
| | | }, |
| | | { |
| | | field: "creater", |
| | | title: "å建人", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "createDate", |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifier", |
| | | title: "ä¿®æ¹äºº", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifyDate", |
| | | title: "ä¿®æ¹æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | hidden: true, |
| | | }, |
| | | ]); |
| | | const detail = ref({ |
| | | cnName: "", |
| | | table: "", |
| | | columns: [], |
| | | sortName: "", |
| | | key: "", |
| | | }); |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | |
| | |
| | | /// 常温补空æçè³å容 |
| | | /// </summary> |
| | | public const string GetFROutTrayToCW = "GetFROutTrayToCW"; |
| | | |
| | | |
| | | /// <summary> |
| | | /// 常温3 åºåºè³å
è£
|
| | | /// </summary> |
| | | public const string RequestOutTaskToBZ = "RequestOutTaskToBZ"; |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | /// <returns></returns> |
| | | Task<WebResponseContent> RequestWMSTask(string palletCode, string sourceAddress); |
| | | |
| | | /// <summary> |
| | | /// 请æ±åºåºè³å
è£
|
| | | /// </summary> |
| | | /// <param name="stationManager"></param> |
| | | /// <returns></returns> |
| | | Task<WebResponseContent> RequestOutTaskToBZAsync(Dt_StationManager stationManager); |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®æçå·ãèµ·å§å°ååWMS请æ±ä»»å¡ |
| | |
| | | if (!content.Status) |
| | | { |
| | | // wms失败è¿åå»NGå£ä»»å¡ |
| | | |
| | | |
| | | //if (stationManager.stationChildCode != stationManager.stationNGChildCode) |
| | | //{ |
| | | // WMSTaskDTO taskDTO = new WMSTaskDTO() |
| | | // { |
| | | // Grade = 8, |
| | | // PalletCode = palletCode, |
| | | // SourceAddress = stationManager.stationLocation, |
| | | // TargetAddress = stationManager.stationNGLocation, |
| | | // RoadWay = stationManager.Roadway, |
| | | // TaskNum = 1000, |
| | | // TaskState = (int)TaskOutStatusEnum.OutNew, |
| | | // TaskType = (int)TaskOutboundTypeEnum.InToOut |
| | | // }; |
| | | //} |
| | | return content; |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | public async Task<WebResponseContent> RequestOutTaskToBZAsync(Dt_StationManager stationManager) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | var config = _sys_ConfigService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress); |
| | | var wmsBase = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.WMSIP_BASE)?.ConfigValue; |
| | | var requestTask = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.RequestOutTaskToBZ)?.ConfigValue; |
| | | if (wmsBase == null || requestTask == null) |
| | | { |
| | | throw new InvalidOperationException("WMS IP æªé
ç½®"); |
| | | } |
| | | var wmsIpAddrss = wmsBase + requestTask; |
| | | |
| | | var result = await HttpHelper.PostAsync(wmsIpAddrss, new { }.ToJsonString()); |
| | | content = JsonConvert.DeserializeObject<WebResponseContent>(result); |
| | | if (!content.Status) |
| | | { |
| | | //æ æ»¡è¶³æ¡ä»¶å¯åºåºè³å
è£
çåºå |
| | | return content; |
| | | } |
| | | |
| | | var task = JsonConvert.DeserializeObject<WMSTaskDTO>(content.Data.ToString()); |
| | | ConsoleHelper.WriteSuccessLine(content.Data.ToString()); |
| | | content = ReceiveByWMSTask(task); |
| | | //if (content.Status) |
| | | //{ |
| | | // //ç¸åºçå¨éæ°æ®+1 |
| | | // // _taskNeedBarcodeRepository.UpdateData(); |
| | | //} |
| | | return content; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | return content.Error(ex.Message); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¥æ¶WMSä»»å¡ä¿¡æ¯ |
| | | /// </summary> |
| | |
| | | private readonly IDt_StationManagerRepository _stationManagerRepository; |
| | | private readonly IRouterRepository _routerRepository; |
| | | private readonly ITask_HtyRepository _taskHtyRepository; |
| | | private readonly IDt_needBarcodeRepository _taskNeedBarcodeRepository; |
| | | |
| | | private Dictionary<string, OrderByType> _taskOrderBy = new() |
| | | { |
| | |
| | | |
| | | public List<int> TaskOutboundTypes => typeof(TaskOutboundTypeEnum).GetEnumIndexList(); |
| | | |
| | | public TaskService(ITaskRepository BaseDal, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, ITaskExecuteDetailRepository taskExecuteDetailRepository, IMapper mapper, ISys_ConfigService sys_ConfigService, IDt_StationManagerService stationManagerService, IDt_StationManagerRepository stationManagerRepository, IRouterRepository routerRepository, ITask_HtyRepository htyRepository) : base(BaseDal) |
| | | public TaskService(ITaskRepository BaseDal, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, ITaskExecuteDetailRepository taskExecuteDetailRepository, IMapper mapper, ISys_ConfigService sys_ConfigService, IDt_StationManagerService stationManagerService, IDt_StationManagerRepository stationManagerRepository, IRouterRepository routerRepository, ITask_HtyRepository htyRepository, IDt_needBarcodeRepository taskNeedBarcodeRepository) : base(BaseDal) |
| | | { |
| | | _routerService = routerService; |
| | | _taskExecuteDetailService = taskExecuteDetailService; |
| | |
| | | _stationManagerRepository = stationManagerRepository; |
| | | _routerRepository = routerRepository; |
| | | _taskHtyRepository = htyRepository; |
| | | _taskNeedBarcodeRepository = taskNeedBarcodeRepository; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | public void RequestInbound(CommonConveyorLine_After conveyorLine, ConveyorLineTaskCommand_After command, Dt_StationManager stationInfo) |
| | | { |
| | | ConsoleHelper.WriteSuccessLine($"ã{conveyorLine.DeviceName}ã,æçå·ï¼ã{command.ConveyorLineBarcode}ã,ç«å°ï¼ã{stationInfo.remark}ã请æ±ä»»å¡"); |
| | | |
| | | //if() |
| | | |
| | | var taskNew = _taskService.QueryTaskByPalletCode(command.ConveyorLineBarcode, stationInfo.Roadway); |
| | | if (taskNew == null) |
| | | { |
| | |
| | | //ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true); |
| | | } |
| | | } |
| | | else //妿任å¡è¯·æ±å¤±è´¥ |
| | | { |
| | | //å¦æè¯·æ±ä½ç½®ä¸NGä½ç½®ä¸ç´ ååå½åä½ç½®è®©çº¿ä½éå |
| | | if (stationInfo.stationChildCode == stationInfo.stationNGChildCode) |
| | | { |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, stationInfo.stationChildCode); |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, stationInfo.stationChildCode, stationInfo.stationChildCode); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Console.Out.WriteLine(nameof(CommonConveyorLine_AfterJob) + ":" + ex.ToString()); |
| | | Console.Out.WriteLine(nameof(CommonConveyorLine_GWJob) + ":" + ex.ToString()); |
| | | } |
| | | finally |
| | | { |
| | |
| | | onClick: function () { |
| | | this.printClick() |
| | | } |
| | | },{ |
| | | name: 'ä»»å¡å®æ', |
| | | // icon: 'el-icon-printer', |
| | | type: 'primary', |
| | | // plain: true, |
| | | color: '#529b2e', |
| | | value: 'TaskHandComplete', |
| | | onClick: function () { |
| | | |
| | | } |
| | | },{ |
| | | name: 'ç´æ¥åºåº', |
| | | // icon: 'el-icon-printer', |
| | | type: 'primary', |
| | | // plain: true, |
| | | color: '#529b2e', |
| | | value: 'OutBound', |
| | | onClick: function () { |
| | | |
| | | } |
| | | } |
| | | ] |
| | | |
| | |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row) //åå»è¡æ¶éä¸å½åè¡; |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row) //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row) //åå»è¡æ¶éä¸å½åè¡; |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row) //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | //æ¡æ¶åå§åé
ç½®åï¼ |
| | | //示ä¾ï¼å¨æé®çæå颿·»å ä¸ä¸ªæé® |
| | | this.buttons.unshift({ |
| | | //ä¹å¯ä»¥ç¨pushæè
spliceæ¹æ³æ¥ä¿®æ¹buttonsæ°ç» |
| | | name: 'ç´æ¥åºåº', //æé®åç§° |
| | | icon: 'el-icon-document', //æé®å¾æ vue2çæ¬è§iviewææ¡£iconï¼vue3çæ¬è§element uiææ¡£icon(注æä¸æ¯element pulsææ¡£) |
| | | type: 'primary', //æé®æ ·å¼vue2çæ¬è§iviewææ¡£buttonï¼vue3çæ¬è§element uiææ¡£button |
| | | onClick: function () { |
| | | let OutBoundBtn=this.buttons.find(x=>x.value=='OutBound'); |
| | | if(OutBoundBtn){ |
| | | OutBoundBtn.onClick=function(){ |
| | | this.$Message.success('ç¹å»äºæé®') |
| | | let row = this.$refs.table.getSelected() //è·åéä¸çè¡ |
| | | if (row <= 0) { |
| | |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | //示ä¾ï¼å¨æé®çæå颿·»å ä¸ä¸ªæé® |
| | | // this.buttons.unshift({ |
| | | // //ä¹å¯ä»¥ç¨pushæè
spliceæ¹æ³æ¥ä¿®æ¹buttonsæ°ç» |
| | | // name: 'ç´æ¥åºåº', //æé®åç§° |
| | | // icon: 'el-icon-document', //æé®å¾æ vue2çæ¬è§iviewææ¡£iconï¼vue3çæ¬è§element uiææ¡£icon(注æä¸æ¯element pulsææ¡£) |
| | | // type: 'primary', //æé®æ ·å¼vue2çæ¬è§iviewææ¡£buttonï¼vue3çæ¬è§element uiææ¡£button |
| | | // onClick: function () { |
| | | // this.$Message.success('ç¹å»äºæé®') |
| | | // let row = this.$refs.table.getSelected() //è·åéä¸çè¡ |
| | | // if (row <= 0) { |
| | | // //å¦ææ²¡æéä¸è¡ |
| | | // this.$Message.error('è¯·éæ©ä¸è¡æ°æ®') |
| | | // return |
| | | // } |
| | | // let locationCode = row[0].locationCode |
| | | // let palletCode = row[0].palletCode |
| | | // this.http.get(`/api/Task/CreateAndSendOutboundTask?locationCode=${locationCode}&palletCode=${palletCode}`, {}, "æ£å¨å建任å¡").then((res) => { |
| | | // //示ä¾ï¼è°ç¨åå°æ¥å£ |
| | | // if (res.status) { |
| | | // this.$Message.success('åå»ºä»»å¡æå') |
| | | // } else { |
| | | // this.$Message.error(res.message) //é误æç¤º |
| | | // } |
| | | // }) |
| | | // } |
| | | // }) |
| | | |
| | | //示ä¾ï¼è®¾ç½®ä¿®æ¹æ°å»ºãç¼è¾å¼¹åºæ¡å段æ ç¾çé¿åº¦ |
| | | this.boxOptions.labelWidth = 150 |
| | |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row) //åå»è¡æ¶éä¸å½åè¡; |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row) //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | //æ¡æ¶åå§åé
ç½®åï¼ |
| | | //示ä¾ï¼å¨æé®çæå颿·»å ä¸ä¸ªæé® |
| | | this.buttons.unshift({ |
| | | //ä¹å¯ä»¥ç¨pushæè
spliceæ¹æ³æ¥ä¿®æ¹buttonsæ°ç» |
| | | name: 'ä»»å¡å®æ', //æé®åç§° |
| | | icon: 'el-icon-document', //æé®å¾æ vue2çæ¬è§iviewææ¡£iconï¼vue3çæ¬è§element uiææ¡£icon(注æä¸æ¯element pulsææ¡£) |
| | | type: 'primary', //æé®æ ·å¼vue2çæ¬è§iviewææ¡£buttonï¼vue3çæ¬è§element uiææ¡£button |
| | | onClick: function () { |
| | | // this.$Message.success('ç¹å»äºæé®'); |
| | | let TaskHandCompleteBtn=this.buttons.find(x=>x.value=='TaskHandComplete'); |
| | | if(TaskHandCompleteBtn){ |
| | | TaskHandCompleteBtn.onClick=function(){ |
| | | let row = this.$refs.table.getSelected() //è·åéä¸çè¡ |
| | | if (row <= 0) { |
| | | //å¦ææ²¡æéä¸è¡ |
| | | this.$Message.error('è¯·éæ©ä¸è¡æ°æ®') |
| | | return |
| | | } |
| | | debugger; |
| | | let taskNum = row[0].taskNum |
| | | this.http.get(`/api/Task/CompleteTaskAsync?taskNum=${taskNum}`, {}, "æ£å¨å®æä»»å¡").then((res) => { |
| | | //示ä¾ï¼è°ç¨åå°æ¥å£ |
| | | if (res.data.code === 200) { |
| | | if (res.status) { |
| | | this.$Message.success('ä»»å¡å®æ') |
| | | } else { |
| | | this.$Message.error(res.message) //é误æç¤º |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | //示ä¾ï¼å¨æé®çæå颿·»å ä¸ä¸ªæé® |
| | | // this.buttons.unshift({ |
| | | // //ä¹å¯ä»¥ç¨pushæè
spliceæ¹æ³æ¥ä¿®æ¹buttonsæ°ç» |
| | | // name: 'ä»»å¡å®æ', //æé®åç§° |
| | | // icon: 'el-icon-document', //æé®å¾æ vue2çæ¬è§iviewææ¡£iconï¼vue3çæ¬è§element uiææ¡£icon(注æä¸æ¯element pulsææ¡£) |
| | | // type: 'primary', //æé®æ ·å¼vue2çæ¬è§iviewææ¡£buttonï¼vue3çæ¬è§element uiææ¡£button |
| | | // onClick: function () { |
| | | // // this.$Message.success('ç¹å»äºæé®'); |
| | | // let row = this.$refs.table.getSelected() //è·åéä¸çè¡ |
| | | // if (row <= 0) { |
| | | // //å¦ææ²¡æéä¸è¡ |
| | | // this.$Message.error('è¯·éæ©ä¸è¡æ°æ®') |
| | | // return |
| | | // } |
| | | // let taskNum = row[0].taskNum |
| | | // this.http.get(`/api/Task/CompleteTaskAsync?taskNum=${taskNum}`, {}, "æ£å¨å®æä»»å¡").then((res) => { |
| | | // //示ä¾ï¼è°ç¨åå°æ¥å£ |
| | | // if (res.status) { |
| | | // this.$Message.success('ä»»å¡å®æ') |
| | | // } else { |
| | | // this.$Message.error(res.message) //é误æç¤º |
| | | // } |
| | | // }) |
| | | // } |
| | | // }) |
| | | |
| | | //示ä¾ï¼è®¾ç½®ä¿®æ¹æ°å»ºãç¼è¾å¼¹åºæ¡å段æ ç¾çé¿åº¦ |
| | | this.boxOptions.labelWidth = 150 |
| | |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row) //åå»è¡æ¶éä¸å½åè¡; |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row) //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row) //åå»è¡æ¶éä¸å½åè¡; |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row) //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /***************************************************************************************** |
| | | ** Author:jxx 2022 |
| | | ** QQ:283591387 |
| | | **宿´ææ¡£è§ï¼http://v2.volcore.xyz/document/api ã代ç çæé¡µé¢ViewGridã |
| | | **常ç¨ç¤ºä¾è§ï¼http://v2.volcore.xyz/document/vueDev |
| | | **åå°æä½è§ï¼http://v2.volcore.xyz/document/netCoreDev |
| | | *****************************************************************************************/ |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | import gridHeader from './demo_Product/Dt_TaskExecuteDetail.vue' |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: gridHeader, |
| | | gridBody: '', |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | //æ¡æ¶åå§åé
ç½®åï¼ |
| | | // let TaskHandCompleteBtn=this.buttons.find(x=>x.value=='TaskHandComplete'); |
| | | // if(TaskHandCompleteBtn){ |
| | | // TaskHandCompleteBtn.onClick=function(){ |
| | | // let row = this.$refs.table.getSelected() //è·åéä¸çè¡ |
| | | // if (row <= 0) { |
| | | // //å¦ææ²¡æéä¸è¡ |
| | | // this.$Message.error('è¯·éæ©ä¸è¡æ°æ®') |
| | | // return |
| | | // } |
| | | // let taskNum = row[0].taskNum |
| | | // this.http.get(`/api/Task/CompleteTaskAsync?taskNum=${taskNum}`, {}, "æ£å¨å®æä»»å¡").then((res) => { |
| | | // //示ä¾ï¼è°ç¨åå°æ¥å£ |
| | | // if (res.status) { |
| | | // this.$Message.success('ä»»å¡å®æ') |
| | | // } else { |
| | | // this.$Message.error(res.message) //é误æç¤º |
| | | // } |
| | | // }) |
| | | // } |
| | | // } |
| | | //示ä¾ï¼å¨æé®çæå颿·»å ä¸ä¸ªæé® |
| | | // this.buttons.unshift({ |
| | | // //ä¹å¯ä»¥ç¨pushæè
spliceæ¹æ³æ¥ä¿®æ¹buttonsæ°ç» |
| | | // name: 'ä»»å¡å®æ', //æé®åç§° |
| | | // icon: 'el-icon-document', //æé®å¾æ vue2çæ¬è§iviewææ¡£iconï¼vue3çæ¬è§element uiææ¡£icon(注æä¸æ¯element pulsææ¡£) |
| | | // type: 'primary', //æé®æ ·å¼vue2çæ¬è§iviewææ¡£buttonï¼vue3çæ¬è§element uiææ¡£button |
| | | // onClick: function () { |
| | | // // this.$Message.success('ç¹å»äºæé®'); |
| | | // let row = this.$refs.table.getSelected() //è·åéä¸çè¡ |
| | | // if (row <= 0) { |
| | | // //å¦ææ²¡æéä¸è¡ |
| | | // this.$Message.error('è¯·éæ©ä¸è¡æ°æ®') |
| | | // return |
| | | // } |
| | | // let taskNum = row[0].taskNum |
| | | // this.http.get(`/api/Task/CompleteTaskAsync?taskNum=${taskNum}`, {}, "æ£å¨å®æä»»å¡").then((res) => { |
| | | // //示ä¾ï¼è°ç¨åå°æ¥å£ |
| | | // if (res.status) { |
| | | // this.$Message.success('ä»»å¡å®æ') |
| | | // } else { |
| | | // this.$Message.error(res.message) //é误æç¤º |
| | | // } |
| | | // }) |
| | | // } |
| | | // }) |
| | | |
| | | //示ä¾ï¼è®¾ç½®ä¿®æ¹æ°å»ºãç¼è¾å¼¹åºæ¡å段æ ç¾çé¿åº¦ |
| | | this.boxOptions.labelWidth = 150 |
| | | |
| | | //æ¾ç¤ºæç¤º |
| | | this.columns.forEach((col) => { |
| | | col.showOverflowTooltip = true |
| | | }) |
| | | |
| | | //示ä¾ï¼èªå®ä¹è¡¨æ ¼å |
| | | //è¡¨æ ¼ä¸æ·»å èªå®ä¹æé® |
| | | this.columns.push({ |
| | | title: 'æä½', |
| | | field: 'æä½', |
| | | width: 150, |
| | | align: 'left', // 'center', |
| | | render: (h, { row, column, index }) => { |
| | | return ( |
| | | <div> |
| | | <el-button |
| | | onClick={($e) => { |
| | | // this.$refs.table.load(); |
| | | // console.log(this.$refs.table); |
| | | this.$refs.gridHeader.openModel1(row) |
| | | }} |
| | | type="primary" |
| | | plain |
| | | style="height:26px; padding: 10px !important;" |
| | | > |
| | | æ¥çæ§è¡ä¿¡æ¯ |
| | | </el-button> |
| | | </div> |
| | | ) |
| | | } |
| | | }) |
| | | }, |
| | | btn1Click(row, column, index, $e) { |
| | | $e.stopPropagation() |
| | | this.$refs.gridHeader.openModel1(row) |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | | //妿è¦é
ç½®æç»è¡¨,卿¤æ¹æ³æä½ |
| | | //this.detailOptions.columns.forEach(column=>{ }); |
| | | }, |
| | | searchBefore(param) { |
| | | //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° |
| | | //è¿åfalseï¼åä¸ä¼æ§è¡æ¥è¯¢ |
| | | return true |
| | | }, |
| | | searchAfter(result) { |
| | | //æ¥è¯¢åï¼resultè¿åçæ¥è¯¢æ°æ®,å¯ä»¥å¨æ¾ç¤ºå°è¡¨æ ¼åå¤çè¡¨æ ¼çå¼ |
| | | return true |
| | | }, |
| | | addBefore(formData) { |
| | | //æ°å»ºä¿ååformData为对象ï¼å
æ¬æç»è¡¨ï¼å¯ä»¥ç»ç»è¡¨å设置å¼ï¼èªå·±è¾åºçformDataçå¼ |
| | | return true |
| | | }, |
| | | updateBefore(formData) { |
| | | //ç¼è¾ä¿ååformData为对象ï¼å
æ¬æç»è¡¨ãå é¤è¡çId |
| | | return true |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row) //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | | //(1)夿æ¯ç¼è¾è¿æ¯æ°å»ºæä½ï¼ this.currentAction=='Add'; |
| | | //(2)ç»å¼¹åºæ¡è®¾ç½®é»è®¤å¼ |
| | | //(3)this.editFormFields.åæ®µ='xxx'; |
| | | //妿éè¦ç»ä¸ææ¡è®¾ç½®é»è®¤å¼ï¼è¯·éåthis.editFormOptionsæ¾å°å段é
置对åºdata屿§çkeyå¼ |
| | | //ç䏿就æè¾åºçï¼console.log(this.editFormOptions) |
| | | } |
| | | } |
| | | } |
| | | export default extension |
| | |
| | | meta: { |
| | | keepAlive: false |
| | | } |
| | | }, |
| | | { |
| | | path: '/Dt_TaskOut', |
| | | name: 'Dt_TaskOut', |
| | | component: () => import('@/views/widesea_wms/taskinfo/Dt_TaskOut.vue'), |
| | | },{ |
| | | path: '/Dt_Task_Hty', |
| | | name: 'Dt_Task_Hty', |
| | | component: () => import('@/views/widesea_wms/taskinfo/Dt_Task_Hty.vue'), |
| | | meta: { |
| | | keepAlive: false |
| | | } |
| | | }, |
| | | // { |
| | | // path: '/Dt_TaskOut', |
| | | // name: 'Dt_TaskOut', |
| | | // component: () => import('@/views/widesea_wms/taskinfo/Dt_TaskOut.vue'), |
| | | // meta: { |
| | | // keepAlive: false |
| | | // } |
| | | // }, |
| | | // { |
| | | // path: '/Dt_TaskExecuteDetail', |
| | | // name: 'Dt_TaskExecuteDetail', |
| | | // component: () => import('@/views/widesea_wms/taskinfo/Dt_TaskExecuteDetail.vue'), |
| | |
| | | const editFormOptions = ref([ |
| | | [ |
| | | { "title": "è´§ä½ç¶æ", "field": "locationStatus", "type": "select", dataKey: "LocationState", data: [] }, |
| | | { "title": "æ¯å¦ç¦ç¨", "field": "enalbeStatus", "type": "select", dataKey: "EnalbeStatus", data: [] }, |
| | | ] |
| | | ]); |
| | | const searchFormFields = ref({ "LocationID": "",roadWayNO:"" }); |
| | |
| | | [ |
| | | { "title": "è´§ä½ç¼å·", "field": "locationCode", type: "text" }, |
| | | { "title": "è´§ä½ç¶æ", "field": "locationStatus", "type": "select", dataKey: "LocationState", data: [] }, |
| | | { "title": "对åºå åæºå·", "field": "sCNo", type: "text" }, |
| | | // { "title": "对åºå åæºå·", "field": "sCNo", type: "text" }, |
| | | { "title": "å··éç¼å·", "field": "roadWayNO", type: "text" }, |
| | | ] |
| | | ]); |
| | |
| | | }, |
| | | methods: { |
| | | onInit() { |
| | | this.dropdownItems.unshift({ |
| | | name: 'æé®', //æé®åç§° |
| | | icon: 'el-icon-document', //æé®å¾æ vue2çæ¬è§iviewææ¡£iconï¼vue3çæ¬è§element uiææ¡£icon(注æä¸æ¯element pulsææ¡£) |
| | | type: 'primary', //æé®æ ·å¼vue2çæ¬è§iviewææ¡£buttonï¼vue3çæ¬è§element uiææ¡£button |
| | | value: '321', //æé®å¼ |
| | | onClick: function () { |
| | | this.$Message.success('ç¹å»äºæé®'); |
| | | } |
| | | }); |
| | | // this.dropdownItems.unshift({ |
| | | // name: 'æé®', //æé®åç§° |
| | | // icon: 'el-icon-document', //æé®å¾æ vue2çæ¬è§iviewææ¡£iconï¼vue3çæ¬è§element uiææ¡£icon(注æä¸æ¯element pulsææ¡£) |
| | | // type: 'primary', //æé®æ ·å¼vue2çæ¬è§iviewææ¡£buttonï¼vue3çæ¬è§element uiææ¡£button |
| | | // value: '321', //æé®å¼ |
| | | // onClick: function () { |
| | | // this.$Message.success('ç¹å»äºæé®'); |
| | | // } |
| | | // }); |
| | | }, |
| | | }, |
| | | created() { |
| | |
| | | ]); |
| | | const columns = ref( |
| | | [{ field: 'id', title: 'åºåID', type: 'int', width: 110, hidden: true, readonly: true, require: true, align: 'left' }, |
| | | { field: 'locationCode', title: 'åºä½', type: 'string', width: 110, align: 'left', sort: true }, |
| | | { field: 'palletCode', title: 'æçæ¡ç ', type: 'string', width: 110, align: 'left', sort: true }, |
| | | { field: 'isFull', title: 'åºåç±»å', type: 'bool', width: 110, align: 'left', bind: { key: "isFull", data: [] }, sort: true}, |
| | | { field: 'linedProcessFeedbackTime', title: 'å·¥èºå¼å§æ¶é´', type: 'string', width: 110, align: 'left', sort: true }, |
| | | { field: 'locationCode', title: 'åºä½', type: 'string', width: 110, align: 'left', }, |
| | | { field: 'palletCode', title: 'æçæ¡ç ', type: 'string', width: 110, align: 'left', }, |
| | | { field: 'isFull', title: 'åºåç±»å', type: 'bool', width: 110, align: 'left', bind: { key: "isFull", data: [] }, }, |
| | | { field: 'linedProcessFeedbackTime', title: 'å·¥èºå¼å§æ¶é´', type: 'string', width: 110, align: 'left',}, |
| | | { field: 'specialParameterDuration', title: 'å·¥èºæ¶é¿', type: 'string', width: 110, align: 'left', sort: true }, |
| | | { field: 'outboundTime', title: 'åºåºåºæ¶é´', type: 'string', width: 110, align: 'left', sort: true }, |
| | | { field: 'productionLine', title: 'ç产产线', type: 'string', width: 110, align: 'left', sort: true }, |
| | | { field: 'areaCode', title: 'åºåº', type: 'string', width: 110, align: 'left', sort: true, bind: { key: "AreaType", data: [] } }, |
| | | { field: 'remark', title: 'çµè¯æ°é', type: 'string', width: 120, align: 'left', sort: true }, |
| | | { field: 'outboundTime', title: 'åºåºåºæ¶é´', type: 'string', width: 110, align: 'left', }, |
| | | { field: 'productionLine', title: 'ç产产线', type: 'string', width: 110, align: 'left', }, |
| | | { field: 'areaCode', title: 'åºåº', type: 'string', width: 110, align: 'left', bind: { key: "AreaType", data: [] } }, |
| | | { field: 'remark', title: 'çµè¯æ°é', type: 'string', width: 120, align: 'left', }, |
| | | { field: 'creater', title: 'å建人', type: 'string', sort: true, width: 110, align: 'left', hidden: true }, |
| | | { field: 'createDate', title: 'å建æ¶é´', type: 'datetime', sort: true, width: 150, align: 'left', sort: true }, |
| | | { field: 'createDate', title: 'å建æ¶é´', type: 'datetime', sort: true, width: 150, align: 'left', }, |
| | | { field: 'modifier', title: 'æåä¿®æ¹äºº', type: 'string', sort: true, width: 100, hidden: true, align: 'left' }, |
| | | // { field: 'modifyDate', title: 'æåä¿®æ¹æ¶é´', type: 'datetime', sort: true, width: 150, align: 'left', sort: true }, |
| | | ] |
ÎļþÃû´Ó Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/taskinfo/Dt_TaskOut.vue ÐÞ¸Ä |
| | |
| | | :table="table" :extend="extend" /> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/widesea_wms/taskinfo/Dt_Task.jsx"; |
| | | import extend from "@/extension/widesea_wms/taskinfo/Dt_Task_Hty.jsx"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | |
| | | key: 'taskId', |
| | | footer: "Foots", |
| | | cnName: 'ä»»å¡ä¿¡æ¯', |
| | | name: 'taskinfo/Dt_Task', |
| | | url: "/Task/", |
| | | name: 'taskinfo/Dt_Task_Hty', |
| | | url: "/Task_Hty/", |
| | | sortName: "TaskId" |
| | | }); |
| | | const editFormFields = ref({ |
| | |
| | | [ |
| | | { "title": "ä»»å¡å·", "field": "taskNum", "type": "text" }, |
| | | { "title": "æçå·", "field": "palletCode", "type": "text" }, |
| | | { "title": "ä»»å¡ç±»å", "field": "taskType", "type": "select", dataKey: "TaskType", data: []}, |
| | | { "title": "ä»»å¡ç±»å", "field": "taskType", "type": "select", dataKey: "TaskType", data: [] }, |
| | | { "title": "ä»»å¡ç¶æ", "field": "taskState", "type": "select", dataKey: "TaskStatus", data: [] }, |
| | | |
| | | ], |
| | |
| | | ], |
| | | ]); |
| | | const searchFormFields = ref({ |
| | | taskType: 100, |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { "title": "ä»»å¡å·", "field": "taskNum", "type": "text" }, |
| | | { "title": "æçå·", "field": "palletCode", "type": "text" }, |
| | | { "title": "ä»»å¡ç±»å", "field": "taskType", "type": "select", dataKey: "TaskType", data: [], hidden: true }, |
| | | { "title": "ä»»å¡ç±»å", "field": "taskType", "type": "select", dataKey: "TaskType", data: [] }, |
| | | { "title": "ä»»å¡ç¶æ", "field": "taskState", "type": "select", dataKey: "TaskStatus", data: [] }, |
| | | |
| | | ], |
| | |
| | | public int Depth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è´§ä½ç±»å |
| | | /// è´§ä½ç±»å ï¼1-æ®éè´§æ¶åºä½ 2-æ£æµæåºä½ï¼ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "è´§ä½ç±»å")] |
| | | public int LocationType { get; set; } |
| | |
| | | |
| | | public partial class Dt_TaskService : ServiceBase<Dt_Task, IDt_TaskRepository>, IDt_TaskService |
| | | { |
| | | |
| | | #region åºåºä»»å¡å®æ |
| | | |
| | | |
| | | //public async Task<WebResponseContent> CompleteStackTaskAsync(Dt_Task task, DtStockInfo stock) |
| | | //{ |
| | | // WebResponseContent content = new WebResponseContent(); |
| | | // try |
| | | // { |
| | | // if (task.TaskType == (int)TaskOutboundTypeEnum.Outbound) |
| | | // { |
| | | // var process = await SqlSugarHelper.Db.Queryable<Dt_EquipmentProcess>() |
| | | // .FirstAsync(x => x.EquipmentName == task.Roadway); |
| | | // var info = JsonConvert.DeserializeObject<ResponseEqptRunDto>(process.ProcessValue); |
| | | |
| | | // var agingOutputDto = MapToAgingOutputDto(stock, info); |
| | | // content = await _agingInOrOutInputService.GetOCVOutputAsync(agingOutputDto); |
| | | // ValidateResponse(content); |
| | | // } |
| | | |
| | | // // æ´æ°åºåç¶æåä»»å¡ç¶æ |
| | | // (var loc, var tas) = UpdateStockAndTaskStatus(stock, task); |
| | | |
| | | // // äºå¡å¤ç |
| | | // await _unitOfWorkManage.UseTranAsync(async () => |
| | | // { |
| | | // await UpdateLocationAsync(loc); |
| | | // await DeleteStockInfoAsync(stock.Id); |
| | | // await DeleteStockInfoDetailsAsync(stock.StockInfoDetails); |
| | | // //await DeleteTaskAsync(task.TaskId); |
| | | // }); |
| | | |
| | | // return content.OK("ä»»å¡å®ææå"); |
| | | // } |
| | | // catch (Exception err) |
| | | // { |
| | | // LogFactory.GetLog("ä»»å¡å®æ").Error(true, $"ç³»ç»å¼å¸¸ï¼å¼å¸¸ä¿¡æ¯ï¼{err.Message}"); |
| | | // return content.Error(err.Message); |
| | | // } |
| | | //} |
| | | |
| | | //private AgingOutputDto MapToAgingOutputDto(DtStockInfo stock, ResponseEqptRunDto info) |
| | | //{ |
| | | // // TODO Value弿 ¹æ®MOMä¸åçéç½®æ¶é´å°å½åæ¶é´çåéæ° |
| | | // return new AgingOutputDto |
| | | // { |
| | | // OpFlag = 1, |
| | | // Software = "WMS", |
| | | // EquipmentCode = "24MEJQ08-1091", |
| | | // TrayBarcode = stock.PalletCode, |
| | | // SerialNos = stock.StockInfoDetails.Select(x => new SerialNoOutDto |
| | | // { |
| | | // SlotNo = x.OrderNo.ToInt32(), |
| | | // SerialNo = x.SerialNumber, |
| | | // SerialNoResult = true, |
| | | // ParameterInfo = info.ParameterInfo.Select(y => new ParameterInfo() |
| | | // { |
| | | // LowerLomit = y.LowerControlLimit, |
| | | // UpperLimit = y.UpperControlLimit, |
| | | // ParameterResult = y.EquipmentAvailabilityFlag, |
| | | // ParameterCode = y.ParameterCode, |
| | | // ParameterDesc = y.Description, |
| | | // TargetValue = y.TargetValue, |
| | | // Value = (DateTime.Parse(stock.LinedProcessFeedbackTime, null, System.Globalization.DateTimeStyles.RoundtripKind).ToLocalTime() - stock.CreateDate).TotalMinutes.ToString(), |
| | | // DefectCode = y.UOMCode |
| | | // }).ToList() |
| | | // }).ToList() |
| | | // }; |
| | | //} |
| | | |
| | | //private void ValidateResponse(WebResponseContent content) |
| | | //{ |
| | | // var result = JsonConvert.DeserializeObject<BasicResult>(content.Data.ToString()); |
| | | // if (!result.Success) |
| | | // { |
| | | // throw new Exception(result.MOMMessage); |
| | | // } |
| | | //} |
| | | |
| | | //private (DtLocationInfo, Dt_Task) UpdateStockAndTaskStatus(DtStockInfo stock, Dt_Task task) |
| | | //{ |
| | | // var location = _locationRepository.QueryFirst(x => x.LocationCode == task.SourceAddress); |
| | | // var details = _stockInfoDetailRepository.QueryData(x => x.StockId == stock.Id); |
| | | |
| | | // location.LocationStatus = (int)LocationEnum.Free; |
| | | // task.TaskState = (int)TaskOutStatusEnum.OutFinish; |
| | | // //task.CurrentAddress = task.NextAddress; |
| | | // //task.NextAddress = task.TargetAddress; |
| | | |
| | | // LogFactory.GetLog("ä»»å¡å®æ").Info(true, "æ´æ°åºåç¶æä¸ä»»å¡ç¶æ"); |
| | | // return (location, task); |
| | | //} |
| | | |
| | | //private async Task DeleteStockInfoAsync(int stockId) |
| | | //{ |
| | | // var isStockUpdated = await _stockInfoRepository.DeleteDataByIdAsync(stockId); |
| | | // if (!isStockUpdated) |
| | | // { |
| | | // throw new Exception("åºåä¿¡æ¯æ´æ°å¤±è´¥"); |
| | | // } |
| | | //} |
| | | |
| | | //private async Task UpdateLocationAsync(DtLocationInfo info) |
| | | //{ |
| | | // var isStockUpdated = await _locationRepository.UpdateDataAsync(info); |
| | | // if (!isStockUpdated) |
| | | // { |
| | | // throw new Exception("åºåä¿¡æ¯æ´æ°å¤±è´¥"); |
| | | // } |
| | | //} |
| | | |
| | | //private async Task DeleteStockInfoDetailsAsync(IEnumerable<DtStockInfoDetail> details) |
| | | //{ |
| | | // var ids = details.Select(x => (object)x.Id).ToArray(); |
| | | // var isStockDetailUpdated = await _stockInfoDetailRepository.DeleteDataByIdsAsync(ids); |
| | | // if (!isStockDetailUpdated) |
| | | // { |
| | | // throw new Exception("åºå详æ
ä¿¡æ¯æ´æ°å¤±è´¥"); |
| | | // } |
| | | //} |
| | | |
| | | //private async Task DeleteTaskAsync(int taskId) |
| | | //{ |
| | | // var isTaskUpdated = await BaseDal.DeleteDataByIdAsync(taskId); |
| | | // if (!isTaskUpdated) |
| | | // { |
| | | // throw new Exception("ä»»å¡ä¿¡æ¯æ´æ°å¤±è´¥"); |
| | | // } |
| | | //} |
| | | |
| | | #endregion åºåºä»»å¡å®æ |
| | | |
| | | #region ç§»åºä»»å¡å®æ |
| | | |
| | | /// <summary> |
| | | /// ç§»åºä»»å¡å®æ |
| | | /// </summary> |
| | | /// <param name="saveModel">任塿°æ®åé</param> |
| | | /// <returns>è¿åç»æé</returns> |
| | | //public async Task<WebResponseContent> CompleteTransferTaskAsync(Dt_Task task, DtStockInfo stock) |
| | | //{ |
| | | // WebResponseContent content = new WebResponseContent(); |
| | | // try |
| | | // { |
| | | // // æ´æ°è´§ä½ååºåä¿¡æ¯ |
| | | // (DtStockInfo updateStock, DtLocationInfo locationInf) = UpdateStockLocation(stock, task.NextAddress); |
| | | // var taskHty = CreateHistoricalTask(task); |
| | | // LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "ç§»åºä»»å¡å®æ", $"è´§ä½å°åï¼{task.TargetAddress},ä¿®æ¹ååºåæ°æ®ï¼{JsonConvert.SerializeObject(updateStock)}ï¼åå
è´§ä½æ°æ®ï¼{locationInf}"); |
| | | |
| | | // // æ§è¡æ°æ®åºäºå¡ |
| | | // bool isResult = await ExecuteTransaction(updateStock, taskHty, locationInf, task.TaskId); |
| | | // if (isResult) |
| | | // content.OK("ç§»åºä»»å¡å®ææå"); |
| | | // else |
| | | // content.Error("ç§»åºä»»å¡å®æå¤±è´¥"); |
| | | // } |
| | | // catch (Exception err) |
| | | // { |
| | | // Console.WriteLine(err.Message.ToString()); |
| | | // } |
| | | // return content; |
| | | //} |
| | | |
| | | #endregion ç§»åºä»»å¡å®æ |
| | | |
| | | #region å
¥åºä»»å¡å®æ |
| | | |
| | | /// <summary> |
| | | /// 宿å
¥åºä»»å¡ |
| | | /// </summary> |
| | | /// <param name="task">任塿°æ®åé</param> |
| | | /// <returns>è¿åç»æé</returns> |
| | | //public async Task<WebResponseContent> CompleteInboundTaskAsync(Dt_Task task) |
| | | //{ |
| | | // // åå§åååºå
容 |
| | | // WebResponseContent content = new WebResponseContent(); |
| | | // try |
| | | // { |
| | | // // è·åè£
箱信æ¯åç®æ ä½ç½®ä¿¡æ¯ |
| | | // var boxing = await _boxingInfoRepository.QueryFirstNavAsync(x => x.PalletCode == task.PalletCode); |
| | | // var locationInf = await _locationRepository.QueryFirstAsync(x => x.LocationCode == task.TargetAddress); |
| | | |
| | | // // æ´æ°ç®æ ä½ç½®ç¶æä¸ºåºåä¸ |
| | | // locationInf.LocationStatus = (int)LocationEnum.InStock; |
| | | |
| | | // // å建åå²ä»»å¡å®ä¾æ¨¡å |
| | | // var taskHty = CreateHistoricalTask(task); |
| | | |
| | | // // æ ¹æ®æ¯å¦æç»çä¿¡æ¯å建åºåå®ä¾æ¨¡å |
| | | // DtStockInfo stock = boxing == null ? CreateEmptyPalletStock(task, locationInf) : CreateFullPalletStock(task, locationInf, boxing); |
| | | |
| | | // // æ§è¡æ°æ®åºäºå¡ |
| | | // bool isResult = await ExecuteTransaction(stock, taskHty, locationInf, task.TaskId); |
| | | // if (isResult) |
| | | // { |
| | | // content.OK("å
¥åºä»»å¡å®ææå"); |
| | | // } |
| | | // else |
| | | // { |
| | | // content.Error("å
¥åºä»»å¡å®æå¤±è´¥"); |
| | | // } |
| | | // } |
| | | // catch (Exception err) |
| | | // { |
| | | // // è®°å½å¼å¸¸ä¿¡æ¯å°æ§å¶å°åæ¥å¿ |
| | | // Console.WriteLine(err.Message.ToString()); |
| | | // LogFactory.GetLog("ä»»å¡å®æ").Error(true, err); |
| | | // } |
| | | // return content; |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// å建空æççåºåå®ä¾æ¨¡å |
| | | /// </summary> |
| | | //private DtStockInfo CreateEmptyPalletStock(Dt_Task task, DtLocationInfo locationInf) |
| | | //{ |
| | | // var loation = _locationRepository.QueryFirst(x => x.RoadwayNo == task.Roadway && x.LocationCode == task.TargetAddress); |
| | | // var area = _areaInfoRepository.QueryFirst(x => x.AreaID == loation.AreaId); |
| | | // return new DtStockInfo() |
| | | // { |
| | | // PalletCode = task.PalletCode, |
| | | // LocationCode = task.TargetAddress, |
| | | // CreateDate = DateTime.Now, |
| | | // Creater = "system", |
| | | // IsFull = false, |
| | | // AreaCode = area.AreaCode, |
| | | // LocationId = loation.Id, |
| | | // StockInfoDetails = new List<DtStockInfoDetail>() |
| | | // { |
| | | // new DtStockInfoDetail() |
| | | // { |
| | | // MaterielCode = "空æç", |
| | | // Id = 0, |
| | | // Status = (int)StockStateEmun.å·²å
¥åº |
| | | // } |
| | | // } |
| | | // }; |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// å建å®ççåºåå®ä¾æ¨¡åå¹¶è°ç¨MOMå
¥åº |
| | | /// </summary> |
| | | //private DtStockInfo CreateFullPalletStock(Dt_Task task, DtLocationInfo locationInf, DtBoxingInfo boxing) |
| | | //{ |
| | | // var loation = _locationRepository.QueryFirst(x => x.RoadwayNo == task.Roadway && x.LocationCode == task.TargetAddress); |
| | | // var area = _areaInfoRepository.QueryFirst(x => x.AreaID == loation.AreaId); |
| | | // var boxDetail = boxing.BoxingInfoDetails.Adapt<List<DtStockInfoDetail>>(); |
| | | // boxDetail.ForEach(x => { x.Status = (int)StockStateEmun.å·²å
¥åº; }); |
| | | // var stock = new DtStockInfo() |
| | | // { |
| | | // PalletCode = task.PalletCode, |
| | | // LocationCode = task.TargetAddress, |
| | | // CreateDate = DateTime.Now, |
| | | // Creater = "system", |
| | | // IsFull = boxing.IsFull, |
| | | // AreaCode = area.AreaCode, |
| | | // LocationId = loation.Id, |
| | | // StockInfoDetails = boxDetail, |
| | | // }; |
| | | |
| | | // // å¤ç请æ±åæ° |
| | | // AgingInputDto agingInputDto = new AgingInputDto() |
| | | // { |
| | | // SerialNos = boxing.BoxingInfoDetails |
| | | // .Select(item => new SerialNoInDto { SerialNo = item.SerialNumber, PositionNo = item.OrderNo }) |
| | | // .ToList(), |
| | | // TrayBarcode = task.PalletCode, |
| | | // OpFlag = 1, |
| | | // EquipmentCode = "24MEJQ08-1091", |
| | | // Software = "WMS" |
| | | // }; |
| | | // var result = _agingInOrOutInputService.GetOCVInputAsync(agingInputDto).Result; |
| | | // var respone = JsonConvert.DeserializeObject<ResponeAgingInputDto>(result.Data.ToString()); |
| | | // stock.LinedProcessFeedbackTime = respone.LinedProcessFeedbackTime; |
| | | // stock.SpecialParameterDuration = respone.SpecialParameterDuration; |
| | | // //2024å¹´11æ16æ¥ï¼æ°å¢å段计ç®åºåºåºæ¶é´ |
| | | // stock.OutboundTime = Convert.ToDateTime(respone.LinedProcessFeedbackTime).AddHours(Convert.ToDouble(respone.SpecialParameterDuration)); |
| | | // stock.ProductionLine = respone.ProductionLine; |
| | | |
| | | // // è®°å½æ¥å¿ |
| | | // LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "å
¥åºä»»å¡å®æ", $"è´§ä½å°åï¼{task.TargetAddress},ä¿®æ¹åè´§ä½æ°æ®ï¼{locationInf}"); |
| | | |
| | | // return stock; |
| | | //} |
| | | |
| | | #endregion å
¥åºä»»å¡å®æ |
| | | |
| | | #region ä»»å¡å®æ |
| | | |
| | | /// <summary> |
| | | /// å®æä»»å¡ |
| | | /// </summary> |
| | | /// <param name="taskNum">ä»»å¡ç¼å·</param> |
| | | /// <returns>è¿åç»æé</returns> |
| | | //public async Task<WebResponseContent> CompleteAsync(int taskNum) |
| | | //{ |
| | | // // åå§åååºå
容 |
| | | // WebResponseContent content = new WebResponseContent(); |
| | | |
| | | // // æå任塿°æ® |
| | | // LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "æå任塿°æ®", $"ä»»å¡å·ï¼{taskNum}"); |
| | | |
| | | // // éªè¯ä»»å¡æ¯å¦åå¨ |
| | | // var task = await GetByTaskNum(taskNum); |
| | | // if (task == null) |
| | | // { |
| | | // return content.Error("ä»»å¡ä¸åå¨"); |
| | | // } |
| | | // LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "éªè¯ä»»å¡æ¯å¦åå¨", JsonConvert.SerializeObject(task)); |
| | | |
| | | // // éªè¯åºåæ¯å¦åå¨ |
| | | // var stock = await _stockInfoRepository.QueryFirstNavAsync(x => x.PalletCode == task.PalletCode); |
| | | |
| | | // // æ ¹æ®ä»»å¡ç±»åè°ç¨ç¸åºç宿任塿¹æ³ |
| | | // switch (task.TaskType) |
| | | // { |
| | | // case (int)TaskInboundTypeEnum.Inbound: |
| | | // case (int)TaskInboundTypeEnum.InTray: |
| | | // LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "å
¥åºä»»å¡", ""); |
| | | // return await CompleteInboundTaskAsync(task); |
| | | |
| | | // case (int)TaskOutboundTypeEnum.OutTray: |
| | | // case (int)TaskOutboundTypeEnum.Outbound: |
| | | // LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "åºåºä»»å¡", ""); |
| | | // return await CompleteStackTaskAsync(task, stock); |
| | | |
| | | // default: |
| | | // return content.Error("ä»»å¡ç±»åä¸åå¨"); |
| | | // } |
| | | //} |
| | | |
| | | #endregion ä»»å¡å®æ |
| | | |
| | | #region 请æ±ä»»å¡å
¥åº |
| | | /// <summary> |
| | | /// 请æ±å
¥åº |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | // è°ç¨CreateNewTaskæ¹æ³ï¼å建æ°ä»»å¡ |
| | | content = await CreateNewTask(input); |
| | | } |
| | |
| | | var task = await CreateNewTaskByStation(input, stationinfo); |
| | | |
| | | // å°è¯æ·»å æ°ä»»å¡ |
| | | if (task == null) return content.Error() ; |
| | | if (task == null) return content.Error(); |
| | | var taskId = await BaseDal.AddDataAsync(task); |
| | | bool isResult = taskId > 0; |
| | | if (isResult) |
| | |
| | | }; |
| | | content.OK(data: taskDTO); |
| | | |
| | | |
| | | |
| | | } |
| | | else |
| | | content.Error("æ·»å ä»»å¡å¤±è´¥"); |
| | |
| | | task = await CreateInToOutTaskAsync(input, stationManager); break; |
| | | case 7: |
| | | task = await CreateEmptyOutTaskAsync(input, stationManager); break; |
| | | case 15: |
| | | task = await CheckAbnormalTaskAsync(input, stationManager); break; |
| | | default: |
| | | throw new Exception("æªç¥ç«å°ç±»å"); |
| | | } |
| | |
| | | /// |
| | | /// </summary> |
| | | /// <param name="requestTask">请æ±åæ°</param> |
| | | /// <param name="isCheckRequest">æ¯å¦æªæ£æµåºä½ç±»å</param> |
| | | /// <returns></returns> |
| | | private async Task<DtLocationInfo> RequestLocation(RequestTaskDto requestTask, bool isCheckRequest = false) |
| | | { |
| | |
| | | |
| | | #endregion 请æ±ç©ºæ¡åºåº |
| | | |
| | | #region å建空æ¡åºåºä»»å¡ |
| | | public async Task<Dt_Task> CreateEmptyOutTaskAsync(RequestTaskDto input, Dt_StationManager stationManager) |
| | | { |
| | | try |
| | |
| | | throw new Exception(ex.Message); |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ç´æ¥åºåºä»»å¡å®æ |
| | | public async Task<WebResponseContent> CompleteInToOutTaskAsync(Dt_Task task) |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region å¼å¸¸å£ä»»å¡æ£æµ |
| | | public async Task<Dt_Task> CheckAbnormalTaskAsync(RequestTaskDto input, Dt_StationManager stationManager) |
| | | { |
| | | try |
| | | { |
| | | // å建ä¸ä¸ªTrayCellsStatusDto对象ï¼å¹¶èµå¼ |
| | | TrayCellsStatusDto trayCells = new TrayCellsStatusDto() |
| | | { |
| | | Software = "WMS", |
| | | TrayBarcode = input.PalletCode, |
| | | //EquipmentCode = "EQ_CWJZ01" |
| | | EquipmentCode = input.EquiCodeMOM |
| | | }; |
| | | |
| | | #region MyRegion |
| | | private async Task<bool> ExecuteTransaction(DtStockInfo stock, Dt_Task_Hty taskHty, DtLocationInfo fromLocation,DtLocationInfo toLocation, int taskId) |
| | | // è°ç¨GetTrayCellStatusAsyncæ¹æ³ï¼è·åæ´ççµè¯ |
| | | WebResponseContent content = await GetTrayCellStatusAsync(trayCells); |
| | | // å¦æç¶æä¸ºfalseï¼åè¿åcontent |
| | | if (!content.Status) throw new Exception(content.Message); |
| | | |
| | | // æ·»å ç»çä¿¡æ¯ |
| | | // å°content.Data转æ¢ä¸ºResultTrayCellsStatus对象 |
| | | var result = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(content.Data.ToString()); |
| | | if (result.SerialNos.Count <= 0) |
| | | { |
| | | ConsoleHelper.WriteErrorLine(result.MOMMessage); |
| | | var taskNG = new Dt_Task |
| | | { |
| | | CurrentAddress = input.Position, |
| | | Grade = 1, |
| | | Roadway = input.Roadways, |
| | | TargetAddress = stationManager.stationNGLocation, |
| | | Dispatchertime = DateTime.Now, |
| | | MaterialNo = "", |
| | | NextAddress = stationManager.stationNGChildCode, |
| | | OrderNo = null, |
| | | PalletCode = input.PalletCode, |
| | | SourceAddress = stationManager.stationLocation, |
| | | TaskState = (int)TaskInStatusEnum.Line_InFinish, |
| | | TaskType = (int)TaskOutboundTypeEnum.InToOut, |
| | | TaskNum = await BaseDal.GetTaskNo(), |
| | | Creater = "Systeam" |
| | | }; |
| | | return taskNG; |
| | | } |
| | | |
| | | //Console.WriteLine(result); |
| | | //// TODO è·åæ¬å°ææ¡å±æ§ä¸æ´ççµè¯å±æ§è·åçå¼è¿è¡å¯¹æ¯ï¼å¦æä¸è´åç»§ç»ï¼å¦åè¿åéè¯¯ä¿¡æ¯ |
| | | ////var productions = await _productionRepository.QueryDataAsync(x => result.TrayBarcodePropertys.Select(x => x.TrayBarcodeProperty).ToList().Contains(x.TrayBarcodeProperty)); |
| | | ////if (productions.Count <= 0) |
| | | //// return content.Error("ææ¡å±æ§ä¸åå¨"); |
| | | |
| | | //// è°ç¨CreateBoxingInfoæ¹æ³ï¼å建ç»çä¿¡æ¯ |
| | | var boxing = CreateBoxingInfo(result, input.PalletCode); |
| | | if (boxing == null) throw new Exception("ç»ç失败"); |
| | | |
| | | //// è°ç¨GetProcessApplyAsyncæ¹æ³ï¼è·åå·¥èºè·¯çº¿ |
| | | //ProcessApplyDto process = await GetProcessApplyAsync(input, result); |
| | | |
| | | //// 妿process为nullï¼åè¿åcontent |
| | | //if (process == null) return content; |
| | | |
| | | //// è°ç¨_processApplyService.GetProcessApplyAsyncæ¹æ³ï¼è·åå·¥èºç³è¯· |
| | | //content = await _processApplyService.GetProcessApplyAsync(process); |
| | | |
| | | //// å¦æç¶æä¸ºfalseï¼åè¿ånull |
| | | //if (!content.Status) return content.Error("å·¥èºç³è¯·å¤±è´¥"); |
| | | |
| | | ////// è°ç¨GetProcessResponseAsyncæ¹æ³ï¼è·åå·¥èºååº |
| | | ////var processResponse = await GetProcessResponseAsync(process, input.Position); |
| | | var isBox = await _boxingInfoRepository.AddDataNavAsync(boxing); |
| | | |
| | | var task = new Dt_Task |
| | | { |
| | | CurrentAddress = input.Position, |
| | | Grade = 1, |
| | | Roadway = input.Roadways, |
| | | TargetAddress = stationManager.stationLocation, |
| | | Dispatchertime = DateTime.Now, |
| | | MaterialNo = "", |
| | | NextAddress = input.Roadways, |
| | | OrderNo = null, |
| | | //PalletCode = stockinfo.PalletCode, |
| | | //SourceAddress = stockinfo.LocationCode, |
| | | TaskState = (int)TaskOutStatusEnum.OutNew, |
| | | TaskType = (int)TaskOutboundTypeEnum.OutTray, |
| | | TaskNum = await BaseDal.GetTaskNo(), |
| | | Creater = "Systeam" |
| | | }; |
| | | |
| | | return task; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | throw new Exception(ex.Message); |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ç§»åºä»»å¡äºå¡ |
| | | private async Task<bool> ExecuteTransaction(DtStockInfo stock, Dt_Task_Hty taskHty, DtLocationInfo fromLocation, DtLocationInfo toLocation, int taskId) |
| | | { |
| | | _unitOfWorkManage.BeginTran(); |
| | | try |
| | | { |
| | | var isUpdateStock = true; |
| | | var isUpdateStock = _stockInfoRepository.UpdateData(stock); |
| | | |
| | | // æ·»å åå²ä»»å¡ |
| | | var isTaskHtyAdd = await _task_HtyRepository.AddDataAsync(taskHty) > 0; |
| | |
| | | #endregion |
| | | |
| | | #region æ£æµé«æ¸©åºæ¯å¦æå¯åºåºåºå |
| | | |
| | | public WebResponseContent StockCheckingAsync() |
| | | { |
| | | |
| | |
| | | #endregion |
| | | |
| | | #region 常温补空æçè³å容 |
| | | |
| | | public async Task<WebResponseContent> GetFROutTrayToCW(RequestTaskDto taskDTO) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | |
| | | |
| | | #endregion |
| | | |
| | | } |
| | | public async Task<WebResponseContent> RequestOutTaskToBZAsync(RequestTaskDto json) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | Dt_StationManager station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == json.Position); |
| | | |
| | | DtStockInfo stockInfo = _stockInfoRepository.QueryFirst(X => X.IsFull && X.AreaCode == "CWSC3" && X.ProductionLine == "ZJ-7"); |
| | | if (stockInfo == null) throw new Exception("åºå
æ æ»¡è¶³æ¡ä»¶çåºåå¯åºåº"); |
| | | |
| | | Dt_StationManager OutStation = _stationManagerRepository.QueryFirst(x => x.stationPLC == "1016" && x.stationType == 10); |
| | | |
| | | |
| | | // å建æ°ä»»å¡å®ä¾ |
| | | var task = new Dt_Task |
| | | { |
| | | CurrentAddress = stockInfo.LocationInfo.RoadwayNo, |
| | | Grade = 1, |
| | | Roadway = stockInfo.LocationInfo.RoadwayNo, |
| | | TargetAddress = json.Position, |
| | | Dispatchertime = DateTime.Now, |
| | | MaterialNo = "", |
| | | NextAddress = OutStation.stationChildCode, |
| | | OrderNo = null, |
| | | PalletCode = stockInfo.PalletCode, |
| | | SourceAddress = stockInfo.LocationCode, |
| | | TaskState = (int)TaskOutStatusEnum.OutNew, |
| | | TaskType = (int)TaskOutboundTypeEnum.Outbound, |
| | | TaskNum = await BaseDal.GetTaskNo(), |
| | | Creater = "Systeam" |
| | | }; |
| | | |
| | | WMSTaskDTO taskDTO = CreateTaskDTO(task); |
| | | |
| | | |
| | | return content.OK(data: taskDTO); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return content.Error($"失败ï¼{ex.Message}"); |
| | | } |
| | | } |
| | | } |