|
|
|
@ -57,20 +57,21 @@ const taskDetailInfo = ref<any>({})
|
|
|
|
|
const taskDetailPictureList = ref<any[]>([])
|
|
|
|
|
let processItems: any[] = []
|
|
|
|
|
|
|
|
|
|
// states:1未提交,2待审批,3通过,4不通过
|
|
|
|
|
function validate(items: any[]) {
|
|
|
|
|
if (items.length === 0)
|
|
|
|
|
return '至少选中一个任务'
|
|
|
|
|
|
|
|
|
|
for (const item of items) {
|
|
|
|
|
// const { iztrueorfalse, history, states } = item
|
|
|
|
|
// if (iztrueorfalse !== null)
|
|
|
|
|
// return '存在已经辨识过的任务'
|
|
|
|
|
const { iztrueorfalse, history, states } = item
|
|
|
|
|
if (iztrueorfalse !== null)
|
|
|
|
|
return '未判别真假'
|
|
|
|
|
|
|
|
|
|
else if (states !== 2)
|
|
|
|
|
return '审批状态不合法'
|
|
|
|
|
|
|
|
|
|
// else if (history)
|
|
|
|
|
// return '包含历史数据'
|
|
|
|
|
|
|
|
|
|
// else if (states !== 1 && states !== 2)
|
|
|
|
|
// return '审批状态不合法'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return null
|
|
|
|
@ -123,14 +124,14 @@ function rejectHandler() {
|
|
|
|
|
|
|
|
|
|
function approval() {
|
|
|
|
|
const formIds: string[] = processItems.map(item => item.id)
|
|
|
|
|
const taskIds: string[] = processItems.map(item => item.taskid)
|
|
|
|
|
const tasknames: string[] = processItems.map(item => item.taskname)
|
|
|
|
|
const taskIds: string[] = processItems.map(item => item.taskId)
|
|
|
|
|
const tasknames: string[] = processItems.map(item => item.buessinessno)
|
|
|
|
|
|
|
|
|
|
const param: ApprovalParam = {
|
|
|
|
|
formid: formIds,
|
|
|
|
|
taskId: taskIds,
|
|
|
|
|
approvd: true,
|
|
|
|
|
taskComment: '',
|
|
|
|
|
taskComment: 'approval',
|
|
|
|
|
taskname: tasknames,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -139,8 +140,8 @@ function approval() {
|
|
|
|
|
|
|
|
|
|
function reject(idOrDesc: string, backId: string, isOther: boolean) {
|
|
|
|
|
const formIds: string[] = processItems.map(item => item.id)
|
|
|
|
|
const taskIds: string[] = processItems.map(item => item.taskid)
|
|
|
|
|
const tasknames: string[] = processItems.map(item => item.taskname)
|
|
|
|
|
const taskIds: string[] = processItems.map(item => item.taskId)
|
|
|
|
|
const tasknames: string[] = processItems.map(item => item.buessinessno)
|
|
|
|
|
|
|
|
|
|
const param: ApprovalParam = {
|
|
|
|
|
formid: formIds,
|
|
|
|
|