sellShopList.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <template>
  2. <div>
  3. <el-dialog
  4. width="1000px"
  5. title="购买商品"
  6. :visible.sync="lookVisible"
  7. :before-close="onClose"
  8. append-to-body
  9. >
  10. <div>
  11. <descriptions :column="2">
  12. <descriptions-item label="购买人数:">{{
  13. statInfo.buyNum | moneyFormat
  14. }}</descriptions-item>
  15. <descriptions-item label="销售总额:">{{
  16. statInfo.totalAmount
  17. }}</descriptions-item>
  18. </descriptions>
  19. <el-alert
  20. title="直播商品"
  21. :closable="false"
  22. type="info"
  23. style="margin: 20px 0"
  24. ></el-alert>
  25. <el-form :inline="true" :model="searchForm">
  26. <el-form-item>
  27. <el-input
  28. v-model.trim="searchForm.search"
  29. clearable
  30. @keyup.enter.native="search"
  31. placeholder="学员编号/姓名/手机号"
  32. ></el-input>
  33. </el-form-item>
  34. <el-form-item>
  35. <el-button @click="search" type="primary">搜索</el-button>
  36. <el-button @click="onReSet" type="danger">重置</el-button>
  37. </el-form-item>
  38. </el-form>
  39. <div class="tableWrap">
  40. <el-table
  41. style="width: 100%"
  42. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  43. :data="tableList"
  44. ref="multipleSelection"
  45. >
  46. <el-table-column
  47. align="center"
  48. prop="userId"
  49. label="用户编号"
  50. ></el-table-column>
  51. <el-table-column
  52. align="center"
  53. prop="userName"
  54. label="用户姓名"
  55. ></el-table-column>
  56. <el-table-column
  57. align="center"
  58. prop="phone"
  59. label="手机号"
  60. ></el-table-column>
  61. <el-table-column
  62. align="center"
  63. prop="goodsName"
  64. label="商品名称"
  65. ></el-table-column>
  66. <el-table-column
  67. align="center"
  68. prop="payTime"
  69. label="支付时间"
  70. ></el-table-column>
  71. <el-table-column align="center" prop="actualPrice" label="现金支付">
  72. <template slot-scope="scope">
  73. <div>
  74. {{ scope.row.actualPrice | moneyFormat(true) }}
  75. </div>
  76. </template>
  77. </el-table-column>
  78. <el-table-column align="center" prop="balance" label="余额支付">
  79. <template slot-scope="scope">
  80. <div>
  81. {{ scope.row.balance | moneyFormat(true) }}
  82. </div>
  83. </template>
  84. </el-table-column>
  85. <el-table-column align="center" prop="balance" label="支付总金额">
  86. <template slot-scope="scope">
  87. <div>
  88. {{ scope.row.expectPrice | moneyFormat(true) }}
  89. </div>
  90. </template>
  91. </el-table-column>
  92. </el-table>
  93. <pagination
  94. sync
  95. :total.sync="rules.total"
  96. :page.sync="rules.page"
  97. :limit.sync="rules.limit"
  98. :page-sizes="rules.page_size"
  99. @pagination="getList"
  100. />
  101. </div>
  102. </div>
  103. <div slot="footer" class="dialog-footer">
  104. <el-button type="primary" @click="onClose">确 定</el-button>
  105. </div>
  106. </el-dialog>
  107. </div>
  108. </template>
  109. <script>
  110. import { getGoodsOrderList } from "../api";
  111. import { getLiveGoodsMapperList } from "@/views/liveShopManger/api";
  112. import pagination from "@/components/Pagination/index";
  113. export default {
  114. name: "eidtPostMsg",
  115. components: { pagination },
  116. data() {
  117. return {
  118. searchForm: {
  119. search: "",
  120. },
  121. tableList: [],
  122. organList: [],
  123. rules: {
  124. // 分页规则
  125. limit: 10, // 限制显示条数
  126. page: 1, // 当前页
  127. total: 0, // 总条数
  128. page_size: [10, 20, 40, 50], // 选择限制显示条数
  129. },
  130. addMuiscVisible: false,
  131. multipleSelection: [],
  132. chioseIdList: [],
  133. isNewPage: false,
  134. lookVisible: false,
  135. activeRow: { sendFlag: false },
  136. statInfo: {
  137. totalAmount: 0,
  138. buyNum: 0,
  139. },
  140. };
  141. },
  142. mounted() {},
  143. methods: {
  144. async getList() {
  145. try {
  146. const res = await getGoodsOrderList({
  147. ...this.searchForm,
  148. page: this.rules.page,
  149. rows: this.rules.limit,
  150. roomUid: this.activeRow.roomUid,
  151. });
  152. this.tableList = res.data.rows;
  153. this.rules.total = res.data.total;
  154. if (res.data.statInfo) {
  155. this.statInfo = { ...res.data.statInfo };
  156. }
  157. } catch (e) {
  158. console.log(e);
  159. }
  160. },
  161. search() {
  162. this.rules.page = 1;
  163. this.getList();
  164. },
  165. onReSet() {
  166. this.searchForm.search = "";
  167. this.search();
  168. },
  169. onClose() {
  170. this.lookVisible = false;
  171. },
  172. openDioag(row) {
  173. this.activeRow = row;
  174. this.lookVisible = true;
  175. this.getList();
  176. },
  177. },
  178. };
  179. </script>
  180. <style lang="scss" scoped>
  181. .w100 {
  182. width: 100%;
  183. }
  184. .btnWrap {
  185. justify-content: flex-start;
  186. }
  187. </style>