Forráskód Böngészése

添加缴费删除

wolyshaw 4 éve
szülő
commit
c0ada49249

+ 10 - 4
src/components/statistic/index.vue

@@ -1,7 +1,7 @@
 <template>
-  <el-row class="statistic">
+  <el-row :gutter="cols" class="statistic">
     <div v-for="(item, index) in tags" :key="index">
-      <el-col :span="(index + 1) % col === 0 ? colSpan : colSpan - 1">
+      <el-col :span="span ? span : (index + 1) % col === 0 ? colSpan : colSpan - 1">
         <statistic-content :item="item"></statistic-content>
       </el-col>
       <el-col :key="index" :span="1" v-if="(index + 1) % col !== 0 && (index + 1) < tags.length">
@@ -14,9 +14,16 @@
 export default {
   name: 'statistic',
   props: {
+    cols: {
+      type: Number,
+      default: 24
+    },
     col: {
       type: Number,
       default: 4
+    },
+    span: {
+      type: Number,
     }
   },
   components: {
@@ -26,7 +33,6 @@ export default {
         item: Object
       },
       render(h) {
-        console.log(this.item.children)
         return (
           <div class="statistic-content">
             {this.item.children}
@@ -37,7 +43,7 @@ export default {
   },
   computed: {
     colSpan() {
-      return 24 / this.col
+      return this.cols / this.col
     },
   },
   data() {

+ 7 - 0
src/views/resetTeaming/api.js

@@ -40,6 +40,13 @@ export const musicGroupPaymentCalenderDetailBatchUpdate = data => request2({
   method: 'post',
 })
 
+// musicGroupPaymentCalender/update
+export const musicGroupPaymentCalenderDetailDel = data => request2({
+  url: '/api-web/musicGroupPaymentCalender/del',
+  params: data,
+  method: 'post',
+})
+
 export const queryByMusicGroupOrganizationCourseSettingsId = data => request2({
   url: '/api-web/musicGroupOrganizationCourseSettingsDetail/queryByMusicGroupOrganizationCourseSettingsId',
   data: {},

+ 55 - 17
src/views/resetTeaming/components/strudentPayInfo.vue

@@ -11,7 +11,45 @@
             actualNum: res.data.calender.actualNum,
             sumActualAmount: res.data.sumActualAmount
           } -->
-    <div class="infoMsg">
+          <statistic :span="4" :col="5">
+            <statistic-item>
+              <span>状态</span>
+              <span>
+                <p class="status"
+                  style="color: #ff6a6a"
+                  v-if="info.paymentStatus == 'OPEN'">
+                  {{ "已开启" }}
+                </p>
+                <p class="status"
+                  style="color: #ff6a6a"
+                  v-if="info.paymentStatus == 'NO'">
+                  {{ "未开始" }}
+                </p>
+                <p class="status"
+                  style="color: #5ccdb8"
+                  v-if="info.paymentStatus == 'OVER'">
+                  {{ "已结束" }}
+                </p>
+              </span>
+            </statistic-item>
+            <statistic-item>
+              <span>预计缴费日期</span>
+              <span style="font-size: 16px">{{ info.startPaymentDate | formatTimer }} ~ {{ info.deadlinePaymentDate | formatTimer }}</span>
+            </statistic-item>
+            <statistic-item>
+              <span>预计缴费人数</span>
+              <span>{{ info.expectNum ? info.expectNum : 0 }}</span>
+            </statistic-item>
+            <statistic-item>
+              <span>实际缴费人数</span>
+              <span>{{ info.actualNum ? info.actualNum : 0 }}</span>
+            </statistic-item>
+            <statistic-item>
+              <span>收款金额</span>
+              <span>{{ info.sumActualAmount ? info.sumActualAmount : 0 }}</span>
+            </statistic-item>
+          </statistic>
+    <!-- <div class="infoMsg">
       <div class="left">
         <p class="title">状态</p>
 
@@ -55,7 +93,7 @@
           </p>
         </div>
       </div>
-    </div>
+    </div> -->
 
     <div class="m-core">
       <el-form :inline="true"
@@ -135,7 +173,7 @@
           v-permission="'musicGroupPaymentCalenderDetail/add'"
         >
           新增学员
-        </div>
+        </div> -->
         <div
           class="newBand"
           @click="delStudentBtn"
@@ -143,7 +181,7 @@
           v-permission="'musicGroupPaymentCalenderDetail/batchDel'"
         >
           删除学员
-        </div> -->
+        </div>
         <div class="newBand"
              v-permission="'export/musicGroupPaymentCalenderDetail'"
              @click="onMusicGroupPaymentCalenderDetail">
@@ -490,19 +528,19 @@ export default {
             calenderSettingsName: res.data.calenderSettingsName,
           };
           this.msgList = res.data.musicGroupPaymentCalenderCourseSettings
-          this.searchForm.id = this.id;
-          this.searchForm.page = this.rules.page;
-          this.searchForm.rows = this.rules.limit;
-          getmusicGroupPaymentCalenderDetail(this.searchForm).then(
-            (payment) => {
-              if (payment.code == 200) {
-                this.rules.total = payment.data.total;
-                this.tableList = payment.data.rows;
-              }
-            }
-          );
         }
       });
+      this.searchForm.id = this.id;
+      this.searchForm.page = this.rules.page;
+      this.searchForm.rows = this.rules.limit;
+      getmusicGroupPaymentCalenderDetail(this.searchForm).then(
+        (payment) => {
+          if (payment.code == 200) {
+            this.rules.total = payment.data.total;
+            this.tableList = payment.data.rows;
+          }
+        }
+      );
     },
     search () {
       this.rules.page = 1;
@@ -605,13 +643,13 @@ export default {
         type: "warning",
       })
         .then(() => {
-          let musicGroupPaymentCalenderIds = this.activeChiose
+          let musicGroupPaymentCalenderDetailIds = this.activeChiose
             .map((stu) => {
               return stu.id;
             })
             .join(",");
           delMusicGroupPaymentCalenderStudent({
-            musicGroupPaymentCalenderIds,
+            musicGroupPaymentCalenderDetailIds,
           }).then((res) => {
             if (res.code == 200) {
               this.$message.success(`删除成功`);

+ 22 - 4
src/views/resetTeaming/modals/pay-items.vue

@@ -20,7 +20,7 @@
           </div>
         </template>
       </el-table-column>
-      <el-table-column align="center" prop="status" label="缴费状态">
+      <el-table-column align="center" prop="status" width="120" label="缴费状态">
         <template slot-scope="scope">
           <div>
             {{ scope.row.status | payTypeStatus }}
@@ -57,12 +57,12 @@
           </div>
         </template>
       </el-table-column>
-      <el-table-column align="center" prop="memo" label="备注" width="200">
+      <el-table-column align="center" prop="memo" label="备注" width="200" class-name="table-btns">
         <template slot-scope="scope">
-          <overflow-text :text="scope.row.memo" width="200px"></overflow-text>
+          <overflow-text :text="scope.row.memo"></overflow-text>
         </template>
       </el-table-column>
-      <el-table-column label="操作" fixed="right" min-width="220px">
+      <el-table-column label="操作" fixed="right" width="200">
         <template slot-scope="scope">
           <div>
             <el-button
@@ -105,6 +105,10 @@
                          v-if="$listeners.onPreview && payUserType === 'STUDENT'"
                          v-permission="'musicGroup/findMusicGroupSubjectInfo/966'"
                          @click="$listeners.onPreview(scope.row)">预览</el-button>
+            <el-button type="text"
+                       v-if="removeIsShow(scope.row)"
+                       v-permission="'musicGroupPaymentCalender/del'"
+                       @click="remove(scope.row)">删除</el-button>
             <!-- <el-button type="text" v-if="!isNewGropu" @click="onCreateQRCode(scope.row)">续费二维码</el-button> -->
           </div>
         </template>
@@ -123,6 +127,7 @@
 </template>
 <script>
 import { addMusicGroupPaymentCalender, getMusicGroupPaymentCalender, resetMusicGroupPaymentCalender, delMusicGroupPaymentCalender, findMusicGroupSubjectInfo } from "@/api/buildTeam";
+import { musicGroupPaymentCalenderDetailDel } from '../api'
 import loading from '@/utils/loading'
 import pagination from "@/components/Pagination/index";
 export default {
@@ -161,6 +166,19 @@ export default {
       this.$nextTick(() => {
           this.$listeners.lookDetail(row)
       })
+    },
+    removeIsShow(row) {
+      return row.status === 'REJECT' || row.status === 'NO'
+    },
+    async remove (row) {
+      try {
+        await this.$confirm('是否删除缴费', '提示', {
+          type: 'warning',
+        })
+        await musicGroupPaymentCalenderDetailDel({id: row.id})
+        this.$message.success('删除成功')
+        this.getList()
+      } catch (error) {}
     }
   }
 };