update
This commit is contained in:
@@ -1,41 +1,25 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-15 15:17:30
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-11-17 16:07:04
|
||||
* @LastEditors: gtz
|
||||
* @LastEditTime: 2021-12-17 17:05:22
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<div v-loading="dataListLoading">
|
||||
<div class="mainDiv" style="margin:10px 0 100px">
|
||||
<div class="flexDiv">
|
||||
<div
|
||||
<div
|
||||
class="wareBox"
|
||||
:class="[
|
||||
count > Math.round(Math.random() * 10) ? 'enableBox' : 'disableBox',
|
||||
{ active: count === isActive }
|
||||
item.empty === 1 ? 'enableBox' : 'disableBox',
|
||||
{ active: item.locationId === isActive }
|
||||
]"
|
||||
@click="selectBox(count)"
|
||||
v-for="count in 10"
|
||||
v-bind:key="count"
|
||||
@click="selectBox(item.locationId)"
|
||||
v-for="item in warehouseList"
|
||||
:key="item.locationId"
|
||||
>
|
||||
<div class="plat">库位{{ count }}</div>
|
||||
<div class="plat">{{ item.locationName }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flexDiv">
|
||||
<div
|
||||
class="wareBox"
|
||||
:class="[
|
||||
count > Math.round(Math.random() * 10) ? 'enableBox' : 'disableBox',
|
||||
{ active: count + 10 === isActive }
|
||||
]"
|
||||
@click="selectBox(count + 10)"
|
||||
v-for="count in 10"
|
||||
v-bind:key="count"
|
||||
>
|
||||
<div class="plat">库位{{ count + 10 }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
<div class="mainDiv" style="margin:100px 0 10px">
|
||||
@@ -59,31 +43,66 @@ export default {
|
||||
data () {
|
||||
return {
|
||||
isActive: '',
|
||||
ExWarehouseInfoVisible: false
|
||||
ExWarehouseInfoVisible: false,
|
||||
dataListLoading: false,
|
||||
warehouseList: []
|
||||
}
|
||||
},
|
||||
components: {
|
||||
ExWarehouseInfo
|
||||
},
|
||||
created () {},
|
||||
created () {
|
||||
this.getWarehouseList()
|
||||
},
|
||||
methods: {
|
||||
selectBox (count) {
|
||||
this.isActive = count
|
||||
getWarehouseList () {
|
||||
this.dataListLoading = true
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/outStock/list'),
|
||||
method: 'post'
|
||||
}).then(({data}) => {
|
||||
if (data && data.code === 0) {
|
||||
this.warehouseList = data.data
|
||||
} else {
|
||||
this.warehouseList = []
|
||||
}
|
||||
this.dataListLoading = false
|
||||
})
|
||||
},
|
||||
selectBox (id) {
|
||||
this.isActive = id
|
||||
this.ExWarehouseInfoVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ExWarehouseInfoRef.init()
|
||||
this.$refs.ExWarehouseInfoRef.init(id)
|
||||
})
|
||||
},
|
||||
selectPlat (count) {
|
||||
if (this.isActive) {
|
||||
this.$confirm(`确认从库位${this.isActive}出库至提升台${count}?`, '提示', {
|
||||
this.$confirm(`确认从库位id为[${this.isActive}]出库至提升台${count}?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'info '
|
||||
}).then(() => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '出库成功!'
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/outStock/runOutTask'),
|
||||
method: 'post',
|
||||
data: this.$http.adornData({
|
||||
code: count,
|
||||
localtionId: this.isActive
|
||||
})
|
||||
}).then(({data}) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '出库成功!',
|
||||
onClose: () => {
|
||||
this.getWarehouseList()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
this.dataListLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
@@ -132,6 +151,7 @@ export default {
|
||||
.wareBox {
|
||||
cursor: pointer;
|
||||
margin: 10px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding: 10px;
|
||||
line-height: 90px;
|
||||
|
||||
Reference in New Issue
Block a user