优化店铺后台状态展示

master
lifenlong 2021-06-23 11:34:56 +08:00
parent eb5816ff80
commit d5c96f66ce
13 changed files with 95 additions and 143 deletions

View File

@ -119,14 +119,13 @@ export default {
{
title: "直播状态",
render: (h, params) => {
return h(
"span",
params.row.status == "NEW"
? "未开始"
: params.row.status == "START"
? "直播中"
: "已结束"
);
if(params.row.status == "NEW"){
return h("div", [h("tag", {props: {color: "blue"}}, "未开始")]);
}else if(params.row.status == "START"){
return h("div", [h("tag", {props: {color: "green"}}, "直播中")]);
}else{
return h("div", [h("tag", {props: {color: "volcano"}}, "已结束")]);
}
},
},
{

View File

@ -170,32 +170,11 @@ export default {
width: 130,
render: (h, params) => {
if (params.row.isAuth == "TOBEAUDITED") {
return h("div", [
h("Badge", {
props: {
status: "error",
text: "待审核",
},
}),
]);
return h("Tag", {props: {color: "blue",},},"待审核");
} else if (params.row.isAuth == "PASS") {
return h("div", [
h("Badge", {
props: {
status: "success",
text: "审核通过",
},
}),
]);
return h("Tag", {props: {color: "green",},},"通过");
} else if (params.row.isAuth == "REFUSE") {
return h("div", [
h("Badge", {
props: {
status: "error",
text: "审核拒绝",
},
}),
]);
return h("Tag", {props: {color: "red",},},"审核拒绝");
}
},
},

View File

@ -134,21 +134,18 @@ export default {
key: "name",
minWidth: 120
},
{
title: "状态",
key: "disabled",
minWidth: 50,
render(h, params) {
return h("Badge", {
props: {
status: params.row.disabled ? "success" : "error",
text: params.row.disabled ? "开启" : "关闭",
},
});
if(params.row.disabled){
return h("div", [h("tag", {props: {color: "green"}}, "开启")]);
}else{
return h("div", [h("tag", {props: {color: "volcano"}}, "关闭")]);
}
},
},
{
title: "操作",
key: "action",

View File

@ -210,11 +210,11 @@ export default {
width: 100,
render: (h, params) => {
if (params.row.grade == "GOOD") {
return h("Badge", {props: {status: "success", text: "好评"}})
return h("Tag", {props: {color: "green",},}, "好评");
} else if (params.row.grade == "MODERATE") {
return h("Badge", {props: {status: "success", text: "中评"}})
} else if (params.row.grade == "WORSE") {
return h("Badge", {props: {status: "error", text: "差评"}})
return h("Tag", {props: {color: "orange",},}, "中评");
} else {
return h("Tag", {props: {color: "red",},}, "差评");
}
}
},
@ -224,9 +224,9 @@ export default {
width: 100,
render: (h, params) => {
if (params.row.status === "OPEN") {
return h("Badge", {props: {status: "success", text: "展示"}})
return h("Tag", {props: {color: "green"}},"展示")
} else {
return h("Badge", {props: {status: "error", text: "隐藏"}})
return h("Tag", {props: {color: "red"}},"隐藏")
}
},
},
@ -236,9 +236,9 @@ export default {
width: 110,
render: (h, params) => {
if (params.row.replyStatus) {
return h("Badge", {props: {status: "success", text: "已回复"}})
return h("Tag", {props: {color: "green"}},"已回复")
} else {
return h("Badge", {props: {status: "error", text: "未回复"}})
return h("Tag", {props: {color: "blue"}},"未回复")
}
},
},
@ -334,7 +334,7 @@ export default {
this.loading = false;
if (res.success) {
this.data = res.result.records;
this.total = res.result.total;
this.total = res.result.total;
}
});
},

View File

@ -185,17 +185,17 @@
key: "complainStatus",
render: (h, params) => {
if (params.row.complainStatus == "NEW") {
return h('div', [h('span', { }, '新投诉'),]);
return h('div', [h('tag',{props: {color: "purple"}}, '新投诉'),]);
} else if (params.row.complainStatus == "CANCEL") {
return h('div', [h('span', { }, '已撤销'),]);
return h('div', [h('tag', {props: {color: "cyan"}}, '已撤销'),]);
} else if (params.row.complainStatus == "WAIT_APPEAL") {
return h('div', [h('span', { }, '待申诉'),]);
return h('div', [h('tag', {props: {color: "volcano"}}, '待申诉'),]);
} else if (params.row.complainStatus == "COMMUNICATION") {
return h('div', [h('span', { }, '对话中'),]);
return h('div', [h('tag', {props: {color: "orange"}}, '对话中'),]);
}else if (params.row.complainStatus == "WAIT_ARBITRATION") {
return h('div', [h('span', { }, '等待仲裁'),]);
return h('div', [h('tag', {props: {color: "blue"}}, '等待仲裁'),]);
}else if (params.row.complainStatus == "COMPLETE") {
return h('div', [h('span', { }, '已完成'),]);
return h('div', [h('tag', {props: {color: "green"}}, '已完成'),]);
}
}
},

