Jelajahi Sumber

Merge branch '04/14resetSalaryName' into dev

mo 4 tahun lalu
induk
melakukan
b866e7986f

+ 11 - 0
src/api/buildTeam.js

@@ -1566,3 +1566,14 @@ export function checkCanReg(data) {
     params:data,
   })
 }
+
+// 批量调整
+export function batchCourseAdjust(data) {
+  return request2({
+    url: api + `/courseSchedule/batchCourseAdjust`,
+    method: 'post',
+    params:{},
+    data
+  })
+}
+

+ 2 - 0
src/components/remote-search/index.vue

@@ -24,6 +24,8 @@
         :label="item.userName"
         :value="item.userId"
       >
+      <span style="float: left">{{ item.userName }}</span>
+      <span style="float: right; color: #8492a6; font-size: 13px">{{ item.userId }}</span>
       </el-option>
     </el-select>
   </div>

+ 208 - 178
src/views/editionManager/editionList.vue

@@ -1,23 +1,27 @@
 <template>
   <div class="m-container">
     <h2>
-      <div class="squrt"></div>版本控制
+      <div class="squrt"></div>
+      版本控制
     </h2>
     <div class="m-core">
       <!--   -->
-      <div class="newBand"
-           @click="createEdi"
-           v-permission="'appVersionInfo/add'">新建</div>
-      <save-form :inline="true"
-               @submit="search"
-               :model="searchForm">
+      <div
+        class="newBand"
+        @click="createEdi"
+        v-permission="'appVersionInfo/add'"
+      >
+        新建
+      </div>
+      <save-form :inline="true" @submit="search" :model="searchForm">
         <el-form-item label="客户端">
-          <el-select clearable
-                     v-model="searchForm.search">
-            <el-option v-for="(item,index) in sectionList"
-                       :key='index'
-                       :value="item.value"
-                       :label="item.label"></el-option>
+          <el-select clearable v-model="searchForm.search">
+            <el-option
+              v-for="(item, index) in sectionList"
+              :key="index"
+              :value="item.value"
+              :label="item.label"
+            ></el-option>
           </el-select>
         </el-form-item>
         <el-form-item>
@@ -26,152 +30,169 @@
       </save-form>
 
       <div class="tableWrap">
-        <el-table :data="tableList"
-                  :header-cell-style="{background:'#EDEEF0',color:'#444'}">
-          <el-table-column align="center"
-                           prop="id"
-                           label="编号"></el-table-column>
-          <el-table-column align="center"
-                           prop="platform"
-                           label="客户端">
+        <el-table
+          :data="tableList"
+          :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+        >
+          <el-table-column
+            align="center"
+            prop="id"
+            label="编号"
+          ></el-table-column>
+          <el-table-column align="center" prop="platform" label="客户端">
             <template slot-scope="scope">
-              <div>{{ scope.row.platform|editionFilter }}</div>
+              <div>{{ scope.row.platform | editionFilter }}</div>
             </template>
           </el-table-column>
-          <el-table-column align="center"
-                           prop="version"
-                           label="版本号"></el-table-column>
-          <el-table-column align="center"
-                           prop="isForceUpdate"
-                           label="强制更新">
+          <el-table-column
+            align="center"
+            prop="version"
+            label="版本号"
+          ></el-table-column>
+          <el-table-column align="center" prop="isForceUpdate" label="强制更新">
             <template slot-scope="scope">
-              <div>{{ scope.row.isForceUpdate?'是':'否'}}</div>
+              <div>{{ scope.row.isForceUpdate ? "是" : "否" }}</div>
             </template>
           </el-table-column>
-          <el-table-column align="center"
-                           prop="status"
-                           label="状态">
+          <el-table-column align="center" prop="status" label="状态">
             <template slot-scope="scope">
-              <div>{{scope.row.status | statusFilter}}</div>
+              <div>{{ scope.row.status | statusFilter }}</div>
             </template>
           </el-table-column>
-          <el-table-column align="center"
-                           prop="description"
-                           label="描述">
+          <el-table-column align="center" prop="description" label="描述">
             <template slot-scope="scope">
               <overflow-text :text="scope.row.description"></overflow-text>
             </template>
           </el-table-column>
-          <el-table-column align="center"
-                           prop="downloadUrl"
-                           width="120"
-                           label="下载链接">
-                              <template slot-scope="scope">
-                                <overflow-text width="120px" :text="scope.row.downloadUrl"></overflow-text>
-                              </template>
-                           </el-table-column>
-          <el-table-column align="center"
-                           label="操作">
+          <el-table-column
+            align="center"
+            prop="downloadUrl"
+            width="120"
+            label="下载链接"
+          >
+            <template slot-scope="scope">
+              <overflow-text
+                width="120px"
+                :text="scope.row.downloadUrl"
+              ></overflow-text>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="操作">
             <template slot-scope="scope">
               <div>
-                <el-button v-permission="'appVersionInfo/update'"
-                           type="text"
-                           @click="resetEdit(scope.row)">修改</el-button>
+                <el-button
+                  v-permission="'appVersionInfo/update'"
+                  type="text"
+                  @click="resetEdit(scope.row)"
+                  >修改</el-button
+                >
               </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" />
+        <pagination
+          sync
+          :total.sync="rules.total"
+          :page.sync="rules.page"
+          :limit.sync="rules.limit"
+          :page-sizes="rules.page_size"
+          @pagination="getList"
+        />
       </div>
     </div>
     <!-- v-if="sectionVisible" -->
-    <el-dialog :title="isNew ? '版本添加' : '版本修改'"
-               width="400px"
-               :visible.sync="sectionVisible"
-               :before-close="resetForm">
-      <el-form :model="sectionForm"
-               ref="sectionForm"
-               :rules="sectionRules"
-               label-position="right"
-               label-width="80px"
-               v-if="sectionVisible">
-        <el-form-item label="客户端"
-                      prop="platform"
-                      v-if="isNew">
-          <el-select v-model="sectionForm.platform"
-                     style="width: 100% !important"
-                     clearable>
-            <el-option v-for="(item,index) in sectionList"
-                       :key="index"
-                       :label="item.label"
-                       :value="item.value"></el-option>
+    <el-dialog
+      :title="isNew ? '版本添加' : '版本修改'"
+      width="400px"
+      :visible.sync="sectionVisible"
+      v-if="sectionVisible"
+    >
+      <el-form
+        :model="sectionForm"
+        ref="sectionForm"
+        :rules="sectionRules"
+        label-position="right"
+        label-width="80px"
+        v-if="sectionVisible"
+      >
+        <el-form-item label="客户端" prop="platform" v-if="isNew">
+          <el-select
+            v-model="sectionForm.platform"
+            style="width: 100% !important"
+            clearable
+          >
+            <el-option
+              v-for="(item, index) in sectionList"
+              :key="index"
+              :label="item.label"
+              :value="item.value"
+            ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="版本号"
-                      prop="version"
-                      v-if="isNew">
-          <el-input v-model.trim="sectionForm.version"
-                    @mousewheel.native.prevent></el-input>
+        <el-form-item label="版本号" prop="version" v-if="isNew">
+          <el-input
+            v-model.trim="sectionForm.version"
+            @mousewheel.native.prevent
+          ></el-input>
         </el-form-item>
-        <el-form-item label="强制更新"
-                      prop="isForceUpdate">
-          <el-select clearable
-                      style="width: 100% !important"
-                     v-model="sectionForm.isForceUpdate">
-            <el-option label="是"
-                       :value="true"></el-option>
-            <el-option label="否"
-                       :value="false"></el-option>
+        <el-form-item label="强制更新" prop="isForceUpdate">
+          <el-select
+            clearable
+            style="width: 100% !important"
+            v-model="sectionForm.isForceUpdate"
+          >
+            <el-option label="是" :value="true"></el-option>
+            <el-option label="否" :value="false"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="状态"
-                      prop="status">
-          <el-select clearable
-                      style="width: 100% !important"
-                     v-model="sectionForm.status">
-            <el-option label="最新"
-                       value="newest"></el-option>
-            <el-option label="历史"
-                       value="history"></el-option>
+        <el-form-item label="状态" prop="status">
+          <el-select
+            clearable
+            style="width: 100% !important"
+            v-model="sectionForm.status"
+          >
+            <el-option label="最新" value="newest"></el-option>
+            <el-option label="历史" value="history"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="下载链接"
-                      prop="downloadUrl">
-          <el-input v-model.trim="sectionForm.downloadUrl"
-                    type="textarea"></el-input>
+        <el-form-item label="下载链接" prop="downloadUrl">
+          <el-input
+            v-model.trim="sectionForm.downloadUrl"
+            type="textarea"
+          ></el-input>
         </el-form-item>
