Explorar el Código

乐团缴费修改

wolyshaw hace 4 años
padre
commit
ed78663a37

+ 1 - 0
src/router/notKeepAliveList.js

@@ -3,5 +3,6 @@ export default [
   '/contentManager/accompaniment',
   '/orderList/orderAudit',
   '/business/teamCourseList',
+  '/business/auditList',
   // '/operateManager/HumanResources'
 ]

+ 9 - 12
src/views/auditList/index.vue

@@ -7,9 +7,10 @@
     </h2>
     <div class="m-core">
       <!-- 搜索标题 -->
-      <el-form :inline="true"
+      <save-form :inline="true"
                class="searchForm"
-               v-model.trim="searchForm">
+               ref="searchForm"
+               :model.sync="searchForm">
         <el-form-item>
           <el-input v-model.trim="searchForm.search"
                     @keyup.enter.native="search"
@@ -21,7 +22,7 @@
                      filterable
                      clearable
                      placeholder="请选择分部">
-            <el-option v-for="(item, index) in organList"
+            <el-option v-for="(item, index) in selects.branchs"
                        :key="index"
                        :label="item.name"
                        :value="item.id"></el-option>
@@ -55,7 +56,7 @@
           <el-button @click="getList"
                      type="danger">搜索</el-button>
         </el-form-item>
-      </el-form>
+      </save-form>
       <div class="tableWrap">
         <el-table :data="tableList"
                   :header-cell-style="{ background: '#EDEEF0', color: '#444' }">
@@ -64,6 +65,7 @@
                            prop="organName"
                            label="分部名称"></el-table-column>
           <el-table-column align="center"
+                           width="200px"
                            prop="musicGroupName"
                            label="乐团名称">
             <template slot-scope="scope">
@@ -211,19 +213,13 @@ export default {
       typeStatus: false,
     };
   },
