'基础资料部分'
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 15:41:11
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-25 16:13:19
|
||||
* @LastEditors: fzq
|
||||
* @LastEditTime: 2022-03-03 20:47:18
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -44,10 +44,8 @@ import BaseTable from '@/components/BaseTable'
|
||||
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
||||
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
|
||||
import { shelfList, shelfDelete } from '@/api/basicData/Cache/shelf'
|
||||
import { areaList } from '@/api/basicData/Cache/area'
|
||||
import shelfAttrAdd from './components/shelfAttr-add.vue'
|
||||
import locationBtn from './components/locationBtn.vue'
|
||||
import { timeFormatter } from '@/filters'
|
||||
/**
|
||||
* 表格表头配置项 TypeScript接口注释
|
||||
* tableConfig<ConfigItem> = []
|
||||
@@ -76,34 +74,33 @@ const tableBtn = [
|
||||
]
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: i18n.t('module.basicData.factory.createTime'),
|
||||
filter: timeFormatter,
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: i18n.t('module.basicData.cache.ShelfName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t('module.basicData.cache.ShelfCode'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'areaName',
|
||||
prop: 'shelfName',
|
||||
label: i18n.t('module.basicData.cache.AreaName'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'shelfNumber',
|
||||
prop: 'code',
|
||||
label: i18n.t('module.basicData.cache.AreaCode'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'total',
|
||||
label: i18n.t('module.basicData.cache.StorageQuantity'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'location',
|
||||
label: i18n.t('module.basicData.cache.Location'),
|
||||
prop: 'rowNum',
|
||||
label: i18n.t('module.basicData.cache.rowNum'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'columnNum',
|
||||
label: i18n.t('module.basicData.cache.columnNum'),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'shelf',
|
||||
label: i18n.t('module.basicData.visual.location'),
|
||||
subcomponent: locationBtn,
|
||||
align: 'center'
|
||||
}
|
||||
@@ -141,21 +138,22 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const params = {
|
||||
current: 1,
|
||||
size: 500
|
||||
}
|
||||
areaList(params).then(response => {
|
||||
if (response.data.records) {
|
||||
this.areaList = response.data.records
|
||||
}
|
||||
this.getList()
|
||||
})
|
||||
// const params = {
|
||||
// current: 1,
|
||||
// size: 500
|
||||
// }
|
||||
// shelfList(params).then(response => {
|
||||
// if (response.data.records) {
|
||||
// this.areaList = response.data.records
|
||||
// }
|
||||
// this.getList()
|
||||
// })
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
handleClick(raw) {
|
||||
if (raw.type === 'delete') {
|
||||
this.$confirm(`${this.$t('module.basicData.visual.TipsBefore')}[${raw.data.name}]?`, this.$t('module.basicData.visual.Tips'), {
|
||||
this.$confirm(`${this.$t('module.basicData.visual.TipsBefore')}[${raw.data.shelfName}]?`, this.$t('module.basicData.visual.Tips'), {
|
||||
confirmButtonText: this.$t('module.basicData.visual.confirmButtonText'),
|
||||
cancelButtonText: this.$t('module.basicData.visual.cancelButtonText'),
|
||||
type: 'warning'
|
||||
@@ -179,9 +177,10 @@ export default {
|
||||
},
|
||||
getList(key) {
|
||||
this.listLoading = true
|
||||
this.listQuery.name = key
|
||||
this.listQuery.shelfName = key
|
||||
console.log(this.listQuery)
|
||||
shelfList(this.listQuery).then(response => {
|
||||
console.log(response)
|
||||
// console.log(response)
|
||||
if (response.data.records) {
|
||||
this.list = response.data.records
|
||||
this.list.forEach(item => {
|
||||
|
||||
Reference in New Issue
Block a user