diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java index 8534b2c3b..c39f416d7 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java @@ -255,4 +255,11 @@ public class ProjectCertificationInventoryEOController extends JeroController callAdd(@RequestBody JSONObject json) { + return this.projectCertificationInventoryEOService.callAdd(json); + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java index 8284f1efb..3ceb6750f 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java @@ -177,4 +177,11 @@ public interface IProjectCertificationInventoryEOService extends IService updateConfigItemBatch(JSONObject json); + + /** + * 调取添加 + * @param json + * @return + */ + Result callAdd(JSONObject json); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java index e53099cd0..0cec4e40b 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java @@ -12,6 +12,9 @@ import com.jero.common.constant.enums.CutEnum; import com.jero.common.exception.JeroBootException; import com.jero.common.system.vo.LoginUser; import com.jero.common.util.DateUtils; +import com.jero.modules.authDummy.entity.AuthDummyInventoryInfoEO; +import com.jero.modules.authDummy.service.IAuthDummyInventoryBaseEOService; +import com.jero.modules.authDummy.service.IAuthDummyInventoryInfoEOService; import com.jero.modules.feishu.enums.TemplateInfoEnum2; import com.jero.modules.feishu.service.IFeishuService; import com.jero.modules.project.entity.ProjectCertificationInventoryEO; @@ -99,6 +102,10 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl standNameAndItemName = this.getStandNameAndItemName(projectCertificationInventoryEOList); String standName = (String) standNameAndItemName.get("standName"); String itemName = (String) standNameAndItemName.get("itemName"); @@ -1710,8 +1721,6 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl callAdd(JSONObject json) { + String authDummyInventoryBaseId = json.getString("authDummyInventoryBaseId"); + if(StringUtils.isEmpty(authDummyInventoryBaseId)){ + throw new JeroBootException("请选择一个认证虚拟清单进行操作!"); + } + + String authDummyInventoryInfoIds = json.getString("authDummyInventoryInfoIds"); + if(StringUtils.isEmpty(authDummyInventoryInfoIds)){ + throw new JeroBootException("至少选择一条数据进行调取!"); + } + + String projectLibraryId = json.getString("projectLibraryId"); + + QueryWrapper authDummyInfoQueryWrap = new QueryWrapper<>(); + authDummyInfoQueryWrap.lambda().in(AuthDummyInventoryInfoEO::getId,authDummyInventoryInfoIds.split(",")); + List authDummyInventoryInfoEOList = this.authDummyInventoryInfoEOService.list(authDummyInfoQueryWrap); + + if(CollectionUtils.isNotEmpty(authDummyInventoryInfoEOList)){ + List projectCertificationInventoryEOList = new ArrayList<>(); + for (AuthDummyInventoryInfoEO authDummyInventoryInfoEO : authDummyInventoryInfoEOList) { + ProjectCertificationInventoryEO projectCertificationInventoryEOTemp = new ProjectCertificationInventoryEO(); + BeanUtils.copyProperties(authDummyInventoryInfoEO,projectCertificationInventoryEOTemp); + + projectCertificationInventoryEOTemp.setProjectLibraryId(projectLibraryId); + projectCertificationInventoryEOList.add(projectCertificationInventoryEOTemp); + } + this.saveBatch(projectCertificationInventoryEOList); + } + + return Result.OK("调取成功!"); + } /** * 模板下载 * @param projectCertificationInventoryEO diff --git a/jero-web/src/views/projectManagement/components/certificationList/components/addModel.vue b/jero-web/src/views/projectManagement/components/certificationList/components/addModel.vue index 03441eca1..3edbcd8c6 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/components/addModel.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/components/addModel.vue @@ -93,7 +93,46 @@ - + + +
+
+ * + {{$t('configurationItem')}} +
+ + + +
+
+ +
+
+ * + {{$t('areaOfResponsibility')}} +
+ + + +
+
+
@@ -141,25 +180,6 @@ - -
-
- * - {{$t('areaOfResponsibility')}} -
- - - -
-
@@ -180,30 +200,52 @@
- -
* - {{$t('personLiable')}} + {{$t('closingDate')}}
- - +
+ + + + + + + + + + + + + + + + + + + + + + +
@@ -240,7 +282,44 @@
- + + +
+
+ * + {{$t('configurationItem')}} +
+ + + +
+
+ +
+
+ * + {{$t('areaOfResponsibility')}} +
+ + + +
+
+
@@ -286,24 +365,6 @@ - -
-
- * - {{$t('areaOfResponsibility')}} -
- - - -
-
@@ -323,6 +384,26 @@
+ +
+
+ * + {{$t('closingDate')}} +
+ + + +
+
@@ -377,6 +458,7 @@ import uploadFile from '@/components/uploadFile/file' import { getAction, postAction, downloadFile, putAction } from '@/api/manage' import { mapGetters } from 'vuex' + import moment from 'moment' export default { name: 'addModel', @@ -450,7 +532,17 @@ message: this.$t('personLiable') + this.$t('cannotEmpty'), trigger: 'change' } - ] + ], + endTime:[ + { + required: true, + message: this.$t('closingDate') + this.$t('cannotEmpty'), + trigger: 'change' + } + ], + configItem:[ + { required: true, message: this.$t('configurationItem') + this.$t('cannotEmpty'), trigger: 'change' }, + ], }, disabled: false, projectNameList: [], @@ -471,6 +563,18 @@ }, methods: { ...mapGetters(['userInfo']), + disabledDate(current) { + return current && current < moment().subtract(1, 'day') + }, + dateChange(item,index) { + if (index){ + this.formInline.dataList[index][item.db_field_name] = this.formInline.dataList[index][item.db_field_name] ? moment(this.formInline.dataList[index][item.db_field_name]).format('YYYY-MM-DD') : '' + + }else{ + this.formInline[item.db_field_name] = this.formInline[item.db_field_name] ? moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD') : '' + + } + }, getDeliverableTree() { getAction('/sys/category/getDeliverableTree', {}).then((res) => { if (res.success) { diff --git a/jero-web/src/views/projectManagement/components/certificationList/components/batSetting.vue b/jero-web/src/views/projectManagement/components/certificationList/components/batSetting.vue index 6d7f9cde3..0a6dcdd5b 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/components/batSetting.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/components/batSetting.vue @@ -17,19 +17,11 @@ {{$t('configurationItem')}}
- - - - {{ item.label }} - - - +
@@ -74,15 +66,20 @@
- {{$t('personLiable')}} + {{$t('typeOfDeliverables')}}
- +
@@ -91,25 +88,52 @@
- {{$t('typeOfDeliverables')}} + {{$t('closingDate')}}
- - - - - {{ item.label }} - - - + +
+ +
+
+ {{$t('CertificationProgress')}} +
+ + + +
+
+
+ + +
+
+ {{$t('remarks')}} +
+ + + +
+
@@ -122,7 +146,7 @@ export default { name: 'batSetting', - props: ['url'], + props: ['url','roleSwitchingCode'], components: { PersonnelSelection }, @@ -131,19 +155,36 @@ visible: false, confirmLoading: false, formInline: {}, - rules: {}, + rules: { + + }, ids: [], configurationItemList: [], engineeringInterfacePersonList: [], typeOfDeliverablesList: [], - name: '' + name: '', + DeliverableTreeList: [] } }, mounted() { }, methods: { + disabledDate(current) { + return current && current < moment().subtract(1, 'day') + }, + + getDeliverableTree() { + getAction('/sys/category/getDeliverableTree', {}).then((res) => { + if (res.success) { + this.DeliverableTreeList = res.result + } else { + this.DeliverableTreeList = [] + } + }) + }, edit(data, name) { this.visible = true + this.getDeliverableTree() this.$nextTick(() => { this.ids = data || [] this.formInline = {} @@ -163,12 +204,24 @@ }, handleOkOne() { let ids = JSON.parse(JSON.stringify(this.ids)) + let formInline = JSON.parse(JSON.stringify(this.formInline)) + Object.keys(formInline).forEach(res => { + if (formInline[res] && formInline[res] instanceof Array) { + formInline[res] = formInline[res].join(',') + } + }) let query = { ids: ids.join(','), - ...this.formInline + ...formInline } + let url = '' this.confirmLoading = true - postAction(this.url.setBatch, query).then((res) => { + if (this.name == this.$t('changeSetting')) { + url = '/project/projectCertificationInventoryEO/updateConfigItemBatch' + } else { + url = this.url.setBatch + } + postAction(url, query).then((res) => { if (res.success) { this.$message.success(this.$t('OperationSuccessful')) this.visible = false diff --git a/jero-web/src/views/projectManagement/components/certificationList/index.vue b/jero-web/src/views/projectManagement/components/certificationList/index.vue index b3cacecb4..acb6c31bf 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/index.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/index.vue @@ -54,10 +54,10 @@ {{ $t('query') }} {{ $t('reset') }} - - {{ !toggleSearchStatus ? $t('open') : $t('away') }} - - + + + + @@ -347,7 +347,7 @@ - + @@ -473,7 +473,51 @@ 'NA': 'notInvolvedColor', 'Not start': 'submittedColor' }, - fieldList: [], + fieldList: [ + { + type: 'string', + value: 'category', + text: this.$t('category') + }, + { + type: 'string', + value: 'inspectionItem', + text: this.$t('inspectionItems') + }, + { + type: '', + value: 'configItem', + text: this.$t('configurationItem'), + dictCode: 'ren4_zheng4_qing1_dan1_-_pei4_zhi4_xiang4'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框 + }, + { + type: 'string', + value: 'wvtaId', + text: 'WVTA ID' + }, + { + type: 'string', + value: 'serialNumber', + text: this.$t('standardNo') + }, + { + type: 'Personnel', + value: 'sdt', + valueName: 'sdtName', + text: this.$t('engineeringInterfacePerson') + }, + { + type: 'Personnel', + value: 'dutyPerson', + valueName: 'dutyPersonName', + text: this.$t('personLiable') + }, + { + type: 'date', + value: 'endTime', + text: this.$t('closingDate') + }, + ], disabled: false, queryParamQuery: {}, formInline: {}, @@ -538,7 +582,7 @@ { title: this.$t('configurationItem'), align: 'left', - dataIndex: 'configItem', + dataIndex: 'configItem_dictText', width: 180, ellipsis: true }, @@ -1187,6 +1231,8 @@ this.$message.success(this.$t('OperationSuccessful')) this.visibleRoleSwitching = false this.confirmLoadingRoleSwitching = false + this.selectedRowKeysList = [] + this.selectedRowKeys = [] this.getList() this.$emit('getRoleSwitch', this.roleSwitchingCode) } else {