-  activated () {
-    this.getList();
-  },
   mounted () {
-    getEmployeeOrgan().then((res) => {
-      if (res.code == 200) {
-        this.organList = res.data;
-      }
-    });
+    this.$store.dispatch('setBranchs')
     this.getList();
   },
   methods: {
     getList () {
+      this.$refs.searchForm?.save(this.searchForm)
       let params = {
         page: this.pageInfo.page,
         rows: this.pageInfo.limit,
@@ -242,6 +238,7 @@ export default {
       // this.detail = res.data
       this.detail = {
         id: row.musicGroupPaymentCalenderId,
+        batchNo: row.batchNo,
         musicGroupId: row.musicGroupId,
         status: row.auditStatus
       }

+ 2 - 1
src/views/resetTeaming/modals/payment-cycle.vue

@@ -25,6 +25,7 @@
     <el-form-item
       label="缴费方式"
       prop="paymentPattern"
+      v-if="!hidePaymentPattern"
       :rules="[{required: true, message: '请选择缴费方式', trigger: 'change'}]"
     >
       <el-select style="width: 100%!important;" v-model="form.paymentPattern" placeholder="请选择缴费方式">
@@ -71,7 +72,7 @@
 import { paymentPatternType } from '@/constant'
 import { objectToOptions } from '@/utils'
 export default {
-  props: ['form', 'className', 'isUserType', 'isDisabled', 'isCommon'],
+  props: ['form', 'className', 'isUserType', 'isDisabled', 'isCommon', 'hidePaymentPattern'],
   data() {
     return {
       paymentPatternTypeOptions: objectToOptions(paymentPatternType),

+ 11 - 18
src/views/resetTeaming/modals/review-detail.vue

@@ -24,11 +24,6 @@
       <descriptions-item label="订单类型:">{{
         auditDto.payUserType | payUserTypeFormat
       }}</descriptions-item>
-      <descriptions-item label="学员数量:">
-        <span>{{ studentNum }} <el-link v-if="studentNum > 0"
-                   type="primary"
-                   @click="payVisible = true">查看学员</el-link></span>
-      </descriptions-item>
     </descriptions>
     <el-alert title="课程信息"
               :closable="false"
@@ -36,7 +31,7 @@
               type="info">
     </el-alert>
     <descriptions :column="3" v-if="musicGroupPaymentCalenderCourseSettingName">
-      <descriptions-item label="收费标准:">{{
+      <descriptions-item :span="2" label="收费标准:">{{
         musicGroupPaymentCalenderCourseSettingName
       }}</descriptions-item>
     </descriptions>
@@ -69,18 +64,18 @@
               class="alert"
               type="info">
     </el-alert>
-    <descriptions :column="2">
+    <descriptions v-for="item in musicGroupPaymentCalenders" :key="item.id" :column="2">
       <descriptions-item label="缴费金额:">{{
-        auditDto.paymentAmount|moneyFormat
+        item.paymentAmount|moneyFormat
       }}</descriptions-item>
       <descriptions-item label="缴费方式:">{{
-        auditDto.paymentPattern | paymentPatternTypeFormat
+        item.paymentPattern | paymentPatternTypeFormat
       }}</descriptions-item>
-      <descriptions-item v-if="auditDto.payUserType !== 'SCHOOL'"
-                         label="缴费日期:">{{ auditDto.startPaymentDate|dayjsFormat }} -
-        {{ auditDto.deadlinePaymentDate|dayjsFormat }}</descriptions-item>
-      <descriptions-item label="缴费有效期:">{{ auditDto.paymentValidStartDate }} -
-        {{ auditDto.paymentValidEndDate }}</descriptions-item>
+      <descriptions-item :span="3" v-if="item.payUserType !== 'SCHOOL'"
+                         label="缴费日期:">{{ item.startPaymentDate|dayjsFormat }} -
+        {{ item.deadlinePaymentDate|dayjsFormat }}</descriptions-item>
+      <descriptions-item :span="3" label="缴费有效期:">{{ item.paymentValidStartDate }} -
+        {{ item.paymentValidEndDate }}</descriptions-item>
     </descriptions>
     <el-dialog :visible.sync="payVisible"
                :close-on-click-modal="false"
@@ -118,6 +113,7 @@ const initData = {
   auditDto: {},
   musicGroupPaymentCalenderCourseSettings: [],
   simpleUserDto: [],
+  musicGroupPaymentCalenders: [],
   studentNum: 0,
 };
 export default {
@@ -140,14 +136,11 @@ export default {
   mounted () {
     this.init();
   },
-  activated () {
-    this.init();
-  },
   methods: {
     async init () {
       try {
         const res = await musicGroupPaymentCalenderView({
-          calenderId: this.detail.id,
+          batchNo: this.detail.batchNo,
           musicGroupId: this.detail.musicGroupId,
         });
         for (const key in initData) {

+ 4 - 3
src/views/resetTeaming/modals/review.vue

@@ -1,6 +1,6 @@
 <template>
   <div v-if="detail">
-    <reviewDetail v-if="detail && detail.id"
+    <reviewDetail v-if="detail"
                   :detail="detail" />
     <el-alert style="margin: 20px 0;"
               title="审核意见"
@@ -25,6 +25,7 @@
       <el-button type="danger"
                  @click="submit(0)"
                  v-if="permission('musicGroupPaymentCalender/auditRefuse')">驳回</el-button>
+      <el-button @click="$emit('close')">关 闭</el-button>
     </div>
     <div slot="footer"
          class="dialog-footer"
@@ -59,7 +60,7 @@ export default {
           await this.$confirm('是否确认审核通过', '提示', {
             type: 'warning'
           })
-          await auditPass({ calenderId: this.detail.id, auditMemo: this.remark }).then((res) => {
+          await auditPass({ batchNo: this.detail.batchNo, auditMemo: this.remark }).then((res) => {
             if (res.code == 200) {
               this.$message.success('审核通过')
               this.$emit('close')
@@ -71,7 +72,7 @@ export default {
           await this.$confirm('是否确认驳回', '提示', {
             type: 'warning'
           })
-          await auditRefuse({ calenderId: this.detail.id, auditMemo: this.remark }).then((res) => {
+          await auditRefuse({ batchNo: this.detail.batchNo, auditMemo: this.remark }).then((res) => {
             if (res.code == 200) {
               this.$message.success('驳回成功')
               this.$emit('close')

+ 47 - 13
src/views/resetTeaming/modals/user-pay-form.vue

@@ -48,7 +48,23 @@
                 class="alert"
                 type="info">
       </el-alert>
-      <template v-if="isUserType">
+      <template v-if="isUserType && paymentType == '0'">
+        <el-form ref="payment" :model="payment">
+          <el-form-item
+            label="缴费方式"
+            prop="paymentPattern"
+            :rules="[{required: true, message: '请选择缴费方式', trigger: 'change'}]"
+          >
+            <el-select style="width: 100%!important;" v-model="payment.paymentPattern" placeholder="请选择缴费方式">
+              <el-option
+                v-for="item in paymentPatternTypeOptions"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-form>
         <el-collapse :value="collapse" @change="collapseChange" >
           <el-collapse-item
             v-for="(item, index) in cycles"
@@ -64,6 +80,7 @@
             <paymentCycle
               ref="cycles"
               :form="item"
+              :hidePaymentPattern="true"
               :isCommon="isCommon"
               :isUserType="isUserType"
               :isDisabled="form.leixing === '1' || paymentType == '0'"
@@ -120,7 +137,8 @@ import {
   musicGroupPaymentCalenderDetailBatchUpdate,
   queryByMusicGroupOrganizationCourseSettingsId,
 } from "../api";
-import { getTimes } from "@/utils";
+import { paymentPatternType } from '@/constant'
+import { getTimes, objectToOptions } from "@/utils";
 import userBaseinfo from "./user-baseinfo";
 import paymentCycle from "./payment-cycle";
 import extraClass from "./extra-class";
@@ -162,7 +180,11 @@ export default {
       nextVisible: false,
       typeList: [],
       charges: [],
+      payment: {
+        paymentPattern: null,
+      },
       organizationCourseUnitPriceSettingsByType: {},
+      paymentPatternTypeOptions: objectToOptions(paymentPatternType),
     };
   },
   computed: {
@@ -295,7 +317,7 @@ export default {
       for (const item of this.eclass) {
         money += item.courseCurrentPrice;
       }
-      if (this.cycles.length) {
+      if (this.cycles && this.cycles.length) {
         const floorMoney = Math.floor(money / this.cycles.length)
         const remainder = money % this.cycles.length
         if (this.paymentAmountDisabled) {
@@ -317,7 +339,7 @@ export default {
       // if (!money) {
         // this.$set(this.cycle, "paymentAmount", undefined);
       // } else {
-        // this.$set(this.cycle, "paymentAmount", money);
+        this.$set(this.cycle, "paymentAmount", money);
       // }
       if (this.rowDetail) {
         this.$set(
@@ -387,9 +409,10 @@ export default {
     },
     getForms () {
       const { $refs: refs } = this;
-      return [refs.base, refs.eclass, refs.cycle, ...refs.cycles, refs.other]
+
+      return [refs.base, refs.eclass, refs.cycle, ...(refs.cycles || []), refs.other, refs.payment]
         .filter((item) => !!item)
-        .map((item) => item.$refs.form);
+        .map((item) => item.$refs.form || item);
     },
     changeActive(val) {
       if (this.$listeners.changeActive) {
@@ -399,6 +422,7 @@ export default {
     async submit() {
       const forms = this.getForms();
       const valided = [];
+      console.log(forms)
       for (const form of forms) {
         form.validate((valid) => {
           if (valid) {
@@ -410,10 +434,11 @@ export default {
         return this.$message.error('请至少选择一条加课信息')
       }
       if (valided.length === forms.length) {
-        const { paymentDate, paymentValid, leixing, ...rest } = {
+        const { leixing, ...rest } = {
           ...this.form,
           ...this.other,
-          cycles: [...this.cycles.map(item => {
+          paymentPattern: this.payment.paymentPattern,
+          musicGroupPaymentDateRangeList: [...this.cycles.map(item => {
             const { paymentDate, paymentValid, ...other } = item
             return {
               ...other,
@@ -426,6 +451,18 @@ export default {
           })],
           musicGroupPaymentCalenderCourseSettingsList: this.eclass,
         };
+        if (this.$refs.cycle) {
+          const { paymentDate, paymentValid, paymentPattern, ...other } = this.cycle
+          rest.paymentPattern = paymentPattern
+          rest.musicGroupPaymentDateRangeList = [{
+              ...other,
+              ...getTimes(paymentDate, ["startPaymentDate", "deadlinePaymentDate"]),
+              ...getTimes(paymentValid, [
+                "paymentValidStartDate",
+                "paymentValidEndDate",
+              ]),
+          }]
+        }
         const data = {
           ...rest,
           isGiveMusicNetwork: false,
@@ -434,12 +471,9 @@ export default {
               this.paymentType == 0 ? this.paymentType : leixing
             ],
           musicGroupId: this.musicGroupId,
-          ...getTimes(paymentDate, ["startPaymentDate", "deadlinePaymentDate"]),
-          ...getTimes(paymentValid, [
-            "paymentValidStartDate",
-            "paymentValidEndDate",
-          ]),
         };
+        // console.log(data)
+        // return
         if (!this.rowDetail?.id) {
           try {
             const res = await musicGroupPaymentCalenderAdd(data);

+ 2 - 2
src/views/studentManager/studentList.vue

@@ -186,8 +186,8 @@
                            width="180px"
                            label="操作">
             <template slot-scope="scope">
-              <router-link style="color:#409EFF; padding-right: 10px;"
-                           v-permission="'/studentDetail'"
+              <router-link v-permission="'/studentDetail'"
+                           class="el-button--text"
                            :to="{path:`/business/studentDetail?userId=${scope.row.userId}`,query:{search:JSON.stringify(searchForm),rules:JSON.stringify(pageInfo),studentName:scope.row.username}}">查看</router-link>
               <el-button type="text"
                          v-permission="'studentManage/studentUpdate'"

+ 1 - 1
src/views/teamDetail/components/modals/create-user-pay.vue

@@ -272,7 +272,7 @@ export default {
       if (forms.length === valided.length) {
         const data = {
           attribute1: this.ids,
-          cycles: [...this.cycles.map(item => {
+          musicGroupPaymentDateRangeList: [...this.cycles.map(item => {
             const { paymentDate, paymentValid, ...other } = item
             return {
               ...other,

+ 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.204: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 = {