Commit 83b5ad32 authored by 沈翠玲's avatar 沈翠玲

前端调整

parent 28814443
......@@ -4,7 +4,7 @@
:background="true"
:current-page="pageable.current"
:page-size="pageable.size"
:page-sizes="[10, 25, 50, 100]"
:page-sizes="[100, 500, 800, 1000]"
:total="pageable.total"
:size="globalStore?.assemblySize ?? 'default'"
layout="total, sizes, prev, pager, next, jumper"
......
......@@ -17,7 +17,7 @@ export function useProTable(
// 当前页数
current: 1,
// 每页显示条数
size: 10,
size: 100,
// 总条数
total: 0,
},
......
......@@ -250,26 +250,6 @@
title: '调解中心',
width: 100,
},
{
field: 'reduceType',
title: '减免类型',
showOverflow: 'tooltip',
width: 80,
enum: ReduceType,
search: { el: 'select', props: { filterable: true }, span: 1, labelWidth: 80 },
fieldNames: { label: 'label', value: 'value' },
slots: {
default: ({ row }) => {
return (
<>
{row.reduceType
? ReduceType.value?.find((v) => v.value === row.reduceType)?.label
: ''}
</>
);
},
},
},
{
field: 'flowStatus',
title: '审核状态',
......
<template>
<div class="table-box">
<div>
<ProTable
:config="config"
ref="caseLRef"
:api="getTrackRecord"
:paramCallback="paramCallback"
>
<template #table_top>
<div>
<div class=" bg-white">
<el-tabs v-model="activeName" type="card" class="demo-tabs" @tab-click="handleClick">
<el-tab-pane
:label="item.label"
:name="item.value"
v-for="(item, index) in AuditStatus"
v-for="(item, index) in tabs"
:key="index"
></el-tab-pane>
</el-tabs>
>
<template #label>
<div>
{{item.label}}
<el-badge :value='item.msg' :max="9999"></el-badge>
</div>
</template>
</el-tab-pane>
</el-tabs>
</div>
<div>
<ProTable
:config="config"
ref="caseLRef"
:api="getTrackRecord"
:paramCallback="paramCallback"
>
<!-- 表格 header 按钮 -->
<template #left_buttons>
<el-button
......@@ -48,6 +53,7 @@
import { useUserStore } from '@/stores/modules/user';
import { getTenantPage } from '@/api/tenant';
import { useDict } from '@/hooks/useDict';
import { watch } from 'vue';
const { PhoneResultStatus, ReduceType, FlowStatus, FollowStatus, AuditStatus, CaseStatus } = useDict("PhoneResultStatus","ReduceType", "FlowStatus", "FollowStatus","AuditStatus", "CaseStatus");
const envs = getAppEnvConfig();
const { userInfo } = useUserStore();
......@@ -58,12 +64,59 @@
const allocationModalRef = ref();
const caseLRef = ref();
const selectdList = ref([]);
const tabs = ref([]);
const callDrawerRef = ref();
const srcList = ref([]);
const RefImage = ref(false);
const onCheckboxChange = (row) => {
selectdList.value = row.records;
};
watch(
() => AuditStatus.value,
(newValue, oldValue) => {
const list = []
if (AuditStatus && AuditStatus.value && AuditStatus.value.length) {
AuditStatus.value.forEach(async e => {
const param = {
current: 1,
size: 1,
auditStatus: e.value,
followStatus: [
'progress',
'pass_on',
'no_pass',
'Claims_unrelated_to_creditors',
'Claiming_not_to_be_myself',
]
}
const t = e.value
if (userInfo.id) {
param['createBy'] = userInfo.id;
}
let result = new Promise((resolve, reject) => {
getTrackRecord(param).then(res => {
const obj = {}
obj[e.value] = res
resolve(obj)
})
});
list.push(result)
})
}
Promise.all(list).then(res => {
console.log(res)
let tttt = {}
res.forEach(e => {
tttt = {...tttt, ...e}
})
AuditStatus.value.forEach(e => {
const obj = JSON.parse(JSON.stringify(e))
obj['msg'] = tttt[e.value].result.page.totalElements
tabs.value.push(obj)
})
})
}
);
const activeName = ref('un_audit');
const callMode = ref('');
......
......@@ -156,6 +156,7 @@
<el-upload
class="avatar-uploader"
:action="url"
ref="lypictureRef"
:headers="{timeout:180000}"
:on-success="handleFileSuccess"
:on-remove="handleRemove"
......@@ -171,6 +172,7 @@
:action="url"
:headers="{timeout:180000}"
list-type="picture-card"
ref="wxpictureRef"
class="mypicture"
:on-preview="handlePictureCardPreview"
:on-success="handleFileSuccess1"
......@@ -187,6 +189,7 @@
:action="url"
:headers="{timeout:180000}"
list-type="picture-card"
ref="msgpictureRef"
class="mypicture"
:on-preview="handlePictureCardPreview"
:on-success="handleFileSuccess2"
......@@ -203,6 +206,7 @@
:action="url"
:headers="{timeout:180000}"
list-type="picture-card"
ref="otherpictureRef"
class="mypicture"
:on-preview="handlePictureCardPreview"
:on-success="handleFileSuccess3"
......@@ -247,6 +251,10 @@
const progressFlag = ref(false);
const loadProgress = ref(0);
const ProTableRef = ref();
const wxpictureRef = ref();
const msgpictureRef = ref();
const otherpictureRef = ref();
const lypictureRef = ref();
const dialogImageUrl = ref('');
const dialogVisible = ref(false);
const emits = defineEmits(['success']);
......@@ -444,6 +452,10 @@
form.notes = [];
form.others = [];
form.voices = [];
wxpictureRef.value?.clearFiles()
msgpictureRef.value?.clearFiles()
otherpictureRef.value?.clearFiles()
lypictureRef.value?.clearFiles()
resuleObj.label = '本人可联';
resuleObj.childrenlabel = null;
tabledata.value = caselist;
......@@ -463,6 +475,15 @@
return ElMessage.warning({
message: '跟进结果必选',
});
if (!form.remark)
return ElMessage.warning({
message: '跟进备注必填',
});
if (!form.trackTime) {
return ElMessage.warning({
message: '跟进时间必选',
});
}
saveTrackRecord({
loans: selectdList.value,
guarantor: currentInfo.value,
......
......@@ -17,18 +17,6 @@
label-position="left"
>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item class="w-full" label="减免类型:" prop="name" label-width="82px">
<el-select v-model="form.reduceType" placeholder="请选择">
<el-option
v-for="item in ReduceType"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item class="w-full" label="减免截止时间:" prop="code">
<el-date-picker v-model="form.applyDate" type="datetime" />
......@@ -57,6 +45,25 @@
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item class="w-full" label="附件" prop="code">
<el-upload
:action="url"
:headers="{timeout:180000}"
list-type="picture-card"
ref="mypictureRef"
class="mypicture"
:on-preview="handlePictureCardPreview"
:on-success="handleFileSuccess1"
:on-remove="handleRemove1"
>
<div class="text-center">
<el-icon><Plus /></el-icon>
<div>附件</div>
</div>
</el-upload>
</el-form-item>
</el-col>
</el-row>
</el-form>
......@@ -81,6 +88,9 @@
<el-button type="primary" @click="submitForm">确定</el-button>
</div>
</template>
<el-dialog v-model="dialogVisible">
<img w-full :src="dialogImageUrl" alt="Preview Image" />
</el-dialog>
</el-drawer>
</template>
<script setup lang="jsx" name="reduceDrawer">
......@@ -92,15 +102,22 @@
import { onMounted } from 'vue';
import { watch } from 'vue';
import Decimal from 'decimal.js';
import { getAppEnvConfig } from '@/utils/env';
import { useDict } from '@/hooks/useDict';
const envs = getAppEnvConfig();
const { PhoneResultStatus, ReduceType, FlowStatus, FollowStatus, AuditStatus, CaseStatus } = useDict("PhoneResultStatus","ReduceType", "FlowStatus", "FollowStatus","AuditStatus", "CaseStatus");
const emits = defineEmits(['success']);
const url = envs.VITE_GLOB_API_URL_PREFIX + '/sys/upload';
const showModal = ref(false);
const tabledata = ref([]);
const ProTableRef = ref();
const mypictureRef = ref();
const dialogImageUrl = ref('');
const dialogVisible = ref(false);
const form = reactive({
totalReduceAmount: 0,
totalNumber: '',
images: [],
reduceType: 'settle',
remainingAmount: 0,
applyDate: dayjs().format('YYYY-MM-DD HH:mm:ss'),
......@@ -123,6 +140,20 @@
);
});
};
const handlePictureCardPreview = (uploadFile) => {
dialogImageUrl.value = uploadFile.url;
dialogVisible.value = true;
};
const handleRemove1 = (uploadFile, uploadFiles) => {
const index = form.images.findIndex((v) => v.name === uploadFile.name);
form.images.splice(index, 1);
};
const handleFileSuccess1 = (response, file, fileList) => {
form.images.push({
url: response.message,
name: file.name,
});
};
const onCheckboxAll = (flag) => {
if (flag.checked) {
selectdList.value = flag.records;
......@@ -243,6 +274,8 @@
form.totalReduceAmount = 0;
form.remainingAmount = 0;
const list = [];
form.images = [];
mypictureRef.value?.clearFiles()
caselist.forEach((item) => {
const payAmount = Number(item.remainingAmount) || 0;
list.push({ reduceAmount: Number(item.reduceAmount) || 0, payAmount: payAmount, loan: item });
......@@ -298,4 +331,17 @@
border: none;
}
}
.mypicture {
:deep(.el-upload--picture-card) {
width: 70px;
height: 70px;
}
:deep(.el-upload-list__item) {
width: 70px;
height: 70px;
}
:deep(.el-upload--picture-card) {
font-size: 12px;
}
}
</style>
......@@ -13,22 +13,18 @@
<template v-if="currentType === '结清减免还款' || currentType === '直接还款'">
<table style="margin-bottom: 10px" v-if="currentType === '结清减免还款'">
<tr>
<td class="label">减免类型</td>
<td>结清减免</td>
<td class="label">减免申请ID</td>
<td>{{ currentInfo.id }}</td>
<td class="label">减免截止时间</td>
<td>{{ currentInfo.applyDate }}</td>
</tr>
<tr>
<td class="label">减免金额(总计)</td>
<td>{{ currentInfo.totalReduceAmount }}</td>
</tr>
<tr>
<td class="label">减免案件数</td>
<td>{{ currentInfo.totalNumber }}</td>
<td class="label">减免生效时间</td>
<td>{{ currentInfo.inEffectDate }}</td>
</tr>
<tr>
<td class="label">应还金额</td>
<td colspan="5">{{ currentInfo.totalPayAmount }}</td>
</tr>
......@@ -225,10 +221,10 @@
) {
callback(new Error('*金额必须等于应还金额'));
} else if (
Number(value) !== Number(currentInfo.value.remainingAmount) &&
Number(value) > Number(currentInfo.value.remainingAmount) &&
currentType.value === '直接还款'
) {
callback(new Error('*金额必须于应还金额'));
callback(new Error('*金额必须于应还金额'));
} else if (
Number(value) !== Number(currentInfo.value.applyAmount) &&
currentType.value === '分期还款'
......
......@@ -82,17 +82,6 @@
/>
</el-form-item>
</el-col>
<!-- <el-col :span="24">
<el-form-item class="w-full" label="非首期还款日:" prop="code">
<el-date-picker
v-model="form.datetime"
class="w-full"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
type="date"
/>
</el-form-item>
</el-col> -->
<el-col :span="24">
<el-form-item class="w-full" label="分期生效时间:" prop="code">
<el-date-picker
......@@ -104,6 +93,25 @@
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item class="w-full" label="附件" prop="code">
<el-upload
:action="url"
:headers="{timeout:180000}"
list-type="picture-card"
ref="mypictureRef"
class="mypicture"
:on-preview="handlePictureCardPreview"
:on-success="handleFileSuccess1"
:on-remove="handleRemove1"
>
<div class="text-center">
<el-icon><Plus /></el-icon>
<div>附件</div>
</div>
</el-upload>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
......@@ -134,6 +142,9 @@
<el-button type="primary" @click="submitForm">确定</el-button>
</div>
</template>
<el-dialog v-model="dialogVisible">
<img w-full :src="dialogImageUrl" alt="Preview Image" />
</el-dialog>
</el-drawer>
</template>
<script setup lang="jsx" name="reduceDrawer">
......@@ -143,18 +154,23 @@
import { ElInputNumber, ElMessage } from 'element-plus';
import { savebyStages } from '@/api/property';
import { getByIdPlatforms } from '@/api/platform';
import { getAppEnvConfig } from '@/utils/env';
import Decimal from 'decimal.js';
import { useDict } from '@/hooks/useDict';
const { PhoneResultStatus, RepayStatus, FlowStatus, FollowStatus, AuditStatus, CaseStatus } = useDict("PhoneResultStatus","RepayStatus", "FlowStatus", "FollowStatus","AuditStatus", "CaseStatus");
const envs = getAppEnvConfig();
const url = envs.VITE_GLOB_API_URL_PREFIX + '/sys/upload';
const ProTableRef = ref();
const mypictureRef = ref();
const showModal = ref(false);
const editFirst = ref(false);
const tabledata = ref([]);
const splitdata = ref([]);
const dialogImageUrl = ref('');
const dialogVisible = ref(false);
const form = reactive({
remainingAmount: 0,
images: [],
totalRepayAmount: 0,
totalPeriod: 2,
applyDate: dayjs().format('YYYY-MM-DD HH:mm:ss'),
......@@ -211,7 +227,16 @@
}
editFirst.value = !editFirst.value;
};
const handleFileSuccess1 = (response, file, fileList) => {
form.images.push({
url: response.message,
name: file.name,
});
};
const handleRemove1 = (uploadFile, uploadFiles) => {
const index = form.images.findIndex((v) => v.name === uploadFile.name);
form.images.splice(index, 1);
};
const changePeriod = () => {
const list = [];
const crash = Decimal(
......@@ -441,12 +466,18 @@
],
};
});
const handlePictureCardPreview = (uploadFile) => {
dialogImageUrl.value = uploadFile.url;
dialogVisible.value = true;
};
const openModal = (detail, caselist) => {
showModal.value = true;
editFirst.value = false;
currentDetail.value = detail;
console.log('currentDetail', currentDetail.value, caselist);
form.totalRepayAmount = 0;
form.images = [];
mypictureRef.value?.clearFiles()
form.remainingAmount = 0;
caselist.forEach((item) => {
const remainingAmount = Decimal(Number(item.remainingAmount) || 0).sub(
......@@ -484,6 +515,7 @@
const params = {
...currentDetail.value,
...form,
images: form.images.map((v) => v.url)?.length > 0 ? form.images.map((v) => v.url) : null,
byStagesRecords: splitdata.value,
loans: selectdList.value,
flowStatus: 'pending',
......@@ -514,4 +546,17 @@
width: 100%;
}
}
.mypicture {
:deep(.el-upload--picture-card) {
width: 70px;
height: 70px;
}
:deep(.el-upload-list__item) {
width: 70px;
height: 70px;
}
:deep(.el-upload--picture-card) {
font-size: 12px;
}
}
</style>
......@@ -534,7 +534,7 @@
<script setup lang="jsx" name="caseDetail">
import { useRoute } from 'vue-router';
import { reactive, ref, onBeforeMount, onMounted } from 'vue';
import { reactive, ref, onBeforeMount, onMounted, nextTick } from 'vue';
import { ElButton, ElTag } from 'element-plus';
import repairModal from './components/repairModal.vue';
import returnModal from './components/returnModal.vue';
......@@ -1160,18 +1160,6 @@
title: '累计还款金额',
showOverflow: 'tooltip',
},
{
field: 'reduceType',
title: '减免类型',
showOverflow: 'tooltip',
slots: {
default: ({ row }) => {
return (
<>{row.reduceType ? (row.reduceType === 'settle' ? '结清减免' : '分期减免') : ''}</>
);
},
},
},
{
field: 'id',
showOverflow: 'tooltip',
......@@ -1270,6 +1258,9 @@
);
});
sumCase.value = sum;
if (res.result.length === 1) {
foldCaseTree()
}
}
});
}
......@@ -1307,6 +1298,11 @@
);
});
sumCase.value = sum;
if (res.result.length === 1) {
nextTick(() => {
foldCaseTree()
})
}
}
});
getReduces(detail.value?.borrower?.id).then((res) => {
......
......@@ -79,7 +79,7 @@
<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.number="form.discount" placeholder="请输入" style="width: 100%" />
<el-input v-model="form.discount" placeholder="请输入" style="width: 100%" />
</el-form-item>
</el-form>
<div class="flex justify-end">
......@@ -123,8 +123,24 @@
import { Upload, ArrowRight } from '@element-plus/icons-vue';
import { inject } from 'vue';
import { LoanSubmit, importLoanPage, checkLoanExcel } from '@/api/import';
const checkDiscount = (rule, value, callback) => {
if (isNaN(Number(value))) {
callback(new Error('请输入数字值'));
} else {
if (Number(value) && (Number(value) > 10 || Number(value) < 0)) {
callback(new Error('折扣应该0到10'));
} else {
callback();
}
}
}
const rules = ref({
discount: [
{ validator: checkDiscount, trigger: 'blur' },
],
});
const downloadfile = inject('download');
const formRef = ref();
const envs = getAppEnvConfig();
const ProTableRef = ref();
const progressFlag = ref(false);
......@@ -311,8 +327,10 @@
downloadfile('/sys/static/' + row.file, {}, name);
};
const query = () => ProTableRef.value?.search();
const submitData = () => {
LoanSubmit({
const submitData = async () => {
try {
await formRef.value.validate();
await LoanSubmit({
file: form.path,
code: form.code,
contractNo: form.contractNo,
......@@ -330,8 +348,10 @@
form['contractNo'] = '';
form['discount'] = '';
});
} catch {}
};
onMounted(() => {
formRef.value.clearValidate();
query();
});
</script>
......
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