dealer_apply.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <template>
  2. <div class="app-container">
  3. <div v-if="isShow">
  4. <!-- 筛选条件 -->
  5. <div>
  6. <Collapse :screen-form="searchForm">
  7. <template #right_btn>
  8. <el-button size="mini" @click="clearFn">清空</el-button>
  9. <el-button size="mini" type="primary" @click="searchFn">搜索</el-button>
  10. </template>
  11. <template #search>
  12. <el-form ref="searchForm" :model="searchForm" label-width="70px" size="mini" label-position="left">
  13. <el-row :gutter="20">
  14. <el-col :xs="24" :sm="12" :lg="6">
  15. <el-form-item label="企业名称" prop="customerName">
  16. <el-input v-model="searchForm.customerName" placeholder="请输入企业名称"></el-input>
  17. </el-form-item>
  18. </el-col>
  19. <el-col :xs="24" :sm="12" :lg="6">
  20. <el-form-item label="联系人" prop="linkName">
  21. <el-input v-model="searchForm.linkName" placeholder="请输入联系人"></el-input>
  22. </el-form-item>
  23. </el-col>
  24. <el-col :xs="24" :sm="12" :lg="6">
  25. <el-form-item label="联系电话" prop="linkPhone">
  26. <el-input v-model="searchForm.linkPhone" placeholder="请输入联系电话"></el-input>
  27. </el-form-item>
  28. </el-col>
  29. <el-col :xs="24" :sm="12" :lg="6">
  30. <el-form-item label="电子邮箱" prop="email">
  31. <el-input v-model="searchForm.email" placeholder="请输入电子邮箱"></el-input>
  32. </el-form-item>
  33. </el-col>
  34. </el-row>
  35. </el-form>
  36. </template>
  37. </Collapse>
  38. </div>
  39. <!-- 按钮 -->
  40. <div class="btn-group clearfix">
  41. <div class="fl">
  42. <el-button type="primary" size="mini">删除</el-button>
  43. </div>
  44. <div class="fr">
  45. <el-button type="primary" size="mini">导出</el-button>
  46. </div>
  47. </div>
  48. <div class="mymain-container">
  49. <!-- 列表 -->
  50. <div class="table">
  51. <el-table
  52. v-loading="listLoading"
  53. :data="dataList"
  54. element-loading-text="Loading"
  55. border
  56. fit
  57. highlight-current-row
  58. stripe
  59. >
  60. <el-table-column type="selection" align="center" min-width="100"></el-table-column>
  61. <el-table-column
  62. align="left"
  63. label="企业名称"
  64. prop="customerName"
  65. min-width="160"
  66. show-overflow-tooltip
  67. ></el-table-column>
  68. <el-table-column
  69. align="left"
  70. label="联系人"
  71. prop="linkName"
  72. min-width="160"
  73. show-overflow-tooltip
  74. ></el-table-column>
  75. <el-table-column
  76. align="left"
  77. label="联系电话"
  78. prop="linkPhone"
  79. min-width="160"
  80. show-overflow-tooltip
  81. ></el-table-column>
  82. <el-table-column
  83. align="left"
  84. label="邮箱"
  85. prop="email"
  86. min-width="160"
  87. show-overflow-tooltip
  88. ></el-table-column>
  89. <el-table-column
  90. align="left"
  91. label="联系地址"
  92. prop="linkAddress"
  93. min-width="160"
  94. show-overflow-tooltip
  95. ></el-table-column>
  96. <el-table-column
  97. align="left"
  98. label="申请时间"
  99. prop="reqDate"
  100. min-width="160"
  101. show-overflow-tooltip
  102. ></el-table-column>
  103. <el-table-column
  104. align="left"
  105. label="跟进人"
  106. prop="lastFollowerName"
  107. min-width="160"
  108. show-overflow-tooltip
  109. ></el-table-column>
  110. <el-table-column
  111. align="left"
  112. label="跟进时间"
  113. prop="lastFollowerTime"
  114. min-width="160"
  115. show-overflow-tooltip
  116. ></el-table-column>
  117. <el-table-column
  118. align="left"
  119. label="跟进状态"
  120. prop="status"
  121. min-width="160"
  122. show-overflow-tooltip
  123. ></el-table-column>
  124. <el-table-column align="center" label="操作" min-width="160" show-overflow-tooltip fixed="right">
  125. <el-button type="text" class="textColor" @click="editFn">跟进</el-button>
  126. <el-button type="text" class="textColor">删除</el-button>
  127. </el-table-column>
  128. </el-table>
  129. </div>
  130. <!-- 分页 -->
  131. <div class="fr">
  132. <el-pagination
  133. :current-page="currentPage"
  134. :page-sizes="[10, 20, 30, 50]"
  135. :page-size="pageSize"
  136. layout="total, sizes, prev, pager, next, jumper"
  137. :total="listTotal"
  138. >
  139. </el-pagination>
  140. </div>
  141. </div>
  142. </div>
  143. <DealerApplyDetail v-else />
  144. </div>
  145. </template>
  146. <script>
  147. import { getDealerApplyList } from '@/api/basic_data/dealer'
  148. import DealerApplyDetail from './components/dealer-apply-detail.vue'
  149. export default {
  150. data() {
  151. return {
  152. currentPage: 1, // 当前页码
  153. pageSize: 10, // 每页数量
  154. listTotal: 0, // 列表总数
  155. isShow: true,
  156. showDialog: false,
  157. listLoading: false, // 列表加载loading
  158. dataList: [],
  159. searchForm: {
  160. customerName: '',
  161. email: '',
  162. linkName: '',
  163. linkPhone: ''
  164. },
  165. isCollapse: true
  166. }
  167. },
  168. components: {
  169. DealerApplyDetail
  170. },
  171. async created() {
  172. await this.getList({ pageNum: 1, pageSize: 10 })
  173. },
  174. methods: {
  175. // 更改每页数量
  176. handleSizeChange(val) {
  177. this.pageSize = val
  178. this.currentPage = 1
  179. this.getList({ pageNum: 1, pageSize: this.pageSize })
  180. },
  181. // 更改当前页
  182. handleCurrentChange(val) {
  183. this.currentPage = val
  184. this.getList({ pageNum: val, pageSize: 10 })
  185. },
  186. //搜索功能
  187. async searchFn() {
  188. console.log(this.searchForm)
  189. await this.getList({ ...this.searchForm, pageNum: 1, pageSize: 10 })
  190. },
  191. //重置
  192. clearFn() {
  193. this.$refs.searchForm.resetFields()
  194. },
  195. //获取列表数据
  196. async getList(data) {
  197. const res = await getDealerApplyList(data)
  198. console.log(res)
  199. this.dataList = res.data.records
  200. this.listTotal = res.data.total
  201. },
  202. editFn() {
  203. this.isShow = false
  204. }
  205. }
  206. }
  207. </script>
  208. <style lang="scss" scoped></style>