You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

136 lines
4.7 KiB

1 year ago
<template>
<div style="height: 100%">
1 year ago
<w-grid
ref="companyRatingGridRef"
title="客户评级列表"
:data-url="Environment.apiContextPath('api/irbs/companyRating')"
:fetch-data-url="Environment.apiContextPath('api/irbs/companyRating/query')"
1 year ago
:sort-no="true"
:checkbox-selection="false"
:query-form-cols-num="4"
:query-form-fields="companyRatingGrid.queryFormFields"
:columns="companyRatingGrid.columns"
:toolbar-actions="companyRatingGrid.buttons"
:pagination="{
sortBy: 'lastModifyDate',
descending: true,
}"
:query-criteria="{
fieldName: 'triggerType',
operator: 'equals',
value: 'INDEPENDENT',
1 year ago
}"
></w-grid>
<LaunchRatingDialog ref="launchRatingdialogRef" :dictionary="dictionary" @refresh="refreshTable"></LaunchRatingDialog>
<RatingDialog ref="ratingdialogRef" @refresh="refreshTable"></RatingDialog>
1 year ago
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { useQuasar } from 'quasar';
import { Environment, EnumTools, DictionaryTools, Options, Formater, axios, NotifyManager } from 'platform-core';
import LaunchRatingDialog from './LaunchRatingDialog.vue';
import RatingDialog from './RatingDialog.vue';
import { RatingLevelOptions, RatingProcessStatus } from './CustRating.ts';
1 year ago
const $q = useQuasar();
const companyRatingGridRef = ref();
const launchRatingdialogRef = ref();
const ratingdialogRef = ref();
1 year ago
const RatingStatusEnum = await EnumTools.fetch('irbs.cust.rating.enums.RatingStatus');
const RatingProcessStatusEnum = await EnumTools.fetch('irbs.cust.rating.enums.RatingProcessStatus');
const dictCustomerTypeCd = await DictionaryTools.fetch('CustomerTypeCd');
const optionsCustomerTypeCd = Options.dictionary(dictCustomerTypeCd);
const dictCustomerSizeCd = await DictionaryTools.fetch('CustomerSizeCd');
const optionsCustomerSizeCd = Options.dictionary(dictCustomerSizeCd);
const dictionary = {
dictCustomerTypeCd: dictCustomerTypeCd,
optionsCustomerTypeCd: optionsCustomerTypeCd,
dictCustomerSizeCd: dictCustomerSizeCd,
optionsCustomerSizeCd: optionsCustomerSizeCd,
};
1 year ago
const companyRatingGrid = {
buttons: [
['query', 'separator', 'moreQuery'],
'reset',
'separator',
{
extend: 'add',
label: '发起评级',
click: () => {
launchRatingdialogRef.value.show();
},
1 year ago
},
{
extend: 'edit',
label: '评级',
enableIf: (args) => {
if (
args.selected &&
(args.selected['processStatus'] === RatingProcessStatus.AWAIT_RATING ||
args.selected['processStatus'] === RatingProcessStatus.AWAIT_SUBMIT ||
args.selected['processStatus'] === RatingProcessStatus.BACK)
) {
return true;
}
return false;
},
click: (args) => {
ratingdialogRef.value.show(args.selected);
},
},
// {
// extend: 'remove',
// label: '撤销',
// click: () => {},
// },
{
extend: 'view',
click: (args) => {
ratingdialogRef.value.show(args.selected, true);
},
1 year ago
},
'separator',
],
queryFormFields: [
{ label: '申请编号', name: 'id', type: 'text' },
{ label: '客户号', name: 'custNo', type: 'text' },
{ label: '客户名称', name: 'custName', type: 'text' },
{
label: '认定等级',
name: 'finalLevel',
type: 'select',
options: RatingLevelOptions,
},
{ label: '流程状态', name: 'processStatus', type: 'select', options: Options.enum(RatingProcessStatusEnum) },
{ label: '评级状态', name: 'ratingStatus', type: 'select', options: Options.enum(RatingStatusEnum) },
1 year ago
],
columns: [
{ name: 'id', label: '申请编号', align: 'center' },
{ name: 'custNo', label: '客户号', align: 'center' },
1 year ago
{ name: 'custName', label: '客户名称' },
{ name: 'industryTypeName', label: '行业类型' },
1 year ago
{ name: 'modelScore', label: '模型得分' },
{ name: 'modelLevel', label: '模型等级' },
{ name: 'adjLevel', label: '调整后等级' },
1 year ago
{ name: 'initLevel', label: '初评等级' },
{ name: 'finalLevel', label: '认定等级' },
{ name: 'pd', label: '违约概率' },
{ name: 'effectiveTime', label: '评级生效日', format: Formater.dateOnly() },
{ name: 'matureTime', label: '评级失效日', format: Formater.dateOnly() },
{ name: 'ratingStatus', label: '评级状态', format: Formater.enum(RatingStatusEnum) },
{ name: 'launchUser', label: '发起人' },
{ name: 'processStatus', label: '流程状态', format: Formater.enum(RatingProcessStatusEnum) },
{ name: 'currentAssignee', label: '当前处理人' },
1 year ago
],
};
const refreshTable = () => {
companyRatingGridRef.value.refresh();
};
1 year ago
</script>