index.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  1. <link rel="stylesheet" href="__CDN__/assets/addons/shopro/libs/element/element.css">
  2. <style>
  3. #groupon-index {
  4. background: #fff;
  5. padding: 0 20px 30px;
  6. font-size: 14px;
  7. font-family: Source Han Sans SC;
  8. font-weight: 500;
  9. color: #666;
  10. }
  11. label {
  12. margin-bottom: 0;
  13. }
  14. .display-flex {
  15. display: flex;
  16. align-items: center;
  17. }
  18. .cursor-pointer {
  19. cursor: pointer;
  20. color: #7536d0;
  21. }
  22. .groupon-title {
  23. height: 50px;
  24. justify-content: space-between;
  25. margin-bottom: 10px;
  26. }
  27. .groupon-titles {
  28. font-weight: 600;
  29. color: #444;
  30. }
  31. .groupon-search {
  32. width: 236px;
  33. }
  34. .select-con {
  35. display: flex;
  36. justify-content: space-between;
  37. align-items: center;
  38. margin-bottom: 14px;
  39. }
  40. .select-item {
  41. margin-right: 14px;
  42. }
  43. .el-input {
  44. width: 236px;
  45. }
  46. .el-select .el-input__inner {
  47. width: 152px;
  48. }
  49. .el-radio-button__orig-radio:checked+.el-radio-button__inner {
  50. background-color: #7536d0;
  51. border-color: #7536d0;
  52. -webkit-box-shadow: -1px 0 0 0 #7536d0;
  53. box-shadow: -1px 0 0 0 #7536d0;
  54. }
  55. .el-radio-button__inner:hover {
  56. color: #666;
  57. }
  58. /* table */
  59. .el-table,
  60. .el-table thead {
  61. color: #444;
  62. }
  63. .el-table,
  64. .el-table thead .cell {
  65. font-weight: 500;
  66. }
  67. .el-table th {
  68. background: #F9F9F9;
  69. padding: 5px 0;
  70. }
  71. .el-table th {
  72. border-right: none;
  73. }
  74. .el-table_1_column_8.is-leaf,
  75. .el-table_1_column_8,
  76. .el-table_2_column_12.is-leaf,
  77. .el-table_2_column_12,
  78. .el-table_3_column_17.is-leaf,
  79. .el-table_3_column_17 {
  80. border-right: 1px solid #EBEEF5 !important;
  81. }
  82. .cell {
  83. text-align: center;
  84. }
  85. .el-select .el-input {
  86. width: 152px;
  87. }
  88. .team-img {
  89. width: 30px;
  90. height: 30px;
  91. margin-right: 14px;
  92. }
  93. .goods-title {
  94. overflow: hidden;
  95. text-overflow: ellipsis;
  96. white-space: nowrap;
  97. width: 294px;
  98. text-align: left;
  99. }
  100. .teamer-avatar {
  101. width: 34px;
  102. height: 34px;
  103. border-radius: 50%;
  104. margin-right: 6px;
  105. }
  106. .teamer-avatar-num {
  107. width: 34px;
  108. height: 34px;
  109. background: #A17BDF;
  110. border-radius: 50%;
  111. font-size: 14px;
  112. line-height: 34px;
  113. text-align: center;
  114. color: #fff;
  115. }
  116. .el-pager li.active,
  117. .el-pager li:hover {
  118. color: #7536d0;
  119. }
  120. #groupon-detail {
  121. font-size: 14px;
  122. font-family: Source Han Sans SC;
  123. color: #444;
  124. }
  125. .groupon-good {
  126. margin-bottom: 12px;
  127. }
  128. .good-item {
  129. display: flex;
  130. }
  131. .good-item-img {
  132. width: 50px;
  133. height: 50px;
  134. margin-right: 12px;
  135. }
  136. .goods-title-ellipsis {
  137. overflow: hidden;
  138. text-overflow: ellipsis;
  139. white-space: nowrap;
  140. width: 320px;
  141. }
  142. .good-num {
  143. color: #999;
  144. text-align: left;
  145. }
  146. .team-img {
  147. width: 36px;
  148. height: 36px;
  149. border-radius: 50%;
  150. position: relative;
  151. }
  152. .refresh-btn {
  153. font-size: 14px;
  154. color: #999;
  155. position: absolute;
  156. left: 86px;
  157. top: 22px;
  158. }
  159. .btn-box {
  160. display: flex;
  161. align-items: center;
  162. justify-content: center;
  163. padding: 20px;
  164. }
  165. .teamed-btn {
  166. width: 110px;
  167. height: 30px;
  168. border: 1px solid #7943D2;
  169. border-radius: 4px;
  170. line-height: 30px;
  171. text-align: center;
  172. color: #7943D2;
  173. margin-right: 30px;
  174. cursor: pointer;
  175. }
  176. .dismiss-btn {
  177. width: 100px;
  178. height: 30px;
  179. line-height: 30px;
  180. text-align: center;
  181. border: 1px solid #F57272;
  182. border-radius: 4px;
  183. color: #F57272;
  184. cursor: pointer;
  185. }
  186. .fictitious-define {
  187. color: #7943D2;
  188. cursor: pointer;
  189. }
  190. .fictitious-cancel {
  191. color: #F57272;
  192. margin-left: 10px;
  193. cursor: pointer;
  194. }
  195. .el-table th {
  196. background: #F9F9F9;
  197. padding: 5px 0;
  198. }
  199. .dialogDetail .el-table td {
  200. border-right: none
  201. }
  202. .dialogDetail .el-dialog {
  203. width: 800px;
  204. }
  205. /* el-dialog */
  206. .el-radio-button__inner {
  207. font-size: 12px;
  208. padding: 9px 20px;
  209. ;
  210. }
  211. .el-input__inner {
  212. font-size: 12px;
  213. height: 32px;
  214. line-height: 32px;
  215. }
  216. .el-input__icon {
  217. line-height: 32px;
  218. }
  219. .margin-right-5 {
  220. margin-right: 5px;
  221. }
  222. .el-dialog__title {
  223. font-size: 14px;
  224. }
  225. .el-dialog .el-input__inner {
  226. height: 34px;
  227. line-height: 34px;
  228. font-size: 13px;
  229. }
  230. .el-form-item__label,
  231. .el-radio__label,
  232. .el-form-item__content,
  233. .el-select-dropdown__item,
  234. .el-table,
  235. .el-dialog__body {
  236. font-size: 13px;
  237. }
  238. .el-form-item {
  239. margin-bottom: 10px;
  240. }
  241. .el-table__fixed-right::before,
  242. .el-table__fixed::before {
  243. height: 0 !important;
  244. }
  245. .page-container {
  246. justify-content: flex-end;
  247. margin-top: 30px;
  248. }
  249. [v-cloak] {
  250. display: none;
  251. }
  252. </style>
  253. <script src="__CDN__/assets/addons/shopro/libs/vue.js"></script>
  254. <script src="__CDN__/assets/addons/shopro/libs/element/element.js"></script>
  255. <script src="__CDN__/assets/addons/shopro/libs/moment.js"></script>
  256. <div id="groupon-index" v-cloak>
  257. <div class="groupon-title display-flex">
  258. <div class="groupon-titles">拼团列表</div>
  259. <div class="groupon-search">
  260. <el-input placeholder="请输入关键字" suffix-icon="el-icon-search" v-model="searchKey"
  261. @keyup.enter.native="callSearch(event)">
  262. </el-input>
  263. </div>
  264. </div>
  265. <div class="groupon-con">
  266. <div class="select-con">
  267. <div class="display-flex">
  268. <el-select class="select-item" v-model="grouponName" placeholder="请选择" @change="selectChange">
  269. <el-option v-for="item in grouponOptions" :key="item.value" :label="item.label" :value="item.value">
  270. </el-option>
  271. </el-select>
  272. <el-radio-group v-model="statusType">
  273. <el-radio-button label="all">全部</el-radio-button>
  274. <el-radio-button label="ing">拼团中</el-radio-button>
  275. <el-radio-button label="finish">已成团</el-radio-button>
  276. <el-radio-button label="invalid">解散&退款</el-radio-button>
  277. </el-radio-group>
  278. </div>
  279. </div>
  280. <div>
  281. <el-table :data="grouponData" border style="width: 100%" ref="grouponData">
  282. <el-table-column prop="id" label="ID" width="80">
  283. </el-table-column>
  284. <el-table-column label="拼团商品信息" width="400">
  285. <template slot-scope="scope">
  286. <div class="display-flex">
  287. <img class="team-img" :src="Fast.api.cdnurl(scope.row.goods_image)">
  288. <div class="goods-title">{{scope.row.goods_title}}</div>
  289. </div>
  290. </template>
  291. </el-table-column>
  292. <el-table-column prop="createtime" label="开团时间" width="180">
  293. <template slot-scope="scope">
  294. <span>{{moment(scope.row.createtime*1000).format("YYYY-MM-DD HH:mm:ss")}}</span>
  295. </template>
  296. </el-table-column>
  297. <el-table-column prop="user_nickname" label="团长" width="120">
  298. <template slot-scope="scope">
  299. <span>{{scope.row.user_nickname}}</span>
  300. </template>
  301. </el-table-column>
  302. <el-table-column prop="user_avatar" label="参团人" width="420">
  303. <template slot-scope="scope">
  304. <div class="display-flex" style="justify-content: center;">
  305. <img v-for="i in scope.row.arr" class="teamer-avatar" :src="Fast.api.cdnurl(i.user_avatar)">
  306. <!-- <div v-if="scope.row.arr" class="teamer-avatar-num">10</div> -->
  307. </div>
  308. </template>
  309. </el-table-column>
  310. <el-table-column prop="countDown" label="组团有效时间" width="180">
  311. <template slot-scope="scope">
  312. <span v-if="scope.row.status=='ing'" style="color: #FF4732;">{{scope.row.countDown}}</span>
  313. <span v-else>-</span>
  314. </template>
  315. </el-table-column>
  316. <el-table-column prop="status_text" label="拼团状态" width="115">
  317. </el-table-column>
  318. <el-table-column prop="name" label="操作" min-width="100" fixed="right">
  319. <template slot-scope="scope">
  320. <span class="cursor-pointer" @click="goDetail(scope.row.id,scope.row)">查看详情</span>
  321. </template>
  322. </el-table-column>
  323. </el-table>
  324. </div>
  325. </div>
  326. <div class="page-container display-flex">
  327. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
  328. :page-sizes="[10, 20, 30, 40]" :page-size="10" layout="total, sizes, prev, pager, next, jumper"
  329. :total="totalPage">
  330. </el-pagination>
  331. </div>
  332. <div class="dialogDetail">
  333. <el-dialog title="拼团详情" :visible.sync="dialogTeamDetail" width="800" :before-close="handleTeamDetailClose">
  334. <div>
  335. <div class="groupon-good">
  336. <el-table :data="grouponGoodsData" style="width: 100%" border>
  337. <el-table-column label="拼团商品">
  338. <template slot-scope="scope">
  339. <div class="good-item">
  340. <img class="good-item-img" :src="Fast.api.cdnurl(scope.row.goods_image)">
  341. <div>
  342. <div class="goods-title-ellipsis">{{scope.row.goods_title}}</div>
  343. <div class="good-num">数量:{{scope.row.current_num}}</div>
  344. </div>
  345. </div>
  346. </template>
  347. </el-table-column>
  348. <el-table-column prop="createtime" label="开团时间" width="160">
  349. <template slot-scope="scope">
  350. <span>{{moment(scope.row.createtime*1000).format("YYYY-MM-DD HH:mm:ss")}}</span>
  351. </template>
  352. </el-table-column>
  353. <el-table-column prop="num" label="成团人数" width="88">
  354. </el-table-column>
  355. <el-table-column prop="status_text" label="状态" width="86">
  356. </el-table-column>
  357. </el-table>
  358. </div>
  359. <div class="groupon-team">
  360. <el-table :data="grouponTeamList" style="width: 100%" border>
  361. <el-table-column prop="is_leader" label="身份" width="100">
  362. <template slot-scope="scope">
  363. <span v-if="scope.row.is_leader">团长</span>
  364. <span v-if="!scope.row.is_leader">团员</span>
  365. </template>
  366. </el-table-column>
  367. <el-table-column prop="avatar" label="头像" width="110">
  368. <template slot-scope="scope">
  369. <img class="team-img" v-if="scope.row.user_avatar"
  370. :src="Fast.api.cdnurl(scope.row.user_avatar)">
  371. <i v-if="scope.row.is_define" class="el-icon-refresh refresh-btn"
  372. @click="refreshTeamer(scope.$index)"></i>
  373. </template>
  374. </el-table-column>
  375. <el-table-column prop="user_nickname" label="昵称" width="218">
  376. </el-table-column>
  377. <el-table-column prop="createtime" label="参团时间">
  378. <template slot-scope="scope">
  379. <span>{{moment(scope.row.createtime*1000).format("YYYY-MM-DD HH:mm:ss")}}</span>
  380. </template>
  381. </el-table-column>
  382. <el-table-column label="操作" width="100">
  383. <template slot-scope="scope">
  384. <span v-if="scope.row.is_define" class="fictitious-define"
  385. @click="defineTeamer(scope.$index,scope.row)">确定</span>
  386. <span v-if="scope.row.is_define" class="fictitious-cancel"
  387. @click="cancelTeamer(scope.$index)">取消</span>
  388. <span v-if="!scope.row.is_define && scope.row.is_fictitious">虚拟</span>
  389. </template>
  390. </el-table-column>
  391. </el-table>
  392. </div>
  393. <div class="btn-box"
  394. v-if="(grouponGoodsData[0]?grouponGoodsData[0].num:null) > is_define_grouponTeamListLeng && (grouponGoodsData[0]?grouponGoodsData[0].status:null)=='ing'">
  395. <div class="teamed-btn" @click="refreshTeamer(null)">添加虚拟人数</div>
  396. <div class="dismiss-btn" @click="dismissTeam">解散&拼团</div>
  397. </div>
  398. </div>
  399. <!-- <span slot="footer" class="dialog-footer">
  400. <el-button @click="dialogVisible = false">取 消</el-button>
  401. <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
  402. </span> -->
  403. </el-dialog>
  404. </div>
  405. </div>