Commit 07eaad86 authored by 15008242619's avatar 15008242619 Committed by jingnan

领用出库新增紧急领用

parent e330853f
......@@ -159,63 +159,63 @@ export default {
this.dialogVisible = true
},
confirm() {
let isUrgentUse = 0
this.selectionRows.forEach(item => {
if (item.typeName !== 'UrgentUse') {
isUrgentUse++
}
})
if (isUrgentUse === 0) {
// 紧急领用选人
let isUrgentUse = 0
this.selectionRows.forEach(item => {
if (item.typeName !== 'UrgentUse') {
isUrgentUse++
}
})
if (isUrgentUse === 0) {
// 紧急领用选人
this.dialogVisible = false
this.setPersonVisible = true
} else if (isUrgentUse === this.selectionRows.length) {
post('/DxWorkflowTask/apply/batchPass?applyIds=' + this.selectionRows.map(item => ({ 'taskId': item.processTaskId, 'pboId': item.id }))).then(res => {
this.$utils.showMessageSuccess('提交成功')
this.$refs.applyTable.$refs.asCom.getData()
}).catch(() => {
this.$utils.showMessageWarning('出现异常,提交失败')
}).finally(() => {
this.dialogVisible = false
this.setPersonVisible = true
} else if (isUrgentUse === this.selectionRows.length) {
post('/DxWorkflowTask/apply/batchPass?applyIds=' + this.selectionRows.map(item => ({ 'taskId': item.processTaskId, 'pboId': item.id }))).then(res => {
this.$utils.showMessageSuccess('提交成功')
})
} else {
this.dialogVisible = false
this.$utils.showMessageWarning('紧急领用不能和其他领用类型一起提交')
}
},
cancle() {
this.dialogVisible = false
},
setPersonConfirm() {
const ids = []
if (this.selectionRows && this.selectionRows.length) {
this.selectionRows.forEach(item => ids.push(item.id))
}
if (this.form.userIds && this.form.userIds.length !== 0) {
post('/OutStorageRequest/creator/batchApply?userIds=' + this.form.userIds, ids).then(res => {
this.$utils.showMessageSuccess('提交成功')
setTimeout(() => {
this.$refs.applyTable.$refs.asCom.getData()
}).catch(() => {
this.$utils.showMessageWarning('出现异常,提交失败')
}).finally(() => {
this.dialogVisible = false
})
} else {
}, 1500)
}).catch(err => {
this.$utils.showMessageWarning('出现异常,提交失败')
console.log(err)
}).finally(() => {
this.dialogVisible = false
this.$utils.showMessageWarning('紧急领用不能和其他领用类型一起提交')
}
},
cancle() {
this.dialogVisible = false
},
setPersonConfirm() {
const ids = []
if (this.selectionRows && this.selectionRows.length) {
this.selectionRows.forEach(item => ids.push(item.id))
}
if (this.form.userIds && this.form.userIds.length !== 0) {
post('/OutStorageRequest/creator/batchApply?userIds=' + this.form.userIds, ids).then(res => {
this.$utils.showMessageSuccess('提交成功')
setTimeout(() => {
this.$refs.applyTable.$refs.asCom.getData()
}, 1500)
}).catch(err => {
this.$utils.showMessageWarning('出现异常,提交失败')
console.log(err)
}).finally(() => {
this.dialogVisible = false
this.setPersonVisible = false
this.$set(this.form, 'userIds', '')
})
} else {
this.$utils.showMessageWarning('请选择审批领导')
}
},
setPersonCancle() {
this.setPersonVisible = false
this.$set(this.form, 'userIds', '')
},
selectionChange(val) {
this.selectionRows = val
this.setPersonVisible = false
this.$set(this.form, 'userIds', '')
})
} else {
this.$utils.showMessageWarning('请选择审批领导')
}
},
setPersonCancle() {
this.setPersonVisible = false
this.$set(this.form, 'userIds', '')
},
selectionChange(val) {
this.selectionRows = val
}
}
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment