Browse Source

rev:输送机和堆垛机业务

master
gengby 7 months ago
parent
commit
0694fb53fd
  1. 6
      nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/driver/stacker/double_stacker/ItemProtocol.java
  2. 124
      nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/driver/stacker/double_stacker/StandardStackerDeviceDriver.java
  3. 99
      nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java
  4. 2
      nladmin-system/nlsso-server/src/main/java/org/nl/config/mqtt2/MqttService.java
  5. 321
      nladmin-ui/src/views/acs/device/driver/appearance_inspection_scanner_conveyor_device.vue
  6. 2
      nladmin-ui/src/views/acs/device/index.vue

6
nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/driver/stacker/double_stacker/ItemProtocol.java

@ -14,7 +14,7 @@ public enum ItemProtocol implements DeviceDriverBaseReader.KeyProvider {
STACKER_ERROR("stacker_error", "堆垛机主体报警", "DB101.B3"),
ACTION("action", "行走动作信号", "DB101.B5"),
FRONT_COMMAND("front_command", "前叉作业状态", "DB101.B31"),
FRONT_TASK("front_task", "前叉任务号", "DB101.B32"),
FRONT_TASK("front_task", "前叉任务号", "DB101.D32"),
FRONT_YERROR("front_Yerror", "前叉Y轴报警(载货台)", "DB101.B36"),
FRONT_ZERROR("front_Zerror", "前叉Z轴报警(货叉)", "DB101.B37"),
FRONT_Z("front_z", "前叉行走排号", "DB101.B38"),
@ -26,7 +26,7 @@ public enum ItemProtocol implements DeviceDriverBaseReader.KeyProvider {
FRONT_FORKLOCATION("front_forkLocation", "前叉货叉位置信号", "DB101.B49"),
FRONT_FORKACTION("front_forkAction", "前叉货叉动作信号", "DB101.B50"),
BACK_COMMAND("back_command", "后叉作业状态", "DB101.B101"),
BACK_TASK("back_task", "后叉任务号", "DB101.B102"),
BACK_TASK("back_task", "后叉任务号", "DB101.D102"),
BACK_YERROR("back_Yerror", "后叉Y轴报警(载货台)", "DB101.B106"),
BACK_ZERROR("back_Zerror", "后叉Z轴报警(货叉)", "DB101.B107"),
BACK_Z("back_z", "后叉行走排号", "DB101.B108"),
@ -39,7 +39,7 @@ public enum ItemProtocol implements DeviceDriverBaseReader.KeyProvider {
BACK_FORKACTION("back_forkAction", "后叉货叉动作信号", "DB101.B120"),
TO_DEVICE_CODE("to_device_code", "调度号", "DB100.B1"),
TO_COMMAND("to_command", "作业命令", "DB100.B2"),
TO_CHOOSE_FORK("to_choose_fork", "货叉选择", "DB100.B4"),
TO_CHOOSE_FORK("to_choose_fork", "货叉选择", "DB100.W4"),
TO_Z("to_z", "作业排", "DB100.B6"),
TO_X("to_x", "作业列", "DB100.B7"),
TO_Y("to_y", "作业层", "DB100.B8"),

124
nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/driver/stacker/double_stacker/StandardStackerDeviceDriver.java

@ -290,6 +290,9 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
*/
private int stackerNum = 1;
private boolean againRequireSuccess = false;
@Override
public Device getDevice() {
return this.device;
@ -382,13 +385,132 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
return device == null ? false : device.getDeviceDriver() instanceof StandardStorageDeviceDriver;
}
private static final List<Integer> AGAIN_ERROR = Arrays.asList(5, 6, 16);
@SneakyThrows
@Override
public void executeLogic() {
stackerNum = Optional.ofNullable(this.getExtraValue().get("stackerNum")).map(Object::toString).map(Integer::parseInt).orElse(1);
if (this.back_command != this.lastBack_command || this.front_command != this.lastFront_command) {
this.requireSuccess = false;
}
if (front_Zerror != lastFront_Zerror || back_Zerror != lastBack_Zerror) {
if (AGAIN_ERROR.contains(front_Zerror) || AGAIN_ERROR.contains(back_Zerror)) {
this.againRequireSuccess = false;
}
}
//前叉满入
if (front_Zerror == 5) {
//先解警
//重新下发放货点位信息
//
if (!againRequireSuccess) {
List<String> keys = Arrays.asList(ItemProtocol.TO_Z.getKey(), ItemProtocol.TO_X.getKey(), ItemProtocol.TO_Y.getKey(), ItemProtocol.TO_FRONT_TASK.getKey(), ItemProtocol.TO_CHOOSE_FORK.getKey(), ItemProtocol.TO_COMMAND.getKey());
List<Object> values = Arrays.asList(2, 25, 5, this.front_task, SendSignalEnum.CHOOSE_FORK_ONE.getSignalNum(), SendSignalEnum.COMMAND_TWO.getSignalNum());
this.writing(ItemProtocol.TO_COMMAND.getKey(), 5);
this.writing(keys, values);
this.againRequireSuccess = true;
}
return;
}
//后叉满入
else if (back_Zerror == 5) {
//先解警
//重新下发放货点位信息
if (!againRequireSuccess) {
List<String> keys = Arrays.asList(ItemProtocol.TO_Z.getKey(), ItemProtocol.TO_X.getKey(), ItemProtocol.TO_Y.getKey(), ItemProtocol.TO_BACK_TASK.getKey(), ItemProtocol.TO_CHOOSE_FORK.getKey(), ItemProtocol.TO_COMMAND.getKey());
List<Object> values = Arrays.asList(2, 30, 6, this.back_task, SendSignalEnum.CHOOSE_FORK_TWO.getSignalNum(), SendSignalEnum.COMMAND_TWO.getSignalNum());
this.writing(ItemProtocol.TO_COMMAND.getKey(), 5);
this.writing(keys, values);
this.againRequireSuccess = true;
}
return;
}
//前叉空出
if (front_Zerror == 6) {
//先解警
//重新下发取货点位信息
if (!againRequireSuccess) {
List<String> keys = Arrays.asList(ItemProtocol.TO_Z.getKey(), ItemProtocol.TO_X.getKey(), ItemProtocol.TO_Y.getKey(), ItemProtocol.TO_FRONT_TASK.getKey(), ItemProtocol.TO_CHOOSE_FORK.getKey(), ItemProtocol.TO_COMMAND.getKey());
List<Object> values = Arrays.asList(2, 25, 5, this.front_task, SendSignalEnum.CHOOSE_FORK_ONE.getSignalNum(), SendSignalEnum.COMMAND_ONE.getSignalNum());
this.writing(ItemProtocol.TO_COMMAND.getKey(), 5);
this.writing(keys, values);
this.againRequireSuccess = true;
}
return;
}
//后叉空出
else if (back_Zerror == 6) {
//先解警
//重新下发取货点位信息
if (!againRequireSuccess) {
List<String> keys = Arrays.asList(ItemProtocol.TO_Z.getKey(), ItemProtocol.TO_X.getKey(), ItemProtocol.TO_Y.getKey(), ItemProtocol.TO_BACK_TASK.getKey(), ItemProtocol.TO_CHOOSE_FORK.getKey(), ItemProtocol.TO_COMMAND.getKey());
List<Object> values = Arrays.asList(2, 30, 5, this.front_task, SendSignalEnum.CHOOSE_FORK_TWO.getSignalNum(), SendSignalEnum.COMMAND_ONE.getSignalNum());
this.writing(ItemProtocol.TO_COMMAND.getKey(), 5);
this.writing(keys, values);
this.againRequireSuccess = true;
}
return;
}
//前叉浅货位有货
if (front_Zerror == 16) {
//先解警
//重新下发取放货点位信息
if (!againRequireSuccess) {
//判断是取货阻挡还是放货阻挡
//取货阻挡
if (this.front_command == 1) {
List<String> keys = Arrays.asList(ItemProtocol.TO_Z.getKey(), ItemProtocol.TO_X.getKey(), ItemProtocol.TO_Y.getKey(), ItemProtocol.TO_FRONT_TASK.getKey(), ItemProtocol.TO_CHOOSE_FORK.getKey(), ItemProtocol.TO_COMMAND.getKey());
List<Object> values = Arrays.asList(3, 18, 6, this.front_task, SendSignalEnum.CHOOSE_FORK_ONE.getSignalNum(), SendSignalEnum.COMMAND_ONE.getSignalNum());
this.writing(ItemProtocol.TO_COMMAND.getKey(), 5);
this.writing(keys, values);
this.againRequireSuccess = true;
}
//放货阻挡
else if (this.front_command == 3) {
List<String> keys = Arrays.asList(ItemProtocol.TO_Z.getKey(), ItemProtocol.TO_X.getKey(), ItemProtocol.TO_Y.getKey(), ItemProtocol.TO_FRONT_TASK.getKey(), ItemProtocol.TO_CHOOSE_FORK.getKey(), ItemProtocol.TO_COMMAND.getKey());
List<Object> values = Arrays.asList(3, 22, 6, this.front_task, SendSignalEnum.CHOOSE_FORK_ONE.getSignalNum(), SendSignalEnum.COMMAND_TWO.getSignalNum());
this.writing(ItemProtocol.TO_COMMAND.getKey(), 5);
this.writing(keys, values);
this.againRequireSuccess = true;
}
}
return;
}
//后叉前货位有货
else if (back_Zerror == 16) {
//先解警
//重新下发取放货点位信息
if (!againRequireSuccess) {
//判断是取货阻挡还是放货阻挡
//取货阻挡
if (this.back_command == 1) {
List<String> keys = Arrays.asList(ItemProtocol.TO_Z.getKey(), ItemProtocol.TO_X.getKey(), ItemProtocol.TO_Y.getKey(), ItemProtocol.TO_BACK_TASK.getKey(), ItemProtocol.TO_CHOOSE_FORK.getKey(), ItemProtocol.TO_COMMAND.getKey());
List<Object> values = Arrays.asList(3, 50, 2, this.front_task, SendSignalEnum.CHOOSE_FORK_TWO.getSignalNum(), SendSignalEnum.COMMAND_ONE.getSignalNum());
this.writing(ItemProtocol.TO_COMMAND.getKey(), 5);
this.writing(keys, values);
this.againRequireSuccess = true;
}
//放货阻挡
else if (this.back_command == 3) {
List<String> keys = Arrays.asList(ItemProtocol.TO_Z.getKey(), ItemProtocol.TO_X.getKey(), ItemProtocol.TO_Y.getKey(), ItemProtocol.TO_BACK_TASK.getKey(), ItemProtocol.TO_CHOOSE_FORK.getKey(), ItemProtocol.TO_COMMAND.getKey());
List<Object> values = Arrays.asList(3, 60, 2, this.back_task, SendSignalEnum.CHOOSE_FORK_TWO.getSignalNum(), SendSignalEnum.COMMAND_TWO.getSignalNum());
this.writing(ItemProtocol.TO_COMMAND.getKey(), 5);
this.writing(keys, values);
this.againRequireSuccess = true;
}
}
return;
}
this.updateInstStatus();
if (!this.online) {
this.message = "设备离线";
} else if (this.mode != ModeEnum.MODE_3.getNum()) {
@ -407,10 +529,12 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
if (ObjectUtil.isEmpty(frontInst) && ObjectUtil.isEmpty(backInst)) {
if (this.to_command != 0) {
this.writing(ItemProtocol.TO_COMMAND.getKey(), 0);
Thread.sleep(1000);
}
this.applyTask();
} else {
this.sendPutInfoToPlc(frontInst, backInst);
this.requireSuccess = true;
}
}
//取货中

99
nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java

@ -1,5 +1,6 @@
package org.nl.acs.ext.wms.service.impl;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
@ -10,6 +11,9 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.acs.device.device.domain.Device;
import org.nl.acs.device.driver.conveyor.appearance_inspection_scannner_conveyor.AppearanceInspectionScannerConveyorDeviceDriver;
import org.nl.acs.device.driver.conveyor.strip_conveyor.StripConveyorDeviceDriver;
import org.nl.acs.ext.wms.data.*;
import org.nl.acs.ext.wms.service.AcsToLiKuService;
@ -20,6 +24,7 @@ import org.nl.acs.storage_cell.domain.StorageCell;
import org.nl.acs.storage_cell.service.mapper.StorageCellMapper;
import org.nl.acs.task.service.TaskService;
import org.nl.acs.task.service.dto.TaskDto;
import org.nl.common.exception.BadRequestException;
import org.nl.config.SpringContextHolder;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.system.service.param.ISysParamService;
@ -29,6 +34,7 @@ import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
import java.util.Optional;
@Service
@RequiredArgsConstructor
@ -354,4 +360,97 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
return null;
}
@Override
public JSONObject switchInOut(JSONObject reqs) {
Assert.notNull(reqs);
String device_code = reqs.getString("device_code");
if (StrUtil.isBlank(device_code)) {
throw new BadRequestException("设备号不能为空!");
}
String type = reqs.getString("type");
if (StrUtil.isBlank(type)) {
throw new BadRequestException("出入库类型不能为空!");
}
Device device = deviceAppService.findDeviceByCode(device_code);
String belongToConveyorDeviceCode = Optional.ofNullable(device.getExtraValue().get("belongToConveyor")).map(Object::toString).orElse(null);
Device belongToConveyorDevice = deviceAppService.findDeviceByCode(belongToConveyorDeviceCode);
if (belongToConveyorDevice != null && belongToConveyorDevice.getDeviceDriver() instanceof StripConveyorDeviceDriver) {
StripConveyorDeviceDriver stripConveyorDeviceDriver = (StripConveyorDeviceDriver) belongToConveyorDevice.getDeviceDriver();
//切换为入库
if ("1".equals(type)) {
String samePoint = Optional.ofNullable(device.getExtraValue().get("samePoint")).map(Object::toString).orElse(null);
TaskDto taskDto;
if (StrUtil.isNotEmpty(samePoint)) {
taskDto = taskserver.findByNextCode(samePoint);
} else {
taskDto = taskserver.findByNextCode(device_code);
}
if (ObjectUtil.isNotEmpty(taskDto)) {
throw new BadRequestException("ACS存在出库任务,无法切换为入库模式");
}
if (stripConveyorDeviceDriver.getInOutMode() == 0) {
throw new BadRequestException("已经是入库模式,无法再次切换为入库模式");
} else {
if (stripConveyorDeviceDriver.getSwitchInOut() == 0) {
throw new BadRequestException("输送线不允许切换为入库模式");
}
}
stripConveyorDeviceDriver.writing("toCommand", 0);
}
//切换为出库
else if ("2".equals(type)) {
String samePoint = Optional.ofNullable(device.getExtraValue().get("samePoint")).map(Object::toString).orElse(null);
TaskDto taskDto;
if (StrUtil.isNotEmpty(samePoint)) {
taskDto = taskserver.findByStartCode(samePoint);
} else {
taskDto = taskserver.findByStartCode(device_code);
}
if (ObjectUtil.isNotEmpty(taskDto)) {
throw new BadRequestException("ACS存在入库任务,无法切换为出库模式");
}
if (stripConveyorDeviceDriver.getInOutMode() == 1) {
throw new BadRequestException("已经是出库模式,无法再次切换为出库模式");
} else {
if (stripConveyorDeviceDriver.getSwitchInOut() == 0) {
throw new BadRequestException("输送线不允许切换为出库模式");
}
}
stripConveyorDeviceDriver.writing("toCommand", 1);
}
}
JSONObject resp = new JSONObject();
resp.put("status", 200);
resp.put("message", "切换出入库模式成功");
return null;
}
@Override
public JSONObject pinkStartStop(JSONObject reqs) {
Assert.notNull(reqs);
JSONObject resp = new JSONObject();
String device_code = reqs.getString("device_code");
if (StrUtil.isBlank(device_code)) {
throw new BadRequestException("设备号不能为空!");
}
String type = reqs.getString("type");
if (StrUtil.isEmpty(type)) {
throw new BadRequestException("启停类型不能为空!");
}
Device device = deviceAppService.findDeviceByCode(device_code);
if (device != null && device.getDeviceDriver() instanceof AppearanceInspectionScannerConveyorDeviceDriver) {
AppearanceInspectionScannerConveyorDeviceDriver appearanceInspectionScannerConveyorDeviceDriver = (AppearanceInspectionScannerConveyorDeviceDriver) device.getDeviceDriver();
if ("1".equals(type)) {
appearanceInspectionScannerConveyorDeviceDriver.writing("mode", 2);
} else {
appearanceInspectionScannerConveyorDeviceDriver.writing("mode", 0);
}
} else {
throw new BadRequestException("设备不存在");
}
resp.put("status", 200);
resp.put("message", "切换成功");
return resp;
}
}

2
nladmin-system/nlsso-server/src/main/java/org/nl/config/mqtt2/MqttService.java

@ -222,7 +222,7 @@ public class MqttService {
topicMap.get(topic).add(payload);
System.out.println("接收到消息---" + topic + "内容:" + payload);
} else {
log.info("topic---{} does not exist", topic);
log.info("topic---{} , payload----{} ", topic, payload);
}
}

321
nladmin-ui/src/views/acs/device/driver/appearance_inspection_scanner_conveyor_device.vue

@ -65,103 +65,255 @@
</div>
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="small" label-width="78px">
<el-row>
<el-col :span="8">
<el-form-item label="关联设备:" prop="getLinkDeviceCode" label-width="150px">
<el-select
v-model="form.getLinkDeviceCode"
filterable
clearable
reserve-keyword
placeholder="请选择输送线设备"
>
<el-option
v-for=" item in deviceList"
:key="item.device_id"
:label="item.device_name"
:value="item.device_code"
/>
</el-select>
<el-col :span="6">
<el-form-item label="堆垛机对接位:" label-width="110px" prop="stackerDock">
<el-switch v-model="form.stackerDock" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="自动申请AGV任务:" label-width="150px">
<el-switch v-model="form.applyTask"/>
<span v-if="form.stackerDock">
<el-col :span="6">
<el-form-item label="当前排:" label-width="110px" prop="currentX">
<el-input v-model.number="form.currentX" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="当前列:" label-width="150px" prop="currentY">
<el-input v-model.number="form.currentY" style="width: 130px" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="当前层:" label-width="110px" prop="currentZ">
<el-input v-model.number="form.currentZ" style="width: 170px" />
</el-form-item>
</el-col>
</span>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="堆垛机双任务:" label-width="110px" prop="stackerDoubleTask">
<el-switch v-model="form.stackerDoubleTask" />
</el-form-item>
</el-col>
<span v-if="form.stackerDoubleTask">
<el-col :span="6">
<el-form-item label="关联设备:" prop="getLinkDeviceCode" label-width="110px">
<el-select
v-model="form.getLinkDeviceCode"
filterable
clearable
reserve-keyword
placeholder="请选择输送线设备"
style="width: 170px"
>
<el-option
v-for=" item in deviceList"
:key="item.device_id"
:label="item.device_name"
:value="item.device_code"
/>
</el-select>
</el-form-item>
</el-col>
</span>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="当前排:" label-width="150px" prop="currentX">
<el-input v-model.number="form.currentX" />
<el-col :span="6">
<el-form-item label="输送指令起点:" label-width="110px" prop="conveyorStartPoint">
<el-switch v-model="form.conveyorStartPoint" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="当前列:" label-width="150px" prop="currentY">
<el-input v-model.number="form.currentY" />
<span v-if="form.conveyorStartPoint">
<el-col :span="6">
<el-form-item label="目标设备:" prop="targetDeviceCode" label-width="110px">
<el-select
v-model="form.targetDeviceCode"
filterable
clearable
multiple
reserve-keyword
placeholder="请选择输送线设备"
style="width: 170px"
>
<el-option
v-for=" item in deviceList"
:key="item.device_id"
:label="item.device_name"
:value="item.device_code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="关联拣选台:" label-width="150px" prop="linkPinkDevice">
<el-switch v-model="form.linkPinkDevice" />
</el-form-item>
</el-col>
<span v-if="form.linkPinkDevice">
<el-col :span="6">
<el-form-item label="关联拣选设备:" prop="pinkDeviceCode" label-width="110px">
<el-select
v-model="form.pinkDeviceCode"
filterable
clearable
reserve-keyword
placeholder="拣选关联设备"
style="width: 170px"
>
<el-option
v-for=" item in deviceList"
:key="item.device_id"
:label="item.device_name"
:value="item.device_code"
/>
</el-select>
</el-form-item>
</el-col>
</span>
</span>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="输送指令终点:" label-width="110px" prop="conveyorEndPoint">
<el-switch v-model="form.conveyorEndPoint" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="当前层:" label-width="150px" prop="currentZ">
<el-input v-model.number="form.currentZ" />
<span v-if="form.conveyorEndPoint">
<el-col :span="6">
<el-form-item label="禁止查找起点:" prop="checkoutStartDeviceCode" label-width="110px">
<el-select
v-model="form.checkoutStartDeviceCode"
filterable
clearable
multiple
reserve-keyword
placeholder="禁止查找起点"
style="width: 170px"
>
<el-option
v-for=" item in deviceList"
:key="item.device_id"
:label="item.device_name"
:value="item.device_code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="自动申请AGV任务:" label-width="150px">
<el-switch v-model="form.applyTask" />
</el-form-item>
</el-col>
</span>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="输送缓存设备:" label-width="110px" prop="conveyorCachePoint">
<el-switch v-model="form.conveyorCachePoint" />
</el-form-item>
</el-col>
<span v-if="form.conveyorCachePoint">
<el-col :span="6">
<el-form-item label="关联指令终点:" prop="cacheDeviceCode" label-width="110px">
<el-select
v-model="form.cacheDeviceCode"
filterable
clearable
reserve-keyword
placeholder="请选择要查询的指令终点"
style="width: 170px"
>
<el-option
v-for=" item in deviceList"
:key="item.device_id"
:label="item.device_name"
:value="item.device_code"
/>
</el-select>
</el-form-item>
</el-col>
</span>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="出库缓存设备:" prop="cacheDeviceCode" label-width="150px">
<el-select
v-model="form.cacheDeviceCode"
filterable
clearable
reserve-keyword
placeholder="出库缓存设备"
>
<el-option
v-for=" item in deviceList"
:key="item.device_id"
:label="item.device_name"
:value="item.device_code"
/>
</el-select>
<el-col :span="6">
<el-form-item label="拣选台设备:" label-width="110px" prop="pinkDevicePoint">
<el-switch v-model="form.pinkDevicePoint" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="出库禁止查找设备:" prop="checkoutStartDeviceCode" label-width="150px">
<el-select
v-model="form.checkoutStartDeviceCode"
filterable
clearable
multiple
reserve-keyword
placeholder="出库禁止查找设备"
>
<el-option
v-for=" item in deviceList"
:key="item.device_id"
:label="item.device_name"
:value="item.device_code"
/>
</el-select>
<span v-if="form.pinkDevicePoint">
<el-col :span="6">
<el-form-item label="关联拣选设备:" prop="pinkDeviceCode" label-width="110px">
<el-select
v-model="form.pinkDeviceCode"
filterable
clearable
reserve-keyword
placeholder="拣选关联设备"
style="width: 170px"
>
<el-option
v-for=" item in deviceList"
:key="item.device_id"
:label="item.device_name"
:value="item.device_code"
/>
</el-select>
</el-form-item>
</el-col>
</span>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="双向点位:" label-width="110px" prop="toWay">
<el-switch v-model="form.toWay" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="关联拣选台设备:" prop="pinkDeviceCode" label-width="150px">
<el-select
v-model="form.pinkDeviceCode"
filterable
clearable
reserve-keyword
placeholder="拣选关联设备"
>
<el-option
v-for=" item in deviceList"
:key="item.device_id"
:label="item.device_name"
:value="item.device_code"
/>
</el-select>
<span v-if="form.toWay">
<el-col :span="6">
<el-form-item label="所属输送线:" prop="belongToConveyor" label-width="110px">
<el-select
v-model="form.belongToConveyor"
filterable
clearable
reserve-keyword
placeholder="所属输送线"
style="width: 170px"
>
<el-option
v-for=" item in deviceList"
:key="item.device_id"
:label="item.device_name"
:value="item.device_code"
/>
</el-select>
</el-form-item>
</el-col>
</span>
<el-col :span="6">
<el-form-item label="同一出入点:" label-width="110px" prop="samePoint">
<el-switch v-model="form.samePoint" />
</el-form-item>
</el-col>
<span v-if="!form.samePoint">
<el-col :span="6">
<el-form-item label="关联出入点:" prop="linkInOutDevice" label-width="110px">
<el-select
v-model="form.linkInOutDevice"
filterable
clearable
reserve-keyword
placeholder="所属输送线"
style="width: 170px"
>
<el-option
v-for=" item in deviceList"
:key="item.device_id"
:label="item.device_name"
:value="item.device_code"
/>
</el-select>
</el-form-item>
</el-col>
</span>
</el-row>
</el-form>
</el-card>
@ -198,7 +350,6 @@
size="small"
style="width: 100%;margin-bottom: 15px"
>
<el-table-column prop="name" label="用途" />
<el-table-column prop="code" label="别名要求" />
<el-table-column prop="db" label="DB块">
@ -334,7 +485,19 @@ export default {
address: '',
cacheDeviceCode: '',
pinkDeviceCode: '',
checkoutStartDeviceCode: null
checkoutStartDeviceCode: null,
targetDeviceCode: null,
stackerDock: false,
stackerDoubleTask: false,
conveyorStartPoint: false,
linkPinkDevice: false,
conveyorEndPoint: false,
conveyorCachePoint: false,
pinkDevicePoint: false,
toWay: false,
belongToConveyor: null,
linkInOutDevice: '',
samePoint: false
},
rules: {}
}

2
nladmin-ui/src/views/acs/device/index.vue

@ -160,7 +160,7 @@
<el-table-column type="selection" width="55" />
<el-table-column v-if="false" prop="device_id" :label="$t('device.device_table_title.device_identification')" />
<el-table-column sortable prop="device_code" :label="$t('device.device_table_title.device_encoding')" :min-width="flexWidth('device_code',crud.data,$t('device.device_table_title.device_encoding'))" />
<el-table-column sortable :label="$t('device.device_table_title.device_name')" :prop="$langPre.computedProp('device_name')" :min-width="flexWidth($langPre.computedProp('device_name'),crud.data,$t('device.device_table_title.device_name'))" />
<el-table-column sortable :label="$t('device.device_table_title.device_name')" prop="device_name" :min-width="flexWidth($langPre.computedProp('device_name'),crud.data,$t('device.device_table_title.device_name'))" />
<el-table-column prop="device_type_name" :label="$t('device.device_table_title.device_type')" :min-width="flexWidth('device_type_name',crud.data,$t('device.device_table_title.device_type'))">
<template slot-scope="scope">
<div>{{ scope.row.device_type_name }}</div>

Loading…
Cancel
Save