策略添加判断是否有绑定产品

master
yujialong 7 months ago
parent 44c5a142ad
commit 9a0868d8c9
  1. 2
      .env
  2. 4
      src/api/model.ts
  3. 3
      src/components/Panel/index.vue
  4. 7
      src/layout/components/AppSidebar/Menu.vue
  5. 4
      src/layout/index.vue
  6. 1
      src/permission.ts
  7. 2
      src/store/useCurrentUser.ts
  8. 57
      src/views/product/afterLoan/1029/Detail.vue
  9. 63
      src/views/product/afterLoan/1030/Detail.vue
  10. 53
      src/views/product/afterLoan/1031/Detail.vue
  11. 59
      src/views/product/afterLoan/1032/Detail.vue
  12. 63
      src/views/product/afterLoan/1033/Detail.vue
  13. 41
      src/views/product/interestRate/772/Detail.vue
  14. 41
      src/views/product/interestRate/935/Detail.vue
  15. 43
      src/views/product/interestRate/936/Detail.vue
  16. 93
      src/views/product/strategy/150/Detail.vue
  17. 16
      src/views/product/strategy/150/Index.vue
  18. 66
      src/views/product/strategy/151/Detail.vue
  19. 103
      src/views/product/strategy/152/Detail.vue
  20. 59
      src/views/product/strategy/153/Detail.vue
  21. 79
      src/views/product/strategy/154/Detail.vue
  22. 128
      src/views/product/strategy/155/Detail.vue
  23. 70
      src/views/product/strategy/156/Detail.vue
  24. 124
      src/views/product/strategy/512/Detail.vue
  25. 4
      src/views/product/strategy/512/Index.vue
  26. 162
      src/views/product/strategy/513/Detail.vue
  27. 4
      src/views/product/strategy/513/Index.vue

@ -2,7 +2,7 @@ VITE_APP_TITLE=金融产品设计及数字化营销沙盘
VITE_PORT=9520
# VITE_PROXY=http://192.168.31.125:8080
VITE_PUBLIC_PATH=./
VITE_BASE_API=http://192.168.31.217:9000
VITE_BASE_API=http://192.168.31.51:9000
# VITE_BASE_API=http://121.37.12.51
# VITE_BASE_API=https://www.occupationlab.com
VITE_I18N_LOCALE=zh-cn

@ -209,5 +209,5 @@ export const collectionAfterLoanDetails = async (params: Record<string, any>): P
export const collectionAfterLoanSave = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/collectionAfterLoan/saveOrUpdate`, data)).data;
export const collectionAfterLoanDel = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/collectionAfterLoan/delete`, data)).data;
export const isTheStrategyRelatedToTheProduct = async (params: Record<string, any>): Promise<any> =>
(await axios.post(`${host}/product/managerOfRiskControl/bankRiskControlAllocation/isTheStrategyRelatedToTheProduct`, {}, { params })).data;
export const isTheStrategyRelatedToTheProduct = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`/product/managerOfRiskControl/bankRiskControlAllocation/isTheStrategyRelatedToTheProduct`, data)).data;

@ -237,7 +237,7 @@ import 'mavon-editor/dist/css/index.css';
import '@vueup/vue-quill/dist/vue-quill.snow.css';
import { useDraggable } from '@vueuse/core';
import { logout } from '@/store/useCurrentUser';
import { getIds, getNow } from '@/utils/common';
import { getNow } from '@/utils/common';
const router = useRouter();
const route = useRoute();
@ -818,7 +818,6 @@ onUnmounted(() => {
clearInterval(counterTimer.value);
clearInterval(heartBeatTimer.value);
console.log('onUnmounted');
// next();
});
</script>

