|
|
|
@ -103,8 +103,11 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 栈板明细表格 (扫描栈板后显示) --> |
|
|
|
<div v-if="palletScanned && detailList.length > 0" class="rma-list"> |
|
|
|
<div class="list-title">栈板明细</div> |
|
|
|
<div v-if="palletScanned" class="rma-list"> |
|
|
|
<div class="list-title-row"> |
|
|
|
<div class="list-title">栈板明细</div> |
|
|
|
<button class="action-btn secondary" style="margin-left: 10px;" @click="handleTransportOrder">运输指令</button> |
|
|
|
</div> |
|
|
|
<div class="detail-table"> |
|
|
|
<div class="table-header"> |
|
|
|
<div class="col-position">位置</div> |
|
|
|
@ -123,13 +126,12 @@ |
|
|
|
<div class="col-serial">{{ detail.serialNo }}</div> |
|
|
|
<div class="col-part">{{ detail.partNo }}</div> |
|
|
|
</div> |
|
|
|
<!-- 暂无数据提示 --> |
|
|
|
<div v-if="detailList.length === 0" class="table-row empty-row"> |
|
|
|
<div class="empty-hint">暂无栈板明细数据</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 暂无数据提示 --> |
|
|
|
<div v-if="palletScanned && detailList.length === 0" class="rma-list"> |
|
|
|
<div class="empty-hint">暂无栈板明细数据</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 扫码模态框 --> |
|
|
|
@ -262,6 +264,119 @@ |
|
|
|
<button class="action-btn secondary" style="margin-left: 10px;" @click="closeEditPositionModal">取消</button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 运输任务模态框 --> |
|
|
|
<el-dialog |
|
|
|
title="创建运输任务" |
|
|
|
:visible.sync="transportModalVisible" |
|
|
|
width="90%" |
|
|
|
:close-on-click-modal="false" |
|
|
|
:show-close="false" |
|
|
|
:modal="true" |
|
|
|
:modal-append-to-body="true" |
|
|
|
:append-to-body="true" |
|
|
|
> |
|
|
|
<div class="transport-modal-content"> |
|
|
|
<!-- 栈板号(只读) --> |
|
|
|
<div class="input-group"> |
|
|
|
<label class="input-label">栈板号</label> |
|
|
|
<el-input |
|
|
|
v-model="palletCode" |
|
|
|
placeholder="栈板号" |
|
|
|
class="form-input" |
|
|
|
readonly |
|
|
|
/> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 起点站点选择 --> |
|
|
|
<div class="input-group"> |
|
|
|
<label class="input-label">起点站点</label> |
|
|
|
<el-select |
|
|
|
v-model="selectedStartStation" |
|
|
|
placeholder="请选择起点站点" |
|
|
|
style="width: 100%;" |
|
|
|
@change="handleStartStationChange" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="station in startStationOptions" |
|
|
|
:key="station.stationCode" |
|
|
|
:label="`${station.stationCode} - ${station.stationName}`" |
|
|
|
:value="station.stationCode" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 目标站点选择 --> |
|
|
|
<div class="input-group"> |
|
|
|
<label class="input-label">目标站点</label> |
|
|
|
<el-select |
|
|
|
v-model="selectedTargetStation" |
|
|
|
placeholder="请先选择起点站点" |
|
|
|
style="width: 100%;" |
|
|
|
:disabled="!selectedStartStation" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="target in targetStationOptions" |
|
|
|
:key="target.stationCode" |
|
|
|
:label="`${target.stationCode} - ${target.stationName}`" |
|
|
|
:value="target.stationCode" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<button class="action-btn primary" @click="confirmTransportTask">确定</button> |
|
|
|
<button class="action-btn secondary" style="margin-left: 10px;" @click="closeTransportModal">取消</button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- Call栈板模态框 --> |
|
|
|
<el-dialog |
|
|
|
title="Call栈板" |
|
|
|
:visible.sync="callPalletModalVisible" |
|
|
|
width="90%" |
|
|
|
:close-on-click-modal="false" |
|
|
|
:show-close="false" |
|
|
|
:modal="true" |
|
|
|
:modal-append-to-body="true" |
|
|
|
:append-to-body="true" |
|
|
|
> |
|
|
|
<div class="call-modal-content"> |
|
|
|
<!-- 栈板号(只读) --> |
|
|
|
<div class="input-group"> |
|
|
|
<label class="input-label">栈板号</label> |
|
|
|
<el-input |
|
|
|
v-model="palletCode" |
|
|
|
placeholder="栈板号" |
|
|
|
class="form-input" |
|
|
|
readonly |
|
|
|
/> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 目标站点选择 --> |
|
|
|
<div class="input-group"> |
|
|
|
<label class="input-label">目标站点</label> |
|
|
|
<el-select |
|
|
|
v-model="selectedCallStation" |
|
|
|
placeholder="请选择目标站点" |
|
|
|
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> |
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<button class="action-btn primary" @click="confirmCallPallet">确定</button> |
|
|
|
<button class="action-btn secondary" style="margin-left: 10px;" @click="closeCallPalletModal">取消</button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
@ -275,7 +390,11 @@ import { |
|
|
|
savePalletDetail, |
|
|
|
deletePalletDetail, |
|
|
|
getLayersForEdit, |
|
|
|
updatePalletDetailPosition |
|
|
|
updatePalletDetailPosition, |
|
|
|
getAgvStations, |
|
|
|
getTargetStations, |
|
|
|
createPalletTransportTask, |
|
|
|
callPalletToStation |
|
|
|
} from '../../../api/automatedWarehouse/palletPacking' |
|
|
|
|
|
|
|
export default { |
|
|
|
@ -303,6 +422,18 @@ export default { |
|
|
|
// 栈板明细 |
|
|
|
detailList: [], |
|
|
|
|
|
|
|
// 运输任务模态框 |
|
|
|
transportModalVisible: false, |
|
|
|
startStationOptions: [], |
|
|
|
targetStationOptions: [], |
|
|
|
selectedStartStation: '', |
|
|
|
selectedTargetStation: '', |
|
|
|
|
|
|
|
// Call栈板模态框 |
|
|
|
callPalletModalVisible: false, |
|
|
|
callStationOptions: [], |
|
|
|
selectedCallStation: '', |
|
|
|
|
|
|
|
// 修改位置模态框 |
|
|
|
editPositionModalVisible: false, |
|
|
|
editSerialNo: '', |
|
|
|
@ -343,10 +474,27 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// Call栈板 - 预留接口 |
|
|
|
// Call栈板 - 选择站点 |
|
|
|
handleCallPallet() { |
|
|
|
// TODO: 实现Call栈板功能 |
|
|
|
this.$message.info('Call栈板功能待实现'); |
|
|
|
if (!this.palletCode) { |
|
|
|
this.$message.error('请先扫描栈板编码'); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
this.callPalletModalVisible = true; |
|
|
|
this.selectedCallStation = ''; |
|
|
|
|
|
|
|
// 获取AGV站点列表 |
|
|
|
getAgvStations({}).then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.callStationOptions = data.stations || []; |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || '获取站点列表失败'); |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error('获取站点列表失败:', error); |
|
|
|
this.$message.error('获取站点列表失败'); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 位置选择变化 |
|
|
|
@ -585,6 +733,152 @@ export default { |
|
|
|
this.editOriginalPosition = ''; |
|
|
|
this.editOriginalLayer = ''; |
|
|
|
}, |
|
|
|
|
|
|
|
// 运输指令按钮点击事件 |
|
|
|
handleTransportOrder() { |
|
|
|
if (!this.palletCode) { |
|
|
|
this.$message.error('请先扫描栈板'); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
this.transportModalVisible = true; |
|
|
|
this.selectedStartStation = ''; |
|
|
|
this.selectedTargetStation = ''; |
|
|
|
this.targetStationOptions = []; |
|
|
|
|
|
|
|
// 获取AGV站点列表 |
|
|
|
getAgvStations({}).then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.startStationOptions = data.stations || []; |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || '获取站点列表失败'); |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error('获取站点列表失败:', error); |
|
|
|
this.$message.error('获取站点列表失败'); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 起点站点选择变化 |
|
|
|
handleStartStationChange() { |
|
|
|
this.selectedTargetStation = ''; |
|
|
|
this.targetStationOptions = []; |
|
|
|
|
|
|
|
if (this.selectedStartStation) { |
|
|
|
getTargetStations({ |
|
|
|
startStation: this.selectedStartStation |
|
|
|
}).then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.targetStationOptions = data.targets || []; |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || '获取目标站点失败'); |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error('获取目标站点失败:', error); |
|
|
|
this.$message.error('获取目标站点失败'); |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 确认创建运输任务 |
|
|
|
confirmTransportTask() { |
|
|
|
if (!this.selectedStartStation) { |
|
|
|
this.$message.error('请选择起点站点'); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!this.selectedTargetStation) { |
|
|
|
this.$message.error('请选择目标站点'); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
createPalletTransportTask({ |
|
|
|
site: this.site, |
|
|
|
palletId: this.palletCode, |
|
|
|
startStation: this.selectedStartStation, |
|
|
|
endStation: this.selectedTargetStation |
|
|
|
}).then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.$message.success('运输任务创建成功'); |
|
|
|
this.closeTransportModal(); |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || '创建运输任务失败'); |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error('创建运输任务失败:', error); |
|
|
|
this.$message.error('创建运输任务失败'); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 关闭运输任务模态框 |
|
|
|
closeTransportModal() { |
|
|
|
this.transportModalVisible = false; |
|
|
|
this.selectedStartStation = ''; |
|
|
|
this.selectedTargetStation = ''; |
|
|
|
this.startStationOptions = []; |
|
|
|
this.targetStationOptions = []; |
|
|
|
}, |
|
|
|
|
|
|
|
// 确认Call栈板 |
|
|
|
confirmCallPallet() { |
|
|
|
if (!this.selectedCallStation) { |
|
|
|
this.$message.error('请选择站点'); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
callPalletToStation({ |
|
|
|
site: this.site, |
|
|
|
palletId: this.palletCode, |
|
|
|
station: this.selectedCallStation |
|
|
|
}).then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.$message.success('Call栈板任务创建成功'); |
|
|
|
this.closeCallPalletModal(); |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || 'Call栈板失败'); |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error('Call栈板失败:', error); |
|
|
|
this.$message.error('Call栈板失败'); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 关闭Call栈板模态框 |
|
|
|
closeCallPalletModal() { |
|
|
|
this.callPalletModalVisible = false; |
|
|
|
this.selectedCallStation = ''; |
|
|
|
this.callStationOptions = []; |
|
|
|
}, |
|
|
|
|
|
|
|
// 确认Call栈板 |
|
|
|
confirmCallPallet() { |
|
|
|
if (!this.selectedCallStation) { |
|
|
|
this.$message.error('请选择站点'); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
callPalletToStation({ |
|
|
|
site: this.site, |
|
|
|
palletId: this.palletCode, |
|
|
|
targetStation: this.selectedCallStation |
|
|
|
}).then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.$message.success('Call栈板成功'); |
|
|
|
this.closeCallPalletModal(); |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || 'Call栈板失败'); |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error('Call栈板失败:', error); |
|
|
|
this.$message.error('Call栈板失败'); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 关闭Call栈板模态框 |
|
|
|
closeCallPalletModal() { |
|
|
|
this.callPalletModalVisible = false; |
|
|
|
this.selectedCallStation = ''; |
|
|
|
this.callStationOptions = []; |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.$nextTick(() => { |
|
|
|
@ -687,4 +981,31 @@ export default { |
|
|
|
::v-deep .el-radio__label { |
|
|
|
font-size: 14px; |
|
|
|
} |
|
|
|
|
|
|
|
/* 标题行样式 */ |
|
|
|
.list-title-row { |
|
|
|
display: flex; |
|
|
|
justify-content: space-between; |
|
|
|
align-items: center; |
|
|
|
margin-bottom: 8px; |
|
|
|
} |
|
|
|
|
|
|
|
.list-title-row .list-title { |
|
|
|
margin: 0; |
|
|
|
flex: 1; |
|
|
|
} |
|
|
|
|
|
|
|
/* 空数据行样式 */ |
|
|
|
.empty-row { |
|
|
|
justify-content: center; |
|
|
|
align-items: center; |
|
|
|
padding: 20px; |
|
|
|
border-bottom: none; |
|
|
|
} |
|
|
|
|
|
|
|
.empty-row .empty-hint { |
|
|
|
text-align: center; |
|
|
|
color: #999; |
|
|
|
width: 100%; |
|
|
|
} |
|
|
|
</style> |