|
|
@@ -151,265 +151,519 @@
|
|
|
data() {
|
|
|
return {
|
|
|
searchForm: {
|
|
|
- dimension: 1
|
|
|
+ dimension: '1'
|
|
|
},
|
|
|
- isShow: false,
|
|
|
- isPack: false,
|
|
|
- isMeta: false,
|
|
|
- selectedDime: 1
|
|
|
+ selectedDime: '1'
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
// 表格列配置
|
|
|
columns() {
|
|
|
- let obj = [
|
|
|
- {
|
|
|
- columnKey: 'index',
|
|
|
- type: 'index',
|
|
|
- width: 50,
|
|
|
- align: 'center',
|
|
|
- label: '序号',
|
|
|
- showOverflowTooltip: true,
|
|
|
- fixed: 'left'
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
- prop: 'code',
|
|
|
- label: '编码',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'name',
|
|
|
- label: '名称',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'brandNum',
|
|
|
- label: '牌号',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'modelType',
|
|
|
- label: '型号',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'specification',
|
|
|
- label: '规格',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'packingCountBase',
|
|
|
- label: '包装库存数量',
|
|
|
- sortable: 'custom',
|
|
|
- showOverflowTooltip: true,
|
|
|
- width: 130,
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'minUnit',
|
|
|
- label: '包装单位',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'minPackingCount',
|
|
|
- slot: 'minPackingCount',
|
|
|
- label: '最小包装单元',
|
|
|
- showOverflowTooltip: true,
|
|
|
- width: 120
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'availableCountBase',
|
|
|
- label: '计量库存数量',
|
|
|
- sortable: 'custom',
|
|
|
- showOverflowTooltip: true,
|
|
|
- width: 130,
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'measuringUnit',
|
|
|
- label: '计量单位',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'expirationDate',
|
|
|
- slot: 'expirationDate',
|
|
|
- label: '库存保质期',
|
|
|
- showOverflowTooltip: true,
|
|
|
- width: 100
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'expirationTime',
|
|
|
- label: '周期倒计时',
|
|
|
- showOverflowTooltip: true,
|
|
|
- width: 100
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'qualityResult',
|
|
|
- slot: 'qualityResult',
|
|
|
- label: '质检结果',
|
|
|
- showOverflowTooltip: true,
|
|
|
- width: 100
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'qualityStatus',
|
|
|
- slot: 'qualityStatus',
|
|
|
- label: '质检状态',
|
|
|
- showOverflowTooltip: true,
|
|
|
- width: 100
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
- prop: 'paths',
|
|
|
- width: 230,
|
|
|
- label: '仓库',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- // {
|
|
|
- // prop: '',
|
|
|
- // label: '安全库存',
|
|
|
- // showOverflowTooltip: true
|
|
|
- // },
|
|
|
- // {
|
|
|
- // prop: '',
|
|
|
- // label: '质保期',
|
|
|
- // showOverflowTooltip: true
|
|
|
- // },
|
|
|
- {
|
|
|
- columnKey: 'action',
|
|
|
- label: '操作',
|
|
|
- width: 100,
|
|
|
- align: 'left',
|
|
|
- resizable: false,
|
|
|
- slot: 'action',
|
|
|
- fixed: 'right'
|
|
|
- }
|
|
|
- ];
|
|
|
- if (this.isShow) {
|
|
|
- obj.splice(1, 0, {
|
|
|
- slot: 'batchNo',
|
|
|
- prop: 'batchNo',
|
|
|
- label: '批次号',
|
|
|
- showOverflowTooltip: true
|
|
|
- });
|
|
|
- let index = obj.findIndex((item) => item.label == '仓库');
|
|
|
- if (index !== -1) {
|
|
|
- obj.splice(index, 1);
|
|
|
- }
|
|
|
+ // selectedDime 1物品维度 2批次维度 3包装维度 4物料维度
|
|
|
+ switch (this.selectedDime) {
|
|
|
+ // 物品维度
|
|
|
+ case '1':
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ columnKey: 'index',
|
|
|
+ type: 'index',
|
|
|
+ width: 50,
|
|
|
+ align: 'center',
|
|
|
+ label: '序号',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'code',
|
|
|
+ label: '编码',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'name',
|
|
|
+ label: '名称',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'brandNum',
|
|
|
+ label: '牌号',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'modelType',
|
|
|
+ label: '型号',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'specification',
|
|
|
+ label: '规格',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'availableCountBase',
|
|
|
+ label: '计量库存数量',
|
|
|
+ sortable: 'custom',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ width: 130,
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'measuringUnit',
|
|
|
+ label: '计量单位',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'weight',
|
|
|
+ label: '重量',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'weightUnit',
|
|
|
+ label: '重量单位',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'expirationDate',
|
|
|
+ slot: 'expirationDate',
|
|
|
+ label: '库存保质期',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'expirationTime',
|
|
|
+ label: '周期倒计时',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'qualityResult',
|
|
|
+ slot: 'qualityResult',
|
|
|
+ label: '质检结果',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'qualityStatus',
|
|
|
+ slot: 'qualityStatus',
|
|
|
+ label: '质检状态',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'paths',
|
|
|
+ width: 230,
|
|
|
+ label: '仓库',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnKey: 'action',
|
|
|
+ label: '操作',
|
|
|
+ width: 100,
|
|
|
+ align: 'left',
|
|
|
+ resizable: false,
|
|
|
+ slot: 'action',
|
|
|
+ fixed: 'right'
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ // 批次维度
|
|
|
+ case '2':
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ columnKey: 'index',
|
|
|
+ type: 'index',
|
|
|
+ width: 50,
|
|
|
+ align: 'center',
|
|
|
+ label: '序号',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ slot: 'batchNo',
|
|
|
+ prop: 'batchNo',
|
|
|
+ label: '批次号',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'code',
|
|
|
+ label: '编码',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'name',
|
|
|
+ label: '名称',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'brandNum',
|
|
|
+ label: '牌号',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'modelType',
|
|
|
+ label: '型号',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'specification',
|
|
|
+ label: '规格',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'packingCountBase',
|
|
|
+ label: '包装库存数量',
|
|
|
+ sortable: 'custom',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ width: 130,
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'minUnit',
|
|
|
+ label: '包装单位',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'minPackingCount',
|
|
|
+ slot: 'minPackingCount',
|
|
|
+ label: '最小包装单元',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ width: 120
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'availableCountBase',
|
|
|
+ label: '计量库存数量',
|
|
|
+ sortable: 'custom',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ width: 130,
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'measuringUnit',
|
|
|
+ label: '计量单位',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'weight',
|
|
|
+ label: '重量',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'weightUnit',
|
|
|
+ label: '重量单位',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'expirationDate',
|
|
|
+ slot: 'expirationDate',
|
|
|
+ label: '库存保质期',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'expirationTime',
|
|
|
+ label: '周期倒计时',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'qualityResult',
|
|
|
+ slot: 'qualityResult',
|
|
|
+ label: '质检结果',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'qualityStatus',
|
|
|
+ slot: 'qualityStatus',
|
|
|
+ label: '质检状态',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnKey: 'action',
|
|
|
+ label: '操作',
|
|
|
+ width: 100,
|
|
|
+ align: 'left',
|
|
|
+ resizable: false,
|
|
|
+ slot: 'action',
|
|
|
+ fixed: 'right'
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ // 包装维度
|
|
|
+ case '3':
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ columnKey: 'index',
|
|
|
+ type: 'index',
|
|
|
+ width: 50,
|
|
|
+ align: 'center',
|
|
|
+ label: '序号',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ slot: 'batchNo',
|
|
|
+ prop: 'batchNo',
|
|
|
+ label: '批次号',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'packagingCode',
|
|
|
+ label: '包装编码',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'codeNumber',
|
|
|
+ label: '编号',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'name',
|
|
|
+ label: '名称',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'brandNum',
|
|
|
+ label: '牌号',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'modelType',
|
|
|
+ label: '型号',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'specification',
|
|
|
+ label: '规格',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'packingCountBase',
|
|
|
+ label: '包装库存数量',
|
|
|
+ sortable: 'custom',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ width: 130,
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'minUnit',
|
|
|
+ label: '包装单位',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'minPackingCount',
|
|
|
+ slot: 'minPackingCount',
|
|
|
+ label: '最小包装单元',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ width: 120
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'availableCountBase',
|
|
|
+ label: '计量库存数量',
|
|
|
+ sortable: 'custom',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ width: 130,
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'measuringUnit',
|
|
|
+ label: '计量单位',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'weight',
|
|
|
+ label: '重量',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'weightUnit',
|
|
|
+ label: '重量单位',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'expirationDate',
|
|
|
+ slot: 'expirationDate',
|
|
|
+ label: '库存保质期',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'expirationTime',
|
|
|
+ label: '周期倒计时',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'qualityResult',
|
|
|
+ slot: 'qualityResult',
|
|
|
+ label: '质检结果',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'qualityStatus',
|
|
|
+ slot: 'qualityStatus',
|
|
|
+ label: '质检状态',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'paths',
|
|
|
+ width: 230,
|
|
|
+ label: '仓库',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnKey: 'action',
|
|
|
+ label: '操作',
|
|
|
+ width: 100,
|
|
|
+ align: 'left',
|
|
|
+ resizable: false,
|
|
|
+ slot: 'action',
|
|
|
+ fixed: 'right'
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ // 物料维度
|
|
|
+ default:
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ columnKey: 'index',
|
|
|
+ type: 'index',
|
|
|
+ width: 50,
|
|
|
+ align: 'center',
|
|
|
+ label: '序号',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ slot: 'batchNo',
|
|
|
+ prop: 'batchNo',
|
|
|
+ label: '批次号',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'no',
|
|
|
+ label: '物料编码',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'codeNumber',
|
|
|
+ label: '编号',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'name',
|
|
|
+ label: '名称',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'brandNum',
|
|
|
+ label: '牌号',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'modelType',
|
|
|
+ label: '型号',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'specification',
|
|
|
+ label: '规格',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'meterielCode',
|
|
|
+ label: '物料代号',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'clientCode',
|
|
|
+ label: '客户代号',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'engrave',
|
|
|
+ label: '刻码',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'availableCountBase',
|
|
|
+ label: '计量库存数量',
|
|
|
+ sortable: 'custom',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ width: 130,
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'measuringUnit',
|
|
|
+ label: '计量单位',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'weight',
|
|
|
+ label: '重量',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'weightUnit',
|
|
|
+ label: '重量单位',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'expirationDate',
|
|
|
+ slot: 'expirationDate',
|
|
|
+ label: '库存保质期',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'expirationTime',
|
|
|
+ label: '周期倒计时',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'qualityResult',
|
|
|
+ slot: 'qualityResult',
|
|
|
+ label: '质检结果',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'qualityStatus',
|
|
|
+ slot: 'qualityStatus',
|
|
|
+ label: '质检状态',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'paths',
|
|
|
+ width: 230,
|
|
|
+ label: '仓库',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnKey: 'action',
|
|
|
+ label: '操作',
|
|
|
+ width: 100,
|
|
|
+ align: 'left',
|
|
|
+ resizable: false,
|
|
|
+ slot: 'action',
|
|
|
+ fixed: 'right'
|
|
|
+ }
|
|
|
+ ];
|
|
|
}
|
|
|
- if (this.isPack) {
|
|
|
- obj.splice(1, 0, {
|
|
|
- slot: 'batchNum',
|
|
|
- prop: 'batchNum',
|
|
|
- label: '批次号',
|
|
|
- showOverflowTooltip: true
|
|
|
- });
|
|
|
- // 寻找现有的 'code' 对象的索引
|
|
|
- let codeIndex = obj.findIndex((item) => item.prop === 'code');
|
|
|
-
|
|
|
- if (codeIndex !== -1) {
|
|
|
- // 删除现有的 'code' 对象
|
|
|
- obj.splice(codeIndex, 1, {
|
|
|
- prop: 'packagingCode',
|
|
|
- label: '包装编码',
|
|
|
- showOverflowTooltip: true
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- if (this.isMeta) {
|
|
|
- obj.splice(1, 0, {
|
|
|
- slot: 'batchNum',
|
|
|
- prop: 'batchNum',
|
|
|
- label: '批次号',
|
|
|
- showOverflowTooltip: true
|
|
|
- });
|
|
|
- obj.splice(10, 0, {
|
|
|
- prop: 'weight',
|
|
|
- label: '重量',
|
|
|
- showOverflowTooltip: true
|
|
|
- });
|
|
|
- obj.splice(11, 0, {
|
|
|
- prop: 'weightUnit',
|
|
|
- label: '重量单位',
|
|
|
- showOverflowTooltip: true
|
|
|
- });
|
|
|
- obj.splice(7, 0, {
|
|
|
- prop: 'meterielCode',
|
|
|
- label: '物料代号',
|
|
|
- showOverflowTooltip: true
|
|
|
- });
|
|
|
- obj.splice(8, 0, {
|
|
|
- prop: 'clientCode',
|
|
|
- label: '客户代号',
|
|
|
- showOverflowTooltip: true
|
|
|
- });
|
|
|
-
|
|
|
- obj.splice(9, 0, {
|
|
|
- prop: 'engrave',
|
|
|
- label: '刻码',
|
|
|
- showOverflowTooltip: true
|
|
|
- });
|
|
|
- // 寻找现有的 'code' 对象的索引
|
|
|
- let codeIndex = obj.findIndex((item) => item.prop === 'code');
|
|
|
-
|
|
|
- if (codeIndex !== -1) {
|
|
|
- // 删除现有的 'code' 对象
|
|
|
- obj.splice(codeIndex, 1, {
|
|
|
- prop: 'no',
|
|
|
- label: '物料编码',
|
|
|
- showOverflowTooltip: true
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- return obj;
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
handledime(val) {
|
|
|
- this.$set(this, 'isShow', val == 2);
|
|
|
- this.$set(this, 'isPack', val == 3);
|
|
|
- this.$set(this, 'isMeta', val == 4);
|
|
|
- // this.reload({
|
|
|
- // ...this.$refs.refSeavch.params,
|
|
|
- // dimension: this.$refs.refSeavch.dimension
|
|
|
- // });
|
|
|
- // if (val == 2) {
|
|
|
- // // this.handleBatchDimension(val);
|
|
|
- // this.reload();
|
|
|
- // } else if (val == 3) {
|
|
|
- // this.handleInventoryDimension(val);
|
|
|
- // }else{}
|
|
|
- this.reload();
|
|
|
this.selectedDime = val;
|
|
|
- },
|
|
|
- //批次维度
|
|
|
- async handleBatchDimension(event) {
|
|
|
- // const treeId = this.$parent.$parent.$parent.current.id;
|
|
|
- // const params = {
|
|
|
- // page: 1,
|
|
|
- // size: 10,
|
|
|
- // categoryLevelId: treeId
|
|
|
- // };
|
|
|
- // const res = await getBatchDetails(params);
|
|
|
- // console.log(res);
|
|
|
- // 待完善
|
|
|
- },
|
|
|
- //库存维度
|
|
|
- async handleInventoryDimension(val) {
|
|
|
- // const treeId = this.$parent.$parent.$parent.current.id;
|
|
|
- // const rep = await ouint.getInventoryDetails({
|
|
|
- // pageNum: 1,
|
|
|
- // size: 10,
|
|
|
- // categoryLevelId: treeId
|
|
|
- // });
|
|
|
- // console.log(rep);
|
|
|
- //待完善
|
|
|
+ this.reload();
|
|
|
},
|
|
|
/* 表格数据源 */
|
|
|
datasource({ page, limit, where, order }) {
|
|
|
const dimension = this.$refs.refSeavch.dimension;
|
|
|
const treeId = this.$parent.$parent.$parent.current.id;
|
|
|
if (this.selectedDime == 1) {
|
|
|
+ // 物品维度
|
|
|
const data = ouint.getRealTimeInventory({
|
|
|
...where,
|
|
|
...order,
|
|
|
@@ -434,6 +688,7 @@
|
|
|
});
|
|
|
return result;
|
|
|
} else if (this.selectedDime == 2) {
|
|
|
+ // 物品维度
|
|
|
const params = {
|
|
|
categoryLevelId: treeId,
|
|
|
...where,
|
|
|
@@ -463,6 +718,7 @@
|
|
|
});
|
|
|
return result;
|
|
|
} else if (this.selectedDime == 4) {
|
|
|
+ // 物料维度
|
|
|
const params = {
|
|
|
categoryLevelId: treeId,
|
|
|
...where,
|
|
|
@@ -498,6 +754,7 @@
|
|
|
console.log(result);
|
|
|
return result;
|
|
|
} else {
|
|
|
+ // 包装维度
|
|
|
const params = {
|
|
|
categoryLevelId: treeId,
|
|
|
...where,
|