From d239f2cccb5b84d52c8c202557ea8e75cc6ab984 Mon Sep 17 00:00:00 2001 From: wxw <Administrator@DESKTOP-5BIMHQ3> Date: 星期六, 14 九月 2024 16:51:17 +0800 Subject: [PATCH] 任务管理新增功能增加分配拆垛工位功能;调整分拣码垛页面,更改拆垛机器人属性 --- Admin.NET/WCS.Application/Service/WcsTask/WcsTaskService.cs | 28 ++++++++++++++ Admin.NET/WCS.Application/Service/WcsDevice/WcsDeviceService.cs | 13 ++++-- Web/src/api/wcs/wcsTask.ts | 9 ++++ Web/src/views/wcs/wcsTask/component/editDialog.vue | 6 +++ Web/src/views/device/sortPallet/index.vue | 24 ++++++++--- Admin.NET/WCS.Application/Service/WcsDevice/Dto/WcsDeviceTaskOrderDto.cs | 5 ++ Web/src/views/wcs/wcsTask/index.vue | 25 +++++++++++- 7 files changed, 95 insertions(+), 15 deletions(-) diff --git a/Admin.NET/WCS.Application/Service/WcsDevice/Dto/WcsDeviceTaskOrderDto.cs b/Admin.NET/WCS.Application/Service/WcsDevice/Dto/WcsDeviceTaskOrderDto.cs index 87420b4..4e86115 100644 --- a/Admin.NET/WCS.Application/Service/WcsDevice/Dto/WcsDeviceTaskOrderDto.cs +++ b/Admin.NET/WCS.Application/Service/WcsDevice/Dto/WcsDeviceTaskOrderDto.cs @@ -21,4 +21,9 @@ public int? Qty { get; set; } public string? LineNo { get; set; } public string? PZNo { get; set; } + + /// <summary> + /// 璁惧绫诲瀷 + /// </summary> + public PLCTypeEnum Type { get; set; } } diff --git a/Admin.NET/WCS.Application/Service/WcsDevice/WcsDeviceService.cs b/Admin.NET/WCS.Application/Service/WcsDevice/WcsDeviceService.cs index 46f52d9..71fad93 100644 --- a/Admin.NET/WCS.Application/Service/WcsDevice/WcsDeviceService.cs +++ b/Admin.NET/WCS.Application/Service/WcsDevice/WcsDeviceService.cs @@ -476,10 +476,11 @@ public async Task<List<WcsDeviceTaskOrderDto>> WcsPackStationPlcList([FromQuery] WcsDeviceBaseInput entry) { return await _wcsDeviceRep.Context.Queryable<WcsDevice>() - .LeftJoin<WcsCheckTask>((device, task) => device.StationNum == task.Port) - .Where((device, task) => device.PlcId == entry.PlcId) - .OrderBy((device, task) => device.CreateTime) - .Select((device, task) => new WcsDeviceTaskOrderDto() + .InnerJoin<WcsPlc>((device, plc) => device.PlcId == plc.Id) + .LeftJoin<WcsCheckTask>((device, plc, task) => device.StationNum == task.Port) + .Where((device, plc, task) => device.PlcId == entry.PlcId) + .OrderBy((device, plc, task) => device.CreateTime) + .Select((device, plc, task) => new WcsDeviceTaskOrderDto() { Id = device.Id, Text = device.Text, @@ -491,7 +492,9 @@ LineNo = task.LineNo, Status = task.Status, PZNo = task.PZNo, - Qty = task.Qty + Qty = task.Qty, + + Type = plc.Type }) .ToListAsync(); } diff --git a/Admin.NET/WCS.Application/Service/WcsTask/WcsTaskService.cs b/Admin.NET/WCS.Application/Service/WcsTask/WcsTaskService.cs index deb8a45..736bb52 100644 --- a/Admin.NET/WCS.Application/Service/WcsTask/WcsTaskService.cs +++ b/Admin.NET/WCS.Application/Service/WcsTask/WcsTaskService.cs @@ -1,5 +1,6 @@ 锘� using AngleSharp.Dom; +using COSXML.Network; using Elastic.Clients.Elasticsearch.Tasks; using Furion.DatabaseAccessor; using Microsoft.AspNetCore.SignalR; @@ -220,4 +221,31 @@ throw Oops.Oh("浠诲姟鐘舵�佸紓甯�"); } } + + public async Task UploadTask(UpdateWcsTaskInput input) + { + var modTask = await _wcsTaskRep.GetByIdAsync(input.Id); + if (modTask.Status != TaskStatusEnum.Complete) + { + throw Oops.Oh("浠诲姟鐘舵�佸紓甯�"); + } + if (modTask.Origin != "WMS") + { + throw Oops.Oh("璇ヤ换鍔℃潵婧愪笉鏄疻MS"); + } + // 鍙嶉WMS + //var requestMode = new TaskRequest() + //{ + // TaskNo = modTask.TaskNo, + // PalletNo = modTask.PalletNo, + // TaskType = (TaskTypeEnum)modTask.TaskType,//TaskTypeEnum.In, + // TaskStatus = TaskStatusEnum.Complete + //}; + //HttpService httpService = new HttpService(); + //var modResponseTask = httpService.RequestTask(requestMode).Result; + //if (modResponseTask.StatusCode == "0") + //{ + // modcTaskMonitor.InteractiveMsg = "浠诲姟瀹屾垚锛岃繑鍥炵粰WMS浠诲姟瀹屾垚"; + //} + } } diff --git a/Web/src/api/wcs/wcsTask.ts b/Web/src/api/wcs/wcsTask.ts index c98786f..6c44521 100644 --- a/Web/src/api/wcs/wcsTask.ts +++ b/Web/src/api/wcs/wcsTask.ts @@ -6,6 +6,7 @@ PageWcsTask = '/api/wcsTask/page', DetailWcsTask = '/api/wcsTask/detail', FinshWcsTask = '/api/wcsTask/Finsh', + UploadWcsTask = '/api/wcsTask/UploadTask', } // 澧炲姞浠诲姟琛� @@ -55,4 +56,12 @@ url: Api.FinshWcsTask, method: 'post', data: params, + }); + +// 涓婁紶浠诲姟 +export const uploadWcsTask = (params?: any) => + request({ + url: Api.UploadWcsTask, + method: 'post', + data: params, }); \ No newline at end of file diff --git a/Web/src/views/device/sortPallet/index.vue b/Web/src/views/device/sortPallet/index.vue index f88de32..1a8c905 100644 --- a/Web/src/views/device/sortPallet/index.vue +++ b/Web/src/views/device/sortPallet/index.vue @@ -24,7 +24,7 @@ </div> <div class="otherValuefix" > <el-form label-position="left" label-width="90px"> - <el-form-item label="WMS鏄庣粏鍗曞彿"> + <el-form-item label="WMS鏄庣粏鍗曞彿" v-if="deviceInfo.type==5"> <el-input v-model="deviceInfo.orderNo" readonly></el-input> </el-form-item> <el-form-item label="浠诲姟鍙�"> @@ -39,7 +39,7 @@ <el-form-item label="鐗╂枡鍚嶇О"> <el-input v-model="deviceInfo.skuName" readonly></el-input> </el-form-item> - <el-form-item label="鍒嗘嫞绾跨紪鍙�"> + <el-form-item label="鍒嗘嫞绾跨紪鍙�" v-if="deviceInfo.type==5"> <el-input v-model="deviceInfo.lineNo" readonly></el-input> </el-form-item> <el-form-item label="缁戝畾鐘舵��"> @@ -51,18 +51,28 @@ <el-form-item label="鎵樼洏鍙�"> <el-input readonly></el-input> </el-form-item> - <el-form-item label="鎻掔爜鏁伴噺"> + <el-form-item label="鎻掔爜绠辨暟" v-if="deviceInfo.type==5"> <el-input readonly></el-input> - </el-form-item> - <el-form-item label="鎵樼洏涓婄鏁伴噺"> + </el-form-item> + <el-form-item label="鎷嗗灈绠辨暟" v-if="deviceInfo.type==6"> + <el-input readonly></el-input> + </el-form-item> + <el-form-item label="鏁磋泛绠辨暟"> <el-input readonly></el-input> </el-form-item> - <el-form-item label="WMS涓嬪彂鏁伴噺"> + <el-form-item label="瀹屾垚绠辨暟"> + <el-input readonly></el-input> + </el-form-item> + <!-- <el-form-item label="WMS涓嬪彂鏁伴噺"> <el-input v-model="deviceInfo.qty" readonly></el-input> + </el-form-item> --> + <el-form-item label="鐘舵��"> + <el-input :value="deviceInfo.status ? '鍦ㄧ嚎' : '绂荤嚎'" readonly></el-input> </el-form-item> </el-form> </div> - <div v-if="!deviceInfo.text.includes('鎷嗗灈')" class="otherButtonfix"> + <!-- 璁惧绫诲瀷涓虹爜鍨涙満鍣ㄤ汉 --> + <div v-if="deviceInfo.type==5" class="otherButtonfix"> <el-form label-position="left"> <el-form-item> <el-button type="primary" @click="openBindDialog(deviceInfo.id)">缁戝畾</el-button> diff --git a/Web/src/views/wcs/wcsTask/component/editDialog.vue b/Web/src/views/wcs/wcsTask/component/editDialog.vue index 7b112e6..99a5dfb 100644 --- a/Web/src/views/wcs/wcsTask/component/editDialog.vue +++ b/Web/src/views/wcs/wcsTask/component/editDialog.vue @@ -95,6 +95,12 @@ </el-form-item> </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鎷嗗灈绠辨暟" prop="qty"> + <el-input-number v-model="ruleForm.qty" placeholder="璇疯緭鍏ユ媶鍨涚鏁�" clearable /> + </el-form-item> + + </el-col> </el-row> </el-form> <template #footer> diff --git a/Web/src/views/wcs/wcsTask/index.vue b/Web/src/views/wcs/wcsTask/index.vue index 50b6eaf..6111b0c 100644 --- a/Web/src/views/wcs/wcsTask/index.vue +++ b/Web/src/views/wcs/wcsTask/index.vue @@ -84,7 +84,7 @@ <el-table-column prop="startLocate" label="璧峰浣嶇疆" show-overflow-tooltip="" /> <el-table-column prop="endLocate" label="缁撴潫浣嶇疆" show-overflow-tooltip="" /> <el-table-column prop="palletNo" label="鎵樼洏鍙�" show-overflow-tooltip="" /> - <el-table-column prop="completeQty" label="鎷嗗灈绠辨暟" show-overflow-tooltip="" /> + <el-table-column prop="qty" label="鎷嗗灈绠辨暟" show-overflow-tooltip="" /> <el-table-column prop="palletQty" label="鏁磋泛绠辨暟" show-overflow-tooltip="" /> <el-table-column prop="lotNo" label="鎵规鍙�" show-overflow-tooltip="" /> <el-table-column prop="skuNo" label="鐗╂枡缂栫爜" show-overflow-tooltip="" /> @@ -113,7 +113,7 @@ <ModifyRecord :data="scope.row" /> </template> </el-table-column> --> - <el-table-column prop="鎿嶄綔" label="鎿嶄綔" width="130" align="center" fixed="right" show-overflow-tooltip="" + <el-table-column prop="鎿嶄綔" label="鎿嶄綔" width="200" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('wcsTask:complete') || auth('wcsTask:cancell')"> <template #default="scope"> <template v-if="scope.row.status <= 1"> @@ -121,6 +121,8 @@ v-auth="'wcsTask:complete'"> 瀹屾垚 </el-button> <el-button icon="ele-Close" size="small" text="" type="primary" @click="cancellTask(scope.row)" v-auth="'wcsTask:cancell'"> 鍙栨秷 </el-button> + <el-button icon="ele-Upload" size="small" text="" type="primary" @click="uploadTask(scope.row)" + v-auth="'wcsTask:cancell'"> 涓婁紶 </el-button> </template> </template> </el-table-column> @@ -190,7 +192,7 @@ import printDialog from '/@/views/system/print/component/hiprint/preview.vue' import editDialog from '/@/views/wcs/wcsTask/component/editDialog.vue' -import { pageWcsTask, finshWcsTask } from '/@/api/wcs/wcsTask'; +import { pageWcsTask, finshWcsTask,uploadWcsTask } from '/@/api/wcs/wcsTask'; import { pageWcsMonitorTask } from '/@/api/wcs/wcsTaskMonitor'; import { signalR } from './signalR'; @@ -319,6 +321,23 @@ .catch(() => { }); } +//涓婁紶浠诲姟 +const uploadTask = async (row: any) => { + ElMessageBox.confirm(`纭畾瑕佷笂浼犱换鍔″悧?`, "鎻愮ず", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning", + }) + .then(async () => { + var param = Object.assign(row); + await uploadWcsTask(param); + handleQuery(); + handleQuery2(); + ElMessage.success("涓婁紶浠诲姟鎴愬姛"); + }) + .catch(() => { }); + +} // 鐐瑰嚮琛ㄦ牸 const handleClick = (row, column, cell, event) => { if (column.property === '鎿嶄綔') { -- Gitblit v1.8.0