View File

@ -176,25 +176,23 @@
width: 120,
render: (h, params) => {
if (params.row.serviceStatus == "APPLY") {
return h('div', [h('span', { }, '申请售后'),]);
return h('div', [h('tag', {props: {color: "blue"}}, '申请中'),]);
} else if (params.row.serviceStatus == "PASS") {
return h('div', [h('span', { }, '审核通过'),]);
return h('div', [h('tag', {props: {color: "cyan"}}, '通过售后'),]);
} else if (params.row.serviceStatus == "REFUSE") {
return h('div', [h('span', { }, '审核拒绝'),]);
return h('div', [h('tag', {props: {color: "volcano"}}, '拒绝售后'),]);
} else if (params.row.serviceStatus == "BUYER_RETURN") {
return h('div', [h('span', { }, '买家退货,待卖家收货'),]);
}else if (params.row.serviceStatus == "SELLER_RE_DELIVERY") {
return h('div', [h('span', { }, '商家换货/补发'),]);
}else if (params.row.serviceStatus == "SELLER_CONFIRM") {
return h('div', [h('span', { }, '卖家确认收货'),]);
}else if (params.row.serviceStatus == "SELLER_TERMINATION") {
return h('div', [h('span', { }, '卖家终止售后'),]);
}else if (params.row.serviceStatus == "BUYER_CONFIRM") {
return h('div', [h('span', { }, '买家确认收货'),]);
}else if (params.row.serviceStatus == "BUYER_CANCEL") {
return h('div', [h('span', { }, '买家取消售后'),]);
}else if (params.row.serviceStatus == "COMPLETE") {
return h('div', [h('span', { }, '完成'),]);
return h('div', [h('tag', {props: {color: "orange"}}, '买家退货,待卖家收货'),]);
} else if (params.row.serviceStatus == "SELLER_CONFIRM") {
return h('div', [h('tag', {props: {color: "gold"}}, '卖家确认收货'),]);
} else if (params.row.serviceStatus == "SELLER_TERMINATION") {
return h('div', [h('tag', {props: {color: "lime"}}, '卖家终止售后'),]);
} else if (params.row.serviceStatus == "BUYER_CANCEL") {
return h('div', [h('tag', {props: {color: "purple"}}, '买家取消售后'),]);
} else if (params.row.serviceStatus == "COMPLETE") {
return h('div', [h('tag', {props: {color: "green"}}, '完成售后'),]);
}else if (params.row.serviceStatus == "WAIT_REFUND") {
return h('div', [h('tag', {props: {color: "geekblue"}}, '待平台退款'),]);
}
}
},

View File

