Selaa lähdekoodia

Merge branch 'Nov16thResetMusic' into online

wolyshaw 4 vuotta sitten
vanhempi
commit
083bdd9ab6

+ 1 - 0
debug.log

@@ -0,0 +1 @@
+[1202/094138.882:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)

+ 27 - 2
src/api/buildTeam.js

@@ -1185,10 +1185,14 @@ export function addMusicGroupPaymentCalender (data) {
 }
 // 查询周期(缴费日历)
 export function getMusicGroupPaymentCalender (data) {
-  return request({
+  return request2({
     url: api + '/musicGroupPaymentCalender/queryPage',
     method: 'get',
-    params: data
+    params: data,
+    requestType: 'form',
+    headers: {
+      'content-type': 'application/x-www-form-urlencoded'
+    }
   })
 }
 
@@ -1395,3 +1399,24 @@ export function courseMerge (data) {
     data: qs.stringify(data)
   })
 }
+
+
+// 查询班级剩余课次
+export function getClassGroupSubCourseNum (data) {
+  return request2({
+    url: api + `/classGroup/classGroupSubCourseNum`,
+    method: 'GET',
+    params: data,
+    data: {},
+  })
+}
+// 生成默认缴费信息
+export function getDefaultPaymentCalender (data) {
+  return request2({
+    url: api + `/classGroup/getDefaultPaymentCalender`,
+    method: 'post',
+    params:{},
+    data
+  })
+}
+

+ 1 - 1
src/helpers/index.js

@@ -22,7 +22,7 @@ export class Searchs {
     let json = {}
     try {
       const val = sessionStorage.getItem(this.saveKey)
-      json = JSON.parse(val) || {}
+      json = JSON.parse(val) || initSearch
     } catch (error) {}
     return json
   }

+ 2 - 2
src/views/accompaniment/index.vue

@@ -25,7 +25,7 @@
             <el-option v-for="item in selects.subjects" :value="item.id" :label="item.name" :key="item.id"></el-option>
           </el-select>
         </el-form-item>
-        <el-button @click="submit" type="primary">提交</el-button>
+        <el-button @click="submit" type="primary">搜索</el-button>
         <el-button @click="reset" type="danger">重置</el-button>
       </saveform>
       <el-table
