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

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_PORT=9520
# VITE_PROXY=http://192.168.31.125:8080 # VITE_PROXY=http://192.168.31.125:8080
VITE_PUBLIC_PATH=./ 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=http://121.37.12.51
# VITE_BASE_API=https://www.occupationlab.com # VITE_BASE_API=https://www.occupationlab.com
VITE_I18N_LOCALE=zh-cn 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 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 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> => export const isTheStrategyRelatedToTheProduct = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`${host}/product/managerOfRiskControl/bankRiskControlAllocation/isTheStrategyRelatedToTheProduct`, {}, { params })).data; (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 '@vueup/vue-quill/dist/vue-quill.snow.css';
import { useDraggable } from '@vueuse/core'; import { useDraggable } from '@vueuse/core';
import { logout } from '@/store/useCurrentUser'; import { logout } from '@/store/useCurrentUser';
import { getIds, getNow } from '@/utils/common'; import { getNow } from '@/utils/common';
const router = useRouter(); const router = useRouter();
const route = useRoute(); const route = useRoute();
@ -818,7 +818,6 @@ onUnmounted(() => {
clearInterval(counterTimer.value); clearInterval(counterTimer.value);
clearInterval(heartBeatTimer.value); clearInterval(heartBeatTimer.value);
console.log('onUnmounted'); console.log('onUnmounted');
// next();
}); });
</script> </script>

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

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

