|
|
|
@ -154,6 +154,7 @@ import { |
|
|
|
} from '@/api/partspare/wareHouseEntity.js' |
|
|
|
import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' |
|
|
|
import {getAllBuList}from '@/api/factory/site.js' |
|
|
|
import {getTableDefaultListLanguage, getTableUserListLanguage} from "../../../api/table"; |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
@ -200,6 +201,11 @@ export default { |
|
|
|
// 料号汇总 |
|
|
|
arrayPart: [ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table1BuDesc', |
|
|
|
tableId: '200101103Table1', |
|
|
|
tableName: '库存信息汇总表', |
|
|
|
columnProp: 'buDesc', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
@ -213,6 +219,11 @@ export default { |
|
|
|
columnWidth: 80, |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table1PartNo', |
|
|
|
tableId: '200101103Table1', |
|
|
|
tableName: '库存信息汇总表', |
|
|
|
columnProp: 'partNo', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
@ -226,6 +237,11 @@ export default { |
|
|
|
columnWidth: 140, |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table1PartDescription', |
|
|
|
tableId: '200101103Table1', |
|
|
|
tableName: '库存信息汇总表', |
|
|
|
columnProp: 'partDescription', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
@ -239,6 +255,11 @@ export default { |
|
|
|
columnWidth: 140, |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table1WarehouseId', |
|
|
|
tableId: '200101103Table1', |
|
|
|
tableName: '库存信息汇总表', |
|
|
|
columnProp: 'warehouseId', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
@ -251,6 +272,11 @@ export default { |
|
|
|
fixed: '', |
|
|
|
columnWidth: 140, |
|
|
|
}, { |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table1LocationId', |
|
|
|
tableId: '200101103Table1', |
|
|
|
tableName: '库存信息汇总表', |
|
|
|
columnProp: 'locationId', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
@ -263,6 +289,11 @@ export default { |
|
|
|
fixed: '', |
|
|
|
columnWidth: 140, |
|
|
|
}, { |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table1InQty', |
|
|
|
tableId: '200101103Table1', |
|
|
|
tableName: '库存信息汇总表', |
|
|
|
columnProp: 'inQty', |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
@ -275,6 +306,11 @@ export default { |
|
|
|
fixed: '', |
|
|
|
columnWidth: 140, |
|
|
|
}, { |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table1OutQty', |
|
|
|
tableId: '200101103Table1', |
|
|
|
tableName: '库存信息汇总表', |
|
|
|
columnProp: 'outQty', |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
@ -287,6 +323,11 @@ export default { |
|
|
|
fixed: '', |
|
|
|
columnWidth: 140, |
|
|
|
}, { |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table1QtyOnHand', |
|
|
|
tableId: '200101103Table1', |
|
|
|
tableName: '库存信息汇总表', |
|
|
|
columnProp: 'qtyOnHand', |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
@ -299,6 +340,11 @@ export default { |
|
|
|
fixed: '', |
|
|
|
columnWidth: 140, |
|
|
|
}, { |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table1MaxStock', |
|
|
|
tableId: '200101103Table1', |
|
|
|
tableName: '库存信息汇总表', |
|
|
|
columnProp: 'maxStock', |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
@ -311,6 +357,12 @@ export default { |
|
|
|
fixed: '', |
|
|
|
columnWidth: 140, |
|
|
|
}, { |
|
|
|
|
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table1MinStock', |
|
|
|
tableId: '200101103Table1', |
|
|
|
tableName: '库存信息汇总表', |
|
|
|
columnProp: 'minStock', |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
@ -323,6 +375,11 @@ export default { |
|
|
|
fixed: '', |
|
|
|
columnWidth: 140, |
|
|
|
},{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table1Spec', |
|
|
|
tableId: '200101103Table1', |
|
|
|
tableName: '库存信息汇总表', |
|
|
|
columnProp: 'spec', |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
@ -338,6 +395,11 @@ export default { |
|
|
|
// 料号_序号 |
|
|
|
arrayColumns: [ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table2BuDesc', |
|
|
|
tableId: '200101103Table2', |
|
|
|
tableName: '库存信息序号表', |
|
|
|
columnProp: 'buDesc', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
@ -351,6 +413,11 @@ export default { |
|
|
|
columnWidth: 80, |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table2PartNo', |
|
|
|
tableId: '200101103Table2', |
|
|
|
tableName: '库存信息序号表', |
|
|
|
columnProp: 'partNo', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
@ -364,6 +431,11 @@ export default { |
|
|
|
columnWidth: 140, |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table2PartDescription', |
|
|
|
tableId: '200101103Table2', |
|
|
|
tableName: '库存信息序号表', |
|
|
|
columnProp: 'partDescription', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
@ -377,6 +449,11 @@ export default { |
|
|
|
columnWidth: 140, |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table2BatchNo', |
|
|
|
tableId: '200101103Table2', |
|
|
|
tableName: '库存信息序号表', |
|
|
|
columnProp: 'batchNo', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
@ -389,6 +466,11 @@ export default { |
|
|
|
fixed: '', |
|
|
|
columnWidth: 140, |
|
|
|
}, { |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table2WarehouseId', |
|
|
|
tableId: '200101103Table2', |
|
|
|
tableName: '库存信息序号表', |
|
|
|
columnProp: 'warehouseId', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
@ -401,6 +483,11 @@ export default { |
|
|
|
fixed: '', |
|
|
|
columnWidth: 140, |
|
|
|
}, { |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table2LocationId', |
|
|
|
tableId: '200101103Table2', |
|
|
|
tableName: '库存信息序号表', |
|
|
|
columnProp: 'locationId', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
@ -414,6 +501,11 @@ export default { |
|
|
|
columnWidth: 140, |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table2Umid', |
|
|
|
tableId: '200101103Table2', |
|
|
|
tableName: '库存信息序号表', |
|
|
|
columnProp: 'umid', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
@ -427,6 +519,11 @@ export default { |
|
|
|
columnWidth: 100, |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table2AveragePrice', |
|
|
|
tableId: '200101103Table2', |
|
|
|
tableName: '库存信息序号表', |
|
|
|
columnProp: 'averagePrice', |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
@ -440,6 +537,11 @@ export default { |
|
|
|
columnWidth: 140, |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table2InQty', |
|
|
|
tableId: '200101103Table2', |
|
|
|
tableName: '库存信息序号表', |
|
|
|
columnProp: 'inQty', |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
@ -452,6 +554,11 @@ export default { |
|
|
|
fixed: '', |
|
|
|
columnWidth: 140, |
|
|
|
}, { |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table2OutQty', |
|
|
|
tableId: '200101103Table2', |
|
|
|
tableName: '库存信息序号表', |
|
|
|
columnProp: 'outQty', |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
@ -464,6 +571,11 @@ export default { |
|
|
|
fixed: '', |
|
|
|
columnWidth: 140, |
|
|
|
}, { |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table2QtyOnHand', |
|
|
|
tableId: '200101103Table2', |
|
|
|
tableName: '库存信息序号表', |
|
|
|
columnProp: 'qtyOnHand', |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
@ -476,6 +588,11 @@ export default { |
|
|
|
fixed: '', |
|
|
|
columnWidth: 140, |
|
|
|
}, { |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table2MaxStock', |
|
|
|
tableId: '200101103Table2', |
|
|
|
tableName: '库存信息序号表', |
|
|
|
columnProp: 'maxStock', |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
@ -488,6 +605,11 @@ export default { |
|
|
|
fixed: '', |
|
|
|
columnWidth: 140, |
|
|
|
}, { |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table2MinStock', |
|
|
|
tableId: '200101103Table2', |
|
|
|
tableName: '库存信息序号表', |
|
|
|
columnProp: 'minStock', |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
@ -501,6 +623,11 @@ export default { |
|
|
|
columnWidth: 140, |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table2TotalCost', |
|
|
|
tableId: '200101103Table2', |
|
|
|
tableName: '库存信息序号表', |
|
|
|
columnProp: 'totalCost', |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
@ -514,6 +641,11 @@ export default { |
|
|
|
columnWidth: 140, |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table2Spec', |
|
|
|
tableId: '200101103Table2', |
|
|
|
tableName: '库存信息序号表', |
|
|
|
columnProp: 'spec', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
@ -526,6 +658,11 @@ export default { |
|
|
|
fixed: '', |
|
|
|
columnWidth: 140, |
|
|
|
}, { |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table2PartnerId', |
|
|
|
tableId: '200101103Table2', |
|
|
|
tableName: '库存信息序号表', |
|
|
|
columnProp: 'partnerId', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
@ -538,6 +675,11 @@ export default { |
|
|
|
fixed: '', |
|
|
|
columnWidth: 140, |
|
|
|
}, { |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101103, |
|
|
|
serialNumber: '200101103Table2FirstInDate', |
|
|
|
tableId: '200101103Table2', |
|
|
|
tableName: '库存信息序号表', |
|
|
|
columnProp: 'firstInDate', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
@ -566,6 +708,13 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
activated() { |
|
|
|
// this.getDataList() |
|
|
|
// this.getWareHouseList() |
|
|
|
}, |
|
|
|
created() { |
|
|
|
// 动态列 |
|
|
|
this.getTableUserColumn(this.$route.meta.menuId+'table1',1) |
|
|
|
this.getTableUserColumn(this.$route.meta.menuId+'table2',2) |
|
|
|
this.getDataList() |
|
|
|
this.getWareHouseList() |
|
|
|
}, |
|
|
|
@ -722,6 +871,67 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 动态列开始 获取 用户保存的 格式列 |
|
|
|
async getTableUserColumn(tableId, columnId) { |
|
|
|
let queryTableUser = { |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
tableId: tableId, |
|
|
|
status: true, |
|
|
|
languageCode: this.$i18n.locale |
|
|
|
} |
|
|
|
await getTableUserListLanguage(queryTableUser).then(({data}) => { |
|
|
|
if (data.rows.length > 0) { |
|
|
|
//this.columnList1 = [] |
|
|
|
switch (columnId) { |
|
|
|
case 1: |
|
|
|
this.arrayColumns = data.rows |
|
|
|
break; |
|
|
|
case 2: |
|
|
|
this.arrayPart = data.rows |
|
|
|
break; |
|
|
|
// case 3: |
|
|
|
// this.columnList2 = data.rows |
|
|
|
// break; |
|
|
|
// case 4: |
|
|
|
// this.columnList3 = data.rows |
|
|
|
// break; |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.getColumnList(tableId, columnId) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取 tableDefault 列 |
|
|
|
async getColumnList (tableId, columnId) { |
|
|
|
let queryTable= { |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
tableId: tableId, |
|
|
|
languageCode: this.$i18n.locale |
|
|
|
} |
|
|
|
await getTableDefaultListLanguage(queryTable).then(({data}) => { |
|
|
|
if (!data.rows.length == 0) { |
|
|
|
switch (columnId) { |
|
|
|
case 1: |
|
|
|
this.arrayColumns = data.rows |
|
|
|
break; |
|
|
|
case 2: |
|
|
|
this.arrayPart = data.rows |
|
|
|
break; |
|
|
|
// case 3: |
|
|
|
// this.columnList2 = data.rows |
|
|
|
// break; |
|
|
|
// case 4: |
|
|
|
// this.columnList3 = data.rows |
|
|
|
// break; |
|
|
|
} |
|
|
|
} else { |
|
|
|
// this.showDefault = true. |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |