From 8b19b688de981302ddda2bd4858bd8cfd4c23f41 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Thu, 17 Apr 2025 17:06:19 +0800 Subject: [PATCH] =?UTF-8?q?2025-04-17=20Bom=E5=A4=8D=E5=88=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/part/bomManagement.js | 6 + src/api/part/bomSearch3.js | 4 +- src/views/modules/eam/eamObjectDefect.vue | 1 - src/views/modules/part/bomManagement.vue | 532 ++++++--------- src/views/modules/part/bomSearch3.vue | 25 +- src/views/modules/part/bom_create.vue | 167 ++++- src/views/modules/part/copy_bom_modal.vue | 645 ++++++++++++++++++- src/views/modules/part/routingManagement.vue | 160 +++-- 8 files changed, 1096 insertions(+), 444 deletions(-) diff --git a/src/api/part/bomManagement.js b/src/api/part/bomManagement.js index 09e2fab..d8bc815 100644 --- a/src/api/part/bomManagement.js +++ b/src/api/part/bomManagement.js @@ -198,4 +198,10 @@ export const computeQtyPerAssemblySave = data => createAPI(`/part/bomManagement/ * @returns {*} */ export const computeQtyPerAssemblyEdit = data => createAPI(`/part/bomManagement/computeQtyPerAssemblyEdit`,'post',data) +/** + * 批量修改工序 + * @param data + * @returns {*} + */ +export const batchOperationEdit = data => createAPI(`/part/bomManagement/batchOperationEdit`,'post',data) diff --git a/src/api/part/bomSearch3.js b/src/api/part/bomSearch3.js index afd81a9..b514220 100644 --- a/src/api/part/bomSearch3.js +++ b/src/api/part/bomSearch3.js @@ -57,6 +57,8 @@ export const commitTempItemValue = data => createAPI(`/part/bomSearch3/commitTem export const saveCopyResult = data => createAPI(`/part/bomSearch3/saveCopyResult`,'post',data) +export const saveStandardOperationByCopy = data => createAPI(`/part/bomSearch3/saveStandardOperationByCopy`,'post',data) +export const computeQtyPerAssemblySaveByCopy = data => createAPI(`/part/bomSearch3/computeQtyPerAssemblySaveByCopy`,'post',data) - +export const computeQtyPerAssemblyEditByCopy = data => createAPI(`/part/bomSearch3/computeQtyPerAssemblyEditByCopy`,'post',data) diff --git a/src/views/modules/eam/eamObjectDefect.vue b/src/views/modules/eam/eamObjectDefect.vue index abbbaeb..723137a 100644 --- a/src/views/modules/eam/eamObjectDefect.vue +++ b/src/views/modules/eam/eamObjectDefect.vue @@ -583,7 +583,6 @@ confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' - }).then(() => { eamObjectDefectDelete(row).then(({data}) => { if (data && data.code == '0') { diff --git a/src/views/modules/part/bomManagement.vue b/src/views/modules/part/bomManagement.vue index 2263884..35d37f2 100644 --- a/src/views/modules/part/bomManagement.vue +++ b/src/views/modules/part/bomManagement.vue @@ -244,6 +244,7 @@ 新增 批量新增 + 编辑工序 导入 删除 @@ -331,8 +332,8 @@ - 应用 - 保存 + 应用 + 保存 关闭 @@ -856,69 +857,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -945,7 +883,7 @@ :data="batchComponentPartList" border ref="batchSaveTable" - @row-click="batchSaveClickRow" + @row-dblclick="batchAddPartDB" @selection-change="selectionSaveComponent" highlight-current-row style="width: 100%"> @@ -997,7 +935,7 @@ :data="choosePartList" border ref="batchSaveTable2" - @row-click="batchSaveClickRow2" + @row-dblclick="batchDeletePartDB" @selection-change="selectionSaveComponent2" highlight-current-row style="width: 100%"> @@ -1030,6 +968,23 @@ + + + + + 工序 + + + + + + + + 保存 + 关闭 + + + @@ -1068,13 +1023,14 @@ import { exportWordOrPdf, // 导出word computeQtyPerAssemblySave, // 计算单位用量(新增) computeQtyPerAssemblyEdit, // 计算单位用量(修改) + batchOperationEdit, // 批量修改工序 } from '@/api/part/bomManagement.js' import {getSiteAndBuByUserName, getSiteAndBuByUserName2} from "@/api/qc/qc.js" import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" import ChooseList from '@/views/modules/common/Chooselist_eam' -import BomComponentUpload from "./bom_component_upload.vue"; -import {Decimal} from "decimal.js"; -import {updateColumnSize} from "../../../api/table"; +import BomComponentUpload from "./bom_component_upload.vue" +import {Decimal} from "decimal.js" +import {updateColumnSize} from "../../../api/table" export default { // 组件 @@ -1130,7 +1086,6 @@ export default { // 对象 data () { return { - // 导出 exportData: [], exportName: 'BOM物料列表' + this.dayjs().format('YYYYMMDDHHmmss'), exportHeader: ['BOM物料列表'], @@ -1138,6 +1093,11 @@ export default { resultList: [], userBuList: [], buList: [], + batchOperationData: { + operationId: '', + operationNo: '', + operationName: '' + }, // ======== 行高 ======== height: 200, // ======== 分页 ======== @@ -1848,13 +1808,13 @@ export default { { userId: this.$store.state.user.name, functionId: 601002, - serialNumber: '601002Table2OperationDesc', + serialNumber: '601002Table2OperationNo', tableId: '601002Table2', tableName: 'BOM子物料表', columnProp: 'operationNo', headerAlign: 'center', align: 'center', - columnLabel: '工序', + columnLabel: '工序编码', columnHidden: false, columnImage: false, columnSortable: false, @@ -1863,6 +1823,24 @@ export default { fixed: '', columnWidth: 80 }, + { + userId: this.$store.state.user.name, + functionId: 601002, + serialNumber: '601002Table2OperationName', + tableId: '601002Table2', + tableName: 'BOM子物料表', + columnProp: 'operationName', + headerAlign: 'center', + align: 'left', + columnLabel: '工序名称', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 120 + }, { userId: this.$store.state.user.name, functionId: 601002, @@ -2164,6 +2142,7 @@ export default { headerSaveFlag: false, menuId: this.$route.meta.menuId, batchComponentPartModelFlag: false, + batchOperationModelFlag: false, // ======== 子物料字段分类集合 ======== productionDataFamily: ['RFID003', 'RFID004', 'RFID005', 'RFID006', 'RFID007', 'RFID008', 'RFID009', 'RFID012', 'RFID023', 'RFID024', 'RFID025', 'RFID027'], materialDataFamily: ['RFID011', 'RFID020', 'RFID021', 'RFID022'], @@ -2287,96 +2266,66 @@ export default { }, // ======== 分页相关方法 ======== - /** - * 每页数 - * @param val - */ + // 每页数 sizeChangeHandle (val) { this.pageSize = val this.pageIndex = 1 this.getDataList() }, - /** - * 当前页 - * @param val - */ + // 当前页 currentChangeHandle (val) { this.pageIndex = val this.getDataList() }, - /** - * 每页数 - * @param val - */ + // 每页数 sizeChangeHandle2 (val) { this.pageSize2 = val this.pageIndex2 = 1 this.queryPartList() }, - /** - * 当前页 - * @param val - */ + // 当前页 currentChangeHandle2 (val) { this.pageIndex2 = val this.queryPartList() }, - /** - * 每页数 - * @param val - */ + // 每页数 sizeChangeHandle3 (val) { this.pageSize3 = val this.pageIndex3 = 1 this.queryComponentPartModal() }, - /** - * 当前页 - * @param val - */ + // 当前页 currentChangeHandle3 (val) { this.pageIndex3 = val this.queryComponentPartModal() }, - /** - * 每页数 - * @param val - */ + // 每页数 sizeChangeHandle4 (val) { this.pageSize4 = val this.pageIndex4 = 1 this.queryCopyPartModal() }, - /** - * 当前页 - * @param val - */ + // 当前页 currentChangeHandle4 (val) { this.pageIndex4 = val this.queryCopyPartModal() }, - /** - * 每页数 - * @param val - */ + // 每页数 sizeChangeHandle5 (val) { this.pageSize5 = val this.pageIndex5 = 1 this.queryBatchComponentPartList() }, - /** - * 当前页 - * @param val - */ + // 当前页 currentChangeHandle5 (val) { this.pageIndex5 = val this.queryBatchComponentPartList() @@ -2384,17 +2333,13 @@ export default { // ======== 页签切换相关方法 ======== - /** - * 子明细页签选择替换 - */ + // 子明细页签选择替换 tabSubDetailClick (tab, event) { // 刷新列表数据 this.refreshSubDetailTable() }, - /** - * 刷新子明细页签的table数据 - */ + // 刷新子明细页签的table数据 refreshSubDetailTable () { if (this.subDetailTable === 'bom_sub_detail') { this.queryBomComponentTable() @@ -2411,9 +2356,7 @@ export default { }, // ======== 列表数据操作方法 ======== - /** - * 获取数据列表 - */ + // 获取数据列表 getDataList () { this.searchData.limit = this.pageSize this.searchData.page = this.pageIndex @@ -2428,39 +2371,24 @@ export default { }) }, - /** - * 复选列表信息 - * @param val - */ + // 复选列表信息 selectionBom (val) { this.bomSelections = val this.$refs.selectDiv.setLengthselected(this.bomSelections.length) }, - // 点击行选中复选框 - batchSaveClickRow (row) { - this.$refs.batchSaveTable.toggleRowSelection(row) - }, - // 复选子物料信息 selectionSaveComponent (val) { this.batchComponentSelections = val }, - // 点击行选中复选框 - batchSaveClickRow2 (row) { - this.$refs.batchSaveTable2.toggleRowSelection(row) - }, - // 复选子物料信息 selectionSaveComponent2 (val) { this.batchComponentSelections2 = val }, // ======== 新增/编辑模态框 ======== - /** - * bom新增模态框 - */ + // bom新增模态框 addModal () { this.modalData = { flag: '1', @@ -2510,9 +2438,7 @@ export default { this.modalFlag = true }, - /** - * bom编辑模态框 - */ + // bom编辑模态框 async updateModal (row) { this.modalData = { flag: '2', @@ -2555,9 +2481,7 @@ export default { }) }, - /** - * 替代新增模态框 - */ + // 替代新增模态框 saveBomDetail () { if (this.modalData.partNo === '' || this.modalData.partNo == null) { this.$message.warning('请先选择Bom物料!') @@ -2604,9 +2528,7 @@ export default { }) }, - /** - * 替代编辑模态框 - */ + // 替代编辑模态框 updateBomDetail () { if (this.modalData.partNo === '' || this.modalData.partNo == null) { this.$message.warning('请先选择Bom物料!') @@ -2652,9 +2574,7 @@ export default { }) }, - /** - * 子明细新增模态框 - */ + // 子明细新增模态框 saveComponentModal () { if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) { this.$message.warning('请先选择替代!') @@ -2761,18 +2681,12 @@ export default { }) }, - /** - * 副产品新增模态框 - */ + // 副产品新增模态框 saveByProductModal () { if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) { this.$message.warning('请先选择替代!') return } - // if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') { - // this.$message.warning('不可编辑的替代状态!') - // return - // } this.componentData = { flag: '1', site: this.$store.state.user.site, @@ -2813,9 +2727,7 @@ export default { this.componentSaveModal = true }, - /** - * 子明细编辑模态框 - */ + // 子明细编辑模态框 updateComponentModal (row) { this.componentData = { flag: '2', @@ -2865,9 +2777,24 @@ export default { }, // ======== 新增/编辑/删除方法 ======== - /** - * bom新增/编辑 - */ + // 判断子物料工序是否选择 + packageSaveData (isClose) { + const allAHasValue = this.subDetailList.every(item => item.operationId !== null && item.operationId !== '') + if (!allAHasValue) { + this.$confirm(`存在未选择工序的子物料,是否确认保存数据?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.saveData(isClose) + }) + } else { + this.saveData(isClose) + } + }, + + + // bom新增/编辑 saveData (isClose) { if (this.modalData.partNo === '' || this.modalData.partNo == null) { this.$message.warning('请选择物料编码!') @@ -2925,72 +2852,45 @@ export default { informationList: this.subDetailList, processUnit: this.modalData.processUnit } - // if (this.modalData.flag === '1') { - this.saveAllLoading = true - bomManagementSave(tempData).then(({data}) => { - if (data && data.code === 0) { - if (isClose) { - this.updateModal(data.rows) - } else { - this.getDataList() - this.modalFlag = false - } - this.$message({ - message: '操作成功', - type: 'success', - duration: 1500, - onClose: () => {} - }) + this.saveAllLoading = true + bomManagementSave(tempData).then(({data}) => { + if (data && data.code === 0) { + if (isClose) { + this.updateModal(data.rows) } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' - }) + this.getDataList() + this.modalFlag = false } - this.saveAllLoading = false - }).catch(() => { - this.saveAllLoading = false - }) - // } else { - // this.saveAllLoading = true - // bomManagementEdit(tempData).then(({data}) => { - // if (data && data.code === 0) { - // this.getDataList() - // this.modalFlag = false - // this.$message({ - // message: '操作成功', - // type: 'success', - // duration: 1500, - // onClose: () => {} - // }) - // } else { - // this.$alert(data.msg, '错误', { - // confirmButtonText: '确定' - // }) - // } - // this.saveAllLoading = false - // }) - // } + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + this.saveAllLoading = false + }).catch(() => { + this.saveAllLoading = false + }) }, - /** - * 新增编辑模态框关闭 - */ + // 新增编辑模态框关闭 closeModal () { this.getDataList() this.modalFlag = false }, - /** - * 新增编辑模态框关闭 - */ + // 新增编辑模态框关闭 closeModalX (done) { this.getDataList() done() }, - /** - * bom删除 - */ + // bom删除 delModal () { if (this.bomSelections.length === 0) { this.$message.warning('请勾选要删除的BOM!') @@ -3023,9 +2923,7 @@ export default { }) }, - /** - * 查询物料 - */ + // 查询物料 queryPartList () { this.partData.limit = this.pageSize2 this.partData.page = this.pageIndex2 @@ -3087,9 +2985,7 @@ export default { } }, - /** - * BOM类型改变 - */ + // BOM类型改变 bomTypeChange () { // 获取物料的Bom版本号 getBomEngChgLevel(this.modalData).then(({data}) => { @@ -3101,10 +2997,7 @@ export default { }) }, - /** - * 双击选中物料 - * @param row - */ + // 双击选中物料 getRowData (row) { this.modalData.partNo = row.partNo this.modalData.partDesc = row.partDesc @@ -3124,13 +3017,16 @@ export default { }) }, - /** - * 双击选中工序 - * @param row - */ + // 双击选中工序 getRowOperationData (row) { - this.componentData.operationId = row.operationId - this.componentData.operationNo = row.operationNo + if (this.batchOperationModelFlag) { + this.batchOperationData.operationId = row.operationId + this.batchOperationData.operationNo = row.operationNo + this.batchOperationData.operationName = row.operationName + } else { + this.componentData.operationId = row.operationId + this.componentData.operationNo = row.operationNo + } this.operationModelFlag = false }, @@ -3168,9 +3064,7 @@ export default { this.copyPartModelFlag = false }, - /** - * 子物料列表 - */ + // 子物料列表 queryComponentPartModal () { this.componentPartData.limit = this.pageSize3 this.componentPartData.page = this.pageIndex3 @@ -3191,9 +3085,7 @@ export default { }, - /** - * copy物料列表 - */ + // copy物料列表 queryCopyPartModal () { this.copyPartData.limit = this.pageSize4 this.copyPartData.page = this.pageIndex4 @@ -3215,9 +3107,7 @@ export default { }) }, - /** - * 子物料查询列表 - */ + // 子物料查询列表 queryComponentPartList () { this.componentPartData.limit = this.pageSize3 this.componentPartData.page = this.pageIndex3 @@ -3234,9 +3124,7 @@ export default { }) }, - /** - * 子物料查询列表 - */ + // 子物料查询列表 queryBatchComponentPartList () { this.batchComponentPartData.limit = this.pageSize5 this.batchComponentPartData.page = this.pageIndex5 @@ -3253,9 +3141,7 @@ export default { }) }, - /** - * copy物料查询列表 - */ + // copy物料查询列表 queryCopyPartList () { this.copyPartData.limit = this.pageSize4 this.copyPartData.page = this.pageIndex4 @@ -3358,31 +3244,18 @@ export default { }) }, - /** - * 表格的新增 - * @param row - * @param rowIndex - */ + // 表格的新增 rowClassName({ row, rowIndex }) { row.xh = rowIndex + 1 }, - /** - * 选中数据 - * @param selection - */ + // 选中数据 componentSelectionChange(selection) { this.checkedDetail = selection }, - /** - * 删除子物料 - */ + // 删除子物料 deleteComponentPart () { - // if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') { - // this.$message.warning('不可编辑的替代状态!') - // return - // } if (this.checkedDetail.length === 0) { this.$message.warning('请选择要删除子物料!') return @@ -3415,17 +3288,7 @@ export default { } }, - // /** - // * 子物料 - // * @param row - // */ - // componentClickRow (row) { - // this.$refs.componentTable.toggleRowSelection(row) - // }, - - /** - * 新增子明细方法 - */ + // 新增子明细方法 componentDataSave (isClose) { if (this.componentData.lineSequence === '' || this.componentData.lineSequence == null) { this.$message.warning('序号不能为空!') @@ -3658,6 +3521,20 @@ export default { }) }, + // 双击添加 + batchAddPartDB (row) { + this.batchComponentSelections = [] + this.batchComponentSelections.push(row) + this.batchAddPart() + }, + + // 双击删除 + batchDeletePartDB (row) { + this.batchComponentSelections2 = [] + this.batchComponentSelections2.push(row) + this.batchDeletePart() + }, + batchAddPart () { if (this.batchComponentSelections == null || this.batchComponentSelections.length === 0) { this.$message.warning('请选择可选物料!') @@ -3685,9 +3562,7 @@ export default { this.choosePartList = this.choosePartList.filter(item => !set.has(`${item.site}-${item.partNo}`)) }, - /** - * 回车事件 - */ + // 回车事件 focusNextInput (index, type) { let aaa = '' if (this.subDetailList.length - 1 === index) { @@ -3700,9 +3575,7 @@ export default { }) }, - /** - * 保存主表信息 - */ + // 保存主表信息 saveBomHeader () { if (this.modalData.bu === '' || this.modalData.bu == null) { this.$message.warning('请选择BU!') @@ -3769,9 +3642,8 @@ export default { this.saveHeaderLoading = false }) }, - /** - * 复制bom的模态框 - */ + + // 复制bom的模态框 copyBomRevision () { this.copyBomData = { site: this.modalData.site, @@ -3796,9 +3668,8 @@ export default { } this.copyBomModelFlag = true }, - /** - * 复制bom的方法 - */ + + // 复制bom的方法 copyBom () { if (this.copyBomData.partNo === '' || this.copyBomData.partNo == null) { this.$message.warning('请选择Bom物料!') @@ -3839,9 +3710,8 @@ export default { this.copyLoading = false }) }, - /** - * 复制alternative的模态框 - */ + + // 复制alternative的模态框 copyBomAlternative () { this.copyAlternativeData = { site: this.detailData.site, @@ -3871,9 +3741,7 @@ export default { this.copyAlternativeModelFlag = true }, - /** - * 复制alternative的方法 - */ + // 复制alternative的方法 copyAlternative () { if (this.copyAlternativeData.partNo === '' || this.copyAlternativeData.partNo == null) { this.$message.warning('请选择Bom物料!') @@ -3914,9 +3782,7 @@ export default { }) }, - /** - * 新增替代方法 - */ + // 新增替代方法 detailDataSave () { if (this.saveDetailData.partNo === '' || this.saveDetailData.partNo == null) { this.$message.warning('请先选择Bom物料!') @@ -3990,9 +3856,7 @@ export default { } }, - /** - * 删除替代 - */ + // 删除替代 deleteBomDetail () { if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) { this.$message.warning('请选择要删除的替代编码!') @@ -4027,9 +3891,7 @@ export default { }) }, - /** - * 修改替代状态为 Buildable - */ + // 修改替代状态为 Buildable updateStatusToBuildable () { this.$confirm(`是否修改状态为Buildable?`, '提示', { confirmButtonText: '确定', @@ -4055,9 +3917,8 @@ export default { }) }) }, - /** - * 修改替代状态为 Obsolete - */ + + // 修改替代状态为 Obsolete updateStatusToObsolete () { this.$confirm(`是否修改状态为Obsolete?`, '提示', { confirmButtonText: '确定', @@ -4084,9 +3945,7 @@ export default { }) }, - /** - * 替代改变事件 - */ + // 替代改变事件 alternativeChange () { this.alternativeLoading = true queryBomComponent(this.detailData).then(({data}) => { @@ -4105,9 +3964,7 @@ export default { }) }, - /** - * 根据物料编码查询工序 - */ + // 根据物料编码查询工序 queryOperationList () { this.operationData.site = this.modalData.site this.operationData.buNo = this.modalData.buNo @@ -4135,12 +3992,47 @@ export default { }) }, + // 批量修改工序模态框 + batchUpdateOperationModal () { + if (this.checkedDetail.length === 0) { + this.$message.warning('请选择要编辑子物料!') + return + } + this.batchOperationData = { + operationId: '', + operationNo: '', + operationName: '' + } + this.batchOperationModelFlag = true + }, + + // 批量修改工序 + batchOperationEdit () { + let tempData = { + informationList: this.checkedDetail, + operationId: this.batchOperationData.operationId, + updateBy: this.$store.state.user.name, + } + batchOperationEdit(tempData).then(({data}) => { + if (data && data.code === 0) { + this.subDetailList = data.rows.subDetailList + this.batchOperationModelFlag = false + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + // ======== chooseList相关方法 ======== - /** - * 获取基础数据列表S - * @param val - * @param type - */ + // 获取基础数据列表S getBaseList (val, type) { this.tagNo = val this.$nextTick(() => { @@ -4155,10 +4047,8 @@ export default { this.$refs.baseList.init(val, strVal, conSql) }) }, - /** - * 列表方法的回调 - * @param val - */ + + // 列表方法的回调 getBaseData (val) { if (this.tagNo === 215) { this.componentData.issueToLoc = val.location_id @@ -4171,9 +4061,7 @@ export default { }, // ======== 导出相关方法 ======== - /** - * 导出excel - */ + // 导出excel async createExportData () { this.searchData.limit = -1 this.searchData.page = 1 diff --git a/src/views/modules/part/bomSearch3.vue b/src/views/modules/part/bomSearch3.vue index 97eb685..4157390 100644 --- a/src/views/modules/part/bomSearch3.vue +++ b/src/views/modules/part/bomSearch3.vue @@ -617,7 +617,7 @@ export default { serialNumber: '601002002Table2IssueType', tableId: '601002002Table2', tableName: 'BOMComponent表', - columnProp: 'issueTypeName', + columnProp: 'issueType', headerAlign: 'center', align: 'center', columnLabel: '生产属性', @@ -637,8 +637,8 @@ export default { tableName: 'BOMComponent表', columnProp: 'operationNo', headerAlign: 'center', - align: 'center', - columnLabel: '工序', + align: 'left', + columnLabel: '工序编码', columnHidden: false, columnImage: false, columnSortable: false, @@ -647,6 +647,24 @@ export default { fixed: '', columnWidth: 80 }, + { + userId: this.$store.state.user.name, + functionId: 601002002, + serialNumber: '601002002Table2OperationName', + tableId: '601002002Table2', + tableName: 'BOMComponent表', + columnProp: 'operationName', + headerAlign: 'center', + align: 'left', + columnLabel: '工序名称', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 120 + }, { userId: this.$store.state.user.name, functionId: 601002002, @@ -808,7 +826,6 @@ export default { }).catch(() => { this.queryLoading = false }) - }, // ======== 页签切换相关方法 ======== diff --git a/src/views/modules/part/bom_create.vue b/src/views/modules/part/bom_create.vue index 0e5ddc4..4e9cf25 100644 --- a/src/views/modules/part/bom_create.vue +++ b/src/views/modules/part/bom_create.vue @@ -115,6 +115,7 @@ 新增 批量新增 + 编辑工序 导入 删除 @@ -202,7 +203,7 @@ - 应用 + 应用 @@ -398,7 +399,7 @@ :data="batchComponentPartList" border ref="batchSaveTable" - @row-click="batchSaveClickRow" + @row-dblclick="batchAddPartDB" @selection-change="selectionSaveComponent" highlight-current-row style="width: 100%"> @@ -450,7 +451,7 @@ :data="choosePartList" border ref="batchSaveTable2" - @row-click="batchSaveClickRow2" + @row-dblclick="batchDeletePartDB" @selection-change="selectionSaveComponent2" highlight-current-row style="width: 100%"> @@ -564,6 +565,23 @@ + + + + + 工序 + + + + + + + + 保存 + 关闭 + + + @@ -595,10 +613,11 @@ import { batchSaveBomComponent, // 批量新增子件 computeQtyPerAssemblySave, // 计算单位用量(新增) computeQtyPerAssemblyEdit, // 计算单位用量(修改) + batchOperationEdit, // 批量修改工序 } from "@/api/part/bomManagement.js" import ChooseList from '@/views/modules/common/Chooselist_eam' -import {Decimal} from "decimal.js"; -import BomComponentUpload from "./bom_component_upload.vue"; +import {Decimal} from "decimal.js" +import BomComponentUpload from "./bom_component_upload.vue" export default { components: { BomComponentUpload, @@ -756,6 +775,11 @@ export default { operationNo: '', operationName: '', }, + batchOperationData: { + operationId: '', + operationNo: '', + operationName: '' + }, // 必填规则 rules: { partNo: [ @@ -1146,13 +1170,13 @@ export default { { userId: this.$store.state.user.name, functionId: 601002, - serialNumber: '601002Table2OperationDesc', + serialNumber: '601002Table2OperationNo', tableId: '601002Table2', tableName: 'BOM子物料表', columnProp: 'operationNo', headerAlign: 'center', align: 'center', - columnLabel: '工序', + columnLabel: '工序编码', columnHidden: false, columnImage: false, columnSortable: false, @@ -1161,6 +1185,24 @@ export default { fixed: '', columnWidth: 80 }, + { + userId: this.$store.state.user.name, + functionId: 601002, + serialNumber: '601002Table2OperationName', + tableId: '601002Table2', + tableName: 'BOM子物料表', + columnProp: 'operationName', + headerAlign: 'center', + align: 'left', + columnLabel: '工序名称', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 120 + }, { userId: this.$store.state.user.name, functionId: 601002, @@ -1355,6 +1397,7 @@ export default { saveDetailModalFlag :false, saveDetailModalDisable: false, operationModelFlag: false, + batchOperationModelFlag: false, // ======== 子物料字段分类集合 ======== productionDataFamily: ['RFID003', 'RFID004', 'RFID005', 'RFID006', 'RFID007', 'RFID008', 'RFID009', 'RFID012', 'RFID023', 'RFID024', 'RFID025', 'RFID027'], materialDataFamily: ['RFID011', 'RFID020', 'RFID021', 'RFID022'], @@ -1428,9 +1471,7 @@ export default { this.queryBatchComponentPartList() }, - /** - * bom新增模态框 - */ + // bom新增模态框 addModal (row) { this.modalData = { flag: '1', @@ -1479,9 +1520,7 @@ export default { this.$emit('refreshBomLoading') }, - /** - * bom编辑模态框 - */ + // bom编辑模态框 async updateModal (row) { this.modalData = { flag: '2', @@ -1921,9 +1960,23 @@ export default { this.componentSaveModal = true }, - /** - * bom新增/编辑 - */ + // 判断子物料工序是否选择 + packageSaveData () { + const allAHasValue = this.subDetailList.every(item => item.operationId !== null && item.operationId !== '') + if (!allAHasValue) { + this.$confirm(`存在未选择工序的子物料,是否确认保存数据?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.saveData() + }) + } else { + this.saveData() + } + }, + + // bom新增/编辑 saveData () { if (this.modalData.partNo === '' || this.modalData.partNo == null) { this.$message.warning('请选择物料编码!') @@ -2125,13 +2178,16 @@ export default { }) }, - /** - * 双击选中工序 - * @param row - */ + // 双击选中工序 getRowOperationData (row) { - this.componentData.operationId = row.operationId - this.componentData.operationNo = row.operationNo + if (this.batchOperationModelFlag) { + this.batchOperationData.operationId = row.operationId + this.batchOperationData.operationNo = row.operationNo + this.batchOperationData.operationName = row.operationName + } else { + this.componentData.operationId = row.operationId + this.componentData.operationNo = row.operationNo + } this.operationModelFlag = false }, @@ -2327,26 +2383,30 @@ export default { }) }, - // 点击行选中复选框 - batchSaveClickRow (row) { - this.$refs.batchSaveTable.toggleRowSelection(row) - }, - // 复选子物料信息 selectionSaveComponent (val) { this.batchComponentSelections = val }, - // 点击行选中复选框 - batchSaveClickRow2 (row) { - this.$refs.batchSaveTable2.toggleRowSelection(row) - }, - // 复选子物料信息 selectionSaveComponent2 (val) { this.batchComponentSelections2 = val }, + // 双击添加 + batchAddPartDB (row) { + this.batchComponentSelections = [] + this.batchComponentSelections.push(row) + this.batchAddPart() + }, + + // 双击删除 + batchDeletePartDB (row) { + this.batchComponentSelections2 = [] + this.batchComponentSelections2.push(row) + this.batchDeletePart() + }, + batchAddPart () { if (this.batchComponentSelections == null || this.batchComponentSelections.length === 0) { this.$message.warning('请选择可选物料!') @@ -2432,9 +2492,7 @@ export default { }) }, - /** - * 新增替代方法 - */ + // 新增替代方法 detailDataSave () { if (this.saveDetailData.partNo === '' || this.saveDetailData.partNo == null) { this.$message.warning('请先选择Bom物料!') @@ -2508,6 +2566,45 @@ export default { } }, + // 批量修改工序模态框 + batchUpdateOperationModal () { + if (this.checkedDetail.length === 0) { + this.$message.warning('请选择要编辑子物料!') + return + } + this.batchOperationData = { + operationId: '', + operationNo: '', + operationName: '' + } + this.batchOperationModelFlag = true + }, + + // 批量修改工序 + batchOperationEdit () { + let tempData = { + informationList: this.checkedDetail, + operationId: this.batchOperationData.operationId, + updateBy: this.$store.state.user.name, + } + batchOperationEdit(tempData).then(({data}) => { + if (data && data.code === 0) { + this.subDetailList = data.rows.subDetailList + this.batchOperationModelFlag = false + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + // 获取基础数据列表S getBaseList (val, type) { this.tagNo = val diff --git a/src/views/modules/part/copy_bom_modal.vue b/src/views/modules/part/copy_bom_modal.vue index 1a22426..12d41fe 100644 --- a/src/views/modules/part/copy_bom_modal.vue +++ b/src/views/modules/part/copy_bom_modal.vue @@ -75,6 +75,7 @@ 新增 删除 + 基于标准工序快速创建 - + - - + + 子物料编码 子物料编码 - + - - + + + + + - - - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 计算 应用 保存 关闭 @@ -429,6 +484,101 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + 计算工时 + 保存 + 关闭 + +
+ @@ -459,12 +609,19 @@ import { deleteTempRoutingComponent, // 删除Routing子明细 commitTempItemValue, // 保存属性值 saveCopyResult, // 保存复制结果 + saveStandardOperationByCopy, // 新增工序 + computeQtyPerAssemblySaveByCopy, // 计算单位用量(新增) + computeQtyPerAssemblyEditByCopy, // 计算单位用量(修改) } from '@/api/part/bomSearch3.js' import { queryPartListAll, // 查询包含Purchase(Raw)的物料 } from '@/api/part/bomManagement.js' +import { + getStandardOperations, + calculationTime +} from '@/api/part/routingManagement.js' import {verifyData} from '@/api/part/partInformation.js' -import {Decimal} from "decimal.js"; +import {Decimal} from "decimal.js" import ChooseList from '@/views/modules/common/Chooselist_eam' export default { name: 'copyBomModal', @@ -539,6 +696,22 @@ export default { lineSequence: '', consumptionItem: '', productFlag: '', + familyID: '', + productionData: undefined, + materialData: undefined, + finishedProductData: undefined, + consumptionLoss: undefined, + coatingLength: undefined, + glueWeight: undefined, + materialWidth: undefined, + widthConversion: undefined, + materialLength: undefined, + materialThickness: undefined, + areaConversion: undefined, + densityConversion: undefined, + materialWeight: undefined, + materialLength2: undefined, + unitConversion: undefined, treeId: '', bomId: '' }, @@ -593,6 +766,8 @@ export default { checkedDetail1: [], checkedDetail2: [], copyAttributeList: [], + standardOperationList: [], + standardOperationSelections: [], columnBomList: [ { columnProp: 'lineSequence', @@ -1018,6 +1193,164 @@ export default { columnWidth: 100 } ], + standardOperationColumnList: [ + { + columnProp: 'operationNo', + headerAlign: "center", + align: "center", + columnLabel: '工序编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 80 + }, + { + columnProp: 'operationName', + headerAlign: "center", + align: "left", + columnLabel: '工序描述', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 120 + }, + { + columnProp: 'setupCrewSize', + headerAlign: "center", + align: "right", + columnLabel: '调机过程中人数', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 100 + }, + { + columnProp: 'setupLaborClassNo', + headerAlign: "center", + align: "left", + columnLabel: '调机时人员等级编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 100 + }, + { + columnProp: 'setupLaborClassDesc', + headerAlign: "center", + align: "left", + columnLabel: '调机时人员等级描述', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 150 + }, + { + columnProp: 'machCycleTime', + headerAlign: 'center', + align: 'right', + columnLabel: '机器处理时间', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 100 + }, + { + columnProp: 'machRunFactor', + headerAlign: 'center', + align: 'right', + columnLabel: '机器单位产出', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 100 + }, + ], + standardOperationColumnList2: [ + { + columnProp: 'laborClassNo', + headerAlign: "center", + align: "left", + columnLabel: '人员等级编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 100 + }, + { + columnProp: 'laborClassDesc', + headerAlign: "center", + align: "left", + columnLabel: '人员等级描述', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 150 + }, + { + columnProp: 'laborCycleTime', + headerAlign: 'center', + align: 'right', + columnLabel: '人工处理时间', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 100 + }, + { + columnProp: 'laborRunFactor', + headerAlign: 'center', + align: 'right', + columnLabel: '人工单位产出', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 100 + }, + { + columnProp: 'workCenterNo', + headerAlign: "center", + align: "left", + columnLabel: '加工中心编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 100 + }, + { + columnProp: 'workCenterDesc', + headerAlign: "center", + align: "left", + columnLabel: '加工中心描述', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 120 + }, + { + columnProp: 'conditionDesc', + headerAlign: 'center', + align: 'left', + columnLabel: '条件描述', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 200 + }, + ], columnItemList: [ { columnProp: 'propertiesItemNo', @@ -1230,7 +1563,25 @@ export default { componentDisableFlag2: false, componentPartModelFlag: false, attributeDialog: true, - saveCopyResultLoading: false + saveCopyResultLoading: false, + standardOperationModal: false, + computeLoading: false, + // ======== 子物料字段分类集合 ======== + productionDataFamily: ['RFID003', 'RFID004', 'RFID005', 'RFID006', 'RFID007', 'RFID008', 'RFID009', 'RFID012', 'RFID023', 'RFID024', 'RFID025', 'RFID027'], + materialDataFamily: ['RFID011', 'RFID020', 'RFID021', 'RFID022'], + finishedProductDataFamily: ['RFID020', 'RFID021', 'RFID022'], + consumptionLossFamily: ['RFID001', 'RFID002', 'RFID014', 'RFID015', 'RFID016', 'RFID017', 'RFID018', 'RFID019'], + coatingLengthFamily: ['RFID013'], + glueWeightFamily: ['RFID013'], + materialWidthFamily: ['RFID014', 'RFID015'], + widthConversionFamily: ['RFID014', 'RFID015'], + materialLengthFamily: ['RFID016', 'RFID017'], + materialThicknessFamily: ['RFID016', 'RFID017', 'RFID018', 'RFID019'], + areaConversionFamily: ['RFID016', 'RFID017', 'RFID018', 'RFID019'], + densityConversionFamily: ['RFID016', 'RFID017', 'RFID018', 'RFID019'], + materialWeightFamily: ['RFID018', 'RFID019'], + materialLength2Family: ['RFID018', 'RFID019'], + unitConversionFamily: ['RFID018', 'RFID019'], } }, methods: { @@ -1371,8 +1722,6 @@ export default { }) }, - - // Bom子料新增模态框 saveComponentModal1 () { this.componentData1 = { @@ -1402,6 +1751,22 @@ export default { lineSequence: '', consumptionItem: 'Consumed', productFlag: 'component', + familyID: '', + productionData: undefined, + materialData: undefined, + finishedProductData: undefined, + consumptionLoss: undefined, + coatingLength: undefined, + glueWeight: undefined, + materialWidth: undefined, + widthConversion: undefined, + materialLength: undefined, + materialThickness: undefined, + areaConversion: undefined, + densityConversion: undefined, + materialWeight: undefined, + materialLength2: undefined, + unitConversion: undefined, treeId: this.currentRow.id, bomId: this.currentRow.bomId } @@ -1448,6 +1813,22 @@ export default { lineSequence: row.lineSequence, consumptionItem: row.consumptionItem, productFlag: 'component', + familyID: row.familyID, + productionData: row.productionData == null ? undefined : row.productionData, + materialData: row.materialData == null ? undefined : row.materialData, + finishedProductData: row.finishedProductData == null ? undefined : row.finishedProductData, + consumptionLoss: row.consumptionLoss == null ? undefined : row.consumptionLoss, + coatingLength: row.coatingLength == null ? undefined : row.coatingLength, + glueWeight: row.glueWeight == null ? undefined : row.glueWeight, + materialWidth: row.materialWidth == null ? undefined : row.materialWidth, + widthConversion: row.widthConversion == null ? undefined : row.widthConversion, + materialLength: row.materialLength == null ? undefined : row.materialLength, + materialThickness: row.materialThickness == null ? undefined : row.materialThickness, + areaConversion: row.areaConversion == null ? undefined : row.areaConversion, + densityConversion: row.densityConversion == null ? undefined : row.densityConversion, + materialWeight: row.materialWeight == null ? undefined : row.materialWeight, + materialLength2: row.materialLength2 == null ? undefined : row.materialLength2, + unitConversion: row.unitConversion == null ? undefined : row.unitConversion, treeId: row.treeId, bomId: row.bomId } @@ -1514,6 +1895,90 @@ export default { } }, + // 计算单位用量 + computeQtyPerAssembly () { + if (this.componentData1.lineSequence === '' || this.componentData1.lineSequence == null) { + this.$message.warning('序号不能为空!') + return + } + if (this.componentData1.partNo === '' || this.componentData1.partNo == null) { + this.$message.warning('请选择主记录物料编码!') + return + } + if (this.componentData1.bomType === '' || this.componentData1.bomType == null) { + this.$message.warning('请选择主记录制造类型!') + return + } + if (this.componentData1.engChgLevel === '' || this.componentData1.engChgLevel == null) { + this.$message.warning('请填写主记录BOM版本号!') + return + } + if (this.componentData1.componentPart === '' || this.componentData1.componentPart == null) { + this.$message.warning('请选择子物料编码!') + return + } + if (this.componentData1.productFlag === 'component' && (this.componentData1.consumptionItem === '' || this.componentData1.consumptionItem == null)) { + this.$message.warning('请选择消耗项目!') + return + } + if (this.componentData1.componentScrap === '' || this.componentData1.componentScrap == null) { + this.$message.warning('请填写调机量!') + return + } + if (this.componentData1.shrinkageFactor === '' || this.componentData1.shrinkageFactor == null) { + this.$message.warning('请填写损耗率!') + return + } + if (this.componentData1.issueType === '' || this.componentData1.issueType == null) { + this.$message.warning('请选择生产属性!') + return + } + this.computeLoading = true + if (this.componentData1.flag === '1') { + computeQtyPerAssemblySaveByCopy(this.componentData1).then(({data}) => { + if (data && data.code === 0) { + this.queryCopyTempBom() + // 换成修改子物料模态框 + this.updateComponentModal1(data.rows.rowData) + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + this.computeLoading = false + }).catch(() => { + this.computeLoading = false + }) + } else if (this.componentData1.flag === '2') { + computeQtyPerAssemblyEditByCopy(this.componentData1).then(({data}) => { + if (data && data.code === 0) { + this.queryCopyTempBom() + // 换成修改子物料模态框 + this.updateComponentModal1(data.rows.rowData) + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + this.computeLoading = false + }).catch(() => { + this.computeLoading = false + }) + } + }, + // 选中数据 componentSelectionChange1(selection) { this.checkedDetail1 = selection @@ -1552,7 +2017,6 @@ export default { } }, - // Routing子料新增模态框 saveComponentModal2 () { this.componentData2 = { @@ -1561,8 +2025,8 @@ export default { site: this.currentRow.site, buNo: this.currentRow.buNo, partNo: this.currentRow.partNo, - routingRevision: this.currentRow.routingRevision, - routingType: this.currentRow.routingType, + routingRevision: this.currentRow.engChgLevel, + routingType: this.currentRow.bomType, alternativeNo: this.currentRow.alternativeNo, operationId: '', operationNo: '', @@ -1794,6 +2258,122 @@ export default { } }, + // 回车事件 + focusNextInput (index, type) { + let aaa = '' + if (this.standardOperationList.length - 1 === index) { + aaa = `${type}0` + } else { + aaa = `${type}${index + 1}` + } + this.$nextTick(() => { + this.$refs[aaa].focus() + }) + }, + + // 基于标准工序快速创建 + createByStandardOperation () { + let tempData = { + site: this.modalData.site, + buNo: this.modalData.buNo, + partNo: this.currentRow.partNo, + } + this.standardOperationSelections = [] + getStandardOperations(tempData).then(({data}) => { + if (data && data.code === 0) { + this.standardOperationList = data.rows + this.standardOperationModal = true + } else { + this.$alert(data.msg, '提示', { + confirmButtonText: '确定' + }) + } + }) + }, + + // 计算工时 + calculationTime () { + if (this.standardOperationSelections.length === 0) { + this.$message.warning('请选择要计算的工序!') + return + } + this.standardOperationList.forEach(item1 => { + const matchInList2 = this.standardOperationSelections.find(item2 => item1.operationNo === item2.operationNo) + if (matchInList2) { + item1.flag = 'Y' + } else { + item1.flag = '' + } + }) + let tempData = { + site: this.modalData.site, + buNo: this.modalData.buNo, + partNo: this.currentRow.partNo, + operationList: this.standardOperationList + } + calculationTime(tempData).then(({data}) => { + if (data && data.code === 0) { + this.standardOperationList = data.rows + this.standardOperationList.forEach(item => { + if (item.flag === 'Y') { + this.$nextTick(() => this.$refs.standardOperationTable.toggleRowSelection(item,true)) + } + }) + } else { + this.$alert('工时相关属性未维护属性值', '提示', { + confirmButtonText: '确定' + }) + } + }) + }, + + // 更新 Routing 的工序 + saveStandardOperation () { + if (this.standardOperationSelections.length === 0) { + this.$message.warning('请选择标准工序!') + return + } + this.$confirm("是否确认更改替代下的工序?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning" + }).then(() => { + let tempData = { + treeId: this.currentRow.id, + bomId: this.currentRow.bomId, + site: this.modalData.site, + buNo: this.modalData.buNo, + partNo: this.currentRow.partNo, + routingRevision: this.currentRow.engChgLevel, + routingType: this.currentRow.bomType, + alternativeNo: this.currentRow.alternativeNo, + createBy: this.$store.state.user.name, + informationList: this.standardOperationSelections + } + saveStandardOperationByCopy(tempData).then(({data}) => { + if (data && data.code === 0) { + this.queryCopyTempRouting() + this.standardOperationModal = false + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '提示', { + confirmButtonText: '确定' + }) + } + }) + }) + }, + + // 复选信息 + selectionStandardOperation (val) { + this.standardOperationSelections = val + }, + // 编辑物料属性 clickSave () { if (!this.attributeDialog) { // 保存 @@ -1832,7 +2412,6 @@ export default { }) }, - // 子物料列表 queryComponentPartModal () { this.componentPartData.limit = this.pageSize1 @@ -1876,6 +2455,18 @@ export default { this.componentData1.partDesc = row.partDesc this.componentData1.printUnit = row.printUnit this.componentData1.printUnitName = row.printUnitName + this.componentData1.familyID = row.familyID + if (this.widthConversionFamily.includes(row.familyID)) { + this.componentData1.widthConversion = 1 + } else if (this.areaConversionFamily.includes(row.familyID)) { + this.componentData1.areaConversion = 1 + } else if (this.densityConversionFamily.includes(row.familyID)) { + this.componentData1.densityConversion = 1 + } else if (this.unitConversionFamily.includes(row.familyID)) { + this.componentData1.unitConversion = 1 + } else if (this.consumptionLossFamily.includes(row.familyID)) { + this.componentData1.consumptionLoss = 1 + } this.componentPartModelFlag = false }, @@ -1893,6 +2484,18 @@ export default { this.componentData1.partDesc = data.page.list[0].partDesc this.componentData1.printUnit = data.page.list[0].printUnit this.componentData1.printUnitName = data.page.list[0].printUnitName + this.componentData1.familyID = data.page.list[0].familyID + if (this.widthConversionFamily.includes(data.page.list[0].familyID)) { + this.componentData1.widthConversion = 1 + } else if (this.areaConversionFamily.includes(data.page.list[0].familyID)) { + this.componentData1.areaConversion = 1 + } else if (this.densityConversionFamily.includes(data.page.list[0].familyID)) { + this.componentData1.densityConversion = 1 + } else if (this.unitConversionFamily.includes(data.page.list[0].familyID)) { + this.componentData1.unitConversion = 1 + } else if (this.consumptionLossFamily.includes(data.page.list[0].familyID)) { + this.componentData1.consumptionLoss = 1 + } return } } @@ -1901,9 +2504,9 @@ export default { this.componentData1.partDesc = '' this.componentData1.printUnit = '' this.componentData1.printUnitName = '' + this.componentData1.familyID = '' }, - // BOM切换版本 handleChangeBomVersion() { let node = this.$refs.tree.getCurrentNode() @@ -2007,7 +2610,6 @@ export default { }) }, - // Routing切换版本 handleChangeRoutingVersion () { let node = this.$refs.tree.getCurrentNode() @@ -2106,7 +2708,6 @@ export default { }) }, - // 页签切换 tabClick (tab, event) { if (this.activeTable !== 'temp_item' && !this.attributeDialog) { diff --git a/src/views/modules/part/routingManagement.vue b/src/views/modules/part/routingManagement.vue index 6c9d5e5..a87d933 100644 --- a/src/views/modules/part/routingManagement.vue +++ b/src/views/modules/part/routingManagement.vue @@ -656,36 +656,92 @@ - - - - - - - +
+ + + + + + + + + + + + + + + + + + + + + + +
计算工时 保存 @@ -1703,7 +1759,7 @@ export default { { columnProp: 'operationName', headerAlign: "center", - align: "center", + align: "left", columnLabel: '工序描述', columnHidden: false, columnImage: false, @@ -1725,24 +1781,24 @@ export default { { columnProp: 'setupLaborClassNo', headerAlign: "center", - align: "center", + align: "left", columnLabel: '调机时人员等级编码', columnHidden: false, columnImage: false, status: true, fixed: '', - columnWidth: 120 + columnWidth: 100 }, { columnProp: 'setupLaborClassDesc', headerAlign: "center", - align: "center", + align: "left", columnLabel: '调机时人员等级描述', columnHidden: false, columnImage: false, status: true, fixed: '', - columnWidth: 120 + columnWidth: 150 }, { columnProp: 'machCycleTime', @@ -1766,38 +1822,29 @@ export default { fixed: '', columnWidth: 100 }, - { - columnProp: 'crewSize', - headerAlign: "center", - align: "right", - columnLabel: '生产过程中人数', - columnHidden: false, - columnImage: false, - status: true, - fixed: '', - columnWidth: 100 - }, + ], + standardOperationColumnList2: [ { columnProp: 'laborClassNo', headerAlign: "center", - align: "center", + align: "left", columnLabel: '人员等级编码', columnHidden: false, columnImage: false, status: true, fixed: '', - columnWidth: 120 + columnWidth: 100 }, { columnProp: 'laborClassDesc', headerAlign: "center", - align: "center", + align: "left", columnLabel: '人员等级描述', columnHidden: false, columnImage: false, status: true, fixed: '', - columnWidth: 120 + columnWidth: 150 }, { columnProp: 'laborCycleTime', @@ -1824,7 +1871,7 @@ export default { { columnProp: 'workCenterNo', headerAlign: "center", - align: "center", + align: "left", columnLabel: '加工中心编码', columnHidden: false, columnImage: false, @@ -1835,7 +1882,7 @@ export default { { columnProp: 'workCenterDesc', headerAlign: "center", - align: "center", + align: "left", columnLabel: '加工中心描述', columnHidden: false, columnImage: false, @@ -1846,7 +1893,7 @@ export default { { columnProp: 'conditionDesc', headerAlign: 'center', - align: 'center', + align: 'left', columnLabel: '条件描述', columnHidden: false, columnImage: false, @@ -3097,7 +3144,7 @@ export default { */ focusNextInput (index, type) { let aaa = '' - if (this.subDetailList.length - 1 === index) { + if (this.standardOperationList.length - 1 === index) { aaa = `${type}0` } else { aaa = `${type}${index + 1}` @@ -3662,11 +3709,6 @@ export default { this.componentData.laborClassDesc = '' }, - // 点击行选中复选框 - standardOperationClickRow (row) { - this.$refs.standardOperationTable.toggleRowSelection(row) - }, - // 复选信息 selectionStandardOperation (val) { this.standardOperationSelections = val