Commit 097f0b61 authored by 沈翠玲's avatar 沈翠玲

修复管理

parent 1ffbde17
...@@ -156,6 +156,20 @@ ...@@ -156,6 +156,20 @@
// labelWidth: 95, // labelWidth: 95,
// }, // },
}, },
{
field: 'repairStatus',
title: '是否修复',
showOverflow: 'tooltip',
slots: {
default: ({ row }) => {
return (
<>
{row.repairStatus === 'Y' ? '是' : '否'}
</>
);
},
},
},
{ {
field: 'flowStatus', field: 'flowStatus',
showOverflow: 'tooltip', showOverflow: 'tooltip',
......
...@@ -93,7 +93,8 @@ ...@@ -93,7 +93,8 @@
newPhone: [], newPhone: [],
kinship: form.kinship, kinship: form.kinship,
flowStatus: 'pending', flowStatus: 'pending',
status: 'Y', status: 'enable',
repairStatus: 'Y',
tenantId: 0, tenantId: 0,
}).then((res) => { }).then((res) => {
console.log('sadas', res); console.log('sadas', res);
......
...@@ -2,17 +2,38 @@ ...@@ -2,17 +2,38 @@
<div class="table-box"> <div class="table-box">
<div class="table-inner"> <div class="table-inner">
<ProTable :config="config" ref="caseLRef" :api="getRepairRecord"> <ProTable :config="config" ref="caseLRef" :api="getRepairRecord">
<!-- <ProTable :config="config" ref="caseLRef" :data="data"> --> <template #left_buttons>
<!-- <template #table_top> <div class="flex items-center justify-center h-8">
<div class="topgrp"> <el-button
<div class="topbox"> v-permission="'repair_admin_export'"
<div class="topinner"> type="primary"
<p>统计值</p> @click="admindownload"
<p>111</p> class="mb-2"
</div> >导出</el-button
</div> >
<el-button
v-permission="'repair_te_export'"
type="primary"
class="mb-2 mr-2"
@click="download"
>导出</el-button
>
<el-upload
class="avatar-uploader"
ref="uploadRef"
:action="upload.url"
:disabled="upload.isUploading"
accept=".xls, .xlsx"
:limit="1"
:on-success="handleFileSuccess"
:on-remove="handleRemove"
:auto-upload="true"
:on-progress="uploadVideoProcess"
>
<el-button type="primary" plain :icon="Upload">批量修复上传</el-button>
</el-upload>
</div> </div>
</template> --> </template>
</ProTable> </ProTable>
</div> </div>
</div> </div>
...@@ -20,12 +41,18 @@ ...@@ -20,12 +41,18 @@
<script setup name="case-manage" lang="jsx"> <script setup name="case-manage" lang="jsx">
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { getAppEnvConfig } from '@/utils/env';
import { reactive, ref } from 'vue'; import { reactive, ref } from 'vue';
import { getRepairRecord } from '@/api/property'; import { getRepairRecord } from '@/api/property';
import { Upload } from '@element-plus/icons-vue';
const caseLRef = ref(); const caseLRef = ref();
import { onMounted } from 'vue'; import { onMounted } from 'vue';
import { inject } from 'vue';
const downloadfile = inject('download');
const router = useRouter(); const router = useRouter();
const envs = getAppEnvConfig();
const onCellClick = (row) => { const onCellClick = (row) => {
router.push({ router.push({
path: '/property/case-detail', path: '/property/case-detail',
...@@ -38,6 +65,43 @@ ...@@ -38,6 +65,43 @@
{ label: '通过', value: 'pass' }, { label: '通过', value: 'pass' },
{ label: '未通过', value: 'fail' }, { label: '未通过', value: 'fail' },
]; ];
const upload = reactive({
// 是否禁用上传
isUploading: false,
// 上传的地址
url: envs.VITE_GLOB_API_URL_PREFIX + '/RepairRecord/importExcel',
});
console.log('upload', upload);
const uploadVideoProcess = (event, file, fileList) => {
upload.isUploading = true;
};
const download = () => {
downloadfile('/RepairRecord/downloadByTenant', {}, '修复.xls');
}
const admindownload = () => {
downloadfile('/RepairRecord/download', {}, '修复.xls');
}
const handleFileSuccess = (response, file, fileList) => {
if (!response.success) {
ElMessage.error({
message: response.message || '检查失败',
plain: true,
});
upload.isUploading = false;
uploadRef.value.clearFiles();
}
if (response.success) {
ElMessage.success({
message: '上传成功',
plain: true,
});
form.path = response.message;
upload.isUploading = false;
}
};
const handleRemove = () => {
form.path = '';
};
const config = reactive({ const config = reactive({
columns: [ columns: [
...@@ -101,6 +165,20 @@ ...@@ -101,6 +165,20 @@
labelWidth: 95, labelWidth: 95,
}, },
}, },
{
field: 'repairStatus',
title: '是否修复',
showOverflow: 'tooltip',
slots: {
default: ({ row }) => {
return (
<>
{row.repairStatus === 'Y' ? '是' : '否'}
</>
);
},
},
},
{ {
field: 'kinship', field: 'kinship',
title: '与债权人关系', title: '与债权人关系',
......
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