Merge branch 'master' of http://47.95.120.53:8083/r/WCSNet6
New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | using Admin.NET.Core; |
| | | namespace WCS.Application.Entity; |
| | | |
| | | /// <summary> |
| | | /// 分拣任务表 |
| | | /// </summary> |
| | | [SugarTable("WCSCheckTask","分拣任务表")] |
| | | [Tenant("1300000000001")] |
| | | public class WcsCheckTask : EntityBaseData |
| | | { |
| | | /// <summary> |
| | | /// WMS下发单号 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "OrderNo", ColumnDescription = "WMS下发单号", Length = 20)] |
| | | public string? OrderNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 机器人编号 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "RoboatNo", ColumnDescription = "机器人编号", Length = 5)] |
| | | public string? RoboatNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 分拣线编号 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "LineNO", ColumnDescription = "分拣线编号", Length = 5)] |
| | | public string? LineNO { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 码盘工位号 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "Port", ColumnDescription = "码盘工位号", Length = 5)] |
| | | public string? Port { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料编码 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "SkuNo", ColumnDescription = "物料编码", Length = 20)] |
| | | public string? SkuNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 规格 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "BoxType", ColumnDescription = "规格", Length = 20)] |
| | | public string? BoxType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 工位绑定状态 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "Status", ColumnDescription = "工位绑定状态", Length = 2)] |
| | | public string? Status { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 品种号 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "PZNo", ColumnDescription = "品种号", Length = 10)] |
| | | public string? PZNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 托盘号 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "PalletNo", ColumnDescription = "托盘号", Length = 20)] |
| | | public string? PalletNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 插码数量 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "BoxInsert", ColumnDescription = "插码数量", Length = 20)] |
| | | public string? BoxInsert { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 托盘上箱数量 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "BoxCount", ColumnDescription = "托盘上箱数量", Length = 20)] |
| | | public string? BoxCount { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 总箱数/计划箱数/预估箱数 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "Qty", ColumnDescription = "总箱数/计划箱数/预估箱数")] |
| | | public int? Qty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 已码箱数 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "FinishQty", ColumnDescription = "已码箱数")] |
| | | public int? FinishQty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 绑定时间 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "BindTime", ColumnDescription = "绑定时间")] |
| | | public DateTime? BindTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 绑定人 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "BindUser", ColumnDescription = "绑定人")] |
| | | public int? BindUser { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建人 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "CreateUser", ColumnDescription = "创建人")] |
| | | public int? CreateUser { get; set; } |
| | | |
| | | } |
| | |
| | | |
| | | return list; |
| | | } |
| | | |
| | | #region 分拣码垛 |
| | | /// <summary> |
| | | /// 获取码垛机器人和拆垛机器人列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [ApiDescriptionSettings(Name = "WcsPackPlcList")] |
| | | [DisplayName("获取码垛机器人和拆垛机器人列表")] |
| | | public async Task<dynamic> WcsPackPlcList() |
| | | { |
| | | return await _wcsDeviceRep.Context.Queryable<WcsPlc>() |
| | | .Where(w => w.Type == PLCTypeEnum.RobotPalletizer || w.Type == PLCTypeEnum.StackingRobot) |
| | | .OrderBy(o => o.Type) |
| | | .Select(u => new |
| | | { |
| | | id = u.Id, |
| | | name = u.Text |
| | | } |
| | | ).ToListAsync(); |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | |
| | | GetWcsPlcPlcIdDropdown = '/api/wcsDevice/WcsPlcPlcIdDropdown', |
| | | GeneratePos = '/api/wcsDevice/GeneratePos', |
| | | ListWcsDevice = '/api/wcsDevice/list', |
| | | |
| | | GetWcsPackPlcList='/api/wcsDevice/WcsPackPlcList', |
| | | } |
| | | |
| | | // 增加设备信息 |
| | |
| | | url: Api.ListWcsDevice, |
| | | method: 'get' |
| | | }); |
| | | |
| | | |
| | | export const GetWcsPackPlcList = () => |
| | | request({ |
| | | url: Api.GetWcsPackPlcList, |
| | | method: 'get' |
| | | }); |
| | |
| | | </el-button> |
| | | </div> |
| | | </el-row> |
| | | <el-row :span="2"> |
| | | <el-row :span="1"> |
| | | <div class="card-container"> |
| | | <el-card class="other-box-card" v-for="deviceInfo in devicePointData" :key="deviceInfo.id"> |
| | | <div slot="header" class="linefix"> |
| | |
| | | |
| | | <script lang="ts" setup> |
| | | import { ref } from 'vue'; |
| | | import { GetWcsPackPlcList } from '/@/api/wcs/wcsDevice'; |
| | | |
| | | const deviceList=[ |
| | | { |
| | | id: 1, |
| | | name: '1号机器人' |
| | | }, |
| | | { |
| | | id: 2, |
| | | name: '2号机器人' |
| | | }, |
| | | { |
| | | id: 3, |
| | | name: '3号机器人' |
| | | }, |
| | | ]; |
| | | const deviceList=ref<any>([]); |
| | | |
| | | const devicePointList=[ |
| | | { |
| | | id: 1, |
| | | deviceId:1, |
| | | name: '1号机器人 1工位', |
| | | deviceId:586494087331909, |
| | | name: '1号码垛机器人 1工位', |
| | | taskNumber: 'T000001', |
| | | taskType: '', |
| | | plc: '', |
| | |
| | | }, |
| | | { |
| | | id: 2, |
| | | deviceId:1, |
| | | name: '1号机器人 2工位', |
| | | deviceId:586494087331909, |
| | | name: '1号码垛机器人 2工位', |
| | | taskNumber: '', |
| | | taskType: '', |
| | | plc: '', |
| | |
| | | }, |
| | | { |
| | | id: 3, |
| | | deviceId:1, |
| | | name: '1号机器人 3工位', |
| | | deviceId:586494087331909, |
| | | name: '1号码垛机器人 3工位', |
| | | taskNumber: '', |
| | | taskType: '', |
| | | plc: '', |
| | |
| | | }, |
| | | { |
| | | id: 4, |
| | | deviceId:2, |
| | | name: '2号机器人 1工位', |
| | | deviceId:586494241939525, |
| | | name: '2号码垛机器人 1工位', |
| | | taskNumber: 'T000001', |
| | | taskType: '', |
| | | plc: '', |
| | |
| | | }, |
| | | { |
| | | id: 5, |
| | | deviceId:2, |
| | | name: '2号机器人 2工位', |
| | | deviceId:586494241939525, |
| | | name: '2号码垛机器人 2工位', |
| | | taskNumber: '', |
| | | taskType: '', |
| | | plc: '', |
| | |
| | | } |
| | | ]; |
| | | |
| | | //输送线数据 |
| | | let devicePointFirst= devicePointList.filter(device => device.deviceId === deviceList[0].id) |
| | | let devicePointData = ref(devicePointFirst); |
| | | let selectedDeviceId = ref(deviceList[0].id); |
| | | let devicePointData = ref<any>([]); |
| | | const selectedDeviceId=ref<any>(); |
| | | // 查询操作 |
| | | const handleQuery = async () => { |
| | | var res = await GetWcsPackPlcList(); |
| | | deviceList.value = res.data.result; |
| | | |
| | | //切换层平面 |
| | | //输送线数据 |
| | | selectedDeviceId.value = deviceList.value[0].id; |
| | | devicePointData.value= devicePointList.filter(device => device.deviceId === selectedDeviceId.value); |
| | | }; |
| | | handleQuery(); |
| | | |
| | | //切换 |
| | | function chooseDevice(id) { |
| | | selectedDeviceId.value = id; |
| | | devicePointData.value = devicePointList.filter(device => device.deviceId === id); |