From c79c68e7a1605790947e7202c1d073b3c1da0543 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com>
Date: Mon, 16 Mar 2026 21:26:39 +0800
Subject: [PATCH] =?UTF-8?q?refactor(creditMpCustomer):=20=E7=A7=BB?=
=?UTF-8?q?=E9=99=A4=E4=B8=8D=E5=BF=85=E8=A6=81=E7=9A=84=E8=A1=A8=E5=8D=95?=
=?UTF-8?q?=E9=A1=B9=E5=B9=B6=E4=BC=98=E5=8C=96=E5=88=97=E8=A1=A8=E9=85=8D?=
=?UTF-8?q?=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 移除了链接、状态、企业ID、所在省份、所在辖区、是否有数据、是否推荐等表单项
- 将文件上传字段从image重命名为files以保持一致性
- 更新了表格列配置,移除了对应的显示列
- 修改了删除功能中的主键引用从creditMpCustomerId改为id
- 调整了默认显示的核心列配置
- 移除了修改时间字段的显示与相关逻辑
---
.../components/creditMpCustomerEdit.vue | 139 +++++++-----------
src/views/credit/creditMpCustomer/index.vue | 137 +++++++----------
2 files changed, 108 insertions(+), 168 deletions(-)
diff --git a/src/views/credit/creditMpCustomer/components/creditMpCustomerEdit.vue b/src/views/credit/creditMpCustomer/components/creditMpCustomerEdit.vue
index 2e01348..aa37b38 100644
--- a/src/views/credit/creditMpCustomer/components/creditMpCustomerEdit.vue
+++ b/src/views/credit/creditMpCustomer/components/creditMpCustomerEdit.vue
@@ -40,34 +40,27 @@
v-model:value="form.years"
/>
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
-
-
- 显示
- 隐藏
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
@@ -204,18 +176,13 @@
region: undefined,
files: undefined,
hasData: undefined,
- comments: undefined,
recommend: undefined,
- sortNumber: undefined,
status: undefined,
deleted: undefined,
userId: undefined,
tenantId: undefined,
createTime: undefined,
updateTime: undefined,
- creditMpCustomerId: undefined,
- creditMpCustomerName: '',
- status: 0,
comments: '',
sortNumber: 100
});
@@ -243,12 +210,12 @@
url: data.path,
status: 'done'
});
- form.image = data.path;
+ form.files = data.path;
};
const onDeleteItem = (index: number) => {
images.value.splice(index, 1);
- form.image = '';
+ form.files = '';
};
const { resetFields } = useForm(form, rules);
@@ -288,10 +255,10 @@
images.value = [];
if (props.data) {
assignObject(form, props.data);
- if(props.data.image){
+ if(props.data.files){
images.value.push({
uid: uuid(),
- url: props.data.image,
+ url: props.data.files,
status: 'done'
})
}
diff --git a/src/views/credit/creditMpCustomer/index.vue b/src/views/credit/creditMpCustomer/index.vue
index 987a11d..f267f0e 100644
--- a/src/views/credit/creditMpCustomer/index.vue
+++ b/src/views/credit/creditMpCustomer/index.vue
@@ -108,105 +108,84 @@
{
title: '拖欠方',
dataIndex: 'toUser',
- key: 'toUser',
- ellipsis: true
+ key: 'toUser'
},
{
title: '拖欠金额',
dataIndex: 'price',
- key: 'price',
- ellipsis: true
+ key: 'price'
},
{
title: '拖欠年数',
dataIndex: 'years',
- key: 'years',
- ellipsis: true
- },
- {
- title: '链接',
- dataIndex: 'url',
- key: 'url',
- ellipsis: true
- },
- {
- title: '状态',
- dataIndex: 'statusTxt',
- key: 'statusTxt',
- ellipsis: true
- },
- {
- title: '企业ID',
- dataIndex: 'companyId',
- key: 'companyId',
- width: 120
- },
- {
- title: '所在省份',
- dataIndex: 'province',
- key: 'province',
- ellipsis: true
+ key: 'years'
},
+ // {
+ // title: '链接',
+ // dataIndex: 'url',
+ // key: 'url',
+ // ellipsis: true
+ // },
+ // {
+ // title: '状态',
+ // dataIndex: 'statusTxt',
+ // key: 'statusTxt'
+ // },
+ // {
+ // title: '所在省份',
+ // dataIndex: 'province',
+ // key: 'province',
+ // ellipsis: true
+ // },
{
title: '所在城市',
dataIndex: 'city',
key: 'city',
ellipsis: true
},
+ // {
+ // title: '所在辖区',
+ // dataIndex: 'region',
+ // key: 'region',
+ // ellipsis: true
+ // },
{
- title: '所在辖区',
- dataIndex: 'region',
- key: 'region',
- ellipsis: true
- },
- {
- title: '文件路径',
+ title: '附件',
dataIndex: 'files',
key: 'files',
ellipsis: true
},
+ // {
+ // title: '是否有数据',
+ // dataIndex: 'hasData',
+ // key: 'hasData',
+ // width: 120
+ // },
+ // {
+ // title: '备注',
+ // dataIndex: 'comments',
+ // key: 'comments',
+ // ellipsis: true
+ // },
+ // {
+ // title: '是否推荐',
+ // dataIndex: 'recommend',
+ // key: 'recommend',
+ // width: 120
+ // },
+
{
- title: '是否有数据',
- dataIndex: 'hasData',
- key: 'hasData',
- width: 120
- },
- {
- title: '备注',
- dataIndex: 'comments',
- key: 'comments',
- ellipsis: true
- },
- {
- title: '是否推荐',
- dataIndex: 'recommend',
- key: 'recommend',
- width: 120
- },
- {
- title: '排序(数字越小越靠前)',
+ title: '排序',
dataIndex: 'sortNumber',
key: 'sortNumber',
width: 120
},
{
- title: '状态, 0正常, 1冻结',
+ title: '状态',
dataIndex: 'status',
key: 'status',
width: 120
},
- {
- title: '是否删除, 0否, 1是',
- dataIndex: 'deleted',
- key: 'deleted',
- width: 120
- },
- {
- title: '用户ID',
- dataIndex: 'userId',
- key: 'userId',
- width: 120
- },
{
title: '创建时间',
dataIndex: 'createTime',
@@ -217,16 +196,6 @@
ellipsis: true,
customRender: ({ text }) => toDateString(text, 'yyyy-MM-dd HH:mm:ss')
},
- {
- title: '修改时间',
- dataIndex: 'updateTime',
- key: 'updateTime',
- width: 200,
- align: 'center',
- sorter: true,
- ellipsis: true,
- customRender: ({ text }) => toDateString(text, 'yyyy-MM-dd HH:mm:ss')
- },
{
title: '操作',
key: 'action',
@@ -240,7 +209,11 @@
// 默认显示的核心列(最多5个主要字段)
const defaultVisibleColumns = [
'id',
- 'status',
+ 'toUser',
+ 'price',
+ 'years',
+ 'city',
+ // 'status',
'createTime',
'action'
];
@@ -272,7 +245,7 @@
/* 删除单个 */
const remove = (row: CreditMpCustomer) => {
const hide = message.loading('请求中..', 0);
- removeCreditMpCustomer(row.creditMpCustomerId)
+ removeCreditMpCustomer(row.id)
.then((msg) => {
hide();
message.success(msg);
@@ -297,7 +270,7 @@
maskClosable: true,
onOk: () => {
const hide = message.loading('请求中..', 0);
- removeBatchCreditMpCustomer(selection.value.map((d) => d.creditMpCustomerId))
+ removeBatchCreditMpCustomer(selection.value.map((d) => d.id))
.then((msg) => {
hide();
message.success(msg);