Commit 6a1b186b authored by 沈翠玲's avatar 沈翠玲

案件分派

parent ea98ead8
...@@ -118,7 +118,8 @@ ...@@ -118,7 +118,8 @@
props.showPagination, props.showPagination,
props.dataCallback, props.dataCallback,
props.requestError, props.requestError,
props.paramCallback props.paramCallback,
props.config
); );
// 显示搜索 // 显示搜索
...@@ -183,9 +184,6 @@ ...@@ -183,9 +184,6 @@
const _search = () => { const _search = () => {
search(); search();
if (props.config.onCheckboxAll) {
props.config.onCheckboxAll({checked: false, records: []})
}
}; };
const _reset = () => { const _reset = () => {
......
...@@ -6,7 +6,8 @@ export function useProTable( ...@@ -6,7 +6,8 @@ export function useProTable(
isPageable, isPageable,
dataCallBack, dataCallBack,
requestError, requestError,
paramCallback paramCallback,
config
) { ) {
const state = reactive({ const state = reactive({
loading: false, loading: false,
...@@ -121,6 +122,9 @@ export function useProTable( ...@@ -121,6 +122,9 @@ export function useProTable(
* */ * */
const search = () => { const search = () => {
state.pageable.current = 1; state.pageable.current = 1;
if (config.onCheckboxAll) {
config.onCheckboxAll({checked: false, records: []})
}
updatedTotalParam(); updatedTotalParam();
getTableList(); getTableList();
}; };
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<div style="margin-top: 10px; margin-bottom: 10px"> <div style="margin-top: 10px; margin-bottom: 10px">
<el-radio-group v-model="radio" @change="changeRadio"> <el-radio-group v-model="radio" @change="changeRadio">
<el-radio :value="0" v-permission="'allcation_for_tenant'">分派到调解中心</el-radio> <el-radio :value="0" v-permission="'allcation_for_tenant'">分派到调解中心</el-radio>
<el-radio :value="1">分派到CPE</el-radio> <!-- <el-radio :value="1">分派到CPE</el-radio> -->
</el-radio-group> </el-radio-group>
</div> </div>
<template v-if="radio === 0 || (radio === 1 && !step)"> <template v-if="radio === 0 || (radio === 1 && !step)">
...@@ -276,7 +276,7 @@ ...@@ -276,7 +276,7 @@
const chooseIdea = (type) => { const chooseIdea = (type) => {
editRowIndex.value = -1; editRowIndex.value = -1;
currentAllBtn.value = type; currentAllBtn.value = type;
const param = { let param = {
type: currentAllBtn.value, type: currentAllBtn.value,
tenantId: currentTenant.value, tenantId: currentTenant.value,
}; };
...@@ -286,12 +286,7 @@ ...@@ -286,12 +286,7 @@
if (lonsArr.value && lonsArr.value.length) { if (lonsArr.value && lonsArr.value.length) {
param['loanIds'] = lonsArr.value.map((v) => v.id); param['loanIds'] = lonsArr.value.map((v) => v.id);
} else { } else {
param['borrowerName'] = pageParams.value.borrowerName; param = { ...param, ...pageParams.value };
param['batchCode'] = pageParams.value.batchCode;
param['borrowerIdCard'] = pageParams.value.idCard;
param['borrowerPhone'] = pageParams.value.borrowerPhone;
param['commissionAmount'] = pageParams.value.commissionAmount;
param['remainingAmount'] = pageParams.value.remainingAmount;
} }
distributeCpe(param).then((res) => { distributeCpe(param).then((res) => {
if (res.success) { if (res.success) {
...@@ -319,12 +314,7 @@ ...@@ -319,12 +314,7 @@
getTree(); getTree();
step.value = 0; step.value = 0;
if (!authButtonListGet.includes('allcation_for_tenant')) {
radio.value = 1;
} else {
radio.value = 0; radio.value = 0;
}
let p = {} let p = {}
if (lonsArr.value && lonsArr.value.length) { if (lonsArr.value && lonsArr.value.length) {
p['loanIds'] = lonsArr.value.map((v) => v.id); p['loanIds'] = lonsArr.value.map((v) => v.id);
...@@ -413,16 +403,11 @@ ...@@ -413,16 +403,11 @@
} }
} else if (radio.value === 0) { } else if (radio.value === 0) {
// chooseIdea('BORROWER'); // chooseIdea('BORROWER');
const param = {}; let param = {};
if (lonsArr.value && lonsArr.value.length) { if (lonsArr.value && lonsArr.value.length) {
param['loanIds'] = lonsArr.value.map((v) => v.id); param['loanIds'] = lonsArr.value.map((v) => v.id);
} else { } else {
param['borrowerName'] = pageParams.value.borrowerName; param = { ...pageParams.value };
param['batchCode'] = pageParams.value.batchCode;
param['borrowerIdCard'] = pageParams.value.idCard;
param['borrowerPhone'] = pageParams.value.borrowerPhone;
param['commissionAmount'] = pageParams.value.commissionAmount;
param['remainingAmount'] = pageParams.value.remainingAmount;
param['tenantId'] = null; param['tenantId'] = null;
} }
distributeLoan(currentTenant.value, param).then((res) => { distributeLoan(currentTenant.value, param).then((res) => {
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<img src="@/assets/images/caselist.svg" /> <img src="@/assets/images/caselist.svg" />
</div> </div>
<div class="title_warp"> <div class="title_warp">
<div class="items">未分派案件数</div> <div class="items">派案件数</div>
<div class="item items1">{{statisis.caseNum}}</div> <div class="item items1">{{statisis.caseNum}}</div>
</div> </div>
</div> </div>
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
<img src="@/assets/images/userlist.svg" /> <img src="@/assets/images/userlist.svg" />
</div> </div>
<div class="title_warp"> <div class="title_warp">
<div class="items">未分派CPE</div> <div class="items">在派案人</div>
<div class="item items1">{{statisis.cpeNum}}</div> <div class="item items1">{{statisis.borrowerNum}}</div>
</div> </div>
</div> </div>
<div class="item_warp"> <div class="item_warp">
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<img src="@/assets/images/money.svg" /> <img src="@/assets/images/money.svg" />
</div> </div>
<div class="title_warp"> <div class="title_warp">
<div class="items">未分派总金额数</div> <div class="items">在派金额</div>
<div class="item items1">{{statisis.amount}}</div> <div class="item items1">{{statisis.amount}}</div>
</div> </div>
</div> </div>
...@@ -89,6 +89,7 @@ ...@@ -89,6 +89,7 @@
const router = useRouter(); const router = useRouter();
const onCheckboxChange = (row) => { const onCheckboxChange = (row) => {
selectdList.value = row.records; selectdList.value = row.records;
dataValue.value = selectdList.value.length > 0 ? '对选中项操作' : '对查询结果操作'
}; };
const statisis = ref({}); const statisis = ref({});
const getStatisis = (params) => { const getStatisis = (params) => {
...@@ -160,6 +161,7 @@ ...@@ -160,6 +161,7 @@
} else { } else {
selectdList.value = []; selectdList.value = [];
} }
dataValue.value = selectdList.value.length > 0 ? '对选中项操作' : '对查询结果操作'
}; };
const config = reactive({ const config = reactive({
columns: [ columns: [
...@@ -264,7 +266,6 @@ ...@@ -264,7 +266,6 @@
showOverflow: 'tooltip', showOverflow: 'tooltip',
width: 80, width: 80,
enum: DistributeStatus, enum: DistributeStatus,
search: { el: 'select', props: { filterable: true }, labelWidth: 105 },
fieldNames: { label: 'label', value: 'value' }, fieldNames: { label: 'label', value: 'value' },
slots: { slots: {
default: ({ row }) => { default: ({ row }) => {
......
<template>
<vxe-modal
resize
v-model="showModal"
title="案件分派"
@hide="onHide"
height="582"
width="1003"
show-footer
esc-closable
>
<div class="allocation-wrap">
<div class="Content">
<div class="top">
<div class="number-box">
<div class="number-left">
<div class="icon-wrapper">
<img src="@/assets/images/userlist.svg" />
</div>
</div>
<div class="number-right">
<p>待分派客户数量</p>
<p>{{ statisis.unCustomerNum }}</p>
</div>
</div>
<div class="number-box">
<div class="number-left">
<div class="icon-wrapper">
<img src="@/assets/images/caselist.svg" />
</div>
</div>
<div class="number-right">
<p>待分派案件数量</p>
<p>{{ statisis.unCaseNum }}</p>
</div>
</div>
<div class="number-box">
<div class="number-left">
<div class="icon-wrapper">
<img src="@/assets/images/money.svg" />
</div>
</div>
<div class="number-right">
<p>待分派金额</p>
<p>{{ statisis.unAmount }}</p>
</div>
</div>
</div>
<div style="margin-top: 10px; margin-bottom: 10px">
<el-radio-group v-model="radio" @change="changeRadio">
<el-radio :value="1">分派到CPE</el-radio>
</el-radio-group>
</div>
<template v-if="radio === 0 || (radio === 1 && !step)">
<div class="mainContent">
<div class="flex items-center my-3">
<span class="mr-2" v-if="radio === 0"> 调解中心 </span>
<el-select
v-if="radio === 0"
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 v-else class="flex">
<div class="tree-cpe">
<p class="bb">选择CPE</p>
<div class="flex">
<div class="tree-wrapper" style="border-right: none">
<el-tree
:data="data"
highlight-current
:props="defaultProps"
@node-click="handleNodeClick"
/>
</div>
<div class="tree-wrapper">
<div class="flex items-center h-10 border-b">
<div class="px-3 border-r mr-auto h-full flex items-center justify-center">
<el-checkbox v-model="checked1" label="" @change="changeAll" />
</div>
<div class="flex-1 text-center">CPE</div></div
>
<el-tree
:data="alltabledata"
highlight-current
ref="allTreeRef"
node-key="id"
show-checkbox
:props="{
children: 'children',
label: 'username',
}"
@check-change="checkChange"
/>
</div>
</div>
</div>
<div class="ml-3">
<p class="bb">已选CPE</p>
<div class="flex items-center h-10 border border-b-0">
<div class="w-10 border-r mr-auto h-full flex items-center justify-center">
序号
</div>
<div class="flex-1 text-center">CPE</div>
</div>
<div class="tree-wrapper" style="height: calc(100% - 3.8rem)">
<div v-for="(item, index) in tabledata" :key="index" class="flex">
<div class="w-10 mr-auto h-full flex items-center justify-center">
{{ index + 1 }}
</div>
<div class="flex-1 text-left pl-3">{{ item.cpe.username }}</div>
</div>
</div>
</div>
</div>
</div>
<!-- <el-transfer
v-model="value1"
:data="data1"
:titles="['CPE', '已选CPE']"
ref="mytransfer"
@left-check-change="leftChange"
/> -->
</div>
</template>
<template v-if="radio === 1 && currentTenant && step">
<p class="my-2">分派方案</p>
<div class="idea-box">
<div class="left-idea">
<div class="idea-btn">
<el-button
type="primary"
:plain="currentAllBtn === item.value ? false : true"
v-for="(item, index) in options"
:key="index"
@click="chooseIdea(item.value)"
>{{ item.label }}</el-button
>
</div>
<div class="reset-btn">
<el-button type="primary" link :icon="RefreshRight" @click="resetAllocation"
>重新分派</el-button
>
</div>
</div>
<div class="right-idea">
<!-- <ProTable
:config="config"
:data="tabledata"
ref="caseLRef"
:showPagination="false"
:showToolBar="false"
/> -->
<vxe-grid
v-bind="{...config, ...{data: tabledata}}"
:show-footer="true"
:footer-method="footerMethod"
ref="caseLRef"
></vxe-grid>
</div>
</div>
</template>
</div>
</div>
<template #footer>
<el-button @click="backform" v-if="step" style="float: left">上一步</el-button>
<el-button
type="primary"
@click="saveFrom"
:disabled="!currentTenant"
v-if="radio === 1 && step"
>保存</el-button
>
<el-button type="default" @click="showModal = false">取消</el-button>
<el-button
type="primary"
@click="submitForm"
v-if="radio === 0 || step"
:disabled="!currentTenant || (radio === 1 && !SaveBol)"
>确认提交</el-button
>
<el-button
type="primary"
@click="submitForm"
v-if="!step && radio === 1"
:disabled="!currentTenant || tabledata.length === 0"
>下一步</el-button
>
</template>
</vxe-modal>
</template>
<script setup lang="jsx" name="allocationModal">
import { UserFilled } from '@element-plus/icons-vue';
import { RefreshRight } from '@element-plus/icons-vue';
import { ElInputNumber, ElMessage } from 'element-plus';
import Decimal from 'decimal.js';
import { useUserStore } from '@/stores/modules/user';
import {
getLoanDistribute,
distributeLoan,
confirm,
distributeCpe,
changeDistributeCpe,
getTenantUsers
} from '@/api/allcation';
import { getTenantPage } from '@/api/tenant';
import { computed } from 'vue';
import { reactive, ref, nextTick } from 'vue';
import { useAuthStore } from '@/stores/modules/auth';
const emits = defineEmits(['success']);
const { authButtonListGet } = useAuthStore(); // 获取用户权限列表
const userStore = useUserStore();
const data = ref([]);
const mytransfer = ref();
const tabledata = ref([]);
const alltabledata = ref([]);
const lonsArr = ref([]);
const SaveBol = ref(false);
const showModal = ref(false);
const currentTenant = ref();
const allTreeRef = ref();
const statisis = ref({});
const currentAllBtn = ref();
const checked1 = ref(false);
const editRowIndex = ref(-1);
const pageParams = ref({});
const radio = ref(null);
const step = ref(0);
const searchParam = ref();
const onHide = () => {};
const getStatisis = (params, id) => {
const p = JSON.parse(JSON.stringify(params));
if (id) {
p['tenantId'] = id;
}
delete p['current'];
delete p['size'];
getLoanDistribute(p).then((res) => {
if (res.success) {
statisis.value = res.result;
}
});
};
const getTree = () => {
let name = ''
if (userStore.userInfo?.tenants && userStore.userInfo?.tenants.length > 0) {
if (userStore.userInfo?.tenants.length < 2) {
name = userStore.userInfo?.tenants[0].name
} else {
name = userStore.tenant.name
}
}
getTenantPage({
current: 1,
size: 999999999,
status: 'enable',
name: name || null
}).then((res) => {
if (res.success) {
data.value = res.result.content;
}
});
};
const chooseIdea = (type) => {
editRowIndex.value = -1;
currentAllBtn.value = type;
const param = {
type: currentAllBtn.value,
tenantId: currentTenant.value,
};
if (tabledata.value && tabledata.value.length) {
param['cpeIds'] = tabledata.value.map((v) => v.cpe.id);
}
if (lonsArr.value && lonsArr.value.length) {
param['loanIds'] = lonsArr.value.map((v) => v.id);
} else {
param = { ...param, ...pageParams.value };
}
distributeCpe(param).then((res) => {
if (res.success) {
tabledata.value = res.result;
}
});
};
const changeRadio = () => {
let param = {};
if (lonsArr.value && lonsArr.value.length) {
param['loanIds'] = lonsArr.value.map((v) => v.id);
} else {
param = { ...pageParams.value };
}
radio.value === 0 && getStatisis(param);
step.value = 0;
currentTenant.value = null;
};
const openModal = (param, select) => {
lonsArr.value = select;
showModal.value = true;
pageParams.value = param;
currentAllBtn.value = null;
console.log('sadasda')
getTree();
step.value = 0;
radio.value = 1;
let p = {}
if (lonsArr.value && lonsArr.value.length) {
p['loanIds'] = lonsArr.value.map((v) => v.id);
} else {
p = param;
}
radio.value === 0 && getStatisis(p);
SaveBol.value = false;
currentTenant.value = null;
editRowIndex.value = -1;
if (userStore.userInfo?.tenants && userStore.userInfo?.tenants.length > 0) {
if (userStore.userInfo?.tenants.length < 2) {
handleNodeClick(userStore.userInfo?.tenants[0])
currentTenant.value = userStore.userInfo?.tenants[0].id;
} else {
handleNodeClick(userStore.tenant)
currentTenant.value = userStore.tenant.id;
}
}
tabledata.value = [];
alltabledata.value = [];
checked1.value = false;
};
const changeAll = () => {
if (checked1.value) {
allTreeRef.value.setCheckedNodes(alltabledata.value);
} else {
allTreeRef.value.setCheckedKeys([]);
}
};
const backform = () => {
step.value = 0;
};
const saveFrom = () => {
if (currentAllBtn.value === 'CASE') {
const sum = tabledata.value.reduce((pre, cur) => Decimal(pre).add(Decimal(cur.caseNum)), 0);
if (Number(sum) !== Number(statisis.value.unCaseNum))
return ElMessage.warning({
message: '总数与待分派案件数不一致',
plain: true,
});
} else if (currentAllBtn.value === 'BORROWER') {
const sum = tabledata.value.reduce((pre, cur) => Decimal(pre).add(Decimal(cur.borrowerNum)), 0);
if (Number(sum) !== Number(statisis.value.unCustomerNum))
return ElMessage.warning({
message: '总数与待分派案人数不一致',
plain: true,
});
}
changeDistributeCpe({
records: tabledata.value,
distributeType: currentAllBtn.value,
}).then((res) => {
if (res.success) {
ElMessage.success({
message: '保存成功',
plain: true,
});
SaveBol.value = true;
}
});
};
const submitForm = () => {
if (radio.value === 1) {
if (step.value) {
if (!SaveBol.value)
ElMessage.warning({
message: '要先保存',
plain: true,
});
confirm({
records: tabledata.value,
distributeType: currentAllBtn.value,
}).then((res) => {
if (res.success) {
ElMessage.success({
message: '分派成功',
plain: true,
});
showModal.value = false;
emits('success');
}
});
} else {
step.value = 1;
}
} else if (radio.value === 0) {
// chooseIdea('BORROWER');
let param = {};
if (lonsArr.value && lonsArr.value.length) {
param['loanIds'] = lonsArr.value.map((v) => v.id);
} else {
param = { ...pageParams.value };
param['tenantId'] = null;
}
distributeLoan(currentTenant.value, param).then((res) => {
if (res.success) {
ElMessage.success({
message: '分派成功',
plain: true,
});
showModal.value = false;
emits('success');
}
});
}
};
const handleNodeClick = (data1) => {
if (typeof data1 === 'object') {
currentTenant.value = data1.id;
let param = {};
if (lonsArr.value && lonsArr.value.length) {
param['loanIds'] = lonsArr.value.map((v) => v.id);
} else {
param = { ...pageParams.value };
}
getStatisis(param, currentTenant.value);
getTenantUsers({tenantId: data1.id, roleCode: 'CPE'}).then(res => {
if (res.success && res.result) {
alltabledata.value = res.result
} else {
alltabledata.value = []
}
tabledata.value = alltabledata.value.map((v) => ({
cpe: v,
borrowerNum: null,
caseNum: null,
amount: null,
}));
nextTick(() => {
setTimeout(() => {
allTreeRef.value.setCheckedNodes(alltabledata.value);
});
});
}).catch(e => {
alltabledata.value = []
tabledata.value = []
nextTick(() => {
setTimeout(() => {
allTreeRef.value.setCheckedNodes(alltabledata.value);
});
});
})
checked1.value = true;
}
};
const resetAllocation = () => {
chooseIdea(currentAllBtn.value);
};
const checkChange = (dara, ddd, aaa) => {
nextTick(() => {
const arr = allTreeRef.value.getCheckedNodes();
tabledata.value = arr.map((v) => ({
cpe: v,
borrowerNum: null,
caseNum: null,
amount: null,
}));
});
};
const changeNum = (type, row, index) => {
const sum = tabledata.value.reduce((pre, cur) => Decimal(pre).add(Decimal(cur[type])), 0);
const sta_num = type === 'borrowerNum' ? statisis.value.unCustomerNum : statisis.value.unCaseNum
const differ = Decimal(sum).sub(Decimal(sta_num))
const msg = type === 'borrowerNum' ? '总数超过待分派案人数' : '总数超过待分派案件数'
if (Number(sum) > Number(sta_num)) {
row[type] = Decimal(row[type]).sub(Decimal(differ))
return ElMessage.warning({
message: msg,
plain: true,
});
}
};
const leftChange = (value, direction) => {
console.log(value, direction); //这个就是它包含的所有的属性以及事件,如果需要别的操作直接执行,也可以查询到
};
// 进行合计
const sumNum = (costForm, type) => {
let total = 0;
for (let i = 0; i < costForm.length; i++) {
total = Decimal(total).add(Decimal(costForm[i][type]))
}
return total;
};
const options = [
{
label: '以案人数均分',
value: 'BORROWER',
},
{
label: '以案件数均分',
value: 'CASE',
},
{
label: '以委案金额均分',
value: 'AMOUNT',
},
];
const footerMethod = ({ columns, data }) => {
const footerData = [
columns.map((column, _columnIndex) => {
if (_columnIndex === 0) {
return '合计';
}
if (
['borrowerNum', 'caseNum', 'amount'].includes(
column.field
)
) {
return sumNum(data, column.field);
}
return null;
}),
]
return footerData
}
const config = computed(() => {
// 去除分页控件,toolbar控件
return {
height: 'auto',
'min-height': 'auto',
toolbarConfig: { enabled: false },
columns: [
{ type: 'seq', width: 50, title: '序号' },
{
field: 'cpe.username',
title: 'CPE',
},
{
field: 'borrowerNum',
title: '分派案人数',
slots: {
default: ({ row, rowIndex }) => {
if (currentAllBtn.value === 'BORROWER') {
return (
<>
<ElInputNumber
v-model={row.borrowerNum}
onChange={() => changeNum('borrowerNum', row, rowIndex)}
/>
</>
);
} else {
return <>{row.borrowerNum}</>;
}
},
},
},
{
field: 'caseNum',
title: '分派案件数',
slots: {
default: ({ row, rowIndex }) => {
if (currentAllBtn.value === 'CASE') {
return (
<>
<ElInputNumber
v-model={row.caseNum}
onChange={() => changeNum('caseNum', row, rowIndex)}
/>
</>
);
} else {
return <>{row.caseNum}</>;
}
},
},
},
{
field: 'amount',
title: '分派委案金额',
// slots: {
// default: ({ row, rowIndex }) => {
// // if (currentAllBtn.value === 3) {
// // return (
// // <>
// // <ElInputNumber
// // v-model={row.num}
// // onChange={() => changeNum(3, row, rowIndex)}
// // disabled={editRowIndex.value > -1 && editRowIndex.value !== rowIndex}
// // />
// // </>
// // );
// // } else {
// return <>{row.num}</>;
// // }
// },
// },
},
],
};
});
const generateData = () => {
const data = [];
for (let i = 1; i <= 15; i++) {
data.push({
key: i,
label: `Option ${i}`,
});
}
return data;
};
const data1 = ref(generateData());
const value1 = ref([]);
const defaultProps = {
children: 'children',
label: 'name',
};
defineExpose({
openModal,
});
</script>
<style lang="scss" scoped>
.allocation-wrap {
height: 100%;
.top {
display: flex;
.number-box {
font-size: 15px;
width: 235px;
padding: 5px 0 5px 15px;
border: 1px solid rgba(0, 0, 0, 0.1);
height: 50px;
display: flex;
margin-right: 10px;
margin-top: 10px;
}
.icon-wrapper {
width: 40px;
height: 40px;
text-align: center;
line-height: 40px;
color: #bbc3ca;
margin-right: 10px;
font-size: 37px;
}
}
.number-right {
p:nth-child(1) {
color: #aaa;
font-size: 13px;
}
}
}
.Content {
height: calc(100% - 50px);
.idea-box {
height: calc(100% - 100px);
display: flex;
}
.left-idea {
width: 250px;
border: 1px solid #ebeef5;
display: flex;
flex-direction: column;
}
.right-idea {
width: calc(100% - 250px);
:deep(.card) {
padding: 0;
}
}
.idea-btn {
display: flex;
flex-direction: column;
align-items: center;
border-bottom: 1px solid #ebeef5;
padding-bottom: 10px;
.el-button {
width: 150px;
margin-left: 0 !important;
margin-top: 15px;
}
}
.reset-btn {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
}
}
.mainContent {
display: flex;
.bb {
padding-left: 14px;
border: 1px solid #ebeef5;
border-bottom: none;
}
.tree-wrapper {
border: 1px solid #ebeef5;
width: 290px;
height: 318px;
}
.bc {
display: flex;
}
}
</style>
<template>
<div class="table-box">
<div>
<ProTable :config="config" ref="caseLRef" :api="getLoanpage" :paramCallback="paramCallback" :selectdList="selectdList">
<template #table_top>
<div class="style-lable" >
<div class="item_warp">
<div class="img_warp" style="width: 19%">
<img src="@/assets/images/caselist.svg" />
</div>
<div class="title_warp">
<div class="items">在派案件数</div>
<div class="item items1">{{statisis.caseNum}}</div>
</div>
</div>
<div class="item_warp">
<div class="img_warp" style="width: 19%">
<img src="@/assets/images/userlist.svg" />
</div>
<div class="title_warp">
<div class="items">在派案人数</div>
<div class="item items1">{{statisis.borrowerNum}}</div>
</div>
</div>
<div class="item_warp">
<div class="img_warp" style="width: 19%">
<img src="@/assets/images/money.svg" />
</div>
<div class="title_warp">
<div class="items">在派金额</div>
<div class="item items1">{{statisis.amount}}</div>
</div>
</div>
</div>
</template>
<!-- 表格 header 按钮 -->
<template #left_buttons>
<div class="flex rounded w-full h-11 items-center pl-2 btn-grp mb-1">
<el-dropdown @command="(command) => dataValue = command">
<span class="el-dropdown-link">
{{dataValue}}
<el-icon class="el-icon--right">
<arrow-down />
</el-icon>
</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item v-for="item in dataOptions" :key="item.value" :command="item.value">{{item.label}}</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
<el-button type="primary" @click="allocation">分派</el-button>
</div>
<!-- <el-button
type="primary"
:disabled="!selectdList || selectdList.length < 1"
@click="backCase"
>撤回
</el-button>
<el-button type="primary" :disabled="!selectdList || selectdList.length < 1"
>撤案
</el-button> -->
</template>
</ProTable>
</div>
<allocationModal ref="allocationModalRef" @success="query" />
</div>
</template>
<script setup name="case-allocation" lang="jsx">
import allocationModal from './components/allocationModal.vue';
import { getLoantotal, getLoanpage, backDistribute } from '@/api/allcation';
import { reactive, ref } from 'vue';
import { ElMessageBox, ElMessage } from 'element-plus';
import { ArrowDown } from '@element-plus/icons-vue';
import citydata from '../../../assets/citydata';
import { onMounted } from 'vue';
import { VxeTextEllipsis, VxeTooltip } from 'vxe-pc-ui';
import { getPlatformPage } from '@/api/platform';
import { useRouter } from 'vue-router';
import { getManageOrgPage } from '@/api/manageOrg';
import { getTenantPage } from '@/api/tenant';
import { useDict } from '@/hooks/useDict';
const { PhoneResultStatus, ReduceType, FlowStatus, FollowStatus, DistributeStatus, CaseStatus } = useDict("PhoneResultStatus","ReduceType", "FlowStatus", "FollowStatus","DistributeStatus", "CaseStatus");
const allocationModalRef = ref();
const caseLRef = ref();
const selectdList = ref([]);
const curParam = ref({});
const router = useRouter();
const onCheckboxChange = (row) => {
selectdList.value = row.records;
dataValue.value = selectdList.value.length > 0 ? '对选中项操作' : '对查询结果操作'
};
const statisis = ref({});
const getStatisis = (params) => {
getLoantotal(params).then((res) => {
if (res.success) {
statisis.value = res.result;
}
});
};
const dataValue = ref('对查询结果操作');
const dataOptions = [
{
label: '对查询结果操作',
value: '对查询结果操作',
},
{
label: '对选中项操作',
value: '对选中项操作',
}
];
const backCase = async () => {
await ElMessageBox.confirm('是否确认撤回选中案件?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
});
const ids = selectdList.value.map((v) => v.id).join(',');
await backDistribute(ids);
ElMessage({
type: 'success',
message: '撤回成功!',
plain: true,
});
query();
};
const paramCallback = (param) => {
const obj = JSON.parse(JSON.stringify(param));
if (obj.arealist && obj.arealist.length > 0) {
obj['domicileProvince'] = obj.arealist[0];
obj['domicileCity'] = obj.arealist.length > 1 ? obj.arealist[1] : null;
obj['area'] = obj.arealist.length > 2 ? obj.arealist[2] : null;
delete obj['arealist'];
}
if (obj['cpeDate']) {
if (obj['cpeDate'][0]) obj['cpeDateBegin'] = obj['cpeDate'][0];
if (obj['cpeDate'][1]) obj['cpeDateEnd'] = obj['cpeDate'][1];
delete obj['cpeDate'];
}
if (obj['tenantTime']) {
if (obj['tenantTime'][0]) obj['tenantTimeBegin'] = obj['tenantTime'][0];
if (obj['tenantTime'][1]) obj['tenantTimeEnd'] = obj['tenantTime'][1];
delete obj['tenantTime'];
}
curParam.value = obj;
getStatisis(obj);
return obj;
};
const onCellClick = (row) => {
router.push({
path: '/property/case-detail',
query: { id: row.id }, //这里不能直接写成 query: JSON.stringify(item)
});
};
const onCheckboxAll = (flag) => {
if (flag.checked) {
selectdList.value = flag.records;
} else {
selectdList.value = [];
}
dataValue.value = selectdList.value.length > 0 ? '对选中项操作' : '对查询结果操作'
};
const config = reactive({
columns: [
{ type: 'checkbox', title: '', width: 60, fixed: 'left' },
{
field: 'caseId',
title: '案件ID',
showOverflow: 'tooltip',
search: { el: 'input', labelWidth: 105 },
width: 230,
slots: {
default: ({ row, rowIndex }) => {
return (
<div className="flex">
<VxeTooltip
content={row.caseId}
>
<VxeTextEllipsis
content={row.caseId}
status="primary"
style="cursor: pointer;"
onClick={() => onCellClick(row)}
></VxeTextEllipsis>
</VxeTooltip>
<Tag row={row} />
</div>
);
},
},
},
{
field: 'arealist',
enum: citydata,
title: '所属区域',
showOverflow: 'tooltip',
width: 160,
fieldNames: { label: 'label', value: 'value' },
search: { el: 'cascader', props: { clearable: true, checkStrictly: true }, labelWidth: 105 },
slots: {
default: ({ row }) => {
return (
<VxeTooltip
content={
row.borrower.domicileProvince +
(row.borrower.domicileCity ? '-' + row.borrower.domicileCity : '') +
(row.borrower.area ? '-' + row.borrower.area : '')
}
>
<VxeTextEllipsis
content={
row.borrower.domicileProvince +
(row.borrower.domicileCity ? '-' + row.borrower.domicileCity : '') +
(row.borrower.area ? '-' + row.borrower.area : '')
}
></VxeTextEllipsis>
</VxeTooltip>
);
},
},
},
{
field: 'loanPlatform.name',
showOverflow: 'tooltip',
enum: () => getPlatformPage({ current: 1, size: 999999999, status: 'enable' }),
search: {
el: 'select',
props: { filterable: true },
key: 'loanPlatformId',
labelWidth: 105,
},
fieldNames: { label: 'name', value: 'id' },
title: '借款平台',
width: 100,
},
{
field: 'manageOrg.orgName',
title: '资管公司',
enum: () => getManageOrgPage({ current: 1, size: 999999999, status: 'enable' }),
fieldNames: { label: 'orgName', value: 'id' },
showOverflow: 'tooltip',
width: 100,
search: { el: 'select', props: { clearable: true }, key: 'manageOrgId', labelWidth: 105 },
},
{
field: 'distributeNum',
title: '分派数量',
visible: false,
showOverflow: 'tooltip',
width: 100,
search: { el: 'input', props: { clearable: true }, key: 'distributeNum', labelWidth: 105 },
},
{
field: 'batchCode',
title: '导入批次',
showOverflow: 'tooltip',
width: 100,
search: { el: 'input', props: { clearable: true }, key: 'batchCode', labelWidth: 105 },
},
{
field: 'distributeStatus',
title: '分派状态',
showOverflow: 'tooltip',
width: 80,
enum: DistributeStatus,
fieldNames: { label: 'label', value: 'value' },
slots: {
default: ({ row }) => {
return (
<>
{row.distributeStatus
? DistributeStatus.value?.find((v) => v.value === row.distributeStatus)?.label
: ''}
</>
);
},
},
},
{
field: 'tenant.name',
showOverflow: 'tooltip',
enum: () => getTenantPage({ current: 1, size: 999999999, status: 'enable' }),
search: { el: 'select', props: { filterable: true }, key: 'tenantId', labelWidth: 105 },
fieldNames: { label: 'name', value: 'id' },
title: '调解中心',
width: 100,
},
{
field: 'discount',
title: '折扣',
showOverflow: 'tooltip',
width: 80,
},
{
field: 'cpe.username',
title: 'CPE',
showOverflow: 'tooltip',
width: 60,
search: { el: 'input', props: { clearable: true }, key: 'cpeName', labelWidth: 105 },
},
{
field: 'tenantTime',
title: '分派中心日期',
showOverflow: 'tooltip',
width: 130,
search: {
el: 'date-picker',
props: { type: 'daterange', valueFormat: 'YYYY-MM-DD' },
labelWidth: 105,
},
},
{
field: 'commissionAmount',
title: '债权总额',
showOverflow: 'tooltip',
width: 80,
search: { el: 'input', props: { clearable: true }, labelWidth: 105 },
},
{
field: 'cpeDate',
title: '分派CPE日期',
showOverflow: 'tooltip',
width: 130,
search: {
el: 'date-picker',
props: { type: 'daterange', valueFormat: 'YYYY-MM-DD' },
labelWidth: 105,
},
},
{
field: 'borrower.name',
title: '借款人姓名',
showOverflow: 'tooltip',
width: 100,
search: { el: 'input', key: 'borrowerName', props: { clearable: true }, labelWidth: 105 },
},
{
field: 'sumRepayAmount',
title: '已还总额',
showOverflow: 'tooltip',
width: 80,
// search: { el: 'input', props: { clearable: true }, labelWidth: 105 },
},
{
field: 'borrower.idCard',
showOverflow: 'tooltip',
title: '身份证',
width: 140,
search: { el: 'input', props: { clearable: true }, key: 'idCard', labelWidth: 105 },
},
{
field: 'borrower.phone',
showOverflow: 'tooltip',
title: '手机',
width: 100,
search: { el: 'input', props: { clearable: true }, labelWidth: 105, key: 'borrowerPhone' },
},
{
field: 'principalBalance',
title: '剩余本金',
showOverflow: 'tooltip',
width: 80,
},
{
field: 'remaininginterest',
title: '剩余利息',
showOverflow: 'tooltip',
width: 80,
},
{
field: 'commission',
showOverflow: 'tooltip',
title: '违约金',
width: 80,
},
{
field: 'caseStatus',
title: '案件状态',
showOverflow: 'tooltip',
width: 80,
enum: CaseStatus,
search: { el: 'select', props: { filterable: true }, labelWidth: 105 },
fieldNames: { label: 'label', value: 'value' },
slots: {
default: ({ row }) => {
return (
<>
{row.caseStatus ? CaseStatus.value?.find((v) => v.value === row.caseStatus)?.label : ''}
</>
);
},
},
},
{
field: 'credit?.borrowingTime',
title: '借款时间',
showOverflow: 'tooltip',
width: 80
},
{
field: 'credit?.litigationStatus',
title: '诉讼执行状态',
showOverflow: 'tooltip',
width: 80
},
{
field: 'credit?.litigationCaseNo',
title: '诉讼案号',
showOverflow: 'tooltip',
width: 80
},
{
field: 'credit?.executeCaseNo',
title: '执行案号',
showOverflow: 'tooltip',
width: 80
},
{
field: 'credit?.closingStatus',
title: '结案状态',
showOverflow: 'tooltip',
width: 80
},
{
field: 'credit?.constantNo',
title: '合同编号',
showOverflow: 'tooltip',
width: 80
},
{
field: 'credit?.planAmountOrg',
title: '资金方名称',
showOverflow: 'tooltip',
width: 80
},
{
field: 'credit?.planAmount',
title: '申请金额',
showOverflow: 'tooltip',
width: 80
},
{
field: 'credit?.paymentDate',
title: '借款日期',
showOverflow: 'tooltip',
width: 80
},
{
field: 'credit?.overDate',
title: '到期日期',
showOverflow: 'tooltip',
width: 80
},
{
field: 'credit?.period',
title: '期数',
showOverflow: 'tooltip',
width: 80
},
{
field: 'credit?.lastPaymentDate',
title: '最后还款日期',
showOverflow: 'tooltip',
width: 80
},
{
field: 'credit?.yearRate',
title: '年化利率',
showOverflow: 'tooltip',
width: 80
},
{
field: 'credit?.paymentAmount',
title: '订单总应还金额',
showOverflow: 'tooltip',
width: 80
},
{
field: 'credit?.interest',
title: '订单总应还利息',
showOverflow: 'tooltip',
width: 80
},
{
field: 'credit?.free',
title: '订单总应还其他费用',
showOverflow: 'tooltip',
width: 80
},
{
field: 'credit?.overdue',
title: '逾期日期',
showOverflow: 'tooltip',
width: 80
},
{
field: 'credit?.overdueDays',
title: '逾期天数',
showOverflow: 'tooltip',
width: 80
},
{
field: 'credit?.overduePeriod',
title: '逾期期数',
showOverflow: 'tooltip',
width: 80
},
{
field: 'credit?.overBalance',
title: '已还本金',
showOverflow: 'tooltip',
width: 80
},
{
field: 'credit?.overInterest',
title: '已还利息',
showOverflow: 'tooltip',
width: 80
},
{
field: 'credit?.overFree',
title: '已还其他费用',
showOverflow: 'tooltip',
width: 80
},
{
field: 'credit?.remark',
title: '备注',
showOverflow: 'tooltip',
width: 80
},
{
field: 'credit?.disbursement',
title: '垫付费用',
showOverflow: 'tooltip',
width: 80
},
],
onCheckboxChange: onCheckboxChange,
onCheckboxAll: onCheckboxAll,
});
const allocation = (row) => {
if (dataValue.value === '对选中项操作' && (!selectdList.value || !selectdList.value.length)) {
return ElMessage.warning({
message: '请先选择操作对象!',
plain: true,
});
}
if (dataValue.value === '对选中项操作') {
allocationModalRef.value.openModal(
JSON.parse(JSON.stringify(curParam.value)),
JSON.parse(JSON.stringify(selectdList.value))
);
} else {
allocationModalRef.value.openModal(
JSON.parse(JSON.stringify(curParam.value)),
[]
);
}
};
const query = () => caseLRef.value?.search();
onMounted(() => {
query();
});
</script>
...@@ -66,13 +66,13 @@ ...@@ -66,13 +66,13 @@
<vxe-modal <vxe-modal
resize resize
v-model="showModal" v-model="showModal"
title="提示" title="案件收回"
height="342" height="342"
width="560" width="560"
show-footer show-footer
esc-closable esc-closable
> >
<div class="top"> <div class="top px-3">
<div class="number-box"> <div class="number-box">
<div class="number-left"> <div class="number-left">
<div class="icon-wrapper"> <div class="icon-wrapper">
...@@ -107,15 +107,18 @@ ...@@ -107,15 +107,18 @@
</div> </div>
</div> </div>
</div> </div>
<div class="w-full px-3 mt-3 overflow-auto flex-col flex mytable"> <div class="w-full mt-6 px-3 overflow-hidden flex mytable items-center">
⚠️回收处理后可重新分派<br /> <div class="font-bold pr-6">留案案件:</div>
回收:只回收未留案的案件<br /> <el-radio-group v-model="form.option">
强制回收:所有案件都会回收,留案案件会被强制回收<br /> <!-- works when >=2.6.0, recommended ✔️ not work when <2.6.0 ❌ -->
<el-radio value="withdraw">回收</el-radio>
<!-- works when <2.6.0, deprecated act as value when >=3.0.0 -->
<el-radio label="fullWithdraw">强制回收</el-radio>
</el-radio-group>
</div> </div>
<template #footer> <template #footer>
<el-button type="default" @click="showModal = false">取消</el-button> <el-button type="default" @click="showModal = false">取消</el-button>
<el-button type="primary" @click="submitForm('withdraw')">回收</el-button> <el-button type="primary" @click="submitForm1">确认</el-button>
<el-button type="danger" @click="submitForm('fullWithdraw')">强制回收</el-button>
</template> </template>
</vxe-modal> </vxe-modal>
</div> </div>
...@@ -141,6 +144,9 @@ ...@@ -141,6 +144,9 @@
const curParam = ref({}); const curParam = ref({});
const showModal = ref(false); const showModal = ref(false);
const dataValue = ref('对查询结果操作'); const dataValue = ref('对查询结果操作');
const form = reactive({
option: 'withdraw'
});
const dataOptions = [ const dataOptions = [
{ {
label: '对查询结果操作', label: '对查询结果操作',
...@@ -153,6 +159,7 @@ ...@@ -153,6 +159,7 @@
]; ];
const onCheckboxChange = (row) => { const onCheckboxChange = (row) => {
selectdList.value = row.records; selectdList.value = row.records;
dataValue.value = selectdList.value.length > 0 ? '对选中项操作' : '对查询结果操作'
}; };
const statisis = ref({}); const statisis = ref({});
const statisis1 = ref({}); const statisis1 = ref({});
...@@ -190,6 +197,7 @@ ...@@ -190,6 +197,7 @@
p = curParam.value; p = curParam.value;
} }
getStatisis1(p); getStatisis1(p);
form.option = 'withdraw'
showModal.value = true; showModal.value = true;
}; };
const submitForm = async (type) => { const submitForm = async (type) => {
...@@ -220,6 +228,9 @@ ...@@ -220,6 +228,9 @@
query(); query();
showModal.value = false; showModal.value = false;
}; };
const submitForm1 = () => {
submitForm(form.option)
}
const paramCallback = (param) => { const paramCallback = (param) => {
const obj = JSON.parse(JSON.stringify(param)); const obj = JSON.parse(JSON.stringify(param));
obj['tenant'] = 0 obj['tenant'] = 0
...@@ -249,6 +260,7 @@ ...@@ -249,6 +260,7 @@
} else { } else {
selectdList.value = []; selectdList.value = [];
} }
dataValue.value = selectdList.value.length > 0 ? '对选中项操作' : '对查询结果操作'
}; };
const onCellClick = (row) => { const onCellClick = (row) => {
router.push({ router.push({
......
...@@ -92,6 +92,7 @@ ...@@ -92,6 +92,7 @@
const RefImage = ref(false); const RefImage = ref(false);
const onCheckboxChange = (row) => { const onCheckboxChange = (row) => {
selectdList.value = row.records; selectdList.value = row.records;
dataValue.value = selectdList.value.length > 0 ? '对选中项操作' : '对查询结果操作'
}; };
// watch( // watch(
// () => AuditStatus.value, // () => AuditStatus.value,
...@@ -176,6 +177,7 @@ ...@@ -176,6 +177,7 @@
} else { } else {
selectdList.value = []; selectdList.value = [];
} }
dataValue.value = selectdList.value.length > 0 ? '对选中项操作' : '对查询结果操作'
}; };
const config = computed(() => { const config = computed(() => {
return { return {
......
...@@ -66,13 +66,13 @@ ...@@ -66,13 +66,13 @@
<vxe-modal <vxe-modal
resize resize
v-model="showModal" v-model="showModal"
title="提示" title="案件撤案"
height="342" height="342"
width="560" width="560"
show-footer show-footer
esc-closable esc-closable
> >
<div class="top"> <div class="top px-3">
<div class="number-box"> <div class="number-box">
<div class="number-left"> <div class="number-left">
<div class="icon-wrapper"> <div class="icon-wrapper">
...@@ -107,15 +107,18 @@ ...@@ -107,15 +107,18 @@
</div> </div>
</div> </div>
</div> </div>
<div class="w-full px-3 mt-3 overflow-auto flex-col flex mytable"> <div class="w-full mt-6 px-3 overflow-hidden flex mytable items-center">
⚠️撤案处理后不可重新分派<br /> <div class="font-bold pr-6">撤案案件:</div>
撤案:只撤案未留案的案件<br /> <el-radio-group v-model="form.option">
强制撤案:所有案件都会撤案,留案案件会被强制撤案<br /> <!-- works when >=2.6.0, recommended ✔️ not work when <2.6.0 ❌ -->
<el-radio value="withdraw">撤案</el-radio>
<!-- works when <2.6.0, deprecated act as value when >=3.0.0 -->
<el-radio label="fullWithdraw">强制撤案</el-radio>
</el-radio-group>
</div> </div>
<template #footer> <template #footer>
<el-button type="default" @click="showModal = false">取消</el-button> <el-button type="default" @click="showModal = false">取消</el-button>
<el-button type="primary" @click="submitForm('withdraw')">撤案</el-button> <el-button type="primary" @click="submitForm1">确认</el-button>
<el-button type="danger" @click="submitForm('fullWithdraw')">强制撤案</el-button>
</template> </template>
</vxe-modal> </vxe-modal>
</div> </div>
...@@ -141,6 +144,9 @@ ...@@ -141,6 +144,9 @@
const curParam = ref({}); const curParam = ref({});
const showModal = ref(false); const showModal = ref(false);
const dataValue = ref('对查询结果操作'); const dataValue = ref('对查询结果操作');
const form = reactive({
option: 'withdraw'
});
const dataOptions = [ const dataOptions = [
{ {
label: '对查询结果操作', label: '对查询结果操作',
...@@ -153,6 +159,7 @@ ...@@ -153,6 +159,7 @@
]; ];
const onCheckboxChange = (row) => { const onCheckboxChange = (row) => {
selectdList.value = row.records; selectdList.value = row.records;
dataValue.value = selectdList.value.length > 0 ? '对选中项操作' : '对查询结果操作'
}; };
const statisis = ref({}); const statisis = ref({});
const statisis1 = ref({}); const statisis1 = ref({});
...@@ -241,6 +248,7 @@ ...@@ -241,6 +248,7 @@
p = curParam.value; p = curParam.value;
} }
getStatisis1(p); getStatisis1(p);
form.option = 'withdraw'
showModal.value = true; showModal.value = true;
}; };
const onCheckboxAll = (flag) => { const onCheckboxAll = (flag) => {
...@@ -249,6 +257,7 @@ ...@@ -249,6 +257,7 @@
} else { } else {
selectdList.value = []; selectdList.value = [];
} }
dataValue.value = selectdList.value.length > 0 ? '对选中项操作' : '对查询结果操作'
}; };
const onCellClick = (row) => { const onCellClick = (row) => {
router.push({ router.push({
...@@ -629,6 +638,9 @@ ...@@ -629,6 +638,9 @@
onCheckboxChange: onCheckboxChange, onCheckboxChange: onCheckboxChange,
onCheckboxAll: onCheckboxAll, onCheckboxAll: onCheckboxAll,
}); });
const submitForm1 = () => {
submitForm(form.option)
}
const query = () => caseLRef.value?.search(); const query = () => caseLRef.value?.search();
......
...@@ -87,13 +87,17 @@ ...@@ -87,13 +87,17 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item class="w-full" label="分期最大期数:" prop="maxStagesNum" > <el-form-item class="w-full" label="是否共案处理:" prop="mergerCase">
<el-input v-model.number="form.maxStagesNum" placeholder="请输入" style="width: 100%" /> <el-radio-group v-model="form.mergerCase">
<el-radio value="Y"></el-radio>
<el-radio value="N"></el-radio>
</el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="13"> <el-col :span="13">
<el-form-item class="w-full" label="最低分期金额:" prop="minAmount"> <el-form-item class="w-full" label="最低分期金额:" prop="minAmount">
<el-input v-model="form.minAmount" placeholder="请输入" style="width: 100%" /> <el-input v-model="form.minAmount" type="number" placeholder="请输入" style="width: 100%" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
...@@ -102,11 +106,8 @@ ...@@ -102,11 +106,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="13"> <el-col :span="13">
<el-form-item class="w-full" label="是否共案处理:" prop="mergerCase"> <el-form-item class="w-full" label="分期最大期数:" prop="maxStagesNum" >
<el-radio-group v-model="form.mergerCase"> <el-input v-model.number="form.maxStagesNum" placeholder="请输入" style="width: 100%" />
<el-radio value="Y"></el-radio>
<el-radio value="N"></el-radio>
</el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -164,9 +165,9 @@ ...@@ -164,9 +165,9 @@
} }
} }
} }
const checkminAmount = (rule, value, callback) => { const checkmaxStagesNum = (rule, value, callback) => {
if (isNaN(Number(value))) { if (isNaN(Number(value)) || Number(value) % 1 !== 0) {
callback(new Error('请输入数字值')); callback(new Error('请输入整数值'));
} else { } else {
callback(); callback();
} }
...@@ -175,9 +176,12 @@ ...@@ -175,9 +176,12 @@
discount: [ discount: [
{ validator: checkDiscount, trigger: 'blur' }, { validator: checkDiscount, trigger: 'blur' },
], ],
minAmount: [ // minAmount: [
{ validator: checkminAmount, trigger: 'blur' }, // { validator: checkminAmount, trigger: 'blur' },
] // ],
maxStagesNum: [
{ validator: checkmaxStagesNum, trigger: 'blur' },
],
}); });
const downloadfile = inject('download'); const downloadfile = inject('download');
const formRef = ref(); const formRef = ref();
......
...@@ -104,6 +104,7 @@ ...@@ -104,6 +104,7 @@
}; };
const onCheckboxChange = (row) => { const onCheckboxChange = (row) => {
selectdList.value = row.records; selectdList.value = row.records;
dataValue.value = selectdList.value.length > 0 ? '对选中项操作' : '对查询结果操作'
}; };
const onCheckboxAll = (flag) => { const onCheckboxAll = (flag) => {
if (flag.checked) { if (flag.checked) {
...@@ -111,6 +112,7 @@ ...@@ -111,6 +112,7 @@
} else { } else {
selectdList.value = []; selectdList.value = [];
} }
dataValue.value = selectdList.value.length > 0 ? '对选中项操作' : '对查询结果操作'
}; };
const paramCallback = (param) => { const paramCallback = (param) => {
console.log('objobj', param) console.log('objobj', param)
......
...@@ -107,6 +107,7 @@ ...@@ -107,6 +107,7 @@
}; };
const onCheckboxChange = (row) => { const onCheckboxChange = (row) => {
selectdList.value = row.records; selectdList.value = row.records;
dataValue.value = selectdList.value.length > 0 ? '对选中项操作' : '对查询结果操作'
}; };
const onCheckboxAll = (flag) => { const onCheckboxAll = (flag) => {
if (flag.checked) { if (flag.checked) {
...@@ -114,6 +115,7 @@ ...@@ -114,6 +115,7 @@
} else { } else {
selectdList.value = []; selectdList.value = [];
} }
dataValue.value = selectdList.value.length > 0 ? '对选中项操作' : '对查询结果操作'
}; };
const onCellClick = (row) => { const onCellClick = (row) => {
router.push({ router.push({
......
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