diff --git a/src/views/modules/part/partProductGroupInformation.vue b/src/views/modules/part/partProductGroupInformation.vue index 0db7c00..f5fefcd 100644 --- a/src/views/modules/part/partProductGroupInformation.vue +++ b/src/views/modules/part/partProductGroupInformation.vue @@ -67,8 +67,16 @@ :min-width="item.columnWidth" :label="item.columnLabel"> - + - + @@ -122,12 +130,12 @@ - + @@ -137,7 +145,7 @@ - + @@ -564,6 +572,24 @@ export default { copyProcessAttributeList: [], // 展示列集 columnList: [ + { + userId: this.$store.state.user.name, + functionId: 601006, + serialNumber: '601006Table1BuDesc', + tableId: "601006Table1", + tableName: "商品组信息表", + columnProp: 'buDesc', + headerAlign: "center", + align: "center", + columnLabel: 'BU', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 80 + }, { userId: this.$store.state.user.name, functionId: 601006, @@ -643,14 +669,14 @@ export default { columnProp: 'yieldRate', headerAlign: 'center', align: 'right', - columnLabel: 'Yield Rate', + columnLabel: 'Yield Rate(%)', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', - columnWidth: 80 + columnWidth: 90 }, { userId: this.$store.state.user.name, @@ -743,7 +769,7 @@ export default { status: true, fixed: '', columnWidth: 70, - isVisible: true // 控制显示的属性 + isVisible: false // 控制显示的属性 }, { userId: this.$store.state.user.name, @@ -1466,8 +1492,8 @@ export default { if (val === 219) { strVal = this.ptmModalData.itemNo } - if (this.productGroupConditionCurrentRow.bu !== null && this.productGroupConditionCurrentRow.bu !== '' && this.productGroupConditionCurrentRow.bu !== undefined) { - conSql = " and site = '" + this.productGroupConditionCurrentRow.bu.split('_')[0] + "'" + " and bu_no = '" + this.productGroupConditionCurrentRow.bu.split('_')[1] + "'" + if (this.ptmModalData.bu !== null && this.ptmModalData.bu !== '' && this.ptmModalData.bu !== undefined) { + conSql = " and site = '" + this.ptmModalData.bu.split('_')[0] + "'" + " and bu_no = '" + this.ptmModalData.bu.split('_')[1] + "'" this.$refs.baseList.init(val, strVal, conSql) } else { this.$refs.baseList.init(val, strVal) @@ -1583,12 +1609,20 @@ export default { this.$message.warning('请选择商品组!') return } - // 如果yieldRate<0或者大于10,提示时间为2000ms - if (!(this.modalData.yieldRate >= 0 && this.modalData.yieldRate < 10)) { - this.$alert('Yield Rate必须为0-10的正数!', '错误', { - confirmButtonText: '确定' - }) - return + // yieldRate 0 – 100(包含100),而且需要支持小数,保留2位小数 + if (this.modalData.type === '2') { + if (this.modalData.yieldRate === '' || this.modalData.yieldRate == null) { + this.$message.warning('请填写Yield Rate!') + return + } + if (this.modalData.yieldRate <= 0 || this.modalData.yieldRate >= 100) { + this.$message.warning('Yield Rate范围为0-100!') + return + } + if (!/^\d+(\.\d{1,2})?$/.test(this.modalData.yieldRate)) { + this.$message.warning('Yield Rate最多保留两位小数!') + return + } } if (this.modalData.flag === '1') { productGroupInformationSave(this.modalData).then(({data}) => { @@ -1836,10 +1870,14 @@ export default { } else { this.ptmModalData.seqNo = 1 } + this.ptmModalData.buNo = this.productGroupCurrentRow.buNo + this.ptmModalData.site = this.productGroupCurrentRow.site + this.ptmModalData.bu = this.ptmModalData.site + '_' + this.ptmModalData.buNo this.ptmSaveFlag = true }, async saveProductGroupPtm () { + console.log(this.ptmModalData) // 确保 modelBlur 完成 await this.modelBlur(219); if (this.ptmModalData.conditionDesc === '' || this.ptmModalData.conditionDesc == null) { @@ -2029,8 +2067,8 @@ export default { let tempData = { tagno: tagNo, conditionSql: " and code_no = '" + this.ptmModalData.itemNo + "'" + - " and site = '" + this.productGroupConditionCurrentRow.bu.split('_')[0] + "'" + - " and bu_no = '" + this.productGroupConditionCurrentRow.bu.split('_')[1] + "'" + " and site = '" + this.ptmModalData.bu.split('_')[0] + "'" + + " and bu_no = '" + this.ptmModalData.bu.split('_')[1] + "'" }; // 返回 Promise diff --git a/src/views/modules/part/standardRoutingOperation.vue b/src/views/modules/part/standardRoutingOperation.vue index 23349e3..9510f40 100644 --- a/src/views/modules/part/standardRoutingOperation.vue +++ b/src/views/modules/part/standardRoutingOperation.vue @@ -110,23 +110,31 @@ - - 人员等级编码 - + + - - + + - 调机时人员等级编码 - + 调机过程中人员等级编码 + - + + + + 人员等级编码 + + + + + + 保存 关闭 @@ -207,6 +215,8 @@ export default { laborClassDesc: '', setupLaborClassNo: '', setupLaborClassDesc: '', + setupCrewSize: '', + crewSize: '', }, // ======== 数据列表 ======== dataList: [], @@ -267,7 +277,43 @@ export default { columnWidth: 300 }, { - functionId: 6010012, + userId: this.$store.state.user.name, + functionId: 601003, + serialNumber: '6010012Table2CrewSize', + tableId: '6010012Table2', + tableName: '标准工序表', + columnProp: 'crewSize', + 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: '6010012Table2SetupCrewSize', + tableId: '6010012Table2', + tableName: '标准工序表', + columnProp: 'setupCrewSize', + headerAlign: 'center', + align: 'right', + columnLabel: '调机过程人数', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 100 + }, + { + functionId: 601003, serialNumber: '6010012Table1WorkCenterNo', tableId: '6010012Table1', tableName: '标准工序表', @@ -345,7 +391,7 @@ export default { columnProp: 'setupLaborClassNo', headerAlign: "center", align: "center", - columnLabel: '调机时人员等级编码', + columnLabel: '调机过程中人员等级编码', columnHidden: false, columnImage: false, columnSortable: false, @@ -363,7 +409,7 @@ export default { columnProp: 'setupLaborClassDesc', headerAlign: "center", align: "center", - columnLabel: '调机时人员等级描述', + columnLabel: '调机过程中人员等级描述', columnHidden: false, columnImage: false, columnSortable: false, @@ -509,6 +555,20 @@ export default { trigger: ['blur','change'] } ], + setupCrewSize: [ + { + required: true, + message: ' ', + trigger: ['blur','change'] + } + ], + crewSize: [ + { + required: true, + message: ' ', + trigger: ['blur','change'] + } + ], }, // ======== 模态框开关控制 ======== authSearch: false, @@ -678,6 +738,8 @@ export default { laborClassDesc: '', setupLaborClassNo: '', setupLaborClassDesc: '', + setupCrewSize: 1, + crewSize: 1, createBy: this.$store.state.user.name, } this.modalDisableFlag = false @@ -705,12 +767,23 @@ export default { laborClassDesc: row.laborClassDesc, setupLaborClassNo: row.setupLaborClassNo, setupLaborClassDesc: row.setupLaborClassDesc, + setupCrewSize: row.setupCrewSize, + crewSize: row.crewSize, updateBy: this.$store.state.user.name, } this.modalDisableFlag = true this.modalFlag = true }, + changeSetupLaborClassNo () { + this.modalData.laborClassNo = this.modalData.setupLaborClassNo + this.laborClassBlur(217) + }, + + changeSetupCrewSize () { + this.modalData.crewSize = this.modalData.setupCrewSize + }, + // ======== 新增/编辑/删除方法 ======== /** * 分类信息新增/编辑 @@ -752,15 +825,23 @@ export default { return } if (this.modalData.setupLaborClassNo === '' || this.modalData.setupLaborClassNo == null) { - this.$message.warning('请填写调机时人员等级编码!') + this.$message.warning('请填写调机过程中人员等级编码!') return } if (this.modalData.setupLaborClassDesc === '' || this.modalData.setupLaborClassDesc == null) { - this.$alert('当前BU下调机时人员等级编码不存在,请重新输入调机时人员等级编码!', '提示', { + this.$alert('当前BU下调机过程中人员等级编码不存在,请重新输入调机过程中人员等级编码!', '提示', { confirmButtonText: '确定' }) return } + if (this.modalData.setupCrewSize === '' || this.modalData.setupCrewSize == null) { + this.$message.warning('请填写调机过程中人数!') + return + } + if (this.modalData.crewSize === '' || this.modalData.crewSize == null) { + this.$message.warning('请填写生产过程中人数!') + return + } if (this.modalData.flag === '1') { saveStandardRoutingOperation(this.modalData).then(({data}) => { if (data && data.code === 0) {