From 8fa5d6d2f5d5d3254d552c6ec9167e95477f94fc Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Wed, 11 Sep 2024 16:06:07 +0800 Subject: [PATCH] =?UTF-8?q?2024-09-11=20RFQ=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/part/bomManagement.js | 8 + src/api/part/routingManagement.js | 7 + src/views/modules/part/bomManagement.vue | 9 +- src/views/modules/part/partInformation.vue | 245 ++++++++++--------- src/views/modules/part/routingManagement.vue | 197 ++++++++++++++- 5 files changed, 337 insertions(+), 129 deletions(-) diff --git a/src/api/part/bomManagement.js b/src/api/part/bomManagement.js index b85b33a..603debc 100644 --- a/src/api/part/bomManagement.js +++ b/src/api/part/bomManagement.js @@ -162,4 +162,12 @@ export const queryPartListBom = data => createAPI(`/part/bomManagement/queryPart */ export const getBomEngChgLevel = data => createAPI(`/part/bomManagement/getBomEngChgLevel`,'post',data) +/** + * 查出所有类型的物料 + * @param data + * @returns {*} + */ +export const queryPartListAll = data => createAPI(`/part/bomManagement/queryPartListAll`,'post',data) + + diff --git a/src/api/part/routingManagement.js b/src/api/part/routingManagement.js index e75d37f..c46a38c 100644 --- a/src/api/part/routingManagement.js +++ b/src/api/part/routingManagement.js @@ -146,3 +146,10 @@ export const updateAlternativeStatus = data => createAPI(`/part/routingManagemen * @returns {*} */ export const queryPartListRouting = data => createAPI(`/part/routingManagement/queryPartListRouting`,'post',data) + +/** + * 根据物料的商品组1查维护的标准工序 + * @param data + * @returns {*} + */ +export const getStandardOperations = data => createAPI(`/part/routingManagement/getStandardOperations`,'post',data) diff --git a/src/views/modules/part/bomManagement.vue b/src/views/modules/part/bomManagement.vue index cf44a42..52154d3 100644 --- a/src/views/modules/part/bomManagement.vue +++ b/src/views/modules/part/bomManagement.vue @@ -772,6 +772,7 @@ import { copyAlternative, // 复制alternative, queryBomComponentTable, // 刷新子物料 getBomEngChgLevel, // 获取物料的BOM版本号 + queryPartListAll, // 查询包含Purchase(Raw)的物料 } from '@/api/part/bomManagement.js' import {getSiteAndBuByUserName} from "@/api/eam/eam.js" import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" @@ -2823,7 +2824,7 @@ export default { this.componentPartData.site = this.modalData.site this.componentPartData.buNo = this.modalData.buNo // 查询所有物料 - queryPartList(this.componentPartData).then(({data}) => { + queryPartListAll(this.componentPartData).then(({data}) => { if (data && data.code === 0) { this.componentPartList = data.page.list this.pageIndex3 = data.page.currPage @@ -2909,7 +2910,7 @@ export default { this.componentPartData.site = this.modalData.site this.componentPartData.buNo = this.modalData.buNo this.componentPartData.partNo = this.componentData.componentPart - queryPartList(this.componentPartData).then(({data}) => { + queryPartListAll(this.componentPartData).then(({data}) => { if (data && data.code === 0) { if (data.page.list.length === 1) { this.componentData.componentPartDesc = data.page.list[0].partDesc @@ -2938,7 +2939,7 @@ export default { if (data.page.list.length === 1) { this.copyBomData.partDesc = data.page.list[0].partDesc } else { - this.$message.warning('该物料不存在!') + this.$message.warning('该物料编码不存在或制造类型不合规!') this.copyBomData.partDesc = '' } } @@ -2954,7 +2955,7 @@ export default { if (data.page.list.length === 1) { this.copyAlternativeData.partDesc = data.page.list[0].partDesc } else { - this.$message.warning('该物料不存在!') + this.$message.warning('该物料编码不存在或制造类型不合规!') this.copyAlternativeData.partDesc = '' } } diff --git a/src/views/modules/part/partInformation.vue b/src/views/modules/part/partInformation.vue index 58b5dc5..5ffc8ea 100644 --- a/src/views/modules/part/partInformation.vue +++ b/src/views/modules/part/partInformation.vue @@ -128,15 +128,15 @@ - + - + - + @@ -163,8 +163,17 @@ + + + + + + + + + - + @@ -172,26 +181,10 @@ - - - - 计量单位 / Inventory UoM - - - - - - - - - - - - - + - + @@ -207,17 +200,17 @@ - - 默认仓库 - - + + 计量单位 / Inventory UoM + + - 物料分类 - - + 默认仓库 + + 商品组1 @@ -226,11 +219,23 @@ + + 物料分类 + + + 商品组2 + + + + 属性模板 + + + 商品组3 @@ -276,80 +281,80 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + 新增 + {{ attributeDialog?'编辑':'保存' }} + + + + + + + {{scope.row[item.columnProp]}} + + + + {{scope.row.textValue?scope.row.textValue:scope.row.numValue}} + + + + + + + + + + + {{ scope.row[item.columnProp] }} + + + + + + + + + + + + + + + + + + + + + @@ -1124,7 +1129,7 @@ // 其它 loading: false, // 初始页签 - activeTable: 'part_agent', + activeTable: 'part_item', inventoryPartTable: 'General', // ======== 数据对象 ======== modalData: { @@ -1540,7 +1545,7 @@ columnProp: 'textValue', headerAlign: "center", align: "left", - columnLabel: '实测值', + columnLabel: '属性值', columnHidden: false, columnImage: false, status: true, @@ -2223,6 +2228,7 @@ this.itemData.itemDesc = '' let tempData = { site: this.partCurrentRow.site, + buNo: this.partCurrentRow.buNo, partNo: this.partCurrentRow.partNo, codeNo: this.partCurrentRow.codeNo, recordType: 'IP' @@ -2259,7 +2265,8 @@ return } let inData = { - site: this.$store.state.user.site, + site: this.partCurrentRow.site, + buNo: this.partCurrentRow.buNo, partNo: this.partCurrentRow.partNo, codeNo: this.partCurrentRow.codeNo, codeDesc: this.partCurrentRow.codeDesc, @@ -2291,7 +2298,8 @@ return false } let inData = { - site: this.$store.state.user.site, + site: this.partCurrentRow.site, + buNo: this.partCurrentRow.buNo, partNo: this.partCurrentRow.partNo, codeNo: this.partCurrentRow.codeNo, codeDesc: this.partCurrentRow.codeDesc, @@ -2431,7 +2439,8 @@ */ getPartItem () { let tempData = { - site: this.$store.state.user.site, + site: this.partCurrentRow.site, + buNo: this.partCurrentRow.buNo, partNo: this.partCurrentRow.partNo, codeNo: this.partCurrentRow.codeNo, recordType: 'IP' @@ -2512,15 +2521,17 @@ this.pageIndex = data.page.currPage this.pageSize = data.page.pageSize this.totalPage = data.page.totalCount - this.$refs.selectDiv.setLengthAll( this.dataList.length) + this.$refs.selectDiv.setLengthAll(this.dataList.length) // 判断是否全部存在数据 - if (this.totalPage > 0) { + if (this.dataList.length > 0) { // 设置选中行 this.$refs.partTable.setCurrentRow(this.dataList[0]) - // 加载当前的页签的table - this.refreshCurrentTabTable() this.partClickRow(this.dataList[0]) + } else { + this.partCurrentRow = {} } + // 加载当前的页签的table + this.refreshCurrentTabTable() } }) }, @@ -3486,6 +3497,8 @@ strVal = this.modalData.defaultWarehouseID } else if (val === 214) { strVal = this.modalData.familyID + } else if (val === 219) { + strVal = this.modalData.codeNo } this.$refs.baseList.init(val, strVal) }) @@ -3513,16 +3526,16 @@ } else if (this.tagNo === 214) { this.modalData.familyID = val.family_id this.modalData.familyName = val.family_name - } else if (this.tagNo === 20) { + } else if (this.tagNo === 219) { if (this.modalData.flag === '2') { - if (val.Code_no != this.tempCodeNo) { + if (val.code_no != this.tempCodeNo) { this.$confirm(`更换属性模板将替换下方物料属性数据,请确认?`, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { - this.modalData.codeNo = val.Code_no - this.$set(this.modalData, 'codeDesc', val.Code_desc) + this.modalData.codeNo = val.code_no + this.$set(this.modalData, 'codeDesc', val.code_desc) }).catch(() => { }) } diff --git a/src/views/modules/part/routingManagement.vue b/src/views/modules/part/routingManagement.vue index c923493..e1fbf8f 100644 --- a/src/views/modules/part/routingManagement.vue +++ b/src/views/modules/part/routingManagement.vue @@ -179,6 +179,7 @@ Copy Build Retire + 基于标准工序快速创建 @@ -374,6 +375,14 @@ + + + + + + + + @@ -638,6 +647,35 @@ + + + + + + {{scope.row[item.columnProp]}} + + + + + + 保存 + 关闭 + + + @@ -666,6 +704,7 @@ import { copyRouting, // 复制routing copyAlternative, // 复制alternative queryMaxOperationNo, // 查询最大工序号 + getStandardOperations, // 根据物料的商品组1查维护的标准工序 } from '@/api/part/routingManagement.js' import {verifyData} from '@/api/part/partInformation.js' import {getSiteAndBuByUserName} from "@/api/eam/eam.js" @@ -819,6 +858,8 @@ export default { efficiencyFactor: '', machRunFactor: '', machSetupTime: '', + machCycleTime: '', + laborCycleTime: '', runTimeCode: '', laborRunFactor: '', laborSetupTime: '', @@ -935,6 +976,7 @@ export default { checkedTool: [], alternativeList: [], copyPartList: [], + standardOperationList: [], // ======== 列表表头 ======== columnList: [ { @@ -1187,7 +1229,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 60 + columnWidth: 80 }, { userId: this.$store.state.user.name, @@ -1223,7 +1265,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 60 + columnWidth: 80 }, { userId: this.$store.state.user.name, @@ -1241,7 +1283,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 85 + columnWidth: 100 }, { userId: this.$store.state.user.name, @@ -1259,7 +1301,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 85 + columnWidth: 100 }, { userId: this.$store.state.user.name, @@ -1277,7 +1319,43 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 80 + columnWidth: 100 + }, + { + userId: this.$store.state.user.name, + functionId: 601003, + serialNumber: '104003Table2MachCycleTime', + tableId: '104003Table2', + tableName: 'Routing工序表', + columnProp: 'machCycleTime', + 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: 601003, + serialNumber: '104003Table2LaborCycleTime', + tableId: '104003Table2', + tableName: 'Routing工序表', + columnProp: 'laborCycleTime', + headerAlign: 'center', + align: 'right', + columnLabel: '人工处理时间', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 100 }, { userId: this.$store.state.user.name, @@ -1295,7 +1373,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 85 + columnWidth: 100 }, { userId: this.$store.state.user.name, @@ -1313,7 +1391,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 85 + columnWidth: 100 }, { userId: this.$store.state.user.name, @@ -1331,7 +1409,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 85 + columnWidth: 100 }, { userId: this.$store.state.user.name, @@ -1349,7 +1427,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 85 + columnWidth: 100 }, { userId: this.$store.state.user.name, @@ -1542,6 +1620,74 @@ export default { fixed: '', } ], + standardOperationColumnList: [ + { + columnProp: 'operationNo', + headerAlign: "center", + align: "center", + columnLabel: '工序编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 100 + }, + { + columnProp: 'operationName', + headerAlign: "center", + align: "left", + columnLabel: '工序描述', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 200 + }, + { + columnProp: 'workCenterNo', + headerAlign: "center", + align: "center", + columnLabel: '加工中心编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 120 + }, + { + columnProp: 'workCenterDesc', + headerAlign: "center", + align: "left", + columnLabel: '加工中心描述', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 200 + }, + { + columnProp: 'laborClassNo', + headerAlign: "center", + align: "center", + columnLabel: '人员等级编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 120 + }, + { + columnProp: 'laborClassDesc', + headerAlign: "center", + align: "left", + columnLabel: '人员等级描述', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 200 + }, + ], // ======== 必填规则 ======== rules: { partNo: [ @@ -1715,6 +1861,7 @@ export default { headerSaveFlag: false, menuId: this.$route.meta.menuId, copyPartModelFlag: false, + standardOperationModal: false } }, @@ -2160,6 +2307,29 @@ export default { }) }, + // 基于标准工序快速创建 + createByStandardOperation () { + getStandardOperations(this.modalData).then(({data}) => { + if (data && data.code === 0) { + this.standardOperationList = data.rows + this.standardOperationModal = true + } else { + this.$alert(data.msg, '提示', { + confirmButtonText: '确定' + }) + } + }) + }, + + // 更新 Routing 的工序 + saveStandardOperation () { + if (this.standardOperationList.length === 0) { + this.$message.warning('请维护商品组的标准工序!') + return + } + + }, + /** * 新增子明细模态框 */ @@ -2201,6 +2371,8 @@ export default { setupLaborClassDesc: '', noteText: '', createBy: this.$store.state.user.name, + machCycleTime: '', + laborCycleTime: '' } this.queryMaxOperationNo() this.componentDisableFlag = false @@ -2253,6 +2425,8 @@ export default { setupLaborClassDesc: row.setupLaborClassDesc, noteText: row.noteText, updateBy: this.$store.state.user.name, + machCycleTime: row.machCycleTime, + laborCycleTime: row.laborCycleTime } this.componentDisableFlag = true this.componentSaveModal = true @@ -3146,6 +3320,11 @@ export default { this.componentData.laborRunFactor = this.componentData.machRunFactor }, + // 机器处理时间改变 + changeMachCycleTime () { + this.componentData.laborCycleTime = this.componentData.machCycleTime + }, + // 加工中心输入校验 workCenterBlur (tagNo) { if (this.componentData.workCenterNo != null && this.componentData.workCenterNo !== '') {