Browse Source

fix--处理结果不能同时选择 不予追责和其他,不能同时选所对、市局、分局通报批评

master
buaixuexideshitongxue 2 weeks ago
parent
commit
3dbc8924ba
  1. 63
      src/components/negative/verify-sfss.vue
  2. 64
      src/components/negative/verify.vue

63
src/components/negative/verify-sfss.vue

@ -1604,6 +1604,7 @@ import {getConfinementListAll} from "@/api/work/confinement";
import {timeFormat} from "@/utils/util"; import {timeFormat} from "@/utils/util";
import {maileRepeatt} from "@/api/data/complaintCollection"; import {maileRepeatt} from "@/api/data/complaintCollection";
import DuplicateDrawerWithDetail from "@/views/data/DuplicateDrawerWithDetail.vue"; import DuplicateDrawerWithDetail from "@/views/data/DuplicateDrawerWithDetail.vue";
import feedback from "@/utils/feedback";
// //
const catchSotre = useCatchStore(); const catchSotre = useCatchStore();
@ -2008,12 +2009,74 @@ async function validate() {
(item) => item.type === BlameType.PERSONAL && !arr.includes(item.blameIdCode) (item) => item.type === BlameType.PERSONAL && !arr.includes(item.blameIdCode)
); );
if (blame.length) { if (blame.length) {
feedback.msgError( `涉及人员【${blame.map((item) => item.blameName).join("、")}】未关联领导`);
throw new Error( throw new Error(
`涉及人员【${blame.map((item) => item.blameName).join("、")}】未关联领导` `涉及人员【${blame.map((item) => item.blameName).join("、")}】未关联领导`
); );
} }
} }
// ========== ==========
// 1. 14
const personalBlames = form.value.blames.filter(item => item.type === BlameType.PERSONAL);
for (const item of personalBlames) {
if (item.handleResultCode && item.handleResultCode.length > 0) {
// 14
if (item.handleResultCode.includes('14')) {
if (item.handleResultCode.length > 1) {
feedback.msgError(`涉及人员【${item.blameName}】的处理结果为"不予追责"时,不能同时选择其他处理结果`);
throw new Error(`涉及人员【${item.blameName}】的处理结果为"不予追责"时,不能同时选择其他处理结果`);
}
}
// 11-11-2
const has1 = item.handleResultCode.includes('1');
const has1_1 = item.handleResultCode.includes('1-1');
const has1_2 = item.handleResultCode.includes('1-2');
if ((has1 && has1_1) || (has1 && has1_2) || (has1_1 && has1_2)) {
feedback.msgError(`涉及人员【${item.blameName}】的处理结果不能同时包含"所队通报批评"、"市局通报批评"、"分局通报批评"`);
throw new Error(`涉及人员【${item.blameName}】的处理结果不能同时包含"所队通报批评"、"市局通报批评"、"分局通报批评"`);
}
}
}
// 2. 14
const leaderBlames = form.value.blameLeaders;
for (const item of leaderBlames) {
if (item.leadHandleResultCode && item.leadHandleResultCode.length > 0) {
// 14
if (item.leadHandleResultCode.includes('14')) {
if (item.leadHandleResultCode.length > 1) {
feedback.msgError(`涉及领导【${item.leadName}】的处理结果为"不予追责"时,不能同时选择其他处理结果`);
throw new Error(`涉及领导【${item.leadName}】的处理结果为"不予追责"时,不能同时选择其他处理结果`);
}
}
// 11-11-2
const has1 = item.leadHandleResultCode.includes('1');
const has1_1 = item.leadHandleResultCode.includes('1-1');
const has1_2 = item.leadHandleResultCode.includes('1-2');
if ((has1 && has1_1) || (has1 && has1_2) || (has1_1 && has1_2)) {
feedback.msgError(`涉及领导【${item.leadName}】的处理结果不能同时包含"所队通报批评"、"市局通报批评"、"分局通报批评"`);
throw new Error(`涉及领导【${item.leadName}】的处理结果不能同时包含"所队通报批评"、"市局通报批评"、"分局通报批评"`);
}
}
}
// 3. 2-1
const departBlames = form.value.blames.filter(item => item.type === BlameType.DEPARTMENT);
for (const item of departBlames) {
if (item.handleResultCode && item.handleResultCode.length > 0) {
// 2-1
if (item.handleResultCode.includes('2-1')) {
if (item.handleResultCode.length > 1) {
feedback.msgError(`涉及单位【${item.blameDepartName}】的处理结果为"不与追责"时,不能同时选择其他处理结果`);
throw new Error(`涉及单位【${item.blameDepartName}】的处理结果为"不与追责"时,不能同时选择其他处理结果`);
}
}
}
}
// ========== ==========
return form.value; return form.value;
} }

64
src/components/negative/verify.vue

