Browse Source

2024.1.31 备品备件管理:动态列新增

java8
yuejiayang 2 years ago
parent
commit
623efa584f
  1. 115
      src/views/modules/partspare/partSpareLocation.vue
  2. 225
      src/views/modules/partspare/partspare.vue
  3. 139
      src/views/modules/partspare/repairtransdetail.vue
  4. 116
      src/views/modules/partspare/resourcespare.vue

115
src/views/modules/partspare/partSpareLocation.vue

@ -157,7 +157,7 @@ import {
deletePartSpareLocation, // deletePartSpareLocation, //
partSpareLocationTemp, // partSpareLocationTemp, //
} from '@/api/partspare/partSpareLocation.js' } from '@/api/partspare/partSpareLocation.js'
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
import { import {
getWareHouseList, getWareHouseList,
} from '@/api/partspare/wareHouseEntity.js' } from '@/api/partspare/wareHouseEntity.js'
@ -197,6 +197,11 @@ export default {
height: 200, height: 200,
columnList: [ columnList: [
{ {
userId: this.$store.state.user.name,
functionId: 200101105,
serialNumber: '200101105TableLocationId',
tableId: "200101105Table",
tableName: "货位管理表",
columnProp: 'locationId', columnProp: 'locationId',
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
@ -210,6 +215,11 @@ export default {
columnWidth: 140, columnWidth: 140,
}, },
{ {
userId: this.$store.state.user.name,
functionId: 200101105,
serialNumber: '200101105TableLocationName',
tableId: "200101105Table",
tableName: "货位管理表",
columnProp: 'locationName', columnProp: 'locationName',
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
@ -223,6 +233,11 @@ export default {
columnWidth: 140, columnWidth: 140,
}, },
{ {
userId: this.$store.state.user.name,
functionId: 200101105,
serialNumber: '200101105TableWarehouseId',
tableId: "200101105Table",
tableName: "货位管理表",
columnProp: 'warehouseId', columnProp: 'warehouseId',
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
@ -236,6 +251,11 @@ export default {
columnWidth: 140, columnWidth: 140,
}, },
{ {
userId: this.$store.state.user.name,
functionId: 200101105,
serialNumber: '200101105TableWarehouseName',
tableId: "200101105Table",
tableName: "货位管理表",
columnProp: 'warehouseName', columnProp: 'warehouseName',
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
@ -249,6 +269,11 @@ export default {
columnWidth: 140, columnWidth: 140,
}, },
{ {
userId: this.$store.state.user.name,
functionId: 200101105,
serialNumber: '200101105TableMaxCapacity',
tableId: "200101105Table",
tableName: "货位管理表",
columnProp: 'maxCapacity', columnProp: 'maxCapacity',
headerAlign: "center", headerAlign: "center",
align: "right", align: "right",
@ -262,6 +287,11 @@ export default {
columnWidth: 140, columnWidth: 140,
}, },
{ {
userId: this.$store.state.user.name,
functionId: 200101105,
serialNumber: '200101105TableActive',
tableId: "200101105Table",
tableName: "货位管理表",
columnProp: 'active', columnProp: 'active',
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
@ -275,6 +305,11 @@ export default {
columnWidth: 140, columnWidth: 140,
}, },
{ {
userId: this.$store.state.user.name,
functionId: 200101105,
serialNumber: '200101105TableCreateDate',
tableId: "200101105Table",
tableName: "货位管理表",
columnProp: 'createDate', columnProp: 'createDate',
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
@ -288,6 +323,11 @@ export default {
columnWidth: 140, columnWidth: 140,
}, },
{ {
userId: this.$store.state.user.name,
functionId: 200101105,
serialNumber: '200101105TableCreateBy',
tableId: "200101105Table",
tableName: "货位管理表",
columnProp: 'createBy', columnProp: 'createBy',
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
@ -301,6 +341,11 @@ export default {
columnWidth: 140, columnWidth: 140,
}, },
{ {
userId: this.$store.state.user.name,
functionId: 200101105,
serialNumber: '200101105TableUpdateDate',
tableId: "200101105Table",
tableName: "货位管理表",
columnProp: 'updateDate', columnProp: 'updateDate',
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
@ -314,6 +359,11 @@ export default {
columnWidth: 140, columnWidth: 140,
}, },
{ {
userId: this.$store.state.user.name,
functionId: 200101105,
serialNumber: '200101105TableUpdateBy',
tableId: "200101105Table",
tableName: "货位管理表",
columnProp: 'updateBy', columnProp: 'updateBy',
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
@ -392,6 +442,8 @@ export default {
created() { created() {
this.getDataList() this.getDataList()
this.getWareHouseList() this.getWareHouseList()
//
this.getTableUserColumn(this.$route.meta.menuId+'table',1)
}, },
components: { components: {
@ -656,6 +708,67 @@ export default {
let s = eval("(" + json + ")") let s = eval("(" + json + ")")
return s return s
}, },
//
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.
}
})
},
} }
} }
</script> </script>

225
src/views/modules/partspare/partspare.vue

@ -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() {
} }

139
src/views/modules/partspare/repairtransdetail.vue

@ -122,6 +122,7 @@
import { import {
getRepairTransDetailList, getRepairTransDetailList,
} from '@/api/partspare/repairtransdetail.js' } from '@/api/partspare/repairtransdetail.js'
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
import { import {
getWareHouseList, getWareHouseList,
} from '@/api/partspare/wareHouseEntity.js' } from '@/api/partspare/wareHouseEntity.js'
@ -167,6 +168,11 @@ export default {
// //
columnList:[ columnList:[
{ {
userId: this.$store.state.user.name,
functionId:200101104,
serialNumber: '200101104TablePartNo',
tableId: "200101104Table",
tableName: "出入库明细表",
columnProp: 'partNo', columnProp: 'partNo',
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -180,6 +186,11 @@ export default {
columnWidth: 140, columnWidth: 140,
}, },
{ {
userId: this.$store.state.user.name,
functionId:200101104,
serialNumber: '200101104TablePartDescription',
tableId: "200101104Table",
tableName: "出入库明细表",
columnProp: 'partDescription', columnProp: 'partDescription',
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -192,6 +203,11 @@ export default {
fixed: '', fixed: '',
columnWidth: 140, columnWidth: 140,
}, { }, {
userId: this.$store.state.user.name,
functionId:200101104,
serialNumber: '200101104TableSpec',
tableId: "200101104Table",
tableName: "出入库明细表",
columnProp: 'spec', columnProp: 'spec',
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -204,6 +220,11 @@ export default {
fixed: '', fixed: '',
columnWidth: 140, columnWidth: 140,
}, { }, {
userId: this.$store.state.user.name,
functionId:200101104,
serialNumber: '200101104TableBatchNo',
tableId: "200101104Table",
tableName: "出入库明细表",
columnProp: 'batchNo', columnProp: 'batchNo',
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -216,6 +237,11 @@ export default {
fixed: '', fixed: '',
columnWidth: 140, columnWidth: 140,
}, { }, {
userId: this.$store.state.user.name,
functionId:200101104,
serialNumber: '200101104TableTransType',
tableId: "200101104Table",
tableName: "出入库明细表",
columnProp: 'transType', columnProp: 'transType',
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -228,6 +254,11 @@ export default {
fixed: '', fixed: '',
columnWidth: 140, columnWidth: 140,
}, { }, {
userId: this.$store.state.user.name,
functionId:200101104,
serialNumber: '200101104TableWarehouseId',
tableId: "200101104Table",
tableName: "出入库明细表",
columnProp: 'warehouseId', columnProp: 'warehouseId',
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -240,6 +271,11 @@ export default {
fixed: '', fixed: '',
columnWidth: 140, columnWidth: 140,
}, { }, {
userId: this.$store.state.user.name,
functionId:200101104,
serialNumber: '200101104TableLocationId',
tableId: "200101104Table",
tableName: "出入库明细表",
columnProp: 'locationId', columnProp: 'locationId',
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -252,6 +288,11 @@ export default {
fixed: '', fixed: '',
columnWidth: 140, columnWidth: 140,
}, { }, {
userId: this.$store.state.user.name,
functionId:200101104,
serialNumber: '200101104TableOrderRef1',
tableId: "200101104Table",
tableName: "出入库明细表",
columnProp: 'orderRef1', columnProp: 'orderRef1',
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -264,6 +305,11 @@ export default {
fixed: '', fixed: '',
columnWidth: 140, columnWidth: 140,
}, { }, {
userId: this.$store.state.user.name,
functionId: 200101104,
serialNumber: '200101104TableSupplierID',
tableId: "200101104Table",
tableName: "出入库明细表",
columnProp: 'supplierId', columnProp: 'supplierId',
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -276,6 +322,11 @@ export default {
fixed: '', fixed: '',
columnWidth: 140, columnWidth: 140,
}, { }, {
userId: this.$store.state.user.name,
functionId: 200101104,
serialNumber: '200101104TableSupplierName',
tableId: "200101104Table",
tableName: "出入库明细表",
columnProp: 'supplierName', columnProp: 'supplierName',
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -288,6 +339,11 @@ export default {
fixed: '', fixed: '',
columnWidth: 140, columnWidth: 140,
}, { }, {
userId: this.$store.state.user.name,
functionId: 200101104,
serialNumber: '200101104TableTransQty',
tableId: "200101104Table",
tableName: "出入库明细表",
columnProp: 'transQty', columnProp: 'transQty',
headerAlign: "center", headerAlign: "center",
align: "right", align: "right",
@ -300,6 +356,11 @@ export default {
fixed: '', fixed: '',
columnWidth: 140, columnWidth: 140,
}, { }, {
userId: this.$store.state.user.name,
functionId: 200101104,
serialNumber: '200101104TableRemark',
tableId: "200101104Table",
tableName: "出入库明细表",
columnProp: 'remark', columnProp: 'remark',
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -312,6 +373,11 @@ export default {
fixed: '', fixed: '',
columnWidth: 140, columnWidth: 140,
}, { }, {
userId: this.$store.state.user.name,
functionId: 200101104,
serialNumber: '200101104TableUserName',
tableId: "200101104Table",
tableName: "出入库明细表",
columnProp: 'userName', columnProp: 'userName',
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -324,6 +390,11 @@ export default {
fixed: '', fixed: '',
columnWidth: 140, columnWidth: 140,
}, { }, {
userId: this.$store.state.user.name,
functionId: 200101104,
serialNumber: '200101104TableTransDate',
tableId: "200101104Table",
tableName: "出入库明细表",
columnProp: 'transDate', columnProp: 'transDate',
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -349,6 +420,10 @@ export default {
this.height = window.innerHeight - 210 this.height = window.innerHeight - 210
}) })
}, },
created() {
//
this.getTableUserColumn(this.$route.meta.menuId+'table',1)
},
methods: { methods: {
// //
favoriteIsOk() { favoriteIsOk() {
@ -500,7 +575,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.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.
}
})
},
},
} }
</script> </script>

116
src/views/modules/partspare/resourcespare.vue

@ -94,6 +94,7 @@
<script> <script>
import AddOrUpdate from './resourcespare-add-or-update' import AddOrUpdate from './resourcespare-add-or-update'
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
import { import {
getResourceSpareList,deleteResourceSpare getResourceSpareList,deleteResourceSpare
} from '@/api/partspare/resourcespare.js' } from '@/api/partspare/resourcespare.js'
@ -130,13 +131,12 @@ export default {
addOrUpdateVisible: false, addOrUpdateVisible: false,
// //
columnList: [ columnList: [
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
serialNumber: '*',
tableId: "*",
tableName: "*",
functionId: 200101102,
serialNumber: '200101102TableResourceId',
tableId: "200101102Table",
tableName: "设备备品配件信息表",
columnProp: 'resourceId', columnProp: 'resourceId',
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -150,10 +150,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: '*',
tableId: "*",
tableName: "*",
functionId: 200101102,
serialNumber: '200101102TableResourceDesc',
tableId: "200101102Table",
tableName: "设备备品配件信息表",
columnProp: 'resourceDesc', columnProp: 'resourceDesc',
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -168,10 +168,10 @@ export default {
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
serialNumber: '*',
tableId: "*",
tableName: "*",
functionId: 200101102,
serialNumber: '200101102TablePartNo',
tableId: "200101102Table",
tableName: "设备备品配件信息表",
columnProp: 'partNo', columnProp: 'partNo',
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -186,10 +186,10 @@ export default {
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
serialNumber: '*',
tableId: "*",
tableName: "*",
functionId: 200101102,
serialNumber: '200101102TablePartDescription',
tableId: "200101102Table",
tableName: "设备备品配件信息表",
columnProp: 'partDescription', columnProp: 'partDescription',
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -204,10 +204,10 @@ export default {
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
serialNumber: '*',
tableId: "*",
tableName: "*",
functionId: 200101102,
serialNumber: '200101102TableSite',
tableId: "200101102Table",
tableName: "设备备品配件信息表",
columnProp: 'site', columnProp: 'site',
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -222,10 +222,10 @@ export default {
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
serialNumber: '*',
tableId: "*",
tableName: "*",
functionId: 200101102,
serialNumber: '200101102TableQtyUsable',
tableId: "200101102Table",
tableName: "设备备品配件信息表",
columnProp: 'qtyUsable', columnProp: 'qtyUsable',
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
@ -254,6 +254,10 @@ export default {
this.height = window.innerHeight - 190 this.height = window.innerHeight - 190
}) })
}, },
created() {
//
this.getTableUserColumn(this.$route.meta.menuId+'table',1)
},
methods: { methods: {
// //
favoriteIsOk() { favoriteIsOk() {
@ -380,7 +384,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.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.
}
})
},
} }
} }
</script> </script>
Loading…
Cancel
Save