<script lang="ts" setup>
import ADropTable from '@/components/a-drop-table/ADropTable.vue'
import ProjectApi from '@/pages/cst/project/project-api.ts'

const model = defineModel<string | undefined | null>()
const dropTableColumns = [
  {
    label: '项目名称',
    prop: 'projectName',
  },
  {
    label: '客户名称',
    prop: 'fringeName',
  },
  {
    label: '运输方名称',
    prop: 'transName',
  },
  /* {
   label: '合同有效期',
   prop: 'contractStartDate',
   }, */
]
const dropTableLoader = (param: ProjectTypes.SearchProjectParam) => {
  return ProjectApi.paging(param).then(res => res.data)
}

</script>

<template>
  <ADropTable v-model="model"
    :columns="dropTableColumns"
    :loader="dropTableLoader"
    display-field="projectName"/>
</template>
