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

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. 29
      src/views/product/afterLoan/1029/Detail.vue
  9. 25
      src/views/product/afterLoan/1030/Detail.vue
  10. 25
      src/views/product/afterLoan/1031/Detail.vue
  11. 25
      src/views/product/afterLoan/1032/Detail.vue
  12. 23
      src/views/product/afterLoan/1033/Detail.vue
  13. 25
      src/views/product/interestRate/772/Detail.vue
  14. 25
      src/views/product/interestRate/935/Detail.vue
  15. 27
      src/views/product/interestRate/936/Detail.vue
  16. 11
      src/views/product/strategy/150/Detail.vue
  17. 16
      src/views/product/strategy/150/Index.vue
  18. 22
      src/views/product/strategy/151/Detail.vue
  19. 25
      src/views/product/strategy/152/Detail.vue
  20. 25
      src/views/product/strategy/153/Detail.vue
  21. 25
      src/views/product/strategy/154/Detail.vue
  22. 24
      src/views/product/strategy/155/Detail.vue
  23. 24
      src/views/product/strategy/156/Detail.vue
  24. 60
      src/views/product/strategy/512/Detail.vue
  25. 4
      src/views/product/strategy/512/Index.vue
  26. 60
      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,6 +194,7 @@ const addRecord = async (data: Record<string, any>) => {
//
const submit = async (synchronizeUpdate?: number) => {
loading.value = true;
try {
let param = JSON.parse(JSON.stringify(form.value));
const recordParam = JSON.parse(JSON.stringify(param));
@ -205,12 +207,31 @@ const submit = async (synchronizeUpdate?: number) => {
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('请输入策略名称!');
//
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,6 +202,7 @@ const addRecord = async (data: Record<string, any>) => {
//
const submit = async (synchronizeUpdate?: number) => {
loading.value = true;
try {
let param = JSON.parse(JSON.stringify(form.value));
param.map((e, i) => {
e.creditData = +e.creditData;
@ -217,12 +219,31 @@ const submit = async (synchronizeUpdate?: number) => {
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('请输入策略名称!');
//
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,6 +378,7 @@ const addRecord = async (data: Record<string, any>) => {
//
const submit = async (synchronizeUpdate?: number) => {
loading.value = true;
try {
let param = JSON.parse(JSON.stringify(form.value));
const recordParam = JSON.parse(JSON.stringify(param));
param.map((e) => {
@ -388,12 +390,31 @@ const submit = async (synchronizeUpdate?: number) => {
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('请输入策略名称!');
//
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,6 +148,7 @@ const addRecord = async (data: Record<string, any>) => {
//
const submit = async (synchronizeUpdate?: number) => {
loading.value = true;
try {
let param = JSON.parse(JSON.stringify(form.value));
param.forEach((e) => {
e.isChoose = +e.isChoose;
@ -162,12 +164,31 @@ const submit = async (synchronizeUpdate?: number) => {
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('请输入策略名称!');
//
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,6 +185,7 @@ const addRecord = async (data: Record<string, any>) => {
};
//
const submit = async (synchronizeUpdate?: number) => {
try {
let param = JSON.parse(JSON.stringify(form.value));
param.map((e) => {
e.appCollection = +e.appCollection;
@ -202,12 +204,29 @@ const submit = async (synchronizeUpdate?: number) => {
strategyName: strategyName.value,
synchronizeUpdate,
collectionAfterLoanList: param,
bankIds: bankIds.value,
});
addRecord(recordParam);
} catch (e) {}
};
const confirmSubmit = () => {
const confirmSubmit = async () => {
if (!strategyName.value) return ElMessage.error('请输入策略名称!');
//
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;
});
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('请输入模型名称!');
//
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;
});
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('请输入模型名称!');
//
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;
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('请输入模型名称!');
//
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,6 +339,7 @@ const addRecord = async (data: Record<string, any>) => {
//
const submit = async (synchronizeUpdate?: number) => {
loading.value = true;
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;
@ -378,8 +380,13 @@ const submit = async (synchronizeUpdate?: number) => {
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,6 +271,7 @@ const addRecord = async (data: Record<string, any>) => {
//
const submit = async (synchronizeUpdate?: number) => {
loading.value = true;
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;
@ -293,10 +294,27 @@ const submit = async (synchronizeUpdate?: number) => {
creditBlacklistList: param,
});
addRecord(recordParam);
} catch (e) {
loading.value = false;
}
};
const confirmSubmit = () => {
const confirmSubmit = async () => {
if (!strategyName.value) return ElMessage.error('请输入策略名称!');
//
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,7 +456,8 @@ const addRecord = async (data: Record<string, any>) => {
//
const submit = async (synchronizeUpdate?: number) => {
loading.value = true;
let param = [
try {
const param = [
{
id: info.value.find((n) => n.stRecordId === 318)?.id,
stRecordId: 318,
@ -497,10 +497,27 @@ const submit = async (synchronizeUpdate?: number) => {
businessBlacklistList: param,
});
addRecord(param);
} catch (e) {
loading.value = false;
}
};
const confirmSubmit = () => {
const confirmSubmit = async () => {
if (!strategyName.value) return ElMessage.error('请输入策略名称!');
//
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,7 +284,8 @@ const addRecord = async (data: Record<string, any>) => {
//
const submit = async (synchronizeUpdate?: number) => {
loading.value = true;
let param = JSON.parse(JSON.stringify(form.value));
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;
@ -302,10 +302,27 @@ const submit = async (synchronizeUpdate?: number) => {
inlineBlacklistList: param,
});
addRecord(param);
} catch (e) {
loading.value = false;
}
};
const confirmSubmit = () => {
const confirmSubmit = async () => {
if (!strategyName.value) return ElMessage.error('请输入策略名称!');
//
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,7 +402,8 @@ const addRecord = async (data: Record<string, any>) => {
//
const submit = async (synchronizeUpdate?: number) => {
loading.value = true;
let param = [];
try {
const param = [];
form.value.map((e, i) => {
const temp = {
id: info.value.find((n) => n.stRecordId === e.stRecordId)?.id ?? '',
@ -431,10 +431,27 @@ const submit = async (synchronizeUpdate?: number) => {
enterpriseBlacklistList: param,
});
addRecord(param);
} catch (e) {
loading.value = false;
}
};
const confirmSubmit = () => {
const confirmSubmit = async () => {
if (!strategyName.value) return ElMessage.error('请输入策略名称!');
//
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,7 +381,8 @@ const addRecord = async (data: Record<string, any>) => {
//
const submit = async (synchronizeUpdate?: number) => {
loading.value = true;
let param = [
try {
const param = [
{
id: info.value.find((n) => n.stRecordId === 384)?.id,
stRecordId: 384,
@ -434,10 +435,27 @@ const submit = async (synchronizeUpdate?: number) => {
antiFraudStrategyList: param,
});
addRecord(param);
} catch (e) {
loading.value = false;
}
};
const confirmSubmit = () => {
const confirmSubmit = async () => {
if (!strategyName.value) return ElMessage.error('请输入策略名称!');
//
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,7 +225,8 @@ const addRecord = async (data: Record<string, any>) => {
//
const submit = async (synchronizeUpdate?: number) => {
loading.value = true;
let param = [];
try {
const param = [];
form.value.map((e, i) => {
if (e.index) {
param.push({
@ -248,10 +249,27 @@ const submit = async (synchronizeUpdate?: number) => {
negativeIndustryStrategyList: param,
});
addRecord(param);
} catch (e) {
loading.value = false;
}
};
const confirmSubmit = () => {
const confirmSubmit = async () => {
if (!strategyName.value) return ElMessage.error('请输入策略名称!');
//
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,6 +218,7 @@ const addRecord = async () => {
//
const submit = async (synchronizeUpdate?: number) => {
loading.value = true;
try {
const param = [];
list.value.forEach((e) => {
@ -282,12 +249,31 @@ const submit = async (synchronizeUpdate?: number) => {
...getIds(),
synchronizeUpdate,
dimensionOfTheRatingTableList: param,
bankIds: bankIds.value,
});
addRecord();
} catch (e) {
loading.value = false;
}
};
const confirmSubmit = () => {
const confirmSubmit = async () => {
if (!form.scoreCardName) return ElMessage.error('请输入策略名称!');
//
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,6 +734,7 @@ const addRecord = async () => {
//
const submit = async (synchronizeUpdate?: number) => {
loading.value = true;
try {
const param = [];
list.value.forEach((e, i) => {
@ -805,18 +777,38 @@ const submit = async (synchronizeUpdate?: number) => {
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('请输入策略名称!');
//
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