|
|
|
@ -28,7 +28,6 @@ |
|
|
|
show-all-levels |
|
|
|
show-all-levels |
|
|
|
style="width: 100%" |
|
|
|
style="width: 100%" |
|
|
|
placeholder="请选择来源(一级/二级)" |
|
|
|
placeholder="请选择来源(一级/二级)" |
|
|
|
:disabled="mode=== 'edit'" |
|
|
|
|
|
|
|
/> |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
@ -96,6 +95,7 @@ |
|
|
|
v-model="model.responderName" |
|
|
|
v-model="model.responderName" |
|
|
|
:placeholder="model.responderNameSkip ? '无' : '请输入来件人姓名'" |
|
|
|
:placeholder="model.responderNameSkip ? '无' : '请输入来件人姓名'" |
|
|
|
:disabled="model.responderNameSkip" |
|
|
|
:disabled="model.responderNameSkip" |
|
|
|
|
|
|
|
@blur="onAutoCheckDuplicate" |
|
|
|
> |
|
|
|
> |
|
|
|
<template #append> |
|
|
|
<template #append> |
|
|
|
<el-checkbox |
|
|
|
<el-checkbox |
|
|
|
@ -116,6 +116,7 @@ |
|
|
|
v-model="model.responderIdCode" |
|
|
|
v-model="model.responderIdCode" |
|
|
|
:placeholder="model.responderIdCodeSkip ? '无' : '请输入身份证号码'" |
|
|
|
:placeholder="model.responderIdCodeSkip ? '无' : '请输入身份证号码'" |
|
|
|
:disabled="model.responderIdCodeSkip" |
|
|
|
:disabled="model.responderIdCodeSkip" |
|
|
|
|
|
|
|
@blur="onAutoCheckDuplicate" |
|
|
|
> |
|
|
|
> |
|
|
|
<template #append> |
|
|
|
<template #append> |
|
|
|
<el-checkbox |
|
|
|
<el-checkbox |
|
|
|
@ -134,8 +135,19 @@ |
|
|
|
:disabled="model.responderIdCodeSkip" |
|
|
|
:disabled="model.responderIdCodeSkip" |
|
|
|
@click="onCheckDuplicate" |
|
|
|
@click="onCheckDuplicate" |
|
|
|
> |
|
|
|
> |
|
|
|
查重 |
|
|
|
查看 |
|
|
|
</el-button> |
|
|
|
</el-button> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span |
|
|
|
|
|
|
|
v-if="duplicateHintVisible" |
|
|
|
|
|
|
|
style="margin-left: 8px; font-size: 12px;" |
|
|
|
|
|
|
|
:style="{ color: duplicateCount > 0 ? '#fa541c' : '#8c8c8c' }" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<template v-if="autoDuplicateLoading">查重中…</template> |
|
|
|
|
|
|
|
<template v-else-if="duplicateCount > 0">疑似重复 {{ duplicateCount }} 条</template> |
|
|
|
|
|
|
|
<template v-else>未发现重复</template> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-row> |
|
|
|
@ -148,6 +160,7 @@ |
|
|
|
v-model="model.responderPhone" |
|
|
|
v-model="model.responderPhone" |
|
|
|
:placeholder="model.responderPhoneSkip ? '无' : '请输入联系电话'" |
|
|
|
:placeholder="model.responderPhoneSkip ? '无' : '请输入联系电话'" |
|
|
|
:disabled="model.responderPhoneSkip" |
|
|
|
:disabled="model.responderPhoneSkip" |
|
|
|
|
|
|
|
@blur="onAutoCheckDuplicate" |
|
|
|
> |
|
|
|
> |
|
|
|
<template #append> |
|
|
|
<template #append> |
|
|
|
<el-checkbox |
|
|
|
<el-checkbox |
|
|
|
@ -390,6 +403,14 @@ watch( |
|
|
|
props.model.responderNameSkip = false |
|
|
|
props.model.responderNameSkip = false |
|
|
|
props.model.responderIdCodeSkip = false |
|
|
|
props.model.responderIdCodeSkip = false |
|
|
|
props.model.responderPhoneSkip = false |
|
|
|
props.model.responderPhoneSkip = false |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
duplicateDrawerVisible.value = false |
|
|
|
|
|
|
|
duplicateLoading.value = false |
|
|
|
|
|
|
|
autoDuplicateLoading.value = false |
|
|
|
|
|
|
|
duplicateHintVisible.value = false |
|
|
|
|
|
|
|
duplicateCount.value = 0 |
|
|
|
|
|
|
|
duplicateCache.value = [] |
|
|
|
|
|
|
|
duplicateList.value = [] |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
) |
|
|
|
) |
|
|
|
@ -449,6 +470,50 @@ const onCheckDuplicate = async () => { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// region 自动查重相关 |
|
|
|
|
|
|
|
const duplicateCount = ref(0) // 只存数量 |
|
|
|
|
|
|
|
const duplicateCache = ref([]) // 缓存完整列表 |
|
|
|
|
|
|
|
const autoDuplicateLoading = ref(false) |
|
|
|
|
|
|
|
const duplicateHintVisible = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const fetchDuplicate = async () => { |
|
|
|
|
|
|
|
const body = { |
|
|
|
|
|
|
|
responderIdCode: props.model.responderIdCode, |
|
|
|
|
|
|
|
responderName: props.model.responderName, |
|
|
|
|
|
|
|
responderPhone: props.model.responderPhone, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const res = await maileRepeatt(body) |
|
|
|
|
|
|
|
return res?.complaintCollectionRepeatDTOS || [] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const onAutoCheckDuplicate = async () => { |
|
|
|
|
|
|
|
const { responderIdCode, responderName, responderPhone } = props.model |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!responderIdCode && !responderName && !responderPhone) { |
|
|
|
|
|
|
|
duplicateCount.value = 0 |
|
|
|
|
|
|
|
duplicateCache.value = [] |
|
|
|
|
|
|
|
duplicateHintVisible.value = false |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
duplicateHintVisible.value = true |
|
|
|
|
|
|
|
autoDuplicateLoading.value = true |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
const list = await fetchDuplicate() |
|
|
|
|
|
|
|
duplicateCount.value = list.length |
|
|
|
|
|
|
|
duplicateCache.value = list |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
// 静默失败(也可以在这里把提示变成“查重失败”) |
|
|
|
|
|
|
|
} finally { |
|
|
|
|
|
|
|
autoDuplicateLoading.value = false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// endregion |
|
|
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
|