|
@@ -163,7 +163,8 @@
|
|
|
warehouseDefinition_statusList,
|
|
warehouseDefinition_statusList,
|
|
|
useDictLabel
|
|
useDictLabel
|
|
|
} from '@/utils/dict/index';
|
|
} from '@/utils/dict/index';
|
|
|
-
|
|
|
|
|
|
|
+ import { mapGetters, mapActions } from 'vuex';
|
|
|
|
|
+ import dictEnum from '@/enum/dict';
|
|
|
// import selectTree from '@/components/selectTree';
|
|
// import selectTree from '@/components/selectTree';
|
|
|
import WarehouseEdit from './components/WarehouseEdit';
|
|
import WarehouseEdit from './components/WarehouseEdit';
|
|
|
import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
|
|
import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
|
|
@@ -171,6 +172,9 @@
|
|
|
export default {
|
|
export default {
|
|
|
// components: { selectTree, tablePagination, WarehouseEdit },
|
|
// components: { selectTree, tablePagination, WarehouseEdit },
|
|
|
components: { WarehouseEdit },
|
|
components: { WarehouseEdit },
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ ...mapGetters(['dict', 'getDict', 'getDictValue'])
|
|
|
|
|
+ },
|
|
|
// mixins: [dictMixins],
|
|
// mixins: [dictMixins],
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -194,6 +198,7 @@
|
|
|
factoryList: [],
|
|
factoryList: [],
|
|
|
treeList: [],
|
|
treeList: [],
|
|
|
warehouse: [],
|
|
warehouse: [],
|
|
|
|
|
+ typeList: [],
|
|
|
warehouseLabel: [
|
|
warehouseLabel: [
|
|
|
{
|
|
{
|
|
|
label: '状态',
|
|
label: '状态',
|
|
@@ -203,7 +208,9 @@
|
|
|
{
|
|
{
|
|
|
label: '仓库类型',
|
|
label: '仓库类型',
|
|
|
key: 'inventoryType',
|
|
key: 'inventoryType',
|
|
|
- filter: useDictLabel(warehouseDefinition_inventoryList)
|
|
|
|
|
|
|
+ filter: (value) => {
|
|
|
|
|
+ return this.getDictValue('仓库类型', value);
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
{ label: '库区数', key: 'areaNumber' },
|
|
{ label: '库区数', key: 'areaNumber' },
|
|
|
{ label: '货架数', key: 'goodNumber' },
|
|
{ label: '货架数', key: 'goodNumber' },
|
|
@@ -213,10 +220,12 @@
|
|
|
]
|
|
]
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
- created() {
|
|
|
|
|
|
|
+ async created() {
|
|
|
|
|
+ this.requestDict('仓库类型');
|
|
|
this.initData();
|
|
this.initData();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ ...mapActions('dict', ['requestDict']),
|
|
|
filterFactoryId(factoryId) {
|
|
filterFactoryId(factoryId) {
|
|
|
let obj = this.factoryList.find((f) => f.id === factoryId);
|
|
let obj = this.factoryList.find((f) => f.id === factoryId);
|
|
|
return obj.name;
|
|
return obj.name;
|
|
@@ -235,6 +244,8 @@
|
|
|
try {
|
|
try {
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
|
const res = await warehouseDefinition.list(this.formData);
|
|
const res = await warehouseDefinition.list(this.formData);
|
|
|
|
|
+ console.log('res--------------------');
|
|
|
|
|
+ console.log(res);
|
|
|
this.warehouse = res;
|
|
this.warehouse = res;
|
|
|
} finally {
|
|
} finally {
|
|
|
this.loading = false;
|
|
this.loading = false;
|