dealer_apply.vue 7.0 KB

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