diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java index 041515f03..51794855c 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java @@ -2163,32 +2163,22 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl updateWrapper = new LambdaUpdateWrapper<>(); - updateWrapper.in(ProjectLawsInventoryEO::getId,lawsInventoryEO.getId()); - setDateNull(lawsInventoryEO, updateWrapper); - //保存 - this.update(lawsInventoryEO,updateWrapper); - } + this.updateBatchById(projectLawsInventoryEOList); +// for (ProjectLawsInventoryEO lawsInventoryEO : projectLawsInventoryEOList) { +// LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<>(); +// updateWrapper.in(ProjectLawsInventoryEO::getId,lawsInventoryEO.getId()); +// setDateNull(lawsInventoryEO, updateWrapper); +// //保存 +// this.update(lawsInventoryEO,updateWrapper); +// } //更新log LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskInventoryFeedbackEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskInventoryFeedbackEOServiceImpl.java index 6041bbcbf..24381ed63 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskInventoryFeedbackEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskInventoryFeedbackEOServiceImpl.java @@ -151,7 +151,7 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl 0){ - this.distributionEngineerList.forEach(res=>{ - userIds.shift(res.userId) - userName.shift(res.name) + if (this.distributionEngineerList && this.distributionEngineerList.length > 0) { + this.distributionEngineerList.forEach(res => { + userIds.unshift(res.userId) + userName.unshift(res.name) }) } userIds = noRepeat1(userIds) userName = noRepeat1(userName) this.$emit('input', userName.join(',')) - this.$emit('change', this.query.db_field_name, userIds.join(','),this.query.subscript) + this.$emit('change', this.query.db_field_name, userIds.join(','), this.query.subscript) this.visible = false this.treeVisible = false // } else { @@ -198,8 +198,8 @@ }, getUserAndDepart() { getAction('sys/user/getUserAndDepart', { name: this.searchModel }).then((res) => { - if (res){ - this.gData = res.filter(ele => ele.flag === 'DEPART'); + if (res) { + this.gData = res.filter(ele => ele.flag === 'DEPART') } else { this.gData = [] } diff --git a/jero-web/src/views/processCenter/components/engineeringConfirmation.vue b/jero-web/src/views/processCenter/components/engineeringConfirmation.vue index 662e0e33f..f298ae329 100644 --- a/jero-web/src/views/processCenter/components/engineeringConfirmation.vue +++ b/jero-web/src/views/processCenter/components/engineeringConfirmation.vue @@ -691,15 +691,37 @@ this.formInline = { ...this.formInline } }, deleteText(num) { - this.distributionEngineerList.splice(num, 1) - this.distributionEngineerList = [...this.distributionEngineerList] - this.formInline.userName = this.formInline.userName.split(',') - this.formInline.userName.splice(num, 1) - this.formInline.userName = this.formInline.userName.join(',') - this.formInline.userId = this.formInline.userId.split(',') - this.formInline.userId.splice(num, 1) - this.formInline.userId = this.formInline.userId.join(',') - this.formInline = { ...this.formInline } + let _this = this + this.$confirm({ + content: _this.$t('ConfirmDelete'), + onOk() { + let id = '' + _this.dataSourceTable.forEach(res => { + if (res.userName == _this.distributionEngineerList[num].name) { + id = res.id + } + }) + _this.distributionEngineerList.splice(num, 1) + _this.distributionEngineerList = [..._this.distributionEngineerList] + _this.formInline.userName = _this.formInline.userName.split(',') + _this.formInline.userName.splice(num, 1) + _this.formInline.userName = _this.formInline.userName.join(',') + _this.formInline.userId = _this.formInline.userId.split(',') + _this.formInline.userId.splice(num, 1) + _this.formInline.userId = _this.formInline.userId.join(',') + _this.formInline = { ..._this.formInline } + if (id){ + deleteAction('/project/projectTaskInventoryDetailEO/delete', { id: id }).then((res) => { + if (res.success) { + _this.$message.success(_this.$t('OperationSuccessful')) + _this.getList() + } else { + _this.$message.warning(res.message) + } + }) + } + } + }) }, edit(val, title) { this.title = title