法规清单-撤回不符合的数据进行提示;

法规清单-法规工程师-不填写符合性流程的提示语
This commit is contained in:
范强强
2023-03-27 15:55:31 +08:00
parent 4ed528db12
commit 276fb7dd70
4 changed files with 57 additions and 28 deletions
+1
View File
@@ -1720,4 +1720,5 @@ module.exports = {
format:'It supports doc/docx/pdf format and is less than 50M in size', format:'It supports doc/docx/pdf format and is less than 50M in size',
cantTransferToYourself:"Can't transfer to yourself", cantTransferToYourself:"Can't transfer to yourself",
theDataYouInitiate:'The data you selected does not meet the process initiation criteria. Please recheck and initiate', theDataYouInitiate:'The data you selected does not meet the process initiation criteria. Please recheck and initiate',
dataWithProcessReleasedCannotBeReset:'Data with a process status of list to be released cannot be reset',
} }
+1
View File
@@ -1822,4 +1822,5 @@ module.exports = {
format:'支持doc/docx/pdf格式,大小50M以内', format:'支持doc/docx/pdf格式,大小50M以内',
cantTransferToYourself:"不能转办给自己", cantTransferToYourself:"不能转办给自己",
theDataYouInitiate:'您所选的数据,均不符合流程发起条件,请重新检查后发起', theDataYouInitiate:'您所选的数据,均不符合流程发起条件,请重新检查后发起',
dataWithProcessReleasedCannotBeReset:'流程状态为清单待发布的数据不能被重置',
} }
@@ -402,6 +402,7 @@
<SelectedBy ref="SelectedByRef" :isSingleChoice="true" <SelectedBy ref="SelectedByRef" :isSingleChoice="true"
:title="$t('turnToDo')" @SelectedByForm="SelectedByForm"></SelectedBy> :title="$t('turnToDo')" @SelectedByForm="SelectedByForm"></SelectedBy>
<viewFileModel ref="viewFileModelRef"/> <viewFileModel ref="viewFileModelRef"/>
<JLoading :loading="JTextLoading">{{ $t('Submitting') }}</JLoading>
<!-- <a-modal--> <!-- <a-modal-->
<!-- :title="listTitle"--> <!-- :title="listTitle"-->
<!-- :width="500"--> <!-- :width="500"-->
@@ -514,6 +515,7 @@
pageNo: 1, pageNo: 1,
pageSize: 50, pageSize: 50,
total: 0, total: 0,
JTextLoading: false,
CertificationColor: { CertificationColor: {
'Test passed': 'accordColor', 'Test passed': 'accordColor',
'Test failed': 'nonConformityColor', 'Test failed': 'nonConformityColor',
@@ -973,25 +975,49 @@
processResetClick() { processResetClick() {
let _this = this let _this = this
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.$confirm({ let ids = []
content: _this.$t('confirmResetProcess'), let notConditions = []
onOk() { for (let i = 0; i < this.selectedRowKeysList.length; i++) {
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys)) if (this.selectedRowKeysList[i].flowStatus == 'List to be released') {
postAction('/project/projectCertificationInventoryEO/resetFlow', { notConditions.push(this.selectedRowKeysList[i].inspectionItem)
ids: idList.join(','), } else {
projectLibraryId: _this.$route.query.id, ids.push(this.selectedRowKeysList[i].id)
operatorType: 'certificationInventoryStudioReset'
}).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = []
_this.getList()
} else {
_this.$message.warning(res.message)
}
})
} }
}) }
let data = ''
if (notConditions && notConditions.length > 0) {
data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('dataWithProcessReleasedCannotBeReset')
}
if (ids && ids.length > 0) {
this.$confirm({
content: _this.$t('confirmResetProcess'),
onOk() {
_this.JTextLoading = true
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
postAction('/project/projectCertificationInventoryEO/resetFlow', {
ids: idList.join(','),
projectLibraryId: _this.$route.query.id,
operatorType: 'certificationInventoryStudioReset'
}).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = []
_this.getList()
if (notConditions && notConditions.length > 0) {
_this.failedMessage(data)
}
_this.JTextLoading = false
} else {
_this.$message.warning(res.message)
_this.JTextLoading = false
}
})
}
})
} else {
this.failedMessage(data)
this.JTextLoading = false
}
} else { } else {
this.$message.warning(this.$t('selectLeastOne')) this.$message.warning(this.$t('selectLeastOne'))
} }
@@ -1689,19 +1689,20 @@
for (let i = 0; i < this.dataSource.length; i++) { for (let i = 0; i < this.dataSource.length; i++) {
for (let j = 0; j < selectedRowKeys.length; j++) { for (let j = 0; j < selectedRowKeys.length; j++) {
if (this.dataSource[i].id == selectedRowKeys[j]) { if (this.dataSource[i].id == selectedRowKeys[j]) {
content.push(this.dataSource[i]) // content.push(this.dataSource[i])
isTrue = true
} }
} }
} }
for (let i = 0; i < content.length; i++) { // for (let i = 0; i < content.length; i++) {
if (content[i].designFlowStatus == 'List to be released' && // if (content[i].designFlowStatus == 'List to be released' &&
content[i].verifyFlowStatus == 'List to be released') { // content[i].verifyFlowStatus == 'List to be released') {
isTrue = false // isTrue = false
//
} else { // } else {
isTrue = true // isTrue = true
} // }
} // }
if (isTrue) { if (isTrue) {
this.changeInterface(selectedRowKeys) this.changeInterface(selectedRowKeys)
} }