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

优化

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