codealer_list.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <template>
  2. <el-container v-if="isShow">
  3. <el-header height="100%" class="mg">
  4. <el-form
  5. size="small"
  6. :model="searchForm"
  7. ref="searchForm"
  8. :inline="false"
  9. >
  10. <el-row :gutter="20">
  11. <el-col :xs="24" :sm="8" :lg="8">
  12. <el-form-item prop="code">
  13. <el-input
  14. size="small"
  15. v-model="searchForm.code"
  16. placeholder="销售政策编号"
  17. ></el-input>
  18. </el-form-item>
  19. </el-col>
  20. <el-col :xs="24" :sm="8" :lg="8">
  21. <el-form-item prop="remark">
  22. <el-input
  23. size="small"
  24. v-model="searchForm.remark"
  25. placeholder="销售政策说明"
  26. ></el-input>
  27. </el-form-item>
  28. </el-col>
  29. <el-col :xs="24" :sm="8" :lg="8">
  30. <el-form-item prop="title">
  31. <el-input
  32. size="small"
  33. v-model="searchForm.title"
  34. placeholder="表头备注"
  35. ></el-input>
  36. </el-form-item>
  37. </el-col>
  38. </el-row>
  39. <el-row class="mg">
  40. <el-button type="primary" size="small" @click="submitScreenForm"
  41. >查询</el-button
  42. >
  43. <el-button type="primary" size="small" @click="resetScreenForm"
  44. >重置</el-button
  45. >
  46. <el-button type="primary" size="small" @click="">导出</el-button>
  47. </el-row>
  48. </el-form>
  49. </el-header>
  50. <el-main>
  51. <el-table :data="dataList" border style="width: 100%">
  52. <el-table-column prop="name" label="操作" width="120" align="center">
  53. <template slot-scope>
  54. <el-button type="text" size="small" @click="">详情</el-button>
  55. </template>
  56. </el-table-column>
  57. <el-table-column prop="status" label="状态" width="120" align="center">
  58. <template slot-scope="scope">
  59. <el-tag type="success" size="small" v-if="scope.row.status == 1"
  60. >已生效</el-tag
  61. >
  62. <el-tag type="danger" size="small" v-else>未生效</el-tag>
  63. </template>
  64. </el-table-column>
  65. <el-table-column
  66. prop="code"
  67. label="销售政策编号"
  68. width="150"
  69. align="center"
  70. >
  71. </el-table-column>
  72. <el-table-column
  73. prop="title"
  74. label="销售政策说明"
  75. width="400"
  76. align="center"
  77. >
  78. </el-table-column>
  79. <el-table-column prop="zip" label="表头备注" width="200" align="center">
  80. </el-table-column>
  81. <el-table-column
  82. prop="customerCount"
  83. label="关联经销商"
  84. width="150"
  85. align="center"
  86. >
  87. </el-table-column>
  88. <el-table-column prop="startTime" label="生效日期" align="center">
  89. </el-table-column>
  90. <el-table-column prop="endTime" label="结束日期" align="center">
  91. </el-table-column>
  92. <el-table-column prop="createBy " label="制表人" align="center">
  93. </el-table-column>
  94. <el-table-column prop="createTime" label="制表日期" align="center">
  95. </el-table-column>
  96. </el-table>
  97. </el-main>
  98. <!-- 分页 -->
  99. <div class="fr">
  100. <el-pagination
  101. @size-change="handleSizeChange"
  102. @current-change="handleCurrentChange"
  103. :current-page="currentPage"
  104. :page-sizes="[10, 20, 30, 50]"
  105. :page-size="10"
  106. layout="total, sizes, prev, pager, next, jumper"
  107. :total="listTotal"
  108. >
  109. </el-pagination>
  110. </div>
  111. </el-container>
  112. <Distributor v-else />
  113. </template>
  114. <script>
  115. import { getCustomerlist } from "@/api/policy_list";
  116. import Minxin from "@/mixin";
  117. import Distributor from "./components/Distributor";
  118. export default {
  119. mixins: [Minxin],
  120. data() {
  121. return {
  122. isShow: false,
  123. input: "",
  124. dataList: [],
  125. searchForm: {
  126. code: "",
  127. remark: "",
  128. title: "",
  129. },
  130. };
  131. },
  132. methods: {
  133. getList() {
  134. this.listLoading = true;
  135. const params = {
  136. pageNum: this.currentPage,
  137. pageSize: this.pageSize,
  138. code: this.searchForm.code,
  139. remark: this.searchForm.remark,
  140. title: this.searchForm.title,
  141. };
  142. getCustomerlist(params).then((res) => {
  143. console.log(res);
  144. this.dataList = res.data.records;
  145. this.listLoading = false;
  146. });
  147. },
  148. },
  149. components: {
  150. Distributor,
  151. },
  152. };
  153. </script>
  154. <style lang="scss" scoped>
  155. .mg {
  156. margin: 20px 0;
  157. }
  158. .btn {
  159. text-align: right;
  160. }
  161. </style>