Pre Merge pull request !173 from 痴货/master
commit
d420453f8b
|
@ -13,6 +13,7 @@ import {
|
|||
import {
|
||||
erpCountInputFormatter,
|
||||
erpNumberFormatter,
|
||||
fenToYuan,
|
||||
formatPast2,
|
||||
isFunction,
|
||||
isString,
|
||||
|
@ -343,6 +344,12 @@ setupVbenVxeTable({
|
|||
return `${erpNumberFormatter(cellValue, digits)}元`;
|
||||
},
|
||||
});
|
||||
|
||||
vxeUI.formats.add('formatFenToYuanAmount', {
|
||||
tableCellFormatMethod({ cellValue }, digits = 2) {
|
||||
return `${erpNumberFormatter(fenToYuan(cellValue), digits)}元`;
|
||||
},
|
||||
});
|
||||
},
|
||||
useVbenForm,
|
||||
});
|
||||
|
|
|
@ -13,6 +13,7 @@ import {
|
|||
import {
|
||||
erpCountInputFormatter,
|
||||
erpNumberFormatter,
|
||||
fenToYuan,
|
||||
formatPast2,
|
||||
isFunction,
|
||||
isString,
|
||||
|
@ -297,6 +298,12 @@ setupVbenVxeTable({
|
|||
return `${erpNumberFormatter(cellValue, digits)}元`;
|
||||
},
|
||||
});
|
||||
|
||||
vxeUI.formats.add('formatFenToYuanAmount', {
|
||||
tableCellFormatMethod({ cellValue }, digits = 2) {
|
||||
return `${erpNumberFormatter(fenToYuan(cellValue), digits)}元`;
|
||||
},
|
||||
});
|
||||
},
|
||||
useVbenForm,
|
||||
});
|
||||
|
|
|
@ -74,7 +74,7 @@ export function useGridColumns<T = MallSpuApi.Spu>(
|
|||
{
|
||||
field: 'price',
|
||||
title: '价格',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'salesCount',
|
||||
|
|
|
@ -204,13 +204,13 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
|||
field: 'bargainFirstPrice',
|
||||
title: '起始价格',
|
||||
minWidth: 100,
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'bargainMinPrice',
|
||||
title: '砍价底价',
|
||||
minWidth: 100,
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'recordUserCount',
|
||||
|
|
|
@ -72,13 +72,13 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
|||
field: 'activity.bargainMinPrice',
|
||||
title: '最低价',
|
||||
minWidth: 100,
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'bargainPrice',
|
||||
title: '当前价',
|
||||
minWidth: 100,
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'activity.helpMaxCount',
|
||||
|
@ -149,7 +149,7 @@ export function useHelpGridColumns(): VxeTableGridOptions['columns'] {
|
|||
field: 'reducePrice',
|
||||
title: '砍价金额',
|
||||
minWidth: 100,
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
|
|
|
@ -86,7 +86,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
|||
field: 'marketPrice',
|
||||
title: '原价',
|
||||
minWidth: 100,
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'point',
|
||||
|
@ -97,7 +97,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
|||
field: 'price',
|
||||
title: '兑换金额',
|
||||
minWidth: 100,
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
|
|
|
@ -99,7 +99,7 @@ export function useGridColumns(): VxeGridPropTypes.Columns {
|
|||
{
|
||||
field: 'refundPrice',
|
||||
title: '订单金额',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'user.nickname',
|
||||
|
|
|
@ -97,13 +97,13 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
|||
field: 'price',
|
||||
title: '提现金额',
|
||||
minWidth: 80,
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'feePrice',
|
||||
title: '提现手续费',
|
||||
minWidth: 80,
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'type',
|
||||
|
|
|
@ -81,7 +81,7 @@ export function useGridColumns(): VxeGridPropTypes.Columns {
|
|||
{
|
||||
field: 'payPrice',
|
||||
title: '实付金额(元)',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
minWidth: 180,
|
||||
},
|
||||
{
|
||||
|
|
|
@ -166,7 +166,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
|||
{
|
||||
field: 'payPrice',
|
||||
title: '实际支付',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
minWidth: 180,
|
||||
},
|
||||
{
|
||||
|
|
|
@ -50,12 +50,12 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
|||
{
|
||||
field: 'price',
|
||||
title: '支付价格',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'refundPrice',
|
||||
title: '退款金额',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
|
|
|
@ -78,7 +78,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
|||
{
|
||||
field: 'price',
|
||||
title: '提现金额',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'userName',
|
||||
|
|
|
@ -87,17 +87,17 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
|||
{
|
||||
title: '支付金额',
|
||||
field: 'price',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
title: '退款金额',
|
||||
field: 'refundPrice',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
title: '手续金额',
|
||||
field: 'channelFeePrice',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
title: '订单号',
|
||||
|
|
|
@ -99,12 +99,12 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
|||
{
|
||||
field: 'payPrice',
|
||||
title: '支付金额',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'refundPrice',
|
||||
title: '退款金额',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
|
|
|
@ -120,7 +120,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
|||
{
|
||||
field: 'price',
|
||||
title: '转账金额',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
|
|
|
@ -54,22 +54,22 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
|||
{
|
||||
title: '余额',
|
||||
field: 'balance',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
title: '累计支出',
|
||||
field: 'totalExpense',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
title: '累计充值',
|
||||
field: 'totalRecharge',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
title: '冻结金额',
|
||||
field: 'freezePrice',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
|
|
|
@ -89,12 +89,12 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
|||
{
|
||||
field: 'payPrice',
|
||||
title: '支付金额',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'bonusPrice',
|
||||
title: '赠送金额',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
|
|
Loading…
Reference in New Issue