|
|
|
@ -343,9 +343,10 @@ |
|
|
|
v-model="selectedCallStartStation" |
|
|
|
placeholder="请选择起始站点" |
|
|
|
style="width: 100%;" |
|
|
|
@change="handleCallStartStationChange" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="station in callStationOptions" |
|
|
|
v-for="station in callStartStationOptions" |
|
|
|
:key="station.stationCode" |
|
|
|
:label="`${station.stationCode} - ${station.stationName}`" |
|
|
|
:value="station.stationCode" |
|
|
|
@ -353,21 +354,16 @@ |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 目标站点选择 --> |
|
|
|
<!-- 目标站点输入 --> |
|
|
|
<div class="input-group"> |
|
|
|
<label class="input-label">目标站点</label> |
|
|
|
<el-select |
|
|
|
<el-input |
|
|
|
ref="callTargetStationInput" |
|
|
|
v-model="selectedCallTargetStation" |
|
|
|
placeholder="请选择目标站点" |
|
|
|
placeholder="请扫描或输入目标站点" |
|
|
|
clearable |
|
|
|
style="width: 100%;" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="station in callStationOptions" |
|
|
|
:key="station.stationCode" |
|
|
|
:label="`${station.stationCode} - ${station.stationName}`" |
|
|
|
:value="station.stationCode" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
@ -428,7 +424,8 @@ export default { |
|
|
|
|
|
|
|
// Call栈板模态框 |
|
|
|
callPalletModalVisible: false, |
|
|
|
callStationOptions: [], |
|
|
|
callStartStationOptions: [], // 起始站点选项(statusDb=1,有货) |
|
|
|
callTargetStationOptions: [], // 目标站点选项(statusDb=0,空闲) |
|
|
|
selectedCallStartStation: '', |
|
|
|
selectedCallTargetStation: '', |
|
|
|
|
|
|
|
@ -477,10 +474,14 @@ export default { |
|
|
|
this.selectedCallStartStation = ''; |
|
|
|
this.selectedCallTargetStation = ''; |
|
|
|
|
|
|
|
// 获取AGV站点列表 |
|
|
|
// 获取AGV站点列表,分别过滤起始站点和目标站点 |
|
|
|
getAgvStations({}).then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.callStationOptions = data.stations || []; |
|
|
|
const allStations = data.stations || []; |
|
|
|
// 起始站点:过滤出statusDb为1(有货)的站点 |
|
|
|
this.callStartStationOptions = allStations.filter(station => station.statusDb === '1'); |
|
|
|
// 目标站点:过滤出statusDb为0(空闲)的站点 |
|
|
|
this.callTargetStationOptions = allStations.filter(station => station.statusDb === '0'); |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || '获取站点列表失败'); |
|
|
|
} |
|
|
|
@ -490,6 +491,15 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 起始站点选择change事件,自动聚焦到目标站点输入框 |
|
|
|
handleCallStartStationChange() { |
|
|
|
this.$nextTick(() => { |
|
|
|
if (this.$refs.callTargetStationInput) { |
|
|
|
this.$refs.callTargetStationInput.focus(); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 位置选择变化 |
|
|
|
handlePositionChange() { |
|
|
|
if (this.selectedPosition) { |
|
|
|
@ -758,10 +768,11 @@ export default { |
|
|
|
this.selectedTargetStation = ''; |
|
|
|
this.transportStationOptions = []; |
|
|
|
|
|
|
|
// 获取所有AGV站点列表(和Call栈板一样的逻辑) |
|
|
|
// 获取所有AGV站点列表,只显示空闲站点(statusDb = 0) |
|
|
|
getAgvStations({}).then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.transportStationOptions = data.stations || []; |
|
|
|
// 过滤出statusDb为0(空闲)的站点 |
|
|
|
this.transportStationOptions = (data.stations || []).filter(station => station.statusDb === '0'); |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || '获取站点列表失败'); |
|
|
|
} |
|
|
|
@ -862,7 +873,8 @@ export default { |
|
|
|
this.callPalletModalVisible = false; |
|
|
|
this.selectedCallStartStation = ''; |
|
|
|
this.selectedCallTargetStation = ''; |
|
|
|
this.callStationOptions = []; |
|
|
|
this.callStartStationOptions = []; |
|
|
|
this.callTargetStationOptions = []; |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
|