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

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

@ -157,7 +157,7 @@ const params = reactive({
guarantyStyleId: '',
keyWord: '',
productType: computed(() => {
let val = <number | string>'';
let val = '';
if (params.roleId == 42 && productTypes.value.length === 1) {
val = productTypes.value[0];
} else if (params.roleId == 41) {
@ -222,7 +222,14 @@ const toDetail = async (path: string, id: number) => {
};
//
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) => {

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

@ -135,16 +135,11 @@ const toAdd = () => {
};
//
const toDetail = async (path: string, id: number) => {
router.push({
path,
query: {
id,
},
});
router.push(`${path}?id=${id}&name=${params.fundName}`);
};
//
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) => {

@ -176,7 +176,7 @@ const toDetail = async (path: string, id: number) => {
};
//
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) => {

@ -48,6 +48,14 @@
<el-checkbox v-model="row.spouseEnterprise"></el-checkbox>
</template>
</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>
<div class="flex justify-end">

Loading…
Cancel
Save