Browse Source

Merge branch '03/03GRADE' into 11/24SAAS

mo 3 years ago
parent
commit
4e58c219d1

+ 9 - 1
src/constant/index.js

@@ -484,7 +484,15 @@ export const catType = {
   MUSIC:'乐团群',
   CLASS:'班级群',
   REPERTOIRE_PLAY:'曲目演奏课',
-  TRAINING:'训练营'
+  TRAINING:'训练营',
+  VIP:'VIP课群'
+}
+export const catDotType = {
+  MUSIC:'乐团',
+  CLASS:'班级',
+  REPERTOIRE_PLAY:'演奏',
+  TRAINING:'训练',
+  VIP:'VIP'
 }
 
 

+ 4 - 0
src/utils/vueFilter.js

@@ -853,6 +853,10 @@ Vue.filter("catType", value => {
   return constant.catType[value];
 });
 
+Vue.filter("catDotType", value => {
+  return constant.catDotType[value];
+});
+
 Vue.filter("usageStatus", value => {
   let obj = {
     0: "未使用",

+ 1 - 1
src/views/liveClassManager/modals/groupChat.vue

@@ -36,7 +36,7 @@
             @change="resectCheck(item.id)"
             ><br
           /></el-checkbox>
-          <div class="dotle">{{ item.type == "MUSIC" ? "乐团" : "VIP" }}</div>
+          <div class="dotle">{{ item.type | catDotType }}</div>
           <div class="teamInfo">
             <p class="title">{{ item.name }}</p>
             <p class="subInfo">{{ item.memo }}(共{{ item.memberNum }}人)</p>

+ 66 - 4
src/views/liveClassManager/modals/reservationDetail.vue

@@ -17,9 +17,47 @@
               placeholder="学员编号/姓名/手机号"
             ></el-input>
           </el-form-item>
+          <el-form-item prop="organId">
+            <el-select
+              v-model.trim="searchForm.organId"
+              placeholder="请选择分部"
+              clearable
+              filterable
+            >
+              <el-option
+                v-for="(item, index) in selects.branchs"
+                :key="index"
+                :value="item.id"
+                :label="item.name"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item prop="subjectId">
+            <el-select
+              v-model.trim="searchForm.subjectId"
+              clearable
+              filterable
+              placeholder="请选择声部"
+            >
+              <el-option
+                v-for="(item, index) in selects.subjects"
+                :key="index"
+                :value="item.id"
+                :label="item.name"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item>
             <el-button @click="search" type="primary">搜索</el-button>
             <el-button @click="onReSet" type="danger">重置</el-button>
+            <el-button
+              @click="onExport"
+              type="primary"
+              v-permission="'imLiveBroadcastRoom/exportReservationRoomUser'"
+              >导出</el-button
+            >
           </el-form-item>
         </el-form>
         <div class="tableWrap">
@@ -75,6 +113,7 @@
 import { getRoomUser } from "../api";
 import { getLiveGoodsMapperList } from "@/views/liveShopManger/api";
 import pagination from "@/components/Pagination/index";
+import { Export } from "@/utils/downLoadFile";
 export default {
   name: "eidtPostMsg",
   components: { pagination },
@@ -82,9 +121,12 @@ export default {
     return {
       searchForm: {
         search: "",
+        subjectId: "",
+        organId: "",
       },
       tableList: [],
       organList: [],
+      subjectList: [],
       rules: {
         // 分页规则
         limit: 10, // 限制显示条数
@@ -101,7 +143,10 @@ export default {
     };
   },
 
-  mounted() {},
+  mounted() {
+    this.$store.dispatch("setBranchs");
+    this.$store.dispatch("setSubjects");
+  },
   methods: {
     async getList() {
       try {
@@ -113,7 +158,6 @@ export default {
         });
         this.tableList = res.data.rows;
         this.rules.total = res.data.total;
-
       } catch (e) {
         console.log(e);
       }
@@ -123,8 +167,13 @@ export default {
       this.getList();
     },
     onReSet() {
-      this.searchForm.search = "";
-      this.search();
+      // this.searchForm.search = "";
+      (this.searchForm = {
+        search: "",
+        subjectId: "",
+        organId: "",
+      }),
+        this.search();
     },
     onClose() {
       this.lookVisible = false;
@@ -135,6 +184,19 @@ export default {
 
       this.getList();
     },
+    async onExport() {
+
+      await Export(
+        this,
+        {
+          url: "/api-web/imLiveBroadcastRoom/exportReservationRoomUser",
+          fileName: `${this.activeRow.roomTitle}预约人员.xls`,
+          method: "post",
+          params: { ...this.searchForm,roomUid: this.activeRow.roomUid, },
+        },
+        `您确定导出"${this.activeRow.roomTitle}"预约人员列表?`
+      );
+    },
   },
 };
 </script>

+ 21 - 14
src/views/liveClassManager/modals/sellShopList.vue

@@ -9,18 +9,18 @@
     >
       <div>
         <descriptions :column="2">
-          <descriptions-item label="购买人数:">{{
-            statInfo.buyNum
-          }}人</descriptions-item>
-          <descriptions-item label="现金总额:">{{
-            statInfo.actualAmount | moneyFormat
-          }}元</descriptions-item>
-          <descriptions-item label="余额总额:">{{
-            statInfo.balance | moneyFormat
-          }}元</descriptions-item>
-          <descriptions-item label="销售总额:">{{
-            statInfo.totalAmount | moneyFormat
-          }}元</descriptions-item>
+          <descriptions-item label="购买人数:"
+            >{{ statInfo.buyNum }}人</descriptions-item
+          >
+          <descriptions-item label="现金总额:"
+            >{{ statInfo.actualAmount | moneyFormat }}元</descriptions-item
+          >
+          <descriptions-item label="余额总额:"
+            >{{ statInfo.balance | moneyFormat }}元</descriptions-item
+          >
+          <descriptions-item label="销售总额:"
+            >{{ statInfo.totalAmount | moneyFormat }}元</descriptions-item
+          >
         </descriptions>
         <el-alert
           title="直播商品"
@@ -142,8 +142,8 @@ export default {
       statInfo: {
         totalAmount: 0,
         buyNum: 0,
-        balance:0,
-        actualPrice:0
+        balance: 0,
+        actualPrice: 0,
       },
     };
   },
@@ -162,6 +162,13 @@ export default {
         this.rules.total = res.data.total;
         if (res.data.statInfo) {
           this.statInfo = { ...res.data.statInfo };
+        } else {
+          this.statInfo = {
+            totalAmount: 0,
+            buyNum: 0,
+            balance: 0,
+            actualPrice: 0,
+          };
         }
       } catch (e) {
         console.log(e);

+ 34 - 27
src/views/liveClassManager/newLiveClass.vue

@@ -219,9 +219,8 @@
               filterable
               clearable
               multiple
-
             >
-            <!--   @change="changeSchool" -->
+              <!--   @change="changeSchool" -->
               <el-option
                 v-for="(item, index) in cooperationList"
                 :key="index"
@@ -393,7 +392,12 @@ export default {
     if (this.$route.query.id) {
       this.name = "修改直播间";
       // console.log()
-      this.form = { ...this.$route.query, organIds: [], schoolIds: [],teamIds:[] };
+      this.form = {
+        ...this.$route.query,
+        organIds: [],
+        schoolIds: [],
+        teamIds: [],
+      };
       this.form.roomConfig = JSON.parse(this.$route.query.roomConfig);
 
       if (this.$route.query.popularizeOrgIds) {
@@ -403,7 +407,7 @@ export default {
             return item * 1;
           });
       }
-               this.changeSection(this.form.organIds);
+      this.changeSection(this.form.organIds);
       if (this.$route.query.popularizeSchoolIds) {
         this.form.schoolIds = this.$route.query.popularizeSchoolIds
           .split(",")
@@ -522,27 +526,30 @@ export default {
       this.form.popularizeOrgIds = this.form.organIds.join(",");
       this.form.popularizeSchoolIds = this.form.schoolIds.join(",");
       this.form.popularizeTeamIds = this.form.teamIds.join(",");
-
-      if (this.$route.query.id) {
-        // 修改
-        try {
-          const res = await resetLiveBroadcastRoomList(this.form);
-          this.$message.success("修改成功");
-          this.$store.dispatch("delVisitedViews", this.$route);
-          this.$router.push("/liveClassManager");
-        } catch (e) {
-          console.log(e);
-        }
-      } else {
-        try {
-          const res = await createLiveBroadcast(this.form);
-          this.$message.success("创建成功");
-          this.$store.dispatch("delVisitedViews", this.$route);
-          this.$router.push("/liveClassManager");
-        } catch (e) {
-          console.log(e);
+      this.$refs.form.validate(async(flag) => {
+        if (!flag) return;
+        if (this.$route.query.id) {
+          // 修改
+          try {
+            const res = await resetLiveBroadcastRoomList(this.form);
+            this.$message.success("修改成功");
+            this.$store.dispatch("delVisitedViews", this.$route);
+            this.$router.push("/liveClassManager");
+          } catch (e) {
+            console.log(e);
+          }
+        } else {
+          try {
+            const res = await createLiveBroadcast(this.form);
+            this.$message.success("创建成功");
+            this.$store.dispatch("delVisitedViews", this.$route);
+            this.$router.push("/liveClassManager");
+          } catch (e) {
+            console.log(e);
+          }
         }
-      }
+      });
+
       // createLiveBroadcast
     },
     changeType() {
@@ -552,8 +559,8 @@ export default {
     },
     async changeSection(val) {
       // if (!this.isinit) {
-        this.form.schoolIds = [];
-        this.form.teamIds = [];
+      this.form.schoolIds = [];
+      this.form.teamIds = [];
       // }
       if (this.form.popularizeType == "SCHOOL" && val && val.length > 0) {
         let organId = val.join(",");
@@ -567,7 +574,7 @@ export default {
           console.log(e);
         }
       }
-      if (this.form.popularizeType == "TEAM" && (val && val.length > 0)) {
+      if (this.form.popularizeType == "TEAM" && val && val.length > 0) {
         let organId = val.join(",");
         try {
           await getTeamList({ organId, page: 1, rows: 9999 }).then((res) => {