| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237 |
- export default {
- data () {
- return {
- columns_product: [
- {
- type: 'index',
- label: '序号',
- width: 80
- },
- {
- prop: 'code',
- label: '物品编码'
- },
- {
- prop: 'name',
- label: '物品名称'
- },
- {
- prop: 'brandNum',
- label: '牌号'
- },
- {
- prop: 'modelType',
- label: '型号'
- },
- {
- prop: 'classificationCode',
- label: '物品类型',
- formatter: this.classificationCodeFormatter
- },
- {
- prop: 'categoryLevelPath',
- label: '分类'
- },
- {
- columnKey: 'action',
- label: '操作',
- width: 150,
- align: 'center',
- slot: 'action',
- fixed: 'right'
- }
- ],
- columns_mould: [
- {
- type: 'index',
- label: '序号',
- width: 50
- },
- {
- prop: 'code',
- label: '物品编码'
- },
- {
- prop: 'name',
- label: '物品名称'
- },
- {
- prop: 'brandNum',
- label: '牌号'
- },
- {
- prop: 'modelType',
- label: '型号'
- },
- {
- prop: 'shrinkageCoefficient',
- label: '收缩系数',
- formatter: this.shrinkFormatter
- },
- {
- prop: 'dieBodyModel',
- label: '大模体型号',
- formatter: this.modleFormatter
- },
- {
- prop: 'classificationCode',
- label: '物品类型',
- formatter: this.classificationCodeFormatter
- },
- {
- prop: 'categoryLevelPath',
- label: '分类'
- },
- {
- columnKey: 'action',
- label: '操作',
- width: 150,
- align: 'center',
- slot: 'action',
- fixed: 'right'
- }
- ],
- columns_part: [
- {
- type: 'index',
- label: '序号',
- width: 50
- },
- {
- prop: 'code',
- label: '物品编码'
- },
- {
- prop: 'name',
- label: '物品名称'
- },
- {
- prop: 'modelType',
- label: '型号'
- },
- {
- prop: 'classificationCode',
- label: '物品类型',
- formatter: this.classificationCodeFormatter
- },
- {
- prop: 'categoryLevelPath',
- label: '分类'
- },
- {
- columnKey: 'action',
- label: '操作',
- width: 150,
- align: 'center',
- slot: 'action',
- fixed: 'right'
- }
- ],
- columns_bom: [
- {
- type: 'index',
- label: '序号',
- width: 50
- },
- {
- prop: 'code',
- label: '物品编码'
- },
- {
- prop: 'name',
- label: '物品名称'
- },
- {
- prop: 'brandNum',
- label: '牌号'
- },
- {
- prop: 'classificationCode',
- label: '物品类型',
- formatter: this.classificationCodeFormatter
- },
- {
- prop: 'categoryLevelPath',
- label: '分类'
- },
- {
- label: '数量',
- columnKey: 'num',
- width: 120,
- slot: 'num'
- },
- {
- columnKey: 'action',
- label: '操作',
- width: 150,
- align: 'center',
- slot: 'action',
- fixed: 'right'
- }
- ],
- columns_facility: [
- {
- type: 'index',
- label: '序号',
- width: 50
- },
- {
- prop: 'code',
- label: '物品编码'
- },
- {
- prop: 'name',
- label: '物品名称'
- },
- {
- prop: 'classificationCode',
- label: '物品类型',
- formatter: this.classificationCodeFormatter
- },
- {
- prop: 'categoryLevelPath',
- label: '分类'
- },
- {
- columnKey: 'action',
- label: '操作',
- width: 150,
- align: 'center',
- slot: 'action',
- fixed: 'right'
- }
- ]
- };
- },
- methods: {
- // 物品类型格式化
- classificationCodeFormatter (row) {
- let itemName = '';
- this.typeList.map((item) => {
- if (item.code == row.type) {
- itemName = item.name;
- }
- });
- return itemName;
- },
- // 收缩系数格式化
- shrinkFormatter (row) {
- let shrink = '';
- let extendField = JSON.parse(row.extendField);
- if (extendField.hasOwnProperty('shrinkageCoefficient')) {
- shrink = extendField.shrinkageCoefficient;
- }
- return shrink;
- },
- modleFormatter (row) {
- let modle = '';
- let extendField = JSON.parse(row.extendField);
- if (extendField.hasOwnProperty('dieBodyModel')) {
- modle = extendField.dieBodyModel;
- }
- return modle;
- }
- }
- };
|