|
@@ -196,9 +196,10 @@
|
|
|
import { lbjtList } from '@/enum/dict.js';
|
|
import { lbjtList } from '@/enum/dict.js';
|
|
|
import tabMixins from '@/mixins/tableColumnsMixin';
|
|
import tabMixins from '@/mixins/tableColumnsMixin';
|
|
|
import { levelList } from '@/enum/dict.js';
|
|
import { levelList } from '@/enum/dict.js';
|
|
|
|
|
+ import dictMixins from '@/mixins/dictMixins';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
- mixins: [tabMixins],
|
|
|
|
|
|
|
+ mixins: [tabMixins, dictMixins],
|
|
|
|
|
|
|
|
components: {
|
|
components: {
|
|
|
productTree,
|
|
productTree,
|
|
@@ -380,6 +381,69 @@
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
showOverflowTooltip: true
|
|
showOverflowTooltip: true
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'modelKey',
|
|
|
|
|
+ label: '机型',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'colorKey',
|
|
|
|
|
+ label: '颜色',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'voltage',
|
|
|
|
|
+ label: '电压',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ formatter: (row, column) => {
|
|
|
|
|
+ return row.extField?.voltage || '';
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'layBy',
|
|
|
|
|
+ label: '贮藏',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ formatter: (row, column) => {
|
|
|
|
|
+ return row.extField?.layBy ? this.getDictValue(
|
|
|
|
|
+ '贮藏',
|
|
|
|
|
+ row.extField?.layBy
|
|
|
|
|
+ ) : '';
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'warrantyPeriod',
|
|
|
|
|
+ label: '保质期',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ formatter: (row, column) => {
|
|
|
|
|
+ let unit = ''
|
|
|
|
|
+ if(row.warrantyPeriodUnit) {
|
|
|
|
|
+ unit = this.getDictValue(
|
|
|
|
|
+ '保质期单位',
|
|
|
|
|
+ row.warrantyPeriodUnit
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log(row.warrantyPeriodUnit, unit)
|
|
|
|
|
+ return row.warrantyPeriod ? row.warrantyPeriod + unit : '';
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'purchaseOrigins',
|
|
|
|
|
+ label: '产地',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ formatter: (row, column) => {
|
|
|
|
|
+ return row.purchaseOrigins && row.purchaseOrigins.length
|
|
|
|
|
+ ? row.purchaseOrigins
|
|
|
|
|
+ .map((item) => this.getDictValue('产地', item))
|
|
|
|
|
+ .join(',')
|
|
|
|
|
+ : '';
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
prop: 'measuringUnit',
|
|
prop: 'measuringUnit',
|
|
|
label: '计量单位',
|
|
label: '计量单位',
|
|
@@ -438,6 +502,12 @@
|
|
|
];
|
|
];
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ created() {
|
|
|
|
|
+ this.requestDict('保质期单位');
|
|
|
|
|
+ this.requestDict('贮藏');
|
|
|
|
|
+ this.requestDict('产地');
|
|
|
|
|
+ this.requestDict('贮藏');
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
methods: {
|
|
|
getDictV(code, val) {
|
|
getDictV(code, val) {
|
|
|
if (!this.dictList[code]) return '';
|
|
if (!this.dictList[code]) return '';
|
|
@@ -452,6 +522,7 @@
|
|
|
label: item[values[0]]
|
|
label: item[values[0]]
|
|
|
};
|
|
};
|
|
|
});
|
|
});
|
|
|
|
|
+ console.log('code', this.dictList[code]);
|
|
|
},
|
|
},
|
|
|
open(item, currentIndex, value) {
|
|
open(item, currentIndex, value) {
|
|
|
this.dataSources = value || '1';
|
|
this.dataSources = value || '1';
|