index.vue 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <!-- 交易服务-保税服务 -->
  2. <template>
  3. <app-view>
  4. <template #header>
  5. <app-filter :options="filterOptons" />
  6. </template>
  7. <!-- 表格数据 -->
  8. <app-table :data="dataList" v-model:columns="columns" :loading="loading">
  9. <!-- 操作 -->
  10. <template #operate="{ row }">
  11. <app-auth-operation :menus="handleOperateButtons(row)" :options="{ selectedRow: row }"
  12. @closed="onRefresh" />
  13. </template>
  14. <template #footer>
  15. <app-pagination :total="total" v-model:page-size="pageSize" v-model:page-index="pageIndex"
  16. @change="onRefresh" />
  17. </template>
  18. </app-table>
  19. </app-view>
  20. </template>
  21. <script lang="ts" setup>
  22. import { ElMessage } from 'element-plus'
  23. import { useDataFilter } from '@/hooks/datatable'
  24. import { GZBSStatus } from '@/constants/customs'
  25. import { useBSFWOrderList } from '@/business/customs/bonded'
  26. import AppAuthOperation from '@pc/components/modules/auth-operation/index.vue'
  27. import AppTable from '@pc/components/base/table/index.vue'
  28. import AppFilter from '@pc/components/base/table-filter/index.vue'
  29. import AppPagination from '@pc/components/base/pagination/index.vue'
  30. const { loading, dataList, columns, total, pageIndex, pageSize, getBSFWOrderList } = useBSFWOrderList()
  31. const { filterOptons } = useDataFilter<Ermcp.GZBSFWOrderRsp>()
  32. const handleOperateButtons = (row: Ermcp.GZBSFWOrderRsp) => {
  33. const buttons = ['customs_bonded_details', 'customs_bonded_download']
  34. switch (row.gzbsstatus) {
  35. case GZBSStatus.UploadBill: {
  36. buttons.push('customs_bonded_upload_bill')
  37. break
  38. }
  39. case GZBSStatus.UploadSeal: {
  40. buttons.push('customs_bonded_upload_seal')
  41. break
  42. }
  43. case GZBSStatus.AdvancePaymentConfirm: {
  44. buttons.push('customs_bonded_advance_payment')
  45. break
  46. }
  47. case GZBSStatus.PaymentConfirm: {
  48. buttons.push('customs_bonded_payment')
  49. break
  50. }
  51. }
  52. return buttons
  53. }
  54. const onRefresh = () => {
  55. getBSFWOrderList().catch((err) => ElMessage.error(err))
  56. }
  57. filterOptons.selectList = [
  58. {
  59. label: '单据状态',
  60. key: 'executestatus',
  61. options: [
  62. { label: '待处理', value: 1 },
  63. { label: '进行中', value: 2 },
  64. { label: '已结束', value: 3 },
  65. ],
  66. locked: true,
  67. },
  68. ]
  69. filterOptons.buttonList = [
  70. { lable: '查询', className: 'el-button--primary', onClick: () => onRefresh() }
  71. ]
  72. onRefresh()
  73. </script>