<template>
|
<!-- 面包屑导航区 -->
|
<div>
|
<br>
|
<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>
|
|
|
|
|
|
<div>
|
<br> <br> <br> <br> <br> <br> <br> <br>
|
<h3>---------------------------------↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓异常任务处理↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓--------------------------------------------------------</h3>
|
<br>
|
<el-input v-model="deleteValue" placeholder="输入托盘号/器具编号" style="width:200px"></el-input>
|
|
<el-button type="danger" @click="deleteTask" >删除任务</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>
|
</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: '',
|
deleteValue: ''
|
}
|
},
|
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() {
|
if (this.stockName.trim() == '') {
|
return this.$message.error('请输入库位号!')
|
}
|
this.$confirm('确定要删除库存吗?', '删除', {
|
confirmButtonText: '确定',
|
cancelButtonText: '取消',
|
type: 'warning'
|
})
|
.then(() => {
|
const url = '/api/task/stockDelete'
|
const params = {
|
isremove: 1,
|
positionName: this.stockName.trim(),
|
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() {
|
if (this.stockName.trim() == '') {
|
return this.$message.error('请输入库位号!')
|
}
|
this.$confirm('确定要解锁库位吗?', '删除', {
|
confirmButtonText: '确定',
|
cancelButtonText: '取消',
|
type: 'warning'
|
})
|
.then(() => {
|
const url = '/api/task/stockDelete'
|
|
const params = {
|
isremove: 2,
|
positionName: this.stockName.trim(),
|
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: '已取消'
|
})
|
})
|
},
|
// 根据托盘号删除任务
|
deleteTask() {
|
debugger
|
|
const url = '/api/task/deleteTask'
|
const params = this.deleteValue.trim()
|
if (params == '') {
|
return this.$message.error('请输入托盘号!')
|
}
|
var callback = res => {
|
this.stockName = ''
|
debugger
|
if (res.result === true) return this.$message.success(res.msg)
|
return this.$message.error(res.msg)
|
}
|
this.common.ajax(url, params, callback, true)
|
},
|
resetDeviceStatus() {
|
debugger
|
const url = '/api/task/resetDeviceStatus'
|
const params = this.deviceCodeValue.trim()
|
if (params == '') {
|
return this.$message.error('请选择设备号!')
|
}
|
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>
|