index.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <template>
  2. <div class="app-container">
  3. <!-- 搜索区域 -->
  4. <div class="filter-container">
  5. <div class="filter-control">
  6. <span>供应商名称:</span>
  7. <el-input v-model="listQuery.shopName" placeholder="供应商名称" @keyup.enter.native="getList" />
  8. </div>
  9. <div class="filter-control">
  10. <span>供应商类型:</span>
  11. <el-select v-model="listQuery.shopType" placeholder="供应商类型" clearable @change="getList">
  12. <el-option label="所有类型" value="" />
  13. <el-option label="代理商" :value="2" />
  14. <el-option label="品牌方" :value="1" />
  15. </el-select>
  16. </div>
  17. <div class="filter-control">
  18. <span>手机号:</span>
  19. <el-input v-model="listQuery.mobile" placeholder="手机号" @keyup.enter.native="getList" />
  20. </div>
  21. <div class="filter-control">
  22. <span>审核状态:</span>
  23. <el-select v-model="listQuery.lowerAuditStatus" placeholder="审核状态" clearable @change="getList">
  24. <el-option label="全部" value="" />
  25. <el-option label="已完成审核" :value="1" />
  26. <el-option label="未完成审核" :value="0" />
  27. </el-select>
  28. </div>
  29. <div class="filter-control">
  30. <span>联系人:</span>
  31. <el-input v-model="listQuery.linkMan" placeholder="联系人" @keyup.enter.native="getList" />
  32. </div>
  33. <div class="filter-control">
  34. <el-button type="primary" icon="el-icon-search" @click="getList">查询</el-button>
  35. </div>
  36. </div>
  37. <!-- 搜索区域END -->
  38. <!-- 表格区域 -->
  39. <el-table
  40. v-loading="listLoading"
  41. :data="list"
  42. style="width: 100%"
  43. border
  44. fit
  45. highlight-current-row
  46. header-row-class-name="tableHeader"
  47. cell-class-name="table-cell"
  48. >
  49. <el-table-column :index="indexMethod" label="序号" type="index" width="80" align="center" />
  50. <el-table-column prop="name" label="供应商名称" align="center" />
  51. <el-table-column label="供应商类型" width="150px" align="center">
  52. <template slot-scope="{ row }">
  53. <span v-if="row.shopType === 1">品牌方</span>
  54. <span v-if="row.shopType === 2">代理商</span>
  55. </template>
  56. </el-table-column>
  57. <el-table-column prop="mobile" label="手机号" width="200px" align="center" />
  58. <el-table-column prop="linkMan" label="联系人" width="200px" align="center" />
  59. <el-table-column label="审核状态" width="220px" align="center">
  60. <template slot-scope="{ row }">
  61. <el-tag v-if="row.lowerAuditStatus === 0" size="small" type="danger">未完成审核</el-tag>
  62. <el-tag v-if="row.lowerAuditStatus === 1" size="small" type="success">已完成审核</el-tag>
  63. </template>
  64. </el-table-column>
  65. <el-table-column label="操作" width="240px" align="center">
  66. <template slot-scope="{ row }">
  67. <el-badge :hidden="row.lowerAuditStatus === 1" :value="row.waitAuditNum" :max="99">
  68. <el-button
  69. type="primary"
  70. icon="el-icon-s-check"
  71. size="mini"
  72. @click="$_navigationTo(`club-list?authUserId=${row.authUserId}`)"
  73. >机构认证审核</el-button>
  74. </el-badge>
  75. </template>
  76. </el-table-column>
  77. </el-table>
  78. <!-- 表格区域END -->
  79. <!-- 页码 -->
  80. <pagination
  81. v-show="total > 0"
  82. :total="total"
  83. :page.sync="listQuery.pageNum"
  84. :limit.sync="listQuery.pageSize"
  85. @pagination="getList(listQuery)"
  86. />
  87. </div>
  88. </template>
  89. <script>
  90. import { fetchSupplierList } from '@/api/supplier'
  91. import Pagination from '@/components/Pagination'
  92. export default {
  93. components: { Pagination },
  94. data() {
  95. return {
  96. listQuery: {
  97. listType: 2,
  98. brandId: '', // 品牌id
  99. linkMan: '', // 联系人
  100. mobile: '', // 手机号
  101. pageNum: 0, // 页码
  102. pageSize: 10, // 分页大小
  103. shopName: '', // 供应商名称
  104. shopType: '', // 供应商类型
  105. lowerAuditStatus: ''
  106. },
  107. listLoading: false,
  108. list: [],
  109. total: 0
  110. }
  111. },
  112. created() {
  113. this.getList()
  114. },
  115. methods: {
  116. // 过滤列表
  117. handleFilter() {},
  118. // 获取供应商列表
  119. getList() {
  120. this.listLoading = true
  121. fetchSupplierList(this.listQuery)
  122. .then(res => {
  123. if (res.code !== 0) return
  124. this.list = res.data.list
  125. this.total = res.data.total
  126. })
  127. .finally(() => {
  128. this.listLoading = false
  129. })
  130. },
  131. indexMethod(index) {
  132. return index + this.listQuery.pageSize * (this.listQuery.pageNum - 1) + 1
  133. }
  134. }
  135. }
  136. </script>
  137. <style lang="scss" scoped>
  138. .el-table .cell {
  139. overflow: visible;
  140. }
  141. </style>