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

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

View File

@ -32,7 +32,8 @@
"vue-router": "^3.1.3", "vue-router": "^3.1.3",
"vuedraggable": "^2.23.2", "vuedraggable": "^2.23.2",
"vuex": "^3.4.0", "vuex": "^3.4.0",
"xss": "^1.0.7" "xss": "^1.0.7",
"price-color":"1.0.2"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-babel": "^4.4.4", "@vue/cli-plugin-babel": "^4.4.4",

View File

@ -11,5 +11,6 @@ module.exports = {
website: "https://www.pickmall.cn", //官网地址 website: "https://www.pickmall.cn", //官网地址
enableCDN: true, //生产环境 是否启用cdn加载 vue等js enableCDN: true, //生产环境 是否启用cdn加载 vue等js
port: 10003, //端口 port: 10003, //端口
inputMaxLength:'140' //全局输入框默认最大输入长度字 inputMaxLength:'140', //全局输入框默认最大输入长度字
mainColor:"#ff5c58", //主题色
}; };

View File

@ -25,7 +25,7 @@ import {md5} from '@/utils/md5.js';
import Print from 'vue-print-nb'; import Print from 'vue-print-nb';
Vue.use(Print); Vue.use(Print);
const {aMapSecurityJsCode, inputMaxLength} = require("@/config"); const {aMapSecurityJsCode, inputMaxLength,mainColor } = require("@/config");
// 高德安全密钥 // 高德安全密钥
if (aMapSecurityJsCode) { if (aMapSecurityJsCode) {
window._AMapSecurityConfig = { window._AMapSecurityConfig = {
@ -45,6 +45,9 @@ Vue.prototype.wapLinkTo = function (goodsId, skuId) { // app端二维码
return `${WAP_URL}/pages/product/goods?id=${skuId}&goodsId=${goodsId}` return `${WAP_URL}/pages/product/goods?id=${skuId}&goodsId=${goodsId}`
}; };
// 引入价格格式化组件
import priceColorScheme from 'price-color'
Vue.use(priceColorScheme);
const copyViewUi = {...ViewUI} const copyViewUi = {...ViewUI}
copyViewUi.Input.props.maxlength.default = inputMaxLength // 挂载最大输入值 copyViewUi.Input.props.maxlength.default = inputMaxLength // 挂载最大输入值
@ -66,6 +69,7 @@ Vue.prototype.uploadFileRequest = uploadFileRequest;
Vue.prototype.setStore = setStore; Vue.prototype.setStore = setStore;
Vue.prototype.getStore = getStore; Vue.prototype.getStore = getStore;
Vue.prototype.removeStore = removeStore; Vue.prototype.removeStore = removeStore;
Vue.prototype.$mainColor = mainColor;
Vue.prototype.md5 = md5; Vue.prototype.md5 = md5;
Array.prototype.remove = function (from, to) { Array.prototype.remove = function (from, to) {

View File

@ -105,11 +105,9 @@ export default {
width: 150, width: 150,
sortable: false, sortable: false,
render: (h, params) => { render: (h, params) => {
return h( return h("priceColorScheme", {props:{value:params.row.rebateTotal,color:this.$mainColor}} );
"div",
this.$options.filters.unitPrice(params.row.rebateTotal, "¥")
);
}, },
}, },
{ {
title: "可用金额", title: "可用金额",
@ -117,10 +115,7 @@ export default {
width: 150, width: 150,
sortable: false, sortable: false,
render: (h, params) => { render: (h, params) => {
return h( return h("priceColorScheme", {props:{value:params.row.canRebate,color:'green'}} );
"div",
this.$options.filters.unitPrice(params.row.canRebate, "¥")
);
}, },
}, },
{ {
@ -129,10 +124,7 @@ export default {
width: 150, width: 150,
sortable: false, sortable: false,
render: (h, params) => { render: (h, params) => {
return h( return h("priceColorScheme", {props:{value:params.row.commissionFrozen,color:'#347dda'}} );
"div",
this.$options.filters.unitPrice(params.row.commissionFrozen, "¥")
);
}, },
}, },
{ {

View File

@ -97,8 +97,8 @@ export default {
key: "price", key: "price",
minWidth: 90, minWidth: 90,
render: (h, params) => { render: (h, params) => {
return h("div", this.$options.filters.unitPrice(params.row.price,'¥')); return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
} },
}, },
{ {
title: "申请时间", title: "申请时间",

View File

@ -98,11 +98,9 @@ export default {
key: "price", key: "price",
minWidth: 100, minWidth: 100,
render: (h, params) => { render: (h, params) => {
return h( return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
"div",
this.$options.filters.unitPrice(params.row.price, "¥")
);
}, },
}, },
{ {
title: "库存", title: "库存",
@ -126,11 +124,9 @@ export default {
minWidth: 100, minWidth: 100,
sortable: false, sortable: false,
render: (h, params) => { render: (h, params) => {
return h( return h("priceColorScheme", {props:{value:params.row.commission,color:this.$mainColor}} );
"div",
this.$options.filters.unitPrice(params.row.commission, "¥")
);
}, },
}, },
{ {
title: "操作", title: "操作",

View File

@ -126,13 +126,10 @@
minWidth:80, minWidth:80,
sortable: false, sortable: false,
render: (h, params) => { render: (h, params) => {
if(params.row.rebate == null){ return h("priceColorScheme", {props:{value:params.row.rebate,color:this.$mainColor}} );
return h("div", this.$options.filters.unitPrice(0, '¥')); },
}else{
return h("div", this.$options.filters.unitPrice(params.row.rebate, '¥'));
}
}
}, },
{ {
fixed: "right", fixed: "right",

View File

@ -200,10 +200,7 @@ export default {
key: "price", key: "price",
width: 130, width: 130,
render: (h, params) => { render: (h, params) => {
return h( return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
"div",
this.$options.filters.unitPrice(params.row.price, "¥")
);
}, },
}, },
{ {

View File

@ -115,7 +115,7 @@ export default {
key: "price", key: "price",
minWidth: 130, minWidth: 130,
render: (h, params) => { render: (h, params) => {
return h("div", this.$options.filters.unitPrice(params.row.price, "¥")); return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
}, },
}, },
{ {

View File

@ -38,7 +38,8 @@
<div class="form-item-view"> <div class="form-item-view">
<FormItem label="商品编号"> {{ goods.id }}</FormItem> <FormItem label="商品编号"> {{ goods.id }}</FormItem>
<FormItem label="商品价格"> <FormItem label="商品价格">
¥{{ goods.price | unitPrice }} <priceColorScheme :value="goods.price" :color="$mainColor"></priceColorScheme>
</FormItem> </FormItem>
<FormItem label="商品图片"> <FormItem label="商品图片">
<div <div
@ -179,8 +180,8 @@ export default {
specs: sku.goodsName, specs: sku.goodsName,
sn: sku.sn, sn: sku.sn,
weight: sku.weight, weight: sku.weight,
cost: that.$options.filters.unitPrice(sku.cost, "¥"), cost: sku.cost,
price: that.$options.filters.unitPrice(sku.price, "¥"), price:sku.price,
image: sku.thumbnail, image: sku.thumbnail,
}); });
}); });
@ -196,10 +197,17 @@ export default {
{ {
title: "成本", title: "成本",
key: "cost", key: "cost",
render: (h, params) => {
console.log(params)
return h("priceColorScheme", {props:{value:params.row.cost,color:this.$mainColor}} );
},
}, },
{ {
title: "价格", title: "价格",
key: "price", key: "price",
render: (h, params) => {
return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
},
} }
); );
} }

View File

@ -66,7 +66,9 @@
</template> </template>
<template slot="commissionRate" slot-scope="scope"> <template slot="commissionRate" slot-scope="scope">
{{ scope.row.commissionRate }}% <priceColorScheme v-if="scope.row.commissionRate > 0" unit="" :color="$mainColor" :value="scope.row.commissionRate">%</priceColorScheme>
<priceColorScheme v-else :value="scope.row.commissionRate" unit="" >%</priceColorScheme>
<!-- {{ scope.row.commissionRate }}% -->
</template> </template>
<template slot="deleteFlag" slot-scope="{ row }"> <template slot="deleteFlag" slot-scope="{ row }">

View File

@ -230,11 +230,9 @@ export default {
{ {
title: "价格", title: "价格",
key: "price", key: "price",
render: (h, params) => { render: (h, params) => {
return h( return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
"div",
this.$options.filters.unitPrice(params.row.price, "¥")
);
}, },
}, },
{ {
@ -261,10 +259,7 @@ export default {
title: "价格", title: "价格",
key: "price", key: "price",
render: (h, params) => { render: (h, params) => {
return h( return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
"div",
this.$options.filters.unitPrice(params.row.price, "¥")
);
}, },
}, },
{ {

View File

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

View File

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

View File

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

View File

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

View File

@ -222,14 +222,7 @@ export default {
key: "applyRefundPrice", key: "applyRefundPrice",
width: 110, width: 110,
render: (h, params) => { render: (h, params) => {
if (params.row.applyRefundPrice == null) { return h("priceColorScheme", {props:{value:params.row.applyRefundPrice,color:this.$mainColor}} );
return h("div", this.$options.filters.unitPrice(0, "¥"));
} else {
return h(
"div",
this.$options.filters.unitPrice(params.row.applyRefundPrice, "¥")
);
}
}, },
}, },
{ {

View File

@ -19,11 +19,15 @@
</dl> </dl>
<dl> <dl>
<dt>申请退款金额</dt> <dt>申请退款金额</dt>
<dd>{{ afterSaleInfo.applyRefundPrice | unitPrice }}</dd> <dd>
<priceColorScheme :value="afterSaleInfo.applyRefundPrice" :color="$mainColor"></priceColorScheme>
</dd>
</dl> </dl>
<dl v-if="afterSaleInfo.actualRefundPrice"> <dl v-if="afterSaleInfo.actualRefundPrice">
<dt>实际退款金额</dt> <dt>实际退款金额</dt>
<dd>{{ afterSaleInfo.actualRefundPrice | unitPrice }}</dd> <dd>
<priceColorScheme :value="afterSaleInfo.applyRefundPrice" :color="$mainColor"></priceColorScheme>
</dd>
</dl> </dl>
<dl v-if="afterSaleInfo.refundPoint"> <dl v-if="afterSaleInfo.refundPoint">
<dt>退还积分</dt> <dt>退还积分</dt>
@ -79,7 +83,9 @@
</dl> </dl>
<dl> <dl>
<dt>申请退款金额</dt> <dt>申请退款金额</dt>
<dd>{{ afterSaleInfo.applyRefundPrice | unitPrice("¥") }}</dd> <dd>
<priceColorScheme :value="afterSaleInfo.applyRefundPrice" :color="$mainColor"></priceColorScheme>
</dd>
</dl> </dl>
<dl> <dl>
<dt>实际退款金额</dt> <dt>实际退款金额</dt>

View File

@ -112,6 +112,7 @@
}, },
{ {
title: "投诉主题", title: "投诉主题",
width: 100,
key: "complainTopic", key: "complainTopic",
tooltip: true tooltip: true
}, },

View File

@ -180,7 +180,7 @@
订单金额 订单金额
</dt> </dt>
<dd> <dd>
{{complaintInfo.orderPrice}} <priceColorScheme :value="complaintInfo.orderPrice" :color="$mainColor"></priceColorScheme>
</dd> </dd>
</dl> </dl>

View File

@ -145,10 +145,7 @@ export default {
key: "flowPrice", key: "flowPrice",
minWidth: 80, minWidth: 80,
render: (h, params) => { render: (h, params) => {
return h( return h("priceColorScheme", {props:{value:params.row.flowPrice,color:this.$mainColor}} );
"div",
this.$options.filters.unitPrice(params.row.flowPrice, "¥")
);
}, },
}, },
{ {

View File

@ -153,11 +153,9 @@ export default {
key: "totalAmount", key: "totalAmount",
minWidth: 120, minWidth: 120,
render: (h, params) => { render: (h, params) => {
return h( return h("priceColorScheme", {props:{value:params.row.totalAmount,color:this.$mainColor}} );
"div",
this.$options.filters.unitPrice(params.row.totalAmount, "¥")
);
}, },
}, },
{ {
title: "申请时间", title: "申请时间",

View File

@ -102,10 +102,7 @@ export default {
minWidth: 120, minWidth: 120,
sortable: true, sortable: true,
render: (h, params) => { render: (h, params) => {
return h( return h("priceColorScheme", {props:{value:params.row.flowPrice,color:this.$mainColor}} );
"div",
this.$options.filters.unitPrice(params.row.flowPrice, "¥")
);
}, },
}, },

View File

@ -76,11 +76,10 @@
<div class="div-item" v-if="orderInfo.order.needReceipt == true"> <div class="div-item" v-if="orderInfo.order.needReceipt == true">
<div class="div-item-left">发票金额</div> <div class="div-item-left">发票金额</div>
<div class="div-item-right"> <div class="div-item-right">
{{
orderInfo.receipt && orderInfo.receipt.receiptPrice <priceColorScheme v-if="orderInfo.receipt && orderInfo.receipt.receiptPrice" :value="orderInfo.receipt.receiptPrice" :color="$mainColor"></priceColorScheme>
? orderInfo.receipt.receiptPrice <span v-else></span>
: "暂无" | unitPrice("¥")
}}
</div> </div>
</div> </div>
@ -225,7 +224,8 @@
"> ">
<span class="label">优惠券金额</span> <span class="label">优惠券金额</span>
<span class="txt"> <span class="txt">
{{ orderInfo.order.priceDetailDTO.couponPrice | unitPrice("¥") }} <priceColorScheme :value="orderInfo.order.priceDetailDTO.couponPrice" :color="$mainColor"></priceColorScheme>
</span> </span>
</li> </li>
<li <li

View File

@ -243,11 +243,9 @@ export default {
minWidth: 100, minWidth: 100,
tooltip: true, tooltip: true,
render: (h, params) => { render: (h, params) => {
return h( return h("priceColorScheme", {props:{value:params.row.flowPrice,color:this.$mainColor}} );
"div",
this.$options.filters.unitPrice(params.row.flowPrice, "¥")
);
}, },
}, },
{ {

View File

@ -76,10 +76,16 @@ export default {
let text = "未知"; let text = "未知";
if (params.row.couponType === "DISCOUNT") { if (params.row.couponType === "DISCOUNT") {
text = params.row.couponDiscount + "折"; text = params.row.couponDiscount + "折";
} else if (params.row.couponType === "PRICE") {
text = "¥" + params.row.price;
}
return h("div", [text]); return h("div", [text]);
} else if (params.row.couponType === "PRICE") {
return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
}else{
return h("div", [text]);
}
}, },
}, },
{ {

View File

@ -250,7 +250,8 @@ export default {
minWidth: 120, minWidth: 120,
render: (h, params) => { render: (h, params) => {
if (params.row.price) { if (params.row.price) {
return h("div", this.$options.filters.unitPrice(params.row.price, "¥")); return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
} else { } else {
return h("div", params.row.couponDiscount + "折"); return h("div", params.row.couponDiscount + "折");
} }

View File

@ -359,7 +359,7 @@ export default {
key: "price", key: "price",
minWidth: 40, minWidth: 40,
render: (h, params) => { render: (h, params) => {
return h("div", this.$options.filters.unitPrice(params.row.price, "¥")); return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
}, },
}, },
{ {

View File

@ -147,10 +147,9 @@ export default {
width: 100, width: 100,
render: (h, params) => { render: (h, params) => {
if (params.row.price) { if (params.row.price) {
return h(
"div", return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
this.$options.filters.unitPrice(params.row.price, "¥")
);
} else { } else {
return h("div", params.row.discount + "折"); return h("div", params.row.discount + "折");
} }

View File

@ -181,10 +181,8 @@ export default {
// width: 150, // width: 150,
render: (h, params) => { render: (h, params) => {
if (params.row.price) { if (params.row.price) {
return h( return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
"div",
this.$options.filters.unitPrice(params.row.price, "¥")
);
} else { } else {
return h("div", params.row.couponDiscount + "折"); return h("div", params.row.couponDiscount + "折");
} }

View File

@ -238,10 +238,7 @@ export default {
key: "price", key: "price",
minWidth: 40, minWidth: 40,
render: (h, params) => { render: (h, params) => {
return h( return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
"div",
this.$options.filters.unitPrice(params.row.price, "¥")
);
}, },
}, },
{ {

View File

@ -112,7 +112,7 @@ export default {
key: "price", key: "price",
width: 120, width: 120,
render: (h, params) => { render: (h, params) => {
return h("div", this.$options.filters.unitPrice(params.row.price, "¥")); return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
}, },
}, },
{ {

View File

@ -15,7 +15,9 @@
<div>{{ form.goodsSku.storeName }}</div> <div>{{ form.goodsSku.storeName }}</div>
</FormItem> </FormItem>
<FormItem label="商品价格"> <FormItem label="商品价格">
<div>{{ form.goodsSku.price | unitPrice('¥') }}</div> <div>
<priceColorScheme :value="form.goodsSku.price" :color="$mainColor"></priceColorScheme>
</div>
</FormItem> </FormItem>
<FormItem label="商品库存"> <FormItem label="商品库存">
<div>{{ form.goodsSku.quantity }}</div> <div>{{ form.goodsSku.quantity }}</div>

View File

@ -217,10 +217,7 @@ export default {
key: "settlementPrice", key: "settlementPrice",
minWidth: 100, minWidth: 100,
render: (h, params) => { render: (h, params) => {
return h( return h("priceColorScheme", {props:{value:params.row.settlementPrice,color:this.$mainColor}} );
"div",
this.$options.filters.unitPrice(params.row.settlementPrice, "¥")
);
}, },
}, },
{ {

View File

@ -129,7 +129,7 @@ export default {
key: "price", key: "price",
minWidth: 50, minWidth: 50,
render: (h, params) => { render: (h, params) => {
return h("div", this.$options.filters.unitPrice(params.row.price, "¥")); return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
}, },
}, },
], ],

View File

@ -219,10 +219,7 @@ export default {
key: "price", key: "price",
minWidth: 40, minWidth: 40,
render: (h, params) => { render: (h, params) => {
return h( return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
"div",
this.$options.filters.unitPrice(params.row.price, "¥")
);
}, },
}, },
{ {

View File

@ -15,7 +15,9 @@
<div>{{ form.goodsSku.storeName }}</div> <div>{{ form.goodsSku.storeName }}</div>
</FormItem> </FormItem>
<FormItem label="商品价格"> <FormItem label="商品价格">
<div>{{ form.goodsSku.price | unitPrice("¥") }}</div> <div>
<priceColorScheme :value="form.goodsSku.price" :color="$mainColor"></priceColorScheme>
</div>
</FormItem> </FormItem>
<FormItem label="库存"> <FormItem label="库存">
<div>{{ form.goodsSku.quantity }}</div> <div>{{ form.goodsSku.quantity }}</div>

View File

@ -91,10 +91,14 @@
</div> </div>
</template> </template>
<template slot-scope="{ row }" slot="price"> <template slot-scope="{ row }" slot="price">
<div>{{ row.originalPrice | unitPrice("¥") }}</div> <div>
<priceColorScheme :value="row.originalPrice" :color="$mainColor"></priceColorScheme>
</div>
</template> </template>
<template slot-scope="{ row }" slot="settlementPrice"> <template slot-scope="{ row }" slot="settlementPrice">
<div>{{ row.settlementPrice | unitPrice("¥") }}</div> <div>
<priceColorScheme :value="row.settlementPrice" :color="$mainColor"></priceColorScheme>
</div>
</template> </template>
<template slot-scope="{ row }" slot="quantity"> <template slot-scope="{ row }" slot="quantity">
<div>{{ row.activeStock }}</div> <div>{{ row.activeStock }}</div>

View File

@ -18,7 +18,9 @@
ref="table" ref="table"
> >
<template slot-scope="{ row }" slot="originalPrice"> <template slot-scope="{ row }" slot="originalPrice">
<div>{{ row.originalPrice | unitPrice("¥") }}</div> <div>
<priceColorScheme :value="row.originalPrice" :color="$mainColor"></priceColorScheme>
</div>
</template> </template>
<template slot-scope="{ row }" slot="quantity"> <template slot-scope="{ row }" slot="quantity">
@ -26,7 +28,9 @@
</template> </template>
<template slot-scope="{ row }" slot="price"> <template slot-scope="{ row }" slot="price">
<div>{{ row.price | unitPrice("¥") }}</div> <div>
<priceColorScheme :value="row.price" :color="$mainColor"></priceColorScheme>
</div>
</template> </template>
<template slot-scope="{ row }" slot="time"> <template slot-scope="{ row }" slot="time">

View File

@ -81,11 +81,9 @@ export default {
key: "billPrice", key: "billPrice",
width: 130, width: 130,
render: (h, params) => { render: (h, params) => {
return h( return h("priceColorScheme", {props:{value:params.row.billPrice,color:this.$mainColor}} );
"div",
this.$options.filters.unitPrice(params.row.billPrice, "¥")
);
}, },
}, },
{ {
title: "状态", title: "状态",

View File

@ -292,13 +292,7 @@ export default {
if (params.row.distributionRebate == null) { if (params.row.distributionRebate == null) {
return h("div", "-"); return h("div", "-");
} else { } else {
return h( return h("priceColorScheme", {props:{value:params.row.distributionRebate,color:this.$mainColor}} );
"div",
this.$options.filters.unitPrice(
params.row.distributionRebate,
"¥"
)
);
} }
}, },
}, },
@ -307,10 +301,7 @@ export default {
key: "billPrice", key: "billPrice",
width: 120, width: 120,
render: (h, params) => { render: (h, params) => {
return h( return h("priceColorScheme", {props:{value:params.row.billPrice,color:this.$mainColor}} );
"div",
this.$options.filters.unitPrice(params.row.billPrice, "¥")
);
}, },
}, },
], ],
@ -357,11 +348,9 @@ export default {
key: "finalPrice", key: "finalPrice",
width: 120, width: 120,
render: (h, params) => { render: (h, params) => {
return h( return h("priceColorScheme", {props:{value:params.row.flowPfinalPricerice,color:this.$mainColor}} );
"div",
this.$options.filters.unitPrice(params.row.finalPrice, "¥")
);
}, },
}, },
{ {
title: "退还佣金", title: "退还佣金",

View File

@ -92,11 +92,9 @@ export default {
key: "billPrice", key: "billPrice",
width: 130, width: 130,
render: (h, params) => { render: (h, params) => {
return h( return h("priceColorScheme", {props:{value:params.row.billPrice,color:this.$mainColor}} );
"div",
this.$options.filters.unitPrice(params.row.billPrice, "¥")
);
}, },
}, },
{ {
title: "状态", title: "状态",

View File

@ -773,19 +773,9 @@
key: "applyRefundPrice", key: "applyRefundPrice",
width: 110, width: 110,
render: (h, params) => { render: (h, params) => {
if (params.row.applyRefundPrice == null) { return h("priceColorScheme", {props:{value:params.row.applyRefundPrice,color:this.$mainColor}} );
return h(
"div",
this.$options.filters.unitPrice(0, "¥")
);
} else {
return h(
"div",
this.$options.filters.unitPrice(params.row.applyRefundPrice, "¥")
);
}
}, },
}, },
{ {
title: "售后类型", title: "售后类型",

View File

@ -50,11 +50,9 @@ export default {
title: "销售金额", title: "销售金额",
key: "price", key: "price",
render: (h, params) => { render: (h, params) => {
return h( return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
"div",
this.$options.filters.unitPrice(params.row.price, '¥')
);
}, },
}, },
], ],
data: [], // data: [], //

View File

@ -292,10 +292,7 @@ export default {
title: "价格", title: "价格",
key: "flowPrice", key: "flowPrice",
render: (h, params) => { render: (h, params) => {
return h( return h("priceColorScheme", {props:{value:params.row.flowPrice,color:this.$mainColor}} );
"div",
this.$options.filters.unitPrice(params.row.flowPrice, "¥")
);
}, },
}, },
{ {
@ -381,11 +378,7 @@ export default {
title: "申请退款金额", title: "申请退款金额",
key: "applyRefundPrice", key: "applyRefundPrice",
render: (h, params) => { render: (h, params) => {
return h( return h("priceColorScheme", {props:{value:params.row.applyRefundPrice,color:this.$mainColor}} );
"div",
"¥" +
(params.row.applyRefundPrice ? params.row.applyRefundPrice : 0)
);
}, },
}, },
{ {

View File

@ -74,7 +74,10 @@
<div class="count-price"> <div class="count-price">
<div class="label-item"> <div class="label-item">
<span>总价格</span> <span>总价格</span>
<span class="flowPrice">{{ res.flowPrice | unitPrice("¥") }}</span> <span class="flowPrice">
<priceColorScheme :value="row.flowPrice" :color="$mainColor"></priceColorScheme>
</span>
</div> </div>
</div> </div>
</div> </div>

View File

@ -18,7 +18,9 @@
</div> </div>
<div class="label-item"> <div class="label-item">
<span>申请退款金额</span> <span>申请退款金额</span>
<span>{{res.applyRefundPrice || 0 | unitPrice('¥')}}</span> <span>
<priceColorScheme :value="res.applyRefundPrice" :color="$mainColor"></priceColorScheme>
</span>
</div> </div>
<div class="label-item"> <div class="label-item">
<span>商家备注</span> <span>商家备注</span>