Prechádzať zdrojové kódy

Merge branch 'Nov16thResetMusic' into online

wolyshaw 4 rokov pred
rodič
commit
577a6dbce2

+ 37 - 0
src/api/specialSetting.js

@@ -298,3 +298,40 @@ export function deleteOrganizationCourseUnitPrice (data) {
     data
   })
 }
+
+// 查询课程时长
+export function getOrganizationCourseDurationSettings(data) {
+  return request2({
+    url: api + `/organizationCourseDurationSettings/queryPage`,
+    method: 'get',
+    data:{},
+    params: data,
+  })
+}
+
+// 修改课程时长
+export function resetOrganizationCourseDurationSettings(data) {
+  return request2({
+    url: api + `/organizationCourseDurationSettings/update`,
+    method: 'post',
+    params:data,
+  })
+}
+
+// 新增课程时长
+export function addOrganizationCourseDurationSettings(data) {
+  return request2({
+    url: api + `/organizationCourseDurationSettings/insert`,
+    method: 'post',
+    data:data,
+  })
+}
+
+//删除课程时长
+export function delOrganizationCourseDurationSettings(data) {
+  return request2({
+    url: api + `/organizationCourseDurationSettings/del`,
+    method: 'post',
+    data:data,
+  })
+} 

+ 1 - 0
src/utils/searchArray.js

