user_bills.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <template>
  2. <div id="mainBody">
  3. <div v-if="user">
  4. <div class="user-name">用户:{{user.nickname}}({{user.uid}})</div>
  5. <div class="user-info">订单数量:{{totalCount}}(支付成功 {{successCount}}),收入金额:{{income_sum}}元(成功 {{income_success_sum}}元),支出金额:{{expense_sum}}元(成功 {{expense_success_sum}}元),当前余额 {{balance}}元</div>
  6. <el-table
  7. :data="finaceList" border
  8. style="width: 100%">
  9. <el-table-column
  10. prop=""
  11. label="订单名称">
  12. <template slot-scope="scope">
  13. <span class="lblue point">
  14. <nuxt-link target="_blank" :to="{path:'/main/orders_detail?id='+scope.row.order_no}">{{scope.row.product_title}}</nuxt-link>
  15. </span>
  16. </template>
  17. </el-table-column>
  18. <el-table-column
  19. prop=""
  20. label="实际金额">
  21. <template slot-scope="scope">
  22. {{scope.row.real_amount}}
  23. </template>
  24. </el-table-column>
  25. <el-table-column
  26. prop=""
  27. label="当前余额">
  28. <template slot-scope="scope">
  29. {{scope.row.total_balance?scope.row.total_balance:'--'}}
  30. </template>
  31. </el-table-column>
  32. <el-table-column
  33. prop=""
  34. label="支付方式">
  35. <template slot-scope="scope">
  36. {{scope.row.channel_name}}
  37. </template>
  38. </el-table-column>
  39. <el-table-column
  40. prop=""
  41. label="订单状态">
  42. <template slot-scope="scope">
  43. {{scope.row.order_state_name}}
  44. </template>
  45. </el-table-column>
  46. <el-table-column
  47. prop=""
  48. label="创建时间">
  49. <template slot-scope="scope">
  50. {{scope.row.created_at_name}}
  51. </template>
  52. </el-table-column>
  53. <el-table-column
  54. prop=""
  55. label="订单编号">
  56. <template slot-scope="scope">
  57. <nuxt-link target="_blank" :to="{path:'/main/orders_detail?id='+scope.row.order_no}">{{scope.row.order_no}}</nuxt-link>
  58. </template>
  59. </el-table-column>
  60. <el-table-column
  61. prop=""
  62. label="人工">
  63. <template slot-scope="scope">
  64. {{(scope.row.artificial_mark === 1 || scope.row.artificial_mark === "1")?'是':'否'}}
  65. </template>
  66. </el-table-column>
  67. <el-table-column
  68. prop=""
  69. label="备注说明">
  70. <template slot-scope="scope">
  71. {{scope.row.public_comment}}
  72. </template>
  73. </el-table-column>
  74. </el-table>
  75. </div>
  76. <div class="order-footer">
  77. <el-pagination
  78. background
  79. @current-change="getFinanceList"
  80. @size-change="changePageSize"
  81. :current-page.sync="currentPage"
  82. :page-sizes="[10, 20, 30, 40]"
  83. :page-size="20"
  84. layout="total, sizes, prev, pager, next, jumper"
  85. :total="totalCount"
  86. ></el-pagination>
  87. </div>
  88. </div>
  89. </template>
  90. <script>
  91. export default {
  92. data() {
  93. return {
  94. user:{},
  95. tradeList: [
  96. {
  97. id: 0,
  98. type: "全部"
  99. },
  100. {
  101. id: 1,
  102. type: "充值"
  103. },
  104. {
  105. id: 2,
  106. type: "提现"
  107. },
  108. {
  109. id: 3,
  110. type: "购买"
  111. },
  112. {
  113. id: 4,
  114. type: "购买"
  115. }
  116. ],
  117. finaceList: [],
  118. // 下发的总数据
  119. totalData: {},
  120. // 负责人
  121. checkUser: "",
  122. // 审核人列表
  123. periodStatusList: [],
  124. // 数据总条目
  125. totalCount: 1,
  126. currentPage: 1,
  127. currentPageSize: 20,
  128. // 列表数据
  129. tableData: [],
  130. };
  131. },
  132. computed: {
  133. isTest() {
  134. return this.localData.env === "test";
  135. }
  136. },
  137. mounted() {
  138. // this.getTableData();
  139. this.getFinanceList();
  140. },
  141. methods: {
  142. clickDev(uid) {
  143. this.$router.push({ path: "/main/orders_detail", params: { id: uid } });
  144. },
  145. changePageSize(val) {
  146. this.getFinanceList();
  147. },
  148. // 获取列表数据
  149. async getFinanceList() {
  150. let body = {
  151. page: this.currentPage,
  152. page_size: this.currentPageSize,
  153. user:this.$route.query.user
  154. };
  155. const res = await this.$post("/api/admin/order/get_user_orders", body);
  156. var data = res.data;
  157. this.finaceList = data.orders;
  158. this.totalCount = Number(data.count);
  159. this.successCount=Number(data.successCount);
  160. this.income_sum=Number(data.income_sum);
  161. this.income_success_sum=Number(data.income_success_sum);
  162. this.expense_sum=Number(data.expense_sum);
  163. this.expense_success_sum=Number(data.expense_success_sum);
  164. this.balance=data.total_balance.total_balance;
  165. this.user=data.user;
  166. //console.log(this.user.nickname);
  167. },
  168. async downFinanceList() {
  169. let body = {
  170. page: this.currentPage,
  171. page_size: this.currentPageSize,
  172. user:this.$route.query.user
  173. };
  174. // const res = await this.$get("/api/admin/order/get_orders", body);
  175. // http://local-rooter.proginn.com:20201/api/admin/order/get_orders?page=1&page_size=20&artificial_mark=1
  176. var url =
  177. window.location.host + "/api/admin/order/export?" + "artificial_mark=1";
  178. console.log(url);
  179. window.location.href = "http://" + url;
  180. },
  181. }
  182. };
  183. </script>
  184. <style lang="scss" scoped>
  185. .user-name {
  186. margin-bottom: 10px;
  187. }
  188. .user-info {
  189. margin-bottom: 10px;
  190. }
  191. .order-footer {
  192. position: absolute;
  193. bottom: 10px;
  194. left: 10px;
  195. }
  196. .product_title{
  197. overflow: hidden;
  198. -webkit-line-clamp: 1;
  199. text-overflow: ellipsis;
  200. display: -webkit-box;
  201. -webkit-box-orient: vertical;
  202. }
  203. #mainBody {
  204. white-space: nowrap;
  205. overflow-x: scroll;
  206. height: calc(100% - 40px);
  207. }
  208. </style>