-        <el-form-item label="描述"
-                      prop="description">
-          <el-input type="textarea"
-                    v-model="sectionForm.description"></el-input>
+        <el-form-item label="描述" prop="description">
+          <el-input
+            type="textarea"
+            v-model="sectionForm.description"
+          ></el-input>
         </el-form-item>
       </el-form>
-      <div slot="footer"
-           class="dialog-footer">
-        <el-button @click="resetForm">取 消</el-button>
-        <el-button v-if="isNew"
-                   type="primary"
-                   @click="createEdition">确 定</el-button>
-        <el-button v-if="!isNew"
-                   type="primary"
-                   @click="resetEdition">确 定</el-button>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="sectionVisible=false">取 消</el-button>
+        <el-button v-if="isNew" type="primary" @click="createEdition"
+          >确 定</el-button
+        >
+        <el-button v-if="!isNew" type="primary" @click="resetEdition"
+          >确 定</el-button
+        >
       </div>
     </el-dialog>
   </div>
 </template>
 <script>
-import { appVersionInfo, addAppVersionInfo, resetAppVersionInfo } from "@/api/systemManage";
+import {
+  appVersionInfo,
+  addAppVersionInfo,
+  resetAppVersionInfo,
+} from "@/api/systemManage";
 import pagination from "@/components/Pagination/index";
