index.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <!-- 我的仓储-我的库存 -->
  2. <template>
  3. <app-view>
  4. <template #header>
  5. <app-filter v-bind="{ selectList, inputList, buttonList }" :loading="loading" />
  6. </template>
  7. <!-- 表格数据 -->
  8. <app-table :data="dataList" v-model:columns="columns" :loading="loading">
  9. <template #header>
  10. <app-auth-operation :menus="['add', 'sell']" @closed="getDiamondList" />
  11. </template>
  12. <!-- 颜色 -->
  13. <template #zscolortype="{ row }">
  14. {{ `${row.zscolortype1display}-${row.zscolortype2display}` }}
  15. </template>
  16. <!-- 净度 -->
  17. <template #zsclaritytype="{ row }">
  18. {{ `${row.zsclaritytype1display}-${row.zsclaritytype2display}` }}
  19. </template>
  20. <!-- 操作 -->
  21. <template #operate="{ row }">
  22. <app-auth-operation :menus="['details']" :options="{ selectedRow: row }" @closed="getDiamondList" />
  23. </template>
  24. <template #footer>
  25. <app-pagination :total="total" v-model:page-size="pageSize" v-model:page-index="pageIndex"
  26. @change="getDiamondList" />
  27. </template>
  28. </app-table>
  29. </app-view>
  30. </template>
  31. <script lang="ts" setup>
  32. import { ElMessage } from 'element-plus'
  33. import { useDiamond } from '@/business/goods'
  34. import AppTable from '@pc/components/base/table/index.vue'
  35. import AppPagination from '@pc/components/base/pagination/index.vue'
  36. import AppAuthOperation from '@pc/components/modules/auth-operation/index.vue'
  37. import AppFilter from '@pc/components/base/table-filter/index.vue'
  38. const { loading, dataList, total, pageIndex, pageSize, columns, selectList, inputList, buttonList, getDiamondList } = useDiamond()
  39. getDiamondList().catch((err) => ElMessage.error(err))
  40. </script>