'修改bug'

This commit is contained in:
Fanzink
2022-03-10 21:15:33 +08:00
parent 95afd175a3
commit 7afe3c3ec7
25 changed files with 419 additions and 156 deletions

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2020-12-29 15:41:11
* @LastEditors: fzq
* @LastEditTime: 2022-03-04 19:08:00
* @LastEditTime: 2022-03-10 21:00:58
* @Description:
-->
<template>
@@ -17,7 +17,9 @@
@getDataList="getList"
@add="addNew"
/>
<el-button type="success" @click="goback()">{{ 'btn.back' | i18nFilter }}</el-button>
<div style="title">货架编码:{{ shCode }} 货架名称{{ shName }} 库存量{{ num }}
<el-button type="success" @click="goback()">{{ 'btn.back' | i18nFilter }}</el-button>
</div>
<base-table
:page="listQuery.current"
:limit="listQuery.size"
@@ -106,7 +108,7 @@ const tableProps = [
align: 'center'
},
{
prop: 'status',
prop: 'statusName',
label: i18n.t('module.basicData.cache.status'),
align: 'center'
}
@@ -127,13 +129,18 @@ export default {
},
data() {
return {
shCode: '',
shName: '',
num: 0,
addOrUpdateVisible: false,
keyNameAdd: i18n.t('module.basicData.visual.keyword'),
placeholderName: this.$t('module.basicData.cache.LocationName'),
tableBtn,
trueWidth: 200,
tableProps,
list: [],
list: [{
statusName: ''
}],
listLoading: true,
listQuery: {
current: 1,
@@ -145,6 +152,9 @@ export default {
},
created() {
this.listQuery.shelfId = this.$route.query.id
this.shCode = this.$route.query.code
this.shName = this.$route.query.shelfName
this.num = this.$route.query.columnNum
this.getList()
},
methods: {
@@ -180,6 +190,16 @@ export default {
if (response.data.records) {
this.list = response.data.records
console.log(this.list)
// 1是Working Port2是Buffer Port3是Exception Port与status进行替换
for (var x = 0; x < this.list.length; x++) {
if (this.list[x].status === 1) {
this.list[x].statusName = 'Working Port'
} else if (this.list[x].status === 2) {
this.list[x].statusName = 'Buffer Port'
} else if (this.list[x].status === 3) {
this.list[x].statusName = 'Exception Port'
}
}
} else {
this.list.splice(0, this.list.length)
}