diff --git a/src/views/modules/longtron/production-plan-cable-cop-task.vue b/src/views/modules/longtron/production-plan-cable-cop-task.vue index 42296cd0..4c531a87 100644 --- a/src/views/modules/longtron/production-plan-cable-cop-task.vue +++ b/src/views/modules/longtron/production-plan-cable-cop-task.vue @@ -43,6 +43,14 @@ v-loading="dataListLoading" style="width: 100%" @current-change="onCurrentRowChange"> + + + @@ -70,14 +78,7 @@ - - - + { + if (!item || !item.orderNo) { + return false + } + if (currentOrderNo && item.orderNo === currentOrderNo) { + return false + } + const itemProjectNo = String(item.projectNo || '').trim().toUpperCase() + return itemProjectNo && itemProjectNo === normalizedProjectNo + }) + }, saveOrder() { - if (!this.saveHeaderData.projectNo || !this.saveHeaderData.modelNo) return this.$message.warning('请先填写项目号和型号') + const projectNo = String(this.saveHeaderData.projectNo || '').trim() + const modelNo = String(this.saveHeaderData.modelNo || '').trim() + if (!projectNo || !modelNo) return this.$message.warning('请先填写项目号和型号') + if (this.isProjectNoDuplicate(projectNo, this.saveHeaderData.orderNo)) { + return this.$message.warning(`项目号【${projectNo}】已存在,不能重复`) + } + this.saveHeaderData.projectNo = projectNo + this.saveHeaderData.modelNo = modelNo this.setUp.saveButton = true saveHomeLiftOrder(this.saveHeaderData).then(({data}) => { this.setUp.saveButton = false diff --git a/src/views/modules/longtron/production-plan-machining-task.vue b/src/views/modules/longtron/production-plan-machining-task.vue index 86e9d375..7366ccf7 100644 --- a/src/views/modules/longtron/production-plan-machining-task.vue +++ b/src/views/modules/longtron/production-plan-machining-task.vue @@ -4,6 +4,12 @@ + + + + + + @@ -34,9 +40,19 @@ v-loading="dataListLoading" style="width: 100%" @current-change="onCurrentRowChange"> + + + + + @@ -55,14 +71,7 @@ - - - + + + + + @@ -218,7 +231,7 @@ export default { name: 'ProductionPlanMachiningTask', data() { return { - searchData: { modelNo: '', status: '', planStartDate: '', planEndDate: '', page: 1, limit: 20 }, + searchData: { modelNo: '', materialName: '', materialSpec: '', status: '', planStartDate: '', planEndDate: '', page: 1, limit: 20 }, saveHeaderData: {}, reportData: { orderNo: '', taskNo: '', nodeCode: 'machiningProduction', reportQty: '', remark: '' }, setUp: { reviewFlag: false, reportFlag: false, assignFlag: false, saveButton: false, reportButton: false, assignButton: false }, @@ -270,6 +283,8 @@ export default { orderNo: 'MOCK-MACH-001', projectNo: 'MAT-120001', modelNo: 'MAT-120001', + materialName: '导轨压板', + materialSpec: 'DG-80-12', taskQty: 120, reportQty: 30, autoAssignAllUsers: true, @@ -285,6 +300,8 @@ export default { orderNo: 'MOCK-MACH-002', projectNo: 'MAT-120188', modelNo: 'MAT-120188', + materialName: '轿底连接件', + materialSpec: 'JD-LJ-06', taskQty: 240, reportQty: 0, autoAssignAllUsers: true, @@ -341,17 +358,19 @@ export default { }) }, resetQuery() { - this.searchData = { modelNo: '', status: '', planStartDate: '', planEndDate: '', page: 1, limit: 20 } + this.searchData = { modelNo: '', materialName: '', materialSpec: '', status: '', planStartDate: '', planEndDate: '', page: 1, limit: 20 } this.searchTable('Y') }, openEditDialog(row) { this.saveHeaderData = row ? { ...row, autoAssignAllUsers: !!row.autoAssignAllUsers, nodeReportMode: row.nodeReportMode || 'PARALLEL' } - : { orderNo: '', modelNo: '', taskQty: 1, reportQty: 0, planFinishDate: '', status: '已排产', autoAssignAllUsers: true, nodeReportMode: 'PARALLEL', nodeList: [] } + : { orderNo: '', modelNo: '', materialName: '', materialSpec: '', taskQty: 1, reportQty: 0, planFinishDate: '', status: '已排产', autoAssignAllUsers: true, nodeReportMode: 'PARALLEL', nodeList: [] } this.setUp.reviewFlag = true }, saveTask() { if (!this.saveHeaderData.modelNo) return this.$message.warning('请先填写物料号') + if (!this.saveHeaderData.materialName) return this.$message.warning('请先填写物料名称') + if (!this.saveHeaderData.materialSpec) return this.$message.warning('请先填写规格') if (!this.saveHeaderData.taskQty || Number(this.saveHeaderData.taskQty) <= 0) return this.$message.warning('请输入有效的计划数量') if (!this.saveHeaderData.planFinishDate) return this.$message.warning('请选择计划完工日期') const payload = { diff --git a/src/views/modules/longtron/production-plan-renovation-order.vue b/src/views/modules/longtron/production-plan-renovation-order.vue index 5e3e705b..9430c666 100644 --- a/src/views/modules/longtron/production-plan-renovation-order.vue +++ b/src/views/modules/longtron/production-plan-renovation-order.vue @@ -40,6 +40,14 @@ v-loading="dataListLoading" style="width: 100%" @current-change="onCurrentRowChange"> + + + @@ -62,14 +70,7 @@ - - - + { + if (!item || !item.orderNo) { + return false + } + if (currentOrderNo && item.orderNo === currentOrderNo) { + return false + } + const itemProjectNo = String(item.projectNo || '').trim().toUpperCase() + return itemProjectNo && itemProjectNo === normalizedProjectNo + }) + }, saveOrder() { - if (!this.saveHeaderData.projectNo || !this.saveHeaderData.modelNo) return this.$message.warning('请先填写项目号和型号') + const projectNo = String(this.saveHeaderData.projectNo || '').trim() + const modelNo = String(this.saveHeaderData.modelNo || '').trim() + if (!projectNo || !modelNo) return this.$message.warning('请先填写项目号和型号') + if (this.isProjectNoDuplicate(projectNo, this.saveHeaderData.orderNo)) { + return this.$message.warning(`项目号【${projectNo}】已存在,不能重复`) + } + this.saveHeaderData.projectNo = projectNo + this.saveHeaderData.modelNo = modelNo this.setUp.saveButton = true saveRenovationOrder(this.saveHeaderData).then(({data}) => { this.setUp.saveButton = false diff --git a/src/views/modules/longtron/screen-renovation-progress.vue b/src/views/modules/longtron/screen-renovation-progress.vue index 79d8c6cd..6fc53566 100644 --- a/src/views/modules/longtron/screen-renovation-progress.vue +++ b/src/views/modules/longtron/screen-renovation-progress.vue @@ -50,15 +50,15 @@ - + - - - - - - - + + + + + + + @@ -97,6 +97,7 @@ + @@ -294,6 +295,7 @@ export default { .filter(item => STATUS_ALLOW_LIST.includes(item.status)) .map(item => ({ modelNo: item.modelNo || '', + materialSpec: item.materialSpec || '', planFinishDate: item.planFinishDate || '', status: item.status || '', finishDate: item.finishDate || '',