refund.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <template>
  2. <div class="app-container">
  3. <div class="filter-container">
  4. <div class="filter-control">
  5. <span>退款编号:</span>
  6. <el-input v-model="listQuery.returnedNo" style="width:130px;" placeholder="退款编号" clearable @keyup.enter.native="getList" @clear="getList" />
  7. </div>
  8. <div class="filter-control">
  9. <span>订单ID:</span>
  10. <el-input v-model="listQuery.orderID" style="width:130px;" placeholder="订单ID" clearable @keyup.enter.native="getList" @clear="getList" />
  11. </div>
  12. <div class="filter-control">
  13. <span>订单编号:</span>
  14. <el-input v-model="listQuery.orderNo" style="width:130px;" placeholder="订单编号" clearable @keyup.enter.native="getList" @clear="getList" />
  15. </div>
  16. <div class="filter-control">
  17. <span>机构名称:</span>
  18. <el-input v-model="listQuery.orderID" style="width:130px;" placeholder="机构名称" clearable @keyup.enter.native="getList" @clear="getList" />
  19. </div>
  20. <div class="filter-control">
  21. <span>退款审核状态:</span>
  22. <el-select v-model="listQuery.status" style="width:120px;" clearable @change="getList">
  23. <el-option value="" label="所有" />
  24. <el-option label="待审核" value="1" />
  25. <el-option label="审核通过" value="2" />
  26. <el-option label="审核不通过" value="3" />
  27. </el-select>
  28. </div>
  29. <div class="filter-control">
  30. <span>申请时间:</span>
  31. <el-date-picker
  32. v-model="time"
  33. type="daterange"
  34. unlink-panels
  35. range-separator="至"
  36. start-placeholder="开始日期"
  37. end-placeholder="结束日期"
  38. :picker-options="pickerOptions"
  39. @change="getList"
  40. />
  41. </div>
  42. <div class="filter-control">
  43. <el-button type="primary" icon="el-icon-search" @click="getList">查询</el-button>
  44. </div>
  45. </div>
  46. <el-table
  47. v-loading="listLoading"
  48. :data="list"
  49. element-loading-text="Loading"
  50. border
  51. fit
  52. highlight-current-row
  53. :header-cell-style="{background:'#eef1f6',color:'#606266'}"
  54. >
  55. <el-table-column label="退款编号" align="center" prop="returnedNo" />
  56. <el-table-column label="退款审核状态" align="center" prop="status" width="90">
  57. <template slot-scope="{row}">
  58. <el-tag v-if="row.status*1===1" type="warning" size="small">待审核</el-tag>
  59. <el-tag v-if="row.status*1===2" type="success" size="small">审核通过</el-tag>
  60. <el-tag v-if="row.status*1===3" type="danger" size="small">审核不通过</el-tag>
  61. </template>
  62. </el-table-column>
  63. <el-table-column label="机构" align="center" prop="userName" />
  64. <el-table-column label="订单编号(ID)" align="center" prop="orderNo">
  65. <template slot-scope="{row}">{{ row.orderNo + '(' + row.orderID + ')' }}</template>
  66. </el-table-column>
  67. <el-table-column label="退款金额" align="center" prop="refundFee">
  68. <template slot-scope="{row}">¥{{ row.refundFee | toThousandFloatFilter }}</template>
  69. </el-table-column>
  70. <el-table-column label="退款方式" align="center" prop="returnedWay" min-width="130">
  71. <template slot-scope="{row}">
  72. <template v-if="row.returnedWay*1===4">未支付无退款</template>
  73. <template v-else-if="row.returnedWay*1===1">
  74. <p v-if="row.refundBalanceFee*1 !== 0">余额账户:¥{{ row.refundBalanceFee | toThousandFloatFilter }}</p>
  75. <p v-if="row.refundOnlineFee*1 !== 0">线上退回:¥{{ row.refundOnlineFee | toThousandFloatFilter }}</p>
  76. <p v-if="row.refundOfflineFee*1 !== 0">线下转账:¥{{ row.refundOfflineFee | toThousandFloatFilter }}</p>
  77. </template>
  78. <template v-else>----</template>
  79. </template>
  80. </el-table-column>
  81. <el-table-column label="申请人" align="center" prop="applicationUserName" width="100" />
  82. <el-table-column align="center" label="申请时间" prop="returnTime">
  83. <template v-if="row.returnTime" slot-scope="{row}">
  84. <span>{{ row.returnTime | parseTime('{y}-{m}-{d} {h}:{i}:{s}') }}</span>
  85. </template>
  86. </el-table-column>
  87. <el-table-column label="审核人" align="center" prop="reviewUserName" width="100" />
  88. <el-table-column align="center" label="审核时间" prop="confirmReturnTime">
  89. <template v-if="row.confirmReturnTime" slot-scope="{row}">
  90. <span>{{ row.confirmReturnTime | parseTime('{y}-{m}-{d} {h}:{i}:{s}') }}</span>
  91. </template>
  92. </el-table-column>
  93. <el-table-column label="操作" align="center">
  94. <template slot-scope="{row}">
  95. <el-button type="primary" size="mini" @click="handleDetailes(row)">查看详情</el-button>
  96. </template>
  97. </el-table-column>
  98. </el-table>
  99. <pagination v-show="total>20" :total="total" :page.sync="listQuery.index" :limit.sync="listQuery.pageSize" @pagination="getList" />
  100. <template>
  101. <el-backtop style="right: 40px; bottom: 40px;">
  102. <i class="el-icon-upload2" />
  103. </el-backtop>
  104. </template>
  105. </div>
  106. </template>
  107. <script>
  108. import { getRefundList } from '@/api/order'
  109. import pickerOptions from '@/utils/time-picker.js'
  110. export default {
  111. data() {
  112. return {
  113. time: '',
  114. pickerOptions,
  115. list: null,
  116. listLoading: true,
  117. total: 0,
  118. searchTimeVal: '',
  119. listQuery: {
  120. index: 1,
  121. pageSize: 20,
  122. organizeId: this.$store.getters.organizeId,
  123. returnedNo: '',
  124. orderID: '',
  125. orderNo: '',
  126. userName: '',
  127. beginReturnTime: '',
  128. endReturnTime: '',
  129. status: ''
  130. }
  131. }
  132. },
  133. computed: {
  134. },
  135. created() {
  136. this.getList()
  137. },
  138. methods: {
  139. async getList() {
  140. this.listLoading = true
  141. if (this.time && this.time.length > 0) {
  142. this.listQuery.beginReturnTime = this.time[0]
  143. this.listQuery.endReturnTime = this.time[1]
  144. } else {
  145. this.listQuery.beginReturnTime = ''
  146. this.listQuery.endReturnTime = ''
  147. }
  148. try {
  149. const res = await getRefundList(this.listQuery)
  150. this.list = res.data.results
  151. this.total = res.data.totalRecord
  152. this.listLoading = false
  153. } catch (error) {
  154. console.log('error', error)
  155. this.listLoading = false
  156. }
  157. },
  158. handleFilter() {
  159. this.getList()
  160. },
  161. handleDetailes(row) {
  162. this.$router.push({ path: '/order/refund-detail', query: { id: row.id }})
  163. }
  164. }
  165. }
  166. </script>
  167. <style scoped>
  168. .el-form-item{
  169. margin-bottom: 0;
  170. }
  171. .date-box{
  172. margin-right:0;
  173. }
  174. </style>