调整页面布局

master
Chopper 2021-05-17 08:58:35 +08:00
parent 3b37178cfe
commit cd86e1de22
4 changed files with 100 additions and 70 deletions

View File

@ -67,7 +67,8 @@
size="small"
style="margin-right: 10px"
@click="edit(row)"
>编辑</Button
>编辑
</Button
>
<Button
v-if="row.promotionStatus === 'START' || row.promotionStatus === 'NEW'"
@ -75,7 +76,8 @@
size="small"
style="margin-right: 10px"
@click="remove(row)"
>下架</Button
>下架
</Button
>
</template>
</Table>
@ -153,9 +155,8 @@ export default {
key: "couponName",
minWidth: 120,
tooltip: true
},
{
title: "面额",
}, {
title: "面额/折扣",
key: "price",
width: 120,
render: (h, params) => {
@ -165,24 +166,19 @@ export default {
this.$options.filters.unitPrice(params.row.price, "¥")
);
} else {
return h("div");
return h("div", params.row.couponDiscount + "折");
}
},
},
{
title: "折扣",
key: "couponDiscount",
minWidth: 60
},
{
title: "总数量",
title: "领取数量/总数量",
key: "publishNum",
width: 100
},
{
title: "领取数量",
key: "receivedNum",
width: 100,
render: (h, params) => {
return h(
"div", params.row.receivedNum + "/" + params.row.publishNum)
}
},
{
title: "优惠券类型",
@ -217,15 +213,19 @@ export default {
},
},
{
title: "开始时间",
key: "startTime",
title: "活动时间",
minWidth: 120,
tooltip: true
render: (h, params) => {
return h("div", {
domProps:
{innerHTML: params.row.startTime + "<br/>" + params.row.endTime}
});
},
},
{
title: "状态",
key: "promotionStatus",
minWidth: 90,
minWidth: 100,
fixed: "right",
render: (h, params) => {
let text = "未知",
@ -261,7 +261,7 @@ export default {
slot: "action",
align: "center",
fixed: "right",
minWidth: 130
width: 80
},
],
data: [], //

View File

@ -1,7 +1,7 @@
<template>
<div>
<Card>
<Form ref="form" :model="form" :label-width="120" :rules="formRule">
<Form ref="form" :model="form" :label-width="120">
<div class="base-info-item">
<h4>基本信息</h4>
<div class="form-item-view">
@ -216,14 +216,19 @@ export default {
},
},
{
title: "库存",
title: "图片",
key: "quantity",
minWidth: 40,
},
{
title: "商品二维码",
slot: "QRCode",
title: "库存",
key: "quantity",
minWidth: 40,
},
// {
// title: "",
// slot: "QRCode",
// },
],
options: {
disabledDate(date) {

View File

@ -141,48 +141,94 @@ export default {
type: "selection",
width: 60,
align: "center",
fixed: "left",
},
{
title: "活动名称",
key: "promotionName",
minWidth: 120,
fixed: "left",
},
{
title: "优惠券名称",
key: "couponName",
minWidth: 120,
tooltip: true
}, {
title: "面额/折扣",
key: "price",
width: 120,
render: (h, params) => {
if (params.row.price) {
return h(
"div",
this.$options.filters.unitPrice(params.row.price, "¥")
);
} else {
return h("div", params.row.couponDiscount + "折");
}
},
},
{
title: "领取数量/总数量",
key: "publishNum",
width: 100,
render: (h, params) => {
return h(
"div", params.row.receivedNum + "/" + params.row.publishNum)
}
},
{
title: "优惠券类型",
key: "couponType",
minWidth: 50,
width: 120,
render: (h, params) => {
let text = "未知";
if (params.row.couponType == "DISCOUNT") {
if (params.row.couponType === "DISCOUNT") {
text = "打折";
} else if (params.row.couponType == "PRICE") {
} else if (params.row.couponType === "PRICE") {
text = "减免现金";
}
return h("div", [text]);
},
},
{
title: "面额",
key: "price",
minWidth: 40,
title: "品类描述",
key: "scopeType",
width: 100,
render: (h, params) => {
let text = "未知";
if (params.row.scopeType == "ALL") {
text = "全品类";
} else if (params.row.scopeType == "PORTION_GOODS_CATEGORY") {
text = "商品分类";
} else if (params.row.scopeType == "PORTION_SHOP_CATEGORY") {
text = "店铺分类";
} else if (params.row.scopeType == "PORTION_GOODS") {
text = "指定商品";
}
return h("div", [text]);
},
},
{
title: "折扣",
key: "couponDiscount",
minWidth: 40,
title: "活动时间",
minWidth: 120,
render: (h, params) => {
return h("div", {
domProps:
{innerHTML: params.row.startTime + "<br/>" + params.row.endTime}
});
},
},
{
title: "状态",
key: "status",
minWidth: 30,
key: "promotionStatus",
minWidth: 100,
fixed: "right",
render: (h, params) => {
let text = "未知",
color = "default";
color = "";
if (params.row.promotionStatus == "NEW") {
text = "未开始";
color = "default";
@ -209,29 +255,12 @@ export default {
]);
},
},
{
title: "品类描述",
key: "scopeType",
minWidth: 120,
render: (h, params) => {
let text = "未知";
if (params.row.scopeType == "ALL") {
text = "全品类";
} else if (params.row.scopeType == "PORTION_GOODS_CATEGORY") {
text = "部分商品分类";
} else if (params.row.scopeType == "PORTION_GOODS") {
text = "指定商品";
} else if (params.row.scopeType == "PORTION_SHOP_CATEGORY") {
text = "部分店铺分类";
}
return h("div", [text]);
},
},
{
title: "操作",
slot: "action",
align: "center",
width: 200,
fixed: "right",
width: 80,
},
],
data: [], //

View File

@ -347,10 +347,6 @@ export default {
key: "quantity",
minWidth: 40,
},
{
title: "商品二维码",
slot: "QRCode",
},
{
title: "操作",
slot: "action",