|
|
|
@ -171,7 +171,6 @@ async function getColumns() {
|
|
|
|
|
fixed: 'left',
|
|
|
|
|
width: 50,
|
|
|
|
|
disabled(row: any) {
|
|
|
|
|
console.log(row)
|
|
|
|
|
return row.states !== 2
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
@ -606,22 +605,6 @@ function actionHandler(action: any, row: any) {
|
|
|
|
|
function validate(items: any[]) {
|
|
|
|
|
if (items.length === 0)
|
|
|
|
|
return '至少选中一个任务'
|
|
|
|
|
|
|
|
|
|
// const useInfo = userStore.getUserInfo
|
|
|
|
|
// const username = useInfo.loginname
|
|
|
|
|
|
|
|
|
|
// for (const item of items) {
|
|
|
|
|
// const { iztrueorfalse, states, assignee } = item
|
|
|
|
|
// if (iztrueorfalse === null)
|
|
|
|
|
// return '未判别真假'
|
|
|
|
|
|
|
|
|
|
// else if (states !== 2)
|
|
|
|
|
// return '审批状态不合法'
|
|
|
|
|
|
|
|
|
|
// else if (assignee !== username)
|
|
|
|
|
// return '审批人不一致'
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
return null
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -670,6 +653,13 @@ function singleApproval(row) {
|
|
|
|
|
// 批量通过
|
|
|
|
|
function batchApproval() {
|
|
|
|
|
const items: any = getSelectItems()
|
|
|
|
|
const msg = validate(items)
|
|
|
|
|
|
|
|
|
|
if (msg !== null) {
|
|
|
|
|
message.error(msg)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
console.log(items)
|
|
|
|
|
const list: any = []
|
|
|
|
|
items.forEach((item) => {
|
|
|
|
|
list.push({
|
|
|
|
@ -688,17 +678,19 @@ function batchApproval() {
|
|
|
|
|
failCauseName: '',
|
|
|
|
|
flowTaskInfoList: list,
|
|
|
|
|
}
|
|
|
|
|
console.log(param)
|
|
|
|
|
reload()
|
|
|
|
|
checkedRowKeys.value = []
|
|
|
|
|
console.log(selectionIds.value)
|
|
|
|
|
// doAudit(param)
|
|
|
|
|
|
|
|
|
|
doAudit(param)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 批量不通过
|
|
|
|
|
function batchReject() {
|
|
|
|
|
const items: any = getSelectItems()
|
|
|
|
|
rejectHandler(items)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 审核不通过
|
|
|
|
|
function rejectHandler(list) {
|
|
|
|
|
const msg = validate(list)
|
|
|
|
|
|
|
|
|
|
if (msg !== null) {
|
|
|
|
|
message.error(msg)
|
|
|
|
|
return
|
|
|
|
@ -710,6 +702,8 @@ function rejectHandler(list) {
|
|
|
|
|
|
|
|
|
|
function reload() {
|
|
|
|
|
selectionIds.value = []
|
|
|
|
|
checkedRowKeys.value = []
|
|
|
|
|
|
|
|
|
|
const { page, pageSize } = unref(tableRef.value?.pagination) as PaginationProps
|
|
|
|
|
query(page!, pageSize!)
|
|
|
|
|
}
|
|
|
|
@ -766,13 +760,7 @@ function doAudit(param: any) {
|
|
|
|
|
小结查重
|
|
|
|
|
</NButton>
|
|
|
|
|
<div class="batch">
|
|
|
|
|
<NButton text @click="setBatch(false)">
|
|
|
|
|
<template #icon>
|
|
|
|
|
<SvgIcon name="revoke" />
|
|
|
|
|
</template>
|
|
|
|
|
返回
|
|
|
|
|
</NButton>
|
|
|
|
|
<img class="btn-approval btn-left" src="@/assets/images/task/btn-not-pass.png" alt="" @click.stop="rejectHandler">
|
|
|
|
|
<img class="btn-approval btn-left" src="@/assets/images/task/btn-not-pass.png" alt="" @click.stop="batchReject">
|
|
|
|
|
<SvgIcon size="24" name="vs" />
|
|
|
|
|
<img class="btn-approval" src="@/assets/images/task/btn-pass.png" alt="" @click.stop="batchApproval">
|
|
|
|
|
</div>
|
|
|
|
@ -822,7 +810,7 @@ function doAudit(param: any) {
|
|
|
|
|
<SvgIcon
|
|
|
|
|
style="cursor: pointer"
|
|
|
|
|
size="18"
|
|
|
|
|
name="setting"
|
|
|
|
|
name="column"
|
|
|
|
|
@click="showModal(customTabelRef)"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|