|
|
|
|
@ -166,7 +166,14 @@
|
|
|
|
|
" |
|
|
|
|
> |
|
|
|
|
<!-- 核查办理--> |
|
|
|
|
<negative-verify-sfss |
|
|
|
|
v-if="isComplaintReport" |
|
|
|
|
ref="componentRef" |
|
|
|
|
@stage-change="handleComplaintStageChange" |
|
|
|
|
@submit="handleSubmitExecute" |
|
|
|
|
/> |
|
|
|
|
<negative-verify |
|
|
|
|
v-else |
|
|
|
|
ref="componentRef" |
|
|
|
|
@submit="handleSubmitExecute" |
|
|
|
|
/> |
|
|
|
|
@ -320,7 +327,7 @@
|
|
|
|
|
>保存抽检结果</el-button |
|
|
|
|
> |
|
|
|
|
<div v-if="!disabled"> |
|
|
|
|
<template v-for="item in flowActions" :key="item.actionKey"> |
|
|
|
|
<template v-for="item in displayFlowActions" :key="item.actionKey"> |
|
|
|
|
<template |
|
|
|
|
v-if=" |
|
|
|
|
!negative.extensionApplyFlag && |
|
|
|
|
@ -365,7 +372,7 @@
|
|
|
|
|
</template> |
|
|
|
|
</div> |
|
|
|
|
</footer> |
|
|
|
|
<template v-for="item in flowActions" :key="item.actionKey"> |
|
|
|
|
<template v-for="item in displayFlowActions" :key="item.actionKey"> |
|
|
|
|
<template v-if="item.actionKey.includes('apply_completion')"> |
|
|
|
|
<negative-apply-completion |
|
|
|
|
:ref="(el) => setActionItemRef(item.actionKey, el)" |
|
|
|
|
@ -398,7 +405,7 @@
|
|
|
|
|
/> |
|
|
|
|
</template> |
|
|
|
|
</template> |
|
|
|
|
<template v-if="confirmationCompletionFlag && flowActions.length"> |
|
|
|
|
<template v-if="confirmationCompletionFlag && displayFlowActions.length"> |
|
|
|
|
<negative-confirmation-completion |
|
|
|
|
@submit="handleSubmitExecute" |
|
|
|
|
ref="confirmationCompletionRef" |
|
|
|
|
@ -413,6 +420,7 @@ import {addFav, delFav} from "@/api/work/fav";
|
|
|
|
|
import feedback from "@/utils/feedback"; |
|
|
|
|
import {getComponents} from "@/utils/flow"; |
|
|
|
|
import {getDictLable} from "@/utils/util"; |
|
|
|
|
import { initialReview, saveInvolveJson } from "@/api/data/complaintCollection"; |
|
|
|
|
|
|
|
|
|
import useCatchStore from "@/stores/modules/catch"; |
|
|
|
|
|
|
|
|
|
@ -462,12 +470,48 @@ const remainingDuration = ref(0);
|
|
|
|
|
const maxDuration = ref(0); |
|
|
|
|
const flowActions = ref([]); |
|
|
|
|
const components = ref([]); |
|
|
|
|
const COMPLAINT_REPORT_SOURCE_TYPE = "2"; |
|
|
|
|
const LOCAL_INITIAL_REVIEW_ACTION_KEY = "initial_review"; |
|
|
|
|
const STAGE_INITIAL = "0"; |
|
|
|
|
const STAGE_COMPLETION = "1"; |
|
|
|
|
type ProcessingStage = typeof STAGE_INITIAL | typeof STAGE_COMPLETION; |
|
|
|
|
const currentComplaintStage = ref<ProcessingStage>(STAGE_COMPLETION); |
|
|
|
|
const isComplaintReport = computed( |
|
|
|
|
() => negative.value?.sourceType === COMPLAINT_REPORT_SOURCE_TYPE |
|
|
|
|
); |
|
|
|
|
const displayFlowActions = computed(() => { |
|
|
|
|
if (!isComplaintReport.value) { |
|
|
|
|
return flowActions.value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (currentComplaintStage.value === STAGE_INITIAL) { |
|
|
|
|
return [ |
|
|
|
|
{ |
|
|
|
|
actionKey: FlowActionEnum.SAVE, |
|
|
|
|
buttonLabel: "保存信息", |
|
|
|
|
buttonType: "primary", |
|
|
|
|
plain: true, |
|
|
|
|
validateForm: false, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
actionKey: LOCAL_INITIAL_REVIEW_ACTION_KEY, |
|
|
|
|
buttonLabel: "初核反馈", |
|
|
|
|
buttonType: "primary", |
|
|
|
|
plain: false, |
|
|
|
|
validateForm: true, |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return flowActions.value; |
|
|
|
|
}); |
|
|
|
|
watch( |
|
|
|
|
() => props.id, |
|
|
|
|
() => { |
|
|
|
|
getDetails(); |
|
|
|
|
verifyEditFlag.value = false; |
|
|
|
|
formData.value = {}; |
|
|
|
|
currentComplaintStage.value = STAGE_COMPLETION; |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
@ -475,7 +519,11 @@ const confirmationCompletionFlag = ref(false);
|
|
|
|
|
function getDetails() { |
|
|
|
|
loading.value = true; |
|
|
|
|
getNegativeDetails(props.id, work?.value.workId).then((data) => { |
|
|
|
|
negative.value = data.negative; |
|
|
|
|
negative.value = { |
|
|
|
|
...data.negative, |
|
|
|
|
complaintCollectionPageDTO: data.complaintCollectionPageDTO, |
|
|
|
|
currentRow: data.complaintCollectionPageDTO || {}, |
|
|
|
|
}; |
|
|
|
|
console.log('negative',negative) |
|
|
|
|
getConfinementData(); |
|
|
|
|
getSuperviseReportFun(data.negative.reportNumber) |
|
|
|
|
@ -602,6 +650,14 @@ async function handleExecute(action, data) {
|
|
|
|
|
data = componentRef.value.getData(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if ( |
|
|
|
|
isComplaintReport.value && |
|
|
|
|
action.actionKey === FlowActionEnum.APPLY_COMPLETION && |
|
|
|
|
componentRef.value?.getStage?.() === STAGE_INITIAL |
|
|
|
|
) { |
|
|
|
|
feedback.msgWarning("初核阶段请先保存初核内容,再切换到办结阶段提交办结"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (action.openDialog) { |
|
|
|
|
if ( |
|
|
|
|
confirmationCompletionFlag.value && |
|
|
|
|
@ -625,6 +681,26 @@ async function handleExecute(action, data) {
|
|
|
|
|
verifyEditFlag.value = false; |
|
|
|
|
} |
|
|
|
|
try { |
|
|
|
|
if (isComplaintReport.value && action.actionKey === FlowActionEnum.SAVE) { |
|
|
|
|
const formData = componentRef.value.getData(); |
|
|
|
|
const stage = componentRef.value?.getStage?.() || currentComplaintStage.value; |
|
|
|
|
if (stage === STAGE_INITIAL) { |
|
|
|
|
await submitComplaintInitialReview(formData); |
|
|
|
|
} else { |
|
|
|
|
await saveComplaintVerifyData(formData); |
|
|
|
|
} |
|
|
|
|
feedback.msgSuccess("操作成功"); |
|
|
|
|
getDetails(); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (isComplaintReport.value && action.actionKey === LOCAL_INITIAL_REVIEW_ACTION_KEY) { |
|
|
|
|
await submitComplaintInitialReview(data); |
|
|
|
|
currentComplaintStage.value = STAGE_COMPLETION; |
|
|
|
|
componentRef.value?.setStage?.(STAGE_COMPLETION); |
|
|
|
|
feedback.msgSuccess("操作成功"); |
|
|
|
|
getDetails(); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
await negativeExecute(props.id, { |
|
|
|
|
workId: work?.value.workId, |
|
|
|
|
actionKey: action.actionKey, |
|
|
|
|
@ -649,6 +725,10 @@ async function handleSubmitExecute(data) {
|
|
|
|
|
handleExecute(activeAction.value, data); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function handleComplaintStageChange(stage: ProcessingStage) { |
|
|
|
|
currentComplaintStage.value = stage; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function handleFav() { |
|
|
|
|
if (isFav.value) { |
|
|
|
|
delFav(props.id); |
|
|
|
|
@ -699,6 +779,38 @@ async function handleUpdateVerify() {
|
|
|
|
|
verifyEditFlag.value = !verifyEditFlag.value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async function saveComplaintVerifyData(data) { |
|
|
|
|
const payload = { |
|
|
|
|
blames: data?.blames || [], |
|
|
|
|
blameLeaders: data?.blameLeaders || [], |
|
|
|
|
files: data?.files || [], |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
await saveInvolveJson({ |
|
|
|
|
complaintId: data?.complaintId, |
|
|
|
|
checkStatusCode: data?.checkStatusCode, |
|
|
|
|
checkStatusName: data?.checkStatusName, |
|
|
|
|
checkStatusDesc: data?.checkStatusDesc, |
|
|
|
|
accountabilityTarget: data?.accountabilityTarget, |
|
|
|
|
involveDepartId: data?.involveDepartId, |
|
|
|
|
involveDepartName: data?.involveDepartName, |
|
|
|
|
completionStatus: data?.completionStatus, |
|
|
|
|
publicRecognition: data?.publicRecognition, |
|
|
|
|
caseNumber: data?.caseNumber, |
|
|
|
|
involveJson: JSON.stringify(payload), |
|
|
|
|
files: data?.files || [], |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async function submitComplaintInitialReview(data) { |
|
|
|
|
await initialReview({ |
|
|
|
|
complaintId: data?.complaintId, |
|
|
|
|
initWorkDes: data?.initWorkDes, |
|
|
|
|
initProblemPlan: data?.initProblemPlan, |
|
|
|
|
initVerdict: data?.initVerdict, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
defineExpose({ |
|
|
|
|
spotCheck, |
|
|
|
|
}); |
|
|
|
|
|