商品列表问题展示搜索字段,展示商品类型

This commit is contained in:
Chopper
2021-06-22 14:59:20 +08:00
parent 4a6fd431bc
commit 3b922839a1
2 changed files with 67 additions and 23 deletions

View File

@@ -38,6 +38,12 @@
<Option value="DOWN">下架</Option>
</Select>
</Form-item>
<Form-item label="商品类型" prop="status">
<Select v-model="searchForm.goodsType" placeholder="请选择" clearable style="width: 200px">
<Option value="PHYSICAL_GOODS">实物商品</Option>
<Option value="VIRTUAL_GOODS">虚拟商品</Option>
</Select>
</Form-item>
<Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search" >搜索</Button>
</Form>
</Row>
@@ -132,6 +138,7 @@ export default {
pageSize: 10, // 页面大小
sort: "create_time", // 默认排序字段
order: "desc", // 默认排序方式
goodsType: "", // 商品类型
},
underForm: { // 下架原因
reason: "",
@@ -174,6 +181,20 @@ export default {
);
},
},
{
title: "商品类型",
key: "goodsType",
width: 130,
render: (h, params) => {
if (params.row.goodsType === 'PHYSICAL_GOODS') {
return h("div", "实物商品");
} else if (params.row.goodsType === 'VIRTUAL_GOODS') {
return h("div", "虚拟商品");
} else {
return h("div", "电子卡券");
}
},
},
{
title: "状态",
key: "marketEnable",