@ -147,7 +147,7 @@ const toPage = (path: string) => {
router.push(path);
};
//
const getNum = async (status?: number, type?: number) => {
const getStat = async (status?: number, type?: number) => {
const { data } = await statistics({
checkpointId: levelId,
projectId,
@ -161,11 +161,12 @@ const getNum = async (status?: number, type?: number) => {
num1.value = data || '';
}
};
onMounted(() => {
const status = role.value === '41' ? 299 : role.value === '42' ? 295 : role.value === '43' ? 296 : ''; // (1- 2-3-4-5-
if (status) {
getNum(status, role.value === '41' ? 0 : '');
role.value === '41' && getNum(status, 1);
getStat(status, role.value === '41' ? 0 : '');
role.value === '41' && getStat(status, 1);
}
});
</script>

@ -20,10 +20,10 @@
import { defineComponent, computed } from 'vue';
import { useRoute } from 'vue-router';
import Settings from '@/settings';
import { AppSidebar, AppHeader, AppMain } from './components';
import useResizeHandler from './composables/useResizeHandler';
import Panel from '@/components/Panel/index.vue';
import Back from '@/components/Back.vue';
import { AppSidebar, AppHeader, AppMain } from './components';
import useResizeHandler from './composables/useResizeHandler';
export default defineComponent({
name: 'Layout',

@ -2,7 +2,6 @@ import NProgress from 'nprogress'; // progress bar
import 'nprogress/nprogress.css'; // progress bar style
import { RouteLocationNormalized } from 'vue-router';
import getPageTitle from '@/utils/getPageTitle';
import { getAccessToken } from '@/utils/auth'; // get token from cookie
import router from './router';
NProgress.configure({ showSpinner: false }); // NProgress Configuration

@ -1,4 +1,4 @@
import { reactive, readonly } from 'vue';
import { reactive } from 'vue';
import { RouteRecordRaw } from 'vue-router';
import { removeAccessToken, removeParam } from '@/utils/auth';
import Cookies from 'js-cookie';

@ -111,7 +111,7 @@
<script setup lang="ts">
import { ref, defineAsyncComponent, onMounted, toRefs } from 'vue';
import { ElMessage } from 'element-plus';
import { fiveLevelClassificationDetails, fiveLevelClassificationSave } from '@/api/model';
import { fiveLevelClassificationDetails, fiveLevelClassificationSave, isTheStrategyRelatedToTheProduct } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import { handleId, getIds } from '@/utils/common';
import Cookies from 'js-cookie';
@ -127,6 +127,9 @@ const emit = defineEmits(['clsoe']);
const { strategyId, strategyName } = toRefs(props.row);
const form = ref<Record<string, any>[]>([]);
const info = ref<Record<string, any>[]>([]);
const loading = ref<boolean>(false);
const syncVisible = ref<boolean>(false);
const bankIds = ref<Record<string, any>[]>([]);
//
const getConfig = async () => {
const { process } = await getProcessInformationBasedOnRoles(1029);
@ -150,8 +153,6 @@ const getConfig = async () => {
form.value = result;
loading.value = false;
};
const loading = ref<boolean>(false);
const syncVisible = ref<boolean>(false);
//
const getDetail = async () => {
loading.value = true;
@ -193,24 +194,44 @@ const addRecord = async (data: Record<string, any>) => {
//
const submit = async (synchronizeUpdate?: number) => {
loading.value = true;
let param = JSON.parse(JSON.stringify(form.value));
try {
let param = JSON.parse(JSON.stringify(form.value));
const recordParam = JSON.parse(JSON.stringify(param));
param.map((e) => {
delete e.recordChildren;
});
await fiveLevelClassificationSave({
...getIds(),
strategyId: strategyId.value,
strategyName: strategyName.value,
synchronizeUpdate,
fiveLevelClassificationList: param,
});
addRecord(recordParam);
const recordParam = JSON.parse(JSON.stringify(param));
param.map((e) => {
delete e.recordChildren;
});
await fiveLevelClassificationSave({
...getIds(),
strategyId: strategyId.value,
strategyName: strategyName.value,
synchronizeUpdate,
fiveLevelClassificationList: param,
bankIds: bankIds.value,
});
addRecord(recordParam);
} catch (e) {
loading.value = false;
}
};
const confirmSubmit = () => {
const confirmSubmit = async () => {
if (!strategyName.value) return ElMessage.error('请输入策略名称!');
syncVisible.value = true;
//
if (strategyId.value) {
const res = await isTheStrategyRelatedToTheProduct({
tacticsId: strategyId.value,
strategyType: 14,
});
if (res.isRelated) {
bankIds.value = res.bankIds;
syncVisible.value = true;
} else {
submit();
}
} else {
submit();
}
};
</script>

@ -90,7 +90,7 @@
<script setup lang="ts">
import { ref, defineAsyncComponent, onMounted, toRefs } from 'vue';
import { ElMessage } from 'element-plus';
import { postLoanInspectionDetails, postLoanInspectionSave } from '@/api/model';
import { postLoanInspectionDetails, postLoanInspectionSave, isTheStrategyRelatedToTheProduct } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import type { TableColumnCtx } from 'element-plus';
import { handleId, getIds } from '@/utils/common';
@ -109,6 +109,7 @@ const form = ref<Record<string, any>[]>([]);
const info = ref<Record<string, any>[]>([]);
const loading = ref<boolean>(false);
const syncVisible = ref<boolean>(false);
const bankIds = ref<Record<string, any>[]>([]);
//
const getConfig = async () => {
const { process } = await getProcessInformationBasedOnRoles(1030);
@ -201,28 +202,48 @@ const addRecord = async (data: Record<string, any>) => {
//
const submit = async (synchronizeUpdate?: number) => {
loading.value = true;
let param = JSON.parse(JSON.stringify(form.value));
param.map((e, i) => {
e.creditData = +e.creditData;
e.governmentData = +e.governmentData;
e.isChoose = +e.isChoose;
});
const recordParam = JSON.parse(JSON.stringify(param));
param.map((e) => {
delete e.recordChildren;
});
await postLoanInspectionSave({
...getIds(),
strategyId: strategyId.value,
strategyName: strategyName.value,
synchronizeUpdate,
postLoanInspectionList: param,
});
addRecord(recordParam);
try {
let param = JSON.parse(JSON.stringify(form.value));
param.map((e, i) => {
e.creditData = +e.creditData;
e.governmentData = +e.governmentData;
e.isChoose = +e.isChoose;
});
const recordParam = JSON.parse(JSON.stringify(param));
param.map((e) => {
delete e.recordChildren;
});
await postLoanInspectionSave({
...getIds(),
strategyId: strategyId.value,
strategyName: strategyName.value,
synchronizeUpdate,
postLoanInspectionList: param,
bankIds: bankIds.value,
});
addRecord(recordParam);
} catch (e) {
loading.value = false;
}
};
const confirmSubmit = () => {
const confirmSubmit = async () => {
if (!strategyName.value) return ElMessage.error('请输入策略名称!');
syncVisible.value = true;
//
if (strategyId.value) {
const res = await isTheStrategyRelatedToTheProduct({
tacticsId: strategyId.value,
strategyType: 15,
});
if (res.isRelated) {
bankIds.value = res.bankIds;
syncVisible.value = true;
} else {
submit();
}
} else {
submit();
}
};
</script>

@ -210,7 +210,7 @@
<script setup lang="ts">
import { ref, defineAsyncComponent, onMounted, toRefs } from 'vue';
import { ElMessage } from 'element-plus';
import { postCreditScoreDetails, postCreditScoreSave } from '@/api/model';
import { postCreditScoreDetails, postCreditScoreSave, isTheStrategyRelatedToTheProduct } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import type { TableColumnCtx } from 'element-plus';
import { handleId, getIds } from '@/utils/common';
@ -231,6 +231,7 @@ const info = ref<Record<string, any>[]>([]);
const answer = [[697, 693], [698, 691], [1, 707], [716], [], [695, 696], [696, 694]];
const loading = ref<boolean>(false);
const syncVisible = ref<boolean>(false);
const bankIds = ref<Record<string, any>[]>([]);
//
const getConfig = async () => {
const { process } = await getProcessInformationBasedOnRoles(1031);
@ -377,23 +378,43 @@ const addRecord = async (data: Record<string, any>) => {
//
const submit = async (synchronizeUpdate?: number) => {
loading.value = true;
let param = JSON.parse(JSON.stringify(form.value));
const recordParam = JSON.parse(JSON.stringify(param));
param.map((e) => {
delete e.recordChildren;
});
await postCreditScoreSave({
...getIds(),
strategyId: strategyId.value,
strategyName: strategyName.value,
synchronizeUpdate,
postCreditScoreList: param,
});
addRecord(recordParam);
try {
let param = JSON.parse(JSON.stringify(form.value));
const recordParam = JSON.parse(JSON.stringify(param));
param.map((e) => {
delete e.recordChildren;
});
await postCreditScoreSave({
...getIds(),
strategyId: strategyId.value,
strategyName: strategyName.value,
synchronizeUpdate,
postCreditScoreList: param,
bankIds: bankIds.value,
});
addRecord(recordParam);
} catch (e) {
loading.value = false;
}
};
const confirmSubmit = () => {
const confirmSubmit = async () => {
if (!strategyName.value) return ElMessage.error('请输入策略名称!');
syncVisible.value = true;
//
if (strategyId.value) {
const res = await isTheStrategyRelatedToTheProduct({
tacticsId: strategyId.value,
strategyType: 16,
});
if (res.isRelated) {
bankIds.value = res.bankIds;
syncVisible.value = true;
} else {
submit();
}
} else {
submit();
}
};
</script>

@ -69,7 +69,7 @@
<script setup lang="ts">
import { ref, defineAsyncComponent, onMounted, toRefs } from 'vue';
import { ElMessage } from 'element-plus';
import { postLoanWarningDetails, postLoanWarningSave } from '@/api/model';
import { postLoanWarningDetails, postLoanWarningSave, isTheStrategyRelatedToTheProduct } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import { handleId, getIds } from '@/utils/common';
import Cookies from 'js-cookie';
@ -87,6 +87,7 @@ const form = ref<Record<string, any>[]>([]);
const info = ref<Record<string, any>[]>([]);
const loading = ref<boolean>(false);
const syncVisible = ref<boolean>(false);
const bankIds = ref<Record<string, any>[]>([]);
//
const getConfig = async () => {
const { process } = await getProcessInformationBasedOnRoles(1032);
@ -147,27 +148,47 @@ const addRecord = async (data: Record<string, any>) => {
//
const submit = async (synchronizeUpdate?: number) => {
loading.value = true;
let param = JSON.parse(JSON.stringify(form.value));
param.forEach((e) => {
e.isChoose = +e.isChoose;
});
try {
let param = JSON.parse(JSON.stringify(form.value));
param.forEach((e) => {
e.isChoose = +e.isChoose;
});
const recordParam = JSON.parse(JSON.stringify(param));
param.forEach((e) => {
delete e.recordChildren;
});
await postLoanWarningSave({
...getIds(),
strategyId: strategyId.value,
strategyName: strategyName.value,
synchronizeUpdate,
postLoanWarningList: param,
});
addRecord(recordParam);
const recordParam = JSON.parse(JSON.stringify(param));
param.forEach((e) => {
delete e.recordChildren;
});
await postLoanWarningSave({
...getIds(),
strategyId: strategyId.value,
strategyName: strategyName.value,
synchronizeUpdate,
postLoanWarningList: param,
bankIds: bankIds.value,
});
addRecord(recordParam);
} catch (e) {
loading.value = false;
}
};
const confirmSubmit = () => {
const confirmSubmit = async () => {
if (!strategyName.value) return ElMessage.error('请输入策略名称!');
syncVisible.value = true;
//
if (strategyId.value) {
const res = await isTheStrategyRelatedToTheProduct({
tacticsId: strategyId.value,
strategyType: 17,
});
if (res.isRelated) {
bankIds.value = res.bankIds;
syncVisible.value = true;
} else {
submit();
}
} else {
submit();
}
};
</script>

@ -93,7 +93,7 @@
import { ref, defineAsyncComponent, onMounted, toRefs } from 'vue';
import { Plus } from '@element-plus/icons-vue';
import { ElMessage } from 'element-plus';
import { collectionAfterLoanDetails, collectionAfterLoanSave } from '@/api/model';
import { collectionAfterLoanDetails, collectionAfterLoanSave, isTheStrategyRelatedToTheProduct } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import { handleId, getIds } from '@/utils/common';
import Cookies from 'js-cookie';
@ -112,6 +112,7 @@ const info = ref<Record<string, any>[]>([]);
const curRow = ref<Record<string, any>>({});
const selectDia = ref<boolean>(false);
const syncVisible = ref<boolean>(false);
const bankIds = ref<Record<string, any>[]>([]);
//
const getConfig = async () => {
const { process } = await getProcessInformationBasedOnRoles(1033);
@ -184,30 +185,48 @@ const addRecord = async (data: Record<string, any>) => {
};
//
const submit = async (synchronizeUpdate?: number) => {
let param = JSON.parse(JSON.stringify(form.value));
param.map((e) => {
e.appCollection = +e.appCollection;
e.automaticOutboundCall = +e.automaticOutboundCall;
e.shortMessageCollection = +e.shortMessageCollection;
e.manualCollection = +e.manualCollection;
});
try {
let param = JSON.parse(JSON.stringify(form.value));
param.map((e) => {
e.appCollection = +e.appCollection;
e.automaticOutboundCall = +e.automaticOutboundCall;
e.shortMessageCollection = +e.shortMessageCollection;
e.manualCollection = +e.manualCollection;
});
const recordParam = JSON.parse(JSON.stringify(param));
param.map((e) => {
delete e.recordChildren;
});
await collectionAfterLoanSave({
...getIds(),
strategyId: strategyId.value,
strategyName: strategyName.value,
synchronizeUpdate,
collectionAfterLoanList: param,
});
addRecord(recordParam);
const recordParam = JSON.parse(JSON.stringify(param));
param.map((e) => {
delete e.recordChildren;
});
await collectionAfterLoanSave({
...getIds(),
strategyId: strategyId.value,
strategyName: strategyName.value,
synchronizeUpdate,
collectionAfterLoanList: param,
bankIds: bankIds.value,
});
addRecord(recordParam);
} catch (e) {}
};
const confirmSubmit = () => {
const confirmSubmit = async () => {
if (!strategyName.value) return ElMessage.error('请输入策略名称!');
syncVisible.value = true;
//
if (strategyId.value) {
const res = await isTheStrategyRelatedToTheProduct({
tacticsId: strategyId.value,
strategyType: 18,
});
if (res.isRelated) {
bankIds.value = res.bankIds;
syncVisible.value = true;
} else {
submit();
}
} else {
submit();
}
};
</script>

@ -102,7 +102,7 @@
<script setup lang="ts">
import { ref, defineAsyncComponent, onMounted, toRefs } from 'vue';
import { ElMessage, ElLoading } from 'element-plus';
import { personalCreditModelDetails, personalCreditModelSaveOrUpdate } from '@/api/model';
import { personalCreditModelDetails, personalCreditModelSaveOrUpdate, isTheStrategyRelatedToTheProduct } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import type { TableColumnCtx } from 'element-plus';
import { handleId, getIds } from '@/utils/common';
@ -131,6 +131,7 @@ const info = ref<Record<string, any>[]>([]);
const len = ref<number>(0);
let loading = null;
const syncVisible = ref<boolean>(false);
const bankIds = ref<Record<string, any>[]>([]);
//
const getConfig = async () => {
const { process } = await getProcessInformationBasedOnRoles(772);
@ -314,17 +315,37 @@ const submit = async (synchronizeUpdate?: number) => {
delete e.recordChildren;
delete e.subject;
});
await personalCreditModelSaveOrUpdate({
...param,
id: id.value,
modelName: modelName.value,
synchronizeUpdate,
});
addRecord(param);
try {
await personalCreditModelSaveOrUpdate({
...param,
id: id.value,
modelName: modelName.value,
synchronizeUpdate,
bankIds: bankIds.value,
});
addRecord(param);
} catch (e) {
loading?.close();
}
};
const confirmSubmit = () => {
const confirmSubmit = async () => {
if (!modelName.value) return ElMessage.error('请输入模型名称!');
syncVisible.value = true;
//
if (id.value) {
const res = await isTheStrategyRelatedToTheProduct({
tacticsId: id.value,
strategyType: 10,
});
if (res.isRelated) {
bankIds.value = res.bankIds;
syncVisible.value = true;
} else {
submit();
}
} else {
submit();
}
};
</script>

@ -102,7 +102,7 @@
<script setup lang="ts">
import { ref, defineAsyncComponent, onMounted, toRefs } from 'vue';
import { ElMessage, ElLoading } from 'element-plus';
import { personalInterestRateDetails, personalInterestRateSaveOrUpdate } from '@/api/model';
import { personalInterestRateDetails, personalInterestRateSaveOrUpdate, isTheStrategyRelatedToTheProduct } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import type { TableColumnCtx } from 'element-plus';
import { handleId, getIds } from '@/utils/common';
@ -131,6 +131,7 @@ const formProcess = ref<Record<string, any>[]>([]);
const info = ref<Record<string, any>[]>([]);
const len = ref<number>(0);
const syncVisible = ref<boolean>(false);
const bankIds = ref<Record<string, any>[]>([]);
//
const getConfig = async () => {
const { process } = await getProcessInformationBasedOnRoles(935);
@ -267,17 +268,37 @@ const submit = async (synchronizeUpdate?: number) => {
delete e.recordChildren;
delete e.subject;
});
await personalInterestRateSaveOrUpdate({
...param,
id: id.value,
modelName: modelName.value,
synchronizeUpdate,
});
addRecord(param);
try {
await personalInterestRateSaveOrUpdate({
...param,
id: id.value,
modelName: modelName.value,
synchronizeUpdate,
bankIds: bankIds.value,
});
addRecord(param);
} catch (e) {
loading?.close();
}
};
const confirmSubmit = () => {
const confirmSubmit = async () => {
if (!modelName.value) return ElMessage.error('请输入模型名称!');
syncVisible.value = true;
//
if (id.value) {
const res = await isTheStrategyRelatedToTheProduct({
tacticsId: id.value,
strategyType: 12,
});
if (res.isRelated) {
bankIds.value = res.bankIds;
syncVisible.value = true;
} else {
submit();
}
} else {
submit();
}
};
</script>

@ -111,10 +111,9 @@
<script setup lang="ts">
import { ref, defineAsyncComponent, onMounted, toRefs } from 'vue';
import { ElMessage, ElLoading } from 'element-plus';
import { businessInterestRateDetails, businessInterestRateSaveOrUpdate } from '@/api/model';
import { businessInterestRateDetails, businessInterestRateSaveOrUpdate, isTheStrategyRelatedToTheProduct } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import type { TableColumnCtx } from 'element-plus';
import { useRouter, useRoute } from 'vue-router';
import { handleId, getIds } from '@/utils/common';
import Cookies from 'js-cookie';
@ -140,6 +139,7 @@ const form = ref<Record<string, any>>({
const formProcess = ref<Record<string, any>[]>([]);
const info = ref<Record<string, any>[]>([]);
const syncVisible = ref<boolean>(false);
const bankIds = ref<Record<string, any>[]>([]);
//
const getConfig = async () => {
const { process } = await getProcessInformationBasedOnRoles(936);
@ -359,17 +359,38 @@ const submit = async (synchronizeUpdate?: number) => {
});
param.corporateInterestRateModelIndicators = list;
param.type = 2;
await businessInterestRateSaveOrUpdate({
...param,
id: id.value,
modelName: modelName.value,
synchronizeUpdate,
});
addRecord(param);
try {
await businessInterestRateSaveOrUpdate({
...param,
id: id.value,
modelName: modelName.value,
synchronizeUpdate,
bankIds: bankIds.value,
});
addRecord(param);
} catch (e) {
loading?.close();
}
};
const confirmSubmit = () => {
const confirmSubmit = async () => {
if (!modelName.value) return ElMessage.error('请输入模型名称!');
syncVisible.value = true;
//
if (id.value) {
const res = await isTheStrategyRelatedToTheProduct({
tacticsId: id.value,
strategyType: 13,
});
if (res.isRelated) {
bankIds.value = res.bankIds;
syncVisible.value = true;
} else {
submit();
}
} else {
submit();
}
};
</script>

@ -151,7 +151,7 @@
</template>
<script setup lang="ts">
import { ref, defineAsyncComponent, onMounted, toRefs } from 'vue';
import { ref, defineAsyncComponent, onMounted, toRefs, inject } from 'vue';
import { ElMessage } from 'element-plus';
import { accessStrategyGovernmentBlacklistFind, accessStrategyGovernmentBlacklistSave, isTheStrategyRelatedToTheProduct } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
@ -189,6 +189,7 @@ const symbols: Array<Record<string, any>> = [
];
const loading = ref<boolean>(false);
const syncVisible = ref<boolean>(false);
const bankIds = ref<Record<string, any>[]>([]);
//
const getConfig = async () => {
const { process } = await getProcessInformationBasedOnRoles(150);
@ -338,48 +339,54 @@ const addRecord = async (data: Record<string, any>) => {
//
const submit = async (synchronizeUpdate?: number) => {
loading.value = true;
let param = JSON.parse(JSON.stringify(form.value));
param.map((e, i) => {
if (info.value.length) e.id = info.value.find((n) => n.stRecordId === e.stRecordId)?.id;
e.corporateMajorityHitRejected = +e.corporateMajorityHitRejected;
e.hitAccess = +e.hitAccess;
e.mateHitRejected = +e.mateHitRejected;
e.otherFamilyMembersHitRejected = +e.otherFamilyMembersHitRejected;
e.parentsHitRejected = +e.parentsHitRejected;
e.personalHitBlacklist = +e.personalHitBlacklist;
if (e.stRecordId == 161 || e.stRecordId == 164) {
if (e.span) {
//
param[i - 1].ruleTwo = e.symbol + e.num;
} else {
e.ruleOne = e.symbol + e.num;
}
} else if (e.stRecordId == 167) {
if (e.span) {
//
param[i - 1].ruleTwo = e.had;
} else {
e.ruleOne = e.symbol + e.num + ',' + e.had;
try {
let param = JSON.parse(JSON.stringify(form.value));
param.map((e, i) => {
if (info.value.length) e.id = info.value.find((n) => n.stRecordId === e.stRecordId)?.id;
e.corporateMajorityHitRejected = +e.corporateMajorityHitRejected;
e.hitAccess = +e.hitAccess;
e.mateHitRejected = +e.mateHitRejected;
e.otherFamilyMembersHitRejected = +e.otherFamilyMembersHitRejected;
e.parentsHitRejected = +e.parentsHitRejected;
e.personalHitBlacklist = +e.personalHitBlacklist;
if (e.stRecordId == 161 || e.stRecordId == 164) {
if (e.span) {
//
param[i - 1].ruleTwo = e.symbol + e.num;
} else {
e.ruleOne = e.symbol + e.num;
}
} else if (e.stRecordId == 167) {
if (e.span) {
//
param[i - 1].ruleTwo = e.had;
} else {
e.ruleOne = e.symbol + e.num + ',' + e.had;
}
}
}
});
param = param.filter((e) => !e.span);
const recordParam = JSON.parse(JSON.stringify(param));
param.map((e) => {
delete e.recordChildren;
delete e.had;
delete e.name;
delete e.symbol;
delete e.num;
});
await accessStrategyGovernmentBlacklistSave({
...getIds(),
strategyId: strategyId.value,
strategyName: strategyName.value,
synchronizeUpdate,
governmentBlacklistList: param,
});
addRecord(recordParam);
});
param = param.filter((e) => !e.span);
const recordParam = JSON.parse(JSON.stringify(param));
param.map((e) => {
delete e.recordChildren;
delete e.had;
delete e.name;
delete e.symbol;
delete e.num;
});
await accessStrategyGovernmentBlacklistSave({
...getIds(),
strategyId: strategyId.value,
strategyName: strategyName.value,
synchronizeUpdate,
governmentBlacklistList: param,
bankIds: bankIds.value,
});
addRecord(recordParam);
} catch (e) {
loading.value = false;
}
};
const confirmSubmit = async () => {
if (!strategyName.value) return ElMessage.error('请输入策略名称!');
@ -388,8 +395,10 @@ const confirmSubmit = async () => {
if (strategyId.value) {
const res = await isTheStrategyRelatedToTheProduct({
tacticsId: strategyId.value,
strategyType: 1,
});
if (res.isRelated) {
bankIds.value = res.bankIds;
syncVisible.value = true;
} else {
submit();

@ -91,6 +91,7 @@ import { Delete } from '@element-plus/icons-vue';
import { pageSizes, pageLayout } from '@/utils/common';
import { accessStrategyGovernmentBlacklistList, accessStrategyGovernmentBlacklistDel } from '@/api/model';
import Search from '@/components/Search.vue';
const Detail = defineAsyncComponent(() => import('./Detail.vue'));
const keyWord = ref<string>();
@ -132,6 +133,11 @@ onMounted(getList);
const handleSelectionChange = (val: Record<string, any>[]) => {
multipleSelection.value = val;
};
const handleDelete = async (ids: number[]) => {
await accessStrategyGovernmentBlacklistDel({ ids });
getList();
ElMessage.success('删除成功!');
};
//
const delAll = async () => {
handleDelete(multipleSelection.value.map((e) => e.strategyId));
@ -156,11 +162,9 @@ const toDetail = async (row: Record<string, any>, detail = false) => {
//
const closeDrawer = (refresh?: number) => {
visible.value = false;
refresh && initList();
};
const handleDelete = async (ids: number[]) => {
await accessStrategyGovernmentBlacklistDel({ ids });
getList();
ElMessage.success('删除成功!');
// refresh && initList();
if (refresh) {
initList();
}
};
</script>

@ -142,7 +142,7 @@
<script setup lang="ts">
import { ref, toRefs, onMounted, defineAsyncComponent } from 'vue';
import { ElMessage } from 'element-plus';
import { accessStrategyCreditBlacklistFind, accessStrategyCreditBlacklistSave } from '@/api/model';
import { accessStrategyCreditBlacklistFind, accessStrategyCreditBlacklistSave, isTheStrategyRelatedToTheProduct } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import { handleId, getIds } from '@/utils/common';
import Cookies from 'js-cookie';
@ -271,32 +271,50 @@ const addRecord = async (data: Record<string, any>) => {
//
const submit = async (synchronizeUpdate?: number) => {
loading.value = true;
let param = JSON.parse(JSON.stringify(form.value));
param.map((e, i) => {
if (info.value.length) e.id = info.value.find((n) => n.stRecordId === e.stRecordId)?.id;
if (e.stRecordId != 204 && e.stRecordId != 230 && e.stRecordId != 231) {
e.ruleOne = e.symbol + e.num;
if (isRule(e.stRecordId)) {
e.ruleTwo = e.symbol1 + e.num1;
try {
let param = JSON.parse(JSON.stringify(form.value));
param.map((e, i) => {
if (info.value.length) e.id = info.value.find((n) => n.stRecordId === e.stRecordId)?.id;
if (e.stRecordId != 204 && e.stRecordId != 230 && e.stRecordId != 231) {
e.ruleOne = e.symbol + e.num;
if (isRule(e.stRecordId)) {
e.ruleTwo = e.symbol1 + e.num1;
}
}
}
});
const recordParam = JSON.parse(JSON.stringify(param));
param.map((e) => {
delete e.recordChildren;
});
await accessStrategyCreditBlacklistSave({
...getIds(),
strategyId: strategyId.value,
strategyName: strategyName.value,
synchronizeUpdate,
creditBlacklistList: param,
});
addRecord(recordParam);
});
const recordParam = JSON.parse(JSON.stringify(param));
param.map((e) => {
delete e.recordChildren;
});
await accessStrategyCreditBlacklistSave({
...getIds(),
strategyId: strategyId.value,
strategyName: strategyName.value,
synchronizeUpdate,
creditBlacklistList: param,
});
addRecord(recordParam);
} catch (e) {
loading.value = false;
}
};
const confirmSubmit = () => {
const confirmSubmit = async () => {
if (!strategyName.value) return ElMessage.error('请输入策略名称!');
syncVisible.value = true;
//
if (strategyId.value) {
const res = await isTheStrategyRelatedToTheProduct({
tacticsId: strategyId.value,
strategyType: 2,
});
if (res.isRelated) {
syncVisible.value = true;
} else {
submit();
}
} else {
submit();
}
};
</script>

@ -187,10 +187,9 @@
<script setup lang="ts">
import { ref, defineAsyncComponent, onMounted, toRefs } from 'vue';
import { ElMessage } from 'element-plus';
import { accessStrategyBusinessBlacklistFind, accessStrategyBusinessBlacklistSave } from '@/api/model';
import { accessStrategyBusinessBlacklistFind, accessStrategyBusinessBlacklistSave, isTheStrategyRelatedToTheProduct } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import type { TableColumnCtx } from 'element-plus';
import { useRouter, useRoute } from 'vue-router';
import { handleId, getNum, getSymbol, getChinese, getIds } from '@/utils/common';
import Cookies from 'js-cookie';
@ -457,50 +456,68 @@ const addRecord = async (data: Record<string, any>) => {
//
const submit = async (synchronizeUpdate?: number) => {
loading.value = true;
let param = [
{
id: info.value.find((n) => n.stRecordId === 318)?.id,
stRecordId: 318,
...getIds(),
ruleOne: form.value[0].symbol + form.value[0].num,
ruleTwo: form.value[1].symbol + form.value[1].num,
ruleThree: form.value[2].symbol + form.value[2].num,
ruleFour: form.value[3].symbol + form.value[3].num,
},
{
id: info.value.find((n) => n.stRecordId === 320)?.id,
stRecordId: 320,
...getIds(),
ruleOne: form.value[14].symbol + form.value[14].num + ',' + form.value[14].had,
ruleTwo: form.value[15].num + form.value[15].symbol + ',' + form.value[15].symbol1 + form.value[15].num1 + ',' + form.value[15].had,
},
{
id: info.value.find((n) => n.stRecordId === 322)?.id,
stRecordId: 322,
try {
const param = [
{
id: info.value.find((n) => n.stRecordId === 318)?.id,
stRecordId: 318,
...getIds(),
ruleOne: form.value[0].symbol + form.value[0].num,
ruleTwo: form.value[1].symbol + form.value[1].num,
ruleThree: form.value[2].symbol + form.value[2].num,
ruleFour: form.value[3].symbol + form.value[3].num,
},
{
id: info.value.find((n) => n.stRecordId === 320)?.id,
stRecordId: 320,
...getIds(),
ruleOne: form.value[14].symbol + form.value[14].num + ',' + form.value[14].had,
ruleTwo: form.value[15].num + form.value[15].symbol + ',' + form.value[15].symbol1 + form.value[15].num1 + ',' + form.value[15].had,
},
{
id: info.value.find((n) => n.stRecordId === 322)?.id,
stRecordId: 322,
...getIds(),
ruleOne: form.value[18].symbol,
ruleTwo: form.value[20].num + form.value[20].symbol,
ruleThree: form.value[21].num + form.value[21].symbol,
ruleFour: form.value[22].num + form.value[22].symbol,
ruleFive: form.value[23].num + form.value[23].symbol,
ruleSix: form.value[24].num + form.value[24].symbol,
ruleSeven: form.value[25].num + form.value[25].symbol,
ruleEight: form.value[26].num + form.value[26].symbol + ',' + form.value[26].symbol1 + form.value[26].num1,
ruleNine: form.value[27].num + form.value[27].symbol,
},
];
await accessStrategyBusinessBlacklistSave({
...getIds(),
ruleOne: form.value[18].symbol,
ruleTwo: form.value[20].num + form.value[20].symbol,
ruleThree: form.value[21].num + form.value[21].symbol,
ruleFour: form.value[22].num + form.value[22].symbol,
ruleFive: form.value[23].num + form.value[23].symbol,
ruleSix: form.value[24].num + form.value[24].symbol,
ruleSeven: form.value[25].num + form.value[25].symbol,
ruleEight: form.value[26].num + form.value[26].symbol + ',' + form.value[26].symbol1 + form.value[26].num1,
ruleNine: form.value[27].num + form.value[27].symbol,
},
];
await accessStrategyBusinessBlacklistSave({
...getIds(),
strategyId: strategyId.value,
strategyName: strategyName.value,
synchronizeUpdate,
businessBlacklistList: param,
});
addRecord(param);
strategyId: strategyId.value,
strategyName: strategyName.value,
synchronizeUpdate,
businessBlacklistList: param,
});
addRecord(param);
} catch (e) {
loading.value = false;
}
};
const confirmSubmit = () => {
const confirmSubmit = async () => {
if (!strategyName.value) return ElMessage.error('请输入策略名称!');
syncVisible.value = true;
//
if (strategyId.value) {
const res = await isTheStrategyRelatedToTheProduct({
tacticsId: strategyId.value,
strategyType: 3,
});
if (res.isRelated) {
syncVisible.value = true;
} else {
submit();
}
} else {
submit();
}
};
</script>

@ -158,10 +158,9 @@
<script setup lang="ts">
import { ref, defineAsyncComponent, onMounted, toRefs } from 'vue';
import { ElMessage } from 'element-plus';
import { accessStrategyInlineBlacklistFind, accessStrategyInlineBlacklistSave } from '@/api/model';
import { accessStrategyInlineBlacklistFind, accessStrategyInlineBlacklistSave, isTheStrategyRelatedToTheProduct } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import type { TableColumnCtx } from 'element-plus';
import { useRoute } from 'vue-router';
import { handleId, getNum, getChinese, getIds } from '@/utils/common';
import Cookies from 'js-cookie';
@ -285,27 +284,45 @@ const addRecord = async (data: Record<string, any>) => {
//
const submit = async (synchronizeUpdate?: number) => {
loading.value = true;
let param = JSON.parse(JSON.stringify(form.value));
param.map((e, i) => {
if (info.value.length) e.id = info.value.find((n) => n.stRecordId === e.stRecordId)?.id;
e.outRuleOne = e.num + e.symbol;
e.outRuleTwo = e.num1 + e.symbol1;
});
param.map((e) => {
delete e.recordChildren;
});
await accessStrategyInlineBlacklistSave({
...getIds(),
strategyId: strategyId.value,
strategyName: strategyName.value,
synchronizeUpdate,
inlineBlacklistList: param,
});
addRecord(param);
try {
const param = JSON.parse(JSON.stringify(form.value));
param.map((e, i) => {
if (info.value.length) e.id = info.value.find((n) => n.stRecordId === e.stRecordId)?.id;
e.outRuleOne = e.num + e.symbol;
e.outRuleTwo = e.num1 + e.symbol1;
});
param.map((e) => {
delete e.recordChildren;
});
await accessStrategyInlineBlacklistSave({
...getIds(),
strategyId: strategyId.value,
strategyName: strategyName.value,
synchronizeUpdate,
inlineBlacklistList: param,
});
addRecord(param);
} catch (e) {
loading.value = false;
}
};
const confirmSubmit = () => {
const confirmSubmit = async () => {
if (!strategyName.value) return ElMessage.error('请输入策略名称!');
syncVisible.value = true;
//
if (strategyId.value) {
const res = await isTheStrategyRelatedToTheProduct({
tacticsId: strategyId.value,
strategyType: 4,
});
if (res.isRelated) {
syncVisible.value = true;
} else {
submit();
}
} else {
submit();
}
};
</script>

@ -302,9 +302,8 @@
<script setup lang="ts">
import { ref, defineAsyncComponent, onMounted, toRefs } from 'vue';
import { ElMessage } from 'element-plus';
import { accessStrategyEnterpriseBlacklistFind, accessStrategyEnterpriseBlacklistSave } from '@/api/model';
import { accessStrategyEnterpriseBlacklistFind, accessStrategyEnterpriseBlacklistSave, isTheStrategyRelatedToTheProduct } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import { useRouter, useRoute } from 'vue-router';
import { handleId, getNum, getSymbol, getChinese, getIds } from '@/utils/common';
import Cookies from 'js-cookie';
@ -403,38 +402,56 @@ const addRecord = async (data: Record<string, any>) => {
//
const submit = async (synchronizeUpdate?: number) => {
loading.value = true;
let param = [];
form.value.map((e, i) => {
const temp = {
id: info.value.find((n) => n.stRecordId === e.stRecordId)?.id ?? '',
stRecordId: e.stRecordId,
try {
const param = [];
form.value.map((e, i) => {
const temp = {
id: info.value.find((n) => n.stRecordId === e.stRecordId)?.id ?? '',
stRecordId: e.stRecordId,
...getIds(),
};
let rule;
if (!i || i === 13) {
rule = e.symbol + e.num;
} else if ((i > 0 && i < 4) || i === 5 || i === 6 || i === 14) {
rule = e.had;
} else if (i === 4 || i === 8) {
rule = e.check.join();
} else if (i === 7 || i === 9 || i === 10 || i === 11) {
rule = e.symbol + e.num + e.unit;
}
temp.rule = rule;
param.push(temp);
});
await accessStrategyEnterpriseBlacklistSave({
...getIds(),
};
let rule;
if (!i || i === 13) {
rule = e.symbol + e.num;
} else if ((i > 0 && i < 4) || i === 5 || i === 6 || i === 14) {
rule = e.had;
} else if (i === 4 || i === 8) {
rule = e.check.join();
} else if (i === 7 || i === 9 || i === 10 || i === 11) {
rule = e.symbol + e.num + e.unit;
}
temp.rule = rule;
param.push(temp);
});
await accessStrategyEnterpriseBlacklistSave({
...getIds(),
strategyId: strategyId.value,
strategyName: strategyName.value,
synchronizeUpdate,
enterpriseBlacklistList: param,
});
addRecord(param);
strategyId: strategyId.value,
strategyName: strategyName.value,
synchronizeUpdate,
enterpriseBlacklistList: param,
});
addRecord(param);
} catch (e) {
loading.value = false;
}
};
const confirmSubmit = () => {
const confirmSubmit = async () => {
if (!strategyName.value) return ElMessage.error('请输入策略名称!');
syncVisible.value = true;
//
if (strategyId.value) {
const res = await isTheStrategyRelatedToTheProduct({
tacticsId: strategyId.value,
strategyType: 5,
});
if (res.isRelated) {
syncVisible.value = true;
} else {
submit();
}
} else {
submit();
}
};
</script>

@ -150,7 +150,7 @@
<script setup lang="ts">
import { ref, defineAsyncComponent, onMounted, toRefs } from 'vue';
import { ElMessage } from 'element-plus';
import { accessStrategyAntiFraudStrategyFind, accessStrategyAntiFraudStrategySave } from '@/api/model';
import { accessStrategyAntiFraudStrategyFind, accessStrategyAntiFraudStrategySave, isTheStrategyRelatedToTheProduct } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import type { TableColumnCtx } from 'element-plus';
import { useRouter, useRoute } from 'vue-router';
@ -381,63 +381,81 @@ const addRecord = async (data: Record<string, any>) => {
//
const submit = async (synchronizeUpdate?: number) => {
loading.value = true;
let param = [
{
id: info.value.find((n) => n.stRecordId === 384)?.id,
stRecordId: 384,
...getIds(),
ruleOne: form.value[0].symbol + form.value[0].num,
ruleTwo: form.value[1].had,
ruleThree: form.value[2].had,
ruleFour: form.value[3].num + '~' + form.value[3].num1 + form.value[3].unit,
ruleFive: form.value[4].num + '~' + form.value[4].num1 + form.value[4].unit,
},
{
id: info.value.find((n) => n.stRecordId === 385)?.id,
stRecordId: 385,
...getIds(),
ruleOne: form.value[5].select,
ruleTwo: form.value[6].select,
ruleThree: form.value[7].select,
ruleFour: form.value[8].select,
ruleFive: form.value[9].select,
ruleSix: form.value[10].select,
ruleSeven: form.value[11].select,
ruleEight: form.value[12].select,
ruleNine: form.value[13].select,
},
{
id: info.value.find((n) => n.stRecordId === 386)?.id,
stRecordId: 386,
try {
const param = [
{
id: info.value.find((n) => n.stRecordId === 384)?.id,
stRecordId: 384,
...getIds(),
ruleOne: form.value[0].symbol + form.value[0].num,
ruleTwo: form.value[1].had,
ruleThree: form.value[2].had,
ruleFour: form.value[3].num + '~' + form.value[3].num1 + form.value[3].unit,
ruleFive: form.value[4].num + '~' + form.value[4].num1 + form.value[4].unit,
},
{
id: info.value.find((n) => n.stRecordId === 385)?.id,
stRecordId: 385,
...getIds(),
ruleOne: form.value[5].select,
ruleTwo: form.value[6].select,
ruleThree: form.value[7].select,
ruleFour: form.value[8].select,
ruleFive: form.value[9].select,
ruleSix: form.value[10].select,
ruleSeven: form.value[11].select,
ruleEight: form.value[12].select,
ruleNine: form.value[13].select,
},
{
id: info.value.find((n) => n.stRecordId === 386)?.id,
stRecordId: 386,
...getIds(),
ruleOne: form.value[14].symbol + form.value[14].num,
ruleTwo: form.value[15].symbol + form.value[15].num,
ruleThree: form.value[16].symbol + form.value[16].num,
ruleFour: form.value[17].symbol + form.value[17].num,
ruleFive: form.value[18].symbol + form.value[18].num,
ruleSix: form.value[19].had,
ruleSeven: form.value[20].had,
ruleEight: form.value[21].had,
ruleNine: form.value[22].had,
ruleTen: form.value[23].had,
ruleEleven: form.value[24].had,
ruleTwelve: form.value[25].had,
ruleThirteen: form.value[26].had,
ruleFourteen: form.value[27].had,
},
];
await accessStrategyAntiFraudStrategySave({
...getIds(),
ruleOne: form.value[14].symbol + form.value[14].num,
ruleTwo: form.value[15].symbol + form.value[15].num,
ruleThree: form.value[16].symbol + form.value[16].num,
ruleFour: form.value[17].symbol + form.value[17].num,
ruleFive: form.value[18].symbol + form.value[18].num,
ruleSix: form.value[19].had,
ruleSeven: form.value[20].had,
ruleEight: form.value[21].had,
ruleNine: form.value[22].had,
ruleTen: form.value[23].had,
ruleEleven: form.value[24].had,
ruleTwelve: form.value[25].had,
ruleThirteen: form.value[26].had,
ruleFourteen: form.value[27].had,
},
];
await accessStrategyAntiFraudStrategySave({
...getIds(),
strategyId: strategyId.value,
strategyName: strategyName.value,
synchronizeUpdate,
antiFraudStrategyList: param,
});
addRecord(param);
strategyId: strategyId.value,
strategyName: strategyName.value,
synchronizeUpdate,
antiFraudStrategyList: param,
});
addRecord(param);
} catch (e) {
loading.value = false;
}
};
const confirmSubmit = () => {
const confirmSubmit = async () => {
if (!strategyName.value) return ElMessage.error('请输入策略名称!');
syncVisible.value = true;
//
if (strategyId.value) {
const res = await isTheStrategyRelatedToTheProduct({
tacticsId: strategyId.value,
strategyType: 6,
});
if (res.isRelated) {
syncVisible.value = true;
} else {
submit();
}
} else {
submit();
}
};
</script>

@ -91,7 +91,7 @@
<script setup lang="ts">
import { ref, defineAsyncComponent, onMounted, toRefs } from 'vue';
import { ElMessage } from 'element-plus';
import { accessStrategyNegativeIndustryStrategyFind, accessStrategyNegativeIndustryStrategySave } from '@/api/model';
import { accessStrategyNegativeIndustryStrategyFind, accessStrategyNegativeIndustryStrategySave, isTheStrategyRelatedToTheProduct } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import type { TableColumnCtx } from 'element-plus';
import { useRouter, useRoute } from 'vue-router';
@ -225,33 +225,51 @@ const addRecord = async (data: Record<string, any>) => {
//
const submit = async (synchronizeUpdate?: number) => {
loading.value = true;
let param = [];
form.value.map((e, i) => {
if (e.index) {
param.push({
...getIds(),
stRecordId: e.stRecordId,
id: info.value.find((j) => j.stRecordId === e.stRecordId)?.id ?? '',
myselfEnterprise: e.myselfEnterprise ? 1 : 0,
myselfWorkplace: e.myselfWorkplace ? 1 : 0,
spouseEnterprise: e.spouseEnterprise ? 1 : 0,
spouseWorkplace: e.spouseWorkplace ? 1 : 0,
admittance: e.admittance ? 1 : 0,
});
}
});
await accessStrategyNegativeIndustryStrategySave({
...getIds(),
strategyId: strategyId.value,
strategyName: strategyName.value,
synchronizeUpdate,
negativeIndustryStrategyList: param,
});
addRecord(param);
try {
const param = [];
form.value.map((e, i) => {
if (e.index) {
param.push({
...getIds(),
stRecordId: e.stRecordId,
id: info.value.find((j) => j.stRecordId === e.stRecordId)?.id ?? '',
myselfEnterprise: e.myselfEnterprise ? 1 : 0,
myselfWorkplace: e.myselfWorkplace ? 1 : 0,
spouseEnterprise: e.spouseEnterprise ? 1 : 0,
spouseWorkplace: e.spouseWorkplace ? 1 : 0,
admittance: e.admittance ? 1 : 0,
});
}
});
await accessStrategyNegativeIndustryStrategySave({
...getIds(),
strategyId: strategyId.value,
strategyName: strategyName.value,
synchronizeUpdate,
negativeIndustryStrategyList: param,
});
addRecord(param);
} catch (e) {
loading.value = false;
}
};
const confirmSubmit = () => {
const confirmSubmit = async () => {
if (!strategyName.value) return ElMessage.error('请输入策略名称!');
syncVisible.value = true;
//
if (strategyId.value) {
const res = await isTheStrategyRelatedToTheProduct({
tacticsId: strategyId.value,
strategyType: 7,
});
if (res.isRelated) {
syncVisible.value = true;
} else {
submit();
}
} else {
submit();
}
};
</script>

@ -72,7 +72,7 @@
<script setup lang="ts">
import { ref, defineAsyncComponent, onMounted, toRefs, reactive } from 'vue';
import { ElLoading, ElMessage } from 'element-plus';
import { saveCredit, findCredit } from '@/api/model';
import { saveCredit, findCredit, isTheStrategyRelatedToTheProduct } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import { useRouter, useRoute } from 'vue-router';
import type { TableColumnCtx } from 'element-plus';
@ -100,6 +100,7 @@ const form = reactive({
});
const loading = ref<boolean>(false);
const syncVisible = ref<boolean>(false);
const bankIds = ref<Record<string, any>[]>([]);
//
const getConfig = async () => {
@ -154,9 +155,6 @@ const getDetail = async () => {
}
};
onMounted(getDetail);
const isSelect = (rule: number): boolean => {
return rule === 589 || rule === 594;
};
interface SpanMethodProps {
row: Record<string, any>;
@ -165,39 +163,7 @@ interface SpanMethodProps {
columnIndex: number;
}
const rowMerge1 = [1, 4, 7, 10, 40, 43, 46];
const rowMerge2 = [2, 3, 5, 6, 8, 9, 11, 12, 41, 42, 44, 45, 47, 48];
const rowMerge3 = [0, 13, 18, 26, 33, 39, 49];
//
const span1 = ({ row, column, rowIndex, columnIndex }: SpanMethodProps) => {
if (rowMerge3.includes(rowIndex)) {
if (!columnIndex) {
return {
rowspan: 1,
colspan: 5,
};
} else {
return {
rowspan: 0,
colspan: 0,
};
}
}
if (!columnIndex || columnIndex === 1 || columnIndex === 2) {
if (rowMerge1.includes(rowIndex)) {
return {
rowspan: 3,
colspan: 1,
};
} else if (rowMerge2.includes(rowIndex)) {
return {
rowspan: 0,
colspan: 0,
};
}
}
};
const span = ({ row, column, rowIndex, columnIndex }: SpanMethodProps) => {
if (!columnIndex || columnIndex === 1) {
if (!rowIndex || rowIndex === 31) {
@ -252,42 +218,62 @@ const addRecord = async () => {
//
const submit = async (synchronizeUpdate?: number) => {
loading.value = true;
const param = [];
try {
const param = [];
list.value.forEach((e) => {
const child = {
id: e.id,
dimensionId: e.dimensionId,
recordName: e.sub,
score: e.score,
recordName: e.index,
percentage: e.percentage,
};
const temp = {
dimensionId: e.dimensionId,
strategyId: e.strategyId,
recordName: e.name,
isChoose: +e.isChoose,
dimensionIndexList: [child],
};
if (e.span) {
param.push(temp);
} else {
param[e.parent].dimensionIndexList.push(child);
}
});
await saveCredit({
id: id.value,
...form,
...getIds(),
synchronizeUpdate,
dimensionOfTheRatingTableList: param,
});
addRecord();
list.value.forEach((e) => {
const child = {
id: e.id,
dimensionId: e.dimensionId,
recordName: e.sub,
score: e.score,
recordName: e.index,
percentage: e.percentage,
};
const temp = {
dimensionId: e.dimensionId,
strategyId: e.strategyId,
recordName: e.name,
isChoose: +e.isChoose,
dimensionIndexList: [child],
};
if (e.span) {
param.push(temp);
} else {
param[e.parent].dimensionIndexList.push(child);
}
});
await saveCredit({
id: id.value,
...form,
...getIds(),
synchronizeUpdate,
dimensionOfTheRatingTableList: param,
bankIds: bankIds.value,
});
addRecord();
} catch (e) {
loading.value = false;
}
};
const confirmSubmit = () => {
const confirmSubmit = async () => {
if (!form.scoreCardName) return ElMessage.error('请输入策略名称!');
syncVisible.value = true;
//
if (id.value) {
const res = await isTheStrategyRelatedToTheProduct({
tacticsId: id.value,
strategyType: 8,
});
if (res.isRelated) {
bankIds.value = res.bankIds;
syncVisible.value = true;
} else {
submit();
}
} else {
submit();
}
};
</script>

@ -73,7 +73,7 @@
class="px-3 py-2 justify-end"></el-pagination>
<el-drawer v-model="visible"
:title="(isDetail ? '查看' : curRow.strategyId ? '编辑' : '新增') + '个人信用评分策略'"
:title="(isDetail ? '查看' : curRow.id ? '编辑' : '新增') + '个人信用评分策略'"
size="100%"
custom-class="model-drawer">
<Detail v-model:row="curRow"
@ -134,7 +134,7 @@ const handleSelectionChange = (val: Record<string, any>[]) => {
};
//
const delAll = async () => {
handleDelete(multipleSelection.value.map((e) => e.strategyId));
handleDelete(multipleSelection.value.map((e) => e.id));
};
//
const toAdd = () => {

@ -15,7 +15,7 @@
<el-table class="c-table"
:data="list"
:max-height="'calc(100vh - ' + (disabled ? 260 : 300) + 'px)'"
:span-method="span1"
:span-method="span"
:cell-style="{background:'#fff'}"
border>
<el-table-column prop="name"
@ -135,7 +135,7 @@
</template>
<script setup lang="ts">
import { ref, defineAsyncComponent, onMounted, toRefs, reactive } from 'vue';
import { ref, defineAsyncComponent, onMounted, toRefs, reactive, isTheStrategyRelatedToTheProduct } from 'vue';
import { ElLoading, ElMessage } from 'element-plus';
import { saveCredit, findCredit } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
@ -165,6 +165,7 @@ const form = reactive({
});
const loading = ref<boolean>(false);
const syncVisible = ref<boolean>(false);
const bankIds = ref<Record<string, any>[]>([]);
//
const getConfig = async () => {
@ -585,7 +586,7 @@ const rowMerge1 = [1, 4, 7, 10, 40, 43, 46];
const rowMerge2 = [2, 3, 5, 6, 8, 9, 11, 12, 41, 42, 44, 45, 47, 48];
const rowMerge3 = [0, 13, 18, 26, 33, 39, 49];
//
const span1 = ({ row, column, rowIndex, columnIndex }: SpanMethodProps) => {
const span = ({ row, column, rowIndex, columnIndex }: SpanMethodProps) => {
if (rowMerge3.includes(rowIndex)) {
if (!columnIndex) {
return {
@ -614,36 +615,6 @@ const span1 = ({ row, column, rowIndex, columnIndex }: SpanMethodProps) => {
}
}
};
const span = ({ row, column, rowIndex, columnIndex }: SpanMethodProps) => {
if (!columnIndex || columnIndex === 1) {
if (!rowIndex || rowIndex === 31) {
return {
rowspan: 5,
colspan: 1,
};
} else if (rowIndex === 5 || rowIndex === 11 || rowIndex === 39 || rowIndex === 53) {
return {
rowspan: 2,
colspan: 1,
};
} else if (rowIndex === 7 || rowIndex === 13 || rowIndex === 17 || rowIndex === 27 || rowIndex === 41 || rowIndex === 45 || rowIndex === 49) {
return {
rowspan: 4,
colspan: 1,
};
} else if (rowIndex === 21 || rowIndex === 24 || rowIndex === 36) {
return {
rowspan: 3,
colspan: 1,
};
} else {
return {
rowspan: 0,
colspan: 0,
};
}
}
};
//
const checkAll = (row: Record<string, any>, i: number) => {
@ -763,60 +734,81 @@ const addRecord = async () => {
//
const submit = async (synchronizeUpdate?: number) => {
loading.value = true;
const param = [];
list.value.forEach((e, i) => {
const child = {
id: e?.id || '',
dimensionId: e.dimensionId ?? '',
recordName: e.index ?? '',
score: e.score,
percentage: e.percentage,
};
const temp = {
calculationFormula: e.calculationFormula ?? '',
dimensionId: e.dimensionId ?? '',
strategyId: id.value || '',
recordName: e.name,
isChoose: +e.isChoose,
};
if (e.middle) {
temp.dimensionIndexList = [child];
if ((e.answerId2 > 595 && e.answerId2 < 600) || (e.answerId2 > 687 && e.answerId2 < 691))
temp.dimensionIndexList.push(
{
id: list.value[i + 1].id ?? '',
dimensionId: list.value[i + 1].dimensionId ?? '',
recordName: list.value[i + 1].index ?? '',
score: list.value[i + 1].score,
percentage: list.value[i + 1].percentage,
},
{
id: list.value[i + 2].id ?? '',
dimensionId: list.value[i + 2].dimensionId ?? '',
recordName: list.value[i + 2].index ?? '',
score: list.value[i + 2].score,
percentage: list.value[i + 2].percentage,
},
);
temp.recordName = e.sub;
param.push(temp);
} else if (e.top) {
param.push(temp);
}
});
await saveCredit({
id: id.value,
...form,
...getIds(),
synchronizeUpdate,
dimensionOfTheRatingTableList: param,
});
addRecord();
try {
const param = [];
list.value.forEach((e, i) => {
const child = {
id: e?.id || '',
dimensionId: e.dimensionId ?? '',
recordName: e.index ?? '',
score: e.score,
percentage: e.percentage,
};
const temp = {
calculationFormula: e.calculationFormula ?? '',
dimensionId: e.dimensionId ?? '',
strategyId: id.value || '',
recordName: e.name,
isChoose: +e.isChoose,
};
if (e.middle) {
temp.dimensionIndexList = [child];
if ((e.answerId2 > 595 && e.answerId2 < 600) || (e.answerId2 > 687 && e.answerId2 < 691))
temp.dimensionIndexList.push(
{
id: list.value[i + 1].id ?? '',
dimensionId: list.value[i + 1].dimensionId ?? '',
recordName: list.value[i + 1].index ?? '',
score: list.value[i + 1].score,
percentage: list.value[i + 1].percentage,
},
{
id: list.value[i + 2].id ?? '',
dimensionId: list.value[i + 2].dimensionId ?? '',
recordName: list.value[i + 2].index ?? '',
score: list.value[i + 2].score,
percentage: list.value[i + 2].percentage,
},
);
temp.recordName = e.sub;
param.push(temp);
} else if (e.top) {
param.push(temp);
}
});
await saveCredit({
id: id.value,
...form,
...getIds(),
synchronizeUpdate,
dimensionOfTheRatingTableList: param,
bankIds: bankIds.value,
});
addRecord();
} catch (e) {
loading.value = false;
}
};
const confirmSubmit = () => {
const confirmSubmit = async () => {
if (!form.scoreCardName) return ElMessage.error('请输入策略名称!');
syncVisible.value = true;
//
if (id.value) {
const res = await isTheStrategyRelatedToTheProduct({
tacticsId: id.value,
strategyType: 9,
});
if (res.isRelated) {
bankIds.value = res.bankIds;
syncVisible.value = true;
} else {
submit();
}
} else {
submit();
}
};
</script>

@ -73,7 +73,7 @@
class="px-3 py-2 justify-end"></el-pagination>
<el-drawer v-model="visible"
:title="(isDetail ? '查看' : curRow.strategyId ? '编辑' : '新增') + '企业信用评分策略'"
:title="(isDetail ? '查看' : curRow.id ? '编辑' : '新增') + '企业信用评分策略'"
size="100%"
custom-class="model-drawer">
<Detail v-model:row="curRow"
@ -134,7 +134,7 @@ const handleSelectionChange = (val: Record<string, any>[]) => {
};
//
const delAll = async () => {
handleDelete(multipleSelection.value.map((e) => e.strategyId));
handleDelete(multipleSelection.value.map((e) => e.id));
};
//
const toAdd = () => {

Loading…
Cancel
Save