<template>
<div>
    <a-row :gutter="[6,38]">
        <a-col :span="4">
            <j-input placeholder="商品名称" v-model="queryParam.name" style="width: 200px"></j-input>
        </a-col>
        <a-col :span="4">
            <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
        </a-col>
    </a-row>
    <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" :rowSelection="{
      selectedRowKeys: selectedRowKeys,
      onChange: onSelectChange,
    }" class="j-table-force-nowrap" @change="handleTableChange">
        <span slot="state" slot-scope="record">
            {{ record ? "启用" : "停用" }}
            <!-- {{record}} -->
        </span>
        <!-- <span slot="action" slot-scope="text, record">
        <a @click="handleEdit(record)">修改</a>
        <a-divider type="vertical" />
        <a @click="moreSet(record)">更多设置</a>
        <a-divider type="vertical" />
        <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
            <a>删除</a>
        </a-popconfirm>
    </span> -->
    </a-table>
</div>
</template>

<script>
import {
    JeecgListMixin
} from "@/mixins/JeecgListMixin";
export default {
    mixins: [JeecgListMixin],
    data() {
        return {
            // 表头
            columns: [{
                    title: "口味名称",
                    align: "center",
                    dataIndex: "hotelName",
                    customCell: () => {
                        return {
                            style: {
                                wordWrap: "break-word",
                                wordBreak: "break-all",
                                whiteSpace: "normal",
                                minHeight: "50px",
                                width: "50px",
                            },
                        };
                    },
                },
                {
                    title: "加价金额",
                    align: "center",
                    dataIndex: "typeName",
                    customCell: () => {
                        return {
                            style: {
                                wordWrap: "break-word",
                                wordBreak: "break-all",
                                whiteSpace: "normal",
                                minHeight: "50px",
                                width: "50px",
                            },
                        };
                    },
                },
                {
                    title: "状态",
                    align: "center",
                    dataIndex: "unitName",
                    customCell: () => {
                        return {
                            style: {
                                wordWrap: "break-word",
                                wordBreak: "break-all",
                                whiteSpace: "normal",
                                minHeight: "50px",
                                width: "50px",
                            },
                        };
                    },
                },
                {
                    title: "应用范围",
                    align: "center",
                    dataIndex: "barCode",
                },
                {
                    title: "备注",
                    align: "center",
                    dataIndex: "name",
                },
                {
                    title: "创建时间",
                    align: "center",
                    dataIndex: "bid",
                },
            ],
        };
    },
};
</script>

<style>
</style>
