操作日期等

V0.1
yujialong 1 year ago
parent 669dc22e9d
commit 5c2a578f67
  1. 2
      .env
  2. 6
      src/api/config.ts
  3. BIN
      src/assets/images/date.png
  4. 62
      src/layout/components/AppSidebar/index.vue
  5. 30
      src/views/Role.vue
  6. 86
      src/views/product/bank/Approve.vue
  7. 4
      src/views/product/bank/CardList.vue
  8. 6
      src/views/product/bank/Info.vue
  9. 10
      src/views/product/interestRate/772.vue
  10. 10
      src/views/product/interestRate/773.vue
  11. 11
      src/views/product/interestRate/935.vue
  12. 10
      src/views/product/interestRate/936.vue
  13. 18
      src/views/product/strategy/150.vue
  14. 2
      src/views/product/strategy/156.vue
  15. 28
      src/views/product/strategy/CardList.vue
  16. 8
      src/views/product/strategy/Credit.vue
  17. 10
      src/views/product/strategy/Risk1.vue
  18. 11
      src/views/product/strategy/Risk2.vue
  19. 11
      src/views/product/strategy/Risk3.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.51:9000 # VITE_BASE_API=http://192.168.31.217:9000
VITE_BASE_API=http://121.37.12.51 VITE_BASE_API=http://121.37.12.51
VITE_I18N_LOCALE=zh-cn VITE_I18N_LOCALE=zh-cn
VITE_I18N_FALLBACK_LOCALE=zh-cn VITE_I18N_FALLBACK_LOCALE=zh-cn

