Quellcode durchsuchen

直播间商品订单

1
mo vor 3 Jahren
Ursprung
Commit
4eb15818a1

+ 10 - 0
src/views/liveClassManager/api.js

@@ -198,3 +198,13 @@ export const deteleBlackList= data => {
     data,
   })
 }
+
+// 商品销售详情
+export const getGoodsOrderList= data => {
+  return request({
+    url: '/api-web/imLiveBroadcastRoom/queryLiveRoomGoodsOrderList',
+    method: 'get',
+    data,
+    params: data
+  })
+}

+ 16 - 8
src/views/liveClassManager/index.vue

@@ -188,13 +188,16 @@
                     >删除</el-button
                   >
                 </auth>
-                <auth auths="/liveBlackList">
-                  <el-button
-                    type="text"
-                    @click="gotoBlacklist(scope.row)"
+                <auth auths="imLiveBroadcastRoom/queryLiveRoomGoodsOrderList">
+                  <el-button type="text" @click="gotoBlacklist(scope.row)"
                     >黑名单</el-button
                   >
                 </auth>
+                <auth auths="/liveBlackList">
+                  <el-button type="text" @click="gotoBuylist(scope.row)"
+                    >购买商品</el-button
+                  >
+                </auth>
               </div>
             </template>
           </el-table-column>
@@ -220,6 +223,7 @@
     </el-dialog>
     <popularizeRoom @getList="getList" ref="popularizeRoom" />
     <reservationDetail ref="reservationDetail" />
+    <sellShopList ref="sellShopList" />
   </div>
 </template>
 
@@ -232,6 +236,7 @@ import shareDetail from "./modals/shareDetail.vue";
 import load from "@/utils/loading";
 import popularizeRoom from "./modals/popularizeRoom.vue";
 import reservationDetail from "./modals/reservationDetail.vue";
+import sellShopList from './modals/sellShopList'
 import {
   getLiveBroadcastList,
   delLiveBroadcast,
@@ -239,7 +244,7 @@ import {
   opsPopularize,
 } from "./api";
 export default {
-  components: { pagination, shareDetail, popularizeRoom, reservationDetail },
+  components: { pagination, shareDetail, popularizeRoom, reservationDetail,sellShopList },
   data() {
     return {
       searchForm: {
@@ -394,11 +399,14 @@ export default {
     lookReservationDetail(row) {
       this.$refs.reservationDetail.openDioag(row);
     },
-    gotoBlacklist(row){
-       this.$router.push({
+    gotoBlacklist(row) {
+      this.$router.push({
         path: "/business/liveBlackList",
-        query: { roomUid: row.roomUid, name:row.roomTitle},
+        query: { roomUid: row.roomUid, name: row.roomTitle },
       });
+    },
+    gotoBuylist(row){
+      this.$refs.sellShopList.openDioag(row)
     }
   },
 };

+ 189 - 0
src/views/liveClassManager/modals/sellShopList.vue

@@ -0,0 +1,189 @@
+<template>
+  <div>
+    <el-dialog
+      width="1000px"
+      title="购买商品"
+      :visible.sync="lookVisible"
+      :before-close="onClose"
+      append-to-body
+    >
+      <div>
+        <descriptions :column="2">
+          <descriptions-item label="购买人数:">{{
+            statInfo.totalAmount
+          }}</descriptions-item>
+          <descriptions-item label="销售总额:">{{
+            statInfo.buyNum | moneyFormat
+          }}</descriptions-item>
+        </descriptions>
+        <el-alert
+          title="直播商品"
+          :closable="false"
+          type="info"
+          style="margin: 20px 0"
+        ></el-alert>
+        <el-form :inline="true" :model="searchForm">
+          <el-form-item>
+            <el-input
+              v-model.trim="searchForm.search"
+              clearable
+              @keyup.enter.native="search"
+              placeholder="学员编号/姓名/手机号"
+            ></el-input>
+          </el-form-item>
+          <el-form-item>
+            <el-button @click="search" type="primary">搜索</el-button>
+            <el-button @click="onReSet" type="danger">重置</el-button>
+          </el-form-item>
+        </el-form>
+        <div class="tableWrap">
+          <el-table
+            style="width: 100%"
+            :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+            :data="tableList"
+            ref="multipleSelection"
+          >
+            <el-table-column
+              align="center"
+              prop="userId"
+              label="用户编号"
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              prop="userName"
+              label="用户姓名"
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              prop="phone"
+              label="手机号"
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              prop="goodsName"
+              label="商品名称"
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              prop="payTime"
+              label="支付时间"
+            ></el-table-column>
+            <el-table-column align="center" prop="actualPrice" label="现金支付">
+              <template slot-scope="scope">
+                <div>
+                  {{ scope.row.actualPrice | moneyFormat(true) }}
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column align="center" prop="balance" label="余额支付">
+              <template slot-scope="scope">
+                <div>
+                  {{ scope.row.balance | moneyFormat(true) }}
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column align="center" prop="balance" label="支付总金额">
+              <template slot-scope="scope">
+                <div>
+                  {{ scope.row.expectPrice | moneyFormat(true) }}
+                </div>
+              </template>
+            </el-table-column>
+          </el-table>
+          <pagination
+            sync
+            :total.sync="rules.total"
+            :page.sync="rules.page"
+            :limit.sync="rules.limit"
+            :page-sizes="rules.page_size"
+            @pagination="getList"
+          />
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="onClose">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { getGoodsOrderList } from "../api";
+import { getLiveGoodsMapperList } from "@/views/liveShopManger/api";
+import pagination from "@/components/Pagination/index";
+export default {
+  name: "eidtPostMsg",
+  components: { pagination },
+  data() {
+    return {
+      searchForm: {
+        search: "",
+      },
+      tableList: [],
+      organList: [],
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+      addMuiscVisible: false,
+      multipleSelection: [],
+      chioseIdList: [],
+      isNewPage: false,
+      lookVisible: false,
+      activeRow: { sendFlag: false },
+      statInfo: {
+        totalAmount: 0,
+        buyNum: 0,
+      },
+    };
+  },
+
+  mounted() {},
+  methods: {
+    async getList() {
+      try {
+        const res = await getGoodsOrderList({
+          ...this.searchForm,
+          page: this.rules.page,
+          rows: this.rules.limit,
+          roomUid: this.activeRow.roomUid,
+        });
+        this.tableList = res.data.rows;
+        this.rules.total = res.data.total;
+        if (res.data.statInfo) {
+          this.statInfo = { ...res.data.statInfo };
+        }
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    search() {
+      this.rules.page = 1;
+      this.getList();
+    },
+    onReSet() {
+      this.searchForm.search = "";
+      this.search();
+    },
+
+    onClose() {
+      this.lookVisible = false;
+    },
+    openDioag(row) {
+      this.activeRow = row;
+      this.lookVisible = true;
+      this.getList();
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.w100 {
+  width: 100%;
+}
+.btnWrap {
+  justify-content: flex-start;
+}
+</style>