balance_sum.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <template>
  2. <div class="app-container">
  3. <!-- 筛选条件 -->
  4. <div>
  5. <el-form
  6. ref="searchForm"
  7. :model="searchForm"
  8. label-width="100px"
  9. size="small"
  10. label-position="left"
  11. >
  12. <el-row :gutter="20">
  13. <el-col :xs="24" :sm="12" :lg="6">
  14. <el-form-item label="经销商名称" prop="">
  15. <el-input
  16. v-model="searchForm.customerName"
  17. placeholder="请输入经销商名称"
  18. ></el-input>
  19. </el-form-item>
  20. </el-col>
  21. <el-col :xs="24" :sm="12" :lg="6">
  22. <el-form-item label="经销商编码" prop="">
  23. <el-input
  24. v-model="searchForm.customerNumber"
  25. placeholder="请输入"
  26. ></el-input>
  27. </el-form-item>
  28. </el-col>
  29. <el-col :xs="24" :sm="24" :lg="24">
  30. <el-form-item label="" class="fr">
  31. <el-button size="small">清空</el-button>
  32. <el-button size="small" type="primary" @click="searchFn"
  33. >搜索</el-button
  34. >
  35. </el-form-item>
  36. </el-col>
  37. </el-row>
  38. </el-form>
  39. </div>
  40. <!-- 按钮 -->
  41. <div class="btn-group clearfix">
  42. <div class="fr">
  43. <el-button type="primary" size="small">导出</el-button>
  44. </div>
  45. </div>
  46. <!-- 列表 -->
  47. <div class="mymain-container">
  48. <div class="table">
  49. <el-table
  50. v-loading="listLoading"
  51. :data="dataList"
  52. element-loading-text="Loading"
  53. border
  54. fit
  55. highlight-current-row
  56. stripe
  57. >
  58. <el-table-column
  59. align="center"
  60. label="经销商编码"
  61. prop="customerNumber"
  62. min-width="160"
  63. show-overflow-tooltip
  64. ></el-table-column>
  65. <el-table-column
  66. align="center"
  67. label="经销商名称"
  68. prop="customerName"
  69. min-width="160"
  70. show-overflow-tooltip
  71. ></el-table-column>
  72. <el-table-column
  73. align="center"
  74. label="总金额"
  75. prop="total"
  76. min-width="160"
  77. show-overflow-tooltip
  78. ></el-table-column>
  79. <el-table-column
  80. align="center"
  81. label="更新时间"
  82. prop="theTime"
  83. min-width="160"
  84. show-overflow-tooltip
  85. ></el-table-column>
  86. <el-table-column
  87. align="center"
  88. label="操作"
  89. min-width="160"
  90. show-overflow-tooltip
  91. >
  92. <template v-slot="{ row }">
  93. <el-button
  94. type="text"
  95. class="textColor"
  96. @click="walletFn(row.customerId)"
  97. >
  98. 余额
  99. </el-button>
  100. <el-button
  101. type="text"
  102. class="textColor"
  103. @click="seeFN(row.customerName,row.customerNumber)"
  104. >
  105. 明细
  106. </el-button>
  107. </template>
  108. </el-table-column>
  109. </el-table>
  110. </div>
  111. <!-- 分页
  112. <div class="fr">
  113. <el-pagination
  114. :current-page="currentPage"
  115. :page-sizes="[10, 20, 30, 50]"
  116. :page-size="10"
  117. layout="total, sizes, prev, pager, next, jumper"
  118. :total="listTotal"
  119. >
  120. </el-pagination>
  121. </div> -->
  122. </div>
  123. </div>
  124. </template>
  125. <script>
  126. import { getFinanceTotalCustomer } from "@/api/finance/blance_sum";
  127. export default {
  128. data() {
  129. return {
  130. // currentPage: 1, // 当前页码
  131. // pageSize: 10, // 每页数量
  132. // listTotal: 0, // 列表总数
  133. dataList: [], // 列表数据
  134. searchForm: {
  135. customerName: "",
  136. customerNumber: "",
  137. }, //搜索表单
  138. listLoading: false, // 列表加载loading
  139. };
  140. },
  141. created() {
  142. this.getDataList();
  143. },
  144. methods: {
  145. //搜索
  146. searchFn() {
  147. this.getDataList(this.searchForm);
  148. },
  149. //获取列表数据
  150. async getDataList(data) {
  151. const res = await getFinanceTotalCustomer(data);
  152. console.log(res);
  153. this.dataList = res.data;
  154. },
  155. //余额
  156. walletFn(v) {
  157. this.$router.push({
  158. path: "/finance/wallet",
  159. query: {
  160. id: v,
  161. },
  162. });
  163. },
  164. //明细
  165. seeFN(customerName,customerNumber) {
  166. this.$router.push({
  167. path: "/finance/standbook_list",
  168. query: {
  169. customerName,
  170. customerNumber
  171. },
  172. });
  173. },
  174. },
  175. };
  176. </script>
  177. <style>
  178. </style>