<template>
  <div class="page">
    <LayoutTable :data='tableData' :config='tableConfig' notDel />
  </div>
</template>

<script>
import table from "@/assets/mixins/table";

export default {
  mixins: [table],
  data() {
    return {
      config: {
        search: [
          {
            name: "name",
            type: "text",
            label: "仓库名",
            fuzzy: true
          },
          {
            name: "code",
            type: "text",
            label: "仓库编码",
            fuzzy: true
          },
          {
            name: "status",
            type: "select",
            label: "是否启用",
          },
        ],
        columns: [
          {label: "ID", prop: "id", formatter: this.formatterString, width:80},
					{label: "仓库名称", prop: "name"},
					{label: "仓库编码", prop: "code"},
					{label: "仓库地址", prop: "address"},
					{label: "联系人", prop: "contactsUser"},
					{label: "联系电话", prop: "contactsPhone"},
					{label: "是否启用", prop: "status", formatter: this.formatter,width:80},
					{label: "备注", prop: "remark", width: 240},
        /*  {label: "创建时间", prop: "createTime", formatter: this.formatterDate},
          {label: "创建人", prop: "createUser", width: 120},
					{label: "变更时间", prop: "updateTime", formatter: this.formatterDate},
					{label: "变更人", prop: "updateUser", width: 120},*/
          {
            label: "操作",
            width: 180,
            formatter: row => {
              return (
                  <div>
                    <table-buttons row={row} onEdit={this.toEdit} noDel onView={this.toView} />
                  </div>
              );
            }
          }
        ]
      }
    };
  }
};
</script>