修改禅道bug
This commit is contained in:
@@ -901,7 +901,9 @@
|
||||
]
|
||||
},
|
||||
detailedSuccessList: [],
|
||||
detailedWarningList: []
|
||||
detailedWarningList: [],
|
||||
rowKeysSuccessList:[],
|
||||
rowKeysWarningList:[],
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1623,53 +1625,100 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
this.rowKeysSuccessList = []
|
||||
this.rowKeysWarningList = []
|
||||
for (let i = 0; i < dataSource.length; i++) {
|
||||
if (dataSource[i].inventoryAffirmStatus == 'List to confirm') {
|
||||
if (dataSource[i].roleCode == 1 && dataSource[i].regulationOwnerSubmitStatus) {
|
||||
isTrue = false
|
||||
this.$message.warning(this.$t('The') + (i + 1) + this.$t('submitted'))
|
||||
return
|
||||
|
||||
this.rowKeysWarningList.push( < div > { dataSource[i].serialNumber + this.$t('submitted') } < /div>)
|
||||
continue
|
||||
// isTrue = false
|
||||
// this.$message.warning(dataSource[i].serialNumber + this.$t('submitted'))
|
||||
// return
|
||||
} else if (dataSource[i].roleCode == 2 && dataSource[i].homologationEngineerSubmitStatus) {
|
||||
isTrue = false
|
||||
this.$message.warning(this.$t('The') + (i + 1) + this.$t('submitted'))
|
||||
return
|
||||
|
||||
this.rowKeysWarningList.push( < div > { dataSource[i].serialNumber + this.$t('submitted') } < /div>)
|
||||
continue
|
||||
// isTrue = false
|
||||
// this.$message.warning(dataSource[i].serialNumber + this.$t('submitted'))
|
||||
// return
|
||||
} else if (dataSource[i].roleCode == 4 && (dataSource[i].homologationEngineerSubmitStatus && dataSource[i].regulationOwnerSubmitStatus)) {
|
||||
isTrue = false
|
||||
this.$message.warning(this.$t('The') + (i + 1) + this.$t('submitted'))
|
||||
return
|
||||
|
||||
this.rowKeysWarningList.push( < div > { dataSource[i].serialNumber + this.$t('submitted') } < /div>)
|
||||
continue
|
||||
// isTrue = false
|
||||
// this.$message.warning(dataSource[i].serialNumber + this.$t('submitted'))
|
||||
// return
|
||||
}
|
||||
if((dataSource[i].designInitiatorId == dataSource[i].regulationOwnerId
|
||||
&& dataSource[i].designInitiatorId == this.userInfo().id) ||
|
||||
(dataSource[i].designInitiatorId == dataSource[i].homologationEngineerId
|
||||
&& dataSource[i].designInitiatorId == this.userInfo().id)){
|
||||
if(!dataSource[i].designDutyId || !dataSource[i].designDueDate){
|
||||
this.rowKeysWarningList.push( < div > { dataSource[i].serialNumber+this.$t('confirmationOfDesignConformity') + this.$t('theResponsiblePersonAndDeadlineClank') } < /div>)
|
||||
continue
|
||||
}
|
||||
}
|
||||
if((dataSource[i].prehomoInitiatorId == dataSource[i].regulationOwnerId
|
||||
&& dataSource[i].prehomoInitiatorId == this.userInfo().id) ||
|
||||
(dataSource[i].prehomoInitiatorId == dataSource[i].homologationEngineerId
|
||||
&& dataSource[i].prehomoInitiatorId == this.userInfo().id)){
|
||||
if(!dataSource[i].prehomoDutyId || !dataSource[i].prehomoDueDate){
|
||||
this.rowKeysWarningList.push( < div > { dataSource[i].serialNumber+this.$t('PrehomoConfirmation') + this.$t('theResponsiblePersonAndDeadlineClank') } < /div>)
|
||||
continue
|
||||
}
|
||||
}
|
||||
if((dataSource[i].verifyInitiatorId == dataSource[i].regulationOwnerId
|
||||
&& dataSource[i].verifyInitiatorId == this.userInfo().id) ||
|
||||
(dataSource[i].verifyInitiatorId == dataSource[i].homologationEngineerId
|
||||
&& dataSource[i].verifyInitiatorId == this.userInfo().id)){
|
||||
if(!dataSource[i].verifyDutyId || !dataSource[i].verifyDueDate){
|
||||
this.rowKeysWarningList.push( < div > { dataSource[i].serialNumber+this.$t('verificationAndConformityconfirmation') + this.$t('theResponsiblePersonAndDeadlineClank') } < /div>)
|
||||
continue
|
||||
}
|
||||
}
|
||||
this.rowKeysSuccessList.push(dataSource[i])
|
||||
|
||||
} else {
|
||||
isTrue = false
|
||||
this.$message.warning(this.$t('The') + (i + 1) + this.$t('incorrectsubmitted'))
|
||||
return
|
||||
this.rowKeysWarningList.push( < div > { dataSource[i].serialNumber + this.$t('incorrectsubmitted') } < /div>)
|
||||
// isTrue = false
|
||||
// this.$message.warning(dataSource[i].serialNumber+ this.$t('incorrectsubmitted'))
|
||||
// return
|
||||
}
|
||||
}
|
||||
if (isTrue) {
|
||||
callBack()
|
||||
|
||||
if (this.rowKeysSuccessList && this.rowKeysSuccessList.length > 0) {
|
||||
callBack && callBack()
|
||||
}else{
|
||||
let that = this
|
||||
this.$warning({
|
||||
content: (
|
||||
< div >
|
||||
{ that.rowKeysWarningList }
|
||||
< /div>
|
||||
)
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
updateStatusBatch(num, selectedRowKeys) {
|
||||
let _this = this
|
||||
let lawsInventoryList = []
|
||||
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.rowKeysSuccessList.length; i++) {
|
||||
let roleCode
|
||||
if (this.dataSource[i].regulationOwnerId == this.userInfo().id &&
|
||||
this.dataSource[i].homologationEngineerId == this.userInfo().id) {
|
||||
if (this.rowKeysSuccessList[i].regulationOwnerId == this.userInfo().id &&
|
||||
this.rowKeysSuccessList[i].homologationEngineerId == this.userInfo().id) {
|
||||
roleCode = 4
|
||||
} else if (this.dataSource[i].regulationOwnerId == this.userInfo().id) {
|
||||
} else if (this.rowKeysSuccessList[i].regulationOwnerId == this.userInfo().id) {
|
||||
roleCode = 1
|
||||
} else if (this.dataSource[i].homologationEngineerId == this.userInfo().id) {
|
||||
} else if (this.rowKeysSuccessList[i].homologationEngineerId == this.userInfo().id) {
|
||||
roleCode = 2
|
||||
}
|
||||
lawsInventoryList.push({
|
||||
id: this.dataSource[i].id,
|
||||
id: this.rowKeysSuccessList[i].id,
|
||||
roleCode: roleCode
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
let query = {
|
||||
operatorType: 1,
|
||||
@@ -1688,6 +1737,18 @@
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
_this.confirmLoading = false
|
||||
}
|
||||
if(this.rowKeysWarningList && this.rowKeysWarningList.length > 0){
|
||||
let that = this
|
||||
this.$warning({
|
||||
content: (
|
||||
< div >
|
||||
{ that.rowKeysWarningList }
|
||||
< /div>
|
||||
)
|
||||
})
|
||||
}
|
||||
this.rowKeysWarningList = []
|
||||
this.rowKeysSuccessList = []
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user