feat: use new desc comp
This commit is contained in:
@@ -21,7 +21,7 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'totalPrice',
|
||||
label: '商机金额(元)',
|
||||
content: (data) => erpPriceInputFormatter(data.totalPrice),
|
||||
render: (val) => erpPriceInputFormatter(val),
|
||||
},
|
||||
{
|
||||
field: 'statusTypeName',
|
||||
@@ -34,7 +34,7 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'createTime',
|
||||
label: '创建时间',
|
||||
content: (data) => formatDateTime(data?.createTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
];
|
||||
}
|
||||
@@ -53,17 +53,17 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'totalPrice',
|
||||
label: '商机金额(元)',
|
||||
content: (data) => erpPriceInputFormatter(data.totalPrice),
|
||||
render: (val) => erpPriceInputFormatter(val),
|
||||
},
|
||||
{
|
||||
field: 'dealTime',
|
||||
label: '预计成交日期',
|
||||
content: (data) => formatDateTime(data?.dealTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'contactNextTime',
|
||||
label: '下次联系时间',
|
||||
content: (data) => formatDateTime(data?.contactNextTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'statusTypeName',
|
||||
|
||||
@@ -23,9 +23,9 @@ import { PermissionList, TransferForm } from '#/views/crm/permission';
|
||||
import { ProductDetailsList } from '#/views/crm/product/components';
|
||||
|
||||
import Form from '../modules/form.vue';
|
||||
import UpStatusForm from './modules/status-form.vue';
|
||||
import { useDetailSchema } from './data';
|
||||
import BusinessDetailsInfo from './modules/info.vue';
|
||||
import UpStatusForm from './modules/status-form.vue';
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
@@ -38,11 +38,9 @@ const logList = ref<SystemOperateLogApi.OperateLog[]>([]);
|
||||
const permissionListRef = ref<InstanceType<typeof PermissionList>>(); // 团队成员列表 Ref
|
||||
|
||||
const [Descriptions] = useDescription({
|
||||
componentProps: {
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
},
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -12,31 +12,27 @@ defineProps<{
|
||||
business: CrmBusinessApi.Business; // 商机信息
|
||||
}>();
|
||||
|
||||
const [BaseDescriptions] = useDescription({
|
||||
componentProps: {
|
||||
title: '基本信息',
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
},
|
||||
const [BaseDescription] = useDescription({
|
||||
title: '基本信息',
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
schema: useDetailBaseSchema(),
|
||||
});
|
||||
|
||||
const [SystemDescriptions] = useDescription({
|
||||
componentProps: {
|
||||
title: '系统信息',
|
||||
bordered: false,
|
||||
column: 3,
|
||||
class: 'mx-4',
|
||||
},
|
||||
const [SystemDescription] = useDescription({
|
||||
title: '系统信息',
|
||||
bordered: false,
|
||||
column: 3,
|
||||
class: 'mx-4',
|
||||
schema: useFollowUpDetailSchema(),
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="p-4">
|
||||
<BaseDescriptions :data="business" />
|
||||
<BaseDescription :data="business" />
|
||||
<Divider />
|
||||
<SystemDescriptions :data="business" />
|
||||
<SystemDescription :data="business" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -13,10 +13,10 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'source',
|
||||
label: '线索来源',
|
||||
content: (data) =>
|
||||
render: (val) =>
|
||||
h(DictTag, {
|
||||
type: DICT_TYPE.CRM_CUSTOMER_SOURCE,
|
||||
value: data?.source,
|
||||
value: val,
|
||||
}),
|
||||
},
|
||||
{
|
||||
@@ -30,7 +30,7 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'createTime',
|
||||
label: '创建时间',
|
||||
content: (data) => formatDateTime(data?.createTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
];
|
||||
}
|
||||
@@ -45,10 +45,10 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'source',
|
||||
label: '客户来源',
|
||||
content: (data) =>
|
||||
render: (val) =>
|
||||
h(DictTag, {
|
||||
type: DICT_TYPE.CRM_CUSTOMER_SOURCE,
|
||||
value: data?.source,
|
||||
value: val,
|
||||
}),
|
||||
},
|
||||
{
|
||||
@@ -66,8 +66,8 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'areaName',
|
||||
label: '地址',
|
||||
content: (data) => {
|
||||
const areaName = data.areaName ?? '';
|
||||
render: (val, data) => {
|
||||
const areaName = val ?? '';
|
||||
const detailAddress = data?.detailAddress ?? '';
|
||||
return [areaName, detailAddress].filter((item) => !!item).join(' ');
|
||||
},
|
||||
@@ -83,25 +83,25 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'industryId',
|
||||
label: '客户行业',
|
||||
content: (data) =>
|
||||
render: (val) =>
|
||||
h(DictTag, {
|
||||
type: DICT_TYPE.CRM_CUSTOMER_INDUSTRY,
|
||||
value: data?.industryId,
|
||||
value: val,
|
||||
}),
|
||||
},
|
||||
{
|
||||
field: 'level',
|
||||
label: '客户级别',
|
||||
content: (data) =>
|
||||
render: (val) =>
|
||||
h(DictTag, {
|
||||
type: DICT_TYPE.CRM_CUSTOMER_LEVEL,
|
||||
value: data?.level,
|
||||
value: val,
|
||||
}),
|
||||
},
|
||||
{
|
||||
field: 'contactNextTime',
|
||||
label: '下次联系时间',
|
||||
content: (data) => formatDateTime(data?.contactNextTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
|
||||
@@ -34,11 +34,9 @@ const logList = ref<SystemOperateLogApi.OperateLog[]>([]); // 操作日志
|
||||
const permissionListRef = ref<InstanceType<typeof PermissionList>>(); // 团队成员列表 Ref
|
||||
|
||||
const [Descriptions] = useDescription({
|
||||
componentProps: {
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
},
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -13,22 +13,18 @@ defineProps<{
|
||||
}>();
|
||||
|
||||
const [BaseDescriptions] = useDescription({
|
||||
componentProps: {
|
||||
title: '基本信息',
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
},
|
||||
title: '基本信息',
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
schema: useDetailBaseSchema(),
|
||||
});
|
||||
|
||||
const [SystemDescriptions] = useDescription({
|
||||
componentProps: {
|
||||
title: '系统信息',
|
||||
bordered: false,
|
||||
column: 3,
|
||||
class: 'mx-4',
|
||||
},
|
||||
title: '系统信息',
|
||||
bordered: false,
|
||||
column: 3,
|
||||
class: 'mx-4',
|
||||
schema: useFollowUpDetailSchema(),
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -25,7 +25,7 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'createTime',
|
||||
label: '创建时间',
|
||||
content: (data) => formatDateTime(data?.createTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
];
|
||||
}
|
||||
@@ -64,10 +64,10 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'areaName',
|
||||
label: '地址',
|
||||
content: (data) => {
|
||||
const areaName = data?.areaName ?? '';
|
||||
render: (val, data) => {
|
||||
const areaName = val ?? '';
|
||||
const detailAddress = data?.detailAddress ?? '';
|
||||
return [areaName, detailAddress].filter(Boolean).join(' ');
|
||||
return [areaName, detailAddress].filter((item) => !!item).join(' ');
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -81,22 +81,22 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'master',
|
||||
label: '关键决策人',
|
||||
content: (data) =>
|
||||
render: (val) =>
|
||||
h(DictTag, {
|
||||
type: DICT_TYPE.INFRA_BOOLEAN_STRING,
|
||||
value: data?.master,
|
||||
value: val,
|
||||
}),
|
||||
},
|
||||
{
|
||||
field: 'sex',
|
||||
label: '性别',
|
||||
content: (data) =>
|
||||
h(DictTag, { type: DICT_TYPE.SYSTEM_USER_SEX, value: data?.sex }),
|
||||
render: (val) =>
|
||||
h(DictTag, { type: DICT_TYPE.SYSTEM_USER_SEX, value: val }),
|
||||
},
|
||||
{
|
||||
field: 'contactNextTime',
|
||||
label: '下次联系时间',
|
||||
content: (data) => formatDateTime(data?.contactNextTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
|
||||
@@ -36,11 +36,9 @@ const logList = ref<SystemOperateLogApi.OperateLog[]>([]); // 操作日志
|
||||
const permissionListRef = ref<InstanceType<typeof PermissionList>>(); // 团队成员列表 Ref
|
||||
|
||||
const [Descriptions] = useDescription({
|
||||
componentProps: {
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
},
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -13,22 +13,18 @@ defineProps<{
|
||||
}>();
|
||||
|
||||
const [BaseDescriptions] = useDescription({
|
||||
componentProps: {
|
||||
title: '基本信息',
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
},
|
||||
title: '基本信息',
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
schema: useDetailBaseSchema(),
|
||||
});
|
||||
|
||||
const [SystemDescriptions] = useDescription({
|
||||
componentProps: {
|
||||
title: '系统信息',
|
||||
bordered: false,
|
||||
column: 3,
|
||||
class: 'mx-4',
|
||||
},
|
||||
title: '系统信息',
|
||||
bordered: false,
|
||||
column: 3,
|
||||
class: 'mx-4',
|
||||
schema: useFollowUpDetailSchema(),
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -17,18 +17,17 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'totalPrice',
|
||||
label: '合同金额(元)',
|
||||
content: (data) => erpPriceInputFormatter(data?.totalPrice) as string,
|
||||
render: (val) => erpPriceInputFormatter(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'orderDate',
|
||||
label: '下单时间',
|
||||
content: (data) => formatDateTime(data?.orderDate) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'totalReceivablePrice',
|
||||
label: '回款金额(元)',
|
||||
content: (data) =>
|
||||
erpPriceInputFormatter(data?.totalReceivablePrice) as string,
|
||||
render: (val) => erpPriceInputFormatter(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'ownerUserName',
|
||||
@@ -59,22 +58,22 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'totalPrice',
|
||||
label: '合同金额(元)',
|
||||
content: (data) => erpPriceInputFormatter(data?.totalPrice) as string,
|
||||
render: (val) => erpPriceInputFormatter(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'orderDate',
|
||||
label: '下单时间',
|
||||
content: (data) => formatDateTime(data?.orderDate) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'startTime',
|
||||
label: '合同开始时间',
|
||||
content: (data) => formatDateTime(data?.startTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'endTime',
|
||||
label: '合同结束时间',
|
||||
content: (data) => formatDateTime(data?.endTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'signContactName',
|
||||
@@ -91,10 +90,10 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'auditStatus',
|
||||
label: '合同状态',
|
||||
content: (data) =>
|
||||
render: (val) =>
|
||||
h(DictTag, {
|
||||
type: DICT_TYPE.CRM_AUDIT_STATUS,
|
||||
value: data?.auditStatus,
|
||||
value: val,
|
||||
}),
|
||||
},
|
||||
];
|
||||
|
||||
@@ -40,11 +40,9 @@ const logList = ref<SystemOperateLogApi.OperateLog[]>([]); // 操作日志
|
||||
const permissionListRef = ref<InstanceType<typeof PermissionList>>(); // 团队成员列表 Ref
|
||||
|
||||
const [Descriptions] = useDescription({
|
||||
componentProps: {
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
},
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -13,22 +13,18 @@ defineProps<{
|
||||
}>();
|
||||
|
||||
const [BaseDescriptions] = useDescription({
|
||||
componentProps: {
|
||||
title: '基本信息',
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
},
|
||||
title: '基本信息',
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
schema: useDetailBaseSchema(),
|
||||
});
|
||||
|
||||
const [SystemDescriptions] = useDescription({
|
||||
componentProps: {
|
||||
title: '系统信息',
|
||||
bordered: false,
|
||||
column: 3,
|
||||
class: 'mx-4',
|
||||
},
|
||||
title: '系统信息',
|
||||
bordered: false,
|
||||
column: 3,
|
||||
class: 'mx-4',
|
||||
schema: useFollowUpDetailSchema(),
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -43,13 +43,13 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'level',
|
||||
label: '客户级别',
|
||||
content: (data) =>
|
||||
h(DictTag, { type: DICT_TYPE.CRM_CUSTOMER_LEVEL, value: data?.level }),
|
||||
render: (val) =>
|
||||
h(DictTag, { type: DICT_TYPE.CRM_CUSTOMER_LEVEL, value: val }),
|
||||
},
|
||||
{
|
||||
field: 'dealStatus',
|
||||
label: '成交状态',
|
||||
content: (data) => (data.dealStatus ? '已成交' : '未成交'),
|
||||
render: (val) => (val ? '已成交' : '未成交'),
|
||||
},
|
||||
{
|
||||
field: 'ownerUserName',
|
||||
@@ -58,7 +58,7 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'createTime',
|
||||
label: '创建时间',
|
||||
content: (data) => formatDateTime(data?.createTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
];
|
||||
}
|
||||
@@ -73,10 +73,10 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'source',
|
||||
label: '客户来源',
|
||||
content: (data) =>
|
||||
render: (val) =>
|
||||
h(DictTag, {
|
||||
type: DICT_TYPE.CRM_CUSTOMER_SOURCE,
|
||||
value: data?.source,
|
||||
value: val,
|
||||
}),
|
||||
},
|
||||
{
|
||||
@@ -94,8 +94,8 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'areaName',
|
||||
label: '地址',
|
||||
content: (data) => {
|
||||
const areaName = data?.areaName ?? '';
|
||||
render: (val, data) => {
|
||||
const areaName = val ?? '';
|
||||
const detailAddress = data?.detailAddress ?? '';
|
||||
return [areaName, detailAddress].filter(Boolean).join(' ');
|
||||
},
|
||||
@@ -111,16 +111,16 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'industryId',
|
||||
label: '客户行业',
|
||||
content: (data) =>
|
||||
render: (val) =>
|
||||
h(DictTag, {
|
||||
type: DICT_TYPE.CRM_CUSTOMER_INDUSTRY,
|
||||
value: data?.industryId,
|
||||
value: val,
|
||||
}),
|
||||
},
|
||||
{
|
||||
field: 'contactNextTime',
|
||||
label: '下次联系时间',
|
||||
content: (data) => formatDateTime(data?.contactNextTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
|
||||
@@ -47,11 +47,9 @@ const logList = ref<SystemOperateLogApi.OperateLog[]>([]); // 操作日志
|
||||
const permissionListRef = ref<InstanceType<typeof PermissionList>>(); // 团队成员列表 Ref
|
||||
|
||||
const [Descriptions] = useDescription({
|
||||
componentProps: {
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
},
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -13,22 +13,18 @@ defineProps<{
|
||||
}>();
|
||||
|
||||
const [BaseDescriptions] = useDescription({
|
||||
componentProps: {
|
||||
title: '基本信息',
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
},
|
||||
title: '基本信息',
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
schema: useDetailBaseSchema(),
|
||||
});
|
||||
|
||||
const [SystemDescriptions] = useDescription({
|
||||
componentProps: {
|
||||
title: '系统信息',
|
||||
bordered: false,
|
||||
column: 3,
|
||||
class: 'mx-4',
|
||||
},
|
||||
title: '系统信息',
|
||||
bordered: false,
|
||||
column: 3,
|
||||
class: 'mx-4',
|
||||
schema: useFollowUpDetailSchema(),
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -173,7 +173,7 @@ export function useFollowUpDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'contactLastTime',
|
||||
label: '最后跟进时间',
|
||||
content: (data) => formatDateTime(data?.contactLastTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'creatorName',
|
||||
@@ -182,12 +182,12 @@ export function useFollowUpDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'createTime',
|
||||
label: '创建时间',
|
||||
content: (data) => formatDateTime(data?.createTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'updateTime',
|
||||
label: '更新时间',
|
||||
content: (data) => formatDateTime(data?.updateTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
@@ -17,13 +17,13 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'unit',
|
||||
label: '产品单位',
|
||||
content: (data) =>
|
||||
h(DictTag, { type: DICT_TYPE.CRM_PRODUCT_UNIT, value: data?.unit }),
|
||||
render: (val) =>
|
||||
h(DictTag, { type: DICT_TYPE.CRM_PRODUCT_UNIT, value: val }),
|
||||
},
|
||||
{
|
||||
field: 'price',
|
||||
label: '产品价格(元)',
|
||||
content: (data) => erpPriceInputFormatter(data.price),
|
||||
render: (val) => erpPriceInputFormatter(val),
|
||||
},
|
||||
{
|
||||
field: 'no',
|
||||
@@ -46,7 +46,7 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'price',
|
||||
label: '价格(元)',
|
||||
content: (data) => erpPriceInputFormatter(data.price),
|
||||
render: (val) => erpPriceInputFormatter(val),
|
||||
},
|
||||
{
|
||||
field: 'description',
|
||||
@@ -59,14 +59,14 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'status',
|
||||
label: '是否上下架',
|
||||
content: (data) =>
|
||||
h(DictTag, { type: DICT_TYPE.CRM_PRODUCT_STATUS, value: data?.status }),
|
||||
render: (val) =>
|
||||
h(DictTag, { type: DICT_TYPE.CRM_PRODUCT_STATUS, value: val }),
|
||||
},
|
||||
{
|
||||
field: 'unit',
|
||||
label: '产品单位',
|
||||
content: (data) =>
|
||||
h(DictTag, { type: DICT_TYPE.CRM_PRODUCT_UNIT, value: data?.unit }),
|
||||
render: (val) =>
|
||||
h(DictTag, { type: DICT_TYPE.CRM_PRODUCT_UNIT, value: val }),
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
@@ -29,11 +29,9 @@ const product = ref<CrmProductApi.Product>({} as CrmProductApi.Product); // 产
|
||||
const logList = ref<SystemOperateLogApi.OperateLog[]>([]); // 操作日志
|
||||
|
||||
const [Descriptions] = useDescription({
|
||||
componentProps: {
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
},
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -10,12 +10,10 @@ defineProps<{
|
||||
}>();
|
||||
|
||||
const [ProductDescriptions] = useDescription({
|
||||
componentProps: {
|
||||
title: '基本信息',
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
},
|
||||
title: '基本信息',
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
schema: useDetailBaseSchema(),
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -17,18 +17,18 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'totalPrice',
|
||||
label: '合同金额(元)',
|
||||
content: (data) =>
|
||||
erpPriceInputFormatter(data?.contract?.totalPrice ?? data.totalPrice),
|
||||
render: (val, data) =>
|
||||
erpPriceInputFormatter(val ?? data?.contract?.totalPrice ?? 0),
|
||||
},
|
||||
{
|
||||
field: 'returnTime',
|
||||
label: '回款日期',
|
||||
content: (data) => formatDateTime(data?.returnTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'price',
|
||||
label: '回款金额(元)',
|
||||
content: (data) => erpPriceInputFormatter(data.price),
|
||||
render: (val) => erpPriceInputFormatter(val),
|
||||
},
|
||||
{
|
||||
field: 'ownerUserName',
|
||||
@@ -51,25 +51,26 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'contract',
|
||||
label: '合同编号',
|
||||
content: (data) => data?.contract?.no,
|
||||
render: (val, data) =>
|
||||
val && data?.contract?.no ? data?.contract?.no : '',
|
||||
},
|
||||
{
|
||||
field: 'returnTime',
|
||||
label: '回款日期',
|
||||
content: (data) => formatDateTime(data?.returnTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'price',
|
||||
label: '回款金额',
|
||||
content: (data) => erpPriceInputFormatter(data.price),
|
||||
render: (val) => erpPriceInputFormatter(val),
|
||||
},
|
||||
{
|
||||
field: 'returnType',
|
||||
label: '回款方式',
|
||||
content: (data) =>
|
||||
render: (val) =>
|
||||
h(DictTag, {
|
||||
type: DICT_TYPE.CRM_RECEIVABLE_RETURN_TYPE,
|
||||
value: data?.returnType,
|
||||
value: val,
|
||||
}),
|
||||
},
|
||||
{
|
||||
@@ -93,12 +94,12 @@ export function useDetailSystemSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'createTime',
|
||||
label: '创建时间',
|
||||
content: (data) => formatDateTime(data?.createTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'updateTime',
|
||||
label: '更新时间',
|
||||
content: (data) => formatDateTime(data?.updateTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
@@ -38,11 +38,9 @@ const logList = ref<SystemOperateLogApi.OperateLog[]>([]); // 操作日志
|
||||
const permissionListRef = ref<InstanceType<typeof PermissionList>>(); // 团队成员列表 Ref
|
||||
|
||||
const [Descriptions] = useDescription({
|
||||
componentProps: {
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
},
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -12,22 +12,18 @@ defineProps<{
|
||||
}>();
|
||||
|
||||
const [BaseDescriptions] = useDescription({
|
||||
componentProps: {
|
||||
title: '基本信息',
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
},
|
||||
title: '基本信息',
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
schema: useDetailBaseSchema(),
|
||||
});
|
||||
|
||||
const [SystemDescriptions] = useDescription({
|
||||
componentProps: {
|
||||
title: '系统信息',
|
||||
bordered: false,
|
||||
column: 3,
|
||||
class: 'mx-4',
|
||||
},
|
||||
title: '系统信息',
|
||||
bordered: false,
|
||||
column: 3,
|
||||
class: 'mx-4',
|
||||
schema: useDetailSystemSchema(),
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -21,17 +21,17 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'price',
|
||||
label: '计划回款金额',
|
||||
content: (data) => erpPriceInputFormatter(data.price),
|
||||
render: (val) => erpPriceInputFormatter(val),
|
||||
},
|
||||
{
|
||||
field: 'returnTime',
|
||||
label: '计划回款日期',
|
||||
content: (data) => formatDateTime(data?.returnTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'receivable',
|
||||
label: '实际回款金额',
|
||||
content: (data) => erpPriceInputFormatter(data?.receivable?.price ?? 0),
|
||||
render: (val) => erpPriceInputFormatter(val?.price ?? 0),
|
||||
},
|
||||
];
|
||||
}
|
||||
@@ -54,20 +54,20 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'returnTime',
|
||||
label: '计划回款日期',
|
||||
content: (data) => formatDateTime(data?.returnTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'price',
|
||||
label: '计划回款金额',
|
||||
content: (data) => erpPriceInputFormatter(data.price),
|
||||
render: (val) => erpPriceInputFormatter(val),
|
||||
},
|
||||
{
|
||||
field: 'returnType',
|
||||
label: '计划回款方式',
|
||||
content: (data) =>
|
||||
render: (val) =>
|
||||
h(DictTag, {
|
||||
type: DICT_TYPE.CRM_RECEIVABLE_RETURN_TYPE,
|
||||
value: data?.returnType,
|
||||
value: val,
|
||||
}),
|
||||
},
|
||||
{
|
||||
@@ -77,20 +77,20 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'receivable',
|
||||
label: '实际回款金额',
|
||||
content: (data) => erpPriceInputFormatter(data?.receivable?.price ?? 0),
|
||||
render: (val) => erpPriceInputFormatter(val ?? 0),
|
||||
},
|
||||
{
|
||||
field: 'receivableRemain',
|
||||
label: '未回款金额',
|
||||
content: (data) => {
|
||||
render: (val, data) => {
|
||||
const paid = data?.receivable?.price ?? 0;
|
||||
return erpPriceInputFormatter(Math.max(data.price - paid, 0));
|
||||
return erpPriceInputFormatter(Math.max(val - paid, 0));
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'receivable.returnTime',
|
||||
label: '实际回款日期',
|
||||
content: (data) => formatDateTime(data?.receivable?.returnTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
@@ -113,12 +113,12 @@ export function useDetailSystemSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'createTime',
|
||||
label: '创建时间',
|
||||
content: (data) => formatDateTime(data?.createTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'updateTime',
|
||||
label: '更新时间',
|
||||
content: (data) => formatDateTime(data?.updateTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
@@ -39,11 +39,9 @@ const permissionListRef = ref<InstanceType<typeof PermissionList>>(); // 团队
|
||||
const validateWrite = () => permissionListRef.value?.validateWrite;
|
||||
|
||||
const [Descriptions] = useDescription({
|
||||
componentProps: {
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
},
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -12,22 +12,18 @@ defineProps<{
|
||||
}>();
|
||||
|
||||
const [BaseDescriptions] = useDescription({
|
||||
componentProps: {
|
||||
title: '基本信息',
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
},
|
||||
title: '基本信息',
|
||||
bordered: false,
|
||||
column: 4,
|
||||
class: 'mx-4',
|
||||
schema: useDetailBaseSchema(),
|
||||
});
|
||||
|
||||
const [SystemDescriptions] = useDescription({
|
||||
componentProps: {
|
||||
title: '系统信息',
|
||||
bordered: false,
|
||||
column: 3,
|
||||
class: 'mx-4',
|
||||
},
|
||||
title: '系统信息',
|
||||
bordered: false,
|
||||
column: 3,
|
||||
class: 'mx-4',
|
||||
schema: useDetailSystemSchema(),
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user