修改禅道已知bug

This commit is contained in:
qq787203167
2022-07-01 16:41:53 +08:00
parent b0178526e2
commit 5d04b64baa
@@ -840,7 +840,9 @@
trigger: 'change'
}
]
}
},
detailedSuccessList: [],
detailedWarningList: []
}
},
@@ -1279,28 +1281,41 @@
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let isTrue = true
this.detailedSuccessList = []
this.detailedWarningList = []
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].inventoryAffirmStatus == 'Not started' || this.dataSource[i].inventoryAffirmStatus == 'Rejected') {
if (this.dataSource[i].homologationEngineerId && this.dataSource[i].regulationOwnerId) {
isTrue = true
this.detailedSuccessList.push(this.dataSource[i])
} else {
this.$message.warning(this.dataSource[i].serialNumber + this.$t('TheEngineerAndCertification'))
isTrue = false
return
this.detailedWarningList.push(<div> {this.dataSource[i].serialNumber + this.$t('TheEngineerAndCertification') } </div>)
// this.$message.warning(this.dataSource[i].serialNumber + this.$t('TheEngineerAndCertification'))
// isTrue = false
// return
}
} else {
this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseSelectinitiatedOrRejected'))
isTrue = false
return
this.detailedWarningList.push(<div> {this.dataSource[i].serialNumber + ',' + this.$t('pleaseSelectinitiatedOrRejected') } </div>)
// this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseSelectinitiatedOrRejected'))
// isTrue = false
// return
}
}
}
}
if (isTrue) {
if (this.detailedSuccessList && this.detailedSuccessList.length > 0) {
this.visible = true
this.formInline = {}
}else{
let that = this
this.$warning({
content: (
< div >
{that.detailedWarningList}
< /div>
)
})
}
} else {
this.$message.warning(this.$t('selectLeastOne'))
@@ -1313,61 +1328,81 @@
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let isTrue = true
this.TaskSuccessList = []
this.TaskWarningList = []
let dataList = []
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].inventoryAffirmStatus == 'Accepted') {
if (this.dataSource[i].engineeringInterfacePerson) {
if (this.dataSource[i].verifyRemark) {
if (this.dataSource[i].verifyDueDate && this.dataSource[i].verifyDutyId
&& this.dataSource[i].verifyInitiatorId) {
isTrue = true
} else {
isTrue = false
this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseConformityVerification'))
return
}
}
if (this.dataSource[i].prehomoRemark) {
if (this.dataSource[i].prehomoDueDate && this.dataSource[i].prehomoDutyId
&& this.dataSource[i].prehomoInitiatorId) {
isTrue = true
} else {
isTrue = false
this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseConfirmedByPrehomo'))
return
}
}
if (this.dataSource[i].designRemark) {
if (this.dataSource[i].designDueDate && this.dataSource[i].designDutyId
&& this.dataSource[i].designInitiatorId) {
isTrue = true
} else {
isTrue = false
this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseDesignConformityConfirmation'))
return
}
}
} else {
isTrue = false
this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('theProjectContactEmpty'))
return
}
} else {
isTrue = false
this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('PleaseTaskConfirmationRejected'))
return
}
dataList.push(this.dataSource[i])
}
}
}
if (isTrue) {
for (let i = 0; i < dataList.length; i++) {
if ((dataList[i].taskAffirmStatus == 'Not started' || dataList.taskAffirmStatus == 'Rejected') &&
dataList[i].inventoryAffirmStatus == 'Accepted') {
if (dataList[i].engineeringInterfacePerson) {
if (dataList[i].verifyRemark) {
if (dataList[i].verifyDueDate && dataList[i].verifyDutyId
&& dataList[i].verifyInitiatorId) {
} else {
this.TaskWarningList.push(<div> {dataList[i].serialNumber + this.$t('pleaseConfirmedByPrehomo') } </div>)
continue;
// isTrue = false
// this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseConformityVerification'))
// return
}
}
if (dataList[i].prehomoRemark) {
if (dataList[i].prehomoDueDate && dataList[i].prehomoDutyId
&& dataList[i].prehomoInitiatorId) {
} else {
this.TaskWarningList.push(<div> {dataList[i].serialNumber + this.$t('pleaseConfirmedByPrehomo') } </div>)
continue;
// isTrue = false
// this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseConfirmedByPrehomo'))
// return
}
}
if (dataList[i].designRemark) {
if (dataList[i].designDueDate && dataList[i].designDutyId
&& dataList[i].designInitiatorId) {
} else {
this.TaskWarningList.push(<div> {dataList[i].serialNumber + this.$t('pleaseDesignConformityConfirmation') } </div>)
continue;
// isTrue = false
// this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseDesignConformityConfirmation'))
// return
}
}
this.TaskSuccessList.push(dataList[i])
} else {
this.TaskWarningList.push(<div> {dataList[i].serialNumber + this.$t('theProjectContactEmpty') } </div>)
// isTrue = false
// this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('theProjectContactEmpty'))
// return
}
} else {
this.TaskWarningList.push(<div> {dataList[i].serialNumber + this.$t('PleaseTaskConfirmationRejected') } </div>)
// isTrue = false
// this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('PleaseTaskConfirmationRejected'))
// return
}
}
if (this.TaskWarningList && this.TaskWarningList.length > 0) {
this.visible = true
this.formInline = {}
}else{
let that = this
this.$warning({
content: (
< div >
{that.TaskWarningList}
< /div>
)
})
}
} else {
this.$message.warning(this.$t('selectLeastOne'))
@@ -1377,8 +1412,11 @@
handleOk() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
if (this.timeName == '清单') {
let selectedRowKeys = []
this.detailedSuccessList.forEach(res => {
selectedRowKeys.push(res.id)
})
let query = {
operatorType: 0,
ids: selectedRowKeys.join(','),
@@ -1397,26 +1435,34 @@
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
}
let that = this
if (this.detailedWarningList.length > 0){
this.$warning({
content: (
< div >
{that.detailedWarningList}
< /div>
)
})
}
this.detailedSuccessList = []
this.detailedWarningList = []
})
} else {
let index = 0
for (let i = 0; i < this.dataSource.length; i++) {
for (let j = 0; j < selectedRowKeys.length; j++) {
if (this.dataSource[i].id == selectedRowKeys[j]) {
for (let i = 0; i < this.TaskSuccessList.length; i++) {
index++
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, '')
this.TaskSuccessList[i].taskAffirmDueDate = this.formInline.taskAffirmDueDate
Object.keys(this.TaskSuccessList[i]).forEach(res => {
if (this.TaskSuccessList[i][res] && this.TaskSuccessList[i][res] instanceof String) {
this.TaskSuccessList[i][res] = this.TaskSuccessList[i][res].replace(/\"/g, '“')
this.TaskSuccessList[i][res] = this.TaskSuccessList[i][res].replace(/\'/g, '')
}
})
setTimeout(() => {
this.confirmLoading = true
this.startProcess(this.dataSource[i], index)
this.startProcess(this.TaskSuccessList[i], index)
}, 500)
}
}
}
}
}
@@ -1449,12 +1495,22 @@
}
postAction('/workFlow/completeTask', query).then((res) => {
if (res.success) {
if (index == this.selectedRowKeys.length) {
if (index == this.TaskSuccessList.length) {
this.visible = false
this.selectedRowKeys = []
this.$message.success(this.$t('OperationSuccessful'))
this.confirmLoading = false
this.getList()
let that = this
if (this.TaskWarningList.length > 0){
this.$warning({
content: (
< div >
{that.TaskWarningList}
< /div>
)
})
}
}
} else {
this.$message.warning(this.$t('operationFailed'))