feat: 管理端新增格式化价格文件插件并在代码中引入,更新代码需要install插件

This commit is contained in:
Yer
2023-07-04 10:24:21 +08:00
parent bf70527c58
commit 3c83179579
48 changed files with 165 additions and 263 deletions

View File

@@ -104,10 +104,7 @@
width: 160,
sortable: true,
render: (h, params) => {
return h(
"div",
this.$options.filters.unitPrice(params.row.rechargeMoney, "¥")
);
return h("priceColorScheme", {props:{value:params.row.rechargeMoney,color:this.$mainColor,unit:"+"}} );
},
},
{
@@ -206,4 +203,4 @@
this.init();
},
};
</script>
</script>

View File

@@ -52,30 +52,10 @@ export default {
key: "money",
width: 150,
render: (h, params) => {
if (params.row.money > 0) {
return h("div", [
h(
"span",
{
style: {
color: "green",
},
},
this.$options.filters.unitPrice(params.row.money, "¥")
),
]);
if (params.row.money >0) {
return h("priceColorScheme", {props:{value:params.row.money,color:'green'}} );
} else if (params.row.money < 0) {
return h("div", [
h(
"span",
{
style: {
color: "red",
},
},
this.$options.filters.unitPrice(-params.row.money, "- ¥")
),
]);
return h("priceColorScheme", {props:{value:params.row.money,color:this.$mainColor}} );
}
},
},

View File

@@ -37,7 +37,7 @@
<span>{{showList.memberName}}</span>
</FormItem>
<FormItem label="申请金额">
<span>{{showList.applyMoney | unitPrice}}</span>
<priceColorScheme :value="showList.applyMoney" :color="$mainColor"></priceColorScheme>
</FormItem>
<FormItem label="提现状态">
<span>{{showList.applyStatus | paramTypeFilter}}</span>
@@ -46,7 +46,7 @@
<span>{{showList.createTime}}</span>
</FormItem>
<FormItem label="审核备注">
<Input v-model="audit" />
<Input v-model="audit" type="textarea" />
</FormItem>
</Form>
@@ -66,7 +66,8 @@
<span>{{showList.memberName}}</span>
</FormItem>
<FormItem label="申请金额:">
<span>{{showList.applyMoney}}</span>
<priceColorScheme :value="showList.applyMoney" :color="$mainColor"></priceColorScheme>
</FormItem>
<FormItem label="提现状态:">
<span>{{showList.applyStatus | paramTypeFilter}}</span>
@@ -78,7 +79,7 @@
<span>{{showList.inspectTime}}</span>
</FormItem>
<FormItem label="审核备注:">
<span>{{showList.inspectRemark}}</span>
<span>{{showList.inspectRemark || '暂无备注'}}</span>
</FormItem>
</Form>
@@ -143,15 +144,12 @@ export default {
key: "applyMoney",
align: "left",
width: 120,
render: (h, params) => {
return h("div", [
h(
"span",
{},
this.$options.filters.unitPrice(params.row.applyMoney)
),
]);
return h("priceColorScheme", {props:{value:params.row.applyMoney,color:this.$mainColor}} );
},
},
{
title: "提现状态",

View File

@@ -229,7 +229,10 @@
</div>
<div class="points-top-text">
{{memberWalletInfo.memberWallet?memberWalletInfo.memberWallet:0 | unitPrice('¥')}}
<priceColorScheme :value="memberWalletInfo.memberWallet" :color="$mainColor" :customer="{'fontSize':'21px'}" >
</priceColorScheme>
</div>
</div>
<div style="min-width: 120px;">
@@ -237,8 +240,9 @@
冻结余额
</div>
<div class="points-top-text">
{{memberWalletInfo.memberFrozenWallet?memberWalletInfo.memberFrozenWallet:0 | unitPrice('¥')}}
</div>
<priceColorScheme :value="memberWalletInfo.memberFrozenWallet" :color="$mainColor" :customer="{'fontSize':'21px'}" >
</priceColorScheme>
</div>
</div>
</div>
<Table
@@ -419,21 +423,9 @@
width: 150,
render: (h, params) => {
if (params.row.pointType == 'INCREASE') {
return h('div', [
h('span', {
style: {
color: 'green'
}
}, "+" + params.row.variablePoint),
]);
return h("priceColorScheme", {props:{value:params.row.variablePoint,color:'green',unit:"+"}} );
} else {
return h('div', [
h('span', {
style: {
color: 'red'
}
}, '-' + params.row.variablePoint),
]);
return h("priceColorScheme", {props:{value:params.row.variablePoint,color:this.$mainColor,unit:"-"}} );
}
}
},
@@ -463,8 +455,8 @@
key: "flowPrice",
width: 130,
render: (h, params) => {
return h("div", this.$options.filters.unitPrice(params.row.flowPrice, '¥'));
}
return h("priceColorScheme", {props:{value:params.row.flowPrice,color:this.$mainColor}} );
},
},
{
title: "订单类型",
@@ -768,21 +760,9 @@
width: 150,
render: (h, params) => {
if (params.row.money >0) {
return h('div', [
h('span', {
style:{
color: 'green'
}
}, this.$options.filters.unitPrice(params.row.money,'¥')),
]);
return h("priceColorScheme", {props:{value:params.row.money,color:'green'}} );
} else if (params.row.money < 0) {
return h('div', [
h('span', {
style:{
color: 'red'
}
}, this.$options.filters.unitPrice(params.row.money,'¥')),
]);
return h("priceColorScheme", {props:{value:params.row.money,color:this.$mainColor}} );
}
},
},
@@ -839,11 +819,10 @@
width: 130,
render: (h, params) => {
if(params.row.receiptPrice == null){
return h("div", this.$options.filters.unitPrice(0, '¥'));
return h("priceColorScheme", {props:{value:0,color:this.$mainColor}} );
}else{
return h("div", this.$options.filters.unitPrice(params.row.receiptPrice, '¥'));
return h("priceColorScheme", {props:{value:params.row.receiptPrice,color:this.$mainColor}} );
}
}
},
{

View File

@@ -93,23 +93,10 @@
width: 110,
render: (h, params) => {
if (params.row.pointType == 'INCREASE') {
return h('div', [
h('span', {
style: {
color: 'green'
}
}, "+" + params.row.variablePoint),
]);
return h("priceColorScheme", {props:{value:params.row.variablePoint,color:'green',unit:"+"}} );
} else {
return h('div', [
h('span', {
style: {
color: 'red'
}
}, '-' + params.row.variablePoint),
]);
return h("priceColorScheme", {props:{value:params.row.variablePoint,color:this.$mainColor,unit:"-"}} );
}
}
},
{