@ -182,27 +182,17 @@
minWidth: 120,
render: (h, params) => {
if (params.row.serviceStatus == "APPLY") {
return h('div', [h('span', { }, '申请售后'),]);
return h('div', [h('tag', {props: {color: "blue"}}, '申请中'),]);
} else if (params.row.serviceStatus == "PASS") {
return h('div', [h('span', { }, '审核通过'),]);
return h('div', [h('tag', {props: {color: "cyan"}}, '通过售后'),]);
} else if (params.row.serviceStatus == "REFUSE") {
return h('div', [h('span', { }, '审核拒绝'),]);
} else if (params.row.serviceStatus == "BUYER_RETURN") {
return h('div', [h('span', { }, '买家退货,待卖家收货'),]);
}else if (params.row.serviceStatus == "SELLER_RE_DELIVERY") {
return h('div', [h('span', { }, '商家换货/补发'),]);
}else if (params.row.serviceStatus == "SELLER_CONFIRM") {
return h('div', [h('span', { }, '卖家确认收货'),]);
}else if (params.row.serviceStatus == "SELLER_TERMINATION") {
return h('div', [h('span', { }, '卖家终止售后'),]);
}else if (params.row.serviceStatus == "BUYER_CONFIRM") {
return h('div', [h('span', { }, '买家确认收货'),]);
}else if (params.row.serviceStatus == "BUYER_CANCEL") {
return h('div', [h('span', { }, '买家取消售后'),]);
return h('div', [h('tag', {props: {color: "volcano"}}, '拒绝售后'),]);
} else if (params.row.serviceStatus == "BUYER_CANCEL") {
return h('div', [h('tag', {props: {color: "purple"}}, '买家取消售后'),]);
} else if (params.row.serviceStatus == "COMPLETE") {
return h('div', [h('tag', {props: {color: "green"}}, '完成售后'),]);
}else if (params.row.serviceStatus == "WAIT_REFUND") {
return h('div', [h('span', { }, '等待平台退款'),]);
}else if (params.row.serviceStatus == "COMPLETE") {
return h('div', [h('span', { }, '完成'),]);
return h('div', [h('tag', {props: {color: "geekblue"}}, '待平台退款'),]);
}
}
},

View File

@ -126,19 +126,19 @@ export default {
minWidth: 100,
render: (h, params) => {
if (params.row.orderStatus == "UNPAID") {
return h("div", [h("span", {}, "未付款")]);
return h("div", [h("tag", {props: {color: "magenta"}}, "未付款")]);
} else if (params.row.orderStatus == "PAID") {
return h("div", [h("span", {}, "已付款")]);
return h("div", [h("tag", {props: {color: "blue"}}, "已付款")]);
} else if (params.row.orderStatus == "UNDELIVERED") {
return h("div", [h("span", {}, "待发货")]);
return h("div", [h("tag", {props: {color: "geekblue"}}, "待发货")]);
} else if (params.row.orderStatus == "DELIVERED") {
return h("div", [h("span", {}, "已发货")]);
return h("div", [h("tag", {props: {color: "cyan"}}, "已发货")]);
} else if (params.row.orderStatus == "COMPLETED") {
return h("div", [h("span", {}, "已完成")]);
return h("div", [h("tag", {props: {color: "green"}}, "已完成")]);
} else if (params.row.orderStatus == "TAKE") {
return h("div", [h("span", {}, "待核验")]);
return h("div", [h("tag", {props: {color: "volcano"}}, "待核验")]);
} else if (params.row.orderStatus == "CANCELLED") {
return h("div", [h("span", {}, "已取消")]);
return h("div", [h("tag", {props: {color: "red"}}, "已取消")]);
}
},
},

View File

@ -135,19 +135,19 @@ export default {
minWidth: 100,
render: (h, params) => {
if (params.row.orderStatus == "UNPAID") {
return h("div", [h("span", {}, "未付款")]);
return h("div", [h("tag", {props: {color: "magenta"}}, "未付款")]);
} else if (params.row.orderStatus == "PAID") {
return h("div", [h("span", {}, "已付款")]);
return h("div", [h("tag", {props: {color: "blue"}}, "已付款")]);
} else if (params.row.orderStatus == "UNDELIVERED") {
return h("div", [h("span", {}, "待发货")]);
return h("div", [h("tag", {props: {color: "geekblue"}}, "待发货")]);
} else if (params.row.orderStatus == "DELIVERED") {
return h("div", [h("span", {}, "已发货")]);
return h("div", [h("tag", {props: {color: "cyan"}}, "已发货")]);
} else if (params.row.orderStatus == "COMPLETED") {
return h("div", [h("span", {}, "已完成")]);
return h("div", [h("tag", {props: {color: "green"}}, "已完成")]);
} else if (params.row.orderStatus == "TAKE") {
return h("div", [h("span", {}, "待核验")]);
return h("div", [h("tag", {props: {color: "volcano"}}, "待核验")]);
} else if (params.row.orderStatus == "CANCELLED") {
return h("div", [h("span", {}, "已取消")]);
return h("div", [h("tag", {props: {color: "red"}}, "已取消")]);
}
},
},

View File

