user_credit_list.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <template>
  2. <div id="mainBody">
  3. <div v-if="user">
  4. <div class="user-info">全部:{{totalCount}} ,待授权:{{waitCount}},成功:{{successCount}},拒绝:{{failCount}}</div>
  5. <el-table
  6. :data="finaceList" border
  7. style="width: 100%">
  8. <el-table-column
  9. prop=""
  10. label="购买方">
  11. <template slot-scope="scope">
  12. <span class="lblue point">
  13. <a target="_blank" :href="scope.row.host+'/wo/'+scope.row.uid">{{scope.row.nickname}}</a>
  14. </span>
  15. </template>
  16. </el-table-column>
  17. <el-table-column
  18. prop=""
  19. label="被查询方">
  20. <template slot-scope="scope">
  21. <span class="lblue point">
  22. <a target="_blank" :href="scope.row.host+'/wo/'+scope.row.visited_uid">{{scope.row.visited_nickname}}</a>
  23. </span>
  24. </template>
  25. </el-table-column>
  26. <el-table-column
  27. prop=""
  28. label="付款时间">
  29. <template slot-scope="scope">
  30. <span v-if="scope.row.status>0">{{scope.row.pay_time}}</span>
  31. <span v-else>--</span>
  32. </template>
  33. </el-table-column>
  34. <el-table-column
  35. prop=""
  36. label="授权时间">
  37. <template slot-scope="scope">
  38. <span v-if="scope.row.status==2">{{scope.row.updated_at}}</span>
  39. <span v-else>--</span>
  40. </template>
  41. </el-table-column>
  42. <el-table-column
  43. prop=""
  44. label="购买套餐">
  45. <template slot-scope="scope">
  46. {{scope.row.package_name}}
  47. </template>
  48. </el-table-column>
  49. <el-table-column
  50. prop=""
  51. label="当前状态">
  52. <template slot-scope="scope">
  53. {{scope.row.status_name}}
  54. </template>
  55. </el-table-column>
  56. <el-table-column
  57. prop=""
  58. label="操作">
  59. <template slot-scope="scope">
  60. <a :href="'/main/user_credit_item?id='+scope.row.id" style="color: #3c95ff">查看详情</a>
  61. </template>
  62. </el-table-column>
  63. </el-table>
  64. </div>
  65. <div class="order-footer">
  66. <el-pagination
  67. background
  68. @current-change="getFinanceList"
  69. @size-change="changePageSize"
  70. :current-page.sync="currentPage"
  71. :page-sizes="[10, 20, 30, 40]"
  72. :page-size="20"
  73. layout="total, sizes, prev, pager, next, jumper"
  74. :total="totalCount"
  75. ></el-pagination>
  76. </div>
  77. </div>
  78. </template>
  79. <script>
  80. export default {
  81. data() {
  82. return {
  83. user: {},
  84. finaceList: [],
  85. // 下发的总数据
  86. totalData: {},
  87. // 负责人
  88. checkUser: "",
  89. // 审核人列表
  90. periodStatusList: [],
  91. // 数据总条目
  92. waitCount: 0,
  93. successCount: 0,
  94. failCount: 0,
  95. totalCount: 0,
  96. currentPage: 1,
  97. currentPageSize: 20,
  98. // 列表数据
  99. tableData: [],
  100. };
  101. },
  102. computed: {
  103. isTest() {
  104. return this.localData.env === "test";
  105. },
  106. },
  107. mounted() {
  108. this.getFinanceList();
  109. },
  110. methods: {
  111. clickDev(uid) {
  112. this.$router.push({path: "/main/orders_detail", params: {id: uid}});
  113. },
  114. changePageSize(val) {
  115. this.currentPage=val;
  116. this.getFinanceList();
  117. },
  118. // 获取列表数据
  119. async getFinanceList() {
  120. let body = {
  121. page: this.currentPage,
  122. size: this.currentPageSize,
  123. user: this.$route.query.user
  124. };
  125. const res = await this.$post("/api/admin/user_credit/get_orders", body);
  126. var data = res.data;
  127. this.finaceList = data.orders;
  128. console.log(data.count);
  129. this.totalCount = Number(data.count.all);
  130. this.waitCount = Number(data.count.wait);
  131. this.successCount = Number(data.count.approve);
  132. this.failCount = Number(data.count.reject);
  133. },
  134. async downFinanceList() {
  135. let body = {
  136. page: this.currentPage,
  137. page_size: this.currentPageSize,
  138. user: this.$route.query.user
  139. };
  140. var url =
  141. window.location.host + "/api/admin/order/export?" + "artificial_mark=1";
  142. console.log(url);
  143. window.location.href = "http://" + url;
  144. },
  145. }
  146. };
  147. </script>
  148. <style lang="scss" scoped>
  149. .user-name {
  150. margin-bottom: 10px;
  151. }
  152. .user-info {
  153. margin-bottom: 10px;
  154. }
  155. .order-footer {
  156. position: absolute;
  157. bottom: 10px;
  158. left: 10px;
  159. }
  160. .product_title {
  161. overflow: hidden;
  162. -webkit-line-clamp: 1;
  163. text-overflow: ellipsis;
  164. display: -webkit-box;
  165. -webkit-box-orient: vertical;
  166. }
  167. #mainBody {
  168. white-space: nowrap;
  169. overflow-x: scroll;
  170. height: calc(100% - 40px);
  171. }
  172. </style>