@@ -27,6 +27,7 @@ export const musicCourseType = [
   { label: "集训单技课", value: "TRAINING_SINGLE" },
   { label: "集训合奏课", value: "TRAINING_MIX" },
   { label: "课堂课", value: "CLASSROOM" },
+  { label: "综合课", value: "COMPREHENSIVE" },
 ]
 
 export const courseListType = [

+ 1 - 1
src/views/categroyManager/generalSettings/vipParameterManager.vue

@@ -150,7 +150,7 @@
         <el-button @click="closeVipStatus">取 消</el-button>
         <el-button type="primary"
                    @click="addVipStatus">确 定</el-button>
-      </div>
+      </div> 
     </el-dialog>
 
     <!-- 周期循环新增弹窗 -->

+ 2 - 2
src/views/categroyManager/globalConfig.vue

@@ -27,10 +27,10 @@
                      v-if="permissionList.typesManager">
           <typesManager v-if="activeIndex == 2" />
         </el-tab-pane>
-          <el-tab-pane label="课程时长"
+          <el-tab-pane label="课程时长设置"
           lazy
                      name="11"
-                     v-if="permissionList.musicalManagerOut">
+                     v-if="permissionList.courseTimerSetting">
           <courseTimerSetting v-if="activeIndex == 11" />
         </el-tab-pane>
         <el-tab-pane label="商品折扣和声部设置"

+ 204 - 9
src/views/categroyManager/specialSetup/courseTimerSetting.vue

@@ -1,17 +1,212 @@
 <template>
-    <div>
-        课程时长设置
+  <div class="m-core">
+    <save-form
+      :inline="true"
+      class="searchForm"
+      ref="searchForm"
+      :model.sync="searchForm"
+    >
+      <el-form-item :rules="[]">
+        <el-select
+          class="multiple"
+          v-model.trim="searchForm.organId"
+          filterable
+          clearable
+          placeholder="请选择分部"
+        >
+          <el-option
+            v-for="(item, index) in selects.branchs"
+            :key="index"
+            :label="item.name"
+            :value="item.id"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-select
+          class="multiple"
+          v-model.trim="searchForm.courseScheduleType"
+          filterable
+          clearable
+          placeholder="课程类型"
+        >
+          <el-option
+            v-for="(item, index) in courseType"
+            :key="index"
+            :label="item.label"
+            :value="item.value"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button @click="search" type="primary">搜索</el-button>
+        <el-button @click="reset" type="danger">重置</el-button>
+      </el-form-item>
+    </save-form>
+    <div
+      class="newBand"
+      v-permission="'courseHomeworkTemplate/add'"
+      @click="openJob('create')"
+    >
+      添加
     </div>
+    <!-- 列表 -->
+    <div class="tableWrap">
+      <el-table
+        :data="tableList"
+        :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+      >
+        <el-table-column align="center" prop="organ.name" label="分部名称">
+        </el-table-column>
+        <el-table-column
+          align="center"
+          prop="classGroupTypeName"
+          label="课程形式"
+        >
+          <template slot-scope="scope">
+            <div>
+              {{ scope.row.courseType | coursesType }}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="课程课时" prop="duration">
+          <!-- <template slot-scope="scope">
+            {{ scope.row.subjectName ? scope.row.subjectName : "无" }}
+          </template> -->
+        </el-table-column>
+        <el-table-column align="center" label="操作">
+          <template slot-scope="scope">
+            <el-button
+              @click="resetCourseTime(scope.row)"
+              v-permission="'courseHomeworkTemplate/update'"
+              type="text"
+              >修改</el-button
+            >
+            <!-- <el-button
+              @click="delCourseTime(scope.row)"
+              v-permission="'courseHomeworkTemplate/del'"
+              type="text"
+              >删除</el-button> -->
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination
+        sync
+        :total.sync="pageInfo.total"
+        :page.sync="pageInfo.page"
+        :limit.sync="pageInfo.limit"
+        :page-sizes="pageInfo.page_size"
+        @pagination="getList"
+      />
+    </div>
+    <el-dialog
+      :title="isAdd ? '新增课程时长' : '修改课程时长'"
+      class="courseMask"
+      width="500px"
+      :visible.sync="courseVisible"
+    >
+      <courseTimeForm
+        ref="courseTimeForm"
+        :activeRow="activeRow"
+        v-if="courseVisible"
+        :organList="selects.branchs"
+        :courseType="courseType"
+        @close="close"
+      />
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="courseVisible = false">取 消</el-button>
+        <el-button type="primary" @click="submitInfo">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
 </template>
 <script>
+import pagination from "@/components/Pagination/index";
+import { musicCourseType } from "@/utils/searchArray";
+import { getOrganizationCourseDurationSettings,delOrganizationCourseDurationSettings } from "@/api/specialSetting";
+import courseTimeForm from "./modals/courseTimeForm";
+const initSearch = {
+  courseScheduleType: null,
+  organId: null,
+};
 export default {
-    data(){
-        return{
-
-        }
-    }
-}
+  components: { pagination, courseTimeForm },
+  data() {
+    return {
+      tableList: [],
+      pageInfo: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+      searchForm: { ...initSearch },
+      courseType: musicCourseType,
+      isAdd: true,
+      courseVisible: false,
+      activeRow: null,
+    };
+  },
+  mounted() {
+    this.$store.dispatch("setBranchs");
+    this.getList();
+  },
+  methods: {
+    async getList() {
+      try {
+        const res = await getOrganizationCourseDurationSettings({
+          ...this.searchForm,
+          page: this.pageInfo.page,
+          rows: this.pageInfo.limit,
+        });
+        this.pageInfo.total = res.data.total;
+        this.tableList = res.data.rows;
+      } catch (e) {}
+    },
+    search() {
+      this.pageInfo.page = 1;
+      this.$refs.searchForm.save(this.searchForm);
+      this.$refs.searchForm.save(this.pageInfo, "page");
+      this.getList();
+    },
+    reset() {
+      this.searchForm = { ...initSearch };
+      this.search();
+    },
+    resetCourseTime(row) {
+      this.isAdd = false;
+      this.activeRow = row;
+      this.courseVisible = true;
+    },
+    submitInfo() {
+      const str = this.isAdd ? "create" : "update";
+      this.$refs.courseTimeForm.submitInfo(str);
+    },
+    close() {
+      this.courseVisible = false;
+      this.getList();
+    },
+    openJob() {
+      this.isAdd = true;
+      this.activeRow = null;
+      this.courseVisible = true;
+    },
+    async delCourseTime(row) {
+      this.$confirm("是否删除?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then( async() => {
+        try{
+         const res =   await delOrganizationCourseDurationSettings({ id:row.id})
+         this.$message.success('删除成功')
+         this.getList()
+        }catch{}
+      });
+    },
+  },
+};
 </script>
 <style lang="scss" scoped>