@ -1598,6 +1598,7 @@ import {
import useCatchStore from "@/stores/modules/catch"; import useCatchStore from "@/stores/modules/catch";
import { getConfinementListAll } from "@/api/work/confinement"; import { getConfinementListAll } from "@/api/work/confinement";
import {Warning} from "@element-plus/icons-vue"; import {Warning} from "@element-plus/icons-vue";
import feedback from "@/utils/feedback";
// //
const catchSotre = useCatchStore(); const catchSotre = useCatchStore();
const dict = catchSotre.getDicts([ const dict = catchSotre.getDicts([
@ -1935,6 +1936,7 @@ async function validate() {
(item) => item.type === BlameType.PERSONAL && !arr.includes(item.blameIdCode) (item) => item.type === BlameType.PERSONAL && !arr.includes(item.blameIdCode)
); );
if (blame.length) { if (blame.length) {
feedback.msgError(`涉及人员【${blame.map((item) => item.blameName).join("、")}】未关联领导`);
throw new Error( throw new Error(
`涉及人员【${blame.map((item) => item.blameName).join("、")}】未关联领导` `涉及人员【${blame.map((item) => item.blameName).join("、")}】未关联领导`
); );
@ -1960,10 +1962,72 @@ async function validate() {
if (duplicatePerson) { if (duplicatePerson) {
// showSamePersonDialog.value = true; // showSamePersonDialog.value = true;
feedback.msgError( `涉及人员【${duplicatePerson.blameName}】与涉及领导不能为同一人`);
throw new Error(`涉及人员【${duplicatePerson.blameName}】与涉及领导不能为同一人`); throw new Error(`涉及人员【${duplicatePerson.blameName}】与涉及领导不能为同一人`);
} }
} }
// ========== ==========
// 1. 14
const personalBlames = form.value.blames.filter(item => item.type === BlameType.PERSONAL);
for (const item of personalBlames) {
if (item.handleResultCode && item.handleResultCode.length > 0) {
// 14
if (item.handleResultCode.includes('14')) {
if (item.handleResultCode.length > 1) {
feedback.msgError(`涉及人员【${item.blameName}】的处理结果为"不予追责"时,不能同时选择其他处理结果`);
throw new Error(`涉及人员【${item.blameName}】的处理结果为"不予追责"时,不能同时选择其他处理结果`);
}
}
// 11-11-2
const has1 = item.handleResultCode.includes('1');
const has1_1 = item.handleResultCode.includes('1-1');
const has1_2 = item.handleResultCode.includes('1-2');
if ((has1 && has1_1) || (has1 && has1_2) || (has1_1 && has1_2)) {
feedback.msgError(`涉及人员【${item.blameName}】的处理结果不能同时包含"所队通报批评"、"市局通报批评"、"分局通报批评"`);
throw new Error(`涉及人员【${item.blameName}】的处理结果不能同时包含"所队通报批评"、"市局通报批评"、"分局通报批评"`);
}
}
}
// 2. 14
const leaderBlames = form.value.blameLeaders;
for (const item of leaderBlames) {
if (item.leadHandleResultCode && item.leadHandleResultCode.length > 0) {
// 14
if (item.leadHandleResultCode.includes('14')) {
if (item.leadHandleResultCode.length > 1) {
feedback.msgError(`涉及领导【${item.leadName}】的处理结果为"不予追责"时,不能同时选择其他处理结果`);
throw new Error(`涉及领导【${item.leadName}】的处理结果为"不予追责"时,不能同时选择其他处理结果`);
}
}
// 11-11-2
const has1 = item.leadHandleResultCode.includes('1');
const has1_1 = item.leadHandleResultCode.includes('1-1');
const has1_2 = item.leadHandleResultCode.includes('1-2');
if ((has1 && has1_1) || (has1 && has1_2) || (has1_1 && has1_2)) {
feedback.msgError(`涉及领导【${item.leadName}】的处理结果不能同时包含"所队通报批评"、"市局通报批评"、"分局通报批评"`);
throw new Error(`涉及领导【${item.leadName}】的处理结果不能同时包含"所队通报批评"、"市局通报批评"、"分局通报批评"`);
}
}
}
// 3. 2-1
const departBlames = form.value.blames.filter(item => item.type === BlameType.DEPARTMENT);
for (const item of departBlames) {
if (item.handleResultCode && item.handleResultCode.length > 0) {
// 2-1
if (item.handleResultCode.includes('2-1')) {
if (item.handleResultCode.length > 1) {
feedback.msgError(`涉及单位【${item.blameDepartName}】的处理结果为"不与追责"时,不能同时选择其他处理结果`);
throw new Error(`涉及单位【${item.blameDepartName}】的处理结果为"不与追责"时,不能同时选择其他处理结果`);
}
}
}
}
// ========== ==========
return form.value; return form.value;
} }

Loading…
Cancel
Save