对接握手流程

This commit is contained in:
qq787203167
2022-04-25 14:53:26 +08:00
parent 00eb482248
commit 9948b7b3ff
3 changed files with 181 additions and 85 deletions
+51 -50
View File
@@ -662,58 +662,59 @@ module.exports = {
alteration: 'alteration', alteration: 'alteration',
fixedPlate: 'Fixed plate', fixedPlate: 'Fixed plate',
taskAffirmStatus: 'task Affirm Status', taskAffirmStatus: 'task Affirm Status',
listConfirmationStatus:'List confirmation status', listConfirmationStatus: 'List confirmation status',
ListConfirmationDeadline:'List confirmation deadline', ListConfirmationDeadline: 'List confirmation deadline',
dataConfirmation:'Please select the data whose list confirmation status is not initiated or rejected, and the regulatory engineer and certification engineer are not empty', dataConfirmation: 'Please select the data whose list confirmation status is not initiated or rejected, and the regulatory engineer and certification engineer are not empty',
pleaseSelectPersonFirst:'Please select a person first', pleaseSelectPersonFirst: 'Please select a person first',
onlyOnePersonCanBeSelected:'Only one person can be selected', onlyOnePersonCanBeSelected: 'Only one person can be selected',
overrule:'overrule', overrule: 'overrule',
confirmSubmit:'confirm Submit', confirmSubmit: 'confirm Submit',
confirmOverrule:'confirm Overrule', confirmOverrule: 'confirm Overrule',
The:'The', The: 'The',
submitted:'Data has been submitted and cannot be submitted again', submitted: 'Data has been submitted and cannot be submitted again',
basicInformationOfParameters:'Basic information of parameters', basicInformationOfParameters: 'Basic information of parameters',
regulatoryCertificationTaskPlan:'Regulatory / certification task plan', regulatoryCertificationTaskPlan: 'Regulatory / certification task plan',
bringInRelevantPersonnel:'Bring in relevant personnel', bringInRelevantPersonnel: 'Bring in relevant personnel',
confirmBringInRelevantPersonnel:'confirm Bring in relevant personnel', confirmBringInRelevantPersonnel: 'confirm Bring in relevant personnel',
problemType:'Problem type', problemType: 'Problem type',
projectDetails:'Project details', projectDetails: 'Project details',
listOfRegulations:'List of regulations', listOfRegulations: 'List of regulations',
taskList:'Task list', taskList: 'Task list',
TaskParameterCollection:'Task parameter collection', TaskParameterCollection: 'Task parameter collection',
nonConformance:'Non conformance', nonConformance: 'Non conformance',
deadlineForConfirmationOfDesignCompliance:'Deadline for confirmation of design compliance', deadlineForConfirmationOfDesignCompliance: 'Deadline for confirmation of design compliance',
prehomoConfirmationDeadline:'Prehomo confirmation deadline', prehomoConfirmationDeadline: 'Prehomo confirmation deadline',
verificationComplianceConfirmationDeadline:'Verification compliance confirmation deadline', verificationComplianceConfirmationDeadline: 'Verification compliance confirmation deadline',
pleaseEnterTheCorrectWebAddress:'Please enter the correct web address', pleaseEnterTheCorrectWebAddress: 'Please enter the correct web address',
updateTime:'update Time', updateTime: 'update Time',
comment:'comment', comment: 'comment',
historicalVersion:'Historical version', historicalVersion: 'Historical version',
versionName:'Version name', versionName: 'Version name',
finalizationTime:'Finalization time', finalizationTime: 'Finalization time',
setting:'setting', setting: 'setting',
incorrectsubmitted:'The data status is incorrect; Only data with status to be confirmed can be submitted', incorrectsubmitted: 'The data status is incorrect; Only data with status to be confirmed can be submitted',
date:'date', date: 'date',
time:'time', time: 'time',
uploadMaximumATime:'upload a maximum of 20 images at a time', uploadMaximumATime: 'upload a maximum of 20 images at a time',
confirmationOfRegulationsList:'Confirmation of regulations list', confirmationOfRegulationsList: 'Confirmation of regulations list',
regulatoryTaskConfirmation:'Regulatory task confirmation', regulatoryTaskConfirmation: 'Regulatory task confirmation',
certificationStart:'Certification start', certificationStart: 'Certification start',
certificationEnd:'Certification end', certificationEnd: 'Certification end',
directoryName:'Directory name', directoryName: 'Directory name',
batch:'batch', batch: 'batch',
uploadTime:'Upload time', uploadTime: 'Upload time',
enclosure:'enclosure', enclosure: 'enclosure',
// 认证 // 认证
parameterTemplate: 'parameter Template', parameterTemplate: 'parameter Template',
contentDescription: 'content Description', contentDescription: 'content Description',
circulationInformation:'Circulation information', circulationInformation: 'Circulation information',
circulationHistory:'circulation History', circulationHistory: 'circulation History',
agree:'agree', agree: 'agree',
disagree:'disagree', disagree: 'disagree',
feedbackMessage:'Feedback Message', feedbackMessage: 'Feedback Message',
result:'result', result: 'result',
opinion:'opinion', opinion: 'opinion',
operationNode:'operation node', operationNode: 'operation node',
taskDataConfirmation: 'Please select the data whose list confirmation status is accepted and task confirmation status is not initiated or rejected, and the regulatory engineer and certification engineer are not empty'
} }
+1
View File
@@ -669,6 +669,7 @@ module.exports = {
listConfirmationStatus:'清单确认状态', listConfirmationStatus:'清单确认状态',
ListConfirmationDeadline:'清单确认截止时间', ListConfirmationDeadline:'清单确认截止时间',
dataConfirmation:'请选择清单确认状态为未发起或拒绝的数据,以及法规工程师认证工程师不为空', dataConfirmation:'请选择清单确认状态为未发起或拒绝的数据,以及法规工程师认证工程师不为空',
taskDataConfirmation:'请选择清单确认状态为接受及任务确认状态为未发起或拒绝的数据,以及法规工程师认证工程师不为空',
pleaseSelectPersonFirst:'请先选择人员', pleaseSelectPersonFirst:'请先选择人员',
onlyOnePersonCanBeSelected:'只能选择一个人员', onlyOnePersonCanBeSelected:'只能选择一个人员',
overrule:'驳回', overrule:'驳回',
@@ -46,11 +46,11 @@
</div> </div>
<div class="table-operator"> <div class="table-operator">
<div style="float: left;margin-bottom: 19px;margin-left: 20px" v-if="isDisplay"> <div style="float: left;margin-bottom: 19px;margin-left: 20px" v-if="isDisplay">
<div class="operator-text" @click="initiateListConfirmationcClick"> <div class="operator-text" @click="initiateListConfirmationcClick('清单')">
<a-icon type="solution"/> <a-icon type="solution"/>
{{ $t('initiateListConfirmation') }} {{ $t('initiateListConfirmation') }}
</div> </div>
<div class="operator-text"> <div class="operator-text" @click="initiateTaskConfirmationClick('任务')">
<a-icon type="file-protect"/> <a-icon type="file-protect"/>
{{ $t('initiateTaskConfirmation') }} {{ $t('initiateTaskConfirmation') }}
</div> </div>
@@ -202,7 +202,7 @@
<span class="title-text-text" <span class="title-text-text"
:title="$t('TaskCutOffTime')">{{ $t('TaskCutOffTime') }}</span> :title="$t('TaskCutOffTime')">{{ $t('TaskCutOffTime') }}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="inventoryAffirmDueDate"> <a-form-model-item v-if="this.timeName == '清单'" class="itemModel" prop="inventoryAffirmDueDate">
<a-date-picker class="box-input" <a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('TaskCutOffTime')" :placeholder="$t('PleaseSelect')+$t('TaskCutOffTime')"
@change="dateChange({db_field_name:'inventoryAffirmDueDate'})" @change="dateChange({db_field_name:'inventoryAffirmDueDate'})"
@@ -210,6 +210,14 @@
v-model="formInline.inventoryAffirmDueDate" v-model="formInline.inventoryAffirmDueDate"
style="width: 100%"/> style="width: 100%"/>
</a-form-model-item> </a-form-model-item>
<a-form-model-item v-else-if="this.timeName == '任务'" class="itemModel" prop="taskAffirmDueDate">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('TaskCutOffTime')"
@change="dateChange({db_field_name:'taskAffirmDueDate'})"
format="YYYY-MM-DD"
v-model="formInline.taskAffirmDueDate"
style="width: 100%"/>
</a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@@ -485,6 +493,7 @@
} }
], ],
visibleFile: false, visibleFile: false,
timeName: '',
dataSourceFile: [], dataSourceFile: [],
confirmLoading: false, confirmLoading: false,
queryParamQuery: {}, queryParamQuery: {},
@@ -499,6 +508,13 @@
message: this.$t('TaskCutOffTime') + this.$t('cannotEmpty'), message: this.$t('TaskCutOffTime') + this.$t('cannotEmpty'),
trigger: 'change' trigger: 'change'
} }
],
taskAffirmDueDate: [
{
required: true,
message: this.$t('TaskCutOffTime') + this.$t('cannotEmpty'),
trigger: 'change'
}
] ]
}, },
queryParam: {}, queryParam: {},
@@ -711,22 +727,57 @@
getPersonnelList() { getPersonnelList() {
this.getList() this.getList()
}, },
initiateListConfirmationcClick() { initiateListConfirmationcClick(name) {
this.timeName = name
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
this.dataSource.forEach(res => { let isTrue = true
selectedRowKeys.forEach(val => { for (let i = 0; i < this.dataSource.length; i++) {
if (res.id == val) { for (let j = 0; j < selectedRowKeys.length; j++) {
if ((res.inventoryAffirmStatus == 'Not started' || res.inventoryAffirmStatus == 'rejected') && if (this.dataSource[i].id == selectedRowKeys[j]) {
res.homologationEngineerId && res.regulationOwnerId) { if ((this.dataSource.inventoryAffirmStatus == 'Not started' || this.dataSource.inventoryAffirmStatus == 'rejected') &&
this.visible = true this.dataSource.homologationEngineerId && this.dataSource.regulationOwnerId) {
this.formInline = {} isTrue = true
} else { } else {
this.$message.warning(this.$t('dataConfirmation')) this.$message.warning(this.$t('dataConfirmation'))
isTrue = false
return
} }
} }
}) }
}) }
if (isTrue) {
this.visible = true
this.formInline = {}
}
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
initiateTaskConfirmationClick(name) {
this.timeName = name
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let isTrue = true
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].taskAffirmStatus == 'Not started' || this.dataSource[i].taskAffirmStatus == 'rejected') &&
this.dataSource[i].homologationEngineerId && this.dataSource[i].regulationOwnerId
&& this.dataSource[i].inventoryAffirmStatus == 'accepted') {
isTrue = true
} else {
isTrue = false
this.$message.warning(this.$t('taskDataConfirmation'))
return
}
}
}
}
if (isTrue) {
this.visible = true
this.formInline = {}
}
} else { } else {
this.$message.warning(this.$t('selectLeastOne')) this.$message.warning(this.$t('selectLeastOne'))
} }
@@ -735,25 +786,68 @@
this.$refs.ruleForm.validate(valid => { this.$refs.ruleForm.validate(valid => {
if (valid) { if (valid) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let query = { if (this.timeName == '清单') {
operatorType: 0, let query = {
ids: selectedRowKeys.join(','), operatorType: 0,
projectLibraryId: this.$route.query.id, ids: selectedRowKeys.join(','),
...this.formInline projectLibraryId: this.$route.query.id,
} ...this.formInline
this.confirmLoading = true
getAction(this.url.updateStatusBatch, query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.selectedRowKeys = []
this.confirmLoading = false
this.getList()
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
} }
}) this.confirmLoading = true
getAction(this.url.updateStatusBatch, query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.selectedRowKeys = []
this.confirmLoading = false
this.getList()
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
}
})
} else {
for (let i = 0; i < this.dataSource.length; i++) {
for (let j = 0; j < selectedRowKeys.length; j++) {
if (this.dataSource[i].id == selectedRowKeys[j]) {
this.dataSource[i].taskAffirmDueDate = this.formInline.taskAffirmDueDate
Object.keys(this.dataSource[i]).forEach(res => {
if (this.dataSource[i][res] && this.dataSource[i][res] instanceof String) {
this.dataSource[i][res] = this.dataSource[i][res].replace(/\"/g, '“')
this.dataSource[i][res] = this.dataSource[i][res].replace(/\'/g, '')
}
})
let data = JSON.stringify(this.dataSource[i]).replace(/\"/g, '\'')
setTimeout(() => {
this.startProcess(data)
}, 500)
}
}
}
}
}
})
},
startProcess(value) {
let query = {
type: 1,
msg: JSON.stringify(value)
}
postAction('/workFlow/startProcess', query).then((res) => {
if (res.success) {
this.completeTask(value, res.result)
}
})
},
completeTask(value, taskId) {
let query = {
userid: this.userInfo().id,
taskId: taskId,
json: value
}
postAction('/workFlow/completeTask', query).then((res) => {
if (res.success) {
} }
}) })
}, },
@@ -766,20 +860,20 @@
if (this.dataSource[i].roleCode == 1 && this.dataSource[i].regulationOwnerSubmitStatus) { if (this.dataSource[i].roleCode == 1 && this.dataSource[i].regulationOwnerSubmitStatus) {
isTrue = false isTrue = false
this.$message.warning(this.$t('The') + (i + 1) + this.$t('submitted')) this.$message.warning(this.$t('The') + (i + 1) + this.$t('submitted'))
break return
} else if (this.dataSource[i].roleCode == 2 && this.dataSource[i].homologationEngineerSubmitStatus) { } else if (this.dataSource[i].roleCode == 2 && this.dataSource[i].homologationEngineerSubmitStatus) {
isTrue = false isTrue = false
this.$message.warning(this.$t('The') + (i + 1) + this.$t('submitted')) this.$message.warning(this.$t('The') + (i + 1) + this.$t('submitted'))
break return
} else if (this.dataSource[i].roleCode == 4 && (this.dataSource[i].homologationEngineerSubmitStatus && this.dataSource[i].regulationOwnerSubmitStatus)) { } else if (this.dataSource[i].roleCode == 4 && (this.dataSource[i].homologationEngineerSubmitStatus && this.dataSource[i].regulationOwnerSubmitStatus)) {
isTrue = false isTrue = false
this.$message.warning(this.$t('The') + (i + 1) + this.$t('submitted')) this.$message.warning(this.$t('The') + (i + 1) + this.$t('submitted'))
break return
} }
} else { } else {
isTrue = false isTrue = false
this.$message.warning(this.$t('The') + (i + 1) + this.$t('incorrectsubmitted')) this.$message.warning(this.$t('The') + (i + 1) + this.$t('incorrectsubmitted'))
break return
} }
} }
} }