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