|
|
|
<template>
|
|
|
|
<div style="height: 100%">
|
|
|
|
<w-grid
|
|
|
|
ref="companyRatingGridRef"
|
|
|
|
title="客户评级列表"
|
|
|
|
:data-url="Environment.apiContextPath('api/irbs/companyRating')"
|
|
|
|
:fetch-data-url="Environment.apiContextPath('api/irbs/companyRating/query')"
|
|
|
|
: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',
|
|
|
|
}"
|
|
|
|
></w-grid>
|
|
|
|
<LaunchRatingDialog ref="launchRatingdialogRef" :dictionary="dictionary" @refresh="refreshTable"></LaunchRatingDialog>
|
|
|
|
<RatingDialog ref="ratingdialogRef" @refresh="refreshTable"></RatingDialog>
|
|
|
|
</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';
|
|
|
|
|
|
|
|
const $q = useQuasar();
|
|
|
|
const companyRatingGridRef = ref();
|
|
|
|
const launchRatingdialogRef = ref();
|
|
|
|
const ratingdialogRef = ref();
|
|
|
|
|
|
|
|
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,
|
|
|
|
};
|
|
|
|
|
|
|
|
const companyRatingGrid = {
|
|
|
|
buttons: [
|
|
|
|
['query', 'separator', 'moreQuery'],
|
|
|
|
'reset',
|
|
|
|
'separator',
|
|
|
|
{
|
|
|
|
extend: 'add',
|
|
|
|
label: '发起评级',
|
|
|
|
click: () => {
|
|
|
|
launchRatingdialogRef.value.show();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
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);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'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) },
|
|
|
|
],
|
|
|
|
columns: [
|
|
|
|
{ name: 'id', label: '申请编号', align: 'center' },
|
|
|
|
{ name: 'custNo', label: '客户号', align: 'center' },
|
|
|
|
{ name: 'custName', label: '客户名称' },
|
|
|
|
{ name: 'industryTypeName', label: '行业类型' },
|
|
|
|
{ name: 'modelScore', label: '模型得分' },
|
|
|
|
{ name: 'modelLevel', label: '模型等级' },
|
|
|
|
{ name: 'adjLevel', label: '调整后等级' },
|
|
|
|
{ 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: '当前处理人' },
|
|
|
|
],
|
|
|
|
};
|
|
|
|
|
|
|
|
const refreshTable = () => {
|
|
|
|
companyRatingGridRef.value.refresh();
|
|
|
|
};
|
|
|
|
</script>
|