@ -15,3 +15,9 @@ export const savePass = async (data: Record<string, any>): Promise<any> => (awai
export const updatePass = async (data: Record<string, any>[]): Promise<any> => (await axios.post(`/nakadai/nakadai/customsPass/update`, data)).data; export const updatePass = async (data: Record<string, any>[]): Promise<any> => (await axios.post(`/nakadai/nakadai/customsPass/update`, data)).data;
export const checkPointListByStu = async (projectId: number, displayCollection?: number | string = ''): Promise<any> => export const checkPointListByStu = async (projectId: number, displayCollection?: number | string = ''): Promise<any> =>
(await axios.post(`/nakadai/nakadai/customsPass/checkPointListByStu?projectId=${projectId}&displayCollection=${displayCollection}`)).data; (await axios.post(`/nakadai/nakadai/customsPass/checkPointListByStu?projectId=${projectId}&displayCollection=${displayCollection}`)).data;
export const getTheCurrentUserName = async (): Promise<any> => (await axios.post('/product/product/bank/products/getTheCurrentUserName')).data;
export const getOperationTime = async (checkpointId: number, projectId: number): Promise<any> =>
(await axios.post(`/product/product/bank/products/getOperationTime?checkPointId=${checkpointId}&projectId=${projectId}`)).data;
export const saveOperationTime = async (checkpointId: number, projectId: number, operationTime: string): Promise<any> =>
(await axios.post(`/product/product/bank/products/saveOperationTime?checkPointId=${checkpointId}&projectId=${projectId}&operationTime=${operationTime}`)).data;

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

@ -7,23 +7,54 @@
alt="" /> alt="" />
<p class="text-white text-md">{{roleName}}</p> <p class="text-white text-md">{{roleName}}</p>
<p class="my-2 text-white text-sm">产品部门</p> <p class="my-2 text-white text-sm">产品部门</p>
<p class="text-white text-xs">操作日期2018-02-06</p> <div class="flex justify-center items-center text-white text-xs">
操作日期{{ date }}
<img class="ml-2 cursor-pointer"
src="@/assets/images/date.png"
alt=""
@click="dateVisible = true">
</div>
</div> </div>
<menus></menus> <menus></menus>
</el-scrollbar> </el-scrollbar>
<el-dialog v-model="dateVisible"
title="选择交易日期"
width="400px"
center>
<div class="text-center">
<el-date-picker v-model="diaDate"
type="date" />
</div>
<template #footer>
<span class="flex justify-center">
<div class="dia-btn mr-3 cancel"
@click="dateVisible = false">取消</div>
<div class="dia-btn"
@click="submitDate">确定</div>
</span>
</template>
</el-dialog>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { computed } from 'vue'; import { onMounted, ref, computed } from 'vue';
import { useRouter, useRoute } from 'vue-router'; import { useRouter, useRoute } from 'vue-router';
import Menus from './Menu.vue'; import Menus from './Menu.vue';
import Settings from '@/settings'; import Settings from '@/settings';
import { isShowMenu } from '@/store/useCurrentUser'; import { getOperationTime, saveOperationTime } from '@/api/config';
import { appState } from '@/store/useAppState'; import { appState } from '@/store/useAppState';
import Cookies from 'js-cookie';
import dayjs from 'dayjs';
const router = useRouter(); const router = useRouter();
const route = useRoute(); const route = useRoute();
const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const date = ref<string>(dayjs(new Date()).format('YYYY-M-D'));
const diaDate = ref<string>(dayjs(new Date()).format('YYYY-M-D'));
const dateVisible = ref<boolean>(false);
const roleName = computed(() => { const roleName = computed(() => {
if (route.query.role) { if (route.query.role) {
@ -32,14 +63,23 @@ const roleName = computed(() => {
return '保险产品经理'; return '保险产品经理';
} }
}); });
//
// Cool Gray 700 const getDate = async () => {
const sidebarBg = '#374151'; const res = await getOperationTime(levelId, projectId);
// Cool Gray 400 if (res.operationTime) {
const textColor = '#9CA3AF'; date.value = res.operationTime;
const activeTextColor = '#FFF'; diaDate.value = res.operationTime;
const { routes } = router.options; }
const collapse = computed(() => !appState.sidebar); };
//
const submitDate = async () => {
await saveOperationTime(levelId, projectId, dayjs(new Date(diaDate.value)).format('YYYY-M-D'));
getDate();
dateVisible.value = false;
};
onMounted(() => {
getDate();
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

@ -64,7 +64,7 @@
<div class="date absolute top-[70px] left-[54%] w-[198px] h-[46px] pt-[10px] pl-[56px] text-base text-white bg-[url('@/assets/images/role/date.png')] bg-no-repeat cursor-pointer transition hover:bg-[url('@/assets/images/role/date1.png')]" <div class="date absolute top-[70px] left-[54%] w-[198px] h-[46px] pt-[10px] pl-[56px] text-base text-white bg-[url('@/assets/images/role/date.png')] bg-no-repeat cursor-pointer transition hover:bg-[url('@/assets/images/role/date1.png')]"
@click="dateVisible = true"> @click="dateVisible = true">
2023-10-12 {{ date }}
</div> </div>
<div class="role top-[310px] left-[340px] bg-[url('@/assets/images/role/product.png')] hover:bg-[url('@/assets/images/role/product1.png')]" <div class="role top-[310px] left-[340px] bg-[url('@/assets/images/role/product.png')] hover:bg-[url('@/assets/images/role/product1.png')]"
@click="selecRole(41)"></div> @click="selecRole(41)"></div>
@ -121,7 +121,7 @@
width="400px" width="400px"
center> center>
<div class="text-center"> <div class="text-center">
<el-date-picker v-model="date" <el-date-picker v-model="diaDate"
type="date" /> type="date" />
</div> </div>
<template #footer> <template #footer>
@ -129,7 +129,7 @@
<div class="dia-btn mr-3 cancel" <div class="dia-btn mr-3 cancel"
@click="dateVisible = false">取消</div> @click="dateVisible = false">取消</div>
<div class="dia-btn" <div class="dia-btn"
@click="dateVisible = false">确定</div> @click="submitDate">确定</div>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
@ -138,16 +138,22 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
import { checkPointList } from '@/api/judgment'; import { checkPointList } from '@/api/judgment';
import { getOperationTime, saveOperationTime } from '@/api/config';
import Panel from '@/components/Panel/index.vue'; import Panel from '@/components/Panel/index.vue';
import { useRouter, useRoute } from 'vue-router'; import { useRouter, useRoute } from 'vue-router';
import { logout } from '@/store/useCurrentUser'; import { logout } from '@/store/useCurrentUser';
import Cookies from 'js-cookie';
import dayjs from 'dayjs';
const router = useRouter(); const router = useRouter();
const route = useRoute(); const route = useRoute();
const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const collected = ref<boolean>(false); const collected = ref<boolean>(false);
const curLevel = ref<number | string>(''); const curLevel = ref<number | string>('');
const dateVisible = ref<boolean>(false); const dateVisible = ref<boolean>(false);
const date = ref<any>(new Date()); const date = ref<string>(dayjs(new Date()).format('YYYY-M-D'));
const diaDate = ref<string>(dayjs(new Date()).format('YYYY-M-D'));
const levels = ref<Record<string, any>[]>([]); const levels = ref<Record<string, any>[]>([]);
const ranges = ref<Record<string, any>[]>([ const ranges = ref<Record<string, any>[]>([
{ {
@ -226,8 +232,22 @@ const selecRole = (id: number) => {
const toLevel = () => { const toLevel = () => {
router.push('/'); router.push('/');
}; };
//
const getDate = async () => {
const res = await getOperationTime(levelId, projectId);
if (res.operationTime) {
date.value = res.operationTime;
diaDate.value = res.operationTime;
}
};
//
const submitDate = async () => {
await saveOperationTime(levelId, projectId, dayjs(new Date(diaDate.value)).format('YYYY-M-D'));
getDate();
dateVisible.value = false;
};
onMounted(() => { onMounted(() => {
// getLevel(); getDate();
}); });
</script> </script>

@ -1,10 +1,9 @@
<template> <template>
<div> <div>
<el-tabs v-model="curTab" <el-tabs v-model="curTab">
@tab-click="tabChange">
<el-tab-pane label="产品审批" <el-tab-pane label="产品审批"
name="tab1"> name="tab1">
<info /> <info ref="infoRef" />
<el-form ref="formRef" <el-form ref="formRef"
:model="form" :model="form"
:rules="rules" :rules="rules"
@ -32,11 +31,15 @@
<div class="flex flex-col items-end"> <div class="flex flex-col items-end">
<div class="mb-[18px] text-sm leading-[1.6]"> <div class="mb-[18px] text-sm leading-[1.6]">
<span class="text-sm font-semibold">审批日期</span> <span class="text-sm font-semibold">审批日期</span>
<span>2022年10月18日</span> <span>{{ date }}</span>
</div> </div>
<div class="inline-flex items-center mb-[18px] text-sm leading-[1.6]"> <div class="inline-flex items-center mb-[18px] text-sm leading-[1.6]">
<span class="text-sm font-semibold">审批员</span> <span class="text-sm font-semibold">审批员</span>
<span class="py-2 px-5 ml-1 text-sm text-white bg-[#006BFF] cursor-pointer">签章</span> <span v-if="signed"
class="text-lg text-[#f00]">{{ signed }}</span>
<span v-else
class="py-2 px-5 ml-1 text-sm text-white bg-[#006BFF] cursor-pointer"
@click="sign">签章</span>
</div> </div>
</div> </div>
<div class="flex justify-end"> <div class="flex justify-end">
@ -50,14 +53,17 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed, reactive, watch, onMounted } from 'vue'; import { ref, computed, reactive, onMounted } from 'vue';
import { ElMessage } from 'element-plus'; import { ElMessage } from 'element-plus';
import type { TabsPaneContext, FormInstance, FormRules } from 'element-plus'; import type { TabsPaneContext, FormInstance, FormRules } from 'element-plus';
import { useRouter, useRoute } from 'vue-router'; import { useRouter, useRoute } from 'vue-router';
import Info from './Info.vue'; import Info from './Info.vue';
import { handleId } from '@/utils/common';
import { findById, examineAndApprove } from '@/api/bank'; import { findById, examineAndApprove } from '@/api/bank';
import { getTheCurrentUserName, getOperationTime } from '@/api/config';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment'; import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import Cookies from 'js-cookie';
const emit = defineEmits(['getList']); const emit = defineEmits(['getList']);
interface RuleForm { interface RuleForm {
@ -67,10 +73,14 @@ interface RuleForm {
} }
const router = useRouter(); const router = useRouter();
const route = useRoute(); const route = useRoute();
const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const curTab = ref<string>('tab1'); const curTab = ref<string>('tab1');
const date = ref<string>(dayjs(new Date()).format('YYYY-M-D'));
const info = ref<any>({}); const info = ref<any>({});
const config = ref<any[]>([]); const config = ref<any[]>([]);
const formRef = ref<FormInstance>(); const formRef = ref<FormInstance>();
const infoRef = ref<any>(null);
const form = reactive<RuleForm>({ const form = reactive<RuleForm>({
id: computed(() => +route.query.id), id: computed(() => +route.query.id),
status: '', status: '',
@ -80,25 +90,41 @@ const rules = reactive<FormRules<RuleForm>>({
status: [{ required: true, message: '请选择审批意见', trigger: 'change' }], status: [{ required: true, message: '请选择审批意见', trigger: 'change' }],
opinionDescription: [{ required: true, message: '请输入意见描述', trigger: 'blur' }], opinionDescription: [{ required: true, message: '请输入意见描述', trigger: 'blur' }],
}); });
const signed = ref<string>();
// tab
const tabChange = (tab: TabsPaneContext, event: Event) => {
console.log(tab, event);
};
// //
const getConfig = async () => { const getConfig = async () => {
const { process } = await getProcessInformationBasedOnRoles(43); // 43 const { process } = await getProcessInformationBasedOnRoles(43); // 43
config.value = process; config.value = process;
}; };
watch( //
() => route.query, const getDate = async () => {
() => { const res = await getOperationTime(levelId, projectId);
// getDetail(); if (res.operationTime) {
}, date.value = res.operationTime;
{ }
immediate: true, };
}, //
); const sign = async () => {
const res = await getTheCurrentUserName();
signed.value = res.userName;
};
//
const addRecord = async (data: Record<string, any>) => {
const preIds = `1,${levelId},43`; // 1id
const approved = !!infoRef.value.info.approvalTime; // id
const lcRule = [
handleId(approved ? 1215 : 145, 69, data.status, preIds + ',' + (approved ? 1215 : 145), 1),
handleId(approved ? 1216 : 146, 70, data.opinionDescription, preIds + ',' + (approved ? 1216 : 146), 3),
handleId(approved ? 1217 : 758, 233, signed.value ? 514 : 515, preIds + ',' + (approved ? 1217 : 758), 1),
];
await addOperation({
checkpointId: levelId,
parentId: preIds,
lcJudgmentRuleReq: lcRule,
projectId,
});
};
// //
const submit = async (formEl: FormInstance | undefined) => { const submit = async (formEl: FormInstance | undefined) => {
if (!formEl) return; if (!formEl) return;
@ -106,34 +132,20 @@ const submit = async (formEl: FormInstance | undefined) => {
if (valid) { if (valid) {
try { try {
const param = JSON.parse(JSON.stringify(form)); const param = JSON.parse(JSON.stringify(form));
param.approvalTime = dayjs(new Date()).format('YYYY-M-D'); param.approvalTime = dayjs(new Date()).format('YYYY-M-D');
// const { message } = await examineAndApprove(param); await examineAndApprove(param.id, param.opinionDescription, param.status, param.approvalTime);
const { message } = await examineAndApprove(param.id, param.opinionDescription, param.status, param.approvalTime); addRecord(param);
// addRecord(param, message);
ElMessage.success('提交成功!'); ElMessage.success('提交成功!');
emit('getList', 1); emit('getList', 1);
} finally { } finally {
} }
} else {
console.log('error submit!', fields);
} }
}); });
}; };
//
const addRecord = async (data: Record<string, any>, newId: number) => {
const preIds = `1,2,43,${data.productType ? 45 : 44},${newId}`; // 1id/44/45
const lcRule: Array<Record<string, any>> = [handleId(145, 69, data.status, preIds + ',145', 1), handleId(146, 70, data.opinionDescription, preIds + ',146', 3)];
await addOperation({
checkpointId: +Cookies.get('sand-level'),
parentId: preIds,
lcJudgmentRuleReq: lcRule,
projectId: +Cookies.get('sand-projectId'),
});
};
onMounted(() => { onMounted(() => {
getConfig(); getConfig();
getDate();
}); });
</script> </script>

@ -81,7 +81,7 @@ const productType = computed(() => route.query.type); // 个人/企业
const role = computed(() => +route.query.role || 41); const role = computed(() => +route.query.role || 41);
const id = computed(() => +route.query.id); const id = computed(() => +route.query.id);
// //
const getList = async () => { const getList = async (refresh?: number) => {
loading.value = true; loading.value = true;
try { try {
const { data } = await bankingProductsList({ const { data } = await bankingProductsList({
@ -94,7 +94,7 @@ const getList = async () => {
keyWord: name, keyWord: name,
}); });
list.value = data.message.records; list.value = data.message.records;
route.path !== '/product/bank/add' && list.value.length && !id.value && switchProduct(route.path, list.value[0].id); ((route.path !== '/product/bank/add' && list.value.length && !id.value) || refresh) && switchProduct(refresh ? '/product/bank/detail' : route.path, list.value[0].id);
} finally { } finally {
loading.value = false; loading.value = false;
} }

@ -121,7 +121,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed, watch, onMounted } from 'vue'; import { ref, computed, watch, defineExpose } from 'vue';
import { findById } from '@/api/bank'; import { findById } from '@/api/bank';
import { useRouter, useRoute } from 'vue-router'; import { useRouter, useRoute } from 'vue-router';
import { getStatus } from '@/store/useProduct'; import { getStatus } from '@/store/useProduct';
@ -152,6 +152,10 @@ watch(
immediate: true, immediate: true,
}, },
); );
defineExpose({
info,
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

@ -83,7 +83,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
import { ElMessage } from 'element-plus'; import { ElMessage, ElLoading } from 'element-plus';
import { personalCreditModelDetails, personalCreditModelSaveOrUpdate } from '@/api/model'; import { personalCreditModelDetails, personalCreditModelSaveOrUpdate } 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';
@ -95,6 +95,7 @@ const router = useRouter();
const route = useRoute(); const route = useRoute();
const projectId = +Cookies.get('sand-projectId'); const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level'); const levelId = +Cookies.get('sand-level');
let loading = null;
const form = ref<Record<string, any>>({ const form = ref<Record<string, any>>({
projectId, projectId,
checkpointId: levelId, checkpointId: levelId,
@ -166,9 +167,11 @@ const getConfig = async () => {
}); });
} }
form.value.individualCreditModels = result; form.value.individualCreditModels = result;
loading.close();
}; };
// //
const getDetail = async () => { const getDetail = async (load?: number) => {
if (load) loading = ElLoading.service();
try { try {
const { data } = await personalCreditModelDetails(levelId, projectId); const { data } = await personalCreditModelDetails(levelId, projectId);
if (data) { if (data) {
@ -180,7 +183,7 @@ const getDetail = async () => {
} }
}; };
onMounted(() => { onMounted(() => {
getDetail(); getDetail(1);
}); });
interface SpanMethodProps { interface SpanMethodProps {
@ -285,6 +288,7 @@ const submit = async () => {
delete e.recordChildren; delete e.recordChildren;
delete e.subject; delete e.subject;
}); });
loading = ElLoading.service();
await personalCreditModelSaveOrUpdate(param); await personalCreditModelSaveOrUpdate(param);
addRecord(param); addRecord(param);
getDetail(); getDetail();

@ -86,7 +86,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
import { ElMessage } from 'element-plus'; import { ElMessage, ElLoading } from 'element-plus';
import { businessQuotaModelDetails, businessQuotaModelSaveOrUpdate } from '@/api/model'; import { businessQuotaModelDetails, businessQuotaModelSaveOrUpdate } 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';
@ -97,6 +97,7 @@ const router = useRouter();
const route = useRoute(); const route = useRoute();
const projectId = +Cookies.get('sand-projectId'); const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level'); const levelId = +Cookies.get('sand-level');
let loading = null;
const form = ref<Record<string, any>>({ const form = ref<Record<string, any>>({
projectId, projectId,
checkpointId: levelId, checkpointId: levelId,
@ -116,9 +117,11 @@ const info = ref<Record<string, any>[]>([]);
const getConfig = async () => { const getConfig = async () => {
const { process } = await getProcessInformationBasedOnRoles(773); const { process } = await getProcessInformationBasedOnRoles(773);
info.value = process; info.value = process;
loading.close();
}; };
// //
const getDetail = async () => { const getDetail = async (load?: number) => {
if (load) loading = ElLoading.service();
try { try {
const { data } = await businessQuotaModelDetails(levelId, projectId); const { data } = await businessQuotaModelDetails(levelId, projectId);
if (data) { if (data) {
@ -129,7 +132,7 @@ const getDetail = async () => {
} }
}; };
onMounted(() => { onMounted(() => {
getDetail(); getDetail(1);
}); });
const getItemId = (name: string): number | string => { const getItemId = (name: string): number | string => {
@ -158,6 +161,7 @@ const addRecord = async (data: Record<string, any>) => {
}; };
// //
const submit = async () => { const submit = async () => {
loading = ElLoading.service();
await businessQuotaModelSaveOrUpdate(form.value); await businessQuotaModelSaveOrUpdate(form.value);
addRecord(form.value); addRecord(form.value);
getDetail(); getDetail();

@ -86,7 +86,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
import { ElMessage } from 'element-plus'; import { ElMessage, ElLoading } from 'element-plus';
import { personalInterestRateDetails, personalInterestRateSaveOrUpdate } from '@/api/model'; import { personalInterestRateDetails, personalInterestRateSaveOrUpdate } 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';
@ -98,6 +98,7 @@ const router = useRouter();
const route = useRoute(); const route = useRoute();
const projectId = +Cookies.get('sand-projectId'); const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level'); const levelId = +Cookies.get('sand-level');
let loading = null;
const form = ref<Record<string, any>>({ const form = ref<Record<string, any>>({
projectId, projectId,
checkpointId: levelId, checkpointId: levelId,
@ -148,10 +149,11 @@ const getConfig = async () => {
}); });
} }
form.value.individualInterestRateModels = result; form.value.individualInterestRateModels = result;
console.log('🚀 ~ file: 935.vue:173 ~ getConfig ~ result:', result); loading.close();
}; };
// //
const getDetail = async () => { const getDetail = async (load?: number) => {
if (load) loading = ElLoading.service();
try { try {
const { data } = await personalInterestRateDetails(levelId, projectId); const { data } = await personalInterestRateDetails(levelId, projectId);
if (data) { if (data) {
@ -163,7 +165,7 @@ const getDetail = async () => {
} }
}; };
onMounted(() => { onMounted(() => {
getDetail(); getDetail(1);
}); });
interface SpanMethodProps { interface SpanMethodProps {
@ -241,6 +243,7 @@ const submit = async () => {
delete e.recordChildren; delete e.recordChildren;
delete e.subject; delete e.subject;
}); });
loading = ElLoading.service();
await personalInterestRateSaveOrUpdate(param); await personalInterestRateSaveOrUpdate(param);
addRecord(param); addRecord(param);
getDetail(); getDetail();

@ -91,7 +91,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
import { ElMessage } from 'element-plus'; import { ElMessage, ElLoading } from 'element-plus';
import { businessInterestRateDetails, businessInterestRateSaveOrUpdate } from '@/api/model'; import { businessInterestRateDetails, businessInterestRateSaveOrUpdate } 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';
@ -103,6 +103,7 @@ const router = useRouter();
const route = useRoute(); const route = useRoute();
const projectId = +Cookies.get('sand-projectId'); const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level'); const levelId = +Cookies.get('sand-level');
let loading = null;
const form = ref<Record<string, any>>({ const form = ref<Record<string, any>>({
projectId, projectId,
checkpointId: levelId, checkpointId: levelId,
@ -154,9 +155,11 @@ const getConfig = async () => {
}); });
}); });
form.value.corporateInterestRateModelIndicators = result; form.value.corporateInterestRateModelIndicators = result;
loading.close();
}; };
// //
const getDetail = async () => { const getDetail = async (load?: number) => {
if (load) loading = ElLoading.service();
try { try {
const { data } = await businessInterestRateDetails(levelId, projectId); const { data } = await businessInterestRateDetails(levelId, projectId);
if (data) { if (data) {
@ -168,7 +171,7 @@ const getDetail = async () => {
} }
}; };
onMounted(() => { onMounted(() => {
getDetail(); getDetail(1);
}); });
interface SpanMethodProps { interface SpanMethodProps {
@ -266,6 +269,7 @@ const addRecord = async (data: Record<string, any>) => {
}; };
// //
const submit = async () => { const submit = async () => {
loading = ElLoading.service();
const param = JSON.parse(JSON.stringify(form.value)); const param = JSON.parse(JSON.stringify(form.value));
const list = []; const list = [];
param.corporateInterestRateModelIndicators.forEach((e, i) => { param.corporateInterestRateModelIndicators.forEach((e, i) => {

@ -4,14 +4,16 @@
:data="form" :data="form"
:max-height="height" :max-height="height"
:span-method="span" :span-method="span"
style="width: 100%"
border> border>
<el-table-column prop="name" <el-table-column prop="name"
fixed
label="指标" label="指标"
min-width="150" width="150"
align="center"> align="center">
</el-table-column> </el-table-column>
<el-table-column label="规则" <el-table-column label="规则"
min-width="350" width="350"
align="center"> align="center">
<template #default="{ row }"> <template #default="{ row }">
<!-- 大病报销 || 贫困户 --> <!-- 大病报销 || 贫困户 -->
@ -71,42 +73,42 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="本人命中进黑名单" <el-table-column label="本人命中进黑名单"
min-width="140" width="150"
align="center"> align="center">
<template #default="{ row }"> <template #default="{ row }">
<el-checkbox v-model="row.personalHitBlacklist"></el-checkbox> <el-checkbox v-model="row.personalHitBlacklist"></el-checkbox>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="配偶命中拒入" <el-table-column label="配偶命中拒入"
min-width="140" width="150"
align="center"> align="center">
<template #default="{ row }"> <template #default="{ row }">
<el-checkbox v-model="row.mateHitRejected"></el-checkbox> <el-checkbox v-model="row.mateHitRejected"></el-checkbox>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="父母/子女命中拒入" <el-table-column label="父母/子女命中拒入"
min-width="140" width="140"
align="center"> align="center">
<template #default="{ row }"> <template #default="{ row }">
<el-checkbox v-model="row.parentsHitRejected"></el-checkbox> <el-checkbox v-model="row.parentsHitRejected"></el-checkbox>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="其他家庭成员命中拒入" <el-table-column label="其他家庭成员命中拒入"
min-width="140" width="160"
align="center"> align="center">
<template #default="{ row }"> <template #default="{ row }">
<el-checkbox v-model="row.otherFamilyMembersHitRejected"></el-checkbox> <el-checkbox v-model="row.otherFamilyMembersHitRejected"></el-checkbox>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="企业大股东命中拒入" <el-table-column label="企业大股东命中拒入"
min-width="140" width="160"
align="center"> align="center">
<template #default="{ row }"> <template #default="{ row }">
<el-checkbox v-model="row.corporateMajorityHitRejected"></el-checkbox> <el-checkbox v-model="row.corporateMajorityHitRejected"></el-checkbox>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="本人及亲属企业命中准入" <el-table-column label="本人及亲属企业命中准入"
min-width="140" width="180"
align="center"> align="center">
<template #default="{ row }"> <template #default="{ row }">
<el-checkbox v-model="row.hitAccess" <el-checkbox v-model="row.hitAccess"

@ -62,7 +62,7 @@ import { accessStrategyNegativeIndustryStrategyFind, accessStrategyNegativeIndus
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';
import { handleId, getNum, getChinese } from '@/utils/common'; import { handleId } from '@/utils/common';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
const router = useRouter(); const router = useRouter();

@ -18,13 +18,27 @@
</ul> </ul>
</div> </div>
<div class="right flex-1 px-5 pt-2"> <div class="right flex-1 px-5 pt-2">
<Com1 v-if="id == 150" /> <div v-show="id == 150">
<Com2 v-else-if="id == 151" /> <Com1 />
<Com3 v-else-if="id == 152" /> </div>
<Com4 v-else-if="id == 153" /> <div v-show="id == 151">
<Com5 v-else-if="id == 154" /> <Com2 />
<Com6 v-else-if="id == 155" /> </div>
<Com7 v-else-if="id == 156" /> <div v-show="id == 152">
<Com3 />
</div>
<div v-show="id == 153">
<Com4 />
</div>
<div v-show="id == 154">
<Com5 />
</div>
<div v-show="id == 155">
<Com6 />
</div>
<div v-show="id == 156">
<Com7 />
</div>
</div> </div>
</div> </div>
</el-tab-pane> </el-tab-pane>

@ -175,7 +175,7 @@ const route = useRoute();
const id = computed(() => +route.query.creditId); const id = computed(() => +route.query.creditId);
const projectId = +Cookies.get('sand-projectId'); const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level'); const levelId = +Cookies.get('sand-level');
let loading: boolean = true; let loading = null;
const list = ref<Record<string, any>[]>([]); const list = ref<Record<string, any>[]>([]);
const list1 = ref<Record<string, any>[]>([]); const list1 = ref<Record<string, any>[]>([]);
const detail = ref<Record<string, any>>({}); const detail = ref<Record<string, any>>({});
@ -605,8 +605,8 @@ const getConfig = async () => {
loading.close(); loading.close();
}; };
// //
const getDetail = async () => { const getDetail = async (load?: number) => {
loading = ElLoading.service(); if (load) loading = ElLoading.service();
if (id.value) { if (id.value) {
try { try {
const res = await findCredit(id.value); const res = await findCredit(id.value);
@ -635,7 +635,7 @@ const getDetail = async () => {
watch( watch(
() => route.query, () => route.query,
() => { () => {
getDetail(); getDetail(1);
}, },
{ {
immediate: true, immediate: true,

@ -54,7 +54,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
import { ElMessage } from 'element-plus'; import { ElMessage, ElLoading } from 'element-plus';
import { detailRick, saveRick } from '@/api/model'; import { detailRick, saveRick } 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';
@ -65,6 +65,7 @@ const router = useRouter();
const route = useRoute(); const route = useRoute();
const projectId = +Cookies.get('sand-projectId'); const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level'); const levelId = +Cookies.get('sand-level');
let loading = null;
const form = ref<Record<string, any>[]>([]); const form = ref<Record<string, any>[]>([]);
const info = ref<Record<string, any>[]>([]); const info = ref<Record<string, any>[]>([]);
// //
@ -87,9 +88,11 @@ const getConfig = async () => {
}); });
}); });
form.value = result; form.value = result;
loading.close();
}; };
// //
const getDetail = async () => { const getDetail = async (load?: number) => {
if (load) loading = ElLoading.service();
try { try {
const { data } = await detailRick({ const { data } = await detailRick({
checkpointId: levelId, checkpointId: levelId,
@ -102,11 +105,12 @@ const getDetail = async () => {
} }
}; };
onMounted(() => { onMounted(() => {
getDetail(); getDetail(1);
}); });
// //
const submit = async () => { const submit = async () => {
loading = ElLoading.service();
await saveRick({ riskDegreeStrategyList: form.value }); await saveRick({ riskDegreeStrategyList: form.value });
addRecord(); addRecord();
getDetail(); getDetail();

@ -39,7 +39,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
import { ElMessage } from 'element-plus'; import { ElMessage, ElLoading } from 'element-plus';
import { detailRick, saveRick } from '@/api/model'; import { detailRick, saveRick } 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';
@ -50,6 +50,7 @@ const router = useRouter();
const route = useRoute(); const route = useRoute();
const projectId = +Cookies.get('sand-projectId'); const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level'); const levelId = +Cookies.get('sand-level');
let loading = null;
const form = ref<Record<string, any>[]>([]); const form = ref<Record<string, any>[]>([]);
const info = ref<Record<string, any>[]>([]); const info = ref<Record<string, any>[]>([]);
// //
@ -83,9 +84,11 @@ const getConfig = async () => {
}); });
}); });
form.value = result; form.value = result;
loading.close();
}; };
// //
const getDetail = async () => { const getDetail = async (load?: number) => {
if (load) loading = ElLoading.service();
try { try {
const { data } = await detailRick({ const { data } = await detailRick({
checkpointId: levelId, checkpointId: levelId,
@ -95,6 +98,7 @@ const getDetail = async () => {
info.value = data; info.value = data;
if (data.length) { if (data.length) {
form.value = data; form.value = data;
loading.close();
} else { } else {
getConfig(); getConfig();
} }
@ -102,11 +106,12 @@ const getDetail = async () => {
} }
}; };
onMounted(() => { onMounted(() => {
getDetail(); getDetail(1);
}); });
// //
const submit = async () => { const submit = async () => {
loading = ElLoading.service();
await saveRick({ riskDegreeStrategyList: form.value }); await saveRick({ riskDegreeStrategyList: form.value });
addRecord(); addRecord();
getDetail(); getDetail();

@ -39,7 +39,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
import { ElMessage } from 'element-plus'; import { ElMessage, ElLoading } from 'element-plus';
import { detailRick, saveRick } from '@/api/model'; import { detailRick, saveRick } 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';
@ -50,6 +50,7 @@ const router = useRouter();
const route = useRoute(); const route = useRoute();
const projectId = +Cookies.get('sand-projectId'); const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level'); const levelId = +Cookies.get('sand-level');
let loading = null;
const form = ref<Record<string, any>[]>([]); const form = ref<Record<string, any>[]>([]);
const info = ref<Record<string, any>[]>([]); const info = ref<Record<string, any>[]>([]);
// //
@ -76,9 +77,11 @@ const getConfig = async () => {
}); });
}); });
form.value = result; form.value = result;
loading.close();
}; };
// //
const getDetail = async () => { const getDetail = async (load?: number) => {
if (load) loading = ElLoading.service();
try { try {
const { data } = await detailRick({ const { data } = await detailRick({
checkpointId: levelId, checkpointId: levelId,
@ -88,6 +91,7 @@ const getDetail = async () => {
info.value = data; info.value = data;
if (data.length) { if (data.length) {
form.value = data; form.value = data;
loading.close();
} else { } else {
getConfig(); getConfig();
} }
@ -95,11 +99,12 @@ const getDetail = async () => {
} }
}; };
onMounted(() => { onMounted(() => {
getDetail(); getDetail(1);
}); });
// //
const submit = async () => { const submit = async () => {
loading = ElLoading.service();
await saveRick({ riskDegreeStrategyList: form.value }); await saveRick({ riskDegreeStrategyList: form.value });
addRecord(); addRecord();
getDetail(); getDetail();

Loading…
Cancel
Save