-import { decode } from 'js-base64'
+import { decode } from "js-base64";
 export default {
   components: {
-    pagination
+    pagination,
   },
-  data () {
+  data() {
     return {
       sectionVisible: false,
       tableList: [],
@@ -180,118 +201,113 @@ export default {
         limit: 10, // 限制显示条数
         page: 1, // 当前页
         total: 0, // 总条数
-        page_size: [10, 20, 40, 50] // 选择限制显示条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
       },
       searchForm: {
-        search: null
+        search: null,
       },
-      sectionList: [{ value: 'ios-teacher', label: '苹果-老师端' },
-      { value: 'ios-student', label: '苹果-学生端' }, { value: 'ios-education', label: '苹果-教务端' }, { value: 'android-teacher', label: '安卓-老师端' },
-      { value: 'android-student', label: '安卓-学生端' }, { value: 'android-education', label: '安卓-教务端' }],
+      sectionList: [
+        { value: "ios-teacher", label: "苹果-老师端" },
+        { value: "ios-student", label: "苹果-学生端" },
+        { value: "ios-education", label: "苹果-教务端" },
+        { value: "android-teacher", label: "安卓-老师端" },
+        { value: "android-student", label: "安卓-学生端" },
+        { value: "android-education", label: "安卓-教务端" },
+      ],
       sectionForm: {
-        platform: '',
-        version: '',
-        isForceUpdate: '',
-        downloadUrl: '',
-        status: '',
-        id: ''
+        platform: "",
+        version: "",
+        isForceUpdate: "",
+        downloadUrl: "",
+        status: "",
+        id: "",
       },
       sectionRules: {
         platform: [
-          { required: true, message: "请选择客户端", trigger: "blur" }
-        ],
-        version: [
-          { required: true, message: "请输入版本号", trigger: "blur" }
+          { required: true, message: "请选择客户端", trigger: "blur" },
         ],
+        version: [{ required: true, message: "请输入版本号", trigger: "blur" }],
         isForceUpdate: [
-          { required: true, message: "请选择是否强更", trigger: "blur" }
+          { required: true, message: "请选择是否强更", trigger: "blur" },
         ],
         status: [
-          { required: true, message: "请选择版本状态", trigger: "blur" }
+          { required: true, message: "请选择版本状态", trigger: "blur" },
         ],
       },
-      isNew: false
+      isNew: false,
     };
   },
-  activated () {
+  activated() {
     this.init();
   },
-  created () {
+  created() {
     this.init();
   },
   methods: {
-    search () {
+    search() {
       this.rules.page = 1;
-      this.getList()
+      this.getList();
     },
-    init () {
+    init() {
       this.getList();
     },
-    getList () {
-      this.searchForm.search ? this.searchForm.search : this.searchForm.search = null;
+    getList() {
+      this.searchForm.search
+        ? this.searchForm.search
+        : (this.searchForm.search = null);
       appVersionInfo({
         search: this.searchForm.search,
         page: this.rules.page,
         rows: this.rules.limit,
-      }).then(res => {
+      }).then((res) => {
         if (res.code == 200) {
-          this.tableList = res.data.rows.map(item => ({...item, downloadUrl: decode(item.downloadUrl || '')}));
+          this.tableList = res.data.rows.map((item) => ({
+            ...item,
+            downloadUrl: decode(item.downloadUrl || ""),
+          }));
           this.rules.total = res.data.total;
         }
       });
     },
-    createEdi () {
+    createEdi() {
       this.isNew = true;
       this.sectionVisible = true;
+
     },
-    createEdition () {
-      this.$refs.sectionForm.validate(v => {
+    createEdition() {
+      this.$refs.sectionForm.validate((v) => {
         if (v) {
-          addAppVersionInfo(this.sectionForm).then(res => {
+          addAppVersionInfo(this.sectionForm).then((res) => {
             if (res.code == 200) {
-              this.$message.success('新增成功')
+              this.$message.success("新增成功");
               this.sectionVisible = false;
 
-              this.getList()
+              this.getList();
             }
-          })
+          });
         }
-      })
-
+      });
     },
-    resetEdit (row) {
+    resetEdit(row) {
       this.isNew = false;
       this.$nextTick(() => {
         this.sectionForm = row;
-      })
+      });
       this.sectionVisible = true;
     },
-    resetEdition () {
+    resetEdition() {
       // 修改
-      resetAppVersionInfo(this.sectionForm).then(res => {
+      resetAppVersionInfo(this.sectionForm).then((res) => {
         if (res.code == 200) {
-          this.$message.success('修改成功')
+          this.$message.success("修改成功");
           this.sectionVisible = false;
-
-          this.getList()
+          this.getList();
         }
-      })
+      });
     },
-    resetForm () {
-      this.sectionForm = {
-        platform: '',
-        version: '',
-        isForceUpdate: '',
-        downloadUrl: '',
-        status: '',
-        id: ''
-      }
-      this.$refs.sectionForm.resetFields();
-      this.sectionVisible = false;
-    }
   },
   filters: {
-    statusFilter (val) {
+    statusFilter(val) {
       if (val == "newest") {
         return "最新";
       }
@@ -299,10 +315,24 @@ export default {
         return "历史";
       }
       return "";
-    }
-  }
+    },
+  },
+  watch: {
+    sectionVisible(val) {
+      if (!val) {
+        this.sectionForm = {
+          platform: "",
+          version: "",
+          isForceUpdate: "",
+          downloadUrl: "",
+          status: "",
+          id: "",
+        };
+        this.$refs["sectionForm"].resetFields();
+      }
+    },
+  },
 };
 </script>
 <style lang="sass">
-
 </style>

+ 4 - 4
src/views/teacherManager/teacherOperation/components/salarySet.vue

@@ -8,7 +8,7 @@
           <el-table-column label="乐团课课酬课时结算">
             <template slot-scope="scope">{{ scope.row.courseScheduleType | coursesType }}</template>
           </el-table-column>
-          <el-table-column label="默认课酬-主教">
+          <el-table-column label="自定义课酬-主教">
             <template slot-scope="scope">
               <el-input type="number"
                         @mousewheel.native.prevent
@@ -23,7 +23,7 @@
               </el-input>
             </template>
           </el-table-column>
-          <el-table-column label="默认课酬-助教">
+          <el-table-column label="自定义课酬-助教">
             <template slot-scope="scope">
               <el-input type="number"
                         @mousewheel.native.prevent
@@ -38,7 +38,7 @@
               </el-input>
             </template>
           </el-table-column>
-          <el-table-column label="3.0课酬-主教">
+          <el-table-column label="标准课酬-主教">
             <template slot-scope="scope">
               <el-input type="number"
                         @mousewheel.native.prevent
@@ -55,7 +55,7 @@
               </el-input>
             </template>
           </el-table-column>
-          <el-table-column label="3.0课酬-助教">
+          <el-table-column label="标准课酬-助教">
             <template slot-scope="scope">
               <el-input type="number"
                         @mousewheel.native.prevent

+ 26 - 6
src/views/teamBuild/components/teamBaseInfo.vue

@@ -147,7 +147,12 @@
               :key="item.userId"
               :label="item.realName"
               :value="item.userId"
-            ></el-option>
+            >
+                <span style="float: left">{{ item.realName }}</span>
+            <span style="float: right; color: #8492a6; font-size: 13px">{{
+              String(item.userId)
+            }}</span>
+            </el-option>
           </el-select>
         </el-form-item>
         <el-form-item
@@ -166,7 +171,12 @@
               :key="index"
               :label="item.realName"
               :value="item.userId"
-            ></el-option>
+            >
+                         <span style="float: left">{{ item.realName }}</span>
+            <span style="float: right; color: #8492a6; font-size: 13px">{{
+              String(item.userId)
+            }}</span>
+            </el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="维修技师" prop="repairUserId">
@@ -181,7 +191,12 @@
               :key="index"
               :label="item.userName"
               :value="item.userId"
-            ></el-option>
+            >
+                         <span style="float: left">{{ item.realName }}</span>
+            <span style="float: right; color: #8492a6; font-size: 13px">{{
+              String(item.userId)
+            }}</span>
+            </el-option>
           </el-select>
         </el-form-item>
         <!-- <el-form-item
@@ -276,8 +291,8 @@
             :disabled="basdisabled"
             filterable
           >
-            <el-option label="默认课酬" value="TEACHER_DEFAULT"></el-option>
-            <el-option label="3.0课酬" value="GRADIENT_SALARY"></el-option>
+            <el-option label="自定义课酬" value="TEACHER_DEFAULT"></el-option>
+            <el-option label="标准课酬" value="GRADIENT_SALARY"></el-option>
             <!-- <el-option label="课堂课酬" value="CLASSROOM_SALARY"></el-option> -->
           </el-select>
         </el-form-item>
@@ -305,7 +320,12 @@
               :key="index"
               :label="item.realName"
               :value="item.id"
-            ></el-option>
+            >
+                         <span style="float: left">{{ item.realName }}</span>
+            <span style="float: right; color: #8492a6; font-size: 13px">{{
+              String(item.id)
+            }}</span>
+            </el-option>
           </el-select>
         </el-form-item>
         <el-form-item label prop="isClass">

+ 273 - 117
src/views/teamDetail/componentCourse/addCompound.vue

@@ -1,157 +1,305 @@
 <template>
-  <div class="fixedBox">
+  <div class="fixedBox" @click="isLook = true">
     <el-card>
       <div class="boxWrap">
-        <p>临时合课列表<span style="color:red;"> {{compoundList.length}} </span></p>
-        <el-popover placement="top"
-                    v-model='isLook'
-                    trigger="click">
+        <p>
+          待处理课程列表<span style="color: red">
+            {{ compoundList.length }}
+          </span>
+        </p>
+        <el-popover placement="top" v-model="isLook" trigger="manual">
           <div>
-            <p class="title">临时合课列表 <i class="el-icon-minus minus"
-                 @click="isLook=false"></i></p>
+            <p class="title">
+              待处理课程列表<i
+                class="el-icon-minus minus"
+                @click="isLook = false"
+              ></i>
+            </p>
 
             <el-divider></el-divider>
           </div>
-          <el-button type="text"
-                     style="float:right"
-                     @click="clearCom">清空列表</el-button>
+          <el-button type="text" style="float: right" @click="clearCom"
+            >清空列表</el-button
+          >
           <div>
-            <el-radio-group v-model="radio">
-              <el-table :data="dataList"
-                        height='300px'
-                        :header-cell-style="{background:'#EDEEF0',color:'#444'}">
-                <el-table-column align='center'
-                                 label="主课"
-                                 width="110">
-                  <template slot-scope="scope">
+            <el-table
+              :data="dataList"
+              height="300px"
+              :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+            >
+              <el-table-column align="center" label="课程编号" width="110">
+                <template slot-scope="scope">
+                  <div>{{ scope.row.id }}</div>
+                </template>
+              </el-table-column>
+              <el-table-column
+                align="center"
+                width="180px"
+                label="课程名称"
+                prop="name"
+              ></el-table-column>
+              <el-table-column align="center" label="课程类型">
+                <template slot-scope="scope">
+                  <div>{{ scope.row.type | coursesType }}</div>
+                </template>
+              </el-table-column>
+              <el-table-column
+                align="center"
+                width="180px"
+                prop="teacherName"
+                label="指导老师"
+              >
+                <template slot-scope="scope">
+                  <div>
+                    {{ scope.row.teacherName }}({{ scope.row.actualTeacherId }})
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column align="center" width="200px" label="上课时间">
+                <template slot-scope="scope"
+                  >{{
+                    scope.row.startClassTime
+                      ? scope.row.startClassTime.substr(0, 16)
+                      : ""
+                  }}-{{
+                    scope.row.endClassTime
+                      ? scope.row.endClassTime.substr(11, 5)
+                      : ""
+                  }}</template
+                >
+              </el-table-column>
+              <el-table-column align="center" width="100px" label="是否结算">
+                <template slot-scope="scope">
+                  <div>
+                    {{ scope.row.isSettlement ? "是" : "否" }}
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column align="center" label="操作">
+                <template slot-scope="scope">
+                  <el-button type="text" @click="cancleCom(scope.row)"
+                    >取消</el-button
+                  >
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+          <div class="addBtnList">
+            <el-button
+              v-permission="'courseSchedule/batchDelete?page=teamCourseList'"
+              @click="removeCourse"
+              :disabled="!dataList.length > 0"
+              type="primary"
+              size="mini"
+              >批量删除</el-button
+            >
 
-                    <el-radio :label="scope.row.id"></el-radio>
+            <el-button type="primary" @click="resetClass" size="mini"
+              v-permission="'courseSchedule/batchCourseAdjust'"
 
-                  </template>
-                </el-table-column>
-                <el-table-column align='center'
-                                 width="180px"
-                                 label="课程名称"
-                                 prop="name"></el-table-column>
-                <el-table-column align="center"
-                                 label="课程类型">
-                  <template slot-scope="scope">
-                    <div>{{ scope.row.type | coursesType}}</div>
-                  </template>
-                </el-table-column>
-                <el-table-column align="center"
-                                 width="180px"
-                                 prop="teacherName"
-                                 label="指导老师">
-                  <template slot-scope="scope">
-                    <div>
-                      {{scope.row.teacherName}}({{scope.row.actualTeacherId}})
-                    </div>
-                  </template>
-                </el-table-column>
-                <el-table-column align="center"
-                                 width="200px"
-                                 label="上课时间">
-                  <template slot-scope="scope">{{ scope.row.startClassTime ? scope.row.startClassTime.substr(0, 16) : '' }}-{{ scope.row.endClassTime ? scope.row.endClassTime.substr(11,5) : ''}}</template>
-                </el-table-column>
-                <el-table-column align="center"
-                                 label="操作">
-                  <template slot-scope="scope">
-                    <el-button type="text"
-                               @click="cancleCom(scope.row)">取消</el-button>
-                  </template>
-                </el-table-column>
-              </el-table>
-            </el-radio-group>
+              >课程调整</el-button
+            >
+            <el-button type="primary" @click="submitClass" size="mini"
+            v-permission="'courseSchedule/courseMerge'"
+              >课程合并</el-button
+            >
           </div>
-          <el-button type="primary"
-                     size="mini"
-                     style="float:right;margin-top:20px;"
-                     @click="submitClass">确定</el-button>
-          <i class="el-icon-copy-document"
-             slot="reference"></i>
-        </el-popover>
 
+          <i class="el-icon-copy-document" slot="reference"></i>
+        </el-popover>
       </div>
     </el-card>
-    <el-dialog :visible.sync="show"
-               title="临时合课信息"
-               append-to-body
-               width="800px">
-      <compoundClass :show="show"
-                     v-if="show"
-                     @closeReset='closeReset'
-                     :isDisabled='true'
-                     @getList='getList'
-                     :idList='idList'
-                     :id='radio' />
+    <el-dialog
+      :visible.sync="show"
+      v-if="show"
+      title="临时合课信息"
+      append-to-body
+      width="800px"
+    >
+      <compoundClass
+        @closeReset="closeReset"
+        @cancaleMerge="cancaleMerge"
+        :isDisabled="true"
+        @getList="getList"
+        :idList="idList"
+        :dataList="dataList"
+      />
+    </el-dialog>
+
+    <el-dialog
+      :visible.sync="resetCourseVisible"
+      v-if="resetCourseVisible"
+        @closeReset="closeReset"
+      title="课程调整"
+      append-to-body
+      width="800px"
+    >
+      <resetCourse
+        :idList="idList"
+        :dataList="dataList"
+        @getList="getList"
+        @cancaleMerge="cancaleMerge"
+        @closeReset="closeReset"
+      />
     </el-dialog>
   </div>
 </template>
 <script>
-import compoundClass from './compoundClass'
+import compoundClass from "./compoundClass";
+import resetCourse from "./resetCourse";
 export default {
-  props: ['compoundList'],
-  components: { compoundClass },
-  data () {
+  props: ["compoundList"],
+  components: { compoundClass, resetCourse },
+  data() {
     return {
-      radio: '',
+      radio: "",
       dataList: this.compoundList,
       isLook: false,
       show: false,
-      idList:''
-    }
+      idList: "",
+      courseTime: 0,
+      resetCourseVisible: false,
+    };
   },
   methods: {
-    cancleCom (row) {
-      this.$emit('cancleCompound', row)
+    cancleCom(row) {
+      this.$emit("cancleCompound", row);
     },
-    clearCom () {
-      this.$emit('clearCom')
+    clearCom() {
+      this.$emit("clearCom");
     },
-    submitClass () {
-      if (!this.radio) {
-        this.$message.error('请选择一节主课')
-        return
-      }
-      // let arr = []
-      let idList = []
-      this.dataList.forEach(com => {
-        // arr.push(com.type)
-            idList.push(com.id)
-      })
-      // arr = [... new Set(arr)]
-      // if (arr.length != 1) {
-      //   this.$message.error('请选择相同的课程类型')
-      //   return
+    submitClass() {
+      // if (!this.radio) {
+      //   this.$message.error("请选择一节主课");
+      //   return;
       // }
+      let arr = [];
+      let idList = [];
+      let isFlage = false;
+      this.dataList.forEach((com) => {
+        arr.push(com.type);
+        idList.push(com.id);
+        if (
+          com.groupType != "MUSIC" ||
+          com.type == "MUSIC_NETWORK" ||
+          com.type == "HIGH_ONLINE"
+        ) {
+          this.$message.error("只有乐团课的下线课可以合并");
+          isFlage = true;
+          return;
+        }
+        if (com.status != "NOT_START") {
+          this.$message.error("只有未开始的课可以合并");
+          isFlage = true;
+          return;
+        }
+        if (com.newCourseId > 0 || com.beMerged) {
+          this.$message.error("已经合并课程不可再次合并");
+          isFlage = true;
+          return;
+        }
+        if (com.isLock) {
+          this.$message.error("已锁定的课程不能合并");
+          isFlage = true;
+          return;
+        }
+      });
+      if (isFlage) return;
+      /**
+       *  scope.row.groupType == 'MUSIC' &&
+                    scope.row.type != 'MUSIC_NETWORK' &&
+                    scope.row.type != 'HIGH_ONLINE' &&
+                    scope.row.status == 'NOT_START' &&
+                     scope.row.newCourseId <= 0
+                     !scope.row.beMerged &&
+                    !scope.row.isLock
+       */
+      if (arr.indexOf("HIGH") != -1) {
+        arr = [...new Set(arr)];
+        if (arr.length != 1) {
+          this.$message.error("基础技能课只能和基础技能课合并");
+          return;
+        }
+      }
+
       if (this.dataList.length <= 1) {
-        this.$message.error('请至少选择2节课程')
-        return
+        this.$message.error("请至少选择2节课程");
+        return;
       }
       // 做判断
-      this.idList = idList.join(',')
+      this.idList = idList.join(",");
       this.show = true;
-      this.isLook = false
-
+      // this.isLook = false;
+    },
+    getList() {},
+    closeReset() {
+      this.clearCom();
+      this.show = false;
+      this.isLook = false;
+      this.resetCourseVisible = false
+      this.$emit("getList");
+    },
+    cancaleMerge() {
+      this.show = false;
+      this.resetCourseVisible = false;
+      this.isLook = true;
+    },
+    removeCourse() {
+      this.$emit("removeCourse");
     },
-    getList () {
+    resetClass() {
+      // 判断条件
+      if (!this.checkCourseTimer()) {
+        this.$message.error("请选择相同的课程时长");
+      }
+      let isclassGroup;
+      let isNotStart = false;
+      let arr = [];
+      let  idList =[];
+      this.dataList.forEach((course) => {
+        idList.push(course.id)
+        arr.push(course.musicGroupId);
+        if (course.status != "NOT_START") {
+          isNotStart = true;
+        }
+      });
+      if (isNotStart) {
+        this.$message.error("请选择未开始的课程");
+        return;
+      }
 
+      if ((arr = [...new Set(arr)].length != 1)) {
+        this.$message.error("请选择相同的课程组");
+        return;
+      }
+       this.idList = idList;
+      //  开始选择课程
+      this.resetCourseVisible = true;
+    },
+    checkCourseTimer() {
+      let arr = [];
+      this.dataList.forEach((course) => {
+        let dayjs = this.$helpers.dayjs;
+        arr.push(
+          Math.abs(
+            dayjs(course.startClassTime).diff(course.endClassTime, "Minute")
+          )
+        );
+      });
+      if ((arr = [...new Set(arr)].length != 1)) {
+        return false;
+      } else {
+        this.courseTime = arr[0];
+        return true;
+      }
     },
-    closeReset () {
-      this.clearCom()
-      this.show = false
-      this.$emit('getList')
-     }
   },
   watch: {
-    compoundList (val) {
-      console.log(val)
-      this.dataList = val
-
-    }
-  }
-}
+    compoundList(val) {
+      this.dataList = val;
+    },
+  },
+};
 </script>
 <style lang="scss" scoped>
 .title {
@@ -186,4 +334,12 @@ export default {
   font-size: 20px;
   cursor: pointer;
 }
+.addBtnList {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: flex-end;
+  margin-top: 15px;
+  padding-bottom: 10px;
+}
 </style>

+ 64 - 11
src/views/teamDetail/componentCourse/compoundClass.vue

@@ -11,7 +11,28 @@
     >
       <el-row>
         <el-col :span="12">
-          <el-form-item label="课程名称" prop="teacher">
+          <el-form-item label="主课" prop="id">
+            <el-select
+              v-model.trim="maskForm.id"
+              style="width: 220px !important"
+              @change="changeId"
+              clearable
+              filterable
+            >
+              <el-option
+                v-for="(item, index) in dataList"
+                :key="index"
+                :value="item.id"
+                :label="item.name"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="12">
+          <el-form-item label="课程名称" prop="name">
             <el-input
               v-model.trim="maskForm.name"
               style="width: 220px !important"
@@ -32,7 +53,7 @@
       <el-row>
         <el-col :span="12">
           <el-form-item label="主教老师" prop="teacher">
-            <el-select
+            <!-- <el-select
               v-model.trim="maskForm.teacher"
               style="width: 220px !important"
               @change="changeTeacher"
@@ -44,8 +65,18 @@
                 :key="index"
                 :value="item.id"
                 :label="item.realName"
-              ></el-option>
-            </el-select>
+              >
+                <span style="float: left">{{ item.realName }}</span>
+                <span style="float: right; color: #8492a6; font-size: 13px">{{
+                  String(item.id)
+                }}</span>
+              </el-option>
+            </el-select> -->
+            <remote-search
+              :commit="'setTeachers'"
+              v-model="maskForm.teacher"
+              :width="220"
+            />
           </el-form-item>
         </el-col>
         <el-col :span="12">
@@ -58,7 +89,14 @@
             "
             prop="assistant"
           >
-            <el-select
+            <!-- :multiple="true" -->
+            <remote-search
+              :commit="'setTeachers'"
+              v-model="maskForm.assistant"
+              :multiple="true"
+              :width="220"
+            />
+            <!-- <el-select
               v-model.trim="maskForm.assistant"
               style="width: 220px !important"
               clearable
@@ -71,8 +109,13 @@
                 :key="index"
                 :value="item.id"
                 :label="item.realName"
-              ></el-option>
-            </el-select>
+              >
+                <span style="float: left">{{ item.realName }}</span>
+                <span style="float: right; color: #8492a6; font-size: 13px">{{
+                  String(item.id)
+                }}</span>
+              </el-option>
+            </el-select> -->
           </el-form-item>
         </el-col>
       </el-row>
@@ -174,7 +217,7 @@
       </el-row>
     </el-form>
     <div slot="footer" class="dialog-footer">
-      <el-button @click="$listeners.closeReset">取 消</el-button>
+      <el-button @click="cancaleMerge">取 消</el-button>
       <el-button type="primary" @click="submitResetClass">确 定</el-button>
     </div>
     <el-dialog
@@ -205,7 +248,7 @@ import { getTeachSchool } from "@/api/teacherManager";
 import cleanDeep from "clean-deep";
 import dayjs from "dayjs";
 export default {
-  props: ["show", "id", "isDisabled", "idList"],
+  props: ["show", "dataList", "isDisabled", "idList"],
   components: { viewStudentList },
   data() {
     return {
@@ -232,6 +275,7 @@ export default {
         endTime: [
           { required: true, message: "请选择上课结束时间", trigger: "blur" },
         ],
+        id: [{ required: true, message: "请选择一节主课", trigger: "blur" }],
       },
       teacherList: [],
       schoolList: [],
@@ -245,7 +289,7 @@ export default {
       }
     });
 
-    this.getDetail(this.id);
+    // this.getDetail(this.id);
   },
   methods: {
     submitResetClass() {
@@ -342,10 +386,16 @@ export default {
         this.maskForm.address = "";
       }
     },
+    changeId(val) {
+      if (val) {
+        this.getDetail(val);
+      } else {
+        this.$refs.maskForm.resetFields();
+      }
+    },
     getDetail(id) {
       getCourseScheduleDetail({ courseScheduleId: id }).then((res) => {
         if (res.code == 200) {
-          console.log(res.data.groupType);
           this.maskForm = {
             id: res.data.id,
             teacher: res.data.actualTeacherId,
@@ -393,6 +443,9 @@ export default {
         }
       });
     },
+    cancaleMerge() {
+      this.$emit("cancaleMerge");
+    },
   },
 
   watch: {

+ 123 - 0
src/views/teamDetail/componentCourse/modals/coursePostpone.vue

@@ -0,0 +1,123 @@
+<template>
+  <div>
+    <el-form :model="postponeForm" ref="postponeForm" :rules="postponeRules">
+      <el-form-item label="开始日期" prop="pauseDate">
+        <el-date-picker
+          v-model.trim="postponeForm.pauseDate"
+          type="date"
+          :disabled="true"
+          :picker-options="{
+            firstDayOfWeek: 1,
+          }"
+          value-format="yyyy-MM-dd"
+          placeholder="选择日期"
+        >
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="顺延日期" prop="recoveryDate">
+        <el-date-picker
+          v-model.trim="postponeForm.recoveryDate"
+          type="date"
+          :picker-options="processDate()"
+          value-format="yyyy-MM-dd"
+          placeholder="选择日期"
+        >
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="跳过节假日">
+        <el-checkbox v-model.trim="postponeForm.holiday"></el-checkbox>
+      </el-form-item>
+      <span style="color: #f56c6c"
+        >注意:课程顺延会将「开始日期」之后的全部未开始课程;<br />
+        调整到「顺延日期」之后重新排课 支持将课程批量提前;</span
+      >
+    </el-form>
+
+    <div class="buttonWrap">
+      <el-button @click="gotoNext" type="primary">下一步</el-button>
+          <el-button @click="()=>{$emit('cancaleMerge')}" >取 消</el-button>
+    </div>
+  </div>
+</template>
+<script>
+export default {
+  props: ["idList", "dataList"],
+  data() {
+    return {
+      postponeForm: {
+        pauseDate: "",
+        recoveryDate: "",
+        holiday: "",
+      },
+      postponeRules: {
+        pauseDate: [
+          { required: true, message: "请选择开始日期", trigger: "blur" },
+        ],
+        recoveryDate: [
+          { required: true, message: "请选择顺延日期", trigger: "blur" },
+        ],
+      },
+    };
+  },
+  mounted() {
+    this.getFirstDate();
+  },
+  methods: {
+    processDate() {
+      //提出结束时间必须大于提出开始时间
+      return {
+        firstDayOfWeek: 1,
+        disabledDate(time) {
+          return time.getTime() + 86400000 <= Date.now();
+          //开始时间不选时,结束时间最大值小于等于当天
+        },
+      };
+    },
+    gotoNext() {
+      this.$refs.postponeForm.validate((reset) => {
+        if (reset) {
+          let obj = {
+            courseScheduleIds: this.idList,
+            changeMainTeacher: false,
+            changeTeachingTeacher: false,
+            startDate: null,
+            startTime: "",
+            pauseDate:this.$helpers.dayjs(this.postponeForm.pauseDate).format('YYYY-MM-DD'),
+            recoveryDate:this.postponeForm.recoveryDate,
+            classGroupTeacherMapperList:null,
+            teachMode: null,
+            allowZeroSalary: false,
+            schoolId: null,
+            confirmGenerate: false,
+            holiday: this.postponeForm.holiday,
+          };
+          this.$emit("submit", obj);
+        }
+      });
+    },
+    getFirstDate() {
+      // this.postponeForm.pauseDate
+      this.dataList.forEach((course, index) => {
+        if (index == 0) {
+          this.postponeForm.pauseDate = course.classDate;
+        } else {
+          let dayjs = this.$helpers.dayjs;
+          dayjs(course.classDate).valueOf() -
+            dayjs(this.postponeForm.pauseDate).valueOf() >
+          0
+            ? this.postponeForm.pauseDate
+            : (this.postponeForm.pauseDate = course.classDate);
+        }
+      });
+    },
+  },
+};
+</script>
+<style  lang="scss" scoped>
+.buttonWrap {
+  width: 100%;
+  display: flex;
+  flex-direction: row;
+  justify-content: flex-end;
+}
+</style>

+ 80 - 0
src/views/teamDetail/componentCourse/modals/resetCoursePreview.vue

@@ -0,0 +1,80 @@
+<template>
+  <div>
+    <el-table
+      :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+      :data="details"
+    >
+      <el-table-column
+        label="乐团/课程组编号"
+        width="130px"
+        prop="musicGroupId"
+      >
+      </el-table-column>
+      <el-table-column prop="id" width="100px" label="课程编号">
+      </el-table-column>
+      <el-table-column align="center" width="150px" label="课程类型">
+        <template slot-scope="scope">
+          <div>{{ scope.row.type | coursesType }}</div>
+        </template>
+      </el-table-column>
+      <el-table-column prop="subjectName" label="声部"></el-table-column>
+      <el-table-column
+        label="课程名称"
+        prop="name"
+        width="150px"
+      ></el-table-column>
+      <el-table-column label="课程时长(分钟)" key="time">
+        <span slot-scope="scope">{{ getTimers(scope.row) }}</span>
+      </el-table-column>
+      <el-table-column
+        align="center"
+        prop="teacherName"
+        width="110"
+        label="主教老师"
+      ></el-table-column>
+      <el-table-column label="助教老师" prop="teachingTeacherNames"></el-table-column>
+      <el-table-column align="center" width="200px" label="上课时间">
+        <template slot-scope="scope"
+          >{{
+            scope.row.startClassTime
+              ? scope.row.startClassTime.substr(0, 16)
+              : ""
+          }}-{{
+            scope.row.endClassTime ? scope.row.endClassTime.substr(11, 5) : ""
+          }}</template
+        >
+      </el-table-column>
+      <el-table-column label="教学点">
+         <template slot-scope="scope">
+              <div>
+                {{ scope.row.schoolName ? scope.row.schoolName : "网络教室" }}
+              </div>
+            </template>
+      </el-table-column>
+      <el-table-column label="上课模式" prop="teachMode">
+          <template slot-scope="scope">
+              <div>
+                {{ scope.row.teachMode | paymentType}}课
+              </div>
+            </template>
+      </el-table-column>
+    </el-table>
+  </div>
+</template>
+<script>
+import { diffTimerFormMinute } from '@/utils/date'
+import dayjs from 'dayjs';
+export default {
+  props: ["details"],
+  data() {
+    return {};
+  },
+  methods:{
+     getTimers (item) {
+      const time = diffTimerFormMinute(dayjs(item.classDate).format('YYYY-MM-DD'), dayjs(item.startClassTime).format('HH:mm'), dayjs(item.endClassTime).format('HH:mm'))
+      return time
+    }
+  }
+};
+</script>
+

+ 148 - 0
src/views/teamDetail/componentCourse/modals/resetCourses.vue

@@ -0,0 +1,148 @@
+<template>
+  <div>
+    <el-form :inline="true" v-model="timeForm" ref="timeForm">
+      <el-form-item label="开始时间" prop="starttime">
+        <el-time-picker
+          v-model="timeForm.starttime"
+          @change="changeStartTime"
+          format="HH:mm"
+          value-format="HH:mm"
+          :picker-options="{
+            selectableRange: `04:00:00 - 23:59:00`,
+          }"
+          placeholder="选择时间"
+        ></el-time-picker>
+      </el-form-item>
+      <el-form-item label="结束时间" prop="endTime">
+        <el-time-picker
+          v-model="timeForm.endTime"
+          format="HH:mm"
+          value-format="HH:mm"
+          :disabled="true"
+          placeholder="选择时间"
+        ></el-time-picker>
+      </el-form-item>
+      <el-form-item label=" 上课模式" prop="teachMode">
+        <el-select
+          v-model.trim="timeForm.teachMode"
+          style="width: 220px !important"
+        >
+          <el-option label="线上课" value="ONLINE"></el-option>
+          <el-option label="线下课" value="OFFLINE"></el-option>
+          <el-option label="不修改" value=""></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label=" 教学地点" prop="address">
+        <el-select
+          v-model.trim="timeForm.address"
+          style="width: 220px !important"
+          filterable
+          clearable
+        >
+          <el-option label="不修改" :value="''"></el-option>
+          <el-option
+            v-for="(item, index) in schoolList"
+            :key="index"
+            :value="item.id"
+            :label="item.name"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+    </el-form>
+    <div class="buttonWrap">
+      <el-button @click="gotoNext" type="primary">下一步</el-button>
+      <el-button @click="()=>{$emit('cancaleMerge')}" >取 消</el-button>
+    </div>
+  </div>
+</template>
+<script>
+import { diffTimerFormMinute, addTimerFormMinute } from "@/utils/date";
+import { getSchool } from "@/api/systemManage";
+export default {
+  props: ["idList", "dataList"],
+  data() {
+    return {
+      timeForm: {
+        starttime: null,
+        endTime: "",
+        teachMode: "",
+        address: "",
+      },
+      timeRules: {
+        endTime: [
+          { required: true, message: "请选择结束时间", trigger: "blur" },
+        ],
+      },
+      schoolList: [],
+    };
+  },
+  mounted() {
+    getSchool().then((res) => {
+      if (res.code == 200) {
+        this.schoolList = res.data;
+      }
+    });
+  },
+  methods: {
+    changeStartTime(val) {
+      let dayjs = this.$helpers.dayjs;
+      const time = diffTimerFormMinute(
+        dayjs(this.dataList[0]?.classDate).format("YYYY-MM-DD"),
+        dayjs(this.dataList[0]?.startClassTime).format("HH:mm"),
+        dayjs(this.dataList[0]?.endClassTime).format("HH:mm")
+      );
+
+      if (val) {
+        this.$nextTick((res) => {
+          this.$set(this.timeForm, "starttime", val);
+        });
+
+        this.$set(
+          this.timeForm,
+          "endTime",
+          addTimerFormMinute(
+            dayjs(this.dataList[0]?.classDate).format("YYYY-MM-DD"),
+            this.timeForm.starttime,
+            time
+          )
+        );
+      } else {
+        this.$set(this.timeForm, "endTime", "");
+      }
+    },
+    gotoNext() {
+
+        if(!this.timeForm.starttime){
+          this.$message.error('请选择开始时间')
+          return
+        }
+          let obj = {
+            courseScheduleIds: this.idList,
+            changeMainTeacher: false,
+            changeTeachingTeacher: false,
+            startDate: null,
+            startTime: this.timeForm.starttime+":00",
+            pauseDate: null,
+            recoveryDate: null,
+            classGroupTeacherMapperList: null,
+            teachMode: this.timeForm.teachMode,
+            allowZeroSalary: false,
+            schoolId: this.timeForm.address,
+            confirmGenerate: false,
+            holiday: null,
+          };
+          this.$emit("submit", obj);
+
+
+    },
+  },
+};
+</script>
+<style  lang="scss" scoped>
+.buttonWrap {
+  width: 100%;
+  display: flex;
+  flex-direction: row;
+  justify-content: flex-end;
+}
+</style>

+ 102 - 0
src/views/teamDetail/componentCourse/modals/resetTeacher.vue

@@ -0,0 +1,102 @@
+<template>
+  <div>
+    <el-form
+      :model="maskForm"
+      class="maskForm"
+      ref="maskForm"
+      :rules="maskRules"
+      label-position="right"
+      :inline="true"
+    >
+      <!--  label-width="120px" -->
+      <el-row>
+        <el-col :span="12">
+          <el-form-item label="主教老师" prop="teacher">
+            <remote-search
+              :commit="'setTeachers'"
+              v-model="maskForm.teacher"
+              :width="220"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="助教老师" prop="assistant">
+            <!-- :multiple="true" -->
+            <remote-search
+              :commit="'setTeachers'"
+              v-model="maskForm.assistant"
+              :multiple="true"
+              :width="220"
+            />
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+    <div class="buttonWrap">
+      <el-button @click="gotoNext" type="primary">下一步</el-button>
+          <el-button @click="()=>{$emit('cancaleMerge')}" >取 消</el-button>
+    </div>
+  </div>
+</template>
+<script>
+export default {
+  props:['idList','dataList'],
+  data() {
+    return {
+      maskForm: {
+        teacher: "",
+        assistant: [],
+      },
+      maskRules: {
+        teacher: [
+          { required: true, message: "请选择主教老师名称", trigger: "blur" },
+        ],
+      },
+    };
+  },
+  methods: {
+    cancaleMerge() {
+      this.$emit("cancaleMerge");
+    },
+    gotoNext() {
+      this.$refs.maskForm.validate((reset) => {
+        if (reset) {
+          let classGroupTeacherMapperList = [
+            { userId: this.maskForm.teacher, teacherRole: "BISHOP" },
+          ];
+          for (let i in this.maskForm.assistant) {
+            classGroupTeacherMapperList.push({
+              userId: this.maskForm.assistant[i],
+              teacherRole: "TEACHING",
+            });
+          }
+          let obj = {
+            courseScheduleIds: this.idList,
+            changeMainTeacher: true,
+            changeTeachingTeacher: this.maskForm?.assistant?.length>0?true:false,
+            startDate: null,
+            startTime: "",
+            pauseDate: "",
+            recoveryDate: "",
+            classGroupTeacherMapperList:classGroupTeacherMapperList,
+            teachMode: null,
+            allowZeroSalary: false,
+            schoolId: null,
+            confirmGenerate: false,
+            holiday: false,
+          };
+          this.$emit("submit", obj);
+        }
+      });
+    },
+  },
+};
+</script>
+<style  lang="scss" scoped>
+  .buttonWrap{
+    width: 100%;
+    display: flex;
+    flex-direction: row;
+    justify-content: flex-end;
+  }
+</style>

+ 112 - 0
src/views/teamDetail/componentCourse/resetCourse.vue

@@ -0,0 +1,112 @@
+<template>
+  <div>
+    <!-- @tab-click="handleClick" -->
+    <el-tabs v-model="activeName">
+      <el-tab-pane label="老师调整" name="first">
+        <resetTeacher
+          v-if="activeName == 'first'"
+          @cancaleMerge="cancaleMerge"
+          :idList="idList"
+          :dataList="dataList"
+          @submit="submit"
+        />
+      </el-tab-pane>
+      <el-tab-pane label="课程顺延" name="second">
+        <couresPostpone   v-if="activeName == 'second'"  @cancaleMerge="cancaleMerge"
+          :idList="idList"
+          :dataList="dataList"
+          @submit="submit"/>
+      </el-tab-pane>
+      <el-tab-pane label="课程调整" name="third">
+        <courseResets  v-if="activeName == 'third'" @cancaleMerge="cancaleMerge"
+          :idList="idList"
+          :dataList="dataList"
+          @submit="submit"/>
+      </el-tab-pane>
+    </el-tabs>
+
+    <el-dialog
+      title="班级预览"
+      :visible.sync="previewVisible"
+      append-to-body
+      width="900px"
+    >
+      <preview :details="previewList" />
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="previewVisible = false">上一步</el-button>
+        <el-button type="primary" @click="resetsubmit">确认调整</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import resetTeacher from "./modals/resetTeacher";
+import couresPostpone from './modals/coursePostpone'
+import courseResets from './modals/resetCourses'
+import { batchCourseAdjust } from "@/api/buildTeam";
+import preview from "./modals/resetCoursePreview";
+export default {
+  components: { resetTeacher, preview,couresPostpone,courseResets },
+  props: ["dataList", "idList"],
+  data() {
+    return {
+      activeName: "first",
+      previewVisible: false,
+      previewList: [],
+      obj: {},
+    };
+  },
+  methods: {
+    handleClick(val) {
+
+    },
+    cancaleMerge() {
+      this.$emit("cancaleMerge");
+    },
+    async submit(form) {
+      try {
+        const res = await batchCourseAdjust(form);
+        if (res.code == 206) {
+          this.previewList = res.data;
+          this.previewVisible = true;
+          this.obj = form;
+        }
+        if(res.code == 200){
+            this.$message.success('调整成功')
+             this.$emit("closeReset");
+        }
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    async resetsubmit() {
+      try {
+        this.obj.confirmGenerate = true;
+        const res = await batchCourseAdjust(this.obj);
+        if (res.code == 200) {
+           this.$message.success('调整成功')
+          this.$emit("closeReset");
+        }
+        if(res.code == 207){
+           await this.$confirm(
+          res.msg || `当前课程课酬预计为0,是否继续`,
+          "提示",
+          {
+            type: "warning",
+          }
+        );
+        this.obj.allowZeroSalary = true;
+        await batchCourseAdjust(this.obj);
+        this.$message.success('调整成功')
+          this.$emit("closeReset");
+        }
+      } catch (e) {
+        console.log(e);
+      }
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 12 - 2
src/views/teamDetail/components/modals/change-teacher.vue

@@ -23,7 +23,12 @@
             :key="index"
             :label="item.realName"
             :value="String(item.id)"
-          ></el-option>
+          >
+          <span style="float: left">{{ item.realName }}</span>
+            <span style="float: right; color: #8492a6; font-size: 13px">{{
+              String(item.id)
+            }}</span>
+          </el-option>
         </el-select>
       </el-form-item>
       <el-form-item
@@ -44,7 +49,12 @@
             :key="index"
             :label="item.realName"
             :value="item.id"
-          ></el-option>
+          >
+          <span style="float: left">{{ item.realName }}</span>
+            <span style="float: right; color: #8492a6; font-size: 13px">{{
+              String(item.id)
+            }}</span>
+          </el-option>
         </el-select>
       </el-form-item>
     </el-form>

+ 12 - 2
src/views/teamDetail/components/modals/classroom-setting-merge.vue

@@ -39,7 +39,12 @@
             :key="index"
             :label="item.realName"
             :value="String(item.id)"
-          ></el-option>
+          >
+            <span style="float: left">{{ item.realName }}</span>
+            <span style="float: right; color: #8492a6; font-size: 13px">{{
+              String(item.id)
+            }}</span>
+          </el-option>
         </el-select>
         <!-- <remote-search :commit="'setTeachers'" v-model="form.coreTeacher"  /> -->
       </el-form-item>
@@ -65,7 +70,12 @@
             :key="index"
             :label="item.realName"
             :value="item.id"
-          ></el-option>
+          >
+            <span style="float: left">{{ item.realName }}</span>
+            <span style="float: right; color: #8492a6; font-size: 13px">{{
+              String(item.id)
+            }}</span>
+          </el-option>
         </el-select>
       </el-form-item>
       <!-- <el-form-item

+ 12 - 2
src/views/teamDetail/components/modals/classroom-setting.vue

@@ -39,7 +39,12 @@
             :key="index"
             :label="item.realName"
             :value="String(item.id)"
-          ></el-option>
+          >
+            <span style="float: left">{{ item.realName }}</span>
+            <span style="float: right; color: #8492a6; font-size: 13px">{{
+              String(item.id)
+            }}</span>
+          </el-option>
         </el-select>
         <remote-search :commit="'setTeachers'" v-model="form.coreTeacher"  />
      </el-form-item> -->
@@ -65,7 +70,12 @@
             :key="index"
             :label="item.realName"
             :value="item.id"
-          ></el-option>
+          >
+            <span style="float: left">{{ item.realName }}</span>
+            <span style="float: right; color: #8492a6; font-size: 13px">{{
+              String(item.id)
+            }}</span>
+          </el-option>
         </el-select>
       </el-form-item> -->
       <el-form-item

+ 12 - 2
src/views/teamDetail/components/modals/select-student.vue

@@ -20,7 +20,12 @@
                 :key="index"
                 :label="item.realName"
                 :value="String(item.id)"
-              ></el-option>
+              >
+                <span style="float: left">{{ item.realName }}</span>
+            <span style="float: right; color: #8492a6; font-size: 13px">{{
+              String(item.id)
+            }}</span>
+              </el-option>
             </el-select>
             <!-- <remote-search :commit="'setTeachers'" v-model="form.coreTeacher"  /> -->
           </el-form-item>
@@ -46,7 +51,12 @@
                 :key="index"
                 :label="item.realName"
                 :value="item.id"
-              ></el-option>
+              >
+                <span style="float: left">{{ item.realName }}</span>
+            <span style="float: right; color: #8492a6; font-size: 13px">{{
+              String(item.id)
+            }}</span>
+              </el-option>
             </el-select>
           </el-form-item>
         </el-col>

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

@@ -386,7 +386,10 @@
               :key="index"
               :label="item.realName"
               :value="String(item.id)"
-            ></el-option>
+            >
+             <span style="float: left">{{ item.realName }}</span>
+      <span style="float: right; color: #8492a6; font-size: 13px">{{String(item.id)}}</span>
+            </el-option>
           </el-select>
           <!-- <remote-search
             :commit="'setTeachers'"
@@ -430,7 +433,10 @@
               :key="index"
               :label="item.realName"
               :value="item.id"
-            ></el-option>
+            >
+                         <span style="float: left">{{ item.realName }}</span>
+      <span style="float: right; color: #8492a6; font-size: 13px">{{String(item.id)}}</span>
+            </el-option>
           </el-select>
           <!-- <remote-search
             :commit="'setTeachers'"

+ 116 - 44
src/views/teamDetail/teamCourseList.vue

@@ -205,19 +205,12 @@
           <el-col>
             <el-button native-type="submit" type="primary">搜索</el-button>
             <el-button native-type="reset" type="danger">重置</el-button>
-            <auth auths="export/superFindCourseSchedules">
-              <el-button @click="onCourseExport" type="primary"
-                >导出课表</el-button
-              >
-            </auth>
-            <auth auths="courseSchedule/batchDelete?page=teamCourseList">
-              <el-button
-                @click="removeCourse"
-                :disabled="!deleteList.length > 0"
-                type="primary"
-                >批量删除</el-button
-              >
-            </auth>
+            <el-button
+              v-permission="'export/superFindCourseSchedules'"
+              @click="onCourseExport"
+              type="primary"
+              >导出课表</el-button
+            >
           </el-col>
         </el-row>
       </save-form>
@@ -225,8 +218,11 @@
       <div class="tableWrap" style="margin-top: 20px">
         <el-table
           :data="tableList"
+          ref="tableList"
           :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
           @selection-change="handleSelectionChange"
+           @select='onTableSelect'
+          row-key="id"
         >
           >
           <el-table-column
@@ -345,8 +341,10 @@
                 <el-button
                   type="text"
                   @click="common(scope.row)"
-                  v-if=" scope.row.newCourseId > 0 &&
-                  scope.row.newCourseId != scope.row.id"
+                  v-if="
+                    scope.row.newCourseId > 0 &&
+                    scope.row.newCourseId != scope.row.id
+                  "
                 >
                   被合并课
                 </el-button>
@@ -395,7 +393,7 @@
                   >调整</el-button
                 >
 
-                <el-button
+                <!-- <el-button
                   type="text"
                   @click="addCompound(scope.row)"
                   v-if="
@@ -419,7 +417,7 @@
                   "
                   @click="cancleCompound(scope.row)"
                   >取消合课</el-button
-                >
+                > -->
                 <el-button
                   type="text"
                   v-if="
@@ -645,10 +643,13 @@
       />
     </el-dialog>
     <addCompound
-      :compoundList="compoundList"
+    ref='addCompound'
+      :compoundList="deleteList"
       v-if="permission('courseSchedule/courseMerge')"
+      v-show="deleteList.length>0"
       @clearCom="clearCom"
       @getList="getList"
+      @removeCourse="removeCourse"
       @cancleCompound="cancleCompound"
     />
   </div>
@@ -733,6 +734,7 @@ export default {
       compoundList: [],
       deleteList: [],
       isMainGo: false,
+      isDetele: false,
     };
   },
   components: {
@@ -781,8 +783,8 @@ export default {
       }
     }
     // 课程时间段异常,不需要时间搜索
-    if(query.searchType == 'COURSE_TIME_ERROR') {
-      this.searchForm.timer = []
+    if (query.searchType == "COURSE_TIME_ERROR") {
+      this.searchForm.timer = [];
     }
 
     if (query.organId) {
@@ -807,25 +809,37 @@ export default {
     },
     async removeCourse(row) {
       if (this.deleteList.length < 1 && !row) {
-        this.$message.error("请自少选择一个班级");
+        this.$message.error("请自少选择一节课");
         return;
       }
-
+      let flag = false;
       let arr = this.deleteList.map((course) => {
+        if (course.isSettlement || course.status == "UNDERWAY") {
+          flag = true;
+        }
         return course.id;
       });
+      if (flag) {
+        this.$message.error("已结算或进行中的课程无法删除");
+        return;
+      }
       let courseScheduleIds = arr.join(",") || row.id;
-      try {
-        await this.$confirm("是否确认删除此数据?", "提示", {
-          type: "warning",
-        });
+
+      this.$confirm("是否确认删除此数据?", "提示", {
+        type: "warning",
+      }).then(() => {
         bathDelete({ courseScheduleIds: courseScheduleIds }).then((res) => {
           if (res.code == 200) {
             this.$message.success("删除成功");
             this.getList();
+            this.deleteList = [];
           }
+        }).catch((e)=>{
+            this.$refs.addCompound.isLook = true
         });
-      } catch (error) {}
+      }).catch((e) => {
+        this.$refs.addCompound.isLook = true
+      });;
     },
     reset() {
       this.searchForm = { ...initSearch };
@@ -946,6 +960,20 @@ export default {
         if (res.code == 200) {
           this.tableList = res.data.rows;
           this.rules.total = res.data.total;
+          let idList = this.deleteList.map((course) => {
+            return course.id;
+          });
+          this.isDetele = true;
+          this.$nextTick(() => {
+            this.tableList.forEach((course) => {
+              if (idList.indexOf(course.id) != -1) {
+                this.$refs.tableList.toggleRowSelection(course, true);
+              }
+            });
+            this.isDetele = false;
+          });
+
+          // let arr = this.$helpers.lodash.differenceWith( this.tableList, this.deleteList,'id')
         }
       });
     },
@@ -997,32 +1025,37 @@ export default {
         })
         .catch(() => {});
     },
-    addCompound(row) {
-      this.compoundList.push(row);
-      this.compoundList = [...new Set(this.compoundList)];
-    },
-    isAddCom(row) {
-      let flag = false;
-      this.compoundList.forEach((com) => {
-        if (com.id == row.id) {
-          flag = true;
-        }
-      });
-      return flag;
-    },
+    // addCompound(row) {
+    //   this.compoundList.push(row);
+    //   this.compoundList = [...new Set(this.compoundList)];
+    // },
+    // isAddCom(row) {
+    //   let flag = false;
+    //   this.compoundList.forEach((com) => {
+    //     if (com.id == row.id) {
+    //       flag = true;
+    //     }
+    //   });
+    //   return flag;
+    // },
     cancleCompound(row) {
       let indexNum = null;
-      this.compoundList.forEach((com, index) => {
+      this.deleteList.forEach((com, index) => {
         if (com.id == row.id) {
           indexNum = index;
         }
       });
       if (indexNum + "") {
-        this.compoundList.splice(indexNum, 1);
+        this.deleteList.splice(indexNum, 1);
       }
+      console.log(row);
+      this.$refs.tableList.toggleRowSelection(row);
     },
     clearCom() {
-      this.compoundList = [];
+      // this.deleteList = [];
+      this.$set(this,'deleteList',[])
+      this.$refs.tableList.clearSelection();
+      this.$refs.addCompound.isLook = false
     },
     resetCompound(row) {
       this.$confirm("您确定取消合并该课程?", "提示", {
@@ -1041,7 +1074,38 @@ export default {
         .catch(() => {});
     },
     handleSelectionChange(arr) {
-      this.deleteList = arr;
+      // this.deleteList = arr;
+      if (arr.length > 0) {
+        // 有可能加 有可能减
+        this.deleteList = this.deleteList.concat(arr);
+        // 去重
+        this.deleteList = this.$helpers.lodash.uniqBy(this.deleteList, "id");
+      }
+      // else if(){}
+      else {
+        if (this.isDetele) return;
+        // 有2种 1是新页
+        // 2是点击反选
+        let idList = this.deleteList.map((course) => {
+          return course.id;
+        });
+        this.$nextTick(() => {
+          let tableIdList = [];
+          this.tableList.forEach((course) => {
+            tableIdList.push(course.id);
+            if (idList.indexOf(course.id) != -1) {
+              this.$refs.tableList.toggleRowSelection(course, false);
+              // 删除这个元素
+            }
+          });
+          this.deleteList = this.$helpers.lodash.remove(
+            this.deleteList,
+            function (item) {
+              return tableIdList.indexOf(item.id) == -1;
+            }
+          );
+        });
+      }
     },
     gotoCourse(row) {
       if (row.groupType == "MUSIC") {
@@ -1061,6 +1125,14 @@ export default {
         });
       }
     },
+   onTableSelect(rows,row){
+       let idList = this.deleteList.map((course) => {
+          return course.id;
+        });
+        if(idList.indexOf(row.id)!= -1){
+          this.deleteList.splice(idList.indexOf(row.id),1)
+        }
+   }
   },
   filters: {
     isCall(val) {