| | |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" /> |
| | | <PackageReference Include="WIDESEAWCS_Core" Version="1.0.11" /> |
| | | <PackageReference Include="WIDESEAWCS_Core" Version="1.0.12" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | |
| | | { |
| | | agvTask.TaskState = TaskStatusEnum.AGV_Executing.ObjToInt(); |
| | | //agvTask.Remark = content.Data.ObjToString(); |
| | | _taskService.UpdateTask(agvTask, TaskStatusEnum.AGV_Executing); |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | if (WaitToTask.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup) |
| | | { |
| | | if (WaitToTasks.FirstOrDefault(x=>x.TaskState==TaskStatusEnum.AGV_Puting.ObjToInt())!=null) |
| | | if (WaitToTasks.FirstOrDefault(x=>x.TaskState==TaskStatusEnum.AGV_Puting.ObjToInt() || x.TaskState == TaskStatusEnum.Finish.ObjToInt()) !=null) |
| | | { |
| | | continue; |
| | | } |
| | |
| | | if (content.Status && WaitToTask.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup) |
| | | { |
| | | WaitToTask.TaskState = TaskStatusEnum.AGV_Puting.ObjToInt(); |
| | | _taskService.UpdateTask(WaitToTask, TaskStatusEnum.AGV_Puting); |
| | | break; |
| | | } |
| | | else if (content.Status && WaitToTask.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) |
| | | { |
| | | WaitToTask.TaskState = TaskStatusEnum.AGV_Executing.ObjToInt(); |
| | | _taskService.UpdateTask(WaitToTask, TaskStatusEnum.AGV_Executing); |
| | | } |
| | | else |
| | | { |
| | | WaitToTask.TaskState = TaskStatusEnum.Exception.ObjToInt(); |
| | | WaitToTask.ExceptionMessage = content.Message; |
| | | _taskService.UpdateTask(WaitToTask, TaskStatusEnum.Exception); |
| | | } |
| | | } |
| | | _taskService.UpdateData(WaitToTasks); |
| | |
| | | _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: item.StationDeviceCode, roadwayNo: responseContent.Data.ToString() ?? ""); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (conveyorLineInfoWrite.Spare2 != 0) |
| | | { |
| | | WriteDebug(device.DeviceName, $"å¯å¨ä¿¡å·å·²åå
¥"); |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | |
| | |
| | | device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode); |
| | | _taskService.UpdateTask(task, taskState, currentAddress: currentAddress, nextAddress: nextAddress, targetAddress: targetAddress, deviceCode: deviceCode); |
| | | } |
| | | else |
| | | { |
| | | WriteInfo(device.DeviceName, $"æªæ¾å°æç{conveyorLineInfoRead.Barcode}对åºçä»»å¡ä¿¡æ¯"); |
| | | } |
| | | #endregion |
| | | } |
| | | else//ç产éåº |
| | |
| | | } |
| | | else if (conveyorLineSignalRead.STB /*&& conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm*/ && !conveyorLineSignalWrite.ACK && conveyorLineInfoRead.TaskNum > 0)//åºåº |
| | | { |
| | | WriteDebug(device.DeviceName, $"ä»»å¡å®æ,ä»»å¡å·:{conveyorLineInfoRead.TaskNum}"); |
| | | _taskService.TaskCompleted(conveyorLineInfoRead.TaskNum); |
| | | device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode); |
| | | } |
| | |
| | | Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StackerCraneStationCode == task.NextAddress); |
| | | if (stationManger == null) |
| | | { |
| | | _taskExecuteDetailService.AddTaskExecuteDetail(taskNum, $"è¾é线åºåºç«ç¹æªé
ç½®,{task.NextAddress}"); |
| | | //_taskExecuteDetailService.AddTaskExecuteDetail(taskNum, $"è¾é线åºåºç«ç¹æªé
ç½®,{task.NextAddress}"); |
| | | _taskService.UpdateTaskExceptionMessage(taskNum, $"è¾é线åºåºç«ç¹æªé
ç½®,{task.NextAddress}"); |
| | | WriteInfo(deviceCode, $"è¾é线åºåºç«ç¹æªé
ç½®,{task.NextAddress}"); |
| | | WriteError(deviceCode, $"è¾é线åºåºç«ç¹æªé
ç½®,{task.NextAddress}"); |
| | | return WebResponseContent.Instance.Error($"è¾é线åºåºç«ç¹æªé
ç½®,{task.NextAddress}"); |
| | | } |
| | | Dt_Router router = _routerRepository.QueryFirst(x => x.InOutType == task.TaskType && x.StartPosi == stationManger.StationCode); |
| | | if (router == null) |
| | | { |
| | | _taskExecuteDetailService.AddTaskExecuteDetail(taskNum, $"æªæ¾å°è·¯ç±ä¿¡æ¯,{task.NextAddress}"); |
| | | //_taskExecuteDetailService.AddTaskExecuteDetail(taskNum, $"æªæ¾å°è·¯ç±ä¿¡æ¯,{task.NextAddress}"); |
| | | _taskService.UpdateTaskExceptionMessage(taskNum, $"æªæ¾å°è·¯ç±ä¿¡æ¯,{task.NextAddress}"); |
| | | WriteError(deviceCode, $"æªæ¾å°è·¯ç±ä¿¡æ¯,{task.NextAddress}"); |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°è·¯ç±ä¿¡æ¯,{task.NextAddress}"); |
| | | } |
| | | |
| | |
| | | stackerCraneTaskCommand.Barcode = task.PalletCode; |
| | | stackerCraneTaskCommand.TaskNum = task.TaskNum; |
| | | stackerCraneTaskCommand.WorkType = 1; |
| | | stackerCraneTaskCommand.TrayType = (Int16)task.PalletType; |
| | | stackerCraneTaskCommand.TrayType = (short)task.PalletType; |
| | | if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)//夿æ¯å¦æ¯å
¥åºä»»å¡ |
| | | { |
| | | string[] startCodes = task.CurrentAddress.Split("-"); |
| | |
| | | } |
| | | else if (leisure && !tray && !requestIn && !inbounding && !requestOut && !outbounding) |
| | | { |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.TaskState == TaskStatusEnum.New.ObjToInt() && string.IsNullOrEmpty(x.TargetAddress) && _taskService.TaskOutboundTypes.Contains(x.TaskType) && x.TaskType != TaskTypeEnum.MesOutbound.ObjToInt()); |
| | | Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.StationCode == deviceChildCode); |
| | | if (stationManger == null) |
| | | { |
| | | WriteError(hoister.DeviceName, $"æªæ¾å°å¯¹åºç«å°ä¿¡æ¯,设å¤ç¼å·:{deviceChildCode}"); |
| | | break; |
| | | } |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.TaskState == TaskStatusEnum.New.ObjToInt() && string.IsNullOrEmpty(x.TargetAddress) && _taskService.TaskOutboundTypes.Contains(x.TaskType) && x.TaskType != TaskTypeEnum.MesOutbound.ObjToInt() && x.Roadway== stationManger.StackerCraneCode); |
| | | if (task != null) |
| | | { |
| | | task.TaskState=TaskStatusEnum.HT_Executing.ObjToInt(); |
| | |
| | | onClick: function () { |
| | | } |
| | | }, |
| | | { |
| | | name: "æ§è¡åºåº", |
| | | icon: '', |
| | | class: '', |
| | | value: 'ExecuteOutbound', |
| | | type: 'success', |
| | | onClick: function () { |
| | | } |
| | | }, |
| | | ] |
| | | |
| | | export default buttons |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <vol-box |
| | | v-model="showDetailBox" |
| | | :lazy="true" |
| | | width="60%" |
| | | :padding="15" |
| | | title="Mesåºåºå(æ°å»º)" |
| | | > |
| | | <div> |
| | | <el-form :inline="true" :model="formData" ref="formData"> |
| | | <el-form-item |
| | | label="æå±ä»åº:" |
| | | style="width: 30%" |
| | | required |
| | | prop="warehouseId" |
| | | > |
| | | <el-select v-model="formData.warehouseId" placeholder="è¯·éæ©ä»åº"> |
| | | <el-option label="æ¿æä»" value="3"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item |
| | | label="ç©æç¼ç :" |
| | | style="width: 30%" |
| | | required |
| | | prop="materialCode" |
| | | > |
| | | <el-input |
| | | v-model="formData.materialCode" |
| | | placeholder="请è¾å
¥ç©æç¼ç " |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | label="åºåºæ°é:" |
| | | style="width: 30%" |
| | | required |
| | | prop="num" |
| | | > |
| | | <el-input-number |
| | | v-model="formData.num" |
| | | :min="1" |
| | | label="请è¾å
¥åºåºæ°é" |
| | | ></el-input-number> |
| | | </el-form-item> |
| | | <el-form-item |
| | | label="åºåºå°å:" |
| | | style="width: 30%" |
| | | required |
| | | prop="outAddress" |
| | | > |
| | | <el-select |
| | | v-model="formData.outAddress" |
| | | placeholder="è¯·éæ©åºåºå°å" |
| | | > |
| | | <el-option label="ä¸å··éäºå±ä¸æä½" value="1011"></el-option> |
| | | <el-option label="SCUTL-001" value="SCUTL-001"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="ä»åº"> |
| | | <el-col :span="8"> |
| | | <el-select v-model="warehouseId" placeholder="è¯·éæ©ä»åº"> |
| | | <el-option label="æ¿æä»" value="3"></el-option> |
| | | </el-select> |
| | | </el-col> |
| | | </el-form-item> --> |
| | | </el-form> |
| | | </div> |
| | | |
| | | <template #footer> |
| | | <el-button type="primary" size="small" @click="add">ç¡®å®</el-button> |
| | | <el-button type="danger" size="small" @click="showDetailBox = false" |
| | | >å
³é</el-button |
| | | > |
| | | </template> |
| | | </vol-box> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import VolBox from "@/components/basic/VolBox.vue"; |
| | | export default { |
| | | components: { VolBox }, |
| | | data() { |
| | | return { |
| | | showDetailBox: false, |
| | | formData: { |
| | | warehouseId: "", |
| | | materialCode: "", |
| | | num: 1, |
| | | outAddress: "", |
| | | }, |
| | | }; |
| | | }, |
| | | methods: { |
| | | open() { |
| | | this.showDetailBox = true; |
| | | }, |
| | | add() { |
| | | var params = { |
| | | //warehouseId: this.formData.warehouseId, |
| | | materialCode: this.formData.materialCode, |
| | | requiredQuantity: this.formData.num, |
| | | line: this.formData.outAddress, |
| | | }; |
| | | |
| | | this.http |
| | | .post("/api/mesOutboundOrder/AddMesOrder", params, "æ°æ®å¤çä¸...") |
| | | .then((res) => { |
| | | if (!res.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | | this.showDetailBox = false; |
| | | this.$emit("parentCall", ($vue) => { |
| | | $vue.refresh(); |
| | | }); |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .less-style { |
| | | color: black; |
| | | } |
| | | |
| | | .equle-style { |
| | | color: green; |
| | | } |
| | | |
| | | .more-style { |
| | | color: red; |
| | | } |
| | | </style> |
| | | |
| | | <style> |
| | | .text-button:hover { |
| | | background-color: #f0f9eb !important; |
| | | } |
| | | |
| | | .el-table .warning-row { |
| | | background: oldlace; |
| | | } |
| | | |
| | | .box-table .el-table tbody tr:hover > td { |
| | | background-color: #d8e0d4 !important; |
| | | /* color: #ffffff; */ |
| | | } |
| | | |
| | | .box-table .el-table tbody tr.current-row > td { |
| | | background-color: #f0f9eb !important; |
| | | /* color: #ffffff; */ |
| | | } |
| | | |
| | | .el-table .success-row { |
| | | background: #f0f9eb; |
| | | } |
| | | |
| | | .box-table .el-table { |
| | | border: 1px solid #ebeef5; |
| | | } |
| | | |
| | | .box-head .el-alert__content { |
| | | width: 100%; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | import gridBody from './extend/addMesOutOrder.vue' |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: gridBody, |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | |
| | | let addButton = this.buttons.find(item => item.value == 'Add'); |
| | | if (addButton) { |
| | | addButton.onClick = () => { |
| | | this.$refs.gridBody.open(); |
| | | } |
| | | } |
| | | |
| | | let executeOutbound = this.buttons.find(item => item.value == 'ExecuteOutbound'); |
| | | if (executeOutbound) { |
| | | executeOutbound.onClick = () => { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©æ°æ®!"); |
| | | if (rows.length > 1) return this.$error("è¯·éæ©ä¸æ¡æ°æ®!"); |
| | | var param = rows[0].taskNum; |
| | | this.http |
| | | .post("api/Task/HandSubstrateOut?orderId=" + rows[0].id, "æ°æ®å¤çä¸...") |
| | | .then((x) => { |
| | | if (x.status) { |
| | | this.$Message.success('æ°æ®å¤çæå.'); |
| | | this.refresh(); |
| | | } else { |
| | | return this.$error(x.message); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | //æ©å±é¡µé¢åå§åæä½ |
| | | this.columns.push({ |
| | | field: 'æä½', |
| | | title: 'æä½', |
| | | width: 90, |
| | | fixed: 'right', |
| | | align: 'center', |
| | | formatter: (row) => { |
| | | return ( |
| | | '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">æ¥çæç»</i>' |
| | | ); |
| | | }, |
| | | click: (row) => { |
| | | this.$refs.gridBody.open(row); |
| | | } |
| | | }); |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | | //妿è¦é
ç½®æç»è¡¨,卿¤æ¹æ³æä½ |
| | | //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; |
| | |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/outbound/outboundOrderDetail.js"; |
| | | import extend from "@/extension/outbound/mesOutboundOrder.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | |
| | | /// </summary> |
| | | [Description("åºæ¿ä½æéåº")] |
| | | SubstrateBack = 200, |
| | | |
| | | /// <summary> |
| | | /// æå¨åºæ¿åºåº |
| | | /// </summary> |
| | | [Description("æå¨åºæ¿åºåº")] |
| | | HandSubstrateOut = 300, |
| | | |
| | | /// <summary> |
| | | /// æå¨åºæ¿åºåºæ£é |
| | | /// </summary> |
| | | [Description("æå¨åºæ¿åºåºæ£é")] |
| | | HandSubstrateOutPick = 400, |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | [Description("MESåºåº")] |
| | | MesOutbound = 200, |
| | | |
| | | /// <summary> |
| | | /// MESæå¨åºåº |
| | | /// </summary> |
| | | [Description("MESæå¨åºåº")] |
| | | MesHandOutbound = 210, |
| | | |
| | | /// <summary> |
| | | /// MESæå¨æ£éåºåº |
| | | /// </summary> |
| | | [Description("MESæå¨æ£éåºåº")] |
| | | MesHandPickOutbound = 220, |
| | | |
| | | /// <summary> |
| | | /// éè´å
¥åº |
| | | /// </summary> |
| | |
| | | /// <param name="tasks"></param> |
| | | /// <returns></returns> |
| | | WebResponseContent LockOutboundStockDataUpdate(List<Dt_StockInfo> stockInfos, List<Dt_OutStockLockInfo> outStockLockInfos, List<Dt_LocationInfo> locationInfos, LocationStatusEnum locationStatus = LocationStatusEnum.Lock, List<Dt_Task>? tasks = null); |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="substrateOutModel"></param> |
| | | /// <returns></returns> |
| | | WebResponseContent AddMesOrder(SubstrateOutModel substrateOutModel); |
| | | } |
| | | } |
| | |
| | | WebResponseContent AssignRoadway(List<string> roadwayNos); |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="orderId"></param> |
| | | /// <returns></returns> |
| | | WebResponseContent HandSubstrateOut(int orderId); |
| | | |
| | | /// <summary> |
| | | /// ä¿®æ¹ä»»å¡ç¶æ |
| | | /// </summary> |
| | | /// <param name="task"></param> |
| | | /// <returns></returns> |
| | | WebResponseContent UpdateTaskInfo(WCSTaskDTO task); |
| | | |
| | | |
| | | WebResponseContent GeneratePKOutboundTask(int orderDetailId, List<StockSelectViewDTO> stockSelectViews); |
| | | } |
| | | } |
| | |
| | | { |
| | | return WebResponseContent.Instance.Error($"该éè´åæç»æ¶è´§å·²å®æ"); |
| | | } |
| | | //夿æ¯å¦åå¨å¯¹åºéè´æç»çæ¶è´§æç» |
| | | Dt_ReceiveOrderDetail? detail = receiveOrder.Details.FirstOrDefault(x => x.PurchaseOrderNo == model.PurchaseOrderNo && x.PurchaseOrderDetailRowNo == purchaseOrderDetail.RowNo); |
| | | if (detail != null && detail.ReceivedQuantity == purchaseOrderDetail.PurchaseDetailQuantity) |
| | | //å¤æè¯¥éè´åæç»æ¯å¦å·²åå¨æç» |
| | | List<Dt_ReceiveOrderDetail> details = receiveOrder.Details.Where(x => x.PurchaseOrderNo == model.PurchaseOrderNo && x.PurchaseOrderDetailRowNo == purchaseOrderDetail.RowNo && x.MaterielCode == model.MaterielCode).ToList(); |
| | | if (details.Count >0 && details.Sum(x=>x.ReceivedQuantity) == purchaseOrderDetail.PurchaseDetailQuantity) |
| | | { |
| | | return WebResponseContent.Instance.Error($"该æ¶è´§åæç»å·²æ¶è´§"); |
| | | } |
| | | |
| | | //è·åå
·ä½æ¹æ¬¡ |
| | | Dt_ReceiveOrderDetail? detail = details.FirstOrDefault(x => x.LotNo == model.LotNo); |
| | | lock (_rowNoLocker) |
| | | { |
| | | if (detail != null) |
| | | { |
| | | //åææ¶è´§æç»å¢å æ¶è´§æ°é |
| | | detail.ReceivedQuantity += model.Quantity; |
| | | purchaseOrderDetail.PurchaseDetailReceiveQty = detail.ReceivedQuantity; |
| | | purchaseOrderDetail.PurchaseDetailReceiveQty += model.Quantity; |
| | | if (purchaseOrderDetail.PurchaseDetailReceiveQty > purchaseOrderDetail.PurchaseDetailQuantity) |
| | | { |
| | | return WebResponseContent.Instance.Error($"éè´åè¯¥ç©ææ°éåæ¶è´§æ°éä¸ä¸è´"); |
| | |
| | | { |
| | | purchaseOrderDetail.PurchaseDetailStatus = PurchaseOrderDetailStatusEnum.Received.ObjToInt(); |
| | | } |
| | | float sumQty = purchaseOrder.Details.Sum(x => x.PurchaseDetailReceiveQty); |
| | | else |
| | | { |
| | | purchaseOrderDetail.PurchaseDetailStatus = PurchaseOrderDetailStatusEnum.Receiving.ObjToInt(); |
| | | } |
| | | float sumQty = purchaseOrder.Details.Sum(x => x.PurchaseDetailReceiveQty); //+ model.Quantity |
| | | _unitOfWorkManage.BeginTran(); |
| | | BaseDal.AddData(receiveOrderDetail); |
| | | if (purchaseOrder.OrderQuantity == sumQty) |
| | |
| | | using WIDESEA_Common.LocationEnum; |
| | | using WIDESEA_IRecordService; |
| | | using WIDESEA_Common.StockEnum; |
| | | using WIDESEA_Common.TaskEnum; |
| | | |
| | | namespace WIDESEA_OutboundService |
| | | { |
| | |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | |
| | | public WebResponseContent AddMesOrder(SubstrateOutModel substrateOutModel) |
| | | { |
| | | try |
| | | { |
| | | Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA57.ToString()); |
| | | if (warehouse == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"ä»åºåºç¡ä¿¡æ¯æªé
ç½®"); |
| | | } |
| | | |
| | | Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterielCode == substrateOutModel.MaterialCode); |
| | | if (materielInfo == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°è¯¥ç©æä¿¡æ¯"); |
| | | } |
| | | int orderType = 0; |
| | | if(substrateOutModel.Line == "1011") |
| | | { |
| | | orderType = MesOutboundOrderTypeEnum.HandSubstrateOutPick.ObjToInt(); |
| | | } |
| | | else |
| | | { |
| | | orderType = MesOutboundOrderTypeEnum.HandSubstrateOut.ObjToInt(); |
| | | } |
| | | |
| | | Dt_MesOutboundOrder mesOutboundOrder = new Dt_MesOutboundOrder() |
| | | { |
| | | CreateType = OrderCreateTypeEnum.CreateInSystem.ObjToInt(), |
| | | Line = substrateOutModel.Line, |
| | | MaterialCode = substrateOutModel.MaterialCode, |
| | | MaterialName = materielInfo.MaterielName, |
| | | OrderQuantity = substrateOutModel.RequiredQuantity, |
| | | TaskNo = DateTime.Now.ToString("yyyyMMddHHmmss"), |
| | | Unit = substrateOutModel.Unit, |
| | | OrderType = orderType, |
| | | OrderStatus = OutOrderStatusEnum.æªå¼å§.ObjToInt(), |
| | | WarehouseId = warehouse.WarehouseId |
| | | }; |
| | | |
| | | AddData(mesOutboundOrder); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | x.AuthValue = ""; |
| | | }); |
| | | //å°åæ¶çæé设置为"" |
| | | _RoleAuthRepository.UpdateData(delAuths); |
| | | _RoleAuthRepository.DeleteData(delAuths); |
| | | |
| | | int addCount = updateAuths.Where(x => x.AuthId <= 0).Count(); |
| | | int updateCount = updateAuths.Where(x => x.AuthId > 0).Count(); |
| | |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common.LocationEnum; |
| | | using WIDESEA_Common.OrderEnum; |
| | | using WIDESEA_Common.StockEnum; |
| | | using WIDESEA_Common.TaskEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_DTO; |
| | | using WIDESEA_DTO.MES; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_TaskInfoService |
| | |
| | | /// <param name="taskNum">ä»»å¡å·</param> |
| | | /// <param name="roadwayNos">å··éå·</param> |
| | | /// <returns></returns> |
| | | public WebResponseContent AssignRoadway(List<string> roadwayNos, int taskNum, int heightType = 0) |
| | | public WebResponseContent AssignRoadway(List<string> roadwayNos, int taskNum, int heightType = 0) |
| | | { |
| | | try |
| | | { |
| | | if(heightType == 0 || heightType > 3) |
| | | if (heightType == 0 || heightType > 3) |
| | | { |
| | | return WebResponseContent.Instance.Error($"é«åº¦é误"); |
| | | } |
| | |
| | | List<LocationCount> locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => (x.LocationType == task.PalletType || x.LocationType == LocationTypeEnum.Undefined.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && roadwayNos.Contains(x.RoadwayNo)).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).ToList(); |
| | | |
| | | string roadwayNo = locationCounts.OrderBy(x => x.Count).FirstOrDefault()?.RoadwayNo ?? ""; |
| | | |
| | | return !string.IsNullOrEmpty(roadwayNo) ? WebResponseContent.Instance.OK(data: roadwayNo): WebResponseContent.Instance.Error("æªæ¾å°å¯åé
å··é"); |
| | | |
| | | return !string.IsNullOrEmpty(roadwayNo) ? WebResponseContent.Instance.OK(data: roadwayNo) : WebResponseContent.Instance.Error("æªæ¾å°å¯åé
å··é"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | public class LocationCount |
| | | public WebResponseContent HandSubstrateOut(int orderId) |
| | | { |
| | | public string RoadwayNo { get; set; } |
| | | try |
| | | { |
| | | Dt_MesOutboundOrder mesOutboundOrder = _outboundService.MesOutboundOrderService.Repository.QueryFirst(x => x.Id == orderId); |
| | | if (mesOutboundOrder == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°è¯¥è®¢å"); |
| | | } |
| | | |
| | | public int Count { get; set; } |
| | | if (mesOutboundOrder.OrderStatus != OutOrderStatusEnum.æªå¼å§.ObjToInt()) |
| | | { |
| | | return WebResponseContent.Instance.Error($"该订åä¸å¯ååºåº"); |
| | | } |
| | | |
| | | List<Dt_Task> tasks = new List<Dt_Task>(); |
| | | |
| | | List<Dt_StockInfo>? stockInfos = null; |
| | | List<Dt_OutStockLockInfo>? outStockLockInfos = null; |
| | | List<Dt_LocationInfo>? locationInfos = null; |
| | | { |
| | | (List<Dt_StockInfo>, Dt_MesOutboundOrder, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.MesOutboundOrderService.AssignStockOutbound(mesOutboundOrder); |
| | | if (result.Item1 != null && result.Item1.Count > 0) |
| | | { |
| | | tasks = GetTasks(result.Item1, TaskTypeEnum.MesOutbound); |
| | | result.Item2.OrderStatus = OrderDetailStatusEnum.Outbound.ObjToInt(); |
| | | result.Item3.ForEach(x => |
| | | { |
| | | x.Status = OutLockStockStatusEnum.åºåºä¸.ObjToInt(); |
| | | }); |
| | | |
| | | stockInfos = result.Item1; |
| | | mesOutboundOrder = result.Item2; |
| | | outStockLockInfos = result.Item3; |
| | | locationInfos = result.Item4; |
| | | } |
| | | else |
| | | { |
| | | throw new Exception("æ åºå"); |
| | | } |
| | | } |
| | | |
| | | tasks.ForEach(x => |
| | | { |
| | | if (mesOutboundOrder.OrderType == MesOutboundOrderTypeEnum.HandSubstrateOut.ObjToInt()) |
| | | { |
| | | x.TaskType = TaskTypeEnum.MesHandOutbound.ObjToInt(); |
| | | } |
| | | else if (mesOutboundOrder.OrderType == MesOutboundOrderTypeEnum.HandSubstrateOutPick.ObjToInt()) |
| | | { |
| | | x.TaskType = TaskTypeEnum.MesHandPickOutbound.ObjToInt(); |
| | | } |
| | | }); |
| | | |
| | | mesOutboundOrder.OrderStatus = OutOrderStatusEnum.åºåºä¸.ObjToInt(); |
| | | |
| | | _unitOfWorkManage.BeginTran(); |
| | | |
| | | int id = BaseDal.AddData(tasks); |
| | | outStockLockInfos.ForEach(x => |
| | | { |
| | | x.OrderNo = mesOutboundOrder.TaskNo; |
| | | x.OrderDetailId = id; |
| | | }); |
| | | _outboundService.MesOutboundOrderService.Repository.UpdateData(mesOutboundOrder); |
| | | if (stockInfos != null && stockInfos.Count > 0 && outStockLockInfos != null && outStockLockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0) |
| | | { |
| | | WebResponseContent content = _outboundService.MesOutboundOrderService.LockOutboundStockDataUpdate(stockInfos, outStockLockInfos, locationInfos, tasks: tasks); |
| | | |
| | | if (!content.Status) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return WebResponseContent.Instance.Error(content.Message); |
| | | } |
| | | } |
| | | _unitOfWorkManage.CommitTran(); |
| | | PushTasksToWCS(tasks); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | public class LocationCount |
| | | { |
| | | public string RoadwayNo { get; set; } |
| | | |
| | | public int Count { get; set; } |
| | | } |
| | | } |
| | |
| | | } |
| | | if (task.TaskType == TaskTypeEnum.MesOutbound.ObjToInt()) |
| | | { |
| | | MesMaterialLotaAceptModel model = GetMesMaterialLotaAceptModel(stockInfo, stockInfo.Details.FirstOrDefault(), mesOutboundOrders.FirstOrDefault().TaskNo, warehouse.WarehouseCode, mesOutboundOrders.FirstOrDefault().OrderQuantity); |
| | | MesMaterialLotaAceptModel model = GetMesMaterialLotaAceptModel(stockInfo, stockInfo.Details.FirstOrDefault(), mesOutboundOrders.FirstOrDefault().TaskNo, warehouse.WarehouseCode, stockInfo.Details.Where(x => x.MaterielCode == mesOutboundOrders.FirstOrDefault().MaterialCode).Sum(x => x.StockQuantity)); |
| | | UploadMesMaterialLotaAcept(model); |
| | | } |
| | | return WebResponseContent.Instance.OK(); |
| | |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°åºåº"); |
| | | } |
| | | |
| | | Dt_Task task = Repository.QueryFirst(x => x.PalletCode == palletCode && x.WarehouseId == warehouseId); |
| | | if (task != null) |
| | | { |
| | |
| | | { |
| | | stockInfo.StockStatus = StockStatusEmun.å
¥åºç¡®è®¤.ObjToInt(); |
| | | } |
| | | |
| | | _unitOfWorkManage.BeginTran(); |
| | | int taskId = BaseDal.AddData(newTask); |
| | | newTask.TaskId = taskId; |
| | |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_DTO.Inbound; |
| | | using WIDESEA_DTO.MES; |
| | | using WIDESEA_DTO.Outbound; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_Model.Models; |
| | |
| | | { |
| | | |
| | | } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="substrateOutModel"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("AddMesOrder"), AllowAnonymous] |
| | | public WebResponseContent AddMesOrder([FromBody] SubstrateOutModel substrateOutModel) |
| | | { |
| | | return Service.AddMesOrder(substrateOutModel); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("TestOutUpload"), AllowAnonymous] |
| | | public WebResponseContent TestOutUpload(int id) |
| | | { |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="orderId"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("HandSubstrateOut")] |
| | | public WebResponseContent HandSubstrateOut(int orderId) |
| | | { |
| | | return Service.HandSubstrateOut(orderId); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ä¿®æ¹ä»»å¡ç¶æ |
| | | /// </summary> |
| | | /// <param name="task"></param> |
| | |
| | | let config = { |
| | | baseUrl: 'http://10.30.4.92:9283', |
| | | baseUrl: 'http://localhost:9293', |
| | | urls: [ |
| | | 'http://10.30.4.92:9283', |
| | | 'http://10.30.4.92:9283' |
| | |
| | | placeholder="è¯·æ«ææçæ¡ç " ref='midInput' @input="inputChangebarcode3" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="å°åæ¡ç "> |
| | | <uni-easyinput type="text" v-model="address" placeholder="è¯·æ«æå°åæ¡ç " ref='midInput' |
| | | <uni-easyinput type="text" v-model="address" :disabled="addressdisabled" placeholder="è¯·æ«æå°åæ¡ç " ref='midInput' |
| | | :focus="addressFocus" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item> |
| | |
| | | addressFocus: false, |
| | | inboundBarcode: "", |
| | | address: "", |
| | | addressdisabled: true, |
| | | warehouseId:"" |
| | | } |
| | | }, |
| | | onLoad(res) { |
| | | this.barcodefocus = false; |
| | | this.istrue = false; |
| | | this.warehouseId = res.warehouseId; |
| | | if (this.warehouseId == 3) { //è¾
æä»åºåºID |
| | | this.address = "1011"; |
| | | this.addressdisabled = true; |
| | | } |
| | | }, |
| | | methods: { |
| | | onClickItem(e) { |
| | | this.barcodeFo = true; |
| | | this.focus = false; |
| | | this.addressFocus = false; |
| | | if (this.current !== e.currentIndex) { |
| | |
| | | placeholder="è¯·æ«ææçæ¡ç " ref='midInput' @input="inputChangebarcode" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="å°åæ¡ç "> |
| | | <uni-easyinput type="text" v-model="address" placeholder="è¯·æ«æå°åæ¡ç " ref='midInput' |
| | | <uni-easyinput type="text" v-model="address" :disabled="addressdisabled" placeholder="è¯·æ«æå°åæ¡ç " ref='midInput' |
| | | :focus="addressFocus" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item> |
| | |
| | | Testplaceholder: "", |
| | | Testcheck: false, |
| | | Summmary:0, |
| | | stockInfoDetail:[] |
| | | stockInfoDetail:[], |
| | | addressdisabled: false |
| | | } |
| | | }, |
| | | onShow() {}, |
| | |
| | | this.Initiallife = 16; |
| | | } else if (this.warehouseId == 5) { //è¾
æä»åºåºID |
| | | this.address = "8005"; |
| | | }else if (this.warehouseId == 3) { //è¾
æä»åºåºID |
| | | this.address = "1011"; |
| | | this.addressdisabled = true; |
| | | } |
| | | this.label = "åæ®ç¼å·ï¼" + this.orderNo; |
| | | this.getData(); |
| | |
| | | placeholder="è¯·æ«ææçæ¡ç " ref='midInput' @input="inputChangebarcode3" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="å°åæ¡ç "> |
| | | <uni-easyinput type="text" v-model="address" placeholder="è¯·æ«æå°åæ¡ç " ref='midInput' |
| | | <uni-easyinput type="text" v-model="address" :disabled = "addressdisabled" placeholder="è¯·æ«æå°åæ¡ç " ref='midInput' |
| | | :focus="addressFocus" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item> |
| | |
| | | address: "", |
| | | warehouseId: 0, |
| | | Summmary: 0, |
| | | stockInfoDetail: [] |
| | | stockInfoDetail: [], |
| | | addressdisabled: false |
| | | } |
| | | }, |
| | | onLoad(res) { |
| | |
| | | this.warehouseId = res.warehouseId; |
| | | if (this.warehouseId == 5) { |
| | | this.address = "8005" |
| | | }else if (this.warehouseId == 3) { |
| | | this.address = "1011"; |
| | | this.addressdisabled = true; |
| | | } |
| | | this.istrue = false; |
| | | this.addressFocus = false; |
| | |
| | | placeholder="è¯·æ«ææçæ¡ç " ref='midInput' @input="inputChangebarcode" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="å°åæ¡ç "> |
| | | <uni-easyinput type="text" v-model="address" placeholder="è¯·æ«æå°åæ¡ç " ref='midInput' |
| | | <uni-easyinput type="text" v-model="address" :disabled="addressdisabled" placeholder="è¯·æ«æå°åæ¡ç " ref='midInput' |
| | | :focus="addressFocus" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item> |
| | |
| | | label: "", |
| | | orderInfo: [], |
| | | focus: false, |
| | | pkfocus:false, |
| | | pkfocus: false, |
| | | barcode: "", |
| | | materSn: "", |
| | | Initiallife: 1000, |
| | | sns: [], |
| | | pksns:[], |
| | | pksns: [], |
| | | addressFocus: false, |
| | | inboundBarcode: "", |
| | | address: "", |
| | |
| | | Testplaceholder: "", |
| | | Testcheck: false, |
| | | pkmaterSn: "", |
| | | pkmatInfos: [] |
| | | pkmatInfos: [], |
| | | addressdisabled: false |
| | | } |
| | | }, |
| | | onShow() {}, |
| | |
| | | this.items.push("å
¥å¹³åº"); |
| | | this.items[1] = "å
¥ç«åº"; |
| | | this.address = "8005"; |
| | | } else if (this.warehouseId == 3) { //è¾
æ |
| | | this.address = "1011"; |
| | | this.addressdisabled = true; |
| | | } |
| | | this.label = "åæ®ç¼å·ï¼" + this.orderNo; |
| | | this.getData(); |
| | |
| | | this.pkmatInfos.splice(res, 1); |
| | | this.pksns.splice(res, 1); |
| | | }, |
| | | pksubmit(){ |
| | | pksubmit() { |
| | | if (this.pkmatInfos.length == 0) { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«æå
ç®±æ ç¾", |
| | |
| | | }) |
| | | return; |
| | | } |
| | | this.$u.post('/api/InboundOrder/InPinKu?warehouseId=' + this.warehouseId+"&orderNo="+ this.orderNo, this.pksns).then(res => { |
| | | this.$u.post('/api/InboundOrder/InPinKu?warehouseId=' + this.warehouseId + "&orderNo=" + this.orderNo, this |
| | | .pksns).then(res => { |
| | | if (res.status) { |
| | | this.$refs.uToast.show({ |
| | | title: "å
¥åºæå", |
| | |
| | | </u-sticky> |
| | | <uni-list :border="true"> |
| | | <uni-list-item direction="column" clickable @click="groupClick(item.receiveOrderNo)" link |
| | | :to="page+item.receiveOrderNo+'&receiveOrderId='+item.receiveOrderId" v-for="item in allReceivingOrders" |
| | | :to="page+item.receiveOrderNo+'&receiveOrderId='+item.receiveOrderId+'&warehouseId='+warehouseId" v-for="item in allReceivingOrders" |
| | | :key="item.receiveOrderNo"> |
| | | <template v-slot:body> |
| | | <uni-group margin-top="20"> |
| | |
| | | </uni-forms-item> |
| | | </uni-forms> --> |
| | | <uni-list :border="true"> |
| | | <uni-list-item direction="column" v-for="(item,index) in orderInfo" :key="item.id"> |
| | | <uni-list-item direction="column" v-for="item in orderinfoDetails" :key="item.id"> |
| | | <template v-slot:body> |
| | | <view class="uni-content"> |
| | | <view>æ¶è´§åå·ï¼{{orderNo}}</view> |
| | |
| | | current: 0, |
| | | orderNo: "", |
| | | orderInfo: [], |
| | | orderinfoDetails:[], |
| | | label: "", |
| | | innerCode: "", |
| | | PurchaseOrderNo: "éè´åå·ï¼", |
| | |
| | | endTypeRange: [], |
| | | sns: "", |
| | | receiveOrderId: 0, |
| | | warehouseId:"" |
| | | } |
| | | }, |
| | | |
| | |
| | | this.orderNo = res.orderNo; |
| | | this.receiveOrderId = res.receiveOrderId; |
| | | this.label = "æ¶è´§åå·ï¼" + this.orderNo; |
| | | this.warehouseId=res.warehouseId; |
| | | this.getData(); |
| | | }, |
| | | mounted() { |
| | |
| | | }) |
| | | return; |
| | | } |
| | | if(this.warehouseId==2){ |
| | | //æ¿æ¢æå®ä¸¤ä¸ªå符é´çå符 |
| | | this.sns = this.sns.replace(/(Q:)([^,PO]+)(,PO)/, (match, p1, p2, p3) => { |
| | | return p1 + this.Quantity + p3; |
| | | }); |
| | | } |
| | | this.$u.post('/api/ReceiveOrderDetail/AddReceiveOrderDetail?serNum=' + this.sns + '&orderNo=' + this |
| | | .orderNo, {}).then(res => { |
| | | if (res.status) { |
| | |
| | | } |
| | | this.$u.post('/api/ReceiveOrderDetail/GetReceiveOrderInfos', postData).then((res) => { |
| | | if (res.status) { |
| | | this.orderInfo = res.data; |
| | | if (this.orderInfo.length > 3) { |
| | | this.orderinfoDetails = res.data; |
| | | if (this.orderinfoDetails.length > 3) { |
| | | this.loadVisible = true; |
| | | } |
| | | } |