Commit 23dfbb54 authored by 沈翠玲's avatar 沈翠玲

优化

parent dd965c2c
......@@ -8,7 +8,7 @@ import { setupDirectives } from '@/plugins/directives';
import { setupVxeTabele } from './plugins/vxe-table';
import ProTable from '@/components/ProTable/index.vue';
import { download } from '@/utils/http/index';
import './styles/element-variables.scss'
import './styles/element-variables.scss';
export async function bootstrapInstall() {
const app = createApp(App);
......
// element-variables.scss
@import 'element-plus/theme-chalk/src/index.scss';
@import "element-plus/theme-chalk/src/index.scss";
$--font-size: 13px;
\ No newline at end of file
$--font-size: 13px;
......@@ -155,8 +155,12 @@
<el-form inline :model="form" :rules="rules" label-width="110px" label-position="left">
<el-form-item class="w-full" label="通话录音:" prop="code">
<el-icon>
<Download v-for="(item, index) in form.voices" :key="index" @click="download(item)" />
</el-icon>
<Download
v-for="(item, index) in form.voices"
:key="index"
@click="download(item)"
/>
</el-icon>
<el-upload
class="avatar-uploader"
:action="url"
......@@ -165,7 +169,9 @@
:disabled="props.mode !== 'handle'"
:auto-upload="true"
>
<el-button type="primary" plain :icon="Upload" :disabled="props.mode !== 'handle'">上传录音文件</el-button>
<el-button type="primary" plain :icon="Upload" :disabled="props.mode !== 'handle'"
>上传录音文件</el-button
>
</el-upload>
<!-- 进度条 -->
<!-- <el-progress v-if="progressFlag" :percentage="loadProgress" /> -->
......@@ -247,7 +253,7 @@
import { computed, inject } from 'vue';
import { reactive, ref } from 'vue';
import { ElInputNumber, ElMessage } from 'element-plus';
import { Upload,Download } from '@element-plus/icons-vue';
import { Upload, Download } from '@element-plus/icons-vue';
import { getAppEnvConfig } from '@/utils/env';
import { saveTrackRecord } from '@/api/property';
import { auditAudit } from '@/api/audit';
......@@ -384,15 +390,15 @@
}
};
const handleFileSuccess = (response, file, fileList) => {
if(file.uid) {
if (file.uid) {
const item = form.voices.find((v) => v.uid === file.uid);
item.url = envs.VITE_GLOB_API_URL_PREFIX + '/sys/static/' + response.message
item.url = envs.VITE_GLOB_API_URL_PREFIX + '/sys/static/' + response.message;
}
};
const handleFileSuccess1 = (response, file, fileList) => {
if(file.uid) {
if (file.uid) {
const item = form.images.find((v) => v.uid === file.uid);
item.url = envs.VITE_GLOB_API_URL_PREFIX + '/sys/static/' + response.message
item.url = envs.VITE_GLOB_API_URL_PREFIX + '/sys/static/' + response.message;
}
};
const handleRemove1 = (uploadFile, uploadFiles) => {
......@@ -401,20 +407,20 @@
};
const handleFileSuccess2 = (response, file, fileList) => {
// console.log(response, file);
if(file.uid) {
if (file.uid) {
const item = form.notes.find((v) => v.uid === file.uid);
item.url = envs.VITE_GLOB_API_URL_PREFIX + '/sys/static/' + response.message
};
item.url = envs.VITE_GLOB_API_URL_PREFIX + '/sys/static/' + response.message;
}
};
const handleRemove2 = (uploadFile, uploadFiles) => {
const index = form.notes.findIndex((v) => v.name === uploadFile.name);
form.notes.splice(index, 1);
};
const handleFileSuccess3 = (response, file, fileList) => {
if(file.uid) {
if (file.uid) {
const item = form.others.find((v) => v.uid === file.uid);
item.url = envs.VITE_GLOB_API_URL_PREFIX + '/sys/static/' + response.message
};
item.url = envs.VITE_GLOB_API_URL_PREFIX + '/sys/static/' + response.message;
}
};
const download = (item) => {
const name = item.slice(item.lastIndexOf('/') + 1, item.length);
......@@ -496,22 +502,22 @@
console.log('formform', form);
};
const submitForm = (type) => {
let voices = JSON.parse(JSON.stringify(form.voices.map(v => v.url)))
let images = JSON.parse(JSON.stringify(form.images.map(v => v.url)))
let notes = JSON.parse(JSON.stringify(form.notes.map(v => v.url)))
let others = JSON.parse(JSON.stringify(form.others.map(v => v.url)))
voices = voices.map(v => {
return v.replace(envs.VITE_GLOB_API_URL_PREFIX + '/sys/static/', '')
})
images = images.map(v => {
return v.replace(envs.VITE_GLOB_API_URL_PREFIX + '/sys/static/', '')
})
notes = notes.map(v => {
return v.replace(envs.VITE_GLOB_API_URL_PREFIX + '/sys/static/', '')
})
others = others.map(v => {
return v.replace(envs.VITE_GLOB_API_URL_PREFIX + '/sys/static/', '')
})
let voices = JSON.parse(JSON.stringify(form.voices.map((v) => v.url)));
let images = JSON.parse(JSON.stringify(form.images.map((v) => v.url)));
let notes = JSON.parse(JSON.stringify(form.notes.map((v) => v.url)));
let others = JSON.parse(JSON.stringify(form.others.map((v) => v.url)));
voices = voices.map((v) => {
return v.replace(envs.VITE_GLOB_API_URL_PREFIX + '/sys/static/', '');
});
images = images.map((v) => {
return v.replace(envs.VITE_GLOB_API_URL_PREFIX + '/sys/static/', '');
});
notes = notes.map((v) => {
return v.replace(envs.VITE_GLOB_API_URL_PREFIX + '/sys/static/', '');
});
others = others.map((v) => {
return v.replace(envs.VITE_GLOB_API_URL_PREFIX + '/sys/static/', '');
});
saveTrackRecord({
loans: tabledata.value,
id: currentInfo.value.id,
......
......@@ -330,7 +330,12 @@
field: 'code',
title: '操作',
width: 80,
visible: activeName.value === 'audit' || activeName.value === 'complete' || activeName.value === 'rejected' ? true : false,
visible:
activeName.value === 'audit' ||
activeName.value === 'complete' ||
activeName.value === 'rejected'
? true
: false,
slots: {
default: ({ row, rowIndex }) => {
if (activeName.value === 'audit' || activeName.value === 'rejected') {
......
......@@ -240,9 +240,9 @@
};
const openModal = (info, detail, type) => {
showModal.value = true;
form.realRepayAmount = ''
form.files = []
form.realRepayTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
form.realRepayAmount = '';
form.files = [];
form.realRepayTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
currentInfo.value = info;
console.log('currentInfo', currentInfo.value);
currentDetail.value = detail;
......@@ -282,7 +282,7 @@
flowStatus: 'pending',
repayStatus: 'over',
status: 'enable',
}
};
if (currentType.value === '分期还款') {
param['stages'] = {
borrower: currentInfo.value.borrower,
......@@ -293,11 +293,13 @@
firstApplyDate: currentDetail.value.firstApplyDate,
effectiveTime: currentDetail.value.effectiveTime,
loans: currentDetail.value.loans,
flowStatus: 'pending'
}
const item = currentDetail.value.byStagesRecords.find(v=>currentInfo.value.period === v.period)
item['repayStatus'] = 'over'
param['stages']['byStagesRecords'] = currentDetail.value.byStagesRecords
flowStatus: 'pending',
};
const item = currentDetail.value.byStagesRecords.find(
(v) => currentInfo.value.period === v.period
);
item['repayStatus'] = 'over';
param['stages']['byStagesRecords'] = currentDetail.value.byStagesRecords;
}
saveRepayRecord(param).then((res) => {
console.log('res', res);
......
......@@ -101,7 +101,12 @@
</el-form>
</div>
<div class="w-3/5">
<ProTable :config="splitconfig" :data="splitdata" :showPagination="false" :showToolBar="false">
<ProTable
:config="splitconfig"
:data="splitdata"
:showPagination="false"
:showToolBar="false"
>
<template #table_top>
<div class="flex justify-end">
<el-button type="primary" @click="editOrConfirm" class="mr-1 my-2">{{
......
......@@ -17,7 +17,13 @@
</el-col>
<el-col :span="24">
<el-form-item class="w-full" label="所属区域" prop="orgName">
<el-cascader v-model="form.arealist" class="w-full" :checkStrictly="true" :options="citydata" clearable />
<el-cascader
v-model="form.arealist"
class="w-full"
:checkStrictly="true"
:options="citydata"
clearable
/>
</el-form-item>
</el-col>
<el-col :span="24">
......
......@@ -41,7 +41,7 @@
enum: citydata,
title: '所属区域',
fieldNames: { label: 'label', value: 'value' },
search: { el: 'cascader', props: { clearable: true, checkStrictly: true} },
search: { el: 'cascader', props: { clearable: true, checkStrictly: true } },
slots: {
default: ({ row }) => {
return (
......
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