recyclebin.html 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. {include file="/shopro/common/script" /}
  2. <div id="recyclebin" class="coupon-recyclebin" v-cloak>
  3. <el-container class="panel-block">
  4. <el-main>
  5. <el-table height="100%" class="sa-table" :data="state.data" stripe @selection-change="onChangeSelection"
  6. @sort-change="onChangeSort">
  7. <el-table-column type="selection" width="48" align="center"></el-table-column>
  8. <el-table-column prop="id" label="ID" min-width="90" sortable="custom"></el-table-column>
  9. <el-table-column label="名称" min-width="100">
  10. <template #default="scope">
  11. <div class="sa-table-line-1">{{ scope.row.name || '-' }}</div>
  12. </template>
  13. </el-table-column>
  14. <el-table-column prop="deletetime" label="删除时间" min-width="172" sortable="custom"></el-table-column>
  15. <el-table-column fixed="right" label="操作" min-width="120">
  16. <template #default="scope">
  17. {if $auth->check('shopro/coupon/restore')}
  18. <el-button type="primary" link @click="onRestore(scope.row.id)">还原</el-button>
  19. {/if}
  20. <el-popconfirm width="fit-content" confirm-button-text="确认" cancel-button-text="取消"
  21. title="确认销毁这条记录?" @confirm="onDestroy(scope.row.id)">
  22. <template #reference>
  23. {if $auth->check('shopro/coupon/destroy')}
  24. <el-button type="danger" link>销毁</el-button>
  25. {/if}
  26. </template>
  27. </el-popconfirm>
  28. </template>
  29. </el-table-column>
  30. </el-table>
  31. </el-main>
  32. <el-footer class="sa-footer sa-flex sa-row-between sa-flex-wrap">
  33. <div class="sa-batch sa-flex">
  34. <div class="tip">
  35. 已选择 <span>{{batchHandle.data.length}}</span> 项</div>
  36. <div class="sa-flex">
  37. {if $auth->check('shopro/coupon/restore')}
  38. <el-button type="primary" :disabled="!batchHandle.data.length" @click="onBatchHandle('restore')">还原
  39. </el-button>
  40. {/if}
  41. {if $auth->check('shopro/coupon/destroy')}
  42. <el-button type="danger" :disabled="!batchHandle.data.length" @click="onBatchHandle('destroy')">销毁
  43. </el-button>
  44. {/if}
  45. {if $auth->check('shopro/coupon/destroy')}
  46. <el-button type="danger" @click="onBatchHandle('all')">清空回收站</el-button>
  47. {/if}
  48. </div>
  49. </div>
  50. <sa-pagination class="is-ellipsis" v-model="pagination" @pagination-change="getData"></sa-pagination>
  51. </el-footer>
  52. </el-container>
  53. </div>