|
|
@ -132,6 +132,7 @@ |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import AddOrUpdate from './partspare-add-or-update' |
|
|
import AddOrUpdate from './partspare-add-or-update' |
|
|
|
|
|
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" |
|
|
import { |
|
|
import { |
|
|
getPartSpareList, deletePartSpare, getPartSpareInfo, updatePartSpareInTransit |
|
|
getPartSpareList, deletePartSpare, getPartSpareInfo, updatePartSpareInTransit |
|
|
} from '@/api/partspare/partspare.js' |
|
|
} from '@/api/partspare/partspare.js' |
|
|
@ -182,10 +183,10 @@ export default { |
|
|
columnList: [ |
|
|
columnList: [ |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: this.$route.meta.menuId, |
|
|
|
|
|
serialNumber: 'toolDetail1101ToolId', |
|
|
|
|
|
tableId: "toolOIRecord", |
|
|
|
|
|
tableName: "common", |
|
|
|
|
|
|
|
|
functionId:200101101, |
|
|
|
|
|
serialNumber: '200101101TableSite', |
|
|
|
|
|
tableId: "200101101Table", |
|
|
|
|
|
tableName: "备品备件信息表", |
|
|
columnProp: 'site', |
|
|
columnProp: 'site', |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "left", |
|
|
align: "left", |
|
|
@ -200,10 +201,10 @@ export default { |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: this.$route.meta.menuId, |
|
|
|
|
|
serialNumber: 'toolDetail1101ToolId', |
|
|
|
|
|
tableId: "toolOIRecord", |
|
|
|
|
|
tableName: "common", |
|
|
|
|
|
|
|
|
functionId:200101101, |
|
|
|
|
|
serialNumber: '200101101TablePartNo', |
|
|
|
|
|
tableId: "200101101Table", |
|
|
|
|
|
tableName: "备品备件信息表", |
|
|
columnProp: 'partNo', |
|
|
columnProp: 'partNo', |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "left", |
|
|
align: "left", |
|
|
@ -218,10 +219,10 @@ export default { |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: this.$route.meta.menuId, |
|
|
|
|
|
serialNumber: 'toolDetail1101ToolId', |
|
|
|
|
|
tableId: "toolOIRecord", |
|
|
|
|
|
tableName: "common", |
|
|
|
|
|
|
|
|
functionId:200101101, |
|
|
|
|
|
serialNumber: '200101101TablePartDescription', |
|
|
|
|
|
tableId: "200101101Table", |
|
|
|
|
|
tableName: "备品备件信息表", |
|
|
columnProp: 'partDescription', |
|
|
columnProp: 'partDescription', |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "left", |
|
|
align: "left", |
|
|
@ -236,10 +237,10 @@ export default { |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: this.$route.meta.menuId, |
|
|
|
|
|
serialNumber: 'toolDetail1101ToolId', |
|
|
|
|
|
tableId: "toolOIRecord", |
|
|
|
|
|
tableName: "common", |
|
|
|
|
|
|
|
|
functionId:200101101, |
|
|
|
|
|
serialNumber: '200101101TableSpec', |
|
|
|
|
|
tableId: "200101101Table", |
|
|
|
|
|
tableName: "备品备件信息表", |
|
|
columnProp: 'spec', |
|
|
columnProp: 'spec', |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "left", |
|
|
align: "left", |
|
|
@ -254,10 +255,10 @@ export default { |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: this.$route.meta.menuId, |
|
|
|
|
|
serialNumber: 'toolDetail1101ToolId', |
|
|
|
|
|
tableId: "toolOIRecord", |
|
|
|
|
|
tableName: "common", |
|
|
|
|
|
|
|
|
functionId:200101101, |
|
|
|
|
|
serialNumber: '200101101TableUmid', |
|
|
|
|
|
tableId: "200101101Table", |
|
|
|
|
|
tableName: "备品备件信息表", |
|
|
columnProp: 'umid', |
|
|
columnProp: 'umid', |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "left", |
|
|
align: "left", |
|
|
@ -272,10 +273,10 @@ export default { |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: this.$route.meta.menuId, |
|
|
|
|
|
serialNumber: 'toolDetail1101ToolId', |
|
|
|
|
|
tableId: "toolOIRecord", |
|
|
|
|
|
tableName: "common", |
|
|
|
|
|
|
|
|
functionId:200101101, |
|
|
|
|
|
serialNumber: '200101101TableRemark', |
|
|
|
|
|
tableId: "200101101Table", |
|
|
|
|
|
tableName: "备品备件信息表", |
|
|
columnProp: 'remark', |
|
|
columnProp: 'remark', |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "left", |
|
|
align: "left", |
|
|
@ -290,10 +291,10 @@ export default { |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: this.$route.meta.menuId, |
|
|
|
|
|
serialNumber: 'toolDetail1101ToolId', |
|
|
|
|
|
tableId: "toolOIRecord", |
|
|
|
|
|
tableName: "common", |
|
|
|
|
|
|
|
|
functionId:200101101, |
|
|
|
|
|
serialNumber: '200101101TableStock', |
|
|
|
|
|
tableId: "200101101Table", |
|
|
|
|
|
tableName: "备品备件信息表", |
|
|
columnProp: 'stock', |
|
|
columnProp: 'stock', |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "left", |
|
|
align: "left", |
|
|
@ -308,10 +309,10 @@ export default { |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: this.$route.meta.menuId, |
|
|
|
|
|
serialNumber: 'toolDetail1101ToolId', |
|
|
|
|
|
tableId: "toolOIRecord", |
|
|
|
|
|
tableName: "common", |
|
|
|
|
|
|
|
|
functionId:200101101, |
|
|
|
|
|
serialNumber: '200101101TableStockInArrive', |
|
|
|
|
|
tableId: "200101101Table", |
|
|
|
|
|
tableName: "备品备件信息表", |
|
|
columnProp: 'stockInArrive', |
|
|
columnProp: 'stockInArrive', |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "left", |
|
|
align: "left", |
|
|
@ -326,10 +327,10 @@ export default { |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: this.$route.meta.menuId, |
|
|
|
|
|
serialNumber: 'toolDetail1101ToolId', |
|
|
|
|
|
tableId: "toolOIRecord", |
|
|
|
|
|
tableName: "common", |
|
|
|
|
|
|
|
|
functionId:200101101, |
|
|
|
|
|
serialNumber: '200101101TableStockInQuality', |
|
|
|
|
|
tableId: "200101101Table", |
|
|
|
|
|
tableName: "备品备件信息表", |
|
|
columnProp: 'stockInQuality', |
|
|
columnProp: 'stockInQuality', |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "left", |
|
|
align: "left", |
|
|
@ -344,10 +345,10 @@ export default { |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: this.$route.meta.menuId, |
|
|
|
|
|
serialNumber: 'toolDetail1101ToolId', |
|
|
|
|
|
tableId: "toolOIRecord", |
|
|
|
|
|
tableName: "common", |
|
|
|
|
|
|
|
|
functionId:200101101, |
|
|
|
|
|
serialNumber: '200101101TableStockInConsignment', |
|
|
|
|
|
tableId: "200101101Table", |
|
|
|
|
|
tableName: "备品备件信息表", |
|
|
columnProp: 'stockInConsignment', |
|
|
columnProp: 'stockInConsignment', |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "left", |
|
|
align: "left", |
|
|
@ -362,10 +363,10 @@ export default { |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: this.$route.meta.menuId, |
|
|
|
|
|
serialNumber: 'toolDetail1101ToolId', |
|
|
|
|
|
tableId: "toolOIRecord", |
|
|
|
|
|
tableName: "common", |
|
|
|
|
|
|
|
|
functionId:200101101, |
|
|
|
|
|
serialNumber: '200101101TableStockInPicking', |
|
|
|
|
|
tableId: "200101101Table", |
|
|
|
|
|
tableName: "备品备件信息表", |
|
|
columnProp: 'stockInPicking', |
|
|
columnProp: 'stockInPicking', |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "left", |
|
|
align: "left", |
|
|
@ -380,10 +381,10 @@ export default { |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: this.$route.meta.menuId, |
|
|
|
|
|
serialNumber: 'toolDetail1101ToolId', |
|
|
|
|
|
tableId: "toolOIRecord", |
|
|
|
|
|
tableName: "common", |
|
|
|
|
|
|
|
|
functionId:200101101, |
|
|
|
|
|
serialNumber: '200101101TableStockinActive', |
|
|
|
|
|
tableId: "200101101Table", |
|
|
|
|
|
tableName: "备品备件信息表", |
|
|
columnProp: 'stockinActive', |
|
|
columnProp: 'stockinActive', |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "left", |
|
|
align: "left", |
|
|
@ -398,10 +399,10 @@ export default { |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: this.$route.meta.menuId, |
|
|
|
|
|
serialNumber: 'toolDetail1101ToolId', |
|
|
|
|
|
tableId: "toolOIRecord", |
|
|
|
|
|
tableName: "common", |
|
|
|
|
|
|
|
|
functionId:200101101, |
|
|
|
|
|
serialNumber: '200101101TableQtyonPo', |
|
|
|
|
|
tableId: "200101101Table", |
|
|
|
|
|
tableName: "备品备件信息表", |
|
|
columnProp: 'qtyonPo', |
|
|
columnProp: 'qtyonPo', |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "left", |
|
|
align: "left", |
|
|
@ -416,10 +417,10 @@ export default { |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: this.$route.meta.menuId, |
|
|
|
|
|
serialNumber: 'toolDetail1101ToolId', |
|
|
|
|
|
tableId: "toolOIRecord", |
|
|
|
|
|
tableName: "common", |
|
|
|
|
|
|
|
|
functionId:200101101, |
|
|
|
|
|
serialNumber: '200101101TableMinStock', |
|
|
|
|
|
tableId: "200101101Table", |
|
|
|
|
|
tableName: "备品备件信息表", |
|
|
columnProp: 'minStock', |
|
|
columnProp: 'minStock', |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "left", |
|
|
align: "left", |
|
|
@ -434,10 +435,10 @@ export default { |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: this.$route.meta.menuId, |
|
|
|
|
|
serialNumber: 'toolDetail1101ToolId', |
|
|
|
|
|
tableId: "toolOIRecord", |
|
|
|
|
|
tableName: "common", |
|
|
|
|
|
|
|
|
functionId:200101101, |
|
|
|
|
|
serialNumber: '200101101TableAveragePrice', |
|
|
|
|
|
tableId: "200101101Table", |
|
|
|
|
|
tableName: "备品备件信息表", |
|
|
columnProp: 'averagePrice', |
|
|
columnProp: 'averagePrice', |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "right", |
|
|
align: "right", |
|
|
@ -452,10 +453,10 @@ export default { |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: this.$route.meta.menuId, |
|
|
|
|
|
serialNumber: 'toolDetail1101ToolId', |
|
|
|
|
|
tableId: "toolOIRecord", |
|
|
|
|
|
tableName: "common", |
|
|
|
|
|
|
|
|
functionId:200101101, |
|
|
|
|
|
serialNumber: '200101101TableEstUseQty', |
|
|
|
|
|
tableId: "200101101Table", |
|
|
|
|
|
tableName: "备品备件信息表", |
|
|
columnProp: 'estUseQty', |
|
|
columnProp: 'estUseQty', |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "right", |
|
|
align: "right", |
|
|
@ -470,10 +471,10 @@ export default { |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: this.$route.meta.menuId, |
|
|
|
|
|
serialNumber: 'toolDetail1101ToolId', |
|
|
|
|
|
tableId: "toolOIRecord", |
|
|
|
|
|
tableName: "common", |
|
|
|
|
|
|
|
|
functionId:200101101, |
|
|
|
|
|
serialNumber: '200101101TableSCodeControlFlag', |
|
|
|
|
|
tableId: "200101101Table", |
|
|
|
|
|
tableName: "备品备件信息表", |
|
|
columnProp: 'sCodeControlFlag', |
|
|
columnProp: 'sCodeControlFlag', |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "left", |
|
|
align: "left", |
|
|
@ -489,10 +490,10 @@ export default { |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: this.$route.meta.menuId, |
|
|
|
|
|
serialNumber: 'toolDetail1101ToolId', |
|
|
|
|
|
tableId: "toolOIRecord", |
|
|
|
|
|
tableName: "common", |
|
|
|
|
|
|
|
|
functionId:200101101, |
|
|
|
|
|
serialNumber: '200101101TableSafetyStock', |
|
|
|
|
|
tableId: "200101101Table", |
|
|
|
|
|
tableName: "备品备件信息表", |
|
|
columnProp: 'safetyStock', |
|
|
columnProp: 'safetyStock', |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "left", |
|
|
align: "left", |
|
|
@ -506,10 +507,10 @@ export default { |
|
|
columnWidth: 140, |
|
|
columnWidth: 140, |
|
|
}, { |
|
|
}, { |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: this.$route.meta.menuId, |
|
|
|
|
|
serialNumber: 'toolDetail1101ToolId', |
|
|
|
|
|
tableId: "toolOIRecord", |
|
|
|
|
|
tableName: "common", |
|
|
|
|
|
|
|
|
functionId:200101101, |
|
|
|
|
|
serialNumber: '200101101TableActive', |
|
|
|
|
|
tableId: "200101101Table", |
|
|
|
|
|
tableName: "备品备件信息表", |
|
|
columnProp: 'active', |
|
|
columnProp: 'active', |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "left", |
|
|
align: "left", |
|
|
@ -523,10 +524,10 @@ export default { |
|
|
columnWidth: 140, |
|
|
columnWidth: 140, |
|
|
}, { |
|
|
}, { |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: this.$route.meta.menuId, |
|
|
|
|
|
serialNumber: 'toolDetail1101ToolId', |
|
|
|
|
|
tableId: "toolOIRecord", |
|
|
|
|
|
tableName: "common", |
|
|
|
|
|
|
|
|
functionId:200101101, |
|
|
|
|
|
serialNumber: '200101101TableWarehouseName', |
|
|
|
|
|
tableId: "200101101Table", |
|
|
|
|
|
tableName: "备品备件信息表", |
|
|
columnProp: 'warehouseName', |
|
|
columnProp: 'warehouseName', |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "left", |
|
|
align: "left", |
|
|
@ -551,6 +552,10 @@ export default { |
|
|
this.height = window.innerHeight - 170 |
|
|
this.height = window.innerHeight - 170 |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
created() { |
|
|
|
|
|
// 动态列 |
|
|
|
|
|
this.getTableUserColumn(this.$route.meta.menuId+'table',1) |
|
|
|
|
|
}, |
|
|
activated() { |
|
|
activated() { |
|
|
this.getDataList() |
|
|
this.getDataList() |
|
|
this.getWareHouseList() |
|
|
this.getWareHouseList() |
|
|
@ -715,6 +720,66 @@ 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.columnList = data.rows |
|
|
|
|
|
break; |
|
|
|
|
|
// case 2: |
|
|
|
|
|
// this.columnDetailList = 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.columnList = data.rows |
|
|
|
|
|
break; |
|
|
|
|
|
// case 2: |
|
|
|
|
|
// this.columnDetailList = data.rows |
|
|
|
|
|
// break; |
|
|
|
|
|
// case 3: |
|
|
|
|
|
// this.columnList2 = data.rows |
|
|
|
|
|
// break; |
|
|
|
|
|
// case 4: |
|
|
|
|
|
// this.columnList3 = data.rows |
|
|
|
|
|
// break; |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
// this.showDefault = true. |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
closeDialog() { |
|
|
closeDialog() { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|