codealer_list.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <template>
  2. <el-container v-if="isShow">
  3. <el-header height="100%" class="mg">
  4. <el-form
  5. size="small"
  6. :model="screenForm"
  7. ref="screenForm"
  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="screenForm.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="screenForm.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="screenForm.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="scope">
  54. <el-button
  55. type="text"
  56. size="small"
  57. @click="(id = scope.row.id), (isShow = false)"
  58. >详情</el-button
  59. >
  60. </template>
  61. </el-table-column>
  62. <el-table-column prop="status" label="状态" width="120" align="center">
  63. <template slot-scope="scope">
  64. <el-tag type="success" size="small" v-if="scope.row.status == 1"
  65. >已生效</el-tag
  66. >
  67. <el-tag type="danger" size="small" v-else>未生效</el-tag>
  68. </template>
  69. </el-table-column>
  70. <el-table-column
  71. prop="code"
  72. label="销售政策编号"
  73. width="150"
  74. align="center"
  75. >
  76. </el-table-column>
  77. <el-table-column
  78. prop="title"
  79. label="销售政策说明"
  80. width="200"
  81. align="center"
  82. >
  83. </el-table-column>
  84. <el-table-column
  85. prop="title"
  86. label="表头备注"
  87. width="200"
  88. align="center"
  89. >
  90. </el-table-column>
  91. <el-table-column
  92. prop="customerCount"
  93. label="关联经销商"
  94. width="150"
  95. align="center"
  96. >
  97. </el-table-column>
  98. <el-table-column prop="startTime" label="生效日期" align="center">
  99. </el-table-column>
  100. <el-table-column prop="endTime" label="结束日期" align="center">
  101. </el-table-column>
  102. <el-table-column prop="createBy" label="制表人" align="center">
  103. </el-table-column>
  104. <el-table-column prop="createTime" label="制表日期" align="center">
  105. </el-table-column>
  106. </el-table>
  107. </el-main>
  108. <!-- 分页 -->
  109. <div class="fr">
  110. <el-pagination
  111. @size-change="handleSizeChange"
  112. @current-change="handleCurrentChange"
  113. :current-page="currentPage"
  114. :page-sizes="[10, 20, 30, 50]"
  115. :page-size="10"
  116. layout="total, sizes, prev, pager, next, jumper"
  117. :total="listTotal"
  118. >
  119. </el-pagination>
  120. </div>
  121. </el-container>
  122. <Distributor v-else :cid="id" />
  123. </template>
  124. <script>
  125. import { getCustomerlist, getPolicyDetail } from "@/api/policy_list";
  126. import Minxin from "@/mixin";
  127. import Distributor from "./components/Distributor";
  128. export default {
  129. mixins: [Minxin],
  130. data() {
  131. return {
  132. isShow: true,
  133. id: "",
  134. input: "",
  135. dataList: [],
  136. screenForm: {
  137. code: "",
  138. remark: "",
  139. title: "",
  140. },
  141. };
  142. },
  143. methods: {
  144. getList() {
  145. this.listLoading = true;
  146. const params = {
  147. pageNum: this.currentPage,
  148. pageSize: this.pageSize,
  149. code: this.screenForm.code,
  150. remark: this.screenForm.remark,
  151. title: this.screenForm.title,
  152. };
  153. getCustomerlist(params).then((res) => {
  154. console.log(res);
  155. this.dataList = res.data.records;
  156. this.listTotal = res.data.total;
  157. this.listLoading = false;
  158. });
  159. },
  160. },
  161. components: {
  162. Distributor,
  163. },
  164. };
  165. </script>
  166. <style lang="scss" scoped>
  167. .mg {
  168. margin: 20px 0;
  169. }
  170. .btn {
  171. text-align: right;
  172. }
  173. </style>