认证清单添加发布、发起任务的截止时间
This commit is contained in:
+143
@@ -0,0 +1,143 @@
|
|||||||
|
<template>
|
||||||
|
<a-modal
|
||||||
|
:title="title"
|
||||||
|
:width="500"
|
||||||
|
:visible="visible"
|
||||||
|
:confirm-loading="confirmLoading"
|
||||||
|
:maskClosable="false"
|
||||||
|
@ok="handleOk"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
>
|
||||||
|
<a-spin :spinning="confirmLoading">
|
||||||
|
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text-index">
|
||||||
|
<div class="title-text-index" style="width: 100px">
|
||||||
|
<span class="Required">*</span>
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('cutoffTime')">
|
||||||
|
{{ $t('cutoffTime') }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" style="width: calc(100% - 120px)" :prop="queryData.dutyDueDate">
|
||||||
|
<a-date-picker class="box-input"
|
||||||
|
:placeholder="$t('PleaseSelect')+$t('cutoffTime')"
|
||||||
|
@change="dateChange({'db_field_name':queryData.dutyDueDate})"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
:disabledDate="disabledDate"
|
||||||
|
:getCalendarContainer="(trigger) => trigger.parentNode"
|
||||||
|
v-model="formInline[queryData.dutyDueDate]"
|
||||||
|
style="width: 100%"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form-model>
|
||||||
|
</a-spin>
|
||||||
|
</a-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import moment from 'moment'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'deadlineForm',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '',
|
||||||
|
visible: false,
|
||||||
|
confirmLoading: false,
|
||||||
|
formInline: {},
|
||||||
|
rules: {},
|
||||||
|
queryData:{},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getData(val) {
|
||||||
|
this.queryData = val
|
||||||
|
this.title = val.title
|
||||||
|
this.visible = true
|
||||||
|
this.formInline = {}
|
||||||
|
this.confirmLoading = false
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.ruleForm.clearValidate()
|
||||||
|
this.rules[val.dutyDueDate] = [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('cutoffTime') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'change'
|
||||||
|
},
|
||||||
|
]
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleOk() {
|
||||||
|
this.$refs.ruleForm.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.$emit('deadlineDataForm', this.queryData,this.formInline)
|
||||||
|
this.confirmLoading = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleCancel() {
|
||||||
|
this.visible = false
|
||||||
|
},
|
||||||
|
//时间禁用
|
||||||
|
disabledDate(current) {
|
||||||
|
return current && current < moment().subtract(1, 'day')
|
||||||
|
},
|
||||||
|
dateChange(item) {
|
||||||
|
this.formInline[item.db_field_name] = this.formInline[item.db_field_name] ? moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD') : ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.box-title-text-index {
|
||||||
|
line-height: 1.4;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text {
|
||||||
|
width: 110px;
|
||||||
|
color: #000F16;
|
||||||
|
display: inline-block;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-right: 16px;
|
||||||
|
margin-top: 3px;
|
||||||
|
text-align: right;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text-index {
|
||||||
|
width: 110px;
|
||||||
|
color: #000F16;
|
||||||
|
display: inline-block;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-right: 16px;
|
||||||
|
margin-top: 3px;
|
||||||
|
text-align: right;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
line-height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-input {
|
||||||
|
display: inline-block;
|
||||||
|
width: calc(100% - 120px);
|
||||||
|
height: 38px;
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Required {
|
||||||
|
color: red;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -423,6 +423,7 @@
|
|||||||
<viewFileModel ref="viewFileModelRef"/>
|
<viewFileModel ref="viewFileModelRef"/>
|
||||||
<reasonForReturn ref="reasonForReturnRef" @reasonForReturnForm="reasonForReturnForm"/>
|
<reasonForReturn ref="reasonForReturnRef" @reasonForReturnForm="reasonForReturnForm"/>
|
||||||
<addConfiguration ref="addConfigurationRef" @addConfigurationForm="transferListForm"/>
|
<addConfiguration ref="addConfigurationRef" @addConfigurationForm="transferListForm"/>
|
||||||
|
<deadlineForm ref="deadlineFormRef" @deadlineDataForm="deadlineDataForm"/>
|
||||||
<JLoading :loading="JTextLoading">{{ $t('Submitting') }}</JLoading>
|
<JLoading :loading="JTextLoading">{{ $t('Submitting') }}</JLoading>
|
||||||
<!-- <a-modal-->
|
<!-- <a-modal-->
|
||||||
<!-- :title="listTitle"-->
|
<!-- :title="listTitle"-->
|
||||||
@@ -510,6 +511,7 @@
|
|||||||
import SelectedBy from '@/components/SelectedBy/index'
|
import SelectedBy from '@/components/SelectedBy/index'
|
||||||
import reasonForReturn from './components/reasonForReturn'
|
import reasonForReturn from './components/reasonForReturn'
|
||||||
import addConfiguration from './components/addConfiguration'
|
import addConfiguration from './components/addConfiguration'
|
||||||
|
import deadlineForm from './components/deadlineForm'
|
||||||
import referenceDeliverablesList from './components/referenceDeliverablesList'
|
import referenceDeliverablesList from './components/referenceDeliverablesList'
|
||||||
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
||||||
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
|
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
|
||||||
@@ -534,7 +536,8 @@
|
|||||||
SelectedBy,
|
SelectedBy,
|
||||||
viewFileModel,
|
viewFileModel,
|
||||||
reasonForReturn,
|
reasonForReturn,
|
||||||
addConfiguration
|
addConfiguration,
|
||||||
|
deadlineForm
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -549,9 +552,9 @@
|
|||||||
'In progress': 'TrackedColor',
|
'In progress': 'TrackedColor',
|
||||||
'NA': 'notInvolvedColor',
|
'NA': 'notInvolvedColor',
|
||||||
'Not start': 'submittedColor',
|
'Not start': 'submittedColor',
|
||||||
'25181c5a4c044001b4beca539c77a5c8':'accordColor',
|
'25181c5a4c044001b4beca539c77a5c8': 'accordColor',
|
||||||
'0a384b5475554ae8886b950730a3bff7':'accordColor',
|
'0a384b5475554ae8886b950730a3bff7': 'accordColor',
|
||||||
'7cba3c71fd24421eade54c685e3b4444':'TrackedColor',
|
'7cba3c71fd24421eade54c685e3b4444': 'TrackedColor'
|
||||||
},
|
},
|
||||||
fieldList: [
|
fieldList: [
|
||||||
{
|
{
|
||||||
@@ -986,9 +989,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!isTrue){
|
if (!isTrue) {
|
||||||
this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)), name,this.selectedRowKeysList[0])
|
this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)), name, this.selectedRowKeysList[0])
|
||||||
}else{
|
} else {
|
||||||
this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)), name)
|
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')
|
data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyDataListReleasedAndCertificationReturnCanSelected')
|
||||||
}
|
}
|
||||||
if (ids && ids.length > 0) {
|
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 {
|
} else {
|
||||||
this.failedMessage(data)
|
this.failedMessage(data)
|
||||||
}
|
}
|
||||||
@@ -1159,29 +1170,72 @@
|
|||||||
this.$message.warning(this.$t('selectLeastOne'))
|
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
|
let _this = this
|
||||||
this.$confirm({
|
// this.$confirm({
|
||||||
content: _this.$t('confirmRelease'),
|
// content: _this.$t('confirmRelease'),
|
||||||
onOk() {
|
// onOk() {
|
||||||
postAction('/project/projectCertificationInventoryEO/issue', {
|
postAction('/project/projectCertificationInventoryEO/issue', {
|
||||||
ids: ids.join(','),
|
ids: ids.join(','),
|
||||||
projectLibraryId: _this.$route.query.id
|
projectLibraryId: _this.$route.query.id,
|
||||||
}).then((res) => {
|
inventoryVerifyEndTime: formInline.inventoryVerifyEndTime
|
||||||
if (res.success) {
|
}).then((res) => {
|
||||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
if (res.success) {
|
||||||
_this.selectedRowKeys = []
|
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||||
_this.selectedRowKeysList = []
|
_this.selectedRowKeys = []
|
||||||
_this.getList()
|
_this.selectedRowKeysList = []
|
||||||
if (notConditions && notConditions.length > 0) {
|
_this.getList()
|
||||||
_this.failedMessage(data)
|
if (notConditions && notConditions.length > 0) {
|
||||||
}
|
_this.failedMessage(data)
|
||||||
} else {
|
}
|
||||||
_this.$message.warning(res.message)
|
_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() {
|
// handleOk() {
|
||||||
// this.$refs.ruleForm.validate(valid => {
|
// this.$refs.ruleForm.validate(valid => {
|
||||||
@@ -1694,7 +1748,18 @@
|
|||||||
data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyProcessReturned')
|
data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyProcessReturned')
|
||||||
}
|
}
|
||||||
if ((ids && ids.length > 0) || (NAId && NAId.length > 0)) {
|
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 {
|
} else {
|
||||||
this.failedMessage(data)
|
this.failedMessage(data)
|
||||||
}
|
}
|
||||||
@@ -1874,9 +1939,9 @@
|
|||||||
}
|
}
|
||||||
let data = ''
|
let data = ''
|
||||||
if (notConditions && notConditions.length > 0) {
|
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')
|
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')
|
data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyDataStatusResultReviewedCanBeSelected')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1906,6 +1971,7 @@
|
|||||||
this.$message.warning(this.$t('selectLeastOne'))
|
this.$message.warning(this.$t('selectLeastOne'))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
reasonForReturnForm(value, text, ids, notConditions, data, reasonForReturn) {
|
reasonForReturnForm(value, text, ids, notConditions, data, reasonForReturn) {
|
||||||
let _this = this
|
let _this = this
|
||||||
let query = {
|
let query = {
|
||||||
@@ -1955,9 +2021,9 @@
|
|||||||
this.$confirm({
|
this.$confirm({
|
||||||
content: prompt,
|
content: prompt,
|
||||||
onOk() {
|
onOk() {
|
||||||
if (NAId && NAId.length > 0) {
|
// if (NAId && NAId.length > 0) {
|
||||||
_this.NASubmitTask(NAId, ids, notConditions, data)
|
// _this.NASubmitTask(NAId, ids, notConditions, data)
|
||||||
}
|
// }
|
||||||
if (ids && ids.length > 0) {
|
if (ids && ids.length > 0) {
|
||||||
let query = {
|
let query = {
|
||||||
'nodeKey': value,
|
'nodeKey': value,
|
||||||
@@ -1998,11 +2064,14 @@
|
|||||||
if (notConditions && notConditions.length > 0) {
|
if (notConditions && notConditions.length > 0) {
|
||||||
_this.failedMessage(data)
|
_this.failedMessage(data)
|
||||||
}
|
}
|
||||||
|
_this.$refs.deadlineFormRef.visible = false
|
||||||
|
_this.$refs.deadlineFormRef.confirmLoading = false
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (ids && ids.length > 0) {
|
if (ids && ids.length > 0) {
|
||||||
} else {
|
} else {
|
||||||
_this.$message.warning(_this.$t('operationFailed'))
|
_this.$message.warning(_this.$t('operationFailed'))
|
||||||
|
_this.$refs.deadlineFormRef.confirmLoading = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user