north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
@@ -131,6 +131,7 @@ titleUploadData.value.qualityInspector=user.user.userName } gridOptions.toolbarConfig.buttons.push(button) } // getQuantity() @@ -408,13 +409,27 @@ break } case 'update': { getQuantity() const errMap = await $grid.validate(true) if (errMap) { ElMessage.error(t('basicData.msg.checkoutLose')) return } saveReportingWork(0,'update') //根据补片状态判断是否能修改 request.post(`/reportingWork/getPatchCondition/${route.query.reportingWorkId}`).then(async (res) => { if (res.code == 200) { console.log(res.data) if (res.data > 0) { ElMessage.error("该报工包含已补片数据,不可修改!") return } else { getQuantity() const errMap = await $grid.validate(true) if (errMap) { ElMessage.error(t('basicData.msg.checkoutLose')) return } saveReportingWork(0, 'update') } } else { ElMessage.warning(res.msg) } }) break } } @@ -867,6 +882,7 @@ }) // 查询责任班组 const computedResponsibleTeam = computed((responsibleProcess) => { titleSelectJson.value.historyTeams.push({basic_name: user.user.userName, process: titleUploadData.value.thisProcess, basic_type: 'teamsgroups', basic_category: 179, id: 555}) return function (responsibleProcess){ return titleSelectJson.value.historyTeams.filter((item) => { return item.process === responsibleProcess @@ -991,9 +1007,6 @@ titleSelectJson.value.thisProcessType = res.data.thisProcess //历史班组 titleSelectJson.value.historyTeams= res.data.historyTeams if (titleSelectJson.value.historyTeams.length == 0){ titleSelectJson.value.historyTeams.push({basic_name: user.user.userName, process: '切割', basic_type: 'teamsgroups', basic_category: 179, id: 555}) } //历史设备 titleSelectJson.value.historyDevice = res.data.historyDevice //历史工序 north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportingWorkController.java
@@ -131,4 +131,17 @@ return Result.seccess(reportingWorkService.detailsQualitySv(reportingWorkId,processId,thisProcess,reportingWork)); } @ApiOperation("补片状态查询") @PostMapping ("/getPatchCondition/{reportingWorkId}") public Result getPatchCondition( @PathVariable String reportingWorkId) { return Result.seccess(reportingWorkService.getPatchConditionSv(reportingWorkId)); } @ApiOperation("报工新增日志") @PostMapping ("/saveReportingWorkLog") public Result saveReportingWorkLog(@RequestBody Map<String,Object> reportingWork) { return Result.seccess(reportingWorkService.SaveReportingWorkSv(reportingWork)); } } north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportingWorkMapper.java
@@ -78,4 +78,6 @@ Integer selectLayerByReportingWorkId(String reportingWorkId); Boolean ReviewReportingWorkMp(String substring, String process, String result); String getPatchConditionMp(String reportingWorkId); } north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
@@ -536,4 +536,9 @@ return map; } public String getPatchConditionSv(String reportingWorkId) { String count=reportingWorkMapper.getPatchConditionMp(reportingWorkId); return count; } } north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
@@ -787,4 +787,8 @@ where rw.process_id = #{substring} and rw.this_process=#{process} and rwd.technology_number = #{result} and reviewed_state=0 </update> <select id="getPatchConditionMp"> select count(*) from damage_details where reporting_work_id=#{reportingWorkId} and patch_status>0 </select> </mapper>