index.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <script lang="ts" setup>
  2. /**
  3. * @Name: index.vue
  4. * @Description: 商品列表
  5. * @Author: Cheney
  6. */
  7. import VerticalDivider from '/@/components/VerticalDivider/index.vue';
  8. import { RefreshRight, Search } from '@element-plus/icons-vue';
  9. import { useTableHeight } from '/@/utils/useTableHeight';
  10. import DataTable from '/@/views/product-list/component/DataTable.vue';
  11. const titleContainer: Ref<HTMLElement | null> = useTemplateRef('titleContainer');
  12. const queryContainer: Ref<HTMLElement | null> = useTemplateRef('queryContainer');
  13. const { tableHeight } = useTableHeight(titleContainer, queryContainer);
  14. const loading = ref(false);
  15. const formInline = reactive({
  16. user: '',
  17. region: '',
  18. date: ''
  19. });
  20. function onClick() {
  21. loading.value = true;
  22. }
  23. </script>
  24. <template>
  25. <div class="p-5 flex-grow">
  26. <el-card class="h-full" style="color: rgba(0, 0, 0, 0.88);">
  27. <div ref="titleContainer" class="text-xl font-semibold pb-7">商品列表</div>
  28. <!-- 查询条件 -->
  29. <div ref="queryContainer" class="flex justify-between">
  30. <div class="flex flex-1">
  31. <div class="w-full whitespace-nowrap">
  32. <el-row :gutter="20" style="margin-bottom: 16px;">
  33. <el-col :span="6">
  34. <div class="flex items-center">
  35. <span class="mr-2">国 家</span>
  36. <el-select v-model="formInline.date" clearable placeholder="请选择国家" />
  37. </div>
  38. </el-col>
  39. <el-col :span="6">
  40. <div class="flex items-center">
  41. <span class="mr-2">品 牌</span>
  42. <el-select v-model="formInline.date" clearable placeholder="请选择品牌" />
  43. </div>
  44. </el-col>
  45. <el-col :span="6">
  46. <div class="flex items-center">
  47. <span class="mr-2">分 组</span>
  48. <el-select v-model="formInline.date" clearable placeholder="请选择分组" />
  49. </div>
  50. </el-col>
  51. <el-col :span="6">
  52. <div class="flex items-center">
  53. <span class="mr-2">状 态</span>
  54. <el-select v-model="formInline.date" clearable placeholder="请选择状态" />
  55. </div>
  56. </el-col>
  57. </el-row>
  58. <el-row :gutter="20">
  59. <el-col :span="6">
  60. <div class="flex items-center">
  61. <span class="mr-2">ASIN</span>
  62. <el-input v-model="formInline.region" clearable placeholder="请输入ASIN"></el-input>
  63. </div>
  64. </el-col>
  65. <el-col :span="6">
  66. <div class="flex items-center">
  67. <span class="mr-2">SKU</span>
  68. <el-input v-model="formInline.region" clearable placeholder="请输入SKU"></el-input>
  69. </div>
  70. </el-col>
  71. <el-col :span="6" class="flex">
  72. <div class="flex items-center">
  73. <span class="mr-2">店 铺</span>
  74. <el-input v-model="formInline.region" clearable placeholder="请输入店铺"></el-input>
  75. </div>
  76. </el-col>
  77. </el-row>
  78. </div>
  79. </div>
  80. <VerticalDivider />
  81. <div class="flex flex-col gap-1.5 items-end">
  82. <el-button :icon="Search" :loading="loading" class="mb-4" type="primary" @click="onClick">
  83. 查 询
  84. </el-button>
  85. <el-button :icon="RefreshRight" color="#ECECF1C9" style="width: 88px; color: #3c3c3c;">
  86. 重 置
  87. </el-button>
  88. </div>
  89. </div>
  90. <el-divider ref="dividerContainer" style="margin: 20px 0 12px 0;" />
  91. <div :style="{ height: tableHeight + 'px' }">
  92. <DataTable />
  93. </div>
  94. </el-card>
  95. </div>
  96. </template>
  97. <style scoped>
  98. </style>