Commit 562aea40 authored by 沈翠玲's avatar 沈翠玲

业务审批

parent 7fcd7431
......@@ -45,28 +45,6 @@
const callDrawerRef = ref();
const srcList = ref([]);
const RefImage = ref(false);
const options = [
{
value: 2,
label: '2',
},
{
value: 3,
label: '3',
},
{
value: 4,
label: '4',
},
{
value: 5,
label: '5',
},
{
value: 6,
label: '6',
},
];
const preview = (item, type) => {
const list = [];
item[type].forEach((v) => {
......
......@@ -129,6 +129,7 @@
<el-button type="primary" @click="submitForm('pass')">通过</el-button>
</template>
</vxe-modal>
<el-image-viewer :url-list="srcList" v-if="RefImage" @close="RefImage = false" />
</div>
</template>
......@@ -140,6 +141,10 @@
import { ElMessageBox, ElMessage, ElButton } from 'element-plus';
import { getTenantPage } from '@/api/tenant';
import { useDict } from '@/hooks/useDict';
import { getAppEnvConfig } from '@/utils/env';
const envs = getAppEnvConfig();
const srcList = ref([]);
const RefImage = ref(false);
const { PhoneResultStatus, ReduceType, FlowStatus, FollowStatus, CaseStatus } = useDict("PhoneResultStatus","ReduceType", "FlowStatus", "FollowStatus", "CaseStatus");
const ProTableRef = ref();
......@@ -156,28 +161,6 @@
selectdList.value = [];
}
};
const options = [
{
value: 2,
label: '2',
},
{
value: 3,
label: '3',
},
{
value: 4,
label: '4',
},
{
value: 5,
label: '5',
},
{
value: 6,
label: '6',
},
];
const splitDeConfig = reactive({
columns: [
{
......@@ -226,7 +209,14 @@
query();
};
const preview = (item, type) => {
const list = [];
item[type].forEach((v) => {
list.push(envs.VITE_GLOB_API_URL_PREFIX + '/sys/static/' + v);
});
RefImage.value = true;
srcList.value = list;
};
const config = computed(() => {
return {
columns: [
......@@ -337,8 +327,7 @@
field: 'totalPeriod',
showOverflow: 'tooltip',
title: '还款期数',
enum: options,
search: { el: 'select', props: { filterable: true }, span: 1, labelWidth: 80 },
search: { el: 'input', props: { filterable: true, type: 'number' }, span: 1, labelWidth: 80 },
fieldNames: { label: 'label', value: 'value' },
width: 80,
},
......@@ -360,6 +349,27 @@
search: { el: 'input', labelWidth: 80 },
width: 110,
},
{
field: 'code',
title: '附件',
showOverflow: 'tooltip',
width: 70,
slots: {
default: ({ row, rowIndex }) => {
if (row.images && row.images.length > 0) {
return (
<>
<div className="flex justify-center">
<ElButton onClick={() => preview(row, 'images')} link type="primary">
查看
</ElButton>
</div>
</>
);
}
},
},
},
{
field: 'flowStatus',
title: '审核状态',
......
......@@ -109,6 +109,7 @@
<el-button type="primary" @click="submitForm('pass')">通过</el-button>
</template>
</vxe-modal>
<el-image-viewer :url-list="srcList" v-if="RefImage" @close="RefImage = false" />
</div>
</template>
......@@ -120,11 +121,15 @@
import { ElMessageBox, ElMessage, ElButton } from 'element-plus';
import { getTenantPage } from '@/api/tenant';
import { useDict } from '@/hooks/useDict';
import { getAppEnvConfig } from '@/utils/env';
const envs = getAppEnvConfig();
const { PhoneResultStatus, ReduceType, FlowStatus, FollowStatus, CaseStatus } = useDict("PhoneResultStatus","ReduceType", "FlowStatus", "FollowStatus", "CaseStatus");
const ProTableRef = ref();
const showModal = ref(false);
const srcList = ref([]);
const RefImage = ref(false);
const selectdList = ref([]);
const onCheckboxChange = (row) => {
console.log('row', row);
......@@ -140,6 +145,14 @@
const changeStatus = async () => {
showModal.value = true;
};
const preview = (item, type) => {
const list = [];
item[type].forEach((v) => {
list.push(envs.VITE_GLOB_API_URL_PREFIX + '/sys/static/' + v);
});
RefImage.value = true;
srcList.value = list;
};
const submitForm = async (type) => {
const ids = selectdList.value.map((v) => v.id).join(',');
await flowStatusByIds({
......@@ -250,6 +263,27 @@
title: '调解中心',
width: 100,
},
{
field: 'code',
title: '附件',
showOverflow: 'tooltip',
width: 70,
slots: {
default: ({ row, rowIndex }) => {
if (row.images && row.images.length > 0) {
return (
<>
<div className="flex justify-center">
<ElButton onClick={() => preview(row, 'images')} link type="primary">
查看
</ElButton>
</div>
</>
);
}
},
},
},
{
field: 'flowStatus',
title: '审核状态',
......
......@@ -304,6 +304,7 @@
askForStatus: 'Pending',
flowStatus: 'pending',
...form,
images: form.images.map((v) => v.url)?.length > 0 ? form.images.map((v) => v.url) : null,
reduceRecords: list,
};
console.log('sadas', params);
......
......@@ -271,28 +271,14 @@
const options = ref([
]);
const getPlatforms = (id) => {
for (let i = 2; i <= 6; i++) {
const maxStagesNum = Number(currentDetail.value.maxStagesNum) || 6
for (let i = 2; i <= maxStagesNum; i++) {
options.value.push({
value: i,
label: i + '',
})
}
console.log('options.value', options.value)
getByIdPlatforms(id).then((res) => {
console.log('resres', res);
if (res.success) {
if (res.result.maxStagesNum) {
const list = options.value.filter((v) => v.value > res.result.maxStagesNum);
list.forEach((e) => {
e['disabled'] = true;
});
}
if (res.result.minAmount) {
minAmount.value = res.result.minAmount;
}
}
//
});
minAmount.value = Number(currentDetail.value.minAmount);
};
const selectdList = ref([]);
......
......@@ -513,22 +513,22 @@
<returnModal
ref="returnModalRef"
@success="query('还款')"
:mergerCase="detail?.manageOrg?.mergerCase"
:mergerCase="detail?.mergerCase"
></returnModal>
<reduceDrawer
ref="reduceDrawerRef"
@success="query('减免')"
:mergerCase="detail?.manageOrg?.mergerCase"
:mergerCase="detail?.mergerCase"
></reduceDrawer>
<splitDrawer
ref="splitDrawerRef"
@success="query('分期')"
:mergerCase="detail?.manageOrg?.mergerCase"
:mergerCase="detail?.mergerCase"
></splitDrawer>
<callDrawer
ref="callDrawerRef"
@success="query('跟进')"
:mergerCase="detail?.manageOrg?.mergerCase"
:mergerCase="detail?.mergerCase"
></callDrawer>
<el-image-viewer :url-list="srcList" v-if="RefImage" @close="RefImage = false" />
</div>
......@@ -992,19 +992,19 @@
field: 'totalRepayAmount',
showOverflow: 'tooltip',
title: '还款总额',
width: 80,
width: 70,
},
{
field: 'applyDate',
title: '分期申请时间',
showOverflow: 'tooltip',
width: 115,
width: 100,
},
{
field: 'effectiveTime',
title: '分期生效时间',
showOverflow: 'tooltip',
width: 115,
width: 100,
},
{
field: 'totalPeriod',
......@@ -1024,6 +1024,26 @@
showOverflow: 'tooltip',
width: 110,
},
{
field: 'code',
title: '附件',
width: 55,
slots: {
default: ({ row, rowIndex }) => {
if (row.images && row.images.length > 0) {
return (
<>
<div className="flex justify-center">
<ElButton onClick={() => preview(row, 'images')} link type="primary">
查看
</ElButton>
</div>
</>
);
}
},
},
},
],
onCellClick: onCellClick,
toolbarConfig: { enabled: false },
......@@ -1177,6 +1197,26 @@
showOverflow: 'tooltip',
title: '减免生效时间',
},
{
field: 'code',
title: '附件',
width: 60,
slots: {
default: ({ row, rowIndex }) => {
if (row.images && row.images.length > 0) {
return (
<>
<div className="flex justify-center">
<ElButton onClick={() => preview(row, 'images')} link type="primary">
查看
</ElButton>
</div>
</>
);
}
},
},
},
{
field: 'code',
title: '操作',
......
......@@ -24,6 +24,7 @@
import { useRouter } from 'vue-router';
import { reactive, ref } from 'vue';
import { getCreditPage } from '@/api/property';
import { ElButton, ElMessage, ElTag } from 'element-plus';
const caseModalRef = ref();
const caseLRef = ref();
import { onMounted } from 'vue';
......@@ -143,6 +144,31 @@
width: 80,
search: { el: 'input', props: { clearable: true }, labelWidth: 80 },
},
{
field: 'maxStagesNum',
title: '分期最大期数',
width: 60,
showOverflow: 'tooltip',
search: { el: 'input', props: { clearable: true } },
},
{
field: 'minAmount',
title: '最低分期金额',
width: 80,
showOverflow: 'tooltip',
search: { el: 'input', props: { clearable: true } },
},
{
field: 'mergerCase',
title: '是否共案处理',
showOverflow: 'tooltip',
width: 100,
slots: {
default: ({ row }) => {
return <ElTag>{row.mergerCase == 'Y' ? '是' : '否'}</ElTag>;
},
},
},
{
field: 'sumRepayAmount',
title: '累计还款金额',
......
<template>
<div class="table-box">
<div class="card flex mb-2" style="padding-top: 0">
<div class="flex-1">
<div style="width: 30%">
<div class="mb-1 text-center step">
<div class="xuhao">1</div>
上传文件
......@@ -35,7 +35,7 @@
</div>
</div>
</div>
<div class="flex-1">
<div style="width: 30%">
<div class="mb-1 text-center step">
<div class="xuhao">2</div>
检查数据
......@@ -70,17 +70,38 @@
上传数据
</div>
<div class="w-full flex items-center justify-center pt-5">
<div class="px-7">
<el-form ref="formRef" inline :model="form" :rules="rules" label-width="85px">
<el-form-item class="w-full" label="导入批次:" prop="code">
<el-input v-model="form.code" placeholder="请输入" style="width: 100%" />
</el-form-item>
<!-- <el-form-item class="w-full" label="委案合同:" prop="contractNo">
<el-input v-model="form.contractNo" placeholder="请输入" style="width: 100%" />
</el-form-item> -->
<el-form-item class="w-full" label="折扣:" prop="discount">
<el-input v-model="form.discount" placeholder="请输入" style="width: 100%" />
</el-form-item>
<div>
<el-form ref="formRef" inline :model="form" :rules="rules" label-width="120px">
<el-row :gutter="10">
<el-col :span="24">
<el-form-item class="w-full" label="导入批次:" prop="code" >
<el-input v-model="form.code" placeholder="请输入" style="width: 100%" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item class="w-full" label="分期最大期数:" prop="maxStagesNum" >
<el-input v-model.number="form.maxStagesNum" placeholder="请输入" style="width: 100%" />
</el-form-item>
</el-col>
<el-col :span="13">
<el-form-item class="w-full" label="最低分期金额:" prop="minAmount">
<el-input v-model="form.minAmount" placeholder="请输入" style="width: 100%" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item class="w-full" label="折扣:" prop="discount">
<el-input v-model="form.discount" placeholder="请输入" style="width: 100%" />
</el-form-item>
</el-col>
<el-col :span="13">
<el-form-item class="w-full" label="是否共案处理:" prop="mergerCase">
<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-col>
</el-row>
</el-form>
<div class="flex justify-end">
<el-button
......@@ -119,7 +140,7 @@
import errorModal from './components/errorModal.vue';
import { reactive, ref } from 'vue';
import { computed, onMounted } from 'vue';
import { ElButton, ElMessage } from 'element-plus';
import { ElButton, ElMessage, ElTag } from 'element-plus';
import { Upload, ArrowRight } from '@element-plus/icons-vue';
import { inject } from 'vue';
import { LoanSubmit, importLoanPage, checkLoanExcel } from '@/api/import';
......@@ -134,10 +155,20 @@
}
}
}
const checkminAmount = (rule, value, callback) => {
if (isNaN(Number(value))) {
callback(new Error('请输入数字值'));
} else {
callback();
}
}
const rules = ref({
discount: [
{ validator: checkDiscount, trigger: 'blur' },
],
minAmount: [
{ validator: checkminAmount, trigger: 'blur' },
]
});
const downloadfile = inject('download');
const formRef = ref();
......@@ -180,12 +211,29 @@
showOverflow: 'tooltip',
search: { el: 'input', props: { clearable: true } },
},
// {
// field: 'contractNo',
// title: '委案合同',
// showOverflow: 'tooltip',
// search: { el: 'input', props: { clearable: true } },
// },
{
field: 'maxStagesNum',
title: '分期最大期数',
showOverflow: 'tooltip',
search: { el: 'input', props: { clearable: true } },
},
{
field: 'minAmount',
title: '最低分期金额',
showOverflow: 'tooltip',
search: { el: 'input', props: { clearable: true } },
},
{
field: 'mergerCase',
title: '是否共案处理',
showOverflow: 'tooltip',
width: 100,
slots: {
default: ({ row }) => {
return <ElTag>{row.mergerCase == 'Y' ? '是' : '否'}</ElTag>;
},
},
},
{
field: 'code',
title: '资产类型',
......@@ -264,7 +312,9 @@
const form = reactive({
path: '',
code: '',
contractNo: '',
maxStagesNum: '',
minAmount: '',
mergerCase: 'N',
discount: '',
});
const upload = reactive({
......@@ -329,11 +379,21 @@
const query = () => ProTableRef.value?.search();
const submitData = async () => {
try {
if (!form.maxStagesNum) return ElMessage.warning({
message: '分期最大期数必填',
plain: true,
});
// if (!form.minAmount) return ElMessage.warning({
// message: '最低分期金额必填',
// plain: true,
// });
await formRef.value.validate();
await LoanSubmit({
file: form.path,
code: form.code,
contractNo: form.contractNo,
maxStagesNum: form.maxStagesNum,
minAmount: form.minAmount,
mergerCase: form.mergerCase,
discount: form.discount,
}).then((res) => {
ElMessage.success({
......@@ -345,7 +405,9 @@
query();
form['path'] = '';
form['code'] = '';
form['contractNo'] = '';
form['maxStagesNum'] = '';
form['minAmount'] = '';
form['mergerCase'] = 'N';
form['discount'] = '';
});
} catch {}
......@@ -358,7 +420,7 @@
<style lang="scss" scoped>
.importwrapper {
:deep(.el-form-item) {
margin-bottom: 3px !important;
margin-bottom: 4px !important;
}
}
.xuhao {
......
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