update
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-17 15:49:18
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-11-17 15:58:31
|
||||
* @LastEditors: gtz
|
||||
* @LastEditTime: 2021-12-17 17:02:25
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -11,7 +11,9 @@
|
||||
:visible.sync="visible">
|
||||
<el-table
|
||||
:data="dataList"
|
||||
border
|
||||
v-loading="formLoading"
|
||||
:stripe="true"
|
||||
:header-cell-style="{background:'#eef1f6',color:'#606266',height: '56px'}"
|
||||
style="width: 100%;">
|
||||
<el-table-column
|
||||
type="index"
|
||||
@@ -21,19 +23,19 @@
|
||||
width="50">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="id"
|
||||
prop="idenCardNum"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="标识卡">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="id1"
|
||||
prop="customer"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="客户信息">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="number"
|
||||
prop="quantity"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="数量">
|
||||
@@ -56,24 +58,27 @@
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
dataList: []
|
||||
dataList: [],
|
||||
formLoading: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init (id) {
|
||||
this.visible = true
|
||||
this.formLoading = true
|
||||
this.$nextTick(() => {
|
||||
if (id) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/sys/config/info/${this.dataForm.id}`),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams()
|
||||
url: this.$http.adornUrl(`/outStock/get`),
|
||||
method: 'post',
|
||||
data: this.$http.adornData({ id })
|
||||
}).then(({data}) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataForm.paramKey = data.config.paramKey
|
||||
this.dataForm.paramValue = data.config.paramValue
|
||||
this.dataForm.remark = data.config.remark
|
||||
this.dataForm = data.data
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
this.formLoading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
@@ -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