Commit 91bec0ed authored by wanglianghe's avatar wanglianghe

显示未设置价格状态(TODO 后端返回)

parent 8d6242c4
...@@ -336,9 +336,21 @@ export default { ...@@ -336,9 +336,21 @@ export default {
// 根据状态获取状态名称 ,这个应该可以改成字典,目前接口缺少相关数据,待定 // 根据状态获取状态名称 ,这个应该可以改成字典,目前接口缺少相关数据,待定
statusName() { statusName() {
return row => { return row => {
if(row.blacklist) return '黑名单'; //判断价格是否过期
if(row.auditStatus === AuditStatusEnum.PASS) return '已审核'; let validateStartDate = row.validateStartDate;
return '已下架'; let validateEndDate = row.validateEndDate;
let notSetPrice = false;
let nowDate = new Date().getTime();
if(validateStartDate && validateStartDate > nowDate) {
notSetPrice = true;
}
if(validateEndDate && validateEndDate < nowDate) {
notSetPrice = true;
}
let setPriceText = notSetPrice ? '(未设置价格)' : '';
if(row.blacklist) return '黑名单' + setPriceText;
if(row.auditStatus === AuditStatusEnum.PASS) return '已审核' + setPriceText;
return '已下架' + setPriceText;
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment