对接握手流程

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',
fixedPlate: 'Fixed plate',
taskAffirmStatus: 'task Affirm Status',
listConfirmationStatus:'List confirmation status',
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',
pleaseSelectPersonFirst:'Please select a person first',
onlyOnePersonCanBeSelected:'Only one person can be selected',
overrule:'overrule',
confirmSubmit:'confirm Submit',
confirmOverrule:'confirm Overrule',
The:'The',
submitted:'Data has been submitted and cannot be submitted again',
basicInformationOfParameters:'Basic information of parameters',
regulatoryCertificationTaskPlan:'Regulatory / certification task plan',
bringInRelevantPersonnel:'Bring in relevant personnel',
confirmBringInRelevantPersonnel:'confirm Bring in relevant personnel',
problemType:'Problem type',
projectDetails:'Project details',
listOfRegulations:'List of regulations',
taskList:'Task list',
TaskParameterCollection:'Task parameter collection',
nonConformance:'Non conformance',
deadlineForConfirmationOfDesignCompliance:'Deadline for confirmation of design compliance',
prehomoConfirmationDeadline:'Prehomo confirmation deadline',
verificationComplianceConfirmationDeadline:'Verification compliance confirmation deadline',
pleaseEnterTheCorrectWebAddress:'Please enter the correct web address',
updateTime:'update Time',
comment:'comment',
historicalVersion:'Historical version',
versionName:'Version name',
finalizationTime:'Finalization time',
setting:'setting',
incorrectsubmitted:'The data status is incorrect; Only data with status to be confirmed can be submitted',
date:'date',
time:'time',
uploadMaximumATime:'upload a maximum of 20 images at a time',
listConfirmationStatus: 'List confirmation status',
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',
pleaseSelectPersonFirst: 'Please select a person first',
onlyOnePersonCanBeSelected: 'Only one person can be selected',
overrule: 'overrule',
confirmSubmit: 'confirm Submit',
confirmOverrule: 'confirm Overrule',
The: 'The',
submitted: 'Data has been submitted and cannot be submitted again',
basicInformationOfParameters: 'Basic information of parameters',
regulatoryCertificationTaskPlan: 'Regulatory / certification task plan',
bringInRelevantPersonnel: 'Bring in relevant personnel',
confirmBringInRelevantPersonnel: 'confirm Bring in relevant personnel',
problemType: 'Problem type',
projectDetails: 'Project details',
listOfRegulations: 'List of regulations',
taskList: 'Task list',
TaskParameterCollection: 'Task parameter collection',
nonConformance: 'Non conformance',
deadlineForConfirmationOfDesignCompliance: 'Deadline for confirmation of design compliance',
prehomoConfirmationDeadline: 'Prehomo confirmation deadline',
verificationComplianceConfirmationDeadline: 'Verification compliance confirmation deadline',
pleaseEnterTheCorrectWebAddress: 'Please enter the correct web address',
updateTime: 'update Time',
comment: 'comment',
historicalVersion: 'Historical version',
versionName: 'Version name',
finalizationTime: 'Finalization time',
setting: 'setting',
incorrectsubmitted: 'The data status is incorrect; Only data with status to be confirmed can be submitted',
date: 'date',
time: 'time',
uploadMaximumATime: 'upload a maximum of 20 images at a time',
confirmationOfRegulationsList:'Confirmation of regulations list',
regulatoryTaskConfirmation:'Regulatory task confirmation',
certificationStart:'Certification start',
certificationEnd:'Certification end',
directoryName:'Directory name',
batch:'batch',
uploadTime:'Upload time',
enclosure:'enclosure',
confirmationOfRegulationsList: 'Confirmation of regulations list',
regulatoryTaskConfirmation: 'Regulatory task confirmation',
certificationStart: 'Certification start',
certificationEnd: 'Certification end',
directoryName: 'Directory name',
batch: 'batch',
uploadTime: 'Upload time',
enclosure: 'enclosure',
// 认证
parameterTemplate: 'parameter Template',
contentDescription: 'content Description',
circulationInformation:'Circulation information',
circulationHistory:'circulation History',
agree:'agree',
disagree:'disagree',
feedbackMessage:'Feedback Message',
result:'result',
opinion:'opinion',
operationNode:'operation node',
circulationInformation: 'Circulation information',
circulationHistory: 'circulation History',
agree: 'agree',
disagree: 'disagree',
feedbackMessage: 'Feedback Message',
result: 'result',
opinion: 'opinion',
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:'清单确认状态',
ListConfirmationDeadline:'清单确认截止时间',
dataConfirmation:'请选择清单确认状态为未发起或拒绝的数据,以及法规工程师认证工程师不为空',
taskDataConfirmation:'请选择清单确认状态为接受及任务确认状态为未发起或拒绝的数据,以及法规工程师认证工程师不为空',
pleaseSelectPersonFirst:'请先选择人员',
onlyOnePersonCanBeSelected:'只能选择一个人员',
overrule:'驳回',
@@ -46,11 +46,11 @@
</div>
<div class="table-operator">
<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"/>
{{ $t('initiateListConfirmation') }}
</div>
<div class="operator-text">
<div class="operator-text" @click="initiateTaskConfirmationClick('任务')">
<a-icon type="file-protect"/>
{{ $t('initiateTaskConfirmation') }}
</div>
@@ -202,7 +202,7 @@
<span class="title-text-text"
:title="$t('TaskCutOffTime')">{{ $t('TaskCutOffTime') }}</span>
</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"
:placeholder="$t('PleaseSelect')+$t('TaskCutOffTime')"
@change="dateChange({db_field_name:'inventoryAffirmDueDate'})"
@@ -210,6 +210,14 @@
v-model="formInline.inventoryAffirmDueDate"
style="width: 100%"/>
</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>
</a-col>
</a-row>
@@ -485,6 +493,7 @@
}
],
visibleFile: false,
timeName: '',
dataSourceFile: [],
confirmLoading: false,
queryParamQuery: {},
@@ -499,6 +508,13 @@
message: this.$t('TaskCutOffTime') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
taskAffirmDueDate: [
{
required: true,
message: this.$t('TaskCutOffTime') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
},
queryParam: {},
@@ -711,22 +727,57 @@
getPersonnelList() {
this.getList()
},
initiateListConfirmationcClick() {
initiateListConfirmationcClick(name) {
this.timeName = name
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
this.dataSource.forEach(res => {
selectedRowKeys.forEach(val => {
if (res.id == val) {
if ((res.inventoryAffirmStatus == 'Not started' || res.inventoryAffirmStatus == 'rejected') &&
res.homologationEngineerId && res.regulationOwnerId) {
this.visible = true
this.formInline = {}
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.inventoryAffirmStatus == 'Not started' || this.dataSource.inventoryAffirmStatus == 'rejected') &&
this.dataSource.homologationEngineerId && this.dataSource.regulationOwnerId) {
isTrue = true
} else {
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 {
this.$message.warning(this.$t('selectLeastOne'))
}
@@ -735,25 +786,68 @@
this.$refs.ruleForm.validate(valid => {
if (valid) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let query = {
operatorType: 0,
ids: selectedRowKeys.join(','),
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
if (this.timeName == '清单') {
let query = {
operatorType: 0,
ids: selectedRowKeys.join(','),
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
}
})
} 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) {
isTrue = false
this.$message.warning(this.$t('The') + (i + 1) + this.$t('submitted'))
break
return
} else if (this.dataSource[i].roleCode == 2 && this.dataSource[i].homologationEngineerSubmitStatus) {
isTrue = false
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)) {
isTrue = false
this.$message.warning(this.$t('The') + (i + 1) + this.$t('submitted'))
break
return
}
} else {
isTrue = false
this.$message.warning(this.$t('The') + (i + 1) + this.$t('incorrectsubmitted'))
break
return
}
}
}