diff --git a/src/views/modules/part/routingManagement.vue b/src/views/modules/part/routingManagement.vue index 40138b5..ecc8827 100644 --- a/src/views/modules/part/routingManagement.vue +++ b/src/views/modules/part/routingManagement.vue @@ -53,7 +53,6 @@ type="selection" header-align="center" align="center" - :selectable="selectFlag" width="50"> { if (data && data.code === 0) { @@ -2984,9 +2960,7 @@ export default { }, // ======== 新增/编辑模态框 ======== - /** - * routing新增模态框 - */ + // routing新增模态框 addModal () { this.modalData = { flag: '1', @@ -3032,9 +3006,8 @@ export default { this.modalDisableFlag = false this.modalFlag = true }, - /** - * routing编辑模态框 - */ + + // routing编辑模态框 async updateModal (row) { this.modalData = { flag: '2', @@ -3072,9 +3045,8 @@ export default { } }) }, - /** - * 新增替代模态框 - */ + + // 新增替代模态框 saveRoutingDetail () { if (this.modalData.partNo === '' || this.modalData.partNo == null) { this.$message.warning('请先选择Routing物料!') @@ -3127,9 +3099,8 @@ export default { } }) }, - /** - * 替代编辑模态框 - */ + + // 替代编辑模态框 updateRoutingDetail () { if (this.modalData.partNo === '' || this.modalData.partNo == null) { this.$message.warning('请先选择Routing物料!') @@ -3181,9 +3152,8 @@ export default { } }) }, - /** - * 新增子明细模态框 - */ + + // 新增子明细模态框 saveComponentModal () { if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) { this.$message.warning('请先选择替代!') @@ -3240,9 +3210,7 @@ export default { }) }, - /** - * 编辑模态框 - */ + // 编辑模态框 updateComponentModal (row) { // if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') { // this.$message.warning('不可编辑的替代状态!') @@ -3284,9 +3252,8 @@ export default { this.componentDisableFlag = true this.componentSaveModal = true }, - /** - * routingTool 新增模态框 - */ + + // routingTool 新增模态框 saveRoutingTool () { this.routingToolData = { flag: '1', @@ -3313,9 +3280,8 @@ export default { this.saveRoutingToolModal = true this.saveRoutingToolDisableModal = false }, - /** - * routingTool 编辑模态框 - */ + + // routingTool 编辑模态框 updateToolModal (row) { this.routingToolData = { flag: '2', @@ -3344,9 +3310,7 @@ export default { }, // ======== 新增/编辑/删除方法 ======== - /** - * routing新增/编辑 - */ + // routing新增/编辑 saveData () { if (this.modalData.partNo === '' || this.modalData.partNo == null) { this.$message.warning('请选择物料编码!') @@ -3433,23 +3397,18 @@ export default { }) } }, - /** - * 新增编辑模态框关闭 - */ + + // 新增编辑模态框关闭 closeModal () { - //this.getDataList() this.modalFlag = false }, - /** - * 新增编辑模态框关闭 - */ + + // 新增编辑模态框关闭 closeModalX (done) { - //this.getDataList() done() }, - /** - * routing删除 - */ + + // routing删除 delModal () { if(this.routingSelections.length === 0){ this.$message.warning('请勾选要删除的Routing!') @@ -3479,12 +3438,10 @@ export default { }) } }) - }).catch(() => { }) }, - /** - * 查询物料 - */ + + // 查询物料 queryPartList () { this.partData.limit = this.pageSize2 this.partData.page = this.pageIndex2 @@ -3532,10 +3489,7 @@ export default { }) }, - /** - * 双击选中物料 - * @param row - */ + // 双击选中物料 getRowData (row) { this.modalData.partNo = row.partNo this.modalData.partDesc = row.partDesc @@ -3553,9 +3507,8 @@ export default { this.partModelFlag = false }) }, - /** - * 工艺类型改变 - */ + + // 工艺类型改变 routingTypeChange () { // 获取物料的routing版本号 getRottingRevision(this.modalData).then(({data}) => { @@ -3568,19 +3521,16 @@ export default { } }) }, - /** - * 选中工序 - * @param row - */ + + // 选中工序 getComponentRowData (row) { this.routingToolData.operationId = row.operationId this.routingToolData.operationNo = row.operationNo this.routingToolData.operationName = row.operationName this.componentPartModelFlag = false }, - /** - * 工序列表 - */ + + // 工序列表 queryOperationList () { if (this.routingToolData.alternativeNo === '' || this.routingToolData.alternativeNo == null) { this.$message.warning('请先选择替代!') @@ -3667,9 +3617,7 @@ export default { this.toolModelFlag = false }, - /** - * 替代列表 - */ + // 替代列表 queryAlternativeList () { // 查询所有替代 queryAlternativeListByPartNo(this.modalData).then(({data}) => { @@ -3682,27 +3630,22 @@ export default { } }) }, - /** - * 表格的新增 - * @param row - * @param rowIndex - */ + + // 表格的新增 rowClassName({ row, rowIndex }) { row.xh = rowIndex + 1 }, - /** - * 单选框选中数据 - * @param selection - */ + + // 单选框选中数据 componentSelectionChange(selection) { this.checkedDetail = selection }, + toolSelectionChange (selection) { this.checkedTool = selection }, - /** - * 删除子物料 - */ + + // 删除子物料 deleteComponentPart () { // if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') { // this.$message.warning('不可编辑的替代状态!') @@ -3736,23 +3679,20 @@ export default { }) } }) - }).catch(() => { }) } }, - /** - * 子物料 - * @param row - */ + + // 子物料 componentClickRow (row) { this.$refs.componentTable.toggleRowSelection(row) }, + toolClickRow (row) { this.$refs.toolTable.toggleRowSelection(row) }, - /** - * 新增子明细方法 - */ + + // 新增子明细方法 componentDataSave (isClose) { if (this.componentData.partNo === '' || this.componentData.partNo == null) { this.$message.warning('请选择主记录物料编码!') @@ -3858,9 +3798,8 @@ export default { }) } }, - /** - * 回车事件 - */ + + // 回车事件 focusNextInput (index, type) { let aaa = '' if (this.subDetailList.length - 1 === index) { @@ -3872,9 +3811,8 @@ export default { this.$refs[aaa].focus() }) }, - /** - * 保存主表信息 - */ + + // 保存主表信息 saveRoutingHeader () { if (this.modalData.partNo === '' || this.modalData.partNo == null) { this.$message.warning('请先选择Routing物料!') @@ -3932,9 +3870,7 @@ export default { }) }, - /** - * 复制Routing的模态框 - */ + // 复制Routing的模态框 copyRoutingRevision () { this.copyRoutingData = { site: this.modalData.site, @@ -3966,9 +3902,8 @@ export default { } this.copyRoutingModelFlag = true }, - /** - * 复制Routing的方法 - */ + + // 复制Routing的方法 copyRouting () { if (this.copyRoutingData.partNo === '' || this.copyRoutingData.partNo == null) { this.$message.warning('请选择Routing物料!') @@ -4009,9 +3944,8 @@ export default { this.copyLoading = false }) }, - /** - * 复制alternative的模态框 - */ + + // 复制alternative的模态框 copyRoutingAlternative () { this.copyAlternativeData = { site: this.detailData.site, @@ -4049,9 +3983,7 @@ export default { this.copyAlternativeModelFlag = true }, - /** - * 工艺指导模态框 - */ + // 工艺指导模态框 workGuidelineModal (row) { this.workGuidelineData = { site: this.modalData.site, @@ -4068,9 +4000,8 @@ export default { this.getRoutingWorkGuideline() this.queryWorkGuidelineModal = true }, - /** - * 获取 workGuideline - */ + + // 获取 workGuideline getRoutingWorkGuideline () { getRoutingWorkGuideline(this.workGuidelineData).then(({data}) => { if (data && data.code === 0) { @@ -4080,16 +4011,13 @@ export default { } }) }, - /** - * 复选列表信息 - * @param val - */ + + // 复选列表信息 selectionWorkGuideline (val) { this.workGuidelineSelections = val }, - /** - * workGuideline 新增模态框 - */ + + // workGuideline 新增模态框 saveWorkGuideline () { this.saveWorkGuidelineData = { flag: '1', @@ -4125,9 +4053,8 @@ export default { this.saveWorkGuidelineModal = true this.workGuidelineDisableModal = false }, - /** - * workGuideline 编辑模态框 - */ + + // workGuideline 编辑模态框 updateWorkGuidelineModal (row) { this.saveWorkGuidelineData = { flag: '2', @@ -4157,9 +4084,8 @@ export default { this.saveWorkGuidelineModal = true this.workGuidelineDisableModal = true }, - /** - * workGuideline 新增方法 - */ + + // workGuideline 新增方法 workGuidelineCommit () { if (this.saveWorkGuidelineData.guidelineSeq === '' || this.saveWorkGuidelineData.guidelineSeq == null) { this.$message.warning('请输入序号!') @@ -4221,9 +4147,8 @@ export default { }) } }, - /** - * 删除 workGuideline - */ + + // 删除 workGuideline deleteModal () { if(this.workGuidelineSelections.length === 0){ this.$message.warning('请勾选要删除的工艺指导!') @@ -4254,14 +4179,10 @@ export default { }) } }) - }).catch(() => { }) }, - - /** - * 复制alternative的方法 - */ + // 复制alternative的方法 copyAlternative () { if (this.copyAlternativeData.partNo === '' || this.copyAlternativeData.partNo == null) { this.$message.warning('请选择Routing物料!') @@ -4279,10 +4200,6 @@ export default { this.$message.warning('请填写替代编码!') return } - // if (this.copyAlternativeData.alternativeDescription === '' || this.copyAlternativeData.alternativeDescription == null) { - // this.$message.warning('请填写替代名称!') - // return - // } this.copyAlternativeData.previousVersion = this.detailData this.copyLoading = true copyAlternative(this.copyAlternativeData).then(({data}) => { @@ -4306,9 +4223,7 @@ export default { }) }, - /** - * 新增替代方法 - */ + // 新增替代方法 detailDataSave () { if (this.saveDetailData.partNo === '' || this.saveDetailData.partNo == null) { this.$message.warning('请先选择Routing物料!') @@ -4376,11 +4291,9 @@ export default { this.saveDetailLoading = false }) } - }, - /** - * 删除替代 - */ + + // 删除替代 deleteRoutingDetail () { if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) { this.$message.warning('请选择要删除的替代编码!') @@ -4413,12 +4326,10 @@ export default { }) } }) - }).catch(() => { }) }, - /** - * 修改替代状态为 Buildable - */ + + // 修改替代状态为 Buildable updateStatusToBuildable () { this.$confirm(`是否修改状态为Buildable?`, '提示', { confirmButtonText: '确定', @@ -4443,12 +4354,10 @@ export default { this.alternativeChange() } }) - }).catch(() => { }) }, - /** - * 修改替代状态为 Obsolete - */ + + // 修改替代状态为 Obsolete updateStatusToObsolete () { this.$confirm(`是否修改状态为Obsolete?`, '提示', { confirmButtonText: '确定', @@ -4472,12 +4381,10 @@ export default { this.alternativeChange() } }) - }).catch(() => { }) }, - /** - * 替代改变事件 - */ + + // 替代改变事件 alternativeChange () { queryRoutingComponent(this.detailData).then(({data}) => { if (data && data.code === 0) { @@ -4517,9 +4424,7 @@ export default { }) }, - /** - * 新增 routingTool - */ + // 新增 routingTool routingToolSave () { if (this.routingToolData.alternativeNo === '' || this.routingToolData.alternativeNo == null) { this.$message.warning('请选择替代!') @@ -4573,9 +4478,8 @@ export default { }) } }, - /** - * 删除 routingTool - */ + + // 删除 routingTool deleteRoutingTool () { if (this.checkedTool.length === 0) { this.$message.warning('请选择要删除的工具!') @@ -4605,7 +4509,6 @@ export default { }) } }) - }).catch(() => { }) } }, @@ -4631,26 +4534,9 @@ export default { this.componentData.laborSetupTime = val } }, - handleInputB (value, type) { - const reg = /^(([1-9]?\d{0,1}(\.\d{1,2})?)|100|100\.(0){1,2})$/ - if (type === 1) { - if (reg.test(value) === true) { - this.componentData.efficiencyFactor = value - } else if (value > 100) { - this.componentData.efficiencyFactor = 100 - } else { - this.componentData.efficiencyFactor = 0 - } - } - - }, // ======== chooseList相关方法 ======== - /** - * 获取基础数据列表S - * @param val - * @param type - */ + // 获取基础数据列表S getBaseList (val, type) { this.tagNo = val this.tagNo1 = type @@ -4672,10 +4558,8 @@ export default { this.$refs.baseList.init(val, strVal) }) }, - /** - * 列表方法的回调 - * @param val - */ + + // 列表方法的回调 getBaseData (val) { if (this.tagNo === 118) { if (this.tagNo1 === 1) { @@ -4790,9 +4674,7 @@ export default { }, // ======== 导出相关方法 ======== - /** - * 导出excel - */ + // 导出excel async createExportData () { this.searchData.limit = -1 this.searchData.page = 1