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

前端调整

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