yujialong 12 months ago
parent 696f04fc7e
commit 8243d5d849
  1. 18
      src/views/product/bank/CardList.vue
  2. 1
      src/views/product/bank/Config.vue
  3. 11
      src/views/product/bank/List.vue
  4. 19
      src/views/product/fund/CardList.vue
  5. 9
      src/views/product/fund/List.vue
  6. 2
      src/views/product/insurance/List.vue
  7. 8
      src/views/product/strategy/156.vue

@ -21,7 +21,7 @@
<li v-for="(item, i) in list" <li v-for="(item, i) in list"
:key="i" :key="i"
:class="{ active: item.id === id }" :class="{ active: item.id === id }"
@click="switchProduct('/product/bank/detail', item.id)"> @click="switchProduct(item)">
<el-popconfirm v-if="role == 41" <el-popconfirm v-if="role == 41"
title="您确定删除吗?" title="您确定删除吗?"
@confirm="handleDelete(item.id)"> @confirm="handleDelete(item.id)">
@ -94,7 +94,7 @@ const getList = async (refresh?: number) => {
keyWord: name, keyWord: name,
}); });
list.value = data.message.records; list.value = data.message.records;
((route.path !== '/product/bank/add' && list.value.length && !id.value) || refresh) && switchProduct(refresh ? '/product/bank/detail' : route.path, list.value[0].id); ((route.path !== '/product/bank/add' && list.value.length && !id.value) || refresh) && switchProduct(list.value[0], refresh);
} finally { } finally {
loading.value = false; loading.value = false;
} }
@ -105,16 +105,18 @@ onMounted(() => {
watch( watch(
route, route,
(route: any) => { (val) => {
action.value = route.params.action; action.value = val.params.action;
}, },
{ {
immediate: true, immediate: true,
}, },
); );
// //
const switchProduct = (path: string, bankId?: number) => { const switchProduct = (row: any, refresh?: number) => {
router.push(`${path}?type=${route.query.type || ''}&i=${route.query.i}&role=${route.query.role}&id=${bankId}&name=${name}`); // addconfigapprove3
const path = `/product/bank/${refresh ? 'detail' : row.showElementsOrNot ? 'add' : row.showRiskControlOrNot ? 'config' : row.showApprovalOrNot ? 'approve' : 'detail'}`;
router.push(`${path}?type=${route.query.type || ''}&i=${route.query.i}&role=${route.query.role}&id=${row.id}&name=${name}`);
}; };
// //
const toAdd = () => { const toAdd = () => {
@ -124,8 +126,8 @@ const toAdd = () => {
const toList = () => { const toList = () => {
router.push(`/product/bank?type=${route.query.type || ''}&i=${route.query.i}&role=${route.query.role}`); router.push(`/product/bank?type=${route.query.type || ''}&i=${route.query.i}&role=${route.query.role}`);
}; };
const handleDelete = async (id: number) => { const handleDelete = async (bankId: number) => {
await batchDeletion([id]); await batchDeletion([bankId]);
getList(); getList();
ElMessage.success('删除成功!'); ElMessage.success('删除成功!');
}; };

@ -4,7 +4,6 @@
@tab-click="tabChange"> @tab-click="tabChange">
<el-tab-pane label="配置风控" <el-tab-pane label="配置风控"
name="tab1"> name="tab1">
<el-form ref="formRef" <el-form ref="formRef"
:model="form" :model="form"
label-width="120px" label-width="120px"

@ -157,7 +157,7 @@ const params = reactive({
guarantyStyleId: '', guarantyStyleId: '',
keyWord: '', keyWord: '',
productType: computed(() => { productType: computed(() => {
let val = <number | string>''; let val = '';
if (params.roleId == 42 && productTypes.value.length === 1) { if (params.roleId == 42 && productTypes.value.length === 1) {
val = productTypes.value[0]; val = productTypes.value[0];
} else if (params.roleId == 41) { } else if (params.roleId == 41) {
@ -222,7 +222,14 @@ const toDetail = async (path: string, id: number) => {
}; };
// //
const toCardList = () => { const toCardList = () => {
router.push(`/product/bank/detail?type=${params.productType}&i=${route.query.i}&role=${route.query.role}&name=${params.keyWord}`); // add
let path = `/product/bank/add`;
if (list.value.length) {
// addconfigapprove3
const row = list.value[0];
path = `/product/bank/${row.showElementsOrNot ? 'add' : row.showRiskControlOrNot ? 'config' : row.showApprovalOrNot ? 'approve' : 'detail'}`;
}
router.push(`${path}?type=${params.productType}&i=${route.query.i}&role=${route.query.role}&name=${params.keyWord}`);
}; };
const handleDelete = async (id: number) => { const handleDelete = async (id: number) => {

@ -58,6 +58,7 @@ import Cookies from 'js-cookie';
const router = useRouter(); const router = useRouter();
const route = useRoute(); const route = useRoute();
const action = ref<any>(''); const action = ref<any>('');
const name = route.query.name ?? '';
const projectId = +Cookies.get('sand-projectId'); const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level'); const levelId = +Cookies.get('sand-level');
@ -65,12 +66,12 @@ const list = ref<Array<any>>([]);
const loading = ref<boolean>(false); const loading = ref<boolean>(false);
const id = computed(() => +route.query.id); const id = computed(() => +route.query.id);
// //
const getList = async (first: any) => { const getList = async (refresh?: number) => {
loading.value = true; loading.value = true;
try { try {
const { data } = await fundProductList({ pageNum: 1, pageSize: 1000, checkPointId: levelId, projectId }); const { data } = await fundProductList({ pageNum: 1, pageSize: 1000, checkPointId: levelId, projectId, fundName: name });
list.value = data.data.records; list.value = data.data.records;
first && list.value.length && switchProduct(list.value[0].id); refresh && list.value.length && switchProduct(list.value[0].id);
} finally { } finally {
loading.value = false; loading.value = false;
} }
@ -81,16 +82,16 @@ onMounted(() => {
watch( watch(
route, route,
(route: any) => { (val) => {
action.value = route.params.action; action.value = val.params.action;
}, },
{ {
immediate: true, immediate: true,
}, },
); );
// //
const switchProduct = (id: number) => { const switchProduct = (fundId: number) => {
router.push(`/product/fund/detail?id=` + id); router.push(`/product/fund/detail?id=` + fundId);
}; };
// //
const toAdd = () => { const toAdd = () => {
@ -100,8 +101,8 @@ const toAdd = () => {
const toList = () => { const toList = () => {
router.push(`/product/fund`); router.push(`/product/fund`);
}; };
const handleDelete = async (id: number) => { const handleDelete = async (fundId: number) => {
await batchDeletion([id]); await batchDeletion([fundId]);
getList(1); getList(1);
ElMessage.success('删除成功!'); ElMessage.success('删除成功!');
}; };

@ -135,16 +135,11 @@ const toAdd = () => {
}; };
// //
const toDetail = async (path: string, id: number) => { const toDetail = async (path: string, id: number) => {
router.push({ router.push(`${path}?id=${id}&name=${params.fundName}`);
path,
query: {
id,
},
});
}; };
// //
const toCardList = () => { const toCardList = () => {
router.push('/product/fund/detail'); router.push(`/product/fund/${list.value.length ? `detail?id=${list.value[0].id}&name=${params.fundName}` : `add?name=${params.fundName}`}`);
}; };
const handleDelete = async (id: number) => { const handleDelete = async (id: number) => {

@ -176,7 +176,7 @@ const toDetail = async (path: string, id: number) => {
}; };
// //
const toCardList = () => { const toCardList = () => {
router.push(`/product/insurance/detail?name=${params.insuranceName}`); router.push(`/product/insurance/${list.value.length ? `detail?id=${list.value[0].insuranceId}&name=${params.insuranceName}` : `add?name=${params.insuranceName}`}`);
}; };
const handleDelete = async (id: number) => { const handleDelete = async (id: number) => {

@ -48,6 +48,14 @@
<el-checkbox v-model="row.spouseEnterprise"></el-checkbox> <el-checkbox v-model="row.spouseEnterprise"></el-checkbox>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="可以准入"
min-width="150"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.hitAccess"
@change="checkNone(row)"></el-checkbox>
</template>
</el-table-column> -->
</el-table> </el-table>
<div class="flex justify-end"> <div class="flex justify-end">

Loading…
Cancel
Save