Commit 7d8b62df authored by 沈翠玲's avatar 沈翠玲

优化

parent a18d2e0b
......@@ -65,7 +65,10 @@
<script setup>
import { ref } from 'vue';
import useSocketStore from '../../../../stores/modules/websocket';
const activeName = ref('first');
const socketStore = useSocketStore();
socketStore.sendMsg({ aa: 44 });
</script>
<style scoped lang="scss">
......
......@@ -4,7 +4,7 @@ import { defineStore } from 'pinia';
const useSocketStore = defineStore('socket', {
state: () => ({
ws: undefined,
heartTimeOut: 40000, //监测心跳时间 40秒
heartTimeOut: 4000, //监测心跳时间 40秒
//this.isReConnection = false
lockReconnect: false, //避免重连
timerReconnect: undefined,
......@@ -25,7 +25,7 @@ const useSocketStore = defineStore('socket', {
//初始化
createWebSocket(url, token) {
try {
this.ws = new WebSocket(url, token); //
this.ws = new WebSocket(url); //
this.initWebsocket();
} catch (e) {
......@@ -135,6 +135,7 @@ const useSocketStore = defineStore('socket', {
console.log('手动关闭ws');
this.handClose = true;
this.clearTimer();
console.log('ws', this.ws);
this.ws.close();
},
},
......
......@@ -20,13 +20,23 @@
<div class="mainContent">
<div class="flex items-center my-3">
<span class="mr-2">
{{radio === 0 ? '调解中心' : '分配到调解中心的cpe'}}
{{ radio === 0 ? '调解中心' : '分配到调解中心的cpe' }}
</span>
<el-select v-model="currentTenant" placeholder="请选择调解中心" style="width: 210px" @change="handleNodeClick">
<el-option :label="item.name" :value="item.id" v-for="(item,index) in data" :key="index" />
<el-select
v-model="currentTenant"
placeholder="请选择调解中心"
style="width: 210px"
@change="handleNodeClick"
>
<el-option
:label="item.name"
:value="item.id"
v-for="(item, index) in data"
:key="index"
/>
</el-select>
</div>
<!-- <el-transfer
v-model="value1"
:data="data1"
......@@ -109,7 +119,10 @@
>保存</el-button
>
<el-button type="default" @click="showModal = false">取消</el-button>
<el-button type="primary" @click="submitForm" :disabled="!currentTenant || (radio === 1 && !SaveBol)"
<el-button
type="primary"
@click="submitForm"
:disabled="!currentTenant || (radio === 1 && !SaveBol)"
>确认提交</el-button
>
</template>
......@@ -145,15 +158,14 @@
const radio = ref(null);
const step = ref(0);
const searchParam = ref();
const onHide = () => {
};
const onHide = () => {};
const getStatisis = (params, id) => {
const p = JSON.parse(JSON.stringify(params));
if (id) {
p['tenantId'] = id;
}
delete p['current']
delete p['size']
delete p['current'];
delete p['size'];
getLoanDistribute(p).then((res) => {
if (res.success) {
statisis.value = res.result;
......@@ -194,10 +206,10 @@
const openModal = (param) => {
showModal.value = true;
pageParams.value = param;
currentAllBtn.value = null
currentAllBtn.value = null;
getTree();
step.value = 0;
SaveBol.value = false
SaveBol.value = false;
currentTenant.value = null;
editRowIndex.value = -1;
};
......@@ -229,16 +241,17 @@
message: '保存成功',
plain: true,
});
SaveBol.value = true
SaveBol.value = true;
}
});
}
};
const submitForm = () => {
if (radio.value === 1){
if (!SaveBol.value) ElMessage.warning({
message: '要先保存',
plain: true,
});
if (radio.value === 1) {
if (!SaveBol.value)
ElMessage.warning({
message: '要先保存',
plain: true,
});
confirm({
records: tabledata.value,
distributeType: currentAllBtn.value,
......@@ -252,7 +265,7 @@
emits('success');
}
});
} else if (radio.value === 0){
} else if (radio.value === 0) {
// chooseIdea('BORROWER');
distributeLoan(currentTenant.value, {
borrowerName: pageParams.value.borrowerName,
......@@ -270,11 +283,11 @@
showModal.value = false;
emits('success');
}
});
});
}
};
const handleNodeClick = () => {
const item = data.value.find(v => v.id === currentTenant.value)
const item = data.value.find((v) => v.id === currentTenant.value);
if (radio.value === 0) {
} else {
getStatisis(pageParams.value, currentTenant.value);
......
......@@ -20,11 +20,7 @@
</template>
<!-- 表格 header 按钮 -->
<template #left_buttons>
<el-button
type="primary"
@click="allocation"
>分配
</el-button>
<el-button type="primary" @click="allocation">分配 </el-button>
<el-button
type="primary"
:disabled="!selectdList || selectdList.length < 1"
......@@ -132,10 +128,16 @@
},
},
{
field: 'payOrg',
field: 'loanPlatform.name',
title: '借款机构',
width: 80,
search: { el: 'input', props: { clearable: true } },
width: 100,
search: { el: 'input', props: { clearable: true }, key: 'payOrg' },
},
{
field: 'manageOrg.orgName',
title: '资管公司',
width: 100,
search: { el: 'input', props: { clearable: true }, key: 'manageOrg' },
},
{
field: 'distributeStatus',
......@@ -163,10 +165,9 @@
search: { el: 'input', props: { clearable: true } },
},
{
field: 'manageOrg.orgName',
title: '资管公司',
field: 'discount',
title: '折扣',
width: 80,
search: { el: 'input', props: { clearable: true } },
},
{
field: 'cpe.name',
......@@ -237,9 +238,7 @@
});
const allocation = (row) => {
allocationModalRef.value.openModal(
JSON.parse(JSON.stringify(curParam.value))
);
allocationModalRef.value.openModal(JSON.parse(JSON.stringify(curParam.value)));
};
const query = () => caseLRef.value?.search();
......
......@@ -406,7 +406,7 @@
title: '产品',
},
{
field: 'payOrg',
field: 'loanPlatform.name',
title: '借款机构',
},
{
......
......@@ -124,7 +124,7 @@
title: '产品',
},
{
field: 'loan.payOrg',
field: 'loan.loanPlatform.name',
title: '借款机构',
},
{
......
......@@ -305,7 +305,7 @@
title: '案件ID',
},
{
field: 'payOrg',
field: 'loanPlatform.name',
title: '借款机构',
},
{
......
......@@ -277,7 +277,7 @@
title: '产品',
},
{
field: 'payOrg',
field: 'loanPlatform.name',
title: '借款机构',
},
{
......
......@@ -346,7 +346,7 @@
title: '应还金额',
},
{
field: 'stages.loans.payOrg',
field: 'stages.loans.loanPlatform.name',
title: '借款机构',
},
],
......@@ -573,7 +573,7 @@
title: '产品',
},
{
field: 'payOrg',
field: 'loanPlatform.name',
title: '借款机构',
},
{
......@@ -651,7 +651,7 @@
width: 80,
},
{
field: 'payOrg',
field: 'loans.loanPlatform.name',
title: '借款机构',
},
{
......
......@@ -75,16 +75,16 @@
columns: [
{ field: 'caseId', title: '案件ID', search: { el: 'input' }, width: 80 },
{
field: 'payOrg',
field: 'loanPlatform.name',
title: '借款机构',
width: 100,
search: { el: 'input', props: { clearable: true } },
search: { el: 'input', props: { clearable: true }, key: 'payOrg' },
},
{
field: 'manageOrg',
field: 'manageOrg.orgName',
title: '资管公司',
width: 100,
search: { el: 'input', props: { clearable: true } },
search: { el: 'input', props: { clearable: true }, key: 'manageOrg' },
},
{
field: 'borrower.name',
......@@ -116,6 +116,11 @@
key: 'borrowerPhone',
},
},
{
field: 'discount',
title: '折扣',
width: 80,
},
{
field: 'commissionAmount',
title: '委案金额',
......@@ -140,6 +145,7 @@
width: 110,
search: { el: 'input', props: { clearable: true } },
},
{
field: 'cpe.username',
title: 'CPE',
......
<template>
<div class="table-box">
<div class="table-box importwrapper">
<div class="card flex mb-2">
<div class="flex-1 pr-3">
<div class="mb-1">1、上传文件</div>
......@@ -56,6 +56,9 @@
<el-form-item class="w-full" label="委案合同:" prop="contractNo">
<el-input v-model="form.contractNo" placeholder="请输入" style="width: 100%" />
</el-form-item>
<el-form-item class="w-full" label="折扣:" prop="discount">
<el-input v-model="form.discount" placeholder="请输入" style="width: 100%" />
</el-form-item>
</el-form>
<el-button
type="primary"
......@@ -147,20 +150,6 @@
search: { el: 'select', props: { filterable: true }, span: 1.5 },
fieldNames: { label: 'genderLabel', value: 'genderValue' },
},
{
field: 'role',
title: '借款平台',
enum: options,
search: { el: 'select', props: { filterable: true }, span: 1.5 },
fieldNames: { label: 'genderLabel', value: 'genderValue' },
},
{
field: 'role',
title: '资管公司',
enum: options,
search: { el: 'select', props: { filterable: true }, span: 1.5 },
fieldNames: { label: 'genderLabel', value: 'genderValue' },
},
{
field: 'totalCaseNum',
title: '案件总数',
......@@ -173,10 +162,15 @@
field: 'totalBorrowerNum',
title: '客户总数',
},
{
field: 'discount',
title: '折扣',
width: 80,
},
{
field: 'totalPengNum',
title: '撞库次数',
width: 200,
width: 100,
slots: {
default: ({ row }) => {
return (
......@@ -220,6 +214,7 @@
path: '',
code: '',
contractNo: '',
discount: '',
});
const upload = reactive({
// 是否禁用上传
......@@ -286,6 +281,7 @@
file: form.path,
code: form.code,
contractNo: form.contractNo,
discount: form.discount,
}).then((res) => {
ElMessage.success({
message: '提交成功',
......@@ -300,3 +296,10 @@
query();
});
</script>
<style lang="scss" scoped>
.importwrapper {
:deep(.el-form-item) {
margin-bottom: 3px;
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment