fix: 金额显示问题 && utils 引用路径
parent
41f816483b
commit
355a2056f4
|
|
@ -25,7 +25,7 @@ import {
|
||||||
Tooltip,
|
Tooltip,
|
||||||
} from 'ant-design-vue';
|
} from 'ant-design-vue';
|
||||||
|
|
||||||
import { BpmModelFormType } from '#/utils/constants';
|
import { BpmModelFormType } from '#/utils';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
COMPARISON_OPERATORS,
|
COMPARISON_OPERATORS,
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import { Button, Image, Tag, Tooltip } from 'ant-design-vue';
|
||||||
|
|
||||||
import { TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import { getProcessDefinitionPage } from '#/api/bpm/definition';
|
import { getProcessDefinitionPage } from '#/api/bpm/definition';
|
||||||
import { BpmModelFormType } from '#/utils/constants';
|
import { BpmModelFormType } from '#/utils';
|
||||||
|
|
||||||
// 导入 FormCreate 表单详情
|
// 导入 FormCreate 表单详情
|
||||||
import FormCreateDetail from '../../form/modules/detail.vue';
|
import FormCreateDetail from '../../form/modules/detail.vue';
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,11 @@ import {
|
||||||
HttpRequestSetting,
|
HttpRequestSetting,
|
||||||
parseFormFields,
|
parseFormFields,
|
||||||
} from '#/components/simple-process-design';
|
} from '#/components/simple-process-design';
|
||||||
import { ProcessVariableEnum } from '#/utils';
|
import {
|
||||||
import { BpmAutoApproveType, BpmModelFormType } from '#/utils/constants';
|
BpmAutoApproveType,
|
||||||
|
BpmModelFormType,
|
||||||
|
ProcessVariableEnum,
|
||||||
|
} from '#/utils';
|
||||||
|
|
||||||
const modelData = defineModel<any>();
|
const modelData = defineModel<any>();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||||
{
|
{
|
||||||
field: 'totalPrice',
|
field: 'totalPrice',
|
||||||
title: '商机金额(元)',
|
title: '商机金额(元)',
|
||||||
formatter: 'formatNumber',
|
formatter: 'formatAmount2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'dealTime',
|
field: 'dealTime',
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ export function useDetailListColumns(): VxeTableGridOptions['columns'] {
|
||||||
{
|
{
|
||||||
field: 'totalPrice',
|
field: 'totalPrice',
|
||||||
title: '商机金额(元)',
|
title: '商机金额(元)',
|
||||||
formatter: 'formatNumber',
|
formatter: 'formatAmount2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'dealTime',
|
field: 'dealTime',
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,7 @@ import { getSimpleBusinessList } from '#/api/crm/business';
|
||||||
import { getSimpleContactList } from '#/api/crm/contact';
|
import { getSimpleContactList } from '#/api/crm/contact';
|
||||||
import { getCustomerSimpleList } from '#/api/crm/customer';
|
import { getCustomerSimpleList } from '#/api/crm/customer';
|
||||||
import { getSimpleUserList } from '#/api/system/user';
|
import { getSimpleUserList } from '#/api/system/user';
|
||||||
import { erpPriceMultiply, floatToFixed2 } from '#/utils';
|
import { DICT_TYPE, erpPriceMultiply, floatToFixed2 } from '#/utils';
|
||||||
import { DICT_TYPE } from '#/utils/dict';
|
|
||||||
|
|
||||||
/** 新增/修改的表单 */
|
/** 新增/修改的表单 */
|
||||||
export function useFormSchema(): VbenFormSchema[] {
|
export function useFormSchema(): VbenFormSchema[] {
|
||||||
|
|
@ -242,7 +241,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||||
title: '合同金额(元)',
|
title: '合同金额(元)',
|
||||||
field: 'totalPrice',
|
field: 'totalPrice',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
formatter: 'formatNumber',
|
formatter: 'formatAmount2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '下单时间',
|
title: '下单时间',
|
||||||
|
|
@ -277,7 +276,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||||
title: '已回款金额(元)',
|
title: '已回款金额(元)',
|
||||||
field: 'totalReceivablePrice',
|
field: 'totalReceivablePrice',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
formatter: 'formatNumber',
|
formatter: 'formatAmount2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '未回款金额(元)',
|
title: '未回款金额(元)',
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ export function useDetailListColumns(): VxeTableGridOptions['columns'] {
|
||||||
title: '合同金额(元)',
|
title: '合同金额(元)',
|
||||||
field: 'totalPrice',
|
field: 'totalPrice',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
formatter: 'formatNumber',
|
formatter: 'formatAmount2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '合同开始时间',
|
title: '合同开始时间',
|
||||||
|
|
@ -138,7 +138,7 @@ export function useDetailListColumns(): VxeTableGridOptions['columns'] {
|
||||||
title: '已回款金额(元)',
|
title: '已回款金额(元)',
|
||||||
field: 'totalReceivablePrice',
|
field: 'totalReceivablePrice',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
formatter: 'formatNumber',
|
formatter: 'formatAmount2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '未回款金额(元)',
|
title: '未回款金额(元)',
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import type { VbenFormSchema } from '#/adapter/form';
|
import type { VbenFormSchema } from '#/adapter/form';
|
||||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
|
|
||||||
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
import { DICT_TYPE, getDictOptions } from '#/utils';
|
||||||
|
|
||||||
/** 列表的搜索表单 */
|
/** 列表的搜索表单 */
|
||||||
export function useGridFormSchema(): VbenFormSchema[] {
|
export function useGridFormSchema(): VbenFormSchema[] {
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||||
{
|
{
|
||||||
field: 'price',
|
field: 'price',
|
||||||
title: '价格(元)',
|
title: '价格(元)',
|
||||||
formatter: 'formatNumber',
|
formatter: 'formatAmount2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'description',
|
field: 'description',
|
||||||
|
|
@ -203,7 +203,7 @@ export function useProductEditTableColumns(): VxeTableGridOptions['columns'] {
|
||||||
field: 'productPrice',
|
field: 'productPrice',
|
||||||
title: '价格(元)',
|
title: '价格(元)',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
formatter: 'formatNumber',
|
formatter: 'formatAmount2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'sellingPrice',
|
field: 'sellingPrice',
|
||||||
|
|
@ -221,7 +221,7 @@ export function useProductEditTableColumns(): VxeTableGridOptions['columns'] {
|
||||||
field: 'totalPrice',
|
field: 'totalPrice',
|
||||||
title: '合计',
|
title: '合计',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
formatter: 'formatNumber',
|
formatter: 'formatAmount2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
|
|
|
||||||
|
|
@ -94,12 +94,12 @@ export function useDetailListColumns(
|
||||||
{
|
{
|
||||||
field: 'productPrice',
|
field: 'productPrice',
|
||||||
title: '产品价格(元)',
|
title: '产品价格(元)',
|
||||||
formatter: 'formatNumber',
|
formatter: 'formatAmount2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'businessPrice',
|
field: 'businessPrice',
|
||||||
title: '商机价格(元)',
|
title: '商机价格(元)',
|
||||||
formatter: 'formatNumber',
|
formatter: 'formatAmount2',
|
||||||
visible: showBussinePrice,
|
visible: showBussinePrice,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -110,7 +110,7 @@ export function useDetailListColumns(
|
||||||
{
|
{
|
||||||
field: 'totalPrice',
|
field: 'totalPrice',
|
||||||
title: '合计金额(元)',
|
title: '合计金额(元)',
|
||||||
formatter: 'formatNumber',
|
formatter: 'formatAmount2',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import { getContractSimpleList } from '#/api/crm/contract';
|
||||||
import { getCustomerSimpleList } from '#/api/crm/customer';
|
import { getCustomerSimpleList } from '#/api/crm/customer';
|
||||||
import { getReceivablePlanSimpleList } from '#/api/crm/receivable/plan';
|
import { getReceivablePlanSimpleList } from '#/api/crm/receivable/plan';
|
||||||
import { getSimpleUserList } from '#/api/system/user';
|
import { getSimpleUserList } from '#/api/system/user';
|
||||||
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
import { DICT_TYPE, getDictOptions } from '#/utils';
|
||||||
|
|
||||||
/** 新增/修改的表单 */
|
/** 新增/修改的表单 */
|
||||||
export function useFormSchema(): VbenFormSchema[] {
|
export function useFormSchema(): VbenFormSchema[] {
|
||||||
|
|
@ -199,7 +199,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||||
title: '回款金额(元)',
|
title: '回款金额(元)',
|
||||||
field: 'price',
|
field: 'price',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
formatter: 'formatNumber',
|
formatter: 'formatAmount2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '回款方式',
|
title: '回款方式',
|
||||||
|
|
@ -219,7 +219,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||||
title: '合同金额(元)',
|
title: '合同金额(元)',
|
||||||
field: 'contract.totalPrice',
|
field: 'contract.totalPrice',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
formatter: 'formatNumber',
|
formatter: 'formatAmount2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '负责人',
|
title: '负责人',
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ export function useDetailListColumns(): VxeTableGridOptions['columns'] {
|
||||||
title: '回款金额(元)',
|
title: '回款金额(元)',
|
||||||
field: 'price',
|
field: 'price',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
formatter: 'formatNumber',
|
formatter: 'formatAmount2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '回款方式',
|
title: '回款方式',
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import type { VbenFormSchema } from '#/adapter/form';
|
||||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
|
|
||||||
import { getCustomerSimpleList } from '#/api/crm/customer';
|
import { getCustomerSimpleList } from '#/api/crm/customer';
|
||||||
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
import { DICT_TYPE, floatToFixed2, getDictOptions } from '#/utils';
|
||||||
|
|
||||||
/** 新增/修改的表单 */
|
/** 新增/修改的表单 */
|
||||||
export function useFormSchema(): VbenFormSchema[] {
|
export function useFormSchema(): VbenFormSchema[] {
|
||||||
|
|
@ -141,7 +141,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||||
title: '计划回款金额(元)',
|
title: '计划回款金额(元)',
|
||||||
field: 'price',
|
field: 'price',
|
||||||
minWidth: 160,
|
minWidth: 160,
|
||||||
formatter: 'formatNumber',
|
formatter: 'formatAmount2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '计划回款日期',
|
title: '计划回款日期',
|
||||||
|
|
@ -183,7 +183,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||||
title: '实际回款金额(元)',
|
title: '实际回款金额(元)',
|
||||||
field: 'receivable.price',
|
field: 'receivable.price',
|
||||||
minWidth: 160,
|
minWidth: 160,
|
||||||
formatter: 'formatNumber',
|
formatter: 'formatAmount2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '实际回款日期',
|
title: '实际回款日期',
|
||||||
|
|
@ -197,9 +197,9 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||||
minWidth: 160,
|
minWidth: 160,
|
||||||
formatter: ({ row }) => {
|
formatter: ({ row }) => {
|
||||||
if (row.receivable) {
|
if (row.receivable) {
|
||||||
return row.price - row.receivable.price;
|
return floatToFixed2(row.price - row.receivable.price);
|
||||||
}
|
}
|
||||||
return row.price;
|
return floatToFixed2(row.price);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ export function useDetailListColumns(): VxeTableGridOptions['columns'] {
|
||||||
title: '计划回款(元)',
|
title: '计划回款(元)',
|
||||||
field: 'price',
|
field: 'price',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
formatter: 'formatNumber',
|
formatter: 'formatAmount2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '计划回款日期',
|
title: '计划回款日期',
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,7 @@ import type { VbenFormSchema } from '#/adapter/form';
|
||||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
import type { PayAppApi } from '#/api/pay/app';
|
import type { PayAppApi } from '#/api/pay/app';
|
||||||
|
|
||||||
import { CommonStatusEnum } from '#/utils/constants';
|
import { CommonStatusEnum, DICT_TYPE, getDictOptions } from '#/utils';
|
||||||
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
|
||||||
|
|
||||||
export function useGridFormSchema(): VbenFormSchema[] {
|
export function useGridFormSchema(): VbenFormSchema[] {
|
||||||
return [
|
return [
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import { message } from 'ant-design-vue';
|
||||||
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import { changeAppStatus, deleteApp, getAppPage } from '#/api/pay/app';
|
import { changeAppStatus, deleteApp, getAppPage } from '#/api/pay/app';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
import { CommonStatusEnum, PayChannelEnum } from '#/utils/constants';
|
import { CommonStatusEnum, PayChannelEnum } from '#/utils';
|
||||||
|
|
||||||
import { useGridColumns, useGridFormSchema } from './data';
|
import { useGridColumns, useGridFormSchema } from './data';
|
||||||
import appFrom from './modules/app-form.vue';
|
import appFrom from './modules/app-form.vue';
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import type { VbenFormSchema } from '#/adapter/form';
|
||||||
import { h } from 'vue';
|
import { h } from 'vue';
|
||||||
|
|
||||||
import { InputUpload } from '#/components/upload';
|
import { InputUpload } from '#/components/upload';
|
||||||
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
import { DICT_TYPE, getDictOptions } from '#/utils';
|
||||||
|
|
||||||
export function channelSchema(formType: string): VbenFormSchema[] {
|
export function channelSchema(formType: string): VbenFormSchema[] {
|
||||||
if (formType.includes('alipay_')) {
|
if (formType.includes('alipay_')) {
|
||||||
|
|
|
||||||
|
|
@ -50,12 +50,12 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||||
{
|
{
|
||||||
field: 'price',
|
field: 'price',
|
||||||
title: '支付价格',
|
title: '支付价格',
|
||||||
formatter: 'formatNumber',
|
formatter: 'formatAmount2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'refundPrice',
|
field: 'refundPrice',
|
||||||
title: '退款金额',
|
title: '退款金额',
|
||||||
formatter: 'formatNumber',
|
formatter: 'formatAmount2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'createTime',
|
field: 'createTime',
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||||
{
|
{
|
||||||
field: 'price',
|
field: 'price',
|
||||||
title: '提现金额',
|
title: '提现金额',
|
||||||
formatter: 'formatNumber',
|
formatter: 'formatAmount2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'userName',
|
field: 'userName',
|
||||||
|
|
|
||||||
|
|
@ -78,17 +78,17 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||||
{
|
{
|
||||||
title: '支付金额',
|
title: '支付金额',
|
||||||
field: 'price',
|
field: 'price',
|
||||||
formatter: 'formatNumber',
|
formatter: 'formatAmount2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '退款金额',
|
title: '退款金额',
|
||||||
field: 'refundPrice',
|
field: 'refundPrice',
|
||||||
formatter: 'formatNumber',
|
formatter: 'formatAmount2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '手续金额',
|
title: '手续金额',
|
||||||
field: 'channelFeePrice',
|
field: 'channelFeePrice',
|
||||||
formatter: 'formatNumber',
|
formatter: 'formatAmount2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '订单号',
|
title: '订单号',
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import { Descriptions, Divider, Tag } from 'ant-design-vue';
|
||||||
|
|
||||||
import { getOrder } from '#/api/pay/order';
|
import { getOrder } from '#/api/pay/order';
|
||||||
import { DictTag } from '#/components/dict-tag';
|
import { DictTag } from '#/components/dict-tag';
|
||||||
import { DICT_TYPE } from '#/utils/dict';
|
import { DICT_TYPE } from '#/utils';
|
||||||
|
|
||||||
const detailData = ref<PayOrderApi.Order>();
|
const detailData = ref<PayOrderApi.Order>();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue