<template>
|
<div>
|
<vol-box
|
v-model="showDetialBox"
|
:lazy="true"
|
width="600px"
|
:padding="15"
|
title="手动移库"
|
>
|
<div>
|
<el-form>
|
<el-form-item label="请选择巷道:">
|
<el-select
|
v-model="relocationInfo.roadWay"
|
filterable
|
placeholder="请选择"
|
>
|
<el-option
|
v-for="item in Roadways"
|
:key="item.key"
|
:label="item.value"
|
:value="item.key"
|
>
|
<span style="float: left">{{ item.value }}</span>
|
<span style="float: right; color: #8492a6; font-size: 13px">{{
|
item.key
|
}}</span>
|
</el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="请输起始行:"
|
><el-input
|
v-model="relocationInfo.startRow"
|
style="width: 180px"
|
label="请输起始行"
|
></el-input>
|
</el-form-item>
|
<el-form-item label="请输起始列:"
|
><el-input
|
v-model="relocationInfo.startColumn"
|
style="width: 180px"
|
label="请输起始列"
|
></el-input>
|
</el-form-item>
|
<el-form-item label="请输起始层:"
|
><el-input
|
v-model="relocationInfo.startLayer"
|
style="width: 180px"
|
label="请输起始层"
|
></el-input>
|
</el-form-item>
|
<el-form-item label="请输目标行:"
|
><el-input
|
v-model="relocationInfo.targetRow"
|
style="width: 180px"
|
label="请输目标行"
|
></el-input>
|
</el-form-item>
|
<el-form-item label="请输目标列:"
|
><el-input
|
v-model="relocationInfo.targetColumn"
|
style="width: 180px"
|
label="请输目标列"
|
></el-input>
|
</el-form-item>
|
<el-form-item label="请输目标层:"
|
><el-input
|
v-model="relocationInfo.targetLayer"
|
style="width: 180px"
|
label="请输目标层"
|
></el-input>
|
</el-form-item>
|
</el-form>
|
</div>
|
<template #footer>
|
<el-button type="primary" size="small" @click="submit">确认</el-button>
|
<el-button type="danger" size="small" @click="close">关闭</el-button>
|
</template>
|
</vol-box>
|
</div>
|
</template>
|
|
<script>
|
import VolBox from "@/components/basic/VolBox.vue";
|
export default {
|
components: { VolBox },
|
data() {
|
return {
|
showDetialBox: false,
|
Roadways: [
|
{ key: "SC01_CP", value: "1号堆垛机-成品库" },
|
{ key: "SC02_CP", value: "2号堆垛机-成品库" },
|
{ key: "SC03_CP", value: "3号堆垛机-成品库" },
|
{ key: "SC04_CP", value: "4号堆垛机-成品库" },
|
{ key: "SC05_CP", value: "5号堆垛机-成品库" },
|
{ key: "SC01_YL", value: "1号堆垛机-原料库" },
|
{ key: "SC02_YL", value: "2号堆垛机-原料库" },
|
{ key: "SC03_YLDual", value: "3号堆垛机-原料库" },
|
{ key: "SC04_YLDual", value: "4号堆垛机-原料库" },
|
{ key: "SC05_YLDual", value: "5号堆垛机-原料库" },
|
],
|
relocationInfo: {
|
startRow: null,
|
startColumn: null,
|
startLayer: null,
|
targetRow: null,
|
targetColumn: null,
|
targetLayer: null,
|
roadWay: ""
|
},
|
};
|
},
|
methods: {
|
open() {
|
this.showDetialBox = true;
|
},
|
close() {
|
this.showDetialBox = false;
|
this.relocationInfo = {
|
startRow: null,
|
startColumn: null,
|
startLayer: null,
|
targetRow: null,
|
targetColumn: null,
|
targetLayer: null,
|
roadWay: ""
|
}
|
},
|
submit() {
|
if (this.relocationInfo.roadWay == "") return this.$message.error("请选择巷道");
|
if (this.relocationInfo.startRow == null) return this.$message.error("请输入起始行");
|
if (this.relocationInfo.startColumn == null) return this.$message.error("请输入起始列");
|
if (this.relocationInfo.startLayer == null) return this.$message.error("请输入起始层");
|
if (this.relocationInfo.targetRow == null) return this.$message.error("请输入目标行");
|
if (this.relocationInfo.targetColumn == null) return this.$message.error("请输入目标列");
|
if (this.relocationInfo.targetLayer == null) return this.$message.error("请输入目标层");
|
this.http
|
.post(
|
"api/Task/Relocation",
|
this.relocationInfo,
|
"数据处理中"
|
)
|
.then((x) => {
|
if (!x.status) return this.$message.error(x.message);
|
this.$message.success("操作成功");
|
this.$parent.refresh();
|
this.close();
|
});
|
},
|
},
|
created() {},
|
};
|
</script>
|
|
<style scoped>
|
.el-col {
|
border-radius: 4px;
|
}
|
|
.grid-content {
|
border-radius: 4px;
|
min-height: 36px;
|
}
|
|
.content-text {
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
}
|
|
.right-text {
|
display: flex;
|
align-items: center;
|
justify-content: flex-end;
|
}
|
</style>
|
<style>
|
.el-table .warning-row {
|
background: #e6a23c;
|
}
|
|
.el-table .success-row {
|
background: #f0f9eb;
|
}
|
|
.el-table .error-row {
|
background: #f56c6c;
|
}
|
|
canvas {
|
display: block;
|
margin: auto;
|
}
|
</style>
|