@@ -184,7 +184,7 @@ export default {
         const res = await QueryPage({
           ...this.searchForm,
           page: this.rules.page,
-          limit: this.rules.limit,
+          rows: this.rules.limit,
         })
         this.tableList = res.data.rows
         this.$set(this.rules, 'total', res.data.total)

+ 53 - 32
src/views/resetTeaming/components/resetPayList.vue

@@ -52,26 +52,6 @@
           </template>
         </el-table-column>
         <el-table-column align="center"
-                         prop="startPaymentDate"
-                         width="200"
-                         label="缴费日期">
-          <template slot-scope="scope">
-            <div>
-              {{ scope.row.startPaymentDate | formatTimer }} ~ {{ scope.row.deadlinePaymentDate | formatTimer }}
-            </div>
-          </template>
-        </el-table-column>
-        <el-table-column align="center"
-                         prop="expectNum"
-                         width="200"
-                         label="缴费人数(预计/实际)">
-          <template slot-scope="scope">
-            <div>
-              {{scope.row.expectNum}}/{{scope.row.actualNum}}
-            </div>
-          </template>
-        </el-table-column>
-        <el-table-column align="center"
                          prop="paymentPattern"
                          label="缴费方式">
           <template slot-scope="scope">
@@ -81,16 +61,21 @@
           </template>
         </el-table-column>
         <el-table-column align="center"
-                         prop="paymentValidStartDate"
-                         width="200"
-                         label="缴费有效期">
+                         prop="addCourseTotalTime"
+                         width="150px"
+                         label="加课总时长">
+        </el-table-column>
+        <el-table-column align="center"
+                         width="150px"
+                         prop="courseCurrentPrice"
+                         label="现价">
           <template slot-scope="scope">
             <div>
-              {{ scope.row.paymentValidStartDate | formatTimer }} ~ {{ scope.row.paymentValidEndDate | formatTimer }}
+              {{ scope.row.courseCurrentPrice | moneyFormat }}
             </div>
           </template>
         </el-table-column>
-        <el-table-column align="center"
+        <!-- <el-table-column align="center"
                          prop="status"
                          label="缴费状态">
           <template slot-scope="scope">
@@ -98,19 +83,31 @@
               {{ scope.row.status | payTypeStatus }}
             </div>
           </template>
+        </el-table-column> -->
+        <el-table-column align="center"
+                         prop="operatorName"
+                         label="责任人">
         </el-table-column>
         <el-table-column align="center"
                          prop="memo"
-                         label="备注"></el-table-column>
+                         width="200px"
+                         label="备注">
+                     <template slot-scope="scope">
+                       <overflow-text width="200px" :text="scope.row.memo"/>
+                     </template>
+        </el-table-column>
         <el-table-column label="操作"
                          fixed="right"
-                         min-width="260px">
+                         min-width="60px">
           <template slot-scope="scope">
             <div>
               <el-button type="text"
+                         @click="lookList(scope.row)"
+                         v-permission="'musicGroupPaymentCalender/queryPage'">查看</el-button>
+              <!-- <el-button type="text"
                          @click="lookDetail(scope.row)"
-                         v-permission="'musicGroupPaymentCalender/auditListDetail'">查看</el-button>
-              <el-button type="text"
+                         v-permission="'musicGroupPaymentCalender/auditListDetail'">查看</el-button> -->
+              <!-- <el-button type="text"
                          @click="openChioseStudent(scope.row)"
                          v-if="scope.row.status != 'REJECT' && scope.row.status != 'AUDITING'&&teamStatus && scope.row.paymentType != 'MUSIC_APPLY' && scope.row.paymentType != 'ADD_STUDENT'"
                          v-permission="'musicGroupPaymentCalenderDetail/batchAdd'">添加学员</el-button>
@@ -125,7 +122,7 @@
               <el-button type="text"
                          v-if="isNewGropu"
                          v-permission="'musicGroup/findMusicGroupSubjectInfo/966'"
-                         @click="onPreview(scope.row)">预览</el-button>
+                         @click="onPreview(scope.row)">预览</el-button> -->
             </div>
           </template>
         </el-table-column>
@@ -136,6 +133,22 @@
                   :page-sizes="rules.page_size"
                   @pagination="getList" />
     </div>
+    <el-dialog
+      :visible.sync="itemsVisible"
+      title="查看缴费计划"
+      width="1000px"
+    >
+      <pay-items
+        v-if="itemsVisible"
+        :batchNo="viewDetail && viewDetail.batchNo"
+        payUserType="STUDENT"
+        :teamStatus="teamStatus"
+        @lookDetail="lookDetail"
+        @openChioseStudent="openChioseStudent"
+        @resetPay="resetPay"
+        @close="itemsVisible = false"
+      />
+    </el-dialog>
     <el-dialog :visible.sync="payVisible"
                :close-on-click-modal="false"
                width="500px"
@@ -343,12 +356,14 @@ import dayjs from 'dayjs'
 import QrCode from "@/components/QrCode/index";
 import { vaildStudentUrl } from '@/utils/validate'
 import { addMusicGroupPaymentCalender, getMusicGroupPaymentCalender, resetMusicGroupPaymentCalender, delMusicGroupPaymentCalender, findMusicGroupSubjectInfo } from "@/api/buildTeam";
+import { getAuditList } from '@/api/auditManager'
 import {
   getOrganizationCourseUnitPriceSettings
 } from '@/api/specialSetting'
 import { musicGroupPaymentCalenderQueryPage, getMusicGroupStu, musicGroupPaymentCalenderDetailBatchAdd } from '../api'
 import setStudentFee from './studentPayBase'
 import userPayForm from '../modals/user-pay-form'
+import payItems from '../modals/pay-items'
 import schoolPayForm from '../modals/school-pay-form'
 import review from '../modals/review'
 import reviewDetail from '../modals/review-detail'
@@ -366,6 +381,7 @@ export default {
     QrCode,
     review,
     reviewDetail,
+    'pay-items': payItems,
     subjectPreview
   },
   data () {
@@ -374,6 +390,7 @@ export default {
       payFormType: "user",
       userVisible: false,
       schoolVisible: false,
+      itemsVisible: false,
       reviewVisible: false,
       organizationCourseUnitPriceSettings: [],
       searchForm: {
@@ -478,10 +495,10 @@ export default {
     },
     getList () {
       let musicGroupId = this.$route.query.id
-      return musicGroupPaymentCalenderQueryPage({
+      return getAuditList({
         page: this.rules.page,
         rows: this.rules.limit,
-        musicGroupId,
+        search: musicGroupId,
         payUserType: 'STUDENT',
         paymentType: this.searchForm.paymentType,
       }).then(res => {
@@ -546,6 +563,10 @@ export default {
         })
         .catch(() => { });
     },
+    lookList(row) {
+      this.viewDetail = row
+      this.itemsVisible = true
+    },
     lookDetail (row) {
       let query = this.$route.query;
       this.$route.query.paymentId = row.id;

+ 59 - 25
src/views/resetTeaming/components/resetPayListSchool.vue

@@ -52,16 +52,6 @@
           </template>
         </el-table-column>
         <el-table-column align="center"
-                         prop="expectNum"
-                         width="200"
-                         label="缴费人数(预计/实际)">
-          <template slot-scope="scope">
-            <div>
-              {{scope.row.expectNum}}/{{scope.row.actualNum}}
-            </div>
-          </template>
-        </el-table-column>
-        <el-table-column align="center"
                          prop="paymentPattern"
                          label="缴费方式">
           <template slot-scope="scope">
@@ -71,16 +61,21 @@
           </template>
         </el-table-column>
         <el-table-column align="center"
-                         prop="paymentValidStartDate"
-                         width="200"
-                         label="缴费有效期">
+                         prop="addCourseTotalTime"
+                         width="150px"
+                         label="加课总时长">
+        </el-table-column>
+        <el-table-column align="center"
+                         width="150px"
+                         prop="courseCurrentPrice"
+                         label="现价">
           <template slot-scope="scope">
             <div>
-              {{ scope.row.paymentValidStartDate | formatTimer }} ~ {{ scope.row.paymentValidEndDate | formatTimer }}
+              {{ scope.row.courseCurrentPrice | moneyFormat }}
             </div>
           </template>
         </el-table-column>
-        <el-table-column align="center"
+        <!-- <el-table-column align="center"
                          prop="status"
                          label="缴费状态">
           <template slot-scope="scope">
@@ -88,19 +83,31 @@
               {{ scope.row.status | payTypeStatus }}
             </div>
           </template>
+        </el-table-column> -->
+        <el-table-column align="center"
+                         prop="operatorName"
+                         label="责任人">
         </el-table-column>
         <el-table-column align="center"
                          prop="memo"
-                         label="备注"></el-table-column>
+                         width="200px"
+                         label="备注">
+                     <template slot-scope="scope">
+                       <overflow-text width="200px" :text="scope.row.memo"/>
+                     </template>
+        </el-table-column>
         <el-table-column label="操作"
                          fixed="right"
-                         min-width="260px">
+                         min-width="60px">
           <template slot-scope="scope">
             <div>
               <el-button type="text"
+                         @click="lookList(scope.row)"
+                         v-permission="'musicGroupPaymentCalender/queryPage'">查看</el-button>
+              <!-- <el-button type="text"
                          @click="lookDetail(scope.row)"
-                         v-permission="'musicGroupPaymentCalender/auditListDetail'">查看</el-button>
-              <el-button type="text"
+                         v-permission="'musicGroupPaymentCalender/auditListDetail'">查看</el-button> -->
+              <!-- <el-button type="text"
                          @click="openChioseStudent(scope.row)"
                          v-if="scope.row.status != 'REJECT' && scope.row.status != 'AUDITING'&&teamStatus && scope.row.paymentType != 'MUSIC_APPLY' && scope.row.paymentType != 'ADD_STUDENT'"
                          v-permission="'musicGroupPaymentCalenderDetail/batchAdd'">添加学员</el-button>
@@ -108,11 +115,14 @@
                          v-if="scope.row.status == 'REJECT'&&teamStatus"
                          v-permission="'musicGroupPaymentCalender/update'"
                          @click="resetPay(scope.row)">修改</el-button>
+
+              <el-button type="text"
+                         v-if="!isNewGropu&&teamStatus&&scope.row.paymentType!='MUSIC_APPLY'"
+                         @click="onCreateQRCode(scope.row)">续费二维码</el-button>
               <el-button type="text"
-                         v-permission="'musicGroupPaymentCalender/makesureSchoolePaid'"
-                         v-if="scope.row.status == 'OPEN'&&teamType=='resetTeam'"
-                         @click="commmitGetMoney(scope.row)">确认收款</el-button>
-              <!-- <el-button type="text" v-if="!isNewGropu" @click="onCreateQRCode(scope.row)">续费二维码</el-button> -->
+                         v-if="isNewGropu"
+                         v-permission="'musicGroup/findMusicGroupSubjectInfo/966'"
+                         @click="onPreview(scope.row)">预览</el-button> -->
             </div>
           </template>
         </el-table-column>
@@ -241,6 +251,22 @@
                    @click="resetPayDate">确 定</el-button>
       </div>
     </el-dialog>
+    <el-dialog
+      :visible.sync="itemsVisible"
+      title="查看缴费计划"
+      width="1000px"
+    >
+      <pay-items
+        v-if="itemsVisible"
+        :batchNo="viewDetail && viewDetail.batchNo"
+        payUserType="STUDENT"
+        :teamStatus="teamStatus"
+        @lookDetail="lookDetail"
+        @openChioseStudent="openChioseStudent"
+        @resetPay="resetPay"
+        @close="itemsVisible = false"
+      />
+    </el-dialog>
     <el-dialog title="查看"
                :visible.sync="reviewVisible"
                width="900px"
@@ -321,9 +347,11 @@ import { addMusicGroupPaymentCalender, getMusicGroupPaymentCalender, resetMusicG
 import {
   getOrganizationCourseUnitPriceSettings
 } from '@/api/specialSetting'
+import { getAuditList } from '@/api/auditManager'
 import { musicGroupPaymentCalenderQueryPage, getMusicGroupStu, musicGroupPaymentCalenderDetailBatchAdd } from '../api'
 import setStudentFee from './studentPayBase'
 import userPayForm from '../modals/user-pay-form'
+import payItems from '../modals/pay-items'
 import schoolPayForm from '../modals/school-pay-form'
 import isGetMoney from '../modals/isGetMoney'
 import review from '../modals/review'
@@ -342,6 +370,7 @@ export default {
     review,
     reviewDetail,
     teamType: '',
+    'pay-items': payItems,
     isGetMoney
   },
   data () {
@@ -351,6 +380,7 @@ export default {
       userVisible: false,
       schoolVisible: false,
       reviewVisible: false,
+      itemsVisible: false,
       teamType: this.$route.query.type,
       organizationCourseUnitPriceSettings: [],
       searchForm: {
@@ -451,10 +481,10 @@ export default {
     },
     getList () {
       let musicGroupId = this.$route.query.id
-      return musicGroupPaymentCalenderQueryPage({
+      return getAuditList({
         page: this.rules.page,
         rows: this.rules.limit,
-        musicGroupId,
+        search: musicGroupId,
         payUserType: 'SCHOOL',
         paymentType: this.searchForm.paymentType,
       }).then(res => {
@@ -519,6 +549,10 @@ export default {
         })
         .catch(() => { });
     },
+    lookList(row) {
+      this.viewDetail = row
+      this.itemsVisible = true
+    },
     lookDetail (row) {
       let query = this.$route.query;
       this.$route.query.paymentId = row.id;

+ 4 - 2
src/views/resetTeaming/index.vue

@@ -46,7 +46,7 @@
         <el-tab-pane label="班级调整"
                      v-if="permission('/resetTeaming/resetClass')"
                      name="5">
-          <resetClass v-if="activeIndex == 5" />
+          <resetClass v-if="activeIndex == 5"  :musicGroupInfo='musicGroupInfo'/>
         </el-tab-pane>
         <!-- <el-tab-pane label="新增排课"
                      v-if="permission('/resetTeaming/coursePlan')"
@@ -92,7 +92,8 @@ export default {
       Fsearch: null,
       Frules: null,
       name: null,
-      teamName: '乐团修改'
+      teamName: '乐团修改',
+      musicGroupInfo:null
     }
   },
   created () {
@@ -131,6 +132,7 @@ export default {
     getBaseInfo (baseInfo) {
       this.baseInfo = baseInfo
       this.teamName = baseInfo.musicGroup.name
+      this.musicGroupInfo = baseInfo.musicGroup
     },
     handleClick (val) {
       this.activeIndex = val.name

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

@@ -180,7 +180,6 @@ export default {
   },
   computed: {
     list() {
-      console.log(this.form)
       return {
         form: this.form
       }

+ 157 - 0
src/views/resetTeaming/modals/pay-items.vue

@@ -0,0 +1,157 @@
+<template>
+  <div>
+    <el-table :data="list" :header-cell-style="{ background: '#EDEEF0', color: '#444' }">
+      <el-table-column
+        align="center"
+        prop="batchNo"
+        width="200"
+        label="订单编号"
+      ></el-table-column>
+      <el-table-column align="center" prop="paymentType" label="缴费类型">
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.paymentType | userPaymentTypeFormat }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        align="center"
+        prop="expectNum"
+        width="200"
+        label="缴费人数(预计/实际)"
+      >
+        <template slot-scope="scope">
+          <div>{{ scope.row.expectNum }}/{{ scope.row.actualNum }}</div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" prop="paymentPattern" label="缴费方式">
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.paymentPattern | teamPayStatus }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        align="center"
+        prop="paymentValidStartDate"
+        width="200"
+        label="缴费有效期"
+      >
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.paymentValidStartDate | formatTimer }} ~
+            {{ scope.row.paymentValidEndDate | formatTimer }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" prop="status" label="缴费状态">
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.status | payTypeStatus }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" prop="memo" label="备注"></el-table-column>
+      <el-table-column label="操作" fixed="right" min-width="260px">
+        <template slot-scope="scope">
+          <div>
+            <el-button
+              type="text"
+              @click="toDetail(scope.row)"
+              v-permission="'musicGroupPaymentCalender/auditListDetail'"
+              >查看</el-button
+            >
+            <el-button
+              type="text"
+              @click="$listeners.openChioseStudent(scope.row)"
+              v-if="
+                scope.row.status != 'REJECT' &&
+                scope.row.status != 'AUDITING' &&
+                teamStatus &&
+                scope.row.paymentType != 'MUSIC_APPLY' &&
+                scope.row.paymentType != 'ADD_STUDENT'
+              "
+              v-permission="'musicGroupPaymentCalenderDetail/batchAdd'"
+              >添加学员</el-button
+            >
+            <el-button
+              type="text"
+              v-if="scope.row.status == 'REJECT' && teamStatus"
+              v-permission="'musicGroupPaymentCalender/update'"
+              @click="$listeners.resetPay(scope.row)"
+              >修改</el-button
+            >
+            <el-button
+              type="text"
+              v-permission="'musicGroupPaymentCalender/makesureSchoolePaid'"
+              v-if="scope.row.status == 'OPEN' && teamType == 'resetTeam'"
+              @click="$listeners.commmitGetMoney(scope.row)"
+              >确认收款</el-button
+            >
+            <!-- <el-button type="text" v-if="!isNewGropu" @click="onCreateQRCode(scope.row)">续费二维码</el-button> -->
+          </div>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination :total="rules.total"
+                :page.sync="rules.page"
+                :limit.sync="rules.limit"
+                :page-sizes="rules.page_size"
+                @pagination="getList" />
+    <div slot="footer"
+        class="dialog-footer">
+      <el-button @click="$listeners.close">取 消</el-button>
+    </div>
+  </div>
+</template>
+<script>
+import { addMusicGroupPaymentCalender, getMusicGroupPaymentCalender, resetMusicGroupPaymentCalender, delMusicGroupPaymentCalender, findMusicGroupSubjectInfo } from "@/api/buildTeam";
+import loading from '@/utils/loading'
+import pagination from "@/components/Pagination/index";
+export default {
+  props: ['batchNo', 'teamStatus'],
+  components: {
+    pagination
+  },
+  data() {
+    return {
+      list: [],
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+    }
+  },
+  mounted() {
+    this.getList()
+  },
+  methods: {
+    async getList() {
+      try {
+        const res = await getMusicGroupPaymentCalender({
+          batchNo: this.batchNo,
+          page: '1',
+          rows: 10,
+        })
+        this.list = res.data.rows
+      } catch (error) {}
+    },
+    toDetail(row) {
+      this.$listeners.close()
+      this.$nextTick(() => {
+          this.$listeners.lookDetail(row)
+      })
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+.dialog-footer {
+  margin-top: 20px;
+  display: block;
+  text-align: right;
+}
+</style>

+ 2 - 3
src/views/resetTeaming/modals/user-pay-form.vue

@@ -422,7 +422,6 @@ export default {
     async submit() {
       const forms = this.getForms();
       const valided = [];
-      console.log(forms)
       for (const form of forms) {
         form.validate((valid) => {
           if (valid) {
@@ -474,7 +473,7 @@ export default {
         };
         // console.log(data)
         // return
-        if (!this.rowDetail?.id) {
+        if (!this.rowDetail?.batchNo) {
           try {
             const res = await musicGroupPaymentCalenderAdd(data);
             this.$listeners.close();
@@ -488,7 +487,7 @@ export default {
           } catch (error) { }
         } else {
           try {
-            data.id = this.rowDetail.id
+            data.batchNo = this.rowDetail.batchNo
             // 缴费类型无法修改,按照之前覆盖
             data.paymentType = this.rowDetail.paymentType
             const res = await musicGroupPaymentCalenderDetailBatchUpdate(data);

+ 162 - 8
src/views/teamDetail/components/modals/class-pay-list-item.vue

@@ -1,13 +1,42 @@
 <template>
   <div>
-    <el-form-item label="班级" style="padding-left: 20px">
-      <div></div>
-      <a @click="lookStudentList" class="studentTitle">学员列表>></a>
-    </el-form-item>
+    <el-alert
+      :title="'班级' + (index + 1)"
+      type="info"
+      :closable="false"
+      class="alert"
+    >
+    </el-alert>
+    <el-row>
+      <el-col :span="12">
+        <p class="classTitle">
+          班级: <span>{{ className }}</span>
+        </p>
+      </el-col>
+      <el-col :span="12">
+        <div class="rightBtn">
+          <el-button
+            type="text"
+            @click="studentListModalVisible = true"
+            :disabled="!item.classId"
+            class="studentTitle"
+            >学员列表>></el-button
+          >
+        </div></el-col
+      >
+    </el-row>
     <div class="infomsg">
-      <div class="left">
+      <div class="left" v-if="Object.keys(item.courseList).length > 0">
         剩余课时:
-        <p>合奏课:<span>1</span>节</p>
+        <div v-for="(val, key) in item.courseList" :key="key">
+          <p style="margin-right: 5px">
+            {{ key | courseTypeFormat }}:<span>{{ val }}</span
+            >节
+          </p>
+        </div>
+      </div>
+      <div class="left" v-else>
+        <div>暂无剩余课时</div>
       </div>
       <div class="right">
         已选学员:
@@ -17,14 +46,139 @@
         </p>
       </div>
     </div>
+    <extraClass
+      v-if="Object.keys(payItem).length > 0"
+      :form="corusePayList"
+      class="extraClass"
+      ref="eclass"
+      :isUserType="true"
+      :isCommon="false"
+      :isDisabled="true"
+      :courseUnitPriceSettingsByType="courseTypesByType"
+      @priceChange="priceChange"
+      @moneyChange="syncAllMoney"
+    />
+    <paymentCycle
+      v-if="Object.keys(payItem).length > 0"
+      ref="cycles"
+      :form="item"
+      :isUserType="false"
+      :isCommon="true"
+      :isDisabled="true"
+    />
+    <p v-if="!(Object.keys(payItem).length > 0)" class="noMore">
+      无需增加缴费周期
+    </p>
+    <el-dialog
+      title="学员列表"
+      width="700px"
+      :visible.sync="studentListModalVisible"
+      append-to-body
+      destroy-on-close
+    >
+      <viewStudentList
+        :list="item.studentList"
+        v-if="studentListModalVisible"
+        :isChiose="false"
+        @close="studentListModalVisible = false"
+      />
+    </el-dialog>
   </div>
 </template>
 <script>
+import paymentCycle from "@/views/resetTeaming/modals/payment-cycle";
+import extraClass from "../../../resetTeaming/modals/extra-class";
+import viewStudentList from "./view-student-list";
 export default {
+  props: ["item", "index", "payInfo",'courseTypesByType'],
+  components: { viewStudentList, paymentCycle, extraClass },
   data() {
-    return {};
+    return {
+      corusePayList: [],
+      eclass: [],
+      className: "",
+      studentListModalVisible: false,
+      isNoCourse: false,
+      payItem: {},
+    };
+  },
+  mounted() {
+    // console.log(this.item);
+    let idList = this.item?.classList?.map((classes) => {
+      if (classes.id == this.item.classId) {
+        this.className = classes.name;
+      }
+      return classes.id;
+    });
+    for (let key in this.payInfo) {
+      if (this.payInfo.hasOwnProperty(key)) {
+        if (this.item.classId == key) {
+          this.payItem = this.payInfo[key];
+          console.log(this.payItem);
+          break;
+        }
+      }
+    }
+    if (Object.keys(this.payItem).length > 0) {
+      this.corusePayList = [];
+      for (let key in this.payItem) {
+        if (this.payItem.hasOwnProperty(key)) {
+          this.corusePayList.push(this.payItem[key]);
+        }
+      }
+    }
+    console.log(this.corusePayList)
+  },
+  methods: {
+    priceChange() {},
+    moneyChange() {},
+    syncAllMoney() {},
   },
 };
 </script>
-<style lang="scss">
+<style lang="scss" scoped>
+.infomsg {
+  background-color: #f5faf9;
+  height: 34px;
+  line-height: 34px;
+  padding: 0 25px;
+  color: #333;
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  margin-bottom: 20px;
+  div {
+    display: flex;
+    flex-direction: row;
+    p {
+      color: #1a1a1a;
+      font-weight: bold;
+      span {
+        color: #3b7f7a;
+      }
+    }
+  }
+}
+.classTitle {
+  line-height: 40px;
+  font-size: 16px;
+  padding: 0 25px;
+  color: #333;
+  span {
+    font-weight: bold;
+  }
+}
+.rightBtn {
+  display: flex;
+  flex-direction: row;
+  justify-content: flex-end;
+  padding: 0 25px;
+}
+.extraClass {
+  margin-bottom: 20px;
+}
+.noMore {
+  text-align: center;
+  margin: 60px;
+}
 </style>

+ 33 - 7
src/views/teamDetail/components/modals/class-pay-list.vue

@@ -1,26 +1,52 @@
 <template>
   <div>
-
+    <classPayListItem
+    :payInfo="payInfo"
+    :courseTypesByType='courseTypesByType'
+      v-for="(item, index) in form.classList"
+      :key="index"
+      :item="item"
+      :index="index"
+    />
+    <div slot="footer" class="dialog-footer">
+      <el-button @click="close">上一步</el-button>
+      <el-button type="primary" @click="gotoLast">下一步</el-button>
+    </div>
+    <div style="clear: both"></div>
   </div>
 </template>
 <script>
-import classPayList from'./class-pay-list-item'
+import { getDefaultPaymentCalender } from "@/api/buildTeam";
+import classPayListItem from "./class-pay-list-item";
 export default {
-    components:{
-        classPayList
-    },
+  props: ["form",'payInfo','courseTypesByType'],
+  components: {
+    classPayListItem,
+  },
   data() {
     return {};
   },
+   mounted() {
+    // 获取缴费信息
+
+   
+  },
+  methods: {
+    close() {
+      this.$emit("close");
+    },
+    gotoLast() {},
+  },
 };
 </script>
 <style lang="scss" scoped>
-
 .studentTitle {
   width: 120px !important;
   text-align: right;
   display: inline-block;
   color: #409eff;
 }
-
+.dialog-footer {
+  float: right;
+}
 </style>

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

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-form :model="form" ref='form'>
+    <el-form :model="form" ref="form">
       <classListItem
         v-for="(item, index) in form.classList"
         :key="index"
@@ -21,13 +21,29 @@
       :disabled="form.classList.length >= classList.length"
       >添加班级</el-button
     >
+    <el-dialog
+      :visible.sync="showSecondVisable"
+      title="缴费信息设置"
+      append-to-body
+      width="800px"
+    >
+      <classPayList
+      :courseTypesByType='courseTypesByType'
+        :form="form"
+        :payInfo="payInfo"
+        @close="showSecondVisable = false"
+        v-if="showSecondVisable"
+      />
+    </el-dialog>
   </div>
 </template>
 <script>
 import classListItem from "./classList-item";
+import classPayList from './class-pay-list' 
+import { getDefaultPaymentCalender } from "@/api/buildTeam";
 export default {
-  props: ["classList"],
-  components: { classListItem },
+  props: ["classList",'courseTypesByType'],
+  components: { classListItem,classPayList },
   data() {
     return {
       form: {
@@ -35,11 +51,14 @@ export default {
           {
             classId: "",
             studentList: [],
-            courseList: [],
+            courseList: {},
             index: "",
+            classList:this.classList
           },
         ],
+    
       },
+          showSecondVisable:false
     };
   },
   methods: {
@@ -47,39 +66,45 @@ export default {
       this.form.classList.push({
         classId: "",
         studentList: [],
-        courseList: [],
+        courseList:{},
         index: "",
+         classList:this.classList
       });
     },
     deteleClass(index) {
       this.form.classList.splice(index, 1);
     },
-    gotoSecond(){
-      this.$refs.form.validate(res=>{
-        if(res){
-          let flag = false
-          this.form.classList.forEach(item=>{
-            if(item.studentList.length <=0){
-              flag = true
+    gotoSecond() {
+      this.$refs.form.validate( async (res) => {
+        if (res) {
+          let flag = false;
+          this.form.classList.forEach((item) => {
+            if (item.studentList.length <= 0) {
+              flag = true;
             }
-          })
-          if(flag){
-            this.$message.error('每个班级至少勾选一名学员')
-            return
+          });
+          if (flag) {
+            this.$message.error("每个班级至少勾选一名学员");
+            return;
           }
-          this.$store.dispatch('setClassList',this.form.classList)
-          console.log('跳转到第二页')
-          console.log(this.$store.getters.reactClassStudentList)
-        
-        
+              let classIdList = this.form.classList.map((item) => {
+      return item.classId;
+    });
+    try {
+       console.log(classIdList);
+      let result = await getDefaultPaymentCalender(classIdList)
+      this.payInfo = result.data
+         this.showSecondVisable = true;
+    } catch {}
+         
+       
         }
-      })
-      
-    }
-   
+      });
+    },
+  
+ 
   },
 };
 </script>
 <style lang="scss" scoped>
-
 </style>

+ 62 - 46
src/views/teamDetail/components/modals/classList-item.vue

@@ -28,65 +28,76 @@
           :disabled="isDisabled(item)"
         ></el-option>
       </el-select>
-      <el-button type="text"  @click="lookStudentList" :disabled="!item.classId" class="studentTitle">学员列表>></el-button>
+      <el-button
+        type="text"
+        @click="lookStudentList"
+        :disabled="!item.classId"
+        class="studentTitle"
+        >学员列表>></el-button
+      >
     </el-form-item>
-    
+
     <div class="infomsg">
-      <div class="left">
-        剩余课时:
-        <p>合奏课:<span>1</span>节</p>
+      <div class="left" v-if="!isNoCourse">
+           剩余课时:
+        <div v-for="(val,key) in item.courseList" :key='key'>
+          <p style="margin-right:5px">{{key|courseTypeFormat}}:<span>{{val}}</span>节</p>
+        </div>
+      </div>
+      <div class="left" v-else>
+        <div>暂无剩余课时</div>
       </div>
       <div class="right">
         已选学员:
-        <p><span>{{item.studentList.length}}</span>人</p>
+        <p>
+          <span>{{ item.studentList.length }}</span
+          >人
+        </p>
       </div>
-    
     </div>
-      <!-- <extraClass  :form="eclass"
-      class="extraClass"
-      ref="eclass"
-      :isUserType="true"
-      :isCommon="false"
-      :isDisabled="true"
-      :courseUnitPriceSettingsByType="organizationCourseUnitPriceSettingsByType"
-      @priceChange="priceChange"
-      @moneyChange="syncAllMoney"/>
-      <paymentCycle ref="cycles"
-          :form="item"
-          :isUserType="false"
-          :isCommon="true"
-          :isDisabled="true"/> -->
-    <el-dialog title="学员列表"
-         width="700px"
-               :visible.sync="studentListModalVisible"
-               append-to-body
-               destroy-on-close>
-      <viewStudentList :list="studentList" :chioseList='item.studentList' v-if="studentListModalVisible"
-      :isChiose='true'
-                       @close="closeStudentView" /> 
+
+    <el-dialog
+      title="学员列表"
+      width="700px"
+      :visible.sync="studentListModalVisible"
+      append-to-body
+      destroy-on-close
+    >
+      <viewStudentList
+        :list="studentList"
+        :chioseList="item.studentList"
+        v-if="studentListModalVisible"
+        :isChiose="true"
+        @close="closeStudentView"
+      />
     </el-dialog>
   </div>
 </template>
 <script>
 import { getClassAllStudent } from "@/api/studentManager";
-import viewStudentList from './view-student-list'
+import { getClassGroupSubCourseNum } from "@/api/buildTeam";
+import viewStudentList from "./view-student-list";
 import paymentCycle from "@/views/resetTeaming/modals/payment-cycle";
 import extraClass from "../../../resetTeaming/modals/extra-class";
 export default {
   props: ["item", "index", "classList", "form"],
-  components:{viewStudentList,paymentCycle,extraClass},
+  components: { viewStudentList, paymentCycle, extraClass },
   data() {
     return {
       studentList: [],
-      studentListModalVisible:false,
-      organizationCourseUnitPriceSettingsByType:[],
-      eclass:[],
-
+      studentListModalVisible: false,
+      organizationCourseUnitPriceSettingsByType: [],
+      eclass: [],
+      isNoCourse: false,
     };
   },
   methods: {
-    changeValue(val) {
-      console.log(val);
+    async changeValue(val) {
+      this.item.studentList = []
+      try {
+        let reset = await getClassGroupSubCourseNum({ classGroupId: val });
+        this.setClassCourse(reset.data);
+      } catch {}
     },
     deteleClass() {
       this.$emit("deteleClass", this.index);
@@ -117,16 +128,24 @@ export default {
               subjectNames: item.subjectName,
             };
           });
-          this.studentListModalVisible = true
+          this.studentListModalVisible = true;
         }
       });
     },
-    closeStudentView(list){
-      this.item.studentList = list
-      this.studentListModalVisible = false
+    closeStudentView(list) {
+      this.item.studentList = list;
+      this.studentListModalVisible = false;
     },
-    priceChange(){},
-    syncAllMoney(){},
+    setClassCourse(data) {
+      if (Object.keys(data).length > 0) {
+
+        this.item.courseList = data;
+      } else {
+        this.isNoCourse = true;
+      }
+    },
+    priceChange() {},
+    syncAllMoney() {},
   },
 };
 </script>
@@ -167,7 +186,4 @@ export default {
   flex-direction: row;
   justify-content: flex-end;
 }
-.extraClass {
-  margin-bottom: 20px;
-}
 </style>

+ 2 - 2
src/views/teamDetail/components/modals/student-reset-view.vue

@@ -6,7 +6,7 @@
               class="alert"
               show-icon>
     </el-alert>
-    <classListGroup :classList="classList" ref='classListGroup'/>
+    <classListGroup :classList="classList" ref='classListGroup' :courseTypesByType='courseTypesByType'/>
      <div slot="footer" class="dialog-footer">
       <el-button @click="close">取 消</el-button>
       <el-button  type="primary" @click="gotoSecond">下一步</el-button>
@@ -17,7 +17,7 @@
 <script>
 import classListGroup from './classList-group'
 export default {
-  props: ['classList'],
+  props: ['classList','courseTypesByType'],
   components: {
     classListGroup
   },

+ 9 - 4
src/views/teamDetail/components/modals/view-student-list.vue

@@ -45,14 +45,14 @@
       ></el-table-column>
       <el-table-column
         prop="subjectNames"
-        align="center"
-        width="120"
+        align="center"       
         label="专业"
       ></el-table-column>
     </el-table>
     <div slot="footer" class="dialog-footer">
       <el-button type="primary" @click="$listeners.close(selectList)">确 定</el-button>
     </div>
+    <div style="clear: both;"></div>
   </div>
 </template>
 <script>
@@ -63,7 +63,8 @@ export default {
       selectList:this.chioseList
     }
   },mounted(){
-    let idList = this.chioseList.map((item,index)=>{
+    if(this.chioseList){
+          let idList = this.chioseList.map((item,index)=>{
       return item.userId
     })
     this.list.forEach((item,index)=>{
@@ -71,6 +72,7 @@ export default {
         this.$refs.studentTable.toggleRowSelection(item,true);
       }
     })
+    }
   },
   methods:{
     handleSelectionChange(val){
@@ -83,5 +85,8 @@ export default {
 /deep/.dialog-footer{
   margin-top: 10px;
 }
-  
+  .dialog-footer {
+  float: right;
+ 
+}
 </style>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 440 - 316
src/views/teamDetail/components/resetClass.vue


+ 1 - 1
src/views/teamDetail/teamCourseList.vue

@@ -401,7 +401,7 @@
                   @getList='getList'
                   :id='id' />
     </el-dialog>
-    <addCompound :compoundList='compoundList'
+    <addCompound :compoundList='compoundList' v-if="permission('courseSchedule/courseMerge')"
                  @clearCom='clearCom'
                  @cancleCompound='cancleCompound' />
   </div>

+ 2 - 2
vue.config.js

@@ -20,8 +20,8 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // let target = 'http://dyme.utools.club' //test环境
 // let target = 'http://192.168.3.139:8000' // 箭河
 // let target = 'http://192.168.3.30:8080' //邹璇
-let target = 'http://192.168.3.57:8000' //勇哥
-// let target = 'http://dev.dayaedu.com' // 测试服
+// let target = 'http://192.168.3.57:8000' //勇哥
+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 = {

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä