index.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <template>
  2. <div class="app-container">
  3. <div class="el-container-md">
  4. <el-form :model="queryParams" class="live-goods-css" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
  5. <el-form-item label="商品名称" prop="keywords" >
  6. <el-input
  7. v-model="queryParams.keywords"
  8. placeholder="请输入商品名称"
  9. clearable
  10. size="small"
  11. @keyup.enter.native="handleQuery"
  12. />
  13. </el-form-item>
  14. <el-form-item label="上下架" prop="status" >
  15. <el-input
  16. v-model="queryParams.status"
  17. placeholder="请输入直播间状态"
  18. clearable
  19. size="small"
  20. @keyup.enter.native="handleQuery"
  21. />
  22. </el-form-item>
  23. <el-form-item>
  24. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  25. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  26. </el-form-item>
  27. </el-form>
  28. <!-- <div class="selection-toolbar">-->
  29. <!-- <el-checkbox :indeterminate="isIndeterminate" v-model="allChecked" @change="toggleSelectAll">-->
  30. <!-- {{ multipleSelection.length > 0 ? `已选 ${multipleSelection.length} 条` : '选中本页' }}-->
  31. <!-- </el-checkbox>-->
  32. <!-- <el-button plain size="mini" @click="handleShelf">上架</el-button>-->
  33. <!-- <el-button plain size="mini" @click="handleUnshelf">下架</el-button>-->
  34. <!-- <el-button plain size="mini" @click="handleDeleteSelected">删除</el-button>-->
  35. <!-- <el-button plain type="mini" icon="el-icon-plus" @click="handleAddLiveGoods">添加商品</el-button>-->
  36. <!-- </div>-->
  37. <el-table
  38. ref="dataTable"
  39. :data="dataList"
  40. style="width: 100%"
  41. v-loading="loading"
  42. >
  43. <!-- 题干列:显示试题的主要内容 -->
  44. <el-table-column
  45. prop="orderId"
  46. label="订单id"
  47. show-overflow-tooltip
  48. ></el-table-column>
  49. <el-table-column
  50. prop="orderCode"
  51. label="订单号"
  52. >
  53. </el-table-column>
  54. <el-table-column
  55. prop="userName"
  56. label="用户名称"
  57. ></el-table-column>
  58. <el-table-column
  59. prop="userPhone"
  60. label="用户电话"
  61. ></el-table-column>
  62. <el-table-column
  63. prop="totalPrice"
  64. label="总价格"
  65. ></el-table-column>
  66. <el-table-column
  67. prop="payPrice"
  68. label="支付价格"
  69. ></el-table-column>
  70. <el-table-column
  71. prop="isPay"
  72. label="是否支付"
  73. >
  74. <template slot-scope="scope">
  75. <el-tag type="success" v-if="scope.row.isPay == 1">已支付</el-tag>
  76. <el-tag type="info" v-if="scope.row.isPay == 0">未支付</el-tag>
  77. </template>
  78. </el-table-column>
  79. <el-table-column
  80. prop="status"
  81. label="订单状态"
  82. >
  83. <template slot-scope="scope">
  84. <el-tag v-if="scope.row.status == -1">申请退款</el-tag>
  85. <el-tag v-if="scope.row.status == -2">退货成功</el-tag>
  86. <el-tag v-if="scope.row.status == 0">已取消</el-tag>
  87. <el-tag v-if="scope.row.status == 1">待支付</el-tag>
  88. <el-tag v-if="scope.row.status == 2">代发货</el-tag>
  89. <el-tag v-if="scope.row.status == 3">待收货</el-tag>
  90. <el-tag v-if="scope.row.status == 4">待评价</el-tag>
  91. <el-tag v-if="scope.row.status == 5">已完成</el-tag>
  92. </template>
  93. </el-table-column>
  94. <el-table-column
  95. prop="companyUserId"
  96. label="销售id"
  97. ></el-table-column>
  98. <el-table-column
  99. prop="companyUserName"
  100. label="销售名称"
  101. ></el-table-column>
  102. <el-table-column
  103. prop="companyName"
  104. label="公司名称"
  105. ></el-table-column>
  106. </el-table>
  107. <!-- 分页组件:用于分页展示试题列表 -->
  108. <pagination
  109. v-show="total > 0"
  110. :total="total"
  111. :page.sync="queryParams.pageNum"
  112. :limit.sync="queryParams.pageSize"
  113. @pagination="getList"
  114. style="margin-top: 20px;"
  115. />
  116. </div>
  117. </div>
  118. </template>
  119. <script>
  120. import {liveProfitList} from '@/api/live/liveProfit';
  121. export default {
  122. data() {
  123. return {
  124. loading: true,
  125. // 查询条件
  126. queryParams: {
  127. pageNum: 1,
  128. pageSize: 10,
  129. keywords: null,
  130. status: null,
  131. liveId: null,
  132. desc: null,
  133. createTime: null,
  134. updateTime: null,
  135. },
  136. // 数据列表
  137. dataList:[],
  138. total:0,
  139. // 显示搜索条件
  140. showSearch: true,
  141. }
  142. },
  143. created(){
  144. this.getList();
  145. },
  146. mounted() {
  147. this.loading = false;
  148. },
  149. methods: {
  150. getList(){
  151. liveProfitList(this.queryParams).then(res=>{
  152. this.dataList = res.rows;
  153. this.total = res.total;
  154. })
  155. },
  156. /** 搜索按钮操作 */
  157. handleQuery() {
  158. this.queryParams.pageNum = 1;
  159. this.loading = true
  160. // listLiveGoods(this.queryParams).then(response => {
  161. // this.goodsLiveList = response.rows
  162. // this.goodsLiveTotal = response.total
  163. // this.loading = false
  164. // })
  165. },
  166. /** 重置按钮操作 */
  167. resetQuery() {
  168. this.$refs.queryForm.resetFields();
  169. },
  170. },
  171. }
  172. </script>
  173. <style scoped lang="scss">
  174. </style>