@ -161,17 +161,10 @@
tooltip: true,
render: (h, params) => {
if(params.row.receiptStatus == 0){
return h(
"div",
"未开票"
);
return h("div", [h("tag", {props: {color: "volcano"}}, "未开票")]);
}else{
return h(
"div",
"已开票"
);
return h("div", [h("tag", {props: {color: "green"}}, "未开票")]);
}
},
},
{
@ -180,19 +173,19 @@
width: 90,
render: (h, params) => {
if (params.row.orderStatus == "UNPAID") {
return h('div', [h('span', { }, '未付款'),]);
return h("div", [h("tag", {props: {color: "magenta"}}, "未付款")]);
} else if (params.row.orderStatus == "PAID") {
return h('div', [h('span', { }, '已付款'),]);
return h("div", [h("tag", {props: {color: "blue"}}, "已付款")]);
} else if (params.row.orderStatus == "UNDELIVERED") {
return h('div', [h('span', { }, '待发货'),]);
}else if (params.row.orderStatus == "DELIVERED") {
return h('div', [h('span', { }, '已发货'),]);
}else if (params.row.orderStatus == "COMPLETED") {
return h('div', [h('span', { }, '已完成'),]);
}else if (params.row.orderStatus == "TAKE") {
return h('div', [h('span', { }, '待核验'),]);
}else if (params.row.orderStatus == "CANCELLED") {
return h('div', [h('span', { }, '已取消'),]);
return h("div", [h("tag", {props: {color: "geekblue"}}, "待发货")]);
} else if (params.row.orderStatus == "DELIVERED") {
return h("div", [h("tag", {props: {color: "cyan"}}, "已发货")]);
} else if (params.row.orderStatus == "COMPLETED") {
return h("div", [h("tag", {props: {color: "green"}}, "已完成")]);
} else if (params.row.orderStatus == "TAKE") {
return h("div", [h("tag", {props: {color: "volcano"}}, "待核验")]);
} else if (params.row.orderStatus == "CANCELLED") {
return h("div", [h("tag", {props: {color: "red"}}, "已取消")]);
}
}
},

View File

@ -132,15 +132,13 @@
width: 100,
render: (h, params) => {
if (params.row.billStatus == "OUT") {
return h( "Badge", {props: { status: "success",text: "已出账" } })
} else if (params.row.billStatus == "EXAMINE") {
return h( "Badge", {props: { status: "success",text: "已审核" } })
return h("Tag", {props: {color: "blue",},},"已出账");
} else if (params.row.billStatus == "CHECK") {
return h( "Badge", {props: { status: "success",text: "已对账" } })
} else if (params.row.billStatus == "PAY") {
return h( "Badge", {props: { status: "success",text: "已付款" } })
}else if (params.row.billStatus == "COMPLETE") {
return h( "Badge", {props: { status: "success",text: "已完成" } })
return h("Tag", {props: {color: "geekblue",},},"已对账");
} else if (params.row.billStatus == "EXAMINE") {
return h("Tag", {props: {color: "purple",},},"已审核");
} else {
return h("Tag", {props: {color: "green",},},"已付款");
}
}
},

View File

@ -143,15 +143,13 @@
width: 100,
render: (h, params) => {
if (params.row.billStatus == "OUT") {
return h( "Badge", {props: { status: "success",text: "已出账" } })
} else if (params.row.billStatus == "EXAMINE") {
return h( "Badge", {props: { status: "success",text: "已审核" } })
return h("Tag", {props: {color: "blue",},},"已出账");
} else if (params.row.billStatus == "CHECK") {
return h( "Badge", {props: { status: "success",text: "已对账" } })
} else if (params.row.billStatus == "PAY") {
return h( "Badge", {props: { status: "success",text: "已付款" } })
}else if (params.row.billStatus == "COMPLETE") {
return h( "Badge", {props: { status: "success",text: "已完成" } })
return h("Tag", {props: {color: "geekblue",},},"已对账");
} else if (params.row.billStatus == "EXAMINE") {
return h("Tag", {props: {color: "purple",},},"已审核");
} else {
return h("Tag", {props: {color: "green",},},"已付款");
}
}
},

View File

@ -58,10 +58,10 @@
minWidth: 120,
sortable: true,
render: (h, params) => {
if (params.row.selected === null || params.row.selected === "") {
return h( "Badge", {props: { status: "error",text: "关闭" } })
} else if (params.row.selected !== "") {
return h( "Badge", {props: { status: "success",text: "开启" } })
if(params.row.selected === null || params.row.selected === ""){
return h("div", [h("tag", {props: {color: "volcano"}}, "关闭")]);
}else{
return h("div", [h("tag", {props: {color: "green"}}, "开启")]);
}
}
},