优化店铺后台状态展示

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: "直播状态", title: "直播状态",
render: (h, params) => { render: (h, params) => {
return h( if(params.row.status == "NEW"){
"span", return h("div", [h("tag", {props: {color: "blue"}}, "未开始")]);
params.row.status == "NEW" }else if(params.row.status == "START"){
? "未开始" return h("div", [h("tag", {props: {color: "green"}}, "直播中")]);
: params.row.status == "START" }else{
? "直播中" return h("div", [h("tag", {props: {color: "volcano"}}, "已结束")]);
: "已结束" }
);
}, },
}, },
{ {

View File

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

View File

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

View File

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

View File

@ -185,17 +185,17 @@
key: "complainStatus", key: "complainStatus",
render: (h, params) => { render: (h, params) => {
if (params.row.complainStatus == "NEW") { if (params.row.complainStatus == "NEW") {
return h('div', [h('span', { }, '新投诉'),]); return h('div', [h('tag',{props: {color: "purple"}}, '新投诉'),]);
} else if (params.row.complainStatus == "CANCEL") { } 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") { } 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") { } 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") { }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") { }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, width: 120,
render: (h, params) => { render: (h, params) => {
if (params.row.serviceStatus == "APPLY") { if (params.row.serviceStatus == "APPLY") {
return h('div', [h('span', { }, '申请售后'),]); return h('div', [h('tag', {props: {color: "blue"}}, '申请中'),]);
} else if (params.row.serviceStatus == "PASS") { } 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") { } 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") { } else if (params.row.serviceStatus == "BUYER_RETURN") {
return h('div', [h('span', { }, '买家退货,待卖家收货'),]); return h('div', [h('tag', {props: {color: "orange"}}, '买家退货,待卖家收货'),]);
}else if (params.row.serviceStatus == "SELLER_RE_DELIVERY") { } else if (params.row.serviceStatus == "SELLER_CONFIRM") {
return h('div', [h('span', { }, '商家换货/补发'),]); return h('div', [h('tag', {props: {color: "gold"}}, '卖家确认收货'),]);
}else if (params.row.serviceStatus == "SELLER_CONFIRM") { } else if (params.row.serviceStatus == "SELLER_TERMINATION") {
return h('div', [h('span', { }, '卖家确认收货'),]); return h('div', [h('tag', {props: {color: "lime"}}, '卖家终止售后'),]);
}else if (params.row.serviceStatus == "SELLER_TERMINATION") { } else if (params.row.serviceStatus == "BUYER_CANCEL") {
return h('div', [h('span', { }, '卖家终止售后'),]); return h('div', [h('tag', {props: {color: "purple"}}, '买家取消售后'),]);
}else if (params.row.serviceStatus == "BUYER_CONFIRM") { } else if (params.row.serviceStatus == "COMPLETE") {
return h('div', [h('span', { }, '买家确认收货'),]); return h('div', [h('tag', {props: {color: "green"}}, '完成售后'),]);
}else if (params.row.serviceStatus == "BUYER_CANCEL") { }else if (params.row.serviceStatus == "WAIT_REFUND") {
return h('div', [h('span', { }, '买家取消售后'),]); return h('div', [h('tag', {props: {color: "geekblue"}}, '待平台退款'),]);
}else if (params.row.serviceStatus == "COMPLETE") {
return h('div', [h('span', { }, '完成'),]);
} }
} }
}, },

View File

@ -182,27 +182,17 @@
minWidth: 120, minWidth: 120,
render: (h, params) => { render: (h, params) => {
if (params.row.serviceStatus == "APPLY") { if (params.row.serviceStatus == "APPLY") {
return h('div', [h('span', { }, '申请售后'),]); return h('div', [h('tag', {props: {color: "blue"}}, '申请中'),]);
} else if (params.row.serviceStatus == "PASS") { } 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") { } 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") { } else if (params.row.serviceStatus == "BUYER_CANCEL") {
return h('div', [h('span', { }, '买家退货,待卖家收货'),]); return h('div', [h('tag', {props: {color: "purple"}}, '买家取消售后'),]);
}else if (params.row.serviceStatus == "SELLER_RE_DELIVERY") { } else if (params.row.serviceStatus == "COMPLETE") {
return h('div', [h('span', { }, '商家换货/补发'),]); return h('div', [h('tag', {props: {color: "green"}}, '完成售后'),]);
}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 == "WAIT_REFUND") { }else if (params.row.serviceStatus == "WAIT_REFUND") {
return h('div', [h('span', { }, '等待平台退款'),]); return h('div', [h('tag', {props: {color: "geekblue"}}, '待平台退款'),]);
}else if (params.row.serviceStatus == "COMPLETE") {
return h('div', [h('span', { }, '完成'),]);
} }
} }
}, },

View File

@ -126,19 +126,19 @@ export default {
minWidth: 100, minWidth: 100,
render: (h, params) => { render: (h, params) => {
if (params.row.orderStatus == "UNPAID") { if (params.row.orderStatus == "UNPAID") {
return h("div", [h("span", {}, "未付款")]); return h("div", [h("tag", {props: {color: "magenta"}}, "未付款")]);
} else if (params.row.orderStatus == "PAID") { } 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") { } 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") { } 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") { } 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") { } 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") { } 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, minWidth: 100,
render: (h, params) => { render: (h, params) => {
if (params.row.orderStatus == "UNPAID") { if (params.row.orderStatus == "UNPAID") {
return h("div", [h("span", {}, "未付款")]); return h("div", [h("tag", {props: {color: "magenta"}}, "未付款")]);
} else if (params.row.orderStatus == "PAID") { } 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") { } 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") { } 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") { } 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") { } 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") { } 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, tooltip: true,
render: (h, params) => { render: (h, params) => {
if(params.row.receiptStatus == 0){ if(params.row.receiptStatus == 0){
return h( return h("div", [h("tag", {props: {color: "volcano"}}, "未开票")]);
"div",
"未开票"
);
}else{ }else{
return h( return h("div", [h("tag", {props: {color: "green"}}, "未开票")]);
"div",
"已开票"
);
} }
}, },
}, },
{ {
@ -180,19 +173,19 @@
width: 90, width: 90,
render: (h, params) => { render: (h, params) => {
if (params.row.orderStatus == "UNPAID") { if (params.row.orderStatus == "UNPAID") {
return h('div', [h('span', { }, '未付款'),]); return h("div", [h("tag", {props: {color: "magenta"}}, "未付款")]);
} else if (params.row.orderStatus == "PAID") { } 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") { } 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") { } 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") { } 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") { } 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") { } else if (params.row.orderStatus == "CANCELLED") {
return h('div', [h('span', { }, '已取消'),]); return h("div", [h("tag", {props: {color: "red"}}, "已取消")]);
} }
} }
}, },

View File

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

View File

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

View File

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