<template>
  <a-row :gutter="24">
    <a-col :md="24">
      <a-card :bordered="false">
        <!-- 查询区域 -->
        <filter-form></filter-form>
        <div>
          <a-button type="primary" icon="plus">新增盘点任务</a-button>
          <a-button>取消盘点</a-button>
          <a-button>批量删除</a-button>
          <a-button>导出任务</a-button>
        </div>
        <a-table
          ref="table"
          size="middle"
          bordered
          rowKey="id"
          :columns="taskColumns"
          :dataSource="dataSource"
          :components="handleDrag(taskColumns)"
          :pagination="ipagination"
          :scroll="scroll"
          :loading="loading"
          :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
          @change="handleTableChange"
        >
          <span slot="action" slot-scope="text, record">
            <a @click="myHandleDetail(record, '采购入库', prefixNo)">查看</a>
            <a-divider v-if="btnEnableList.indexOf(1) > -1" type="vertical" />
            <a v-if="btnEnableList.indexOf(1) > -1" @click="myHandleEdit(record)">编辑</a>
            <a-divider v-if="btnEnableList.indexOf(1) > -1" type="vertical" />
            <a-popconfirm
              v-if="btnEnableList.indexOf(1) > -1"
              title="确定删除吗?"
              @confirm="() => myHandleDelete(record)"
            >
              <a>删除</a>
            </a-popconfirm>
          </span>
        </a-table>
      </a-card>
    </a-col>
  </a-row>
</template>

<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import FilterForm from './components/FilterForm.vue'

export default {
  components: { FilterForm },
  mixins: [JeecgListMixin],
  data() {
    return {
      taskColumns: [],
    }
  },
}
</script>

<style></style>