-    
 </style>

+ 186 - 0
src/views/categroyManager/specialSetup/modals/courseTimeForm.vue

@@ -0,0 +1,186 @@
+<template>
+  <div>
+    <el-form :model="courseTimeForm" ref="courseTimeForm">
+      <el-form-item
+        label="分部"
+        prop="organId"
+        :label-width="formLabelWidth"
+        :rules="[{ required: true, message: '请选择分部', trigger: 'blur' }]"
+      >
+        <el-select
+          style="width: 100% !important"
+          class="multiple"
+          v-model.trim="courseTimeForm.organId"
+          filterable
+          clearable
+          placeholder="请选择分部"
+        >
+          <el-option
+            v-for="(item, index) in organList"
+            :key="index"
+            :label="item.name"
+            :value="item.id"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item
+        label="课程类型"
+        prop="courseType"
+        :label-width="formLabelWidth"
+        :rules="[
+          { required: true, message: '请选择课程类型', trigger: 'blur' },
+        ]"
+      >
+        <el-select
+          style="width: 100% !important"
+          class="multiple"
+          v-model.trim="courseTimeForm.courseType"
+          filterable
+          clearable
+          placeholder="课程类型"
+        >
+          <el-option
+            v-for="(item, index) in courseType"
+            :key="index"
+            :label="item.label"
+            :value="item.value"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="课程课时" prop="timer" :label-width="formLabelWidth">
+        <el-tag
+          :key="index"
+          effect="dark"
+          type="info"
+          v-for="(tag, index) in dynamicTags"
+          closable
+          :disable-transitions="false"
+          @close="handleClose(tag)"
+        >
+          {{ tag }}
+        </el-tag>
+        <el-input
+          class="input-new-tag"
+          v-if="inputVisible"
+          v-model.trim="inputValue"
+          ref="saveTagInput"
+          style="width: 100px"
+          size="small"
+          @keyup.enter.native="handleInputConfirm"
+        >
+        </el-input>
+        <el-button
+          v-if="!inputVisible"
+          class="button-new-tag"
+          size="small"
+          @click="showInput"
+          >+ 添加</el-button
+        >
+        <el-button
+          v-if="inputVisible"
+          class="button-new-tag"
+          size="small"
+          @click="handleInputConfirm"
+          >保存</el-button
+        >
+      </el-form-item>
+    </el-form>
+  </div>
+</template>
+<script>
+import { resetOrganizationCourseDurationSettings,addOrganizationCourseDurationSettings } from "@/api/specialSetting";
+export default {
+  props: ["activeRow", "organList", "courseType"],
+  data() {
+    return {
+      courseTimeForm: {
+        organId: "",
+        courseType: "",
+        timer: [],
+        id: "",
+      },
+      inputVisible: false,
+      formLabelWidth: "80px",
+      dynamicTags: [],
+      inputValue: "",
+    };
+  },
+  mounted() {
+    console.log(this.activeRow);
+    if (this.activeRow) {
+      this.courseTimeForm.organId = this.activeRow.organId;
+      this.courseTimeForm.timer = this.activeRow.duration.split(",");
+      this.dynamicTags = this.activeRow.duration.split(",");
+      this.courseTimeForm.courseType = this.activeRow.courseType;
+      this.courseTimeForm.id = this.activeRow.id;
+    }
+  },
+  methods: {
+    handleInputConfirm() {
+      let inputValue = this.inputValue;
+      if (inputValue) {
+        this.dynamicTags.push(inputValue);
+      }
+      this.inputVisible = false;
+      this.inputValue = "";
+    },
+    handleClose(tag) {
+      this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
+    },
+
+    showInput() {
+      this.inputVisible = true;
+      this.$nextTick((_) => {
+        this.$refs.saveTagInput.$refs.input.focus();
+      });
+    },
+    async submitInfo(str) {
+      console.log(str);
+      this.$refs.courseTimeForm.validate(async (_) => {
+        if (_) {
+          if (this.dynamicTags.length <= 0) {
+            this.$message.error("请至少填写一个课程课时");
+            return;
+          }
+          if (str == "update") {
+            try {
+              const res = await resetOrganizationCourseDurationSettings({
+                organId: this.courseTimeForm.organId,
+                duration: this.dynamicTags.join(","),
+                courseType: this.courseTimeForm.courseType,
+                id: this.courseTimeForm.id,
+              });
+                this.$message.success("修改成功");
+                this.$emit('close')
+            } catch {}
+          }else if(str == "create"){
+                   try {
+              const res = await addOrganizationCourseDurationSettings({
+                organId: this.courseTimeForm.organId,
+                duration: this.dynamicTags.join(","),
+                courseType: this.courseTimeForm.courseType,
+              });
+                this.$message.success("新建成功");
+                this.$emit('close')
+            } catch {}
+          }
+        }
+      });
+
+    
+    },
+  },
+  watch: {
+    dynamicTags(val) {
+      this.courseTimeForm.timer = val;
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.courseMask {
+  .el-tag.el-tag--info {
+    margin-right: 4px;
+  }
+}
+</style>

+ 9 - 1
src/views/resetTeaming/api.js

@@ -52,4 +52,12 @@ export const makesureSchoolePaid = data => request2({
   data,
   method: 'post',
   requestType: 'form'
-})
+})
+
+export const queryByOrganIdAndCourseType = data => request2({
+  url: '/api-web/organizationCourseDurationSettings/queryByOrganIdAndCourseType',
+  data: {},
+  params: data,
+  method: 'get',
+  requestType: 'form'
+})

+ 13 - 0
src/views/resetTeaming/modals/extra-class.vue

@@ -173,6 +173,8 @@ import { courseType, boolOptions } from '@/constant'
 import { objectToOptions } from '@/utils'
 import { classTimeList, array2object } from '@/utils/searchArray'
 import numeral from 'numeral'
+import MusicStore from '@/views/resetTeaming/store'
+import { queryByOrganIdAndCourseType } from '../api'
 export default {
   props: ['form', 'isCommon', 'isDisabled', 'isUserType', 'courseUnitPriceSettingsByType', 'clearable'],
   data() {
@@ -184,12 +186,23 @@ export default {
   },
   computed: {
     list() {
+      console.log(this.prices)
       return {
         form: this.form
       }
     },
     classTimeList() {
       return array2object(classTimeList)
+    },
+    async prices() {
+      let list = []
+      try {
+        const res = await queryByOrganIdAndCourseType({
+          organId: MusicStore.state.musicGroup.organId
+        })
+        list = res.data
+      } catch (error) {}
+      return list
     }
   },
   methods: {

+ 12 - 5
src/views/resetTeaming/modals/user-pay-form.vue

@@ -148,6 +148,7 @@ import classrooms from "./classrooms";
 import otherform from "./other";
 import baseInfoVue from '../../teamDetail/components/baseInfo.vue';
 import merge from 'webpack-merge'
+import MusicStore from '@/views/resetTeaming/store'
 
 const paymentTypeFormat = {
   0: "MUSIC_APPLY",
@@ -192,6 +193,9 @@ export default {
     };
   },
   computed: {
+    musicGroup() {
+      return MusicStore.state.musicGroup
+    },
     isCommon () {
       return this.form.leixing === "1";
     },
@@ -276,6 +280,9 @@ export default {
   },
   mounted () {
     this.formatCourse()
+    MusicStore.dispatch('getBaseInfo', {
+      data: { musicGroupId: this.musicGroupId }
+    })
     this.init();
   },
   activated () {
@@ -331,8 +338,8 @@ export default {
       }
     },
     formatCourse() {
-      const organId = this.baseInfo?.musicGroup?.organId
-      const chargeTypeId = this.baseInfo?.musicGroup?.chargeTypeId
+      const organId = this.musicGroup?.organId
+      const chargeTypeId = this.musicGroup?.chargeTypeId
       const _ = {}
       const list = (this.organizationCourseUnitPriceSettings || [])
         .filter(item => organId && organId == item.organId && chargeTypeId && chargeTypeId == item.chargeTypeId)
@@ -403,9 +410,9 @@ export default {
       } catch (error) { }
     },
     async getCharges () {
-      const organId = this.baseInfo?.musicGroup?.organId;
-      const chargeTypeId = this.baseInfo?.musicGroup?.chargeTypeId;
-      this.chargeTypeName = this.baseInfo?.musicGroup?.chargeTypeName;
+      const organId = this.musicGroup?.organId;
+      const chargeTypeId = this.musicGroup?.chargeTypeId;
+      this.chargeTypeName = this.musicGroup?.chargeTypeName;
       try {
         const res = await musicGroupOrganizationCourseSettingsQueryPage({
           row: 9999,

+ 37 - 0
src/views/resetTeaming/store.js

@@ -0,0 +1,37 @@
+/* eslint-disable no-empty */
+import Vuex from 'vuex'
+import { getTeamBaseInfo } from '@/api/buildTeam'
+
+const store = new Vuex.Store({
+  state: {
+    res: null,
+    baseInfo: null,
+    musicGroup: {}
+  },
+  mutations: {
+    updateBaseinfo(state, res) {
+      state.res = res
+      state.baseInfo = res.data
+      if (res.data.musicGroup) {
+        state.musicGroup = {...res.data.musicGroup}
+      } else {
+        state.musicGroup = {}
+      }
+    }
+  },
+  actions: {
+    async getBaseInfo({ commit, state }, payload) {
+      try {
+        if (payload.data?.musicGroupId !== state.musicGroup.id || payload.force) {
+          const res = await getTeamBaseInfo(payload.data)
+          commit('updateBaseinfo', res)
+          return Promise.resolve(res)
+        }
+        return Promise.resolve(state.res)
+      } catch (error) {}
+      return Promise.reject()
+    }
+  }
+})
+
+export default store

+ 5 - 2
src/views/studentManager/studentList.vue

@@ -398,8 +398,11 @@
         <el-form-item label="手机号"
                       prop="phone"
                       label-width="120px"
-                      :rules="[{ required: true, message: '手机号不能为空',trigger: 'blur'},{pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号',trigger: 'blur' }]">
-          <el-input v-model.trim="passwrodForm.phone"></el-input>
+                      :rules="[{ required: true, message: '手机号不能为空',trigger: 'blur'},{pattern: /^1\d{10}$/, message: '请输入正确的手机号',trigger: 'blur' }]">
+          <el-input v-model.trim="passwrodForm.phone"
+                    minlength="11"
+                    maxlength="11"
+          ></el-input>
         </el-form-item>
         <el-form-item label="输入密码"
                       prop="password"

+ 5 - 2
src/views/teacherManager/teacherList.vue

@@ -210,8 +210,11 @@
         <el-form-item label="手机号"
                       prop="phone"
                       label-width="80px"
-                      :rules="[{ required: true, message: '手机号不能为空',trigger: 'blur'},{pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号',trigger: 'blur' }]">
-          <el-input v-model.trim="passwrodForm.phone"></el-input>
+                      :rules="[{ required: true, message: '手机号不能为空',trigger: 'blur'},{pattern: /^1\d{10}$/, message: '请输入正确的手机号',trigger: 'blur' }]">
+          <el-input v-model.trim="passwrodForm.phone"
+                    minlength="11"
+                    maxlength="11"
+          ></el-input>
         </el-form-item>
         <el-form-item label="输入密码"
                       prop="password"

+ 136 - 71
src/views/teamBuild/components/soundSetComponents/chioseMusic.vue

@@ -1,116 +1,181 @@
 <template>
   <div>
-    <div v-for="(music,index) in item.chioseMusic"
-         :key="index">
-
+    <div v-for="(music, index) in item.chioseMusic" :key="index">
       <div class="chioseMusic">
         <div class="flexRow">
-          <p class="title">可选乐器{{index+1}}:</p>
-          <el-select style="width:180px"
-                     :disabled='basdisabled'
-                     v-model="music.musical"
-                     @change="(val)=>{chioseMusic(val,music)}">
-            <el-option v-for="(item,index) in item.goodsList"
-                       :key="index"
-                       :label="item.name"
-                       :value="item.id"></el-option>
+          <p class="title">可选乐器{{ index + 1 }}:</p>
+          <el-select
+            style="width: 180px"
+            :disabled="basdisabled"
+            v-model="music.musical"
+            @change="
+              (val) => {
+                chioseMusic(val, music);
+              }
+            "
+          >
+            <el-option
+              v-for="(item, index) in item.goodsList"
+              :key="index"
+              :label="item.name"
+              :value="item.id"
+              :disabled='checkDisabled(item)'
+            ></el-option>
           </el-select>
-          <el-radio-group v-model="music.type"
-                             class="marginLeft10">
-            <el-radio :disabled='basdisabled'
-                         label="GROUP">团购</el-radio>
-            <el-radio :disabled='basdisabled'
-                         label="LEASE">租赁</el-radio>
-            <el-radio :disabled='basdisabled'
-                         label="FREE">免费</el-radio>
-          </el-radio-group>
         </div>
-
         <div class="flexRow">
-          <p class="title">团购价:</p>
-          <div v-if="music.type&&music.type.length>0?music.type.includes('GROUP'):false"
-               style="width:180px">
-            <el-input type="number"
-                      v-model="music.groupPrice"
-                      disabled> <template slot="append">元</template></el-input>
+          <p class="title">乐器选择方式:</p>
+          <el-checkbox-group v-model="music.type" class="marginLeft10">
+            <el-checkbox :disabled="basdisabled" label="GROUP"
+              >团购</el-checkbox
+            >
+            <el-checkbox :disabled="basdisabled" label="LEASE"
+              >租赁</el-checkbox
+            >
+            <el-checkbox :disabled="basdisabled" label="FREE">免费</el-checkbox>
+          </el-checkbox-group>
+        </div>
+        <div class="flexRow">
+          <p
+            class="title"
+            v-show="
+              music.type && music.type.length > 0
+                ? music.type.includes('GROUP')
+                : false
+            "
+          >
+            团购价:
+          </p>
+          <div
+            v-show="
+              music.type && music.type.length > 0
+                ? music.type.includes('GROUP')
+                : false
+            "
+            style="width: 180px"
+          >
+            <el-input type="number" v-model="music.groupPrice" disabled>
+              <template slot="append">元</template></el-input
+            >
           </div>
-          <div v-else
+          <!-- <div v-else
                style="width:180px">
             <el-input value="--"
                       disabled> <template slot="append">元</template></el-input>
-          </div>
+          </div> -->
 
-          <p class="title">租赁押金:</p>
-          <div v-if="music.type&&music.type.length>0?music.type.includes('LEASE'):false"
-               style="width:180px">
-            <el-input type="number"
-                      v-model="music.borrowPrice"
-                      :disabled='basdisabled'> <template slot="append">元</template></el-input>
+          <p
+            class="title"
+            v-show="
+              music.type && music.type.length > 0
+                ? music.type.includes('LEASE')
+                : false
+            "
+          >
+            租赁押金:
+          </p>
+          <div
+            v-show="
+              music.type && music.type.length > 0
+                ? music.type.includes('LEASE')
+                : false
+            "
+            style="width: 180px"
+          >
+            <el-input
+              type="number"
+              v-model="music.borrowPrice"
+              :disabled="basdisabled"
+            >
+              <template slot="append">元</template></el-input
+            >
           </div>
-          <div v-else
+          <!-- <div v-else
                style="width:180px">
             <el-input value="--"
                       disabled> <template slot="append">元</template></el-input>
-          </div>
-          <i class="el-icon-close marginLeft10"
-             v-if="item.chioseMusic.length >1&&!basdisabled"
-             @click="deleteMusic(music)"
-             style="font-size:20px; cursor: pointer;"></i>
+          </div> -->
+          <i
+            class="el-icon-close marginLeft10"
+            v-if="
+              item.chioseMusic.length > 1 &&
+              !basdisabled &&
+              (music.type.includes('LEASE') || music.type.includes('GROUP'))
+            "
+            @click="deleteMusic(music)"
+            style="font-size: 20px; cursor: pointer"
+          ></i>
         </div>
       </div>
+      <el-divider></el-divider>
     </div>
-    <div class="coreItemRow"
-         v-if="!basdisabled">
+    <div class="coreItemRow" v-if="!basdisabled">
       <p class="title"></p>
-      <el-button type="info"
-                 plain
-                 style="width:558px"
-                 size="mini"
-                 icon="el-icon-plus"
-                 @click="addMusic">新增可选乐器</el-button>
+      <el-button
+        type="info"
+        plain
+        style="width: 558px"
+        size="mini"
+        icon="el-icon-plus"
+        @click="addMusic"
+        >新增可选乐器</el-button
+      >
     </div>
   </div>
 </template>
 <script>
 export default {
-  props: ['item', 'basdisabled'],
-  data () {
+  props: ["item", "basdisabled",'activeSoundList'],
+  data() {
     return {
-      radio: '',
-      goods: ''
-    }
-  },
-  created () { },
-  mounted () {
-
+      radio: "",
+      goods: "",
+    };
   },
+  created() {},
+  mounted() {},
   methods: {
-    chioseMusic (val, music) {
+    chioseMusic(val, music) {
       this.item.goodsList.map((some, index) => {
         if (some.id == val) {
-          music.groupPrice = some.groupPurchasePrice
+          music.groupPrice = some.groupPurchasePrice;
         }
-      })
+      });
     },
-    addMusic () {
-      this.item.chioseMusic.push({ musical: '', type: ['GROUP'], groupPrice: null, borrowPrice: 1500 })
-      this.$emit('lookMusic')
+    addMusic() {
+      this.item.chioseMusic.push({
+        musical: "",
+        type: ["GROUP"],
+        groupPrice: null,
+        borrowPrice: 1500,
+      });
+      this.$emit("lookMusic");
     },
-    deleteMusic (music) {
-
+    deleteMusic(music) {
       this.item.chioseMusic.forEach((element, index) => {
         if (element.musical == music.musical) {
-          this.item.chioseMusic.splice(index, 1)
+          this.item.chioseMusic.splice(index, 1);
         }
       });
+    },
+    checkDisabled(item){
+      let flag = false
+     this.activeSoundList.forEach(musics=>{
+       musics.chioseMusic.forEach(music=>{
+         if(item.id==music.musical){
+           flag= true
+         }
+       })
+     })
+     return flag
     }
-  }
-
-}
+  },
+};
 </script>
 <style lang="scss" scoped>
 .chioseMusic {
   width: 100%;
+  margin: 30px 0 0;
 }
 .coreItemRow {
   padding-left: 20px;

+ 14 - 9
src/views/teamBuild/components/soundSetComponents/soundSetCore.vue

@@ -42,7 +42,9 @@
                 ></el-input>
               </div>
             </div>
+            <el-divider></el-divider>
             <chioseMusic
+            :activeSoundList="activeSoundList"
               :item="item"
               @lookMusic="lookMusic"
               :basdisabled="basdisabled"
@@ -364,17 +366,20 @@ export default {
             goodsItem = active.goodsList[index];
           }
           let kitGroupPurchaseTypeJson = {};
-          if (Array.isArray(music.type)) {
-            music.type.forEach((type) => {
+             music.type.forEach((type) => {
               kitGroupPurchaseTypeJson[type] = 0;
             });
-          }else{
-            // 字符串
-            let arr = [ music.type]
-              arr.forEach((type) => {
-              kitGroupPurchaseTypeJson[type] = 0; 
-            });
-          }
+          // if (Array.isArray(music.type)) {
+          //   music.type.forEach((type) => {
+          //     kitGroupPurchaseTypeJson[type] = 0;
+          //   });
+          // }else{
+          //   // 字符串
+          //   let arr = [ music.type]
+          //     arr.forEach((type) => {
+          //     kitGroupPurchaseTypeJson[type] = 0; 
+          //   });
+          // }
           kitGroupPurchaseTypeJson = JSON.stringify(kitGroupPurchaseTypeJson);
           if (goodsItem) {
             let some = {

+ 5 - 2
src/views/teamBuild/components/teamBaseInfo.vue

@@ -495,6 +495,7 @@ import store from "@/store";
 import numeral from "numeral";
 import { formatData } from "@/utils/utils";
 import qs from "qs";
+import MusicStore from '@/views/resetTeaming/store'
 export default {
   name: "teamBaseInfo",
   props: ["getTeamList"],
@@ -707,7 +708,9 @@ export default {
       ) {
         // 单团修改
         this.teamid = this.$route.query.id;
-        getTeamBaseInfo({ musicGroupId: this.teamid }).then((res) => {
+        MusicStore.dispatch('getBaseInfo', {
+          data: { musicGroupId: this.teamid }
+        }).then((res) => {
           if (res.code == 200) {
             if (this.$listeners.getBaseInfo) {
               this.$listeners.getBaseInfo(res.data)
@@ -1142,7 +1145,7 @@ export default {
             if (res.code == 200) {
               if (this.teamStatus == "teamDraft") {
                 this.$message.success("保存成功");
-                // 跳到第二页 
+                // 跳到第二页
 
                 this.$emit("chiosetab", 1);
               } else {

+ 1 - 2
src/views/teamDetail/components/modals/class-pay-list.vue

@@ -3,7 +3,7 @@
     <classPayListItem
       :payInfo="payInfo"
       ref="base"
-      :courseTypesByType="courseTypesByType"
+      :courseTypesByType="courseTypesByType" 
       v-for="(item, index) in form.classList"
       :key="index"
       :item="item"
@@ -46,7 +46,6 @@
   </div>
 </template>
 <script>
-import { getDefaultPaymentCalender } from "@/api/buildTeam";
 import classNewInfo from "./class-new-info";
 import classPayListItem from './class-pay-list-item'
 import classSetting from './classroom-setting'

+ 2 - 2
src/views/teamDetail/components/modals/classList-group.vue

@@ -19,7 +19,7 @@
       size="small"
       style="width: 100%; margin: 20px 0"
       @click="addClass"
-      :disabled="form.classList.length >= classList.length"
+      :disabled="form.classList.length >= classList.length" 
       >添加班级</el-button
     >
     <el-dialog
@@ -100,7 +100,7 @@ export default {
           });
           try {
             let result = await getDefaultPaymentCalender(this.classIdList);
-            this.payInfo = result.data;
+            this.payInfo = result.data.defaultPaymentCalender;
             this.showSecondVisable = true;
           } catch {}
         }

+ 6 - 2
src/views/teamDetail/components/resetClass.vue

@@ -472,7 +472,7 @@
       <studentResetView
       :courseTypesByType ="courseTypesByType"
         v-if="studentResetVisiable"
-        :classList="activeSingleList"
+        :classList="mergeList"
         @close="closeStudentReset"
       />
     </el-dialog>
@@ -651,7 +651,8 @@ export default {
       maxMun: 16,
       courseTime: "",
       studentResetVisiable: false,
-      courseTypesByType:null
+      courseTypesByType:null,
+      mergeList:[]
     };
   },
   created() {
@@ -751,6 +752,9 @@ export default {
         (res) => {
           if (res.code == 200) {
             this.activeSingleList = res.data;
+            this.mergeList = res.data.filter(item=>{
+              return item.type!='MUSIC_NETWORK'
+            })
             
             // this.topForm.count = this.activeSingleList.length
           }

+ 2 - 2
vue.config.js

@@ -19,9 +19,9 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // let target = 'https://online.dayaedu.com' //线上
 // let target = 'http://dyme.utools.club' //test环境
 // let target = 'http://192.168.3.139:8000' // 箭河
-// let target = 'http://192.168.3.38:8000' //邹璇
+let target = 'http://192.168.3.38:8000' //邹璇
 // let target = 'http://192.168.3.57:8000' //勇哥
-let target = 'http://dev.dayaedu.com' // 测试服
+// let target = 'http://dev.dayaedu.com' // 测试服
 // let target = 'http://192.168.3.196' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {