Browse Source

Merge branch 'ol_12_30' of http://git.dayaedu.com/molingzhide/dy-admin-manager into ol_12_30

mo 4 years ago
parent
commit
a118cf06d6

+ 2 - 2
src/views/teamBuild/components/merge-music.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <div class="merge-music">
   <div class="merge-music">
     <el-button type="primary" @click="visible = true">选择乐团</el-button>
     <el-button type="primary" @click="visible = true">选择乐团</el-button>
-    <el-button type="primary" @click="studentsVisible = true">已合并学生</el-button>
+    <el-button type="primary" @click="studentsVisible = true">学员列表</el-button>
     <empty v-if="isEmpty" desc="暂未选择乐团"/>
     <empty v-if="isEmpty" desc="暂未选择乐团"/>
     <el-collapse v-model="active" @change="changeActive" class="items" v-else>
     <el-collapse v-model="active" @change="changeActive" class="items" v-else>
       <el-collapse-item class="item" v-for="(item, key) in items" :key="key" :name="key" >
       <el-collapse-item class="item" v-for="(item, key) in items" :key="key" :name="key" >
@@ -138,7 +138,7 @@ export default {
           registerIds: allId
           registerIds: allId
         })
         })
         this.$message.success('合并成功')
         this.$message.success('合并成功')
-        this.$emit('chiosetab', 2)
+        this.$emit('submited')
       } catch (error) {}
       } catch (error) {}
     },
     },
     handleSelectionChange(arr) {
     handleSelectionChange(arr) {

+ 2 - 0
src/views/teamBuild/components/select-item.vue

@@ -113,6 +113,8 @@ export default {
       try {
       try {
         const res = await getMusicGroupStu({
         const res = await getMusicGroupStu({
           musicGroupId: this.id,
           musicGroupId: this.id,
+          studentStatus: 'NORMAL',
+          paymentStatus: 1
         })
         })
         this.list = res.data
         this.list = res.data
         this.filterlist = res.data
         this.filterlist = res.data

+ 1 - 0
src/views/teamBuild/components/select-msic.vue

@@ -128,6 +128,7 @@ export default {
           rows: this.rules.limit,
           rows: this.rules.limit,
           page: this.rules.page,
           page: this.rules.page,
           organId: this.organId,
           organId: this.organId,
+          musicGroupStatus: 'PROGRESS',
           ...this.search
           ...this.search
         })
         })
         this.tableData = res.data.rows.filter(item => item.id !== this.$route.query.id)
         this.tableData = res.data.rows.filter(item => item.id !== this.$route.query.id)

+ 26 - 11
src/views/teamBuild/modals/close-studens.vue

@@ -31,13 +31,22 @@
         </el-table-column>
         </el-table-column>
         <el-table-column prop="surplusCourseFee" align="center" label="退费金额(元)" width="150">
         <el-table-column prop="surplusCourseFee" align="center" label="退费金额(元)" width="150">
           <template slot-scope="scope">
           <template slot-scope="scope">
-            <el-form-item :prop="'' + scope.row.userId">
+            <el-form-item
+              :show-message="false"
+              :prop="'' + scope.row.userId"
+              style="margin-bottom: 0;"
+              :rules="[{
+                required: true,
+                message: ''
+              }]"
+            >
               <el-input-number
               <el-input-number
                 :min="0"
                 :min="0"
                 :max="scope.row.surplusCourseFee"
                 :max="scope.row.surplusCourseFee"
                 size="mini"
                 size="mini"
                 :controls="false"
                 :controls="false"
-                :precision="0"
+                :precision="2"
+                :step="0.01"
                 v-model="moneys[scope.row.userId]"
                 v-model="moneys[scope.row.userId]"
                 placeholder="请输入退费金额"
                 placeholder="请输入退费金额"
               />
               />
@@ -80,16 +89,22 @@ export default {
     },
     },
     async submit() {
     async submit() {
       try {
       try {
-        await this.$confirm('是否确认关闭乐团', '提示', {
-          type: 'warning'
+        this.$refs.form.validate(async valid => {
+          if (valid) {
+            await this.$confirm('是否确认关闭乐团', '提示', {
+              type: 'warning'
+            })
+            await closeMusicGroup({
+              musicGroupId: this.detail?.id,
+              userReBack: this.moneys
+            })
+            this.$message.success('关闭成功')
+            this.$emit('submited')
+            this.$emit('close')
+          } else {
+            this.$$message.error('请填写完成退费金额')
+          }
         })
         })
-        await closeMusicGroup({
-          musicGroupId: this.detail?.id,
-          userReBack: this.moneys
-        })
-        this.$message.success('关闭成功')
-        this.$emit('submited')
-        this.$emit('close')
       } catch (error) {}
       } catch (error) {}
     }
     }
   }
   }

+ 7 - 1
src/views/teamBuild/signupList.vue

@@ -66,7 +66,13 @@
         </div>
         </div>
       </div>
       </div>
       <el-dialog title="选择合并乐团" :visible.sync="mergeVisible" width="950px">
       <el-dialog title="选择合并乐团" :visible.sync="mergeVisible" width="950px">
-        <mergeMusic v-if="mergeVisible" style="padding: 0 20px;" :organId="organId" @close="mergeVisible = false"/>
+        <mergeMusic
+          v-if="mergeVisible"
+          style="padding: 0 20px;"
+          :organId="organId"
+          @close="mergeVisible = false"
+          @submited="getList"
+        />
       </el-dialog>
       </el-dialog>
       <!--  stepImgs: {
       <!--  stepImgs: {
         APPLY: require('@/assets/images/base/clock.png'),
         APPLY: require('@/assets/images/base/clock.png'),