符合性确认批量处理\任务责任确认批量处理

This commit is contained in:
范强强
2023-03-23 11:29:47 +08:00
parent 78ed62cdd8
commit baf53ed07a
6 changed files with 107 additions and 45 deletions
@@ -274,9 +274,18 @@
<!-- {{ $t('view') }}-->
<!-- </a>-->
<a class="text-operation"
v-if="(record.designFlowStatus == 'List to be released' ||
record.verifyFlowStatus == 'List to be released')
&& roleSwitchingCode == 0"
v-if="(
record.verifyFlowStatus == 'List to be released' ||
record.verifyFlowStatus == 'Compliance' ||
record.verifyFlowStatus == 'Non-Compliance' ||
record.verifyFlowStatus == 'To be tracked' ||
record.verifyFlowStatus == 'NA')
&& (record.designFlowStatus == 'List to be released' ||
record.designFlowStatus == 'Compliance' ||
record.designFlowStatus == 'Non-Compliance' ||
record.designFlowStatus == 'To be tracked' ||
record.designFlowStatus == 'NA')
&& roleSwitchingCode == 0"
@click="deleteLib(record)">
{{ $t('deleteLib') }}
</a>
@@ -1220,7 +1229,11 @@
TaskKey = 'zrrqr'
} else if (row.designFlowStatus == 'Results to be submitted') {
TaskKey = 'zrrtjjfw'
} else if (row.designFlowStatus == 'Results to be reviewed') {
} else if (row.designFlowStatus == 'Results to be reviewed' ||
row.designFlowStatus == 'Compliance' ||
row.designFlowStatus == 'Non-Compliance' ||
row.designFlowStatus == 'To be tracked' ||
row.designFlowStatus == 'NA') {
TaskKey = 'fggcssh'
}
query = {
@@ -1246,7 +1259,11 @@
TaskKey = 'zrrqr'
} else if (row.verifyFlowStatus == 'Results to be submitted') {
TaskKey = 'zrrtjjfw'
} else if (row.verifyFlowStatus == 'Results to be reviewed') {
} else if (row.verifyFlowStatus == 'Results to be reviewed' ||
row.verifyFlowStatus == 'Compliance' ||
row.verifyFlowStatus == 'Non-Compliance' ||
row.verifyFlowStatus == 'To be tracked' ||
row.verifyFlowStatus == 'NA') {
TaskKey = 'fggcssh'
}
query = {
@@ -1711,8 +1728,18 @@
for (let i = 0; i < this.dataSource.length; i++) {
for (let j = 0; j < selectedRowKeys.length; j++) {
if (this.dataSource[i].id == selectedRowKeys[j]) {
if (this.dataSource[i].verifyFlowStatus == 'List to be released' ||
this.dataSource[i].designFlowStatus == 'List to be released') {
if (
(this.dataSource[i].verifyFlowStatus == 'List to be released' ||
this.dataSource[i].verifyFlowStatus == 'Compliance' ||
this.dataSource[i].verifyFlowStatus == 'Non-Compliance' ||
this.dataSource[i].verifyFlowStatus == 'To be tracked' ||
this.dataSource[i].verifyFlowStatus == 'NA')
&&
(this.dataSource[i].designFlowStatus == 'List to be released' ||
this.dataSource[i].designFlowStatus == 'Compliance' ||
this.dataSource[i].designFlowStatus == 'Non-Compliance' ||
this.dataSource[i].designFlowStatus == 'To be tracked' ||
this.dataSource[i].designFlowStatus == 'NA')) {
isTrue = true
} else {
isTrue = false
@@ -109,6 +109,25 @@
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('certificationSubmission')">
{{$t('certificationSubmission')}}</span>
</div>
<a-form-model-item class="itemModel" prop="certificationSubmission">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('certificationSubmission')+$t('time')"
@change="dateChange({db_field_name:'certificationSubmission'})"
format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.certificationSubmission"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('certificationEnd')">
{{$t('certificationEnd')}}</span>
@@ -56,9 +56,9 @@
<span class="title-text-text" :title="$t('resultofhandling')">{{$t('resultofhandling')}}</span>
</div>
</div>
<a-form-model-item class="itemModel" :prop="'disposeResult'">
<a-form-model-item class="itemModel" :prop="'flag'">
<a-radio-group class="box-input"
v-model="formInline.disposeResult">
v-model="formInline.flag">
<a-radio value="Accepted" v-if="titleName == $t('Taskresponsibilityrecognition')">
{{$t('accept')}}
</a-radio>
@@ -130,6 +130,7 @@
import uploadFile from '@/components/uploadFile/file'
import { getAction, postAction, putAction, deleteAction } from '@/api/manage'
import { mapGetters } from 'vuex'
import moment from 'moment'
export default {
name: 'confirmationDrawer',
@@ -226,12 +227,12 @@
],
processableList: [],
noProcessableList: [],
loading:false,
loading: false,
rules: {
disposeResult: [
flag: [
{
required: true,
message: this.$t('reviewResults') + this.$t('cannotEmpty'),
message: this.$t('resultofhandling') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
@@ -296,24 +297,37 @@
this.visible = false
},
determineClick() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
let query = {
userid: this.userInfo().id,
taskId: this.queryData.taskId || this.queryData.taskIds,
}
postAction('/workFlow/completeTask', query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.$emit('confirmationdrawerList')
} else {
this.loading = false
this.$message.warning(res.message)
if (this.processableList && this.processableList.length > 0) {
this.$refs.ruleForm.validate(valid => {
if (valid) {
this.loading = true
let taskIds = []
this.processableList.forEach(res => {
taskIds.push(res.taskId)
})
let handlingTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
let query = {
...this.formInline,
taskIds: taskIds.join(','),
userId: this.userInfo().id,
handlingTime: handlingTime
}
})
}
})
postAction('/workFlow/completeTaskBatch', query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.loading = false
this.$emit('confirmationdrawerList')
} else {
this.loading = false
this.$message.warning(this.$t('operationFailed'))
}
})
}
})
} else {
this.$message.warning(this.$t('thereAreCurrentlyNoRegulationsToHandle'))
}
},
clickButtonToUpload(item) {
this.$refs.uploadFile.perentHandleFunc()
@@ -120,7 +120,7 @@
disposeResult: [
{
required: true,
message: this.$t('reviewResults') + this.$t('cannotEmpty'),
message: this.$t('resultofhandling') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
@@ -159,7 +159,6 @@
}
},
mounted() {
console.log(this.query)
this.formInline.approvalOpinion = ''
this.formInline = { ...this.formInline }
// this.query.isDisplay = JSON.parse(this.query.isDisplay)