user_bond_order_tk.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <template>
  2. <div v-loading="loading" style="padding: 20px">
  3. <div style="margin-bottom: 10px">
  4. <el-input v-model="search.uid" size="small" style="width: 200px" placeholder="用户的UID"></el-input>
  5. <el-button size="small" @click="search_" type="primary">搜索</el-button>
  6. <div class="flex_1" />
  7. </div>
  8. <div style="width: 100%">
  9. <el-table row-key="id" :data="list">
  10. <el-table-column prop="order_no" fixed width="170px" label="UID">
  11. <template slot-scope="scope">
  12. <a style="color: #006eff" target="_blank" :href="scope.row.user_info.link">{{scope.row.uid}}</a>
  13. </template>
  14. </el-table-column>
  15. <el-table-column prop="money" label="退款金额">
  16. <template slot-scope="scope">
  17. <span style="cursor: pointer" @click="show_pub_log(scope.row.uid)">{{scope.row.money}}</span>
  18. </template>
  19. </el-table-column>
  20. <el-table-column prop="reason" label="罚款原因"></el-table-column>
  21. <el-table-column prop="addtime" label="申请时间"></el-table-column>
  22. <el-table-column prop="paytime" label="支付时间"></el-table-column>
  23. <el-table-column fixed="right" width="140px" prop="uid" label="操作">
  24. <template slot-scope="scope">
  25. <el-button v-if="scope.row.status==1" type="text" @click="agree_tk(scope.row.id)">同意退款</el-button>
  26. <el-button v-if="scope.row.status==2" style="color: #2b2f3a" type="text">已退款</el-button>
  27. </template>
  28. </el-table-column>
  29. </el-table>
  30. </div>
  31. <el-pagination
  32. background
  33. style="margin-top: 10px"
  34. layout="total,prev, pager, next"
  35. :current-page="search.page"
  36. @current-change="page_event"
  37. :page-size="search.pagesize"
  38. :total="search.total">
  39. </el-pagination>
  40. <pub_log v-if="drawer_obj.pub_log" :back="this" :pro="drawer_obj.id" action="i_user_bond"></pub_log>
  41. <user_bond_fk_add v-if="child_page.type=='user_bond_fk_add'" :back="this" :pro="child_page.id"></user_bond_fk_add>
  42. </div>
  43. </template>
  44. <script>
  45. import user_bond_fk_add from '@/components/user_bond/user_bond_fk_add';
  46. import pub_log from '@/components/drawer/pub_log';
  47. export default {
  48. props: {
  49. status: {},
  50. role: {},
  51. invoice_type:{}
  52. },
  53. components: {user_bond_fk_add,pub_log},
  54. data() {
  55. return {
  56. loading: true,
  57. pay_type:"",
  58. drawer_obj:{
  59. user_settlement:false,
  60. user_invoice_add:false,
  61. id:0,
  62. pub_log:false,
  63. config:false,
  64. obj:{},
  65. },
  66. search: {
  67. pagesize: 10,
  68. total: 0,
  69. type:2,
  70. },
  71. child_page:{
  72. type:"",
  73. obj:{}
  74. }
  75. };
  76. },
  77. computed: {},
  78. watch: {},
  79. created() {
  80. this.search.status=this.status;
  81. this.search.invoice_type=this.invoice_type;
  82. },
  83. mounted() {
  84. this.getList();
  85. },
  86. methods: {
  87. async agree_tk(id) {
  88. this.$confirm('是否确认已操作, 是否继续?', '提示', {
  89. confirmButtonText: '确定',
  90. cancelButtonText: '取消',
  91. type: 'warning'
  92. }).then(async () => {
  93. let res = await this.$post("/uapi/pub/info/user/user_bond_order/admin_agree",{id:id});
  94. if (res.status == 1) {
  95. this.$message({
  96. type: 'success',
  97. message: '成功!'
  98. });
  99. this.getList();
  100. }
  101. }).catch(() => {
  102. this.$message({
  103. type: 'info',
  104. message: '已取消删除'
  105. });
  106. });
  107. },
  108. show_child_page(type,obj)
  109. {
  110. this.child_page.type=type;
  111. this.child_page.obj=obj;
  112. },
  113. show_config()
  114. {
  115. this.drawer_obj.id = 0;
  116. this.drawer_obj.config = true;
  117. },
  118. show_pub_log(id)
  119. {
  120. this.drawer_obj.id = id;
  121. this.drawer_obj.pub_log = true;
  122. },
  123. async getList() {
  124. this.loading = true;
  125. this.drawer = false;
  126. let data=this.search;
  127. data.act="";
  128. let res = await this.$post("/uapi/pub/info/user/user_bond_order/admin_list", this.search);
  129. this.loading = false;
  130. if (res.status == 1) {
  131. this.list = res.data.list;
  132. this.search.total = res.data.total;
  133. this.payMoney=res.data.payMoney;
  134. }
  135. },
  136. page_event(page) {
  137. this.search.page = page;
  138. this.getList();
  139. },
  140. getData_(id) {
  141. this.search.status = id;
  142. this.search.page=0;
  143. this.getList();
  144. },
  145. search_() {
  146. this.search.page = 0;
  147. this.getList();
  148. },
  149. }
  150. };
  151. </script>
  152. <style scoped>
  153. .el-tag {
  154. cursor: pointer;
  155. }
  156. </style>