|
|
|
|
@ -91,45 +91,6 @@
|
|
|
|
|
> |
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
<el-form-item |
|
|
|
|
v-if="showPetitionFields" |
|
|
|
|
prop="handlePolices" |
|
|
|
|
label="经办人" |
|
|
|
|
:rules="[{ required: true, validator: validateHandlePolices }]" |
|
|
|
|
> |
|
|
|
|
<div |
|
|
|
|
v-for="(item, index) in form.handlePolices" |
|
|
|
|
:key="index" |
|
|
|
|
class="mb-8 flex gap v-center" |
|
|
|
|
style="width: 100%" |
|
|
|
|
> |
|
|
|
|
<police-select |
|
|
|
|
:depart-id="negative?.handleSecondDepartId" |
|
|
|
|
v-model="item.empNo" |
|
|
|
|
@change=" |
|
|
|
|
(police) => { |
|
|
|
|
item.name = police.name; |
|
|
|
|
item.mobile = police.mobile; |
|
|
|
|
} |
|
|
|
|
" |
|
|
|
|
/> |
|
|
|
|
<el-input v-model="item.mobile" placeholder="联系方式" style="width: 240px" /> |
|
|
|
|
<el-button |
|
|
|
|
v-if="index === 0" |
|
|
|
|
plain |
|
|
|
|
type="primary" |
|
|
|
|
@click="form.handlePolices.push({ name: '', empNo: '', mobile: '' })" |
|
|
|
|
>新增经办人</el-button |
|
|
|
|
> |
|
|
|
|
<el-button |
|
|
|
|
v-else |
|
|
|
|
plain |
|
|
|
|
type="danger" |
|
|
|
|
@click="form.handlePolices.splice(index, 1)" |
|
|
|
|
>删除</el-button |
|
|
|
|
> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<template |
|
|
|
|
v-if=" |
|
|
|
|
sourceNegative.problemSourcesCode === ProblemSources.GJXFPT || |
|
|
|
|
@ -193,12 +154,6 @@ import { ProblemSources } from "@/enums/dictEnums";
|
|
|
|
|
import useCatchStore from "@/stores/modules/catch"; |
|
|
|
|
import NegativeVerify from "@/components/negative/verify.vue"; |
|
|
|
|
|
|
|
|
|
type HandlePolice = { |
|
|
|
|
name: string; |
|
|
|
|
empNo: string; |
|
|
|
|
mobile: string; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const STAGE_INITIAL = "0"; |
|
|
|
|
const STAGE_COMPLETION = "1"; |
|
|
|
|
type ProcessingStage = typeof STAGE_INITIAL | typeof STAGE_COMPLETION; |
|
|
|
|
@ -219,7 +174,6 @@ type VerifySfssForm = {
|
|
|
|
|
initVerdict: string; |
|
|
|
|
completionStatus: string; |
|
|
|
|
publicRecognition: string; |
|
|
|
|
handlePolices: HandlePolice[]; |
|
|
|
|
files: any[]; |
|
|
|
|
blames: any[]; |
|
|
|
|
blameLeaders: any[]; |
|
|
|
|
@ -251,12 +205,6 @@ const sourceNegative = inject<any>("negative");
|
|
|
|
|
const formRef = ref(); |
|
|
|
|
const negativeVerifyRef = ref<InstanceType<typeof NegativeVerify>>(); |
|
|
|
|
|
|
|
|
|
const createHandlePolice = (): HandlePolice => ({ |
|
|
|
|
name: "", |
|
|
|
|
empNo: "", |
|
|
|
|
mobile: "", |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const currentRow = computed(() => sourceNegative?.value?.currentRow || {}); |
|
|
|
|
|
|
|
|
|
const createForm = (): VerifySfssForm => |
|
|
|
|
@ -277,7 +225,6 @@ const createForm = (): VerifySfssForm =>
|
|
|
|
|
initVerdict: "", |
|
|
|
|
completionStatus: currentRow.completionStatus, |
|
|
|
|
publicRecognition: currentRow.publicRecognition, |
|
|
|
|
handlePolices: [createHandlePolice()], |
|
|
|
|
files: [], |
|
|
|
|
blames: [], |
|
|
|
|
blameLeaders: [], |
|
|
|
|
@ -350,11 +297,6 @@ function getStageBySource(row: Record<string, any>) {
|
|
|
|
|
: STAGE_INITIAL; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function getHandlePolices() { |
|
|
|
|
const handlePolices = clone(sourceNegative?.value?.handlePolices || []); |
|
|
|
|
return handlePolices.length ? handlePolices : [createHandlePolice()]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function syncFormData() { |
|
|
|
|
const row = currentRow.value || {}; |
|
|
|
|
const fallbackInvolveDepartId = |
|
|
|
|
@ -393,7 +335,6 @@ function syncFormData() {
|
|
|
|
|
publicRecognition: String( |
|
|
|
|
sourceNegative?.value?.publicRecognition ?? row?.publicRecognition ?? "" |
|
|
|
|
), |
|
|
|
|
handlePolices: getHandlePolices(), |
|
|
|
|
files: clone(sourceNegative?.value?.files || []), |
|
|
|
|
blames: clone(sourceNegative?.value?.blames || []), |
|
|
|
|
blameLeaders: clone(sourceNegative?.value?.blameLeaders || []), |
|
|
|
|
@ -431,29 +372,12 @@ function mergeVerifyForm(verifyForm: Record<string, any> = {}) {
|
|
|
|
|
complaintId, |
|
|
|
|
involveDepartId, |
|
|
|
|
involveDepartName, |
|
|
|
|
handlePolices: clone(baseForm.handlePolices), |
|
|
|
|
files: clone(verifyForm.files || baseForm.files || []), |
|
|
|
|
blames: clone(verifyForm.blames || baseForm.blames || []), |
|
|
|
|
blameLeaders: clone(verifyForm.blameLeaders || baseForm.blameLeaders || []), |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function validateHandlePolices( |
|
|
|
|
_: unknown, |
|
|
|
|
value: HandlePolice[], |
|
|
|
|
callback: (error?: Error) => void |
|
|
|
|
) { |
|
|
|
|
if (!value?.length || !value[0]?.name) { |
|
|
|
|
callback(new Error("请选择经办人")); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (!value[0]?.mobile) { |
|
|
|
|
callback(new Error("请输入经办人联系方式")); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
callback(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async function validate() { |
|
|
|
|
await formRef.value?.validate(); |
|
|
|
|
const verifyData = await validateNegativeVerify(); |
|
|
|
|
|