| | |
| | | /// </summary> |
| | | [Description("颿åºåº")] |
| | | Outbound = 100, |
| | | |
| | | /// <summary> |
| | | /// çç¹åºåº |
| | | /// </summary> |
| | | [Description("çç¹åºåº")] |
| | | OutInventory = 110, |
| | | |
| | | /// <summary> |
| | | /// 忣åºåº |
| | | /// </summary> |
| | | [Description("忣åºåº")] |
| | | OutPick = 120, |
| | | |
| | | /// <summary> |
| | | /// è´¨æ£åºåº |
| | | /// </summary> |
| | | [Description("è´¨æ£åºåº")] |
| | | OutQuality = 130, |
| | | |
| | | /// <summary> |
| | | /// 空箱åºåº |
| | | /// </summary> |
| | | [Description("空箱åºåº")] |
| | | OutEmpty = 140, |
| | | |
| | | /// <summary> |
| | | /// è°æ¨åºåº |
| | | /// </summary> |
| | | [Description("è°æ¨åºåº")] |
| | | OutAllocate = 150, |
| | | |
| | | /// <summary> |
| | | /// MESåºåº |
| | | /// </summary> |
| | |
| | | /// </summary> |
| | | [Description("æååºåº")] |
| | | OutProduct = 230, |
| | | |
| | | /// <summary> |
| | | /// æåå¯å®åºåº |
| | | /// </summary> |
| | | [Description("æåå¯å®åºåº")] |
| | | OutSendProduct = 240, |
| | | |
| | | /// <summary> |
| | | /// æåMESåºåº/æåº |
| | | /// æåMESæåº |
| | | /// </summary> |
| | | [Description("æåMESæåº")] |
| | | OutMesRworkProduct = 250, |
| | | |
| | | /// <summary> |
| | | /// é²çåæ´¾å·¥å°ä»¶ |
| | | /// </summary> |
| | |
| | | /// </summary> |
| | | [Description("é²çåæ´¾å·¥å¤§ä»¶")] |
| | | MaskOutNoticeLarge = 265, |
| | | |
| | | /// <summary> |
| | | /// é²çå°çº¿è¾¹å°ä»¶ |
| | | /// </summary> |
| | |
| | | /// </summary> |
| | | [Description("é²çå°çº¿è¾¹å¤§ä»¶")] |
| | | MaskOutLarge = 275, |
| | | |
| | | /// <summary> |
| | | /// éè´å
¥åº |
| | | /// </summary> |
| | | [Description("éè´å
¥åº")] |
| | | Inbound = 510, |
| | | |
| | | /// <summary> |
| | | /// çç¹å
¥åº |
| | | /// </summary> |
| | | [Description("çç¹å
¥åº")] |
| | | InInventory = 520, |
| | | |
| | | /// <summary> |
| | | /// 忣å
¥åº |
| | | /// </summary> |
| | | [Description("忣å
¥åº")] |
| | | InPick = 530, |
| | | |
| | | /// <summary> |
| | | /// è´¨æ£å
¥åº |
| | | /// </summary> |
| | |
| | | MesMatReturn = 560, |
| | | |
| | | /// <summary> |
| | | /// è°æ¨å
¥åº |
| | | /// </summary> |
| | | [Description("è°æ¨å
¥åº")] |
| | | InAllocate = 570, |
| | | |
| | | /// <summary> |
| | | /// MES大空æéæ |
| | | /// </summary> |
| | | [Description("MES大空æéæ")] |
| | |
| | | /// </summary> |
| | | [Description("MESå°ç©ºæéæ")] |
| | | MesPalletSmallReturn = 585, |
| | | |
| | | /// <summary> |
| | | /// è°æ¨å
¥åº |
| | | /// </summary> |
| | | [Description("è°æ¨å
¥åº")] |
| | | InAllocate = 570, |
| | | |
| | | /// <summary> |
| | | /// 线边ä»å
¥åº |
| | | /// </summary> |
| | | [Description("线边ä»å
¥åº")] |
| | | InboundXB = 580, |
| | | |
| | | /// <summary> |
| | | /// æºå°å
¥åº |
| | | /// </summary> |
| | | [Description("æºå°å
¥åº")] |
| | | InboundJT = 590, |
| | | |
| | | /// <summary> |
| | | /// 空箱å
¥åº |
| | |
| | | WebResponseContent content = _taskService.AgvBoxApplyPass(boxApplyPassDTO); |
| | | if (content.Status && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup) |
| | | { |
| | | _taskService.UpdateTask(task, TaskStatusEnum.AGV_Executing); |
| | | task.TaskState = TaskStatusEnum.AGV_Executing.ObjToInt(); |
| | | _taskRepository.UpdateData(task); |
| | | } |
| | | else |
| | | { |
| | |
| | | WebResponseContent content = _taskService.AgvBoxApplyPass(boxApplyPassDTO); |
| | | if (content.Status && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup) |
| | | { |
| | | _taskService.UpdateTask(task, TaskStatusEnum.AGV_Executing); |
| | | task.TaskState = TaskStatusEnum.AGV_Executing.ObjToInt(); |
| | | _taskRepository.UpdateData(task); |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | else if(task.TaskType == TaskTypeEnum.OutProduct.ObjToInt()) |
| | | { |
| | | _taskService.UpdateTask(task, TaskStatusEnum.AGV_Executing); |
| | | task.TaskState = TaskStatusEnum.AGV_Executing.ObjToInt(); |
| | | _taskRepository.UpdateData(task); |
| | | } |
| | | break; |
| | | default: |
| | |
| | | { |
| | | bool flag = false; |
| | | List<Dt_Task> tasks = new List<Dt_Task>(); |
| | | List<Dt_Task> tasksOld= BaseDal.QueryData(); |
| | | List<Dt_Router> routersAll = _routerRepository.QueryData(); |
| | | List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(); |
| | | foreach (var item in taskDTOs) |
| | | { |
| | | if (BaseDal.QueryFirst(x => x.TaskNum == item.TaskNum || x.PalletCode == item.PalletCode) != null) |
| | | if (tasksOld.FirstOrDefault(x => x.TaskNum == item.TaskNum || x.PalletCode == item.PalletCode) != null) |
| | | { |
| | | flag = true; |
| | | continue; |
| | |
| | | TaskTypeGroup taskTypeGroup = item.TaskType.GetTaskTypeGroup(); |
| | | if (string.IsNullOrEmpty(item.AGVArea)) |
| | | { |
| | | Dt_StationManger stationManger; |
| | | Dt_StationManger? stationManger; |
| | | if (taskTypeGroup == TaskTypeGroup.InboundGroup) |
| | | { |
| | | stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == item.SourceAddress || x.StationDeviceCode == item.SourceAddress); |
| | | stationManger = stationMangers.FirstOrDefault(x => x.StationCode == item.SourceAddress || x.StationDeviceCode == item.SourceAddress); |
| | | if (stationManger==null && task.TaskType==TaskTypeEnum.InProduct.ObjToInt()) |
| | | { |
| | | stationManger = _stationMangerRepository.QueryFirst(x => x.StackerCraneCode==task.SourceAddress); |
| | | stationManger = stationMangers.FirstOrDefault(x => x.StackerCraneCode==task.SourceAddress); |
| | | //è½¬æ¢æåä»èµ·ç¹ç«å° |
| | | item.SourceAddress = stationManger.StationCode; |
| | | task.CurrentAddress = stationManger.StationCode; |
| | |
| | | } |
| | | else |
| | | { |
| | | stationManger = _stationMangerRepository.QueryFirst(x => x.StackerCraneCode == item.RoadWay || x.Remark==item.RoadWay); |
| | | stationManger = stationMangers.FirstOrDefault(x => x.StackerCraneCode == item.RoadWay || x.Remark==item.RoadWay); |
| | | } |
| | | if (stationManger == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°ç«å°é
置信æ¯"); |
| | | } |
| | | |
| | | List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == item.TaskType && (item.SourceAddress == x.StartPosi || item.RoadWay == x.StartPosi /*|| item.RoadWay == x.ChildPosiDeviceCode || item.RoadWay == x.ChildPosi*/)); |
| | | List<Dt_Router> routers = routersAll.Where(x => x.InOutType == item.TaskType && (item.SourceAddress == x.StartPosi || item.RoadWay == x.StartPosi /*|| item.RoadWay == x.ChildPosiDeviceCode || item.RoadWay == x.ChildPosi*/)).ToList(); |
| | | router = routers.FirstOrDefault(); |
| | | if (router == null) |
| | | { |
| | |
| | | { |
| | | task.NextAddress = router.NextPosi; |
| | | task.DeviceCode = stationManger.StackerCraneCode; |
| | | if (item.TaskType == TaskTypeEnum.MesOutbound.ObjToInt() && task.TargetAddress== "SCUTL-001") |
| | | if (item.TaskType == TaskTypeEnum.MesOutbound.ObjToInt() && (task.TargetAddress== "SCUTL-001" || task.TargetAddress == "SCUTL-002" || task.TargetAddress == "SCUTL_04-001")) |
| | | { |
| | | task.TaskState = TaskStatusEnum.MesPending.ObjToInt(); |
| | | } |
| | |
| | | { |
| | | if (item.RoadWay=="AGV_CP") |
| | | { |
| | | Dt_Router routerSelect = _routerRepository.QueryFirst(x => x.InOutType == item.TaskType && item.RoadWay == x.StartPosi && x.NextPosi==item.TargetAddress); |
| | | Dt_Router? routerSelect = routersAll.FirstOrDefault(x => x.InOutType == item.TaskType && item.RoadWay == x.StartPosi && x.NextPosi==item.TargetAddress); |
| | | if (routerSelect != null) |
| | | { |
| | | task.NextAddress = routerSelect.NextPosi; |
| | |
| | | if (taskTypeGroup == TaskTypeGroup.OutbondGroup) |
| | | { |
| | | task.AgvTaskNum = item.AGVArea + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum; |
| | | List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == item.TaskType && item.AGVArea == x.NextPosi); |
| | | List<Dt_Router> routers = routersAll.Where(x => x.InOutType == item.TaskType && item.AGVArea == x.NextPosi).ToList(); |
| | | if (routers.FirstOrDefault() == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°è·¯ç±é
置信æ¯"); |
| | |
| | | { |
| | | task.AgvTaskNum = item.AGVArea + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum; |
| | | } |
| | | List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == item.TaskType && item.AGVArea == x.StartPosi); |
| | | List<Dt_Router> routers = routersAll.Where(x => x.InOutType == item.TaskType && item.AGVArea == x.StartPosi).ToList(); |
| | | if (routers.FirstOrDefault() == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°è·¯ç±é
置信æ¯"); |
| | | } |
| | | router = routers.FirstOrDefault(); |
| | | Dt_StationManger? stationManger = _stationMangerRepository.QueryData(x => true).FirstOrDefault(x=>x.StationCode== router?.NextPosi); |
| | | Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x=>x.StationCode== router?.NextPosi); |
| | | if (stationManger == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°ç«å°é
置信æ¯"); |
| | |
| | | { |
| | | return TaskType == TaskTypeEnum.ProductionReturn.ObjToInt() ? "23" : "24"; |
| | | } |
| | | case "AGV_ZH": |
| | | { |
| | | if (TaskType == TaskTypeEnum.InboundXB.ObjToInt()) |
| | | return "20"; |
| | | else if (TaskType == TaskTypeEnum.InboundJT.ObjToInt()) |
| | | return "21"; |
| | | else return "22"; |
| | | } |
| | | default: |
| | | throw new Exception($"设å¤ç¼å·é误"); |
| | | } |
| | |
| | | ConveyorLineSignal conveyorLineSignalWrite = conveyorLineInfoWrite.Signal.ByteToBoolObject<ConveyorLineSignal>(); |
| | | if (item.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt()) |
| | | { |
| | | //å¹²èå
¥åºç«å°äº¤äº |
| | | if (conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.ACK) |
| | | { |
| | | string boxcode = device.GetValue<R_ConveyorLineDB, string>(R_ConveyorLineDB.Boxcode, item.StationCode); |
| | |
| | | } |
| | | else |
| | | { |
| | | //å¹²èåºåºç«å°äº¤äº |
| | | if (!conveyorLineSignalWrite.STB && !conveyorLineSignalRead.ACK && conveyorLineStatus.Goods) |
| | | { |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt() && x.DeviceCode == item.StationDeviceCode); |
| | |
| | | } |
| | | else if (conveyorLineSignalWrite.STB && conveyorLineSignalRead.ACK && conveyorLineStatus.Goods) |
| | | { |
| | | //宿干èåºåºä»»å¡ |
| | | _taskService.TaskCompleted(conveyorLineInfoWrite.TaskNum); |
| | | device.SetValue(W_ConveyorLineDB.STB, false, item.StationCode); |
| | | } |
| | |
| | | } |
| | | } |
| | | //å
许æ¾è¡ä¸å·å¼æå£åºåºä»»å¡ |
| | | bool outAllow = device.Communicator.Read<bool>("DB14.4.6"); |
| | | if (outAllow) |
| | | bool outAllowLine1 = device.Communicator.Read<bool>("DB14.4.6"); |
| | | if (outAllowLine1) |
| | | { |
| | | Dt_Task taskExcuting = _taskRepository.QueryFirst(x => x.WarehouseId== warehouseDevice.WarehouseId && (x.TargetAddress== "SCUTL-001" || x.TargetAddress == "1101") |
| | | && (x.TaskState==TaskStatusEnum.SC_Execute.ObjToInt() || x.TaskState == TaskStatusEnum.SC_Executing.ObjToInt() |
| | |
| | | WriteDebug($"ä¸å·å¼æå£æ¾è¡ä»»å¡", $"ä»»å¡å·{taskExecute.TaskNum}"); |
| | | } |
| | | } |
| | | //å
许æ¾è¡äºå·å¼æå£åºåºä»»å¡ |
| | | bool outAllowLine2 = device.Communicator.Read<bool>("DB14.12.6"); |
| | | if (outAllowLine2) |
| | | { |
| | | Dt_Task taskExcuting = _taskRepository.QueryFirst(x => x.WarehouseId == warehouseDevice.WarehouseId && (x.TargetAddress == "SCUTL-002" || x.TargetAddress == "1103") |
| | | && (x.TaskState == TaskStatusEnum.SC_Execute.ObjToInt() || x.TaskState == TaskStatusEnum.SC_Executing.ObjToInt() |
| | | || x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt() || x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt())); |
| | | Dt_Task? taskExecute = _taskRepository.QueryData(x => x.WarehouseId == warehouseDevice.WarehouseId && x.TargetAddress == "SCUTL-002" |
| | | && x.TaskState == TaskStatusEnum.MesPending.ObjToInt()).OrderByDescending(x => x.Grade).ThenBy(x => x.TaskNum).ThenBy(x => x.CreateDate).FirstOrDefault(); |
| | | if (taskExcuting == null && taskExecute != null) |
| | | { |
| | | _taskService.UpdateTask(taskExecute, TaskStatusEnum.SC_Execute); |
| | | WriteDebug($"äºå·å¼æå£æ¾è¡ä»»å¡", $"ä»»å¡å·{taskExecute.TaskNum}"); |
| | | } |
| | | } |
| | | //å
许æ¾è¡æå¨å¼æå£åºåºä»»å¡ |
| | | bool outAllowMusual = device.Communicator.Read<bool>("DB14.4.7"); |
| | | if (outAllowMusual) |
| | | { |
| | | Dt_Task taskExcuting = _taskRepository.QueryFirst(x => x.WarehouseId == warehouseDevice.WarehouseId && (x.TargetAddress == "SCUTL_04-001" || x.TargetAddress == "1102") |
| | | && (x.TaskState == TaskStatusEnum.SC_Execute.ObjToInt() || x.TaskState == TaskStatusEnum.SC_Executing.ObjToInt() |
| | | || x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt() || x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt())); |
| | | Dt_Task? taskExecute = _taskRepository.QueryData(x => x.WarehouseId == warehouseDevice.WarehouseId && x.TargetAddress == "SCUTL_04-001" |
| | | && x.TaskState == TaskStatusEnum.MesPending.ObjToInt()).OrderByDescending(x => x.Grade).ThenBy(x => x.TaskNum).ThenBy(x => x.CreateDate).FirstOrDefault(); |
| | | if (taskExcuting == null && taskExecute != null) |
| | | { |
| | | _taskService.UpdateTask(taskExecute, TaskStatusEnum.SC_Execute); |
| | | WriteDebug($"æå¨å¼æå£æ¾è¡ä»»å¡", $"ä»»å¡å·{taskExecute.TaskNum}"); |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°è·¯ç±ä¿¡æ¯,{task.NextAddress}"); |
| | | } |
| | | } |
| | | if (task.TargetAddress.Contains("SCUTL-001")) |
| | | if (task.TargetAddress.Contains("SCUTL-001")) //èªå¨ä¸çº¿ |
| | | { |
| | | _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: stationManger.StationDeviceCode, currentAddress: stationManger.StationCode, nextAddress: router.NextPosi, targetAddress: router.NextPosi); |
| | | } |
| | | else if (task.TargetAddress.Contains("SCUTL-002")) |
| | | else if (task.TargetAddress.Contains("SCUTL-002")) //èªå¨äºçº¿ |
| | | { |
| | | _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: stationManger.StationDeviceCode, currentAddress: stationManger.StationCode, nextAddress: "1103", targetAddress: "1103"); |
| | | } |
| | | else |
| | | else //æå¨çº¿ |
| | | { |
| | | _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: stationManger.StationDeviceCode, currentAddress: stationManger.StationCode, nextAddress: "1102", targetAddress: "1102"); |
| | | } |
| | |
| | | onClick: function () { |
| | | } |
| | | }, |
| | | { |
| | | name: "éå®åºåçç¹", |
| | | icon: '', |
| | | class: '', |
| | | value: 'SelectStockTake', |
| | | type: 'success', |
| | | onClick: function () { |
| | | } |
| | | }, |
| | | ] |
| | | |
| | | export default buttons |
| | |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | |
| | | // let InOrder = this.buttons.find(x => x.value == 'StockOutbound'); |
| | | // if (InOrder) { |
| | | // InOrder.onClick = function () { |
| | | // let rows = this.$refs.table.getSelected(); |
| | | // if (rows.length == 0) return this.$error("è¯·éæ©æ°æ®!"); |
| | | // if (rows.length > 1) return this.$error("è¯·éæ©åæ¡æ°æ®!"); |
| | | // var keys = rows.map(x => { return x.stockId }); |
| | | // this.http |
| | | // .post("api/Task/Outbound?id="+keys[0], null, "æ°æ®å¤çä¸") |
| | | // .then((x) => { |
| | | // if (!x.status) return this.$message.error(x.message); |
| | | // this.$message.success("æä½æå"); |
| | | // this.refresh(); |
| | | // }); |
| | | // } |
| | | // } |
| | | let SelectTake = this.buttons.find(x => x.value == 'SelectStockTake'); |
| | | if (SelectTake) { |
| | | SelectTake.onClick = function () { |
| | | let stockViews = this.$refs.table.getSelected(); |
| | | this.http |
| | | .post("api/Task/TakeOutbound",stockViews, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | | this.refresh(); |
| | | }); |
| | | } |
| | | } |
| | | this.columns.forEach(column => { |
| | | if (column.field == 'materielCode') { |
| | | column.formatter = (row) => { |
| | |
| | | }); |
| | | }; |
| | | |
| | | const createSocket = (url) => { |
| | | // å建WebSocketè¿æ¥ |
| | | //"ws://127.0.0.1:9295/admin" |
| | | client = new WebSocket(url); |
| | | // const createSocket = (url) => { |
| | | // // å建WebSocketè¿æ¥ |
| | | // //"ws://127.0.0.1:9295/admin" |
| | | // client = new WebSocket(url); |
| | | |
| | | client.onopen = function () { |
| | | client.onmessage = handleMessage; |
| | | store.commit("setWebsocket", client); |
| | | console.log("WebSocket è¿æ¥æå"); |
| | | }; |
| | | // client.onopen = function () { |
| | | // client.onmessage = handleMessage; |
| | | // store.commit("setWebsocket", client); |
| | | // console.log("WebSocket è¿æ¥æå"); |
| | | // }; |
| | | |
| | | client.onclose = function () { |
| | | console.log("WebSocket è¿æ¥å
³é"); |
| | | setTimeout(createSocket, 10000); |
| | | }; |
| | | //çå¬socketéè¯¯ä¿¡æ¯ |
| | | client.onerror = function () {}; |
| | | }; |
| | | // client.onclose = function () { |
| | | // console.log("WebSocket è¿æ¥å
³é"); |
| | | // setTimeout(createSocket, 10000); |
| | | // }; |
| | | // //çå¬socketéè¯¯ä¿¡æ¯ |
| | | // client.onerror = function () {}; |
| | | // }; |
| | | |
| | | const changeTheme = (name) => { |
| | | if (theme.value != name) { |
| | |
| | | } |
| | | } |
| | | |
| | | createSocket("ws://127.0.0.1:9296/" + _userInfo.userName); |
| | | // createSocket("ws://127.0.0.1:9296/" + _userInfo.userName); |
| | | |
| | | Object.assign(_config.$tabs, { open: open, close: close }); |
| | | |
| | |
| | | calendar: { |
| | | left: "center", |
| | | top: 49, |
| | | cellSize: [70, 70], |
| | | cellSize: [100, 70], |
| | | orient: "vertical", |
| | | dayLabel: { |
| | | firstDay: 1, |
| | |
| | | monthLabel: { |
| | | formatter: "{M}æ", |
| | | }, |
| | | range: "2025-05", |
| | | range: dayjs().format('YYYY-MM'), |
| | | yearLabel: { |
| | | show: false, |
| | | }, |
| | |
| | | symbolSize(params) { |
| | | //æ ¸å¿2 |
| | | if (params[0] === dayjs().format('YYYY-MM-DD')) { |
| | | return 70; //å½åæ¥æé«äº® 宽度é«åº¦è®¾ç½®æååå
æ ¼å®½åº¦é«åº¦ä¸æ · |
| | | return [100, 70]; //å½åæ¥æé«äº® 宽度é«åº¦è®¾ç½®æååå
æ ¼å®½åº¦é«åº¦ä¸æ · |
| | | } else { |
| | | return 1; |
| | | } |
| | |
| | | calendar: { |
| | | left: "center", |
| | | top: 49, |
| | | cellSize: [70, 70], |
| | | cellSize: [100, 70], |
| | | orient: "vertical", |
| | | dayLabel: { |
| | | firstDay: 1, |
| | |
| | | symbolSize(params) { |
| | | //æ ¸å¿2 |
| | | if (params[0] === dayjs().format('YYYY-MM-DD')) { |
| | | return 70; //å½åæ¥æé«äº® 宽度é«åº¦è®¾ç½®æååå
æ ¼å®½åº¦é«åº¦ä¸æ · |
| | | return [100, 70]; //å½åæ¥æé«äº® 宽度é«åº¦è®¾ç½®æååå
æ ¼å®½åº¦é«åº¦ä¸æ · |
| | | } else { |
| | | return 1; |
| | | } |
| | |
| | | width: 150, |
| | | hidden: true, |
| | | readonly: true, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | |
| | | title: "æ£éªåå·", |
| | | type: "string", |
| | | width: 180, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | |
| | | title: "鿣åå·", |
| | | type: "string", |
| | | width: 180, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | |
| | | }, |
| | | // {field:'auditStatus',title:'审æ¹ç¶æ',type:'int',width:110,require:true,align:'left'}, |
| | | { |
| | | field: "receiveDetailRowNo", |
| | | title: "鿣æç»è¡", |
| | | field: "orderPalletCode", |
| | | title: "鿣æç", |
| | | type: "int", |
| | | width: 100, |
| | | require: true, |
| | | width: 140, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "materielCode", |
| | | title: "ç©æç¼å·", |
| | | type: "string", |
| | | width: 110, |
| | | require: true, |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | |
| | | title: "æ¹æ¬¡å·", |
| | | type: "string", |
| | | width: 150, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "checkOrderStatus", |
| | | title: "è´¨æ£åç¶æ", |
| | | type: "string", |
| | | width: 110, |
| | | width: 100, |
| | | require: true, |
| | | align: "left", |
| | | bind: { key: "checkOrderStatusEnum", data: [] }, |
| | |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "defectedQuantity", |
| | | title: "ç¹éæ°é", |
| | | type: "float", |
| | | width: 110, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "scrappedQuantity", |
| | | title: "æ¥åºæ°é", |
| | | type: "float", |
| | | width: 110, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "receivedQuantity", |
| | | title: "æ£éªæ»æ°", |
| | | type: "float", |
| | | width: 110, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 180, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | // {field:'modifier',title:'ä¿®æ¹äºº',type:'string',width:100,align:'left'}, |
| | |
| | | if (mathCurrentRow <= maxDepth) |
| | | { |
| | | locationInfos = locationInfos.Where(x => x.Row - Convert.ToInt32(Math.Ceiling(x.Row / maxDepth / 2.0)) * maxDepth * 2 <= maxDepth).ToList(); |
| | | if (beRelocation.Row> maxDepth) |
| | | if (beRelocation.Row <= maxDepth) |
| | | { |
| | | locationInfos = locationInfos.Where(x=>x.Row>maxDepth).ToList(); |
| | | locationInfos = locationInfos.Where(x=>x.Row <= maxDepth).ToList(); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | locationInfos = locationInfos.Where(x => x.Row - Convert.ToInt32(Math.Ceiling(x.Row / maxDepth / 2.0)) * maxDepth * 2 > maxDepth).ToList(); |
| | | if (beRelocation.Row <= maxDepth) |
| | | if (beRelocation.Row > maxDepth) |
| | | { |
| | | locationInfos = locationInfos.Where(x => x.Row <= maxDepth).ToList(); |
| | | locationInfos = locationInfos.Where(x => x.Row > maxDepth).ToList(); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | return content.Error($"æ°éè¶
åº"); |
| | | } |
| | | if (checkResult.Result == InspectResultEnum.Return.ToString())//éè´§ |
| | | //夿æ£éªç»æ |
| | | if (checkResult.Result == InspectResultEnum.Return.ToString()) |
| | | { |
| | | checkOrder.DefectedNote = checkResult.Note; |
| | | checkOrder.ReturnQuantity += checkResult.Quantity; |
| | |
| | | } |
| | | else if(checkResult.Quantity< item.StockQuantity) |
| | | { |
| | | checkResult.Quantity = 0; |
| | | item.StockQuantity -= checkResult.Quantity; |
| | | item.OutboundQuantity = 0; |
| | | checkResult.Quantity = 0; |
| | | stockInfoDetails.Add(item); |
| | | } |
| | | else if (checkResult.Quantity >= item.StockQuantity) |
| | |
| | | checkOrder.QualifiedQuantity = checkOrder.ReceivedQuantity; |
| | | } |
| | | checkOrder.CheckUserName = App.User.UserName; |
| | | List<Dt_StockInfoDetail> initialStockDetails = stockInfo.Details.Where(x=> !(stockInfoDetails.Select(v=>v.Id).ToList()).Contains(x.Id)).ToList(); |
| | | _unitOfWorkManage.BeginTran(); |
| | | |
| | | if (checkOrderResult != null) |
| | |
| | | { |
| | | _stockRepository.StockInfoDetailRepository.UpdateData(stockInfoDetails); |
| | | } |
| | | if (initialStockDetails.Count>0) |
| | | { |
| | | initialStockDetails.ForEach(x => |
| | | { |
| | | x.OutboundQuantity = 0; |
| | | }); |
| | | _stockRepository.StockInfoDetailRepository.UpdateData(initialStockDetails); |
| | | } |
| | | if (DelStockDetails.Count>0) |
| | | { |
| | | _stockRepository.StockInfoDetailRepository.DeleteAndMoveIntoHty(DelStockDetails, App.User.UserId == 0 ? OperateTypeEnum.èªå¨å®æ : OperateTypeEnum.äººå·¥å®æ); |
| | |
| | | public enum TakeStockStatusEnum |
| | | { |
| | | /// <summary> |
| | | /// æªéæ |
| | | /// æªçç¹ |
| | | /// </summary> |
| | | [Description("æªçç¹")] |
| | | NotTake = 0, |
| | | æªçç¹ = 0, |
| | | |
| | | /// <summary> |
| | | /// éæä¸ |
| | | /// çç¹ä¸ |
| | | /// </summary> |
| | | [Description("çç¹ä¸")] |
| | | Taking = 1, |
| | | çç¹ä¸ = 1, |
| | | |
| | | /// <summary> |
| | | /// éæå®æ |
| | | /// çç¹å®æ |
| | | /// </summary> |
| | | [Description("çç¹å®æ")] |
| | | Taked = 2 |
| | | çç¹å®æ = 2 |
| | | } |
| | | /// <summary> |
| | | /// çç¹ç¶æ |
| | | /// </summary> |
| | | public enum TakeStockDetailStatusEnum |
| | | { |
| | | /// <summary> |
| | | /// æªçç¹ |
| | | /// </summary> |
| | | [Description("æªçç¹")] |
| | | æªçç¹ = 0, |
| | | |
| | | /// <summary> |
| | | /// çç¹ä¸ |
| | | /// </summary> |
| | | [Description("çç¹åºåºä¸")] |
| | | çç¹åºåºä¸ = 1, |
| | | |
| | | /// <summary> |
| | | /// çç¹åºåºå®æ |
| | | /// </summary> |
| | | [Description("çç¹åºåºå®æ")] |
| | | çç¹åºåºå®æ = 2, |
| | | |
| | | /// <summary> |
| | | /// çç¹å®æ |
| | | /// </summary> |
| | | [Description("çç¹å®æ")] |
| | | çç¹å®æ = 3 |
| | | } |
| | | } |
| | |
| | | IReturnOrderDetailRepository ReturnOrderDetailRepository { get; } |
| | | IMesProInOrderRepository MesProInOrderRepository { get; } |
| | | IMesProInOrderDetailRepository MesProInOrderDetailRepository { get; } |
| | | ITakeStockOrderRepository TakeStockOrderRepository { get; } |
| | | ITakeStockOrderDetailRepository TakeStockOrderDetailRepository { get; } |
| | | } |
| | | } |
| | |
| | | //WebResponseContent RequestInboundTask(string palletCode, string stationCode); |
| | | WebResponseContent RequestInboundTask(SaveModel saveModel); |
| | | /// <summary> |
| | | /// æ¥è¯¢è´¨æ£æ°é |
| | | /// </summary> |
| | | WebResponseContent InQualityConfirm(string palletCode); |
| | | /// <summary> |
| | | /// 空箱å
¥åº |
| | | /// </summary> |
| | | /// <param name="barcode"></param> |
| | |
| | | /// <param name="id"></param> |
| | | /// <returns></returns> |
| | | WebResponseContent Outbound(int id); |
| | | WebResponseContent TakeOutbound(List<StockViewDTO> stockViews); |
| | | |
| | | /// <summary> |
| | | /// ç©æåºåºï¼WMS忥åºåºç©ææ¹æ¬¡è³MES |
| | |
| | | public IMesProInOrderRepository MesProInOrderRepository { get; } |
| | | public IMesProInOrderDetailRepository MesProInOrderDetailRepository { get; } |
| | | |
| | | public InboundRepository(IInboundOrderDetailRepository inboundOrderDetailRepository, IInboundOrderRepository inboundOrderRepository, IReceiveOrderDetailRepository receiveOrderDetailRepository, IReceiveOrderRepository receiveOrderRepository, IPurchaseOrderDetailRepository purchaseOrderDetailRepository, IPurchaseOrderRepository purchaseOrderRepository, IReturnOrderRepository returnOrderRepository, IReturnOrderDetailRepository returnOrderDetailRepository, IMesProInOrderRepository mesProInOrderRepository, IMesProInOrderDetailRepository mesProInOrderDetailRepository) |
| | | public ITakeStockOrderRepository TakeStockOrderRepository { get; } |
| | | |
| | | public ITakeStockOrderDetailRepository TakeStockOrderDetailRepository { get; } |
| | | |
| | | public InboundRepository(IInboundOrderDetailRepository inboundOrderDetailRepository, IInboundOrderRepository inboundOrderRepository, IReceiveOrderDetailRepository receiveOrderDetailRepository, IReceiveOrderRepository receiveOrderRepository, IPurchaseOrderDetailRepository purchaseOrderDetailRepository, IPurchaseOrderRepository purchaseOrderRepository, IReturnOrderRepository returnOrderRepository, IReturnOrderDetailRepository returnOrderDetailRepository, IMesProInOrderRepository mesProInOrderRepository, IMesProInOrderDetailRepository mesProInOrderDetailRepository, ITakeStockOrderRepository takeStockOrderRepository, ITakeStockOrderDetailRepository takeStockOrderDetailRepository) |
| | | { |
| | | InboundOrderDetailRepository = inboundOrderDetailRepository; |
| | | InboundOrderRepository = inboundOrderRepository; |
| | |
| | | ReturnOrderDetailRepository = returnOrderDetailRepository; |
| | | MesProInOrderRepository = mesProInOrderRepository; |
| | | MesProInOrderDetailRepository = mesProInOrderDetailRepository; |
| | | TakeStockOrderRepository = takeStockOrderRepository; |
| | | TakeStockOrderDetailRepository = takeStockOrderDetailRepository; |
| | | } |
| | | } |
| | | } |
| | |
| | | Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == receiveOrder.WarehouseId); |
| | | MatSerNumAnalysisModel model = CodeAnalysisHelper.CodeAnalysis<MatSerNumAnalysisModel>(AnalysisCodeEnum.MatSerNumAnalysis, serNum); |
| | | Dt_SupplierInfo supplierInfo = _supplierInfoRepository.QueryFirst(x => x.SupplierCode == receiveOrder.SuppliersId); |
| | | //æ¶è´§å¢å æ¹æ¬¡å¡æ§ |
| | | //æ¥è¯¢æ¶è´§æç»æ¯å¦æåå¨åä¸ä¸ªæ¹æ¬¡ |
| | | //æ¶è´§å¢å æ¹æ¬¡å¡æ§,æ¥è¯¢æ¶è´§æç»æ¯å¦æåå¨åä¸ä¸ªæ¹æ¬¡ |
| | | Dt_ReceiveOrderDetail receiveOrderDetailOld = _inboundRepository.ReceiveOrderDetailRepository.QueryFirst(x => x.LotNo == model.LotNo && x.MaterielCode == model.MaterielCode); |
| | | Dt_ReceiveOrder? receiveOrderOld = null; |
| | | if (receiveOrderDetailOld!=null) |
| | |
| | | } |
| | | } |
| | | } |
| | | saveModel.MainData.Add(nameof(Dt_TakeStockOrder.TakeStockStatus).FirstLetterToLower(), TakeStockStatusEnum.NotTake.ObjToInt()); |
| | | saveModel.MainData.Add(nameof(Dt_TakeStockOrder.TakeStockStatus).FirstLetterToLower(), TakeStockStatusEnum.æªçç¹.ObjToInt()); |
| | | return base.AddData(saveModel); |
| | | } |
| | | /// <summary> |
| | |
| | | List<Dt_TakeStockOrder> takeStockOrders = new List<Dt_TakeStockOrder>(); |
| | | if (string.IsNullOrEmpty(orderNo)) |
| | | { |
| | | takeStockOrders = Db.Queryable<Dt_TakeStockOrder>().Where(x => x.TakeStockStatus < TakeStockStatusEnum.Taked.ObjToInt() && x.WarehouseId == warehouseId).ToPageList(pageNo, 5); |
| | | takeStockOrders = Db.Queryable<Dt_TakeStockOrder>().Where(x => x.TakeStockStatus < TakeStockStatusEnum.çç¹å®æ.ObjToInt() && x.WarehouseId == warehouseId).ToPageList(pageNo, 5); |
| | | } |
| | | else |
| | | { |
| | | takeStockOrders = Db.Queryable<Dt_TakeStockOrder>().Where(x => (x.OrderNo.Contains(orderNo) && x.TakeStockStatus < TakeStockStatusEnum.Taked.ObjToInt() && x.WarehouseId == warehouseId)).ToPageList(pageNo, 5); |
| | | takeStockOrders = Db.Queryable<Dt_TakeStockOrder>().Where(x => (x.OrderNo.Contains(orderNo) && x.TakeStockStatus < TakeStockStatusEnum.çç¹å®æ.ObjToInt() && x.WarehouseId == warehouseId)).ToPageList(pageNo, 5); |
| | | } |
| | | content.OK(data: takeStockOrders); |
| | | } |
| | |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "æ£éªåç±»å")] |
| | | public int OrderType { get; set; } |
| | | /// <summary> |
| | | /// æ£éªæç |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "æ£éªæç")] |
| | | public string OrderPalletCode { get; set; } |
| | | /// <summary> |
| | | /// è´¨æ£ç»æ |
| | | /// </summary> |
| | | [Navigate(NavigateType.OneToMany, nameof(Dt_CheckOrderResult.CheckOrderId), nameof(CheckOrderId))] |
| | |
| | | /// <summary> |
| | | /// çç¹æç» |
| | | /// </summary> |
| | | [PropertyValidate("éæåæç»", NotNullAndEmpty = true), Navigate(NavigateType.OneToMany, nameof(Dt_TakeStockOrderDetail.TakeStockId), nameof(Id))] |
| | | [PropertyValidate("çç¹æç»", NotNullAndEmpty = true), Navigate(NavigateType.OneToMany, nameof(Dt_TakeStockOrderDetail.TakeStockId), nameof(Id))] |
| | | public List<Dt_TakeStockOrderDetail> Details { get; set; } |
| | | } |
| | | } |
| | |
| | | /// <summary> |
| | | /// çç¹åä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "éæå主é®")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "çç¹å主é®")] |
| | | public int TakeStockId { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | public string MaterielSpec { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä»ä½ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "åä»ä½")] |
| | | public string LocationCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// çç¹æç |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "çç¹æç")] |
| | | public string TakePalletCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// çç¹æç»ç¶æ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "çç¹æç»ç¶æ")] |
| | | public int TakeDetalStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "åä½")] |
| | |
| | | case "inspectAcceptEnum": |
| | | { |
| | | List<object> data = new List<object>(); |
| | | |
| | | { |
| | | Type type = typeof(InspectAcceptEnum); |
| | | List<int> enums = Enum.GetValues(typeof(InspectAcceptEnum)).Cast<int>().ToList(); |
| | | List<string> enumNames = Enum.GetNames(typeof(InspectAcceptEnum)).ToList(); |
| | | int index = 0; |
| | | foreach (var item in enums) |
| | | foreach (var item in enumNames) |
| | | { |
| | | FieldInfo? fieldInfo = typeof(InspectAcceptEnum).GetField(((InspectAcceptEnum)item).ToString()); |
| | | FieldInfo? fieldInfo = typeof(InspectAcceptEnum).GetField((item).ToString()); |
| | | DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); |
| | | if (description != null) |
| | | { |
| | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | | case "takeStockDetailStatusEnum": |
| | | { |
| | | List<object> data = new List<object>(); |
| | | { |
| | | Type type = typeof(TakeStockDetailStatusEnum); |
| | | List<int> enums = Enum.GetValues(typeof(TakeStockDetailStatusEnum)).Cast<int>().ToList(); |
| | | int index = 0; |
| | | foreach (var item in enums) |
| | | { |
| | | FieldInfo? fieldInfo = typeof(TakeStockDetailStatusEnum).GetField(((TakeStockDetailStatusEnum)item).ToString()); |
| | | DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); |
| | | if (description != null) |
| | | { |
| | | data.Add(new { key = item.ToString(), value = description.Description }); |
| | | } |
| | | else |
| | | { |
| | | data.Add(new { key = item.ToString(), value = item.ToString() }); |
| | | } |
| | | index++; |
| | | } |
| | | } |
| | | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | | } |
| | | return result; |
| | | } |
| | |
| | | ReceivedQuantity = item.OriginalQuantity, |
| | | OrderType = CheckTypeEnum.InspectCheck.ObjToInt(), |
| | | ReceiveOrderNo = outboundOrder.OrderNo, |
| | | LotNo= item.BatchNo, |
| | | OrderPalletCode= item.PalletCode, |
| | | LotNo = item.BatchNo, |
| | | Result = CheckAcceptEnum.NotCheckAccept.ToString(), |
| | | QualifiedQuantity = 0, |
| | | ReceiveDetailRowNo = item.Id, |
| | |
| | | using WIDESEA_Common.TaskEnum; |
| | | using WIDESEA_Common.WareHouseEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_DTO; |
| | | using WIDESEA_DTO.MES; |
| | |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°ç»çä¿¡æ¯"); |
| | | } |
| | | if (stockInfo.StockStatus != StockStatusEmun.ç»çæå.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.æå¨ç»çæå.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.æ£é宿.ObjToInt()) |
| | | if (stockInfo.StockStatus != StockStatusEmun.ç»çæå.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.æå¨ç»çæå.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.æ£é宿.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鿣宿.ObjToInt()) |
| | | { |
| | | return WebResponseContent.Instance.Error($"该æçç¶æä¸æ£ç¡®,ä¸å¯ç³è¯·å
¥åº"); |
| | | } |
| | |
| | | stockInfo.StockStatus = StockStatusEmun.å
¥åºç¡®è®¤.ObjToInt(); |
| | | newTask.TaskType = TaskTypeEnum.InPick.ObjToInt(); |
| | | } |
| | | else if (stockInfo.StockStatus == StockStatusEmun.鿣宿.ObjToInt()) |
| | | { |
| | | stockInfo.StockStatus = StockStatusEmun.æå¨ç»çå
¥åºç¡®è®¤.ObjToInt(); |
| | | newTask.TaskType = TaskTypeEnum.InQuality.ObjToInt(); |
| | | } |
| | | else |
| | | { |
| | | stockInfo.StockStatus = StockStatusEmun.å
¥åºç¡®è®¤.ObjToInt(); |
| | |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¥è¯¢è´¨æ£æ°é |
| | | /// </summary> |
| | | /// <param name="palletCode">æçå·</param> |
| | | /// <returns></returns> |
| | | public WebResponseContent InQualityConfirm(string palletCode) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.GetStockInfo(palletCode); |
| | | if (stockInfo == null) |
| | | { |
| | | return content.Error($"æªæ¾å°è¯¥æçåºåä¿¡æ¯"); |
| | | } |
| | | if (stockInfo.Details.Count<=0) |
| | | { |
| | | return content.Error($"该æçåºåæç»ä¸ºç©º"); |
| | | } |
| | | if (stockInfo.StockStatus != StockStatusEmun.鿣宿.ObjToInt()) |
| | | { |
| | | return content.Error($"该æçè¿æªéæ£åºåºå®æ"); |
| | | } |
| | | Dt_OutStockLockInfo? outStockLockInfo = _outboundRepository.OutboundStockLockInfoRepository.QueryData(x => x.PalletCode == palletCode && x.Status == OutLockStockStatusEnum.åºåºå®æ.ObjToInt() && x.OrderType== OutOrderTypeEnum.Quality.ObjToInt()).OrderByDescending(x=>x.Id).FirstOrDefault(); |
| | | if (outStockLockInfo != null) |
| | | { |
| | | //è·åå¯¹åºæ£éªå |
| | | Dt_CheckOrder checkOrder = _checkOrderRepository.QueryFirst(x=>x.ReceiveDetailRowNo== outStockLockInfo.Id && x.CheckOrderStatus==CheckOrderStatusEnum.Checked.ObjToInt()); |
| | | if (checkOrder == null) |
| | | { |
| | | return content.Error($"该æçéæ£ä¿¡æ¯æªæ£"); |
| | | } |
| | | content.OK("æå", data:new { stockInfo.Details.FirstOrDefault()?.MaterielCode,checkOrder.ReceivedQuantity,checkOrder.ScrappedQuantity,checkOrder.DefectedQuantity,checkOrder.QualifiedQuantity,stockQuantity= stockInfo.Details.Sum(x=>x.StockQuantity) }) ; |
| | | } |
| | | else |
| | | { |
| | | content.Error("该æç鿣åºåºè¯¦æ
ä¸åå¨"); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | /// <summary> |
| | | /// å
¥ç©ºç®± |
| | | /// </summary> |
| | |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°ç»çä¿¡æ¯"); |
| | | } |
| | | if (stockInfo.StockStatus != StockStatusEmun.ç»çæå.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.æå¨ç»çæå.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.åºåºå®æ.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.æ£é宿.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.éåº.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.MESéåº.ObjToInt()) |
| | | if (stockInfo.StockStatus != StockStatusEmun.ç»çæå.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.æå¨ç»çæå.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.åºåºå®æ.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.æ£é宿.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.éåº.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.MESéåº.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鿣宿.ObjToInt()) |
| | | { |
| | | return WebResponseContent.Instance.Error($"该æçç¶æä¸æ£ç¡®,ä¸å¯ç³è¯·å
¥åº"); |
| | | } |
| | |
| | | else if (stockInfo.StockStatus == StockStatusEmun.æ£é宿.ObjToInt()) |
| | | { |
| | | newTask.TaskType = TaskTypeEnum.InPick.ObjToInt(); |
| | | } |
| | | else if (stockInfo.StockStatus == StockStatusEmun.鿣宿.ObjToInt()) |
| | | { |
| | | stockInfo.StockStatus = StockStatusEmun.æå¨ç»çå
¥åºç¡®è®¤.ObjToInt(); |
| | | newTask.TaskType = TaskTypeEnum.InQuality.ObjToInt(); |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | else if (stockInfo.StockStatus == StockStatusEmun.MES空æéåº.ObjToInt()) |
| | | { |
| | | Dt_PalletTypeInfo palletTypeInfo = _palletTypeInfoRepository.QueryFirst(x=>x.WarehouseId==stockInfo.WarehouseId && x.PalletType==stockInfo.PalletType); |
| | | //todo å°æçææ¶æªå¯ç¨ |
| | | if (stockInfo.PalletType == PalletTypeEnum.MediumPallet.ObjToInt()) |
| | | if (palletTypeInfo.LocaitonCount==2) |
| | | { |
| | | newTask.TaskType = TaskTypeEnum.MesPalletLargeReturn.ObjToInt(); |
| | | } |
| | |
| | | using WIDESEA_Core.CodeConfigEnum; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_DTO.ERP; |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.Text; |
| | | |
| | | namespace WIDESEA_TaskInfoService |
| | | { |
| | |
| | | return content; |
| | | } |
| | | /// <summary> |
| | | /// éå®åºåçæçç¹ååºåº |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent TakeOutbound(List<StockViewDTO> stockViews) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | if (stockViews.Select(x=>x.WarehouseId).Distinct().Count()>=2) |
| | | { |
| | | return content.Error($"è¯·éæ©åä¸ä»åºåºåè¿è¡çç¹"); |
| | | } |
| | | List<int> ids = stockViews.Select(x => x.StockId).ToList(); |
| | | //è·ååºå |
| | | List<Dt_StockInfo> stockInfos = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => ids.Contains(x.Id)).Includes(x => x.Details).ToList(); |
| | | if (stockInfos.Count!= stockViews.Count) |
| | | { |
| | | StockViewDTO? stockViewDTO = stockViews.FirstOrDefault(x=> !stockInfos.Select(x=>x.PalletCode).ToList().Contains(x.PalletCode)); |
| | | return content.Error($"æªæ¾å°{stockViewDTO?.PalletCode}åºå"); |
| | | } |
| | | //è·åè´§ä½ |
| | | List<string> locStrs = stockInfos.Select(x => x.LocationCode).ToList(); |
| | | List<Dt_LocationInfo> locationInfos =_basicRepository.LocationInfoRepository.QueryData(x=> locStrs.Contains(x.LocationCode)); |
| | | if (stockInfos.Count != locationInfos.Count) |
| | | { |
| | | string? locStr = locStrs.FirstOrDefault(x=> !locationInfos.Select(x => x.LocationCode).ToList().Contains(x)); |
| | | return content.Error($"æªæ¾å°{locStr}è´§ä½æ°æ®"); |
| | | } |
| | | Dt_TakeStockOrder takeStockOrder = new Dt_TakeStockOrder() |
| | | { |
| | | WarehouseId = stockInfos.FirstOrDefault().WarehouseId, |
| | | TakeStockStatus = TakeStockStatusEnum.çç¹ä¸.ObjToInt(), |
| | | Details = new List<Dt_TakeStockOrderDetail>() |
| | | }; |
| | | foreach (var item in stockInfos) |
| | | { |
| | | if (item.Details.Count<=0) |
| | | { |
| | | return content.Error($"æªæ¾å°{item.PalletCode}åºåæç»æ°æ®"); |
| | | } |
| | | Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x=>x.LocationCode==item.LocationCode); |
| | | if (locationInfo != null && (locationInfo.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || locationInfo.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && locationInfo.LocationStatus == LocationStatusEnum.InStock.ObjToInt() && item.StockStatus == StockStatusEmun.å
¥åºå®æ.ObjToInt()) |
| | | { |
| | | //å建æç» |
| | | Dt_TakeStockOrderDetail takeStockOrderDetail = new Dt_TakeStockOrderDetail() |
| | | { |
| | | MaterielCode= item.Details.FirstOrDefault().MaterielCode, |
| | | MaterielName=item.Details.FirstOrDefault().MaterielName ?? "æ ç©æåç§°", |
| | | BatchNo=item.Details.FirstOrDefault().BatchNo, |
| | | MaterielSpec=item.Details.FirstOrDefault().MaterielSpec ?? "æ ç©æè§æ ¼", |
| | | LocationCode=item.LocationCode, |
| | | TakePalletCode=item.PalletCode, |
| | | TakeDetalStatus=TakeStockDetailStatusEnum.çç¹åºåºä¸.ObjToInt(), |
| | | Unit=item.Details.FirstOrDefault().Unit ?? "æ åä½", |
| | | SysQty=item.Details.Sum(x=>x.StockQuantity), |
| | | Qty=0 |
| | | }; |
| | | takeStockOrder.Details.Add(takeStockOrderDetail); |
| | | } |
| | | else |
| | | { |
| | | content.Error($"è´§ä½æåºåç¶æä¸æ»¡è¶³åºåºæ¡ä»¶"); |
| | | } |
| | | } |
| | | List<Dt_Task> tasks = GetTasks(stockInfos, TaskTypeEnum.OutInventory); |
| | | if (tasks == null || tasks.Count <= 0) |
| | | { |
| | | return content.Error($"çæä»»å¡å¤±è´¥"); |
| | | } |
| | | stockInfos.ForEach(x => |
| | | { |
| | | x.StockStatus = StockStatusEmun.åºåºéå®.ObjToInt(); |
| | | }); |
| | | LocationStatusEnum locationStatus = LocationStatusEnum.Lock; |
| | | _unitOfWorkManage.BeginTran(); |
| | | //æ´æ°åºåç¶æ |
| | | _stockRepository.StockInfoRepository.UpdateData(stockInfos); |
| | | _inboundRepository.TakeStockOrderRepository.Db.InsertNav(takeStockOrder).Include(x=>x.Details).ExecuteCommand(); |
| | | //æ°å»ºä»»å¡ |
| | | BaseDal.AddData(tasks); |
| | | //å å
¥è´§ä½åå¨è®°å½ |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfos, locationStatus, LocationChangeType.OutboundAssignLocation, "", tasks?.Select(x => x.TaskNum).ToList()); |
| | | _basicService.LocationInfoService.Repository.UpdateLocationStatus(locationInfos, locationStatus); |
| | | _unitOfWorkManage.CommitTran(); |
| | | PushTasksToWCS(tasks); |
| | | content.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | /// <summary> |
| | | /// çææååºåºä»»å¡ |
| | | /// </summary> |
| | | /// <param name="ProOutNo">åºåºè®¢åå·</param> |
| | |
| | | { |
| | | return Service.RequestInboundTask(saveModel); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¥è¯¢è´¨æ£æ°é |
| | | /// </summary> |
| | | [HttpPost, HttpGet, Route("InQualityConfirm"), AllowAnonymous] |
| | | public WebResponseContent InQualityConfirm(string palletCode) |
| | | { |
| | | return Service.InQualityConfirm(palletCode); |
| | | } |
| | | /// <summary> |
| | | /// 空箱å
¥åº |
| | | /// </summary> |
| | |
| | | { |
| | | return Service.GetZHMesMaterialLot(materialLot); |
| | | } |
| | | /// <summary> |
| | | /// éå®åºåçæçç¹ååºåº |
| | | /// </summary> |
| | | [HttpPost, Route("TakeOutbound"), AllowAnonymous] |
| | | public WebResponseContent TakeOutbound([FromBody] List<StockViewDTO> stockViews) |
| | | { |
| | | return Service.TakeOutbound(stockViews); |
| | | } |
| | | } |
| | | } |
| | |
| | | "Microsoft.AspNetCore": "Warning" |
| | | } |
| | | }, |
| | | "dics": "inOrderType,outOrderType,inboundState,createType,enableEnum,enableStatusEnum,locationStatusEnum,locationTypeEnum,taskTypeEnum,taskStatusEnum,outboundStatusEnum,orderDetailStatusEnum,stockStatusEmun,stockChangeType,outStockStatus,receiveOrderTypeEnum,authorityScope,authorityScopes,locationChangeType,warehouses,suppliers,taskType,receiveStatus,purchaseType,purchaseOrderStatus,printStatus,returnStatus,returnType,outLockStockStatusEnum,checkOrderStatusEnum,checkUploadEnum,checkAcceptEnum,proStockAttributeEnum,materielSourceTypeEnum,materielTypeEnum,customerOutRuleEnum,proScrapStatusEnum,checkTypeEnum,inspectAcceptEnum,inspectResultEnum", |
| | | "dics": "inOrderType,outOrderType,inboundState,createType,enableEnum,enableStatusEnum,locationStatusEnum,locationTypeEnum,taskTypeEnum,taskStatusEnum,outboundStatusEnum,orderDetailStatusEnum,stockStatusEmun,stockChangeType,outStockStatus,receiveOrderTypeEnum,authorityScope,authorityScopes,locationChangeType,warehouses,suppliers,taskType,receiveStatus,purchaseType,purchaseOrderStatus,printStatus,returnStatus,returnType,outLockStockStatusEnum,checkOrderStatusEnum,checkUploadEnum,checkAcceptEnum,proStockAttributeEnum,materielSourceTypeEnum,materielTypeEnum,customerOutRuleEnum,proScrapStatusEnum,checkTypeEnum,inspectAcceptEnum,inspectResultEnum,takeStockDetailStatusEnum", |
| | | "AllowedHosts": "*", |
| | | "ConnectionStringsEncryption": false, |
| | | "MainDB": "DB_WIDESEA", //å½å项ç®ç主åºï¼æå¯¹åºçè¿æ¥å符串çEnabledå¿
须为true |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/stash/InspectIn", |
| | | "style": { |
| | | "navigationBarTitleText": "鿣å
¥åº", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/stash/AGVFinish", |
| | | "style": { |
| | | "navigationBarTitleText": "AGV宿", |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <uni-segmented-control style="margin-top: 15rpx;" :current="current" :values="items" @clickItem="onClickItem"> |
| | | </uni-segmented-control> |
| | | <view class="content"> |
| | | <!-- <view v-if="current === 0" class="headerstyle"> |
| | | <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 label="å
ç®±æ ç¾:"> |
| | | <uni-easyinput type="text" placeholder="è¯·æ«æå
ç®±æ ç¾" ref='midInput' :focus="focus" |
| | | v-model="materSn" @input="snInput" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label="Testlabel" v-if="Test"> |
| | | <uni-easyinput type="text" :placeholder="Testplaceholder" ref='midInput' |
| | | v-model="Initiallife" /> |
| | | </uni-forms-item> |
| | | |
| | | <uni-forms-item> |
| | | <button @click="submit" type="primary" size="default" style="margin-top: 2%;">ç»ç</button> |
| | | </uni-forms-item> |
| | | </uni-forms> |
| | | <uni-list> |
| | | |
| | | <uni-list-item direction="column" v-for="(item,index) in matInfos" :key="index"> |
| | | <template v-slot:body> |
| | | <view class="uni-list-box"> |
| | | <uni-icons type="trash" size="22" style="position: absolute;right: 5%;" |
| | | @click="deleteList(index)"> |
| | | </uni-icons> |
| | | <view class="uni-content"> |
| | | <view class="uni-title-sub uni-ellipsis-2">éè´åå·ï¼{{item.purchaseOrderNo}}</view> |
| | | <view class="uni-note">ç©æç¼ç ï¼{{item.materielCode}}</view> |
| | | <view class="uni-note">æ¹æ¬¡å·ï¼{{item.lotNo}}</view> |
| | | <view class="uni-note">æ°éï¼{{item.quantity}}</view> |
| | | <view class="uni-note">çäº§æ¥æï¼{{item.productionDate}}</view> |
| | | <view class="uni-note">æææï¼{{item.effectiveDate}}</view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | </uni-list-item> |
| | | </uni-list> |
| | | </view> |
| | | </view> --> |
| | | <view v-if="current === 0" class="headerstyle"> |
| | | <view class="itemstyle"> |
| | | <uni-forms label-width="120"> |
| | | <uni-forms-item label="æçæ¡ç "> |
| | | <uni-easyinput type="text" :focus="!addressFocus" v-model="inboundBarcode" |
| | | placeholder="è¯·æ«ææçæ¡ç " ref='midInput' @confirm="inputChangebarcode" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="å°åæ¡ç "> |
| | | <uni-easyinput type="text" v-model="address" :disabled="addressdisabled" |
| | | placeholder="è¯·æ«æå°åæ¡ç " ref='midInput' :focus="addressFocus" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item> |
| | | <button @click="inbound" type="primary" size="default" style="margin-top: 2%;">å
¥åºç¡®è®¤</button> |
| | | </uni-forms-item> |
| | | </uni-forms> |
| | | </view> |
| | | <view> |
| | | <view class="uni-content" v-if="checkStockInfo" style="width: 500rpx; margin: 0px auto;"> |
| | | <view class="uni-title-sub uni-ellipsis-2" style="font-size: 16px;">ç©æç¼å·ï¼{{checkStockInfo.materielCode}}</view> |
| | | <view class="uni-note" style="font-size: 16px;">æ£éªæ°éï¼{{checkStockInfo.receivedQuantity}}</view> |
| | | <view class="uni-note" style="font-size: 16px;">æ¥åºæ°éï¼{{checkStockInfo.scrappedQuantity}}</view> |
| | | <view class="uni-note" style="font-size: 16px;">ç¹éæ°éï¼{{checkStockInfo.defectedQuantity}}</view> |
| | | <view class="uni-note" style="font-size: 16px;">åæ ¼æ°éï¼{{checkStockInfo.qualifiedQuantity}}</view> |
| | | <view class="uni-note" style="font-size: 16px;">åºåæ°éï¼{{checkStockInfo.stockQuantity}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view v-if="current === 1" class="headerstyle"> |
| | | <view class="itemstyle"> |
| | | <uni-forms label-width="180"> |
| | | <uni-forms-item label="å
ç®±æ ç¾:"> |
| | | <uni-easyinput type="text" placeholder="è¯·æ«æå
ç®±æ ç¾" ref='midInput' :focus="pkfocus" |
| | | v-model="pkmaterSn" @input="pksnInput" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item> |
| | | <button @click="pksubmit" type="primary" size="default" style="margin-top: 2%;">å
¥å¹³åº</button> |
| | | </uni-forms-item> |
| | | </uni-forms> |
| | | <uni-list> |
| | | <uni-list-item direction="column" v-for="(item,index) in pkmatInfos" :key="index"> |
| | | <template v-slot:body> |
| | | <view class="uni-list-box"> |
| | | <uni-icons type="trash" size="22" style="position: absolute;right: 5%;" |
| | | @click="pkdeleteList(index)"> |
| | | </uni-icons> |
| | | <view class="uni-content"> |
| | | <view class="uni-title-sub uni-ellipsis-2">éè´åå·ï¼{{item.purchaseOrderNo}}</view> |
| | | <view class="uni-note">ç©æç¼ç ï¼{{item.materielCode}}</view> |
| | | <view class="uni-note">æ¹æ¬¡å·ï¼{{item.lotNo}}</view> |
| | | <view class="uni-note">æ°éï¼{{item.quantity}}</view> |
| | | <view class="uni-note">çäº§æ¥æï¼{{item.productionDate}}</view> |
| | | <view class="uni-note">æææï¼{{item.effectiveDate}}</view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | </uni-list-item> |
| | | </uni-list> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <u-toast ref="uToast" /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | const innerAudioContext = uni.createInnerAudioContext(); |
| | | export default { |
| | | data() { |
| | | return { |
| | | items: ['å
¥åº'], //, 'åæ®ä¿¡æ¯', 'è§£ç' |
| | | current: 0, |
| | | matTotal: [], |
| | | matInfos: [], |
| | | orderNo: "", |
| | | label: "", |
| | | orderInfo: [], |
| | | focus: false, |
| | | pkfocus: false, |
| | | barcode: "", |
| | | materSn: "", |
| | | Initiallife: 1000, |
| | | sns: [], |
| | | sn: "", |
| | | addressFocus: false, |
| | | inboundBarcode: "", |
| | | address: "", |
| | | check: true, |
| | | value: "", |
| | | matInfo: [], |
| | | value2: "", |
| | | matTotals: [], |
| | | warehouseId: "", |
| | | Test: false, |
| | | Testlabel: "", |
| | | Testplaceholder: "", |
| | | Testcheck: false, |
| | | Summmary: 0, |
| | | stockInfoDetail: [], |
| | | addressdisabled: false, |
| | | pksns: [], |
| | | pkmaterSn: "", |
| | | pkmatInfos: [], |
| | | checkStockInfo:null |
| | | } |
| | | }, |
| | | onShow() {}, |
| | | onLoad(res) { |
| | | this.focus = false; |
| | | this.addressFocus = false; |
| | | this.orderNo = res.orderNo; |
| | | this.warehouseId = res.warehouseId; |
| | | if (this.warehouseId == 6) { //æµè¯æ¶ä»åºåºID |
| | | this.Test = true; |
| | | this.Testlabel = "åå§å¯¿å½:"; |
| | | this.Testplaceholder = "请è¾å
¥åå§å¯¿å½"; |
| | | } else if (this.warehouseId == 2) { //油墨ä»åºåºID |
| | | this.Test = true; |
| | | this.Testlabel = "æ°é:"; |
| | | this.Testplaceholder = "请è¾å
¥æ°é"; |
| | | this.Initiallife = 16; |
| | | } else if (this.warehouseId == 5) { //è¾
æä»åºåºID |
| | | this.address = "8005"; |
| | | this.items.push("å
¥å¹³åº"); |
| | | this.items[1] = "å
¥ç«åº"; |
| | | this.address = "8005"; |
| | | } else if (this.warehouseId == 3) { //è¾
æä»åºåºID |
| | | this.address = "1011"; |
| | | this.addressdisabled = true; |
| | | } |
| | | this.label = "åæ®ç¼å·ï¼" + this.orderNo; |
| | | this.getData(); |
| | | }, |
| | | methods: { |
| | | // voiceSpeech(src) { |
| | | // innerAudioContext.src = src; // '../../static/success.mp3'; |
| | | // innerAudioContext.play(); |
| | | // }, |
| | | //wmså
¥å¹³åº |
| | | pksubmit() { |
| | | if (this.pkmatInfos.length == 0) { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«æå
ç®±æ ç¾", |
| | | type: 'error' |
| | | }) |
| | | return; |
| | | } |
| | | this.$u.post('/api/InboundOrder/WMSInPinKu?warehouseId=' + this.warehouseId, this |
| | | .pksns).then(res => { |
| | | debugger |
| | | if (res.status) { |
| | | this.$refs.uToast.show({ |
| | | title: "å
¥åºæå", |
| | | type: "success" |
| | | }) |
| | | this.focus = false; |
| | | this.pkmatInfos = []; |
| | | this.pksns = []; |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | pksnInput() { |
| | | this.$nextTick(() => { |
| | | if (this.pkmaterSn != "") { |
| | | this.focus = false; |
| | | var matSn = this.pkmaterSn; |
| | | setTimeout(() => { |
| | | this.pkmaterSn = ""; |
| | | }, 10); |
| | | this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + matSn, {}).then((res) => { |
| | | if (res.status) { |
| | | this.pksns.push(res.data.serialNumber); |
| | | this.pkmatInfos.push(res.data); |
| | | if (!res.status) { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/fail.mp3'); |
| | | // }, 100); |
| | | return; |
| | | } |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/success.mp3'); |
| | | // }, 100); |
| | | return; |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/fail.mp3'); |
| | | // }, 100); |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | //è§£ç |
| | | releasebox() { |
| | | if (this.value.length == 0) { |
| | | this.$refs.uToast.show({ |
| | | title: "请æ«ç ", |
| | | type: "error" |
| | | }) |
| | | return; |
| | | } |
| | | var param; |
| | | var matInfo = this.value.split('|'); |
| | | if (matInfo.length == 7) { |
| | | param = { |
| | | MainData: { |
| | | "innerCode": this.value |
| | | } |
| | | } |
| | | } else { |
| | | param = { |
| | | MainData: { |
| | | "barcode": this.value |
| | | } |
| | | } |
| | | } |
| | | this.$u.post('/api/StockOperate/ReleaseAllBox', param).then(resdt => { |
| | | if (resdt.status) { |
| | | uni.$showMsg('è§£çæå!') |
| | | this.value = ""; |
| | | this.matInfo = []; |
| | | this.matTotals = []; |
| | | this.value2 = ""; |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: resdt.message, |
| | | type: "error" |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | releaseboxInput() { |
| | | this.$nextTick(() => { |
| | | if (this.value.length == 0) { |
| | | return; |
| | | } |
| | | var matInfo = this.value.split('|'); |
| | | this.matInfo = []; |
| | | if (matInfo.length == 7) { |
| | | this.$u.post('/api/StockOperate/GetStockInfoByInnerCode', { |
| | | MainData: { |
| | | "innerCode": this.value |
| | | } |
| | | }).then(res => { |
| | | if (res.status) { |
| | | this.matInfo = res.data.stockInfo; |
| | | this.matTotals = res.data.stockTotal; |
| | | this.value2 = res.data.barcode; |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | this.$u.post('/api/StockOperate/GetStockInfoByBarcode', { |
| | | MainData: { |
| | | "barcode": this.value |
| | | } |
| | | }).then(res => { |
| | | if (res.status) { |
| | | this.matInfo = res.data.stockInfo; |
| | | this.matTotals = res.data.stockTotal; |
| | | this.value2 = res.data.barcode; |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | updateFocus() { |
| | | debugger |
| | | this.$nextTick(() => { |
| | | this.materSn = ''; |
| | | if (!this.focus) { |
| | | this.focus = true; |
| | | } |
| | | }); |
| | | }, |
| | | barcodeFocus() { |
| | | debugger |
| | | this.barcode = ''; |
| | | if (this.focus) { |
| | | this.focus = false; |
| | | } |
| | | }, |
| | | getData() { |
| | | var postData = { |
| | | MainData: { |
| | | orderNo: this.orderNo |
| | | }, |
| | | } |
| | | this.$u.post('/api/InboundOrderDetail/GetInboundOrderDetails', postData).then((res) => { |
| | | if (res.status) { |
| | | this.orderInfo = res.data; |
| | | if (this.orderInfo.length > 3) { |
| | | this.loadVisible = true; |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | onClickItem(e) { |
| | | this.focus = false; |
| | | this.addressFocus = false; |
| | | if (this.current !== e.currentIndex) { |
| | | this.current = e.currentIndex; |
| | | if (this.current == 2) { |
| | | this.getData(); |
| | | } |
| | | } |
| | | }, |
| | | barcodeInput() { |
| | | this.$nextTick(function(x) { |
| | | if (this.barcode.length > 0) { |
| | | // if (this.barcode.substring(0, 1) == 'A' || this.barcode.substring(0, 2) == 'TP') { |
| | | this.focus = true; |
| | | // } else { |
| | | // this.$refs.uToast.show({ |
| | | // title: "æ«ç é误,è¯·æ«ææçç ", |
| | | // type: "error" |
| | | // }) |
| | | // } |
| | | } |
| | | }) |
| | | }, |
| | | snInput() { |
| | | this.$nextTick(() => { |
| | | if (this.warehouseId == 6 || this.warehouseId == 2 || this.warehouseId == 3) { |
| | | if (this.sns.length > 0) { |
| | | this.sns = []; |
| | | } |
| | | } |
| | | if (this.materSn != "") { |
| | | this.focus = false; |
| | | if (this.warehouseId == 11) { |
| | | this.materSn = this.materSn.replace(/,SC.*/, ''); |
| | | } |
| | | if (this.materSn.split(',').length != 6) { |
| | | this.materSn = ""; |
| | | return; |
| | | } |
| | | var matSn = this.materSn; |
| | | //setTimeout(() => { |
| | | this.materSn = ""; |
| | | //}, 10); |
| | | this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + matSn, {}).then((res) => { |
| | | this.Testcheck = false; |
| | | if (res.status) { |
| | | this.sns.push(res.data.serialNumber); |
| | | if (this.warehouseId == 6 || this.warehouseId == 2 || this.warehouseId == |
| | | 3) { |
| | | if (this.matInfos.length > 0) { |
| | | this.matInfos = []; |
| | | } |
| | | } |
| | | this.matInfos.push(res.data); |
| | | if (!res.status) { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/fail.mp3'); |
| | | // }, 100); |
| | | return; |
| | | } |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/success.mp3'); |
| | | // }, 100); |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/fail.mp3'); |
| | | // }, 100); |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | inbound() { |
| | | if (this.inboundBarcode == "") { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«ææçæ¡ç ", |
| | | type: "error" |
| | | }) |
| | | return; |
| | | } |
| | | if (this.address == "") { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«æå°åæ¡ç ", |
| | | type: "error" |
| | | }) |
| | | return; |
| | | } |
| | | var postData = { |
| | | MainData: { |
| | | "barcode": this.inboundBarcode, |
| | | "startPoint": this.address, |
| | | "warehouseId": this.warehouseId |
| | | } |
| | | } |
| | | this.$u.post('/api/Task/RequestInboundTask', postData).then(res => { |
| | | if (res.status) { |
| | | this.inboundBarcode = ""; |
| | | if (this.warehouseId != 5 && this.warehouseId != 3) this.address = ""; |
| | | this.checkStockInfo=null; |
| | | setTimeout(() => { |
| | | this.addressFocus = false; |
| | | this.$refs.uToast.show({ |
| | | title: "æå", |
| | | type: "success" |
| | | }) |
| | | }, 200); |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | } |
| | | }).catch(err => { |
| | | this.$refs.uToast.show({ |
| | | title: err.message, |
| | | type: "error" |
| | | }) |
| | | }) |
| | | }, |
| | | inputChangebarcode() { |
| | | this.addressFocus = false; |
| | | this.$nextTick(function(x) { |
| | | if (this.inboundBarcode != '') { |
| | | this.addressFocus = true; |
| | | } |
| | | }) |
| | | this.$nextTick(function(x) { |
| | | if (this.inboundBarcode != '') { |
| | | this.$u.post('/api/Task/InQualityConfirm?palletCode='+this.inboundBarcode, {}).then(res => { |
| | | // this.stockInfo = []; |
| | | this.checkStockInfo=null; |
| | | if (res.status) { |
| | | // this.stockInfo = res.data, |
| | | this.checkStockInfo = res.data; |
| | | } else { |
| | | this.inboundBarcode=''; |
| | | this.$refs.uToast.show({ |
| | | // title: "æªæ¾å°æçä¿¡æ¯", |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | deleteList(res) { |
| | | this.matInfos.splice(res, 1); |
| | | this.sns.splice(res, 1); |
| | | }, |
| | | submit() { |
| | | if (this.barcode == "") { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«ææçæ¡ç ", |
| | | type: 'error' |
| | | }) |
| | | return; |
| | | } |
| | | if (this.matInfos.length == 0) { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«æå
ç®±æ ç¾", |
| | | type: 'error' |
| | | }) |
| | | return; |
| | | } |
| | | if (this.Test) { |
| | | if (!this.Testcheck) { |
| | | this.Testcheck = true; |
| | | if (this.warehouseId == 2) { |
| | | this.$refs.uToast.show({ |
| | | title: "请确认æ°é", |
| | | type: 'error' |
| | | }) |
| | | } else if (this.warehouseId == 6) { |
| | | this.$refs.uToast.show({ |
| | | title: "请确认åå§å¯¿å½", |
| | | type: 'error' |
| | | }) |
| | | } |
| | | return; |
| | | } |
| | | } |
| | | if (this.warehouseId == 2) { //油墨ä»åºåºID |
| | | this.sn = this.sns[0]; |
| | | for (var i = 0; i < this.Initiallife - 1; i++) { |
| | | this.sns.push(this.sn); |
| | | } |
| | | } |
| | | let url = 'palletCode=' + this.barcode + '&initiallife=' + this.Initiallife + '&warehouseId=' + this |
| | | .warehouseId; |
| | | |
| | | this.$u.post('/api/InboundOrder/ManualMaterielGroup?' + url, this.sns).then(res => { |
| | | this.Testcheck = false; |
| | | if (res.status) { |
| | | this.$refs.uToast.show({ |
| | | title: "ç»çæå", |
| | | type: "success" |
| | | }) |
| | | this.focus = false; |
| | | this.barcode = ""; |
| | | this.matInfos = []; |
| | | this.sns = []; |
| | | this.matTotal = []; |
| | | } 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> |
| | |
| | | <uni-forms label-width="180"> |
| | | <uni-forms-item label="æçæ¡ç :"> |
| | | <uni-easyinput type="text" placeholder="è¯·æ«ææçæ¡ç " ref='midInput' :focus="!focus" |
| | | v-model="barcode" @input="barcodeInput" /> |
| | | v-model="barcode" @confirm="barcodeInput" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="å
ç®±æ ç¾:"> |
| | | <uni-easyinput type="text" placeholder="è¯·æ«æå
ç®±æ ç¾" ref='midInput' :focus="focus" |
| | | v-model="materSn" @input="snInput" /> |
| | | v-model="materSn" @confirm="snInput" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label="Testlabel" v-if="Test"> |
| | | <uni-easyinput type="text" :placeholder="Testplaceholder" ref='midInput' |
| | |
| | | <uni-forms label-width="120"> |
| | | <uni-forms-item label="æçæ¡ç "> |
| | | <uni-easyinput type="text" :focus="!addressFocus" v-model="inboundBarcode" |
| | | placeholder="è¯·æ«ææçæ¡ç " ref='midInput' @input="inputChangebarcode" /> |
| | | placeholder="è¯·æ«ææçæ¡ç " ref='midInput' @confirm="inputChangebarcode" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="å°åæ¡ç "> |
| | | <uni-easyinput type="text" v-model="address" :disabled="addressdisabled" |
| | |
| | | <uni-forms label-width="180"> |
| | | <uni-forms-item label="å
ç®±æ ç¾:"> |
| | | <uni-easyinput type="text" placeholder="è¯·æ«æå
ç®±æ ç¾" ref='midInput' :focus="pkfocus" |
| | | v-model="pkmaterSn" @input="pksnInput" /> |
| | | v-model="pkmaterSn" @confirm="pksnInput" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item> |
| | | <button @click="pksubmit" type="primary" size="default" style="margin-top: 2%;">å
¥å¹³åº</button> |
| | |
| | | </uni-forms-item> |
| | | <uni-forms-item label="æçæ¡ç :"> |
| | | <uni-easyinput type="text" placeholder="è¯·æ«ææçæ¡ç " ref='midInput' :focus="!focus" |
| | | v-model="barcode" @input="barcodeInput" /> |
| | | v-model="barcode" @confirm="barcodeInput" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="å
ç®±æ ç¾:"> |
| | | <uni-easyinput type="text" placeholder="è¯·æ«æå
ç®±æ ç¾" ref='midInput' :focus="focus" |
| | | v-model="materSn" @input="snInput" /> |
| | | v-model="materSn" @confirm="snInput" /> |
| | | </uni-forms-item> |
| | | |
| | | <uni-forms-item :label="Testlabel" v-if="Test"> |
| | |
| | | <uni-forms label-width="120"> |
| | | <uni-forms-item label="æçæ¡ç "> |
| | | <uni-easyinput type="text" :focus="!addressFocus" v-model="inboundBarcode" |
| | | placeholder="è¯·æ«ææçæ¡ç " ref='midInput' @input="inputChangebarcode" /> |
| | | placeholder="è¯·æ«ææçæ¡ç " ref='midInput' @confirm="inputChangebarcode" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="å°åæ¡ç "> |
| | | <uni-easyinput type="text" v-model="address" :disabled="addressdisabled" |
| | |
| | | <uni-forms label-width="180"> |
| | | <uni-forms-item label="å
ç®±æ ç¾:"> |
| | | <uni-easyinput type="text" placeholder="è¯·æ«æå
ç®±æ ç¾" ref='midInput' :focus="!pkfocus" |
| | | v-model="pkmaterSn" @input="pksnInput" /> |
| | | v-model="pkmaterSn" @confirm="pksnInput" /> |
| | | </uni-forms-item> |
| | | |
| | | <uni-forms-item> |
| | |
| | | <!-- <uni-forms-item label="åæ®ç±»åï¼çäº§é¢æå" style="margin-top: -20px;"></uni-forms-item> --> |
| | | <uni-forms-item label="å
ç®±ç ï¼" style="margin-top: -20px;"> |
| | | <uni-easyinput type="text" placeholder="è¯·æ«æå
ç®±ç " ref='midInput' :focus="!focus" |
| | | v-model="innerCode" @input="innercodeInput" /> |
| | | v-model="innerCode" @confirm="innercodeInput" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label="PurchaseOrderNo" style="margin-top: -20px;"></uni-forms-item> |
| | | <uni-forms-item :label="matCode" style="margin-top: -20px;"></uni-forms-item> |