diff --git a/src/api/part/bomManagement.js b/src/api/part/bomManagement.js index 21df427..b85b33a 100644 --- a/src/api/part/bomManagement.js +++ b/src/api/part/bomManagement.js @@ -155,4 +155,11 @@ export const updateAlternativeStatus = data => createAPI(`/part/bomManagement/up */ export const queryPartListBom = data => createAPI(`/part/bomManagement/queryPartListBom`,'post',data) +/** + * 获取物料的BOM版本号 + * @param data + * @returns {*} + */ +export const getBomEngChgLevel = data => createAPI(`/part/bomManagement/getBomEngChgLevel`,'post',data) + diff --git a/src/views/modules/eam/com_eam_object_add_update.vue b/src/views/modules/eam/com_eam_object_add_update.vue index ed149f2..4c04d90 100644 --- a/src/views/modules/eam/com_eam_object_add_update.vue +++ b/src/views/modules/eam/com_eam_object_add_update.vue @@ -79,8 +79,11 @@ - - + + + + + @@ -150,6 +153,7 @@ export default { deptName: '', assetNo: '', assetRemark: '', + standardMaintenanceDuration: '' }, dataListLoading: false, rules:{ diff --git a/src/views/modules/eam/eam_device_list.vue b/src/views/modules/eam/eam_device_list.vue index 1d2eed5..9b7f75d 100644 --- a/src/views/modules/eam/eam_device_list.vue +++ b/src/views/modules/eam/eam_device_list.vue @@ -2405,6 +2405,24 @@ fixed: '', columnWidth: 100, }, + { + userId: this.$store.state.user.name, + functionId: 101001008, + serialNumber: '101001008Table1StandardMaintenanceDuration', + tableId: "101001008Table1", + tableName: "设备清单表", + columnProp: 'standardMaintenanceDuration', + headerAlign: 'center', + align: 'right', + columnLabel: '标准维修时长', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 100, + }, { userId: this.$store.state.user.name, functionId: 101001008, @@ -3676,7 +3694,8 @@ deptID: '', assetNo: '', assetRemark: '', - deptName:'' + deptName: '', + standardMaintenanceDuration: '' } //打开组件 去做新增业务 this.$nextTick(() => { diff --git a/src/views/modules/part/bomManagement.vue b/src/views/modules/part/bomManagement.vue index e7ad748..cef3b3a 100644 --- a/src/views/modules/part/bomManagement.vue +++ b/src/views/modules/part/bomManagement.vue @@ -447,9 +447,10 @@ - + + @@ -523,15 +524,18 @@ Source Revision - + - - + + + + + - + @@ -570,19 +574,23 @@
Destination Revision - - + + 物料编码 + - - + + + + + - + - + @@ -605,6 +613,56 @@ + + + + + + + + + + + 查询 + + + + + + + + + + + + 关闭 + + +
@@ -701,6 +759,7 @@ import { copyBom, // 复制bom copyAlternative, // 复制alternative, queryBomComponentTable, // 刷新子物料 + getBomEngChgLevel, // 获取物料的BOM版本号 } from '@/api/part/bomManagement.js' import {getSiteAndBuByUserName} from "@/api/eam/eam.js" import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" @@ -778,6 +837,9 @@ export default { pageIndex3: 1, pageSize3: 20, totalPage3: 0, + pageIndex4: 1, + pageSize4: 20, + totalPage4: 0, selectedDataNum: 0, // 条件查询 searchData: { @@ -882,6 +944,14 @@ export default { page: 1, limit: 10 }, + copyPartData: { + site: '', + buNo: '', + partNo: '', + partDesc: '', + page: 1, + limit: 10 + }, saveDetailData: { flag: '', site: this.$store.state.user.site, @@ -912,6 +982,7 @@ export default { copyBomData: { site: '', partNo: '', + partDesc: '', engChgLevel: '', bomType: '', effPhaseInDate: '', @@ -937,6 +1008,7 @@ export default { dataList: [], partList: [], componentPartList: [], + copyPartList: [], componentPartSelections: [], subDetailList: [], detailDataList: [], @@ -1959,6 +2031,7 @@ export default { modalDisableFlag: false, partModelFlag: false, componentPartModelFlag: false, + copyPartModelFlag: false, saveDetailModalFlag :false, saveDetailModalDisable: false, componentSaveModal: false, @@ -2078,6 +2151,25 @@ export default { this.queryComponentPartModal() }, + /** + * 每页数 + * @param val + */ + sizeChangeHandle4 (val) { + this.pageSize4 = val + this.pageIndex4 = 1 + this.queryCopyPartModal() + }, + + /** + * 当前页 + * @param val + */ + currentChangeHandle4 (val) { + this.pageIndex4 = val + this.queryCopyPartModal() + }, + // ======== 页签切换相关方法 ======== /** @@ -2347,7 +2439,7 @@ export default { printUnitName: '', qtyPerAssembly: 0, componentScrap: 0, - issueType: 'Reserve and Backflush', + issueType: 'Reserve And Backflush', shrinkageFactor: 0, lineItemNo: '', operationId: '', @@ -2399,7 +2491,7 @@ export default { printUnitName: '', qtyPerAssembly: 0, componentScrap: 0, - issueType: 'Reserve and Backflush', + issueType: 'Reserve And Backflush', shrinkageFactor: 0, lineItemNo: '', operationId: '', @@ -2678,6 +2770,7 @@ export default { this.operationModelFlag = false }, + // 双击选中子物料 getComponentRowData (row) { this.componentData.componentPart = row.partNo this.componentData.componentPartDesc = row.partDesc @@ -2686,8 +2779,16 @@ export default { this.componentPartModelFlag = false }, + // 双击选择copy物料 + getCopyRowData (row) { + this.copyBomData.partNo = row.partNo + this.copyBomData.partDesc = row.partDesc + this.copyBomTypeChange() + this.copyPartModelFlag = false + }, + /** - * 物料列表 + * 子物料列表 */ queryComponentPartModal () { this.componentPartData.limit = this.pageSize3 @@ -2710,8 +2811,33 @@ export default { }) }, + /** - * 物料列表 + * copy物料列表 + */ + queryCopyPartModal () { + this.copyPartData.limit = this.pageSize3 + this.copyPartData.page = this.pageIndex3 + this.copyPartData.site = this.copyBomData.site + this.copyPartData.buNo = this.copyBomData.buNo + // 查询所有物料 + queryPartList(this.copyPartData).then(({data}) => { + if (data && data.code === 0) { + this.copyPartList = data.page.list + this.pageIndex4 = data.page.currPage + this.pageSize4 = data.page.pageSize + this.totalPage4 = data.page.totalCount + this.copyPartModelFlag = true + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + + /** + * 子物料查询列表 */ queryComponentPartList () { this.componentPartData.limit = this.pageSize3 @@ -2729,6 +2855,25 @@ export default { }) }, + /** + * copy物料查询列表 + */ + queryCopyPartList () { + this.copyPartData.limit = this.pageSize4 + this.copyPartData.page = this.pageIndex4 + // 查询所有物料 + queryPartList(this.copyPartData).then(({data}) => { + if (data && data.code === 0) { + this.copyPartList = data.page.list + this.pageIndex4 = data.page.currPage + this.pageSize4 = data.page.pageSize + this.totalPage4 = data.page.totalCount + } else { + this.copyPartList = [] + } + }) + }, + // 子物料编码失焦事件 componentPartBlur () { if (this.componentData.componentPart != null && this.componentData.componentPart !== '') { @@ -2754,6 +2899,39 @@ export default { } }, + // copy物料编码失焦事件 + copyPartBlur () { + if (this.copyBomData.partNo != null && this.copyBomData.partNo !== '') { + this.copyPartData.limit = this.pageSize4 + this.copyPartData.page = this.pageIndex4 + this.copyPartData.partNo = this.copyBomData.partNo + queryPartList(this.copyPartData).then(({data}) => { + if (data && data.code === 0) { + if (data.page.list.length === 1) { + this.copyBomData.partDesc = data.page.list[0].partDesc + } else { + this.$message.warning('该物料不存在!') + this.copyBomData.partDesc = '' + } + } + }) + } + }, + + // copy BOM类型改变 + copyBomTypeChange () { + // 获取物料的bom版本号 + getBomEngChgLevel(this.copyBomData).then(({data}) => { + if (data && data.code === 0) { + this.copyBomData.engChgLevel = data.engChgLevel + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + /** * 表格的新增 * @param row @@ -3000,6 +3178,7 @@ export default { site: this.modalData.site, buNo: this.modalData.buNo, partNo: this.modalData.partNo, + partDesc: this.modalData.partDesc, engChgLevel: this.modalData.engChgLevel + 1, bomType: this.modalData.bomType, effPhaseInDate: this.dayjs(new Date()).format('YYYY-MM-DD'),