detail.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. {include file="/shopro/common/script" /}
  2. <style>
  3. .groupon-detail .goods-item .goods-title {
  4. color: var(--el-color-primary);
  5. }
  6. .groupon-detail .goods-item .goods-num {
  7. font-size: 12px;
  8. }
  9. </style>
  10. <div id="detail" class="groupon-detail" v-cloak>
  11. <el-container class="panel-block">
  12. <el-main>
  13. <el-table class="sa-table" :data="[{}]" stripe>
  14. <el-table-column label="拼团商品" min-width="490">
  15. <template #default>
  16. <div v-if="state.data.goods" class="goods-item sa-flex">
  17. <sa-image class="mr-2" :url="state.data.goods.image" size="40"></sa-image>
  18. <div>
  19. <div class="goods-title sa-table-line-1"
  20. @click="onOpenGoodsDetail(state.data.goods_id)">
  21. {{ state.data.goods.title || '-' }}
  22. </div>
  23. <div class="goods-num"> 成团人数:{{ state.data.num }} </div>
  24. </div>
  25. </div>
  26. <div v-else>{{state.data.goods_id}}</div>
  27. </template>
  28. </el-table-column>
  29. <el-table-column label="开团时间" width="172">
  30. <template #default>
  31. {{ state.data.createtime || '-' }}
  32. </template>
  33. </el-table-column>
  34. <el-table-column label="拼团状态" min-width="80">
  35. <template #default>
  36. <div :class="`sa-color--${state.statusClass[state.data.status]}`">
  37. {{ state.data.status_text || '-' }}
  38. </div>
  39. </template>
  40. </el-table-column>
  41. </el-table>
  42. <el-table class="sa-table" :data="state.data.groupon_logs" stripe>
  43. <el-table-column label="身份" min-width="80">
  44. <template #default="scope">
  45. <span v-if="scope.row.is_leader == 1">团长</span>
  46. <span v-else>团员</span>
  47. </template>
  48. </el-table-column>
  49. <el-table-column label="头像" width="64">
  50. <template #default="scope">
  51. <sa-image :url="scope.row.avatar" size="32" radius="16"></sa-image>
  52. </template>
  53. </el-table-column>
  54. <el-table-column label="昵称" width="258">
  55. <template #default="scope">
  56. <sa-user-profile :user="scope.row" :id="scope.row.user_id" :isavatar="false"
  57. :ishover="!scope.row.is_fictitious"></sa-user-profile>
  58. </template>
  59. </el-table-column>
  60. <el-table-column label="参团时间" width="172">
  61. <template #default="scope">
  62. {{ scope.row.createtime || '-' }}
  63. </template>
  64. </el-table-column>
  65. <el-table-column label="操作" min-width="170">
  66. <template #default="scope">
  67. <template v-if="scope.row.is_temp">
  68. <el-button type="primary" link @click="onConfirm(scope.row)">确定
  69. </el-button>
  70. <el-button type="danger" link @click="onCancel(scope.$index)">取消
  71. </el-button>
  72. </template>
  73. <span v-if="scope.row.is_fictitious == 1 && !scope.row.is_temp">虚拟</span>
  74. </template>
  75. </el-table-column>
  76. </el-table>
  77. </el-main>
  78. <el-footer v-if="state.data.status == 'ing'" class="sa-footer--submit sa-flex sa-row-between">
  79. <el-popconfirm width="fit-content" confirm-button-text="确认" cancel-button-text="取消" title="确定要解散拼团吗?"
  80. @confirm="onInvalid">
  81. <template #reference>
  82. {if $auth->check('shopro/activity/groupon/invalid')}
  83. <el-button>解散拼团</el-button>
  84. {/if}
  85. </template>
  86. </el-popconfirm>
  87. {if $auth->check('shopro/activity/groupon/addUser')}
  88. <el-button type="primary" :disabled="!(state.data.groupon_logs.length<state.data.num)" @click="onAddUser">
  89. 添加虚拟人数</el-button>
  90. {/if}
  91. </el-footer>
  92. </el-container>
  93. </div>