@ -2,7 +2,6 @@ import NProgress from 'nprogress'; // progress bar
import 'nprogress/nprogress.css'; // progress bar style import 'nprogress/nprogress.css'; // progress bar style
import { RouteLocationNormalized } from 'vue-router'; import { RouteLocationNormalized } from 'vue-router';
import getPageTitle from '@/utils/getPageTitle'; import getPageTitle from '@/utils/getPageTitle';
import { getAccessToken } from '@/utils/auth'; // get token from cookie
import router from './router'; import router from './router';
NProgress.configure({ showSpinner: false }); // NProgress Configuration 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 { RouteRecordRaw } from 'vue-router';
import { removeAccessToken, removeParam } from '@/utils/auth'; import { removeAccessToken, removeParam } from '@/utils/auth';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -72,7 +72,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, defineAsyncComponent, onMounted, toRefs, reactive } from 'vue'; import { ref, defineAsyncComponent, onMounted, toRefs, reactive } from 'vue';
import { ElLoading, ElMessage } from 'element-plus'; 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 { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import { useRouter, useRoute } from 'vue-router'; import { useRouter, useRoute } from 'vue-router';
import type { TableColumnCtx } from 'element-plus'; import type { TableColumnCtx } from 'element-plus';
@ -100,6 +100,7 @@ const form = reactive({
}); });
const loading = ref<boolean>(false); const loading = ref<boolean>(false);
const syncVisible = ref<boolean>(false); const syncVisible = ref<boolean>(false);
const bankIds = ref<Record<string, any>[]>([]);
// //
const getConfig = async () => { const getConfig = async () => {
@ -154,9 +155,6 @@ const getDetail = async () => {
} }
}; };
onMounted(getDetail); onMounted(getDetail);
const isSelect = (rule: number): boolean => {
return rule === 589 || rule === 594;
};
interface SpanMethodProps { interface SpanMethodProps {
row: Record<string, any>; row: Record<string, any>;
@ -165,39 +163,7 @@ interface SpanMethodProps {
columnIndex: number; 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) => { const span = ({ row, column, rowIndex, columnIndex }: SpanMethodProps) => {
if (!columnIndex || columnIndex === 1) { if (!columnIndex || columnIndex === 1) {
if (!rowIndex || rowIndex === 31) { if (!rowIndex || rowIndex === 31) {
@ -252,42 +218,62 @@ const addRecord = async () => {
// //
const submit = async (synchronizeUpdate?: number) => { const submit = async (synchronizeUpdate?: number) => {
loading.value = true; loading.value = true;
const param = []; try {
const param = [];
list.value.forEach((e) => { list.value.forEach((e) => {
const child = { const child = {
id: e.id, id: e.id,
dimensionId: e.dimensionId, dimensionId: e.dimensionId,
recordName: e.sub, recordName: e.sub,
score: e.score, score: e.score,
recordName: e.index, recordName: e.index,
percentage: e.percentage, percentage: e.percentage,
}; };
const temp = { const temp = {
dimensionId: e.dimensionId, dimensionId: e.dimensionId,
strategyId: e.strategyId, strategyId: e.strategyId,
recordName: e.name, recordName: e.name,
isChoose: +e.isChoose, isChoose: +e.isChoose,
dimensionIndexList: [child], dimensionIndexList: [child],
}; };
if (e.span) { if (e.span) {
param.push(temp); param.push(temp);
} else { } else {
param[e.parent].dimensionIndexList.push(child); param[e.parent].dimensionIndexList.push(child);
} }
}); });
await saveCredit({ await saveCredit({
id: id.value, id: id.value,
...form, ...form,
...getIds(), ...getIds(),
synchronizeUpdate, synchronizeUpdate,
dimensionOfTheRatingTableList: param, dimensionOfTheRatingTableList: param,
}); bankIds: bankIds.value,
addRecord(); });
addRecord();
} catch (e) {
loading.value = false;
}
}; };
const confirmSubmit = () => { const confirmSubmit = async () => {
if (!form.scoreCardName) return ElMessage.error('请输入策略名称!'); 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> </script>

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

@ -15,7 +15,7 @@
<el-table class="c-table" <el-table class="c-table"
:data="list" :data="list"
:max-height="'calc(100vh - ' + (disabled ? 260 : 300) + 'px)'" :max-height="'calc(100vh - ' + (disabled ? 260 : 300) + 'px)'"
:span-method="span1" :span-method="span"
:cell-style="{background:'#fff'}" :cell-style="{background:'#fff'}"
border> border>
<el-table-column prop="name" <el-table-column prop="name"
@ -135,7 +135,7 @@
</template> </template>
<script setup lang="ts"> <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 { ElLoading, ElMessage } from 'element-plus';
import { saveCredit, findCredit } from '@/api/model'; import { saveCredit, findCredit } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment'; import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
@ -165,6 +165,7 @@ const form = reactive({
}); });
const loading = ref<boolean>(false); const loading = ref<boolean>(false);
const syncVisible = ref<boolean>(false); const syncVisible = ref<boolean>(false);
const bankIds = ref<Record<string, any>[]>([]);
// //
const getConfig = async () => { 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 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 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 (rowMerge3.includes(rowIndex)) {
if (!columnIndex) { if (!columnIndex) {
return { 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) => { const checkAll = (row: Record<string, any>, i: number) => {
@ -763,60 +734,81 @@ const addRecord = async () => {
// //
const submit = async (synchronizeUpdate?: number) => { const submit = async (synchronizeUpdate?: number) => {
loading.value = true; loading.value = true;
const param = []; try {
const param = [];
list.value.forEach((e, i) => {
const child = { list.value.forEach((e, i) => {
id: e?.id || '', const child = {
dimensionId: e.dimensionId ?? '', id: e?.id || '',
recordName: e.index ?? '', dimensionId: e.dimensionId ?? '',
score: e.score, recordName: e.index ?? '',
percentage: e.percentage, score: e.score,
}; percentage: e.percentage,
const temp = { };
calculationFormula: e.calculationFormula ?? '', const temp = {
dimensionId: e.dimensionId ?? '', calculationFormula: e.calculationFormula ?? '',
strategyId: id.value || '', dimensionId: e.dimensionId ?? '',
recordName: e.name, strategyId: id.value || '',
isChoose: +e.isChoose, recordName: e.name,
}; isChoose: +e.isChoose,
if (e.middle) { };
temp.dimensionIndexList = [child]; if (e.middle) {
if ((e.answerId2 > 595 && e.answerId2 < 600) || (e.answerId2 > 687 && e.answerId2 < 691)) temp.dimensionIndexList = [child];
temp.dimensionIndexList.push( 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 ?? '', id: list.value[i + 1].id ?? '',
recordName: list.value[i + 1].index ?? '', dimensionId: list.value[i + 1].dimensionId ?? '',
score: list.value[i + 1].score, recordName: list.value[i + 1].index ?? '',
percentage: list.value[i + 1].percentage, score: list.value[i + 1].score,
}, percentage: list.value[i + 1].percentage,
{ },
id: list.value[i + 2].id ?? '', {
dimensionId: list.value[i + 2].dimensionId ?? '', id: list.value[i + 2].id ?? '',
recordName: list.value[i + 2].index ?? '', dimensionId: list.value[i + 2].dimensionId ?? '',
score: list.value[i + 2].score, recordName: list.value[i + 2].index ?? '',
percentage: list.value[i + 2].percentage, score: list.value[i + 2].score,
}, percentage: list.value[i + 2].percentage,
); },
temp.recordName = e.sub; );
param.push(temp); temp.recordName = e.sub;
} else if (e.top) { param.push(temp);
param.push(temp); } else if (e.top) {
} param.push(temp);
}); }
await saveCredit({ });
id: id.value,
...form, await saveCredit({
...getIds(), id: id.value,
synchronizeUpdate, ...form,
dimensionOfTheRatingTableList: param, ...getIds(),
}); synchronizeUpdate,
addRecord(); dimensionOfTheRatingTableList: param,
bankIds: bankIds.value,
});
addRecord();
} catch (e) {
loading.value = false;
}
}; };
const confirmSubmit = () => { const confirmSubmit = async () => {
if (!form.scoreCardName) return ElMessage.error('请输入策略名称!'); 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> </script>

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

Loading…
Cancel
Save