考勤明细批量修改 提示问题修改
This commit is contained in:
parent
eb6d05e514
commit
83cb38d33d
|
|
@ -740,16 +740,18 @@ export default {
|
|||
let paramList = []
|
||||
let hasError = false
|
||||
let hasChanges = false;
|
||||
|
||||
this.dialogList.forEach((newItem, index) => {
|
||||
let isErrorMsg = '';
|
||||
this.dialogList.some((newItem, index) => {
|
||||
const oldItem = this.dialogListOld[index]
|
||||
// 检查toWorkAttCurrentTime或toWorkAttStatus是否改变
|
||||
if ((newItem.toWorkAttCurrentTime !== oldItem.toWorkAttCurrentTime || newItem.toWorkAttStatus !== oldItem.toWorkAttStatus) &&
|
||||
(!newItem.toErrorRemake || newItem.toErrorRemake === '' || !this.hasAttachments(newItem.filesVoList, '1') )) {
|
||||
hasError = true
|
||||
this.$message({ message: '上班时间或状态改变时,原因说明、附件不能为空!', type: 'warning' })
|
||||
// this.$message({ message: '上班时间或状态改变时,原因说明、附件不能为空!', type: 'warning' })
|
||||
isErrorMsg = '上班时间或状态改变时,原因说明、附件不能为空!';
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
if(newItem.toErrorRemake!=""&&this.hasAttachments(newItem.filesVoList, '1')){
|
||||
hasChanges = true
|
||||
}
|
||||
|
|
@ -758,7 +760,9 @@ export default {
|
|||
if ((newItem.offWorkAttCurrentTime !== oldItem.offWorkAttCurrentTime || newItem.offWorkAttStatus !== oldItem.offWorkAttStatus) &&
|
||||
(!newItem.offErrorRemake || newItem.offErrorRemake === '' || !this.hasAttachments(newItem.filesVoList, '2') )) {
|
||||
hasError = true
|
||||
this.$message({ message: '下班时间或状态改变时,原因说明、附件不能为空!', type: 'warning' })
|
||||
// this.$message({ message: '下班时间或状态改变时,原因说明、附件不能为空!', type: 'warning' })
|
||||
isErrorMsg = '下班时间或状态改变时,原因说明、附件不能为空!';
|
||||
return true;
|
||||
}
|
||||
|
||||
if(newItem.offErrorRemake!=""&&this.hasAttachments(newItem.filesVoList, '2')){
|
||||
|
|
@ -783,6 +787,9 @@ export default {
|
|||
paramList.push(obj)
|
||||
}
|
||||
})
|
||||
if(isErrorMsg){
|
||||
return this.$message({ message: isErrorMsg, type: 'warning' })
|
||||
}
|
||||
console.log("aa=",paramList)
|
||||
if(!hasChanges){
|
||||
this.$message({ message: '没有数据变化,无需更新!', type: 'info' });
|
||||
|
|
|
|||
Loading…
Reference in New Issue