Browse Source

缴费多周期

wolyshaw 4 năm trước cách đây
mục cha
commit
ce7f302541

+ 6 - 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'
+    }
   })
 }
 

+ 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;

+ 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);

+ 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 = {