index.html 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. {include file="/shopro/common/script" /}
  2. <style>
  3. .withdraw-index .pay {
  4. width: 24px;
  5. height: 24px;
  6. margin-right: 8px;
  7. }
  8. .handle-popover .tip {
  9. margin-bottom: 16px;
  10. }
  11. .question-filled {
  12. color: var(--el-color-warning);
  13. margin-right: 4px;
  14. }
  15. </style>
  16. <div id="index" class="withdraw-index panel panel-default panel-intro" v-cloak>
  17. <el-container class="panel-block">
  18. <el-header class="sa-header">
  19. <el-tabs class="sa-tabs" v-model="state.filter.data.status" @tab-change="onChangeTab">
  20. <el-tab-pane v-for="item in type.data.status" :key="item" :label="item.name" :name="item.type">
  21. </el-tab-pane>
  22. </el-tabs>
  23. <div class="sa-title sa-flex sa-row-between">
  24. <div class="sa-title-left">
  25. <div class="left-name">提现管理</div>
  26. <sa-filter-condition v-model="state.filter" @filter-delete="onChangeFilter">
  27. </sa-filter-condition>
  28. </div>
  29. <div class="sa-title-right">
  30. <el-button class="sa-button-refresh" icon="RefreshRight" @click="getData"></el-button>
  31. <el-button class="sa-button-refresh" icon="Search" @click="onOpenFilter"></el-button>
  32. </div>
  33. </div>
  34. </el-header>
  35. <el-main class="sa-main">
  36. <el-table height="100%" class="sa-table" :data="state.data" stripe @sort-change="onChangeSort">
  37. <el-table-column prop="id" label="ID" min-width="90" sortable="custom">
  38. </el-table-column>
  39. <el-table-column label="申请用户" min-width="158">
  40. <template #default="scope">
  41. <sa-user-profile :user="scope.row.user" :id="scope.row.user_id"></sa-user-profile>
  42. </template>
  43. </el-table-column>
  44. <el-table-column label="实际到账/提现金额" min-width="166">
  45. <template #default="scope">
  46. <div class="sa-table-line-1">
  47. {{ scope.row.paid_fee }}/{{ scope.row.amount || '-' }}元
  48. </div>
  49. </template>
  50. </el-table-column>
  51. <el-table-column label="费率/手续费" min-width="132">
  52. <template #default="scope">
  53. <div class="sa-table-line-1">
  54. {{ scope.row.charge_rate_format }}/{{ scope.row.charge_fee || '-' }}元
  55. </div>
  56. </template>
  57. </el-table-column>
  58. <el-table-column label="提现方式" min-width="130">
  59. <template #default="scope">
  60. <div v-if="scope.row.withdraw_type" class="sa-flex">
  61. <img class="pay" :src="`/assets/addons/shopro/img/${scope.row.withdraw_type}.png`" />
  62. <div>{{scope.row.withdraw_type_text}}</div>
  63. </div>
  64. <div v-else>-</div>
  65. </template>
  66. </el-table-column>
  67. <el-table-column label="打款信息" min-width="240">
  68. <template #default="scope">
  69. <div class="sa-flex-col sa-col-top">
  70. <div v-for="(value, key) in scope.row.withdraw_info" :key="value" class="sa-flex">
  71. <div class="sa-table-line-1"> {{ key }}:{{ value }} </div>
  72. <el-icon class="copy-document" @click="onClipboard(value)">
  73. <copy-document />
  74. </el-icon>
  75. </div>
  76. </div>
  77. </template>
  78. </el-table-column>
  79. <el-table-column label="申请时间" width="172">
  80. <template #default="scope">
  81. {{ scope.row.createtime || '-' }}
  82. </template>
  83. </el-table-column>
  84. <el-table-column label="上次操作时间" width="172">
  85. <template #default="scope">
  86. {{ scope.row.updatetime || '-' }}
  87. </template>
  88. </el-table-column>
  89. <el-table-column label="状态" min-width="80">
  90. <template #default="scope">
  91. <div :class="`${state.statusStyle[scope.row.status]}`">
  92. {{ scope.row.status_text }}
  93. </div>
  94. </template>
  95. </el-table-column>
  96. <el-table-column fixed="right" label="操作" min-width="200">
  97. <template #default="scope">
  98. {if $auth->check('shopro/withdraw/handle')}
  99. <template v-if="scope.row.status == 0">
  100. <el-popover popper-class="handle-popover" v-model:visible="handlePopover.flag[scope.$index]"
  101. :width="244" trigger="click">
  102. <div class="tip sa-flex">
  103. <el-icon class="question-filled sa-color--warning">
  104. <question-filled />
  105. </el-icon>
  106. <div>您是否同意用户的提现申请?</div>
  107. </div>
  108. <div>
  109. <el-button @click="handlePopover.flag[scope.$index] = false" size="small">取消
  110. </el-button>
  111. <el-button @click="onAgree(scope.row.id, scope.$index, 'agree')" size="small">同意
  112. </el-button>
  113. <el-button type="primary" size="small"
  114. @click="onAgree(scope.row.id, scope.$index, 'agree&withdraw')">同意&打款</el-button>
  115. </div>
  116. <template #reference>
  117. <el-button type="primary" link>同意</el-button>
  118. </template>
  119. </el-popover>
  120. <el-button type="danger" link @click="onRefuse(scope.row.id)">拒绝</el-button>
  121. </template>
  122. <el-popconfirm v-if="scope.row.status == 1" width="fit-content" confirm-button-text="同意"
  123. cancel-button-text="取消" title="您确定给用户立即打款吗?"
  124. @confirm="onAgree(scope.row.id, scope.$index, 'withdraw')">
  125. <template #reference>
  126. <el-button type="primary" link>立即打款</el-button>
  127. </template>
  128. </el-popconfirm>
  129. {/if}
  130. {if $auth->check('shopro/withdraw/log')}
  131. <el-button type="primary" link @click="onLog(scope.row.id)">日志</el-button>
  132. {/if}
  133. </template>
  134. </el-table-column>
  135. </el-table>
  136. </el-main>
  137. <el-footer class="sa-footer sa-flex sa-row-right">
  138. <sa-pagination v-model="pagination" @pagination-change="getData"></sa-pagination>
  139. </el-footer>
  140. </el-container>
  141. <sa-filter v-model="state.filter" @filter-change="onChangeFilter"></sa-filter>
  142. </div>