<template>
|
<!-- 面包屑导航区 -->
|
<div>
|
<el-input v-model="input" placeholder="请输入撤销凭证" style="width:200px"></el-input>
|
|
<el-button type="info" @click="revocation" >sap凭证撤销</el-button>
|
|
<el-input v-model="stockName" placeholder="请输入货位名称" style="width:200px"></el-input>
|
|
<el-button type="danger" @click="stockDelete" >清除库位</el-button>
|
<el-button type="success" @click="stockunlock" >解锁库位</el-button>
|
|
|
<el-select v-model="deviceCodeValue" placeholder="选择拆叠盘设备">
|
<el-option
|
v-for="item in deviceCode"
|
:key="item.value"
|
:label="item.label"
|
:value="item.value">
|
</el-option>
|
</el-select>
|
<el-button type="primary" @click="resetDeviceStatus" >复位拆叠盘机状态</el-button>
|
</div>
|
</template>
|
<script>
|
import { userInfoCookie, menuListCookie } from "@/utils/auth";
|
export default {
|
data() {
|
return {
|
input: "",
|
stockName: "",
|
deviceCode: [
|
{
|
value: "1",
|
label: "大拆盘机"
|
},
|
{
|
value: "2",
|
label: "小拆盘机"
|
},
|
{
|
value: "3",
|
label: "大叠盘机"
|
},
|
{
|
value: "4",
|
label: "小叠盘机"
|
}
|
],
|
deviceCodeValue: ""
|
};
|
},
|
created() {},
|
mounted() {},
|
methods: {
|
revocation() {
|
const url = "/api/task/reverser";
|
const params = this.input;
|
|
var callback = res => {
|
this.input = "";
|
return this.$message.error(res.data);
|
};
|
this.common.ajax(url, params, callback, true);
|
},
|
|
stockDelete() {
|
this.$confirm("确定要删除库存吗?", "删除", {
|
confirmButtonText: "确定",
|
cancelButtonText: "取消",
|
type: "warning"
|
})
|
.then(() => {
|
const url = "/api/task/stockDelete";
|
const params = {
|
isremove: 1,
|
positionName: this.stockName,
|
username: userInfoCookie.getUserInfo().userTrueName
|
};
|
var callback = res => {
|
this.stockName = "";
|
debugger;
|
if (res.result === true) return this.$message.success(res.data);
|
return this.$message.error(res.data);
|
};
|
this.common.ajax(url, params, callback, true);
|
})
|
.catch(() => {
|
this.$message({
|
type: "info",
|
message: "已取消"
|
});
|
});
|
},
|
stockunlock() {
|
this.$confirm("确定要解锁库位吗?", "删除", {
|
confirmButtonText: "确定",
|
cancelButtonText: "取消",
|
type: "warning"
|
})
|
.then(() => {
|
const url = "/api/task/stockDelete";
|
const params = {
|
isremove: 2,
|
positionName: this.stockName,
|
username: userInfoCookie.getUserInfo().userTrueName
|
};
|
var callback = res => {
|
this.stockName = "";
|
debugger;
|
if (res.result === true) return this.$message.success(res.data);
|
return this.$message.error(res.data);
|
};
|
this.common.ajax(url, params, callback, true);
|
})
|
.catch(() => {
|
this.$message({
|
type: "info",
|
message: "已取消"
|
});
|
});
|
},
|
resetDeviceStatus() {
|
debugger;
|
const url = "/api/task/resetDeviceStatus";
|
const params = this.deviceCodeValue;
|
var callback = res => {
|
this.stockName = "";
|
debugger;
|
if (res.result === true) return this.$message.success(res.data);
|
return this.$message.error(res.data);
|
};
|
this.common.ajax(url, params, callback, true);
|
}
|
}
|
|
//
|
};
|
</script>
|
<style lang="postcss" scoped>
|
.el-table {
|
margin-top: 10px;
|
line-height: 30px;
|
}
|
.el-col {
|
line-height: 30px;
|
}
|
</style>
|