<template>
  <a-card :bordered="false">
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">

          <a-col :md="6" :sm="8">
            <a-form-item label="服务商">
              <a-input placeholder="请输入服务商" v-model="queryParam.hlwSubcontractorName"></a-input>
            </a-form-item>
          </a-col>


          <a-col :md="6" :sm="8">
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
            </span>
          </a-col>

        </a-row>
      </a-form>
    </div>
    <!-- 查询区域-END -->
    
    <!-- 操作按钮区域 -->
    <div class="table-operator">
      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
    </div>

    <!-- table区域-begin -->
    <div>


      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        class="j-table-force-nowrap"
        @change="handleTableChange">



        <span slot="action" slot-scope="text, record">
          <a @click="handleEdit(record)">编辑</a>
        </span>

      </a-table>
    </div>

    <hlwCpSubcontractorBankAccount-modal ref="modalForm" @ok="modalFormOk"></hlwCpSubcontractorBankAccount-modal>
  </a-card>
</template>

<script>

  import '@/assets/less/TableExpand.less'
  import { mixinDevice } from '@/utils/mixin'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import HlwCpSubcontractorBankAccountModal from './modules/HlwCpSubcontractorBankAccountModal'

  export default {
    name: "HlwCpSubcontractorBankAccountList",
    mixins:[JeecgListMixin, mixinDevice],
    components: {
      HlwCpSubcontractorBankAccountModal
    },
    data () {
      return {
        description: 'hlw_cp_subcontractor_bank_account管理页面',
        // 表头
        columns: [
          {
            title:'服务商',
            align:"center",
            dataIndex: 'cpId',
            customRender:function (value,record) {
              return record.hlwSubcontractorName!=null?record.hlwSubcontractorName:record.cpName
            }
          },
          {
            title:'开户银行',
            align:"center",
            dataIndex: 'bankName'
          },
          {
            title:'银行卡号',
            align:"center",
            dataIndex: 'bankAccount'
          },
          {
            title: '操作',
            dataIndex: 'action',
            align:"center",
            // fixed:"right",
            scopedSlots: { customRender: 'action' }
          }
        ],
        url: {
          list: "/wisdom/hlwCpSubcontractorBankAccount/list",
          delete: "/wisdom/hlwCpSubcontractorBankAccount/delete",
          deleteBatch: "/wisdom/hlwCpSubcontractorBankAccount/deleteBatch",
          exportXlsUrl: "/wisdom/hlwCpSubcontractorBankAccount/exportXls",
          importExcelUrl: "/wisdom/hlwCpSubcontractorBankAccount/importExcel",
        },
        dictOptions:{},
      }
    },
    computed: {
      importExcelUrl: function(){
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
      },
    },
    methods: {
      initDictConfig(){
      }
    }
  }
</script>
<style scoped>
  @import '~@assets/less/common.less';
</style>