<template>
|
<div>
|
<vol-box
|
v-model="showDetialBox"
|
:lazy="true"
|
width="600px"
|
:padding="15"
|
title="手动107请求"
|
>
|
<div style="margin-bottom: 20px;">
|
获取到纸卷条码查询ERP库存
|
<br>
|
<br>
|
<el-input
|
v-model="requestBarCode"
|
style="width: 180px"
|
label="纸卷条码"
|
></el-input>
|
|
<el-descriptions title="ERP库存" v-if="showStock">
|
<el-descriptions-item label="重量">{{ searchStock.weight ? searchStock.weight : "无库存"}}</el-descriptions-item>
|
<el-descriptions-item label="直径">{{ searchStock.thicknes ? searchStock.thicknes : "无库存" }}</el-descriptions-item>
|
<el-descriptions-item label="幅宽">{{ searchStock.wide ? searchStock.wide : "无库存"}}</el-descriptions-item>
|
</el-descriptions>
|
<el-button type="primary" size="small" @click="search">查询</el-button>
|
</div>
|
<div>
|
<el-form>
|
<el-form-item label="请输RFID:"
|
><el-input
|
v-model="requestStock.rfId"
|
style="width: 180px"
|
label="请输RFID"
|
></el-input>
|
</el-form-item>
|
<el-form-item label="请输重量:"
|
><el-input
|
v-model="requestStock.weight"
|
style="width: 180px"
|
label="请输重量"
|
></el-input>
|
</el-form-item>
|
<el-form-item label="请输直径:"
|
><el-input
|
v-model="requestStock.thicknes"
|
style="width: 180px"
|
label="请输直径"
|
></el-input>
|
</el-form-item>
|
<el-form-item label="请输幅宽:"
|
><el-input
|
v-model="requestStock.wide"
|
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,
|
showStock: false,
|
requestBarCode:null,
|
searchStock: {
|
weight: null,
|
thicknes: null,
|
wide: null
|
},
|
requestStock: {
|
rfId: null,
|
weight: null,
|
thicknes: null,
|
wide: null
|
},
|
};
|
},
|
methods: {
|
open() {
|
this.showDetialBox = true;
|
},
|
close() {
|
this.showDetialBox = false;
|
this.requestStock = {
|
rfId: null,
|
weight: null,
|
thicknes: null,
|
wide: null
|
};
|
this.showStock = false;
|
this.requestBarCode = null;
|
this.searchStock = {
|
weight: null,
|
thicknes: null,
|
wide: null
|
};
|
},
|
search(){
|
this.http
|
.post(
|
"api/ERPBST/BSTStockAsync?barCode=" + this.requestBarCode,
|
null,
|
"数据处理中"
|
)
|
.then((x) => {
|
if(x.code==200){
|
this.showStock = true;
|
this.searchStock.weight= x.data.qty ==0 ? null:x.data.qty;
|
this.searchStock.thicknes= x.data.thick ==0 ? null:x.data.thick;
|
this.searchStock.wide= x.data.w ==0 ? null:x.data.w;
|
console.log(this.searchStock);
|
}else{
|
this.$message.error(x.message);
|
}
|
});
|
},
|
submit() {
|
if (this.showStock == false) return this.$message.error("请先查询ERP库存");
|
if (this.requestStock.rfId == null) return this.$message.error("请输入RFID");
|
if (this.requestStock.weight == null) return this.$message.error("请输入重量");
|
if (this.requestStock.thicknes == null) return this.$message.error("请输入直径");
|
if (this.requestStock.wide == null) return this.$message.error("请输入幅宽");
|
this.http
|
.post(
|
"api/Task/YLPurchaseBoxing?palletCode=" + this.requestStock.rfId + "&weight=" + this.requestStock.weight + "&thickness=" + this.requestStock.thicknes + "&wide=" + this.requestStock.wide+ "&stationCode=107",
|
null,
|
"数据处理中"
|
)
|
.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>
|