diff --git a/jero-web/src/views/projectManagement/components/certificationList/components/deadlineForm.vue b/jero-web/src/views/projectManagement/components/certificationList/components/deadlineForm.vue new file mode 100644 index 000000000..62d6ee45c --- /dev/null +++ b/jero-web/src/views/projectManagement/components/certificationList/components/deadlineForm.vue @@ -0,0 +1,143 @@ + + + + + \ No newline at end of file diff --git a/jero-web/src/views/projectManagement/components/certificationList/index.vue b/jero-web/src/views/projectManagement/components/certificationList/index.vue index 8093c0f48..04b959873 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/index.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/index.vue @@ -423,6 +423,7 @@ + {{ $t('Submitting') }} @@ -510,6 +511,7 @@ import SelectedBy from '@/components/SelectedBy/index' import reasonForReturn from './components/reasonForReturn' import addConfiguration from './components/addConfiguration' + import deadlineForm from './components/deadlineForm' import referenceDeliverablesList from './components/referenceDeliverablesList' import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage' import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header' @@ -534,7 +536,8 @@ SelectedBy, viewFileModel, reasonForReturn, - addConfiguration + addConfiguration, + deadlineForm }, data() { return { @@ -549,9 +552,9 @@ 'In progress': 'TrackedColor', 'NA': 'notInvolvedColor', 'Not start': 'submittedColor', - '25181c5a4c044001b4beca539c77a5c8':'accordColor', - '0a384b5475554ae8886b950730a3bff7':'accordColor', - '7cba3c71fd24421eade54c685e3b4444':'TrackedColor', + '25181c5a4c044001b4beca539c77a5c8': 'accordColor', + '0a384b5475554ae8886b950730a3bff7': 'accordColor', + '7cba3c71fd24421eade54c685e3b4444': 'TrackedColor' }, fieldList: [ { @@ -986,9 +989,9 @@ } } } - if (!isTrue){ - this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)), name,this.selectedRowKeysList[0]) - }else{ + if (!isTrue) { + this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)), name, this.selectedRowKeysList[0]) + } else { this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)), name) } @@ -1151,7 +1154,15 @@ data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyDataListReleasedAndCertificationReturnCanSelected') } if (ids && ids.length > 0) { - this.releaseData(ids, notConditions, data) + // this.releaseData(ids, notConditions, data) + let query = { + ids: ids, + notConditions: notConditions, + data: data, + dutyDueDate: 'inventoryVerifyEndTime', + title: this.$t('release') + } + this.$refs.deadlineFormRef.getData(JSON.parse(JSON.stringify(query))) } else { this.failedMessage(data) } @@ -1159,29 +1170,72 @@ this.$message.warning(this.$t('selectLeastOne')) } }, - releaseData(ids, notConditions, data) { + deadlineDataForm(val, formInline) { + if (val.title == this.$t('release')) { + this.releaseData(val.ids, val.notConditions, val.data, formInline) + } else if (val.title == this.$t('initiateTask')) { + this.initiateTaskClick(val, formInline) + } + }, + releaseData(ids, notConditions, data, formInline) { let _this = this - this.$confirm({ - content: _this.$t('confirmRelease'), - onOk() { - postAction('/project/projectCertificationInventoryEO/issue', { - ids: ids.join(','), - projectLibraryId: _this.$route.query.id - }).then((res) => { - if (res.success) { - _this.$message.success(_this.$t('OperationSuccessful')) - _this.selectedRowKeys = [] - _this.selectedRowKeysList = [] - _this.getList() - if (notConditions && notConditions.length > 0) { - _this.failedMessage(data) - } - } else { - _this.$message.warning(res.message) - } - }) + // this.$confirm({ + // content: _this.$t('confirmRelease'), + // onOk() { + postAction('/project/projectCertificationInventoryEO/issue', { + ids: ids.join(','), + projectLibraryId: _this.$route.query.id, + inventoryVerifyEndTime: formInline.inventoryVerifyEndTime + }).then((res) => { + if (res.success) { + _this.$message.success(_this.$t('OperationSuccessful')) + _this.selectedRowKeys = [] + _this.selectedRowKeysList = [] + _this.getList() + if (notConditions && notConditions.length > 0) { + _this.failedMessage(data) + } + _this.$refs.deadlineFormRef.visible = false + _this.$refs.deadlineFormRef.confirmLoading = false + } else { + _this.$message.warning(res.message) + _this.$refs.deadlineFormRef.confirmLoading = false } }) + // } + // }) + }, + + initiateTaskClick(val, formInline) { + let _this = this + if (val.NAId && val.NAId.length > 0) { + _this.NASubmitTask(val.NAId, val.ids, val.notConditions, val.data) + } + if (val.ids && val.ids.length > 0) { + let query = { + 'nodeKey': val.value, + 'projectLibraryId': _this.$route.query.id, + 'ids': val.ids.join(','), + taskConfirmEndTime: formInline.taskConfirmEndTime + } + + postAction('/project/projectCertificationInventoryEO/submitTask', query).then((res) => { + if (res.success) { + _this.$message.success(_this.$t('OperationSuccessful')) + _this.getList() + _this.selectedRowKeys = [] + _this.selectedRowKeysList = [] + _this.$refs.deadlineFormRef.visible = false + _this.$refs.deadlineFormRef.confirmLoading = false + if (val.notConditions && val.notConditions.length > 0) { + _this.failedMessage(val.data) + } + } else { + _this.$message.warning(res.message) + _this.$refs.deadlineFormRef.confirmLoading = false + } + }) + } }, // handleOk() { // this.$refs.ruleForm.validate(valid => { @@ -1694,7 +1748,18 @@ data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyProcessReturned') } if ((ids && ids.length > 0) || (NAId && NAId.length > 0)) { - this.submitTask(value, prompt, ids, notConditions, data, NAId) + let query = { + value: value, + prompt: prompt, + ids: ids, + notConditions: notConditions, + data: data, + dutyDueDate: 'taskConfirmEndTime', + title: this.$t('initiateTask'), + NAId: NAId + } + this.$refs.deadlineFormRef.getData(JSON.parse(JSON.stringify(query))) + // this.submitTask(value, prompt, ids, notConditions, data, NAId) } else { this.failedMessage(data) } @@ -1874,9 +1939,9 @@ } let data = '' if (notConditions && notConditions.length > 0) { - if (value == 'rzgcssc_th'){ + if (value == 'rzgcssc_th') { data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyDataWithApprovedCanCeSelected') - }else{ + } else { data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyDataStatusResultReviewedCanBeSelected') } } @@ -1906,6 +1971,7 @@ this.$message.warning(this.$t('selectLeastOne')) } }, + reasonForReturnForm(value, text, ids, notConditions, data, reasonForReturn) { let _this = this let query = { @@ -1955,9 +2021,9 @@ this.$confirm({ content: prompt, onOk() { - if (NAId && NAId.length > 0) { - _this.NASubmitTask(NAId, ids, notConditions, data) - } + // if (NAId && NAId.length > 0) { + // _this.NASubmitTask(NAId, ids, notConditions, data) + // } if (ids && ids.length > 0) { let query = { 'nodeKey': value, @@ -1998,11 +2064,14 @@ if (notConditions && notConditions.length > 0) { _this.failedMessage(data) } + _this.$refs.deadlineFormRef.visible = false + _this.$refs.deadlineFormRef.confirmLoading = false } } else { if (ids && ids.length > 0) { } else { _this.$message.warning(_this.$t('operationFailed')) + _this.$refs.deadlineFormRef.confirmLoading = false } } })