对接认证清单
This commit is contained in:
@@ -186,13 +186,15 @@
|
||||
</div>
|
||||
|
||||
<!-- 发起任务-->
|
||||
<div @click="initiatingProcessClick" v-if="roleSwitchingCode == 2" class="operator-text">
|
||||
<div @click="initiatingProcessClick('rzgcsjsrw',$t('confirmLaunchTask'))"
|
||||
v-if="roleSwitchingCode == 2" class="operator-text">
|
||||
<a-icon type="check-circle"/>
|
||||
{{ $t('initiateTask') }}
|
||||
</div>
|
||||
|
||||
<!-- 退回至Studio-->
|
||||
<div @click="returnToStudioClick" v-if="roleSwitchingCode == 2" class="operator-text">
|
||||
<div @click="returnToStudioClick('rzgcsthrw',$t('areYouReturnToStudio'))"
|
||||
v-if="roleSwitchingCode == 2" class="operator-text">
|
||||
<a-icon type="close-circle"/>
|
||||
{{ $t('returnToStudio') }}
|
||||
</div>
|
||||
@@ -1032,14 +1034,6 @@
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
//发起流程
|
||||
initiatingProcessClick() {
|
||||
|
||||
},
|
||||
//退回至Studio
|
||||
returnToStudioClick() {
|
||||
|
||||
},
|
||||
//审批通过
|
||||
ApprovedClick() {
|
||||
@@ -1095,24 +1089,90 @@
|
||||
item.roleCode = this.roleSwitchingCode
|
||||
this.$refs.TaskListModelRef.getData(item, this.$t('CertificationProgress'))
|
||||
},
|
||||
submitTask(value) {
|
||||
//发起流程
|
||||
initiatingProcessClick(value, prompt) {
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||||
let query = {
|
||||
'nodeKey': value,
|
||||
'projectLibraryId': this.$route.query.id,
|
||||
'ids': selectedRowKeys.join(',')
|
||||
}
|
||||
postAction('/project/projectCertificationInventoryEO/submitTask', query).then((res) => {
|
||||
if (res.success) {
|
||||
|
||||
let ids = []
|
||||
let notConditions = []
|
||||
for (let i = 0; i < this.selectedRowKeysList.length; i++) {
|
||||
if (this.selectedRowKeysList[i].flowStatus == 'List to be checked' ||
|
||||
this.selectedRowKeysList[i].flowStatus == 'Refusal of responsible person') {
|
||||
ids.push(this.selectedRowKeysList[i].id)
|
||||
} else {
|
||||
|
||||
notConditions.push(this.selectedRowKeysList[i].serialNumber)
|
||||
}
|
||||
})
|
||||
}
|
||||
let data = ''
|
||||
if (notConditions && notConditions.length > 0) {
|
||||
data = this.$t('standardNo') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyProcessReturned')
|
||||
}
|
||||
if (ids && ids.length > 0) {
|
||||
this.submitTask(value, prompt, ids, notConditions, data)
|
||||
} else {
|
||||
this.failedMessage(data)
|
||||
}
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
//退回至Studio
|
||||
returnToStudioClick(value, prompt) {
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
let ids = []
|
||||
let notConditions = []
|
||||
for (let i = 0; i < this.selectedRowKeysList.length; i++) {
|
||||
if (this.selectedRowKeysList[i].flowStatus == 'List to be checked' ||
|
||||
this.selectedRowKeysList[i].flowStatus == 'Refusal of responsible person') {
|
||||
ids.push(this.selectedRowKeysList[i].id)
|
||||
} else {
|
||||
notConditions.push(this.selectedRowKeysList[i].serialNumber)
|
||||
}
|
||||
}
|
||||
let data = ''
|
||||
if (notConditions && notConditions.length > 0) {
|
||||
data = this.$t('standardNo') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyProcessStatusReturned')
|
||||
}
|
||||
if (ids && ids.length > 0) {
|
||||
this.submitTask(value, prompt, ids, notConditions, data)
|
||||
} else {
|
||||
this.failedMessage(data)
|
||||
}
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
failedMessage(data) {
|
||||
let detailedWarningList = []
|
||||
detailedWarningList.push(data)
|
||||
this.$warning({
|
||||
content: ( < div > { detailedWarningList } < /div>)
|
||||
})
|
||||
},
|
||||
submitTask(value, prompt, ids, notConditions, data) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: prompt,
|
||||
onOk() {
|
||||
let query = {
|
||||
'nodeKey': value,
|
||||
'projectLibraryId': _this.$route.query.id,
|
||||
'ids': ids.join(',')
|
||||
}
|
||||
postAction('/project/projectCertificationInventoryEO/submitTask', query).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.getList()
|
||||
_this.selectedRowKeys = []
|
||||
_this.selectedRowKeysList = []
|
||||
if (notConditions && notConditions.length > 0) {
|
||||
_this.failedMessage(data)
|
||||
}
|
||||
} else {
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user