Browse Source

缴费项目接通

1
mo 3 years ago
parent
commit
bd78b658be

+ 6 - 0
src/constant/guide.js

@@ -70,5 +70,11 @@ export const guideList = {
     desc: '用于计算学员购买小班课时需要支持的金额',
     path: '/sysBasics/vipChargeSeting',
     permission: '/vipChargeSeting'
+  },
+  teamActive:{
+    name: '乐团活动',
+    desc: '可通过创建乐团活动在乐团报名缴费时销售小班课',
+    path: '/vipActiveManager/vipActiveList',
+    permission: '/vipActiveList'
   }
 }

+ 44 - 36
src/constant/index.js

@@ -43,7 +43,7 @@ export const courseType = {
   DEMO: '试听课',
   PRACTICE: '网管课',
   COMM: '对外课',
-  MEMBER:'会员'
+  MEMBER: '会员'
 }
 
 export const boolOptions = {
@@ -107,7 +107,7 @@ export const auditType = {
   OPEN: '开启缴费',
   OVER: '缴费已结束',
   PAID: '已缴费',
-  DRAFT:'编辑中'
+  DRAFT: '编辑中'
 }
 
 export const auditPaymentType = {
@@ -151,7 +151,7 @@ export const journalType = {
 export const jobNature = {
   PART_TIME: "兼职",
   FULL_TIME: "全职",
-  LABOUR:'劳务'
+  LABOUR: '劳务'
   // TEMPORARY: "临时工"
 }
 
@@ -231,9 +231,9 @@ export const packageStatus = {
 export const musicGroupType = {
   DRAFT: '编辑中',
   AUDIT: '审核中',
-  PRE_APPLY:'预报名中',
-  PRE_BUILD_FEE:'创建缴费中',
-  FEE_AUDIT:'费用审核中',
+  PRE_APPLY: '预报名中',
+  PRE_BUILD_FEE: '创建缴费中',
+  FEE_AUDIT: '费用审核中',
   APPLY: "报名中",
   PAY: "缴费中",
   PREPARE: "筹备中",
@@ -241,7 +241,7 @@ export const musicGroupType = {
   CANCELED: '取消',
   PAUSE: '暂停',
   AUDIT_FAILED: '审核失败',
-  CLOSE:'关闭'
+  CLOSE: '关闭'
 }
 export const gradeType = {
   0: '6+3',
@@ -256,19 +256,19 @@ export const ProbationPeriodStatus = {
 
 
 export const clientType = {
-  STUDENT:'学生端',
-  TEACHER:'老师端',
-  EDUCATION:'教务端',
-  SYSTEM:'教务端'
+  STUDENT: '学生端',
+  TEACHER: '老师端',
+  EDUCATION: '教务端',
+  SYSTEM: '教务端'
 }
 // export const musicScoreCategoriesId = [
 //   ''
 // ]
 export const downListType = {
-  1:'订单列表',
-  2:'财务管理',
-  3:'课表列表',
-  4:'vip学生列表'
+  1: '订单列表',
+  2: '财务管理',
+  3: '课表列表',
+  4: 'vip学生列表'
 }
 
 export const withdrawalStatus = {
@@ -279,31 +279,31 @@ export const withdrawalStatus = {
 }
 
 export const clientStatus = {
-  NETWORK_ROOM:'网络教室',
-  SMART_PRACTICE:'智能陪练'
+  NETWORK_ROOM: '网络教室',
+  SMART_PRACTICE: '智能陪练'
 }
 
 export const conclusion = {
-  0:'未提交',
-  1:'正常',
-  2:'异常'
+  0: '未提交',
+  1: '正常',
+  2: '异常'
 }
 export const vipResetType = {
-'1': '不限制',
-'0': '线上不可调为线下',
-'2': '线下不可调为线上',
-'3': '线上线下不可互调'
+  '1': '不限制',
+  '0': '线上不可调为线下',
+  '2': '线下不可调为线上',
+  '3': '线上线下不可互调'
 }
 
 export const courseViewType = {
-  0:'课程收费',
-  1:'AMR收费',
-  2:'会员收费'
+  0: '课程收费',
+  1: 'AMR收费',
+  2: '会员收费'
 }
 
 export const couponType = {
-  FULL_REDUCTION:'满减',
-  DISCOUNT:'折扣'
+  FULL_REDUCTION: '满减',
+  DISCOUNT: '折扣'
 }
 
 export const orderType = {
@@ -321,7 +321,7 @@ export const orderType = {
   GOODS_SELL: '商品销售',
   SUBJECT_CHANGE: '声部更换',
   DOUBLE_ELEVEN2020: '2020双十一活动',
-  DOUBLE_ELEVEN2021:'2021双十一活动',
+  DOUBLE_ELEVEN2021: '2021双十一活动',
   DEGREE: '儿童节活动',
   DEGREE_REGISTRATION: '考级报名',
   MAINTENANCE: '乐器保养',
@@ -331,12 +331,12 @@ export const orderType = {
 }
 
 export const backType = {
-  VIP:'VIP退学',
-  PRACTICE :'网管课关闭',
-  MUSIC :'乐团退团',
-  GOODS:'商品退费',
-  SUBJECT_CHANGE:'声部更换',
-  CANCEL_ACTIVITY_COURSE:'取消活动资格'
+  VIP: 'VIP退学',
+  PRACTICE: '网管课关闭',
+  MUSIC: '乐团退团',
+  GOODS: '商品退费',
+  SUBJECT_CHANGE: '声部更换',
+  CANCEL_ACTIVITY_COURSE: '取消活动资格'
 }
 
 export const paymentMode = {
@@ -361,3 +361,11 @@ export const tenantStatus = {
   "TENANT_RENEW": '机构续费',
   "CLOUD_TEACHER": '激活团练宝'
 }
+
+export const memberEnum = {
+  "DAY": '按天',
+  "MONTH": '按月',
+  "QUARTERLY": '按季度',
+  "YEAR_HALF": '按半年',
+  "YEAR": '按年'
+}

+ 2 - 1
src/utils/searchArray.js

@@ -1,5 +1,5 @@
 // 搜索用的下拉数据列表
-import { payOrderType, auditType, auditPaymentType, orderServerType, orderAuditType, rewardModeType,classTime,musicClassType,ProbationPeriodStatus,downListType,musicGroupType,conclusion,vipResetType,courseViewType,clientType,couponType,backType } from '../constant'
+import { payOrderType, auditType, auditPaymentType, orderServerType, orderAuditType, rewardModeType,classTime,musicClassType,ProbationPeriodStatus,downListType,musicGroupType,conclusion,vipResetType,courseViewType,clientType,couponType,backType,memberEnum } from '../constant'
 // 课程类型
 export const courseType = [
   { label: "声部课", value: "SINGLE" },
@@ -246,6 +246,7 @@ export const conclusionList = getValueForKey(conclusion)
 export const clientList = getValueForKey(clientType)
 export const couponTypeList = getValueForKey(couponType)
 export const backTypeList =  getValueForKey(backType)
+export const memberEnumList =getValueForKey(memberEnum)
 //downListType
 function getValueForKey (obj) {
   let arr = []

+ 4 - 1
src/utils/vueFilter.js

@@ -201,6 +201,9 @@ Vue.filter('organState',val=>constant.organState[val])
 Vue.filter('organPayState',val=>constant.organPayState[val])
 // 教学伴奏
 Vue.filter('clientType',val=>constant.clientStatus[val])
+// 会员周期
+Vue.filter('memberEnumType',val=>constant.memberEnum[val])
+
 // 时间处理
 Vue.filter('timer', (value) => {
   if (value) {
@@ -773,4 +776,4 @@ Vue.filter('couponTypeFilter', (value) => {
 
 Vue.filter('tenantStatus', value => {
   return constant.tenantStatus[value]
-})
+})

+ 1 - 1
src/views/categroyManager/globalConfig.vue

@@ -15,7 +15,7 @@
           label="登录限制"
           lazy
           name="6"
-          v-if="permissionList.overallManager"
+          v-if="permissionList.loginRules"
         >
           <loginRules v-if="activeIndex == 6" />
         </el-tab-pane>

+ 19 - 11
src/views/categroyManager/modals/payInfo.vue

@@ -152,7 +152,7 @@
             </el-select>
           </el-form-item>
         </el-row>
-        <el-row v-if="payForm.isLimitNum&&activityChannel == 2">
+        <el-row v-if="payForm.isLimitNum && activityChannel == 2">
           <el-form-item
             prop="minCourseNum"
             label="最小课时数"
@@ -174,7 +174,7 @@
             </el-input>
           </el-form-item>
         </el-row>
-        <el-row v-if="payForm.isLimitNum&&activityChannel == 2">
+        <el-row v-if="payForm.isLimitNum && activityChannel == 2">
           <el-form-item
             prop="maxCourseNum"
             label="最大课时数"
@@ -198,7 +198,7 @@
         </el-row>
 
         <el-row v-if="activityChannel == 1">
-           <el-form-item
+          <el-form-item
             prop="minCourseNum"
             label="课时数"
             :rules="[
@@ -258,10 +258,12 @@
               clearable
               :disabled="isDisabled"
             >
-              <el-option label="按月" value="MONTH"></el-option>
-              <el-option label="按季度" value="QUARTERLY"></el-option>
-              <el-option label="按半年" value="YEAR_HALF"></el-option>
-              <el-option label="按年" value="YEAR"></el-option>
+              <el-option
+                :label="item.label"
+                :value="item.value"
+                v-for="item in memberEnumList"
+                :key="item.value"
+              ></el-option>
             </el-select>
           </el-form-item>
         </el-row>
@@ -276,7 +278,6 @@
           label="折扣值"
           :rules="[
             { required: true, message: '请输入折扣值', trigger: 'blur' },
-
           ]"
         >
           <el-input
@@ -509,19 +510,26 @@
   </div>
 </template>
 <script>
-import { vipResetTypeList } from "@/utils/searchArray";
+import { vipResetTypeList, memberEnumList } from "@/utils/searchArray";
 const MIN_NUMBER = 1;
 const MAX_NUMBER = 999;
 export default {
-  props: ["payForm", "activeType", "remberList", "isDisabled",'activityChannel'],
+  props: [
+    "payForm",
+    "activeType",
+    "remberList",
+    "isDisabled",
+    "activityChannel",
+  ],
   data() {
     return {
       coureTimerList: [],
       vipResetTypeList,
+      memberEnumList,
     };
   },
   async mounted() {
-    console.log(this.activityChannel)
+    console.log(this.activityChannel);
     await this.$store.dispatch("setVipGroupCategory");
   },
   methods: {

+ 78 - 42
src/views/categroyManager/productSystem/memberFeeSet.vue

@@ -80,7 +80,8 @@
             <p>
               团购:
               {{
-                scope.row.memberFeeSetting.groupPurchaseMonthFee | hasMoneyFormat
+                scope.row.memberFeeSetting.groupPurchaseMonthFee
+                  | hasMoneyFormat
               }}
             </p>
             <p>
@@ -183,7 +184,7 @@
           <div>
             <!-- memberRankSetting/add -->
             <auth auths="memberRankOrganizationFeeMapper/get">
-              <el-button type="text" @click="resetFee(scope.row,'look')"
+              <el-button type="text" @click="resetFee(scope.row, 'look')"
                 >详情</el-button
               >
             </auth>
@@ -261,13 +262,34 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <!-- <el-form-item
+        <el-form-item
+          prop="groupPurchaseDayFee"
+          label="日收费团购价"
+          :rules="[
+            { required: true, message: '请输入日收费团购价' },
+            {
+              pattern:
+                /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
+              message: '请输入正确的金额',
+            },
+          ]"
+          :label-width="formLabelWidth"
+        >
+          <el-input
+            v-model="form.groupPurchaseDayFee"
+            :disabled="addDisabled"
+            class="feeInput"
+          >
+            <template slot="append">元/日</template>
+          </el-input>
+        </el-form-item>
+        <el-form-item
           prop="currentDayFee"
-          label="1天收费现价"
+          label="日收费零售价"
           :rules="[
             {
               required: true,
-              message: '请输入1天收费现价',
+              message: '请输入日收费零售价',
               trigger: 'blur, change',
             },
             {
@@ -278,15 +300,19 @@
           ]"
           :label-width="formLabelWidth"
         >
-          <el-input v-model="form.currentDayFee" :disabled="addDisabled">
+          <el-input
+            v-model="form.currentDayFee"
+            :disabled="addDisabled"
+            class="feeInput"
+          >
             <template slot="append">元/日</template>
           </el-input>
         </el-form-item>
         <el-form-item
           prop="originalDayFee"
-          label="1天收费原价"
+          label="收费原价"
           :rules="[
-            { required: true, message: '请输入1天收费原价' },
+            { required: true, message: '请输入收费原价' },
             {
               pattern:
                 /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
@@ -295,17 +321,22 @@
           ]"
           :label-width="formLabelWidth"
         >
-          <el-input v-model="form.originalDayFee" :disabled="addDisabled">
+          <el-input
+            v-model="form.originalDayFee"
+            :disabled="addDisabled"
+            class="feeInput"
+          >
             <template slot="append">元/日</template>
           </el-input>
-        </el-form-item> -->
+        </el-form-item>
+
         <el-form-item
           prop="groupPurchaseMonthFee"
           label="月收费团购价"
           :rules="[
-            { required: false, message: '请输入月收费团购价' },
+            { required: true, message: '请输入月收费团购价' },
             {
-              pattern:/^[1-9][0-9]*$/,
+              pattern: /^[1-9][0-9]*$/,
               message: '请输入大于0的正整数',
             },
           ]"
@@ -323,9 +354,9 @@
           prop="currentMonthFee"
           label="月收费零售价"
           :rules="[
-            { required: false, message: '请输入月收费零售价' },
+            { required: true, message: '请输入月收费零售价' },
             {
-              pattern:/^[1-9][0-9]*$/,
+              pattern: /^[1-9][0-9]*$/,
               message: '请输入大于0的正整数',
             },
           ]"
@@ -343,9 +374,9 @@
           prop="originalMonthFee"
           label="月收费原价"
           :rules="[
-            { required: false, message: '请输入月收费原价' },
+            { required: true, message: '请输入月收费原价' },
             {
-              pattern:/^[1-9][0-9]*$/,
+              pattern: /^[1-9][0-9]*$/,
               message: '请输入大于0的正整数',
             },
           ]"
@@ -363,9 +394,9 @@
           prop="groupPurchaseQuarterlyFee"
           label="季度收费团购价"
           :rules="[
-            { required: false, message: '请输入季度收费团购价' },
+            { required: true, message: '请输入季度收费团购价' },
             {
-              pattern:/^[1-9][0-9]*$/,
+              pattern: /^[1-9][0-9]*$/,
               message: '请输入大于0的正整数',
             },
           ]"
@@ -383,9 +414,9 @@
           prop="currentQuarterlyFee"
           label="季度收费零售价"
           :rules="[
-            { required: false, message: '请输入季度收费零售价' },
+            { required: true, message: '请输入季度收费零售价' },
             {
-              pattern:/^[1-9][0-9]*$/,
+              pattern: /^[1-9][0-9]*$/,
               message: '请输入大于0的正整数',
             },
           ]"
@@ -403,9 +434,9 @@
           prop="originalQuarterlyFee"
           label="季度收费原价"
           :rules="[
-            { required: false, message: '请输入季度收费原价' },
+            { required: true, message: '请输入季度收费原价' },
             {
-              pattern:/^[1-9][0-9]*$/,
+              pattern: /^[1-9][0-9]*$/,
               message: '请输入大于0的正整数',
             },
           ]"
@@ -423,9 +454,9 @@
           prop="groupPurchaseHalfYearFee"
           label="半年收费团购价"
           :rules="[
-            { required: false, message: '请输入半年收费团购价' },
+            { required: true, message: '请输入半年收费团购价' },
             {
-              pattern:/^[1-9][0-9]*$/,
+              pattern: /^[1-9][0-9]*$/,
               message: '请输入大于0的正整数',
             },
           ]"
@@ -443,9 +474,9 @@
           prop="currentHalfYearFee"
           label="半年收费零售价"
           :rules="[
-            { required: false, message: '请输入半年收费零售价' },
+            { required: true, message: '请输入半年收费零售价' },
             {
-              pattern:/^[1-9][0-9]*$/,
+              pattern: /^[1-9][0-9]*$/,
               message: '请输入大于0的正整数',
             },
           ]"
@@ -463,9 +494,9 @@
           prop="originalHalfYearFee"
           label="半年收费原价"
           :rules="[
-            { required: false, message: '请输入半年收费原价' },
+            { required: true, message: '请输入半年收费原价' },
             {
-              pattern:/^[1-9][0-9]*$/,
+              pattern: /^[1-9][0-9]*$/,
               message: '请输入大于0的正整数',
             },
           ]"
@@ -483,9 +514,9 @@
           prop="groupPurchaseYearFee"
           label="年收费团购价"
           :rules="[
-            { required: false, message: '请输入年收费团购价' },
+            { required: true, message: '请输入年收费团购价' },
             {
-              pattern:/^[1-9][0-9]*$/,
+              pattern: /^[1-9][0-9]*$/,
               message: '请输入大于0的正整数',
             },
           ]"
@@ -503,9 +534,9 @@
           prop="currentYearFee"
           label="年收费零售价"
           :rules="[
-            { required: false, message: '请输入年收费零售价' },
+            { required: true, message: '请输入年收费零售价' },
             {
-              pattern:/^[1-9][0-9]*$/,
+              pattern: /^[1-9][0-9]*$/,
               message: '请输入大于0的正整数',
             },
           ]"
@@ -523,9 +554,9 @@
           prop="originalYearFee"
           label="年收费原价"
           :rules="[
-            { required: false, message: '请输入年收费原价' },
+            { required: true, message: '请输入年收费原价' },
             {
-              pattern:/^[1-9][0-9]*$/,
+              pattern: /^[1-9][0-9]*$/,
               message: '请输入大于0的正整数',
             },
           ]"
@@ -590,6 +621,11 @@ export default {
         originalHalfYearFee: "",
         originalMonthFee: "",
         originalYearFee: "",
+        groupPurchaseDayFee: "",
+        groupPurchaseHalfYearFee: "",
+        groupPurchaseMonthFee: "",
+        groupPurchaseQuarterlyFee: "",
+        groupPurchaseYearFee: "",
         organId: "",
         memberRankSettingId: "",
       },
@@ -649,7 +685,7 @@ export default {
       this.branchStatus = true;
     },
     resetFee(row, type) {
-      if (type=='update') {
+      if (type == "update") {
         this.title = "修改收费标准";
         this.pageType = "update";
         this.addDisabled = false;
@@ -658,10 +694,10 @@ export default {
         this.title = "查看收费标准";
         this.pageType = "look";
       }
-      let obj = {}
-      for(let key in row.memberFeeSetting){
-        if(row.memberFeeSetting,key,row.memberFeeSetting[key]){
-          obj[key] = row.memberFeeSetting[key]
+      let obj = {};
+      for (let key in row.memberFeeSetting) {
+        if ((row.memberFeeSetting, key, row.memberFeeSetting[key])) {
+          obj[key] = row.memberFeeSetting[key];
         }
       }
 
@@ -674,10 +710,10 @@ export default {
       this.branchStatus = true;
     },
     onSubmit() {
-      console.log(this.pageType)
-      if(this.pageType == 'look'){
+      console.log(this.pageType);
+      if (this.pageType == "look") {
         this.branchStatus = false;
-           return
+        return;
       }
       this.$refs.ruleForm.validate(async (flag) => {
         if (flag) {

+ 3 - 3
src/views/courseRulersManager/components/loginRules.vue

@@ -24,7 +24,7 @@
             <el-input
               v-model="form['190']"
               placeholder="请输入账号数量"
-              
+
             >
               <template slot="append">个</template>
             </el-input>
@@ -46,7 +46,7 @@
             <el-input
               v-model="form['191']"
               placeholder="请输入账号数量"
-              
+
             >
               <template slot="append">个</template>
             </el-input>
@@ -66,7 +66,7 @@
           >
             学生端每台设置可登录:
             <el-input v-model="form['192']" placeholder="请输入设备数量" >
-              <template slot="append"></template>
+              <template slot="append"></template>
             </el-input>
             学员
           </el-form-item>

+ 5 - 0
src/views/operationManual/index.vue

@@ -0,0 +1,5 @@
+<template>
+  <div>
+    操作手册
+  </div>
+</template>

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

@@ -13,6 +13,14 @@ export const musicGroupPaymentCalenderAdd = data => request2({
   method: 'post',
 })
 
+export const musicGroupcreateCalender = data => request2({
+  url: '/api-web/musicGroupPaymentCalender/createCalender',
+  data,
+  method: 'post',
+
+})
+
+
 export const musicGroupPaymentCalenderView = data => request2({
   url: '/api-web/musicGroupPaymentCalender/auditListDetail',
   data: {},

+ 502 - 32
src/views/resetTeaming/components/payInfoDetail.vue

@@ -5,22 +5,23 @@
         <el-page-header
           @back="goback"
           style="padding-bottom: 30px"
-          content="创建学员缴费"
+          :content='$route.query.payUserType == "SCHOOL"?"学校缴费":"学员缴费"'
         >
         </el-page-header>
         <div class="m-core">
-          <el-form :inline="true" :model="form" label-width="120px">
+          <el-form :inline="true" :model="form" label-width="120px" ref="form">
             <div class="payTitle">
               <div class="squrt"></div>
               <p>基础信息设置</p>
             </div>
             <el-form-item
               :rules="[
-                { required: false, message: '请选择缴费时间', trigger: 'blur' },
+                { required: true, message: '请选择缴费时间', trigger: 'blur' },
               ]"
             >
               <template slot="label">
                 <p style="position: relative">
+                  <span style="color: #f56c6c; margin-right: 4px">*</span>
                   缴费时间
                   <el-tooltip placement="top" popper-class="mTooltip">
                     <div slot="content">在改时间段内学员才可缴费</div>
@@ -41,6 +42,7 @@
                 type="daterange"
                 style="width: 280px"
                 :picker-options="{ firstDayOfWeek: 1 }"
+                value-format="yyyy-MM-dd"
                 range-separator="-"
                 start-placeholder="开始日期"
                 end-placeholder="结束日期"
@@ -49,14 +51,14 @@
             </el-form-item>
             <el-row>
               <el-form-item
-                label="备注"
                 prop="memo"
                 :rules="[
-                  { required: false, message: '请输入备注', trigger: 'blur' },
+                  { required: true, message: '请输入备注', trigger: 'blur' },
                 ]"
               >
                 <template slot="label">
                   <p style="position: relative">
+                    <span style="color: #f56c6c; margin-right: 4px">*</span>
                     备注
                     <el-tooltip placement="top" popper-class="mTooltip">
                       <div slot="content">本次缴费的内容描述</div>
@@ -89,47 +91,113 @@
             <div class="checkWrap">
               <div
                 class="checkBtn"
-                :class="teamCourse ? 'active' : ''"
-                @click.prevent="teamCourse = !teamCourse"
+                :class="[
+                  teamCourse ? 'active' : '',
+                  teamCourseDisabled ? 'disabled' : '',
+                ]"
+                @click.prevent="
+                  () => {
+                    if (teamCourseDisabled) return;
+                    teamCourse = !teamCourse;
+                  }
+                "
               >
                 <p>乐团课</p>
-                <el-checkbox v-model="teamCourse"></el-checkbox>
+                <el-checkbox
+                  v-model="teamCourse"
+                  :disabled="teamCourseDisabled"
+                ></el-checkbox>
               </div>
               <div
                 class="checkBtn"
-                :class="member ? 'active' : ''"
-                @click.prevent="member = !member"
+                :class="[
+                  member ? 'active' : '',
+                  memberDisabled ? 'disabled' : '',
+                ]"
+                @click.prevent="
+                  () => {
+                    if (memberDisabled) return;
+                    member = !member;
+                  }
+                "
               >
                 <p>团练宝</p>
-                <el-checkbox v-model="member"></el-checkbox>
+                <el-checkbox
+                  v-model="member"
+                  :disabled="memberDisabled"
+                ></el-checkbox>
               </div>
               <div
+                v-if="isShowLeBao"
                 class="checkBtn"
-                :class="leBao ? 'active' : ''"
-                @click.prevent="leBao = !leBao"
+                :class="[
+                  leBao ? 'active' : '',
+                  leBaoDisabled ? 'disabled' : '',
+                ]"
+                @click.prevent="()=>{
+                  if(leBaoDisabled)return
+                  leBao = !leBao
+                }"
               >
                 <p>乐保</p>
-                <el-checkbox v-model="leBao"></el-checkbox>
+                <el-checkbox
+                  v-model="leBao"
+                  :disabled="leBaoDisabled"
+                ></el-checkbox>
               </div>
               <div
                 class="checkBtn"
-                :class="teamActive ? 'active' : ''"
-                @click.prevent="teamActive = !teamActive"
+                :class="[
+                  teamActive ? 'active' : '',
+                  teamActiveDisabled ? 'disabled' : '',
+                ]"
+                @click.prevent="()=>{
+                  if(teamActiveDisabled)return
+                  teamActive = !teamActive
+                }"
               >
                 <p>乐团活动</p>
-                <el-checkbox v-model="teamActive"></el-checkbox>
+                <el-checkbox
+                  v-model="teamActive"
+                  :disabled="teamActiveDisabled"
+                ></el-checkbox>
               </div>
             </div>
             <div class="coreList">
-              <payTeamCourse :form="form" v-if="teamCourse"/>
-              <payMember :form="form"  v-if="member"/>
-              <payLeBao :form="form"  v-if="leBao"/>
-              <payTeamActive :form="form"  v-if="teamActive"/>
+              <payTeamCourse
+                :form="form"
+                :charges="charges"
+                :courseUnitPriceSettingsByType="
+                  organizationCourseUnitPriceSettingsByType
+                "
+                v-if="teamCourse"
+                @create="addExtraClass"
+                @remove="removeExtraClass"
+                @moneyChange="syncAllMoney"
+                @priceChange="priceChange"
+              />
+              <payMember
+                :memberRankList="memberRankList"
+                @moneyChange="syncAllMoney"
+                @priceChange="priceChange"
+                :organId="organId"
+                :form="form"
+                v-if="member"
+              />
+              <payLeBao :form="form" v-if="leBao" :leBaoInfo="leBaoInfo" />
+              <payTeamActive
+                :form="form"
+                v-if="teamActive"
+                :activeList="activeList"
+                @create="addActive"
+                @remove="removeActive"
+              />
             </div>
           </el-form>
-          <div v-if="!teamCourse&&!member&&!leBao&&!teamActive">
-             <empty desc="暂无缴费项目配置" />
+          <div v-if="!teamCourse && !member && !leBao && !teamActive">
+            <empty desc="暂无缴费项目配置" />
           </div>
+          <div v-else class="submitBtn" @click="submitForm">确认提交</div>
         </div>
       </div>
     </div>
@@ -138,30 +206,186 @@
 <script>
 import payTeamCourse from "../modals/payTeamCourse";
 import payMember from "../modals/payMember";
-import payLeBao from '../modals/payLeBao'
-import payTeamActive from '../modals/payTeamActive'
+import payLeBao from "../modals/payLeBao";
+import payTeamActive from "../modals/payTeamActive";
+import numeral from "numeral";
+import dayjs from "dayjs";
+import {
+  chargeTypeList,
+  musicGroupOrganizationCourseSettingsQueryPage,
+} from "@/api/specialSetting";
+import { getSysTenantConfig } from "@/views/courseRulersManager/api";
+import {
+  musicGroupPaymentCalenderAdd,
+  musicGroupPaymentCalenderDetailBatchUpdate,
+  queryByMusicGroupOrganizationCourseSettingsId,
+  musicGroupPaymentCalenderView,
+  getAllmemberRank,
+  getMemberFee,
+  musicGroupcreateCalender,
+} from "../api";
+import { vipGroupActivity } from "@/api/vipSeting";
 export default {
   components: {
     payTeamCourse,
     payMember,
     payLeBao,
-    payTeamActive
+    payTeamActive,
   },
   data() {
     return {
       form: {
+        paymentType: "",
         memo: "",
         eclass: [{}],
+        memberList: [
+          {
+            periodEnum: "",
+            num: "",
+            actualAmount: "",
+            memberRankSettingId: "",
+            optionalFlag: null,
+          },
+        ],
+        leBaoList: [
+          {
+            num: 0,
+            actualAmount: "",
+            originalAmount: "",
+          },
+        ],
+        activeList: [{}],
+
+        leixing: "2",
       },
-      checkList: [],
       teamCourse: false,
+      teamCourseDisabled: false,
       member: false,
+      memberDisabled: false,
       teamActive: false,
+      teamActiveDisabled: false,
       leBao: false,
+      organizationCourseUnitPriceSettings: null,
+      baseInfo: null,
+      courseViewType: null,
+      charges: null, // 乐团类型对应的收费方式
+      memberRankList: [],
+      organId: null,
+      leBaoInfo: null,
+      isShowLeBao: false,
+      activeList: [{}],
+      submitList: [],
+      organizationCourseUnitPriceSettingsByType: null,
     };
   },
-  mounted() {},
+  mounted() {
+    this.organizationCourseUnitPriceSettings = JSON.parse(
+      localStorage.getItem("organizationCourseUnitPriceSettings")
+    );
+    this.baseInfo = JSON.parse(localStorage.getItem("payMusicBase"));
+    // 判断乐团状态 缴费类型
+
+    this.init();
+  },
   methods: {
+    async init() {
+      this.organId = this.musicGroup?.organId;
+      this.courseViewType = this.baseInfo?.musicGroup?.courseViewType;
+      if (
+        this.courseViewType != 2 &&
+        this.$route.query.team_status == "PRE_BUILD_FEE"
+      ) {
+        // 课程团的创建缴费
+        this.teamCourse = true;
+        this.teamCourseDisabled = true;
+        this.form.paymentType = "MUSIC_APPLY";
+      } else if (
+        this.courseViewType == 2 &&
+        this.$route.query.team_status == "PRE_BUILD_FEE"
+      ) {
+        // 会员团的创建缴费
+        this.member = true;
+        this.memberDisabled = true;
+      }
+      if (this.$route.query.payUserType == "SCHOOL") {
+        this.member = false;
+        this.memberDisabled = true;
+        this.leBao = false
+        this.teamActive = false
+        this.leBaoDisabled = true;
+        this.teamActiveDisabled = true;
+      }
+      await this.getCharges(); // 续费的选择缴费类型
+      await this.formatCourse(); // 临时加课的类型选择以及价格
+      await this.getMemberList(); // 获取会员(团练保信息)
+      await this.getLeBao(); // 获取乐保
+      await this.getActive(); // 获取活动
+      if (this.submitList.length > 0) {
+        this.$bus.$emit("showguide", this.submitList);
+        return;
+      }
+    },
+    getActive() {
+      return vipGroupActivity({
+        organId: this.organId,
+        rows: 10,
+        page: 1,
+        status: "PROGRESS",
+        activityChannel: 1,
+        enable: true,
+      }).then((res) => {
+        if (res.code == 200) {
+          this.activeList = res.data.rows;
+          if (this.activeList.length <= 0) {
+            this.submitList.push("teamActive");
+            // this.$bus.$emit("showguide", ["teamCourseFee"]);
+          }
+        }
+      });
+    },
+    async getLeBao() {
+      try {
+        const res = await getSysTenantConfig({ group: "MUSIC_REPAIR" });
+        this.leBaoInfo = res.data;
+        res.data.forEach((element) => {
+          if (element.id == 188) {
+            this.isShowLeBao = !!element.paranValue;
+          }
+        });
+        // this.$forceUpdate()
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    async getMemberList() {
+      try {
+        const res = await getAllmemberRank({ isDefault: 0 });
+        this.memberRankList = res.data;
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    async getCharges() {
+      const organId = this.musicGroup?.organId;
+      const chargeTypeId = this.musicGroup?.chargeTypeId;
+      this.chargeTypeName = this.musicGroup?.chargeTypeName;
+      try {
+        const res = await musicGroupOrganizationCourseSettingsQueryPage({
+          row: 9999,
+          chargeTypeId,
+          organId,
+        });
+        const ids = res.data.rows.map((item) => item.id);
+        if (!ids.includes(this.form.musicGroupOrganizationCourseSettingId)) {
+          this.$set(this.form, "musicGroupOrganizationCourseSettingId", null);
+        }
+        this.charges = res.data.rows;
+        // this.charges =[];
+        if (this.charges.length <= 0) {
+          this.submitList.push("teamCourseFee");
+        }
+      } catch (error) {}
+    },
     goback() {
       let query = this.$route.query;
       if (query.type == "resetTeam") {
@@ -184,16 +408,231 @@ export default {
         });
       }
     },
+    formatCourse() {
+      // 格式化课程类型
+      const organId = this.musicGroup?.organId;
+      const chargeTypeId = this.musicGroup?.chargeTypeId;
+      const _ = {};
+      const list = (this.organizationCourseUnitPriceSettings || []).filter(
+        (item) =>
+          organId &&
+          organId == item.organId &&
+          chargeTypeId &&
+          chargeTypeId == item.chargeTypeId
+      );
+      for (const item of list) {
+        _[item.courseType] = item;
+      }
+      this.organizationCourseUnitPriceSettingsByType = _;
+      return _;
+    },
+    priceChange(item, index) {
+      const _ = [...this.form.eclass];
+      const active =
+        this.organizationCourseUnitPriceSettingsByType[item.courseType] || {};
+      const price = Math.round(
+        numeral(active.unitPrice || 1)
+          .multiply(item.courseTotalMinuties || 1)
+          .value()
+      );
+      item.courseCurrentPrice = price;
+      item.courseOriginalPrice = price;
+      _[index] = item;
+      this.$set(this.form, "eclass", [..._]);
+      this.syncAllMoney();
+    },
+    syncAllMoney() {
+      let money = 0;
+      let first = 0;
+      let other = 0;
+      let classs = this.form.eclass;
+      for (const item of classs) {
+        money += item.courseCurrentPrice;
+        if (this.cycles && this.cycles.length) {
+          if (item.isStudentOptional) {
+            first += item.courseCurrentPrice;
+          } else {
+            const floorMoney = Math.floor(
+              item.courseCurrentPrice / this.cycles.length
+            );
+            const remainder = item.courseCurrentPrice % this.cycles.length;
+            first += floorMoney + remainder;
+            other += floorMoney;
+          }
+        }
+      }
+
+      // if (!money) {
+      // this.$set(this.cycle, "paymentAmount", undefined);
+      // } else {
+      // this.$set(this.cycle, "paymentAmount", money);
+      // }
+      // money += parseFloat(this.memberForm.memberPaymentAmount || 0);
+      // this.money = money;
+      return money;
+    },
+    addExtraClass() {
+      this.form.eclass.push({});
+    },
+    addActive() {
+      this.form.activeList.push({});
+    },
+    removeActive(index) {
+      this.form.activeList[index] = null;
+      this.$set(
+        this.form,
+        "activeList",
+        this.form.activeList.filter((item) => !!item)
+      );
+    },
+    removeExtraClass(index) {
+      this.form.eclass[index] = null;
+      this.$set(
+        this.form,
+        "eclass",
+        this.form.eclass.filter((item) => !!item)
+      );
+      // this.form.eclass = this.form.eclass.filter((item) => !!item);
+    },
+    submitForm() {
+      this.$refs.form.validate(async (isok) => {
+        if (isok) {
+          let obj = this.fommatDate();
+          console.log(obj);
+          try {
+            const res = await musicGroupcreateCalender(obj);
+            this.$message.success("创建缴费成功");
+            this.goback();
+          } catch (e) {
+            console.log(e);
+          }
+        }
+      });
+    },
+    fommatDate() {
+      return {
+        payUserType: this.$route.query.payUserType,
+        musicGroupOrganizationCourseSettingId:
+          this.form.musicGroupOrganizationCourseSettingId || null,
+        memo: this.form.memo,
+        startPaymentDate: this.form.paymentDate[0],
+        deadlinePaymentDate: this.form.paymentDate[1],
+        calenderActivityList:
+          this.form.activeList.length > 0 ? this.form.activeList : null,
+        musicRepair:
+          this.form.leBaoList?.length > 0
+            ? { ...this.form.leBaoList[0] }
+            : null,
+        calenderMember:
+          this.form.memberList?.length > 0
+            ? { ...this.form.memberList[0] }
+            : null,
+        musicGroupPaymentCalenderCourseSettingsList:
+          this.form.eclass.length > 0 ? this.form.eclass : null,
+        musicGroupId: this.$route.query.id,
+      };
+    },
   },
   watch: {
     teamCourse(val) {
-      console.log(val);
+      if (!val) {
+        this.$set(this.form, "eclass", null);
+      } else {
+        this.$set(this.form, "eclass", [{}]);
+      }
+    },
+    member(val) {
+      if (!val) {
+        this.$set(this.form, "memberList", null);
+      } else {
+        this.$set(this.form, "memberList", [
+          {
+            periodEnum: "",
+            num: "",
+            actualAmount: "",
+            memberRankSettingId: "",
+            optionalFlag: null,
+          },
+        ]);
+      }
+    },
+    teamActive(val) {
+      if (!val) {
+        this.$set(this.form, "activeList", null);
+      } else {
+        this.$set(this.form, "activeList", [{}]);
+      }
+    },
+    leBao(val) {
+      if (!val) {
+        this.$set(this.form, "leBaoList", null);
+      } else {
+        this.$set(this.form, "leBaoList", [
+          {
+            num: 0,
+            actualAmount: "",
+            originalAmount: "",
+          },
+        ]);
+      }
+    },
+    async "form.musicGroupOrganizationCourseSettingId"(val) {
+      // && !this.rowDetail
+
+      if (val && !this.isSetCourseSettingsId) {
+        try {
+          const res = await queryByMusicGroupOrganizationCourseSettingsId({
+            id: val,
+          });
+          // this.form.eclass = res.data.filter((item) => {
+          //   return !item.isStudentOptional || this.paymentType !== undefined;
+          // }) || [{}];
+          this.$set(this.form, "eclass", res.data);
+          // this.syncAllMoney();
+        } catch (error) {}
+      }
+      this.isSetCourseSettingsId = false;
+    },
+    "form.leixing"(val) {
+      this.cycles = [{}];
+      this.collapse = [0];
+      this.cycle = {};
+      this.$set(this.form, "musicGroupOrganizationCourseSettingId", undefined);
+      // this.$set(this.cycle, "paymentAmount", undefined);
+      // this.$set(this.other, "memo", null);
+      if (val === "1") {
+        this.$set(this.form, "eclass", []);
+      } else if (val === "2") {
+        this.$set(this.form, "eclass", [{}]);
+      }
+    },
+  },
+  computed: {
+    musicGroup() {
+      return this.baseInfo?.musicGroup;
     },
   },
 };
 </script>
 <style lang="scss" scoped>
+/deep/.el-form-item__label:before {
+  content: "" !important;
+  position: absolute;
+  color: transparent;
+  margin-right: 4px;
+}
 .payInfoWrap {
+  .submitBtn {
+    width: 121px;
+    height: 41px;
+    background: var(--color-primary);
+    border-radius: 7px;
+    margin: 20px auto;
+    line-height: 40px;
+    color: #fff;
+    text-align: center;
+    cursor: pointer;
+  }
   .left {
     /deep/.el-checkbox {
       padding: 8px 10px 7px 10px;
@@ -201,7 +640,7 @@ export default {
     }
     /deep/.el-checkbox .el-checkbox__inner {
       border-radius: 50%;
-      border: 1px solid #d9d9d9;
+      border: 1px solid var(--color-primary);
       width: 16px;
       height: 16px;
       &:after {
@@ -210,7 +649,7 @@ export default {
       }
     }
     /deep/.el-checkbox__inner:hover {
-      background-color: #fff;
+      background-color: var(--color-primary);
     }
     /deep/.el-checkbox.is-checked {
       border-color: #fff;
@@ -244,6 +683,9 @@ export default {
       .checkBtn.active {
         background-color: var(--color-primary);
         color: #fff;
+        /deep/.el-checkbox .el-checkbox__inner {
+          border: 1px solid #fff;
+        }
       }
       .checkBtn {
         transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
@@ -259,14 +701,42 @@ export default {
         flex-direction: row;
         align-items: center;
         cursor: pointer;
-        background: #f2f2f2;
+        background: rgba(20, 146, 138, 0.12);
         border-radius: 6px;
         height: 41px;
+        &:hover {
+          background-color: var(--color-primary);
+          color: #fff;
+          /deep/.el-checkbox__inner {
+            background-color: var(--color-primary);
+            border: 1px solid #fff;
+          }
+        }
         p {
           height: 41px;
           line-height: 41px;
         }
       }
+      .checkBtn.disabled {
+        cursor: not-allowed;
+        color: #d9d9d9;
+        background-color: #f2f2f2 !important;
+        /deep/.el-checkbox__inner {
+          background-color: #fff !important;
+           border-color: #d9d9d9;
+          color: #fff;
+          &::after {
+            border-color: #d9d9d9;
+          }
+        }
+        &:hover {
+          background-color: #f2f2f2 !important;
+          color: #d9d9d9;
+          /deep/.el-checkbox__inner {
+            background-color: #fff !important;
+          }
+        }
+      }
     }
   }
 }

+ 77 - 62
src/views/resetTeaming/components/resetPayList.vue

@@ -149,71 +149,75 @@
                   >查看</el-button
                 ></auth
               >
-              <auth auths="musicGroupPaymentCalenderDetail/batchAdd/3890"        v-if="
-                    scope.row.auditStatus != 'REJECT' &&
-                    scope.row.auditStatus != 'AUDITING' &&
-                    scope.row.auditStatus != 'DRAFT' &&
-                    teamStatus &&
-                    scope.row.paymentType != 'MUSIC_APPLY' &&
-                    scope.row.paymentType != 'ADD_STUDENT' &&
-                    scope.row.paymentType != 'SPAN_GROUP_CLASS_ADJUST'
-                  ">
-                <el-button
-                  type="text"
-                  @click="openChioseStudent(scope.row)"
-
+              <auth
+                auths="musicGroupPaymentCalenderDetail/batchAdd/3890"
+                v-if="
+                  scope.row.auditStatus != 'REJECT' &&
+                  scope.row.auditStatus != 'AUDITING' &&
+                  scope.row.auditStatus != 'DRAFT' &&
+                  teamStatus &&
+                  scope.row.paymentType != 'MUSIC_APPLY' &&
+                  scope.row.paymentType != 'ADD_STUDENT' &&
+                  scope.row.paymentType != 'SPAN_GROUP_CLASS_ADJUST'
+                "
+              >
+                <el-button type="text" @click="openChioseStudent(scope.row)"
                   >添加学员</el-button
                 >
               </auth>
               <!-- v-permission="'musicGroupPaymentCalenderDetail/batchAdd/3890'"  v-permission="''" -->
 
-              <auth auths="musicGroupPaymentCalender/update/4313"  v-if="
-                    teamStatus &&
-                    (scope.row.auditStatus === 'REJECT' ||
-                      scope.row.auditStatus === 'DRAFT')
-                  ">
-                <el-button
-                  type="text"
-
-                  @click="resetPay(scope.row)"
+              <auth
+                auths="musicGroupPaymentCalender/update/4313"
+                v-if="
+                  teamStatus &&
+                  (scope.row.auditStatus === 'REJECT' ||
+                    scope.row.auditStatus === 'DRAFT')
+                "
+              >
+                <el-button type="text" @click="resetPay(scope.row)"
                   >修改</el-button
                 >
               </auth>
-              <auth auths="musicGroupPaymentCalender/revoke"     v-if="
-                    (team_status == 'FEE_AUDIT' || team_status == 'PROGRESS') &&
-                    scope.row.auditStatus === 'AUDITING' &&
-                    scope.row.paymentType != 'ADD_STUDENT' &&
-                    scope.row.paymentType != 'SPAN_GROUP_CLASS_ADJUST'
-                  ">
-                <el-button
-                  type="text"
-
-                  @click="revoke(scope.row)"
+              <auth
+                auths="musicGroupPaymentCalender/revoke"
+                v-if="
+                  (team_status == 'FEE_AUDIT' || team_status == 'PROGRESS') &&
+                  scope.row.auditStatus === 'AUDITING' &&
+                  scope.row.paymentType != 'ADD_STUDENT' &&
+                  scope.row.paymentType != 'SPAN_GROUP_CLASS_ADJUST'
+                "
+              >
+                <el-button type="text" @click="revoke(scope.row)"
                   >撤回</el-button
                 >
               </auth>
               <!--  -->
-              <auth auths="musicGroupPaymentCalender/delByBatchNo/4305"     v-if="
-                    teamStatus &&
-                     scope.row.paymentType != 'ADD_STUDENT' &&
-                    scope.row.paymentType != 'SPAN_GROUP_CLASS_ADJUST'
-                  ">
-                <el-button
-                  type="text"
-
-                  @click="removeBatchNo(scope.row)"
+              <auth
+                auths="musicGroupPaymentCalender/delByBatchNo/4305"
+                v-if="
+                  teamStatus &&
+                  scope.row.paymentType != 'ADD_STUDENT' &&
+                  scope.row.paymentType != 'SPAN_GROUP_CLASS_ADJUST'
+                "
+              >
+                <el-button type="text" @click="removeBatchNo(scope.row)"
                   >删除</el-button
-                ></auth>
-                       <auth auths="musicGroupPaymentCalender/delByBatchNo/4305"     v-if="
-                    teamStatus &&
-                     scope.row.paymentType == 'ADD_STUDENT'&&( scope.row.auditStatus == 'DRAFT' || scope.row.auditStatus == 'REJECT')
-                  ">
-                <el-button
-                  type="text"
-
-                  @click="removeBatchNo(scope.row)"
+                ></auth
+              >
+              <auth
+                auths="musicGroupPaymentCalender/delByBatchNo/4305"
+                v-if="
+                  teamStatus &&
+                  scope.row.paymentType == 'ADD_STUDENT' &&
+                  (scope.row.auditStatus == 'DRAFT' ||
+                    scope.row.auditStatus == 'REJECT')
+                "
+              >
+                <el-button type="text" @click="removeBatchNo(scope.row)"
                   >删除</el-button
-                ></auth>
+                ></auth
+              >
 
               <!-- <el-button type="text"
                          v-if="!isNewGropu&&teamStatus&&scope.row.paymentType!='MUSIC_APPLY'"
@@ -427,7 +431,7 @@
         :baseInfo="baseInfo"
         :paymentType="paymentType"
         :musicGroupId="$route.query.id"
-        @changePaymentType = "changePaymentType"
+        @changePaymentType="changePaymentType"
       />
     </el-dialog>
     <!-- 会员缴费 -->
@@ -548,7 +552,7 @@ export default {
   },
   data() {
     return {
-      paymentType:this.team_status == 'PRE_BUILD_FEE' ? 0 : 1,
+      paymentType: this.team_status == "PRE_BUILD_FEE" ? 0 : 1,
       musicGroupStu: [],
       payFormType: "user",
       userVisible: false,
@@ -609,7 +613,7 @@ export default {
   created() {},
   //生命周期 - 挂载完成(可以访问DOM元素)
   async mounted() {
-      this.paymentType=this.team_status == 'PRE_BUILD_FEE' ? 0 : 1
+    this.paymentType = this.team_status == "PRE_BUILD_FEE" ? 0 : 1;
     // 获取分部
     try {
       const res = await getOrganizationCourseUnitPriceSettings({
@@ -617,12 +621,17 @@ export default {
       });
       this.organizationCourseUnitPriceSettings = res.data.rows;
       // this.organizationCourseUnitPriceSettings=[];
-      if(this.organizationCourseUnitPriceSettings.length<=0){
-          this.$bus.$emit("showguide", ['teamCourseFee']);
-          return
+      if (this.organizationCourseUnitPriceSettings.length <= 0) {
+        this.$bus.$emit("showguide", ["teamCourseFee"]);
+        return;
       }
-
-    } catch (error) {}
+      localStorage.setItem(
+        "organizationCourseUnitPriceSettings",
+        JSON.stringify(this.organizationCourseUnitPriceSettings)
+      );
+    } catch (error) {
+      localStorage.removeItem("organizationCourseUnitPriceSettings");
+    }
     this.init();
   },
   computed: {
@@ -666,16 +675,22 @@ export default {
           if (res.code == 200) {
             this.baseInfo = res.data;
             this.$emit("getBaseInfo", this.baseInfo);
+            localStorage.setItem('payMusicBase',JSON.stringify(this.baseInfo))
+          }else{
+            localStorage.removeItem('payMusicBase')
           }
         });
       }
     },
-    changePaymentType(val){
-      this.paymentType = val
+    changePaymentType(val) {
+      this.paymentType = val;
     },
     newUserPay() {
       let query = this.$route.query;
-      this.$router.push({path:'/business/studentPaySet',query:{...query}})
+      this.$router.push({
+        path: "/business/studentPaySet",
+        query: { ...query,  payUserType: "SCHOOL"},
+      });
       // 判断一下乐团是课程缴费 还是会员缴费 且乐团状态为创建缴费中
       // if (
       //   this.baseInfo?.musicGroup?.courseViewType == 2 &&

+ 5 - 4
src/views/resetTeaming/components/resetPayListSchool.vue

@@ -636,10 +636,11 @@ export default {
         this.$message.error("会员缴费乐团无法创建学校缴费");
         return;
       } else {
-        this.payFormType = "school";
-        this.isNew = true;
-        this.activeRow = null;
-        this.userVisible = true;
+        let query = this.$route.query;
+        this.$router.push({
+          path: "/business/studentPaySet",
+          query: { ...query, payUserType: "SCHOOL" },
+        });
       }
     },
     getList() {

+ 0 - 4
src/views/resetTeaming/components/strudentPayInfo.vue

@@ -515,7 +515,6 @@ import load from "@/utils/loading";
 import cleanDeep from "clean-deep";
 import qs from "qs";
 import { courseType } from "@/utils/searchArray";
-import { paymentPatternType } from "@/constant";
 import studentPayDetail from "../modals/studentPayDetail";
 import {
   findSound,
@@ -585,7 +584,6 @@ export default {
       titleForm: {
         paymentType: "",
         musicGroupOrganizationCourseSettingId: "",
-        paymentPattern: "",
         paymentValidStartDate: "",
         paymentValidEndDate: "",
         calenderSettingsName: "",
@@ -646,8 +644,6 @@ export default {
             paymentType: res.data.calender.paymentType,
             musicGroupOrganizationCourseSettingId:
               res.data.calenderSettingsName,
-            paymentPattern:
-              paymentPatternType[res.data.calender.paymentPattern],
             paymentValidStartDate: res.data.calender.paymentValidStartDate,
             paymentValidEndDate: res.data.calender.paymentValidEndDate,
             calenderSettingsName: res.data.calenderSettingsName,

+ 1 - 0
src/views/resetTeaming/index.vue

@@ -302,6 +302,7 @@ export default {
   beforeDestroy() {
     // localStorage.setItem('setStep', 0)
     // localStorage.setItem('resetCode', 1)
+    //
   },
   mounted() {
     // let obj = {}

+ 32 - 29
src/views/resetTeaming/modals/payLeBao.vue

@@ -2,24 +2,23 @@
   <div class="teamCourseList">
     <p class="coreTitle">乐保<span class="dot"></span></p>
     <el-table
-      :data="form.eclass"
+      :data="form.leBaoList"
       style="width: 100% !important; background: #f9f9f9"
       :header-cell-style="{ background: '#F9F9F9', color: '#444' }"
     >
       <el-table-column
       width="170px"
         label="会员类型"
-        prop="memberRankSettingId"
-        key="memberRankSettingId"
+
       >
         <template slot-scope="scope">
           <p>乐保保养</p>
         </template>
       </el-table-column>
-      <el-table-column label="年限" prop="periodEnum" key="periodEnum"  width="170px">
+      <el-table-column label="年限" prop="num" key="num"  width="170px">
         <template slot-scope="scope">
           <el-form-item
-            :prop="'eclass.' + scope.$index + '.periodEnum'"
+            :prop="'leBaoList.' + scope.$index + '.num'"
             :rules="[
               {
                 required: true,
@@ -34,23 +33,23 @@
             <el-input-number
               style="width: 90% !important"
               class="number-input"
-              v-model="form.eclass[scope.$index].courseTotalMinuties"
+              v-model="form.leBaoList[scope.$index].num"
               :controls="false"
               :precision="0"
               :min="0"
-              :disabled="isDisabled"
+              @change="changeYear"
               placeholder="请输入年限"
             />
           </el-form-item>
         </template>
       </el-table-column>
-      <el-table-column label="团购价(元)" prop="actualAmount" key="actualAmount"  width="170px">
+      <el-table-column label="价(元)" prop="actualAmount" key="actualAmount"  width="170px">
         <template slot-scope="scope">
           <el-form-item
-            :prop="'eclass.' + scope.$index + '.actualAmount'"
+            :prop="'leBaoList.' + scope.$index + '.actualAmount'"
             :rules="{
               required: true,
-              message: '请输入团购价',
+              message: '请输入价',
               trigger: 'blur',
             }"
           >
@@ -58,12 +57,13 @@
             <el-input-number
               style="width: 90% !important"
               class="number-input"
-              v-model="form.eclass[scope.$index].actualAmount"
+              v-model="form.leBaoList[scope.$index].actualAmount"
               :controls="false"
               :precision="0"
               :min="0"
               @change="change"
-              placeholder="请输入团购价"
+              :disabled="true"
+              placeholder="请输入售价"
             />
           </el-form-item>
         </template>
@@ -76,36 +76,28 @@
       >
         <template slot-scope="scope">
           <el-form-item
-            :prop="'eclass.' + scope.$index + '.originalAmount'"
+            :prop="'leBaoList.' + scope.$index + '.originalAmount'"
             :rules="{
               required: true,
               message: '请输入原价',
               trigger: 'blur',
             }"
           >
-            <!-- <el-input-number
+            <el-input-number
               style="width: 90% !important"
               class="number-input"
-              v-model="form.eclass[scope.$index].originalAmount"
+              v-model="form.leBaoList[scope.$index].originalAmount"
               :controls="false"
               :precision="0"
               :min="0"
+              :disabled='true'
               placeholder="请输入原价"
-            /> -->
-            500
+            />
           </el-form-item>
         </template>
       </el-table-column>
       <el-table-column prop="close" key="close">
         <template slot-scope="scope">
-          <div style="color: #fa6400; cursor: pointer">
-            <!--  v-if="form.length > 1" v-if="clearable" -->
-            <i
-              @click="$listeners.remove && $listeners.remove(scope.$index)"
-              class="el-icon-error"
-            ></i>
-            删除
-          </div>
         </template>
       </el-table-column>
     </el-table>
@@ -115,7 +107,7 @@
 </template>
 <script>
 export default {
-  props: ["form"],
+  props: ["form",'leBaoInfo'],
   data() {
     return {
       charges: [],
@@ -126,11 +118,22 @@ export default {
     };
   },
   methods: {
-    courseItemChange(row, index) {},
-    priceChange(row, index) {},
-    isOptionDisabled(key) {},
+    changeYear(val){
+      this.leBaoInfo.forEach(element => {
+        if(element.id == '189'){
+          this.$set(this.form.leBaoList[0],'actualAmount',val*element.paranValue)
+        }
+          if(element.id == '202'){
+          this.$set(this.form.leBaoList[0],'originalAmount',val*element.paranValue)
+        }
+      });
+
+    },
     change() {},
   },
+  computed:{
+
+  }
 };
 </script>
 <style lang="scss" scoped>

+ 156 - 52
src/views/resetTeaming/modals/payMember.vue

@@ -2,19 +2,19 @@
   <div class="teamCourseList">
     <p class="coreTitle">团练宝<span class="dot"></span></p>
     <el-table
-      :data="form.eclass"
+      :data="form.memberList"
       style="width: 100% !important; background: #f9f9f9"
       :header-cell-style="{ background: '#F9F9F9', color: '#444' }"
     >
       <el-table-column
-       width="170px"
+        width="170px"
         label="会员类型"
         prop="memberRankSettingId"
         key="memberRankSettingId"
       >
         <template slot-scope="scope">
           <el-form-item
-            :prop="'eclass.' + scope.$index + '.memberRankSettingId'"
+            :prop="'memberList.' + scope.$index + '.memberRankSettingId'"
             :rules="{
               required: true,
               message: '请选择会员类型',
@@ -23,27 +23,29 @@
           >
             <el-select
               style="width: 90% !important"
-              v-model="form.eclass[scope.$index].courseType"
+              v-model="form.memberList[scope.$index].memberRankSettingId"
               placeholder="会员类型"
-              clearable
-              @change="courseItemChange(scope.row, scope.$index)"
-              :disabled="isDisabled"
+              @change="changeMember"
             >
               <el-option
-                v-for="(item, key) in courseUnitPriceSettingsByType"
-                :key="key"
-                :disabled="isOptionDisabled(key)"
-                :label="courseType[key]"
-                :value="key"
+                :value="item.id"
+                :label="item.name"
+                v-for="item in memberRankList"
+                :key="item.id"
               ></el-option>
             </el-select>
           </el-form-item>
         </template>
       </el-table-column>
-      <el-table-column label="是否必选" prop="optionalFlag" key="optionalFlag"  width="170px">
+      <el-table-column
+        label="是否必选"
+        prop="optionalFlag"
+        key="optionalFlag"
+        width="170px"
+      >
         <template slot-scope="scope">
           <el-form-item
-            :prop="'eclass.' + scope.$index + '.optionalFlag'"
+            :prop="'memberList.' + scope.$index + '.optionalFlag'"
             :rules="{
               required: true,
               message: '请选择是否必选',
@@ -52,9 +54,9 @@
           >
             <el-select
               style="width: 90% !important"
-              v-model="form.eclass[scope.$index].optionalFlag"
+              v-model="form.memberList[scope.$index].optionalFlag"
               placeholder="是否必选"
-              :disabled="isDisabled"
+              :disabled="!form.memberList[scope.$index].memberRankSettingId"
               clearable
             >
               <el-option
@@ -67,10 +69,15 @@
           </el-form-item>
         </template>
       </el-table-column>
-      <el-table-column label="会员周期" prop="periodEnum" key="periodEnum"  width="170px">
+      <el-table-column
+        label="会员周期"
+        prop="periodEnum"
+        key="periodEnum"
+        width="170px"
+      >
         <template slot-scope="scope">
           <el-form-item
-            :prop="'eclass.' + scope.$index + '.periodEnum'"
+            :prop="'memberList.' + scope.$index + '.periodEnum'"
             :rules="[
               {
                 required: true,
@@ -79,26 +86,31 @@
               },
             ]"
           >
-            <!--    @change="
-                            $listeners.priceChange(scope.row, scope.$index)
-                          " -->
-            <el-input-number
+            <el-select
+              v-model="form.memberList[scope.$index].periodEnum"
               style="width: 90% !important"
-              class="number-input"
-              v-model="form.eclass[scope.$index].courseTotalMinuties"
-              :controls="false"
-              :precision="0"
-              :min="0"
-              :disabled="isDisabled"
-              placeholder="课程时长"
-            />
+              @change="changeMemberperiodEnum"
+              :disabled="!form.memberList[scope.$index].memberRankSettingId"
+            >
+              <el-option
+                :label="item.label"
+                :value="item.value"
+                v-for="item in memberEnumList"
+                :key="item.value"
+              ></el-option>
+            </el-select>
           </el-form-item>
         </template>
       </el-table-column>
-         <el-table-column label="会员数量" prop="periodEnum" key="periodEnum"  width="170px">
+      <el-table-column
+        label="会员数量"
+        prop="num"
+        key="num"
+        width="170px"
+      >
         <template slot-scope="scope">
           <el-form-item
-            :prop="'eclass.' + scope.$index + '.periodEnum'"
+            :prop="'memberList.' + scope.$index + '.num'"
             :rules="[
               {
                 required: true,
@@ -113,20 +125,26 @@
             <el-input-number
               style="width: 90% !important"
               class="number-input"
-              v-model="form.eclass[scope.$index].courseTotalMinuties"
+              v-model="form.memberList[scope.$index].num"
               :controls="false"
               :precision="0"
               :min="0"
-              :disabled="isDisabled"
+              @change="changeMemberperiodEnum(form.memberList[scope.$index].periodEnum)"
               placeholder="会员数量"
+               :disabled="!form.memberList[scope.$index].memberRankSettingId"
             />
           </el-form-item>
         </template>
       </el-table-column>
-      <el-table-column label="现价(元)" prop="actualAmount" key="actualAmount"  width="170px">
+      <el-table-column
+        label="售价(元)"
+        prop="actualAmount"
+        key="actualAmount"
+        width="170px"
+      >
         <template slot="header">
           <p style="position: relative">
-            现价(元)
+            价(元)
             <el-tooltip placement="top" popper-class="mTooltip">
               <div slot="content">学生实际缴费金额</div>
               <i
@@ -138,10 +156,10 @@
         </template>
         <template slot-scope="scope">
           <el-form-item
-            :prop="'eclass.' + scope.$index + '.actualAmount'"
+            :prop="'memberList.' + scope.$index + '.actualAmount'"
             :rules="{
               required: true,
-              message: '请输入价',
+              message: '请输入价',
               trigger: 'blur',
             }"
           >
@@ -149,53 +167,57 @@
             <el-input-number
               style="width: 90% !important"
               class="number-input"
-              v-model="form.eclass[scope.$index].actualAmount"
+              v-model="form.memberList[scope.$index].actualAmount"
               :controls="false"
               :precision="0"
               :min="0"
               @change="change"
-              placeholder="请输入现价"
+               :disabled="!form.memberList[scope.$index].memberRankSettingId"
+              placeholder="请输入售价"
             />
           </el-form-item>
         </template>
       </el-table-column>
       <el-table-column
+        label="原价(元)"
         prop="originalAmount"
         key="originalAmount"
-        label="原价(元)"
-         width="170px"
+        width="170px"
       >
         <template slot-scope="scope">
           <el-form-item
-            :prop="'eclass.' + scope.$index + '.originalAmount'"
+            :prop="'memberList.' + scope.$index + '.originalAmount'"
             :rules="{
               required: true,
               message: '请输入原价',
               trigger: 'blur',
             }"
           >
+            <!-- $listeners.moneyChange -->
             <el-input-number
               style="width: 90% !important"
               class="number-input"
-              v-model="form.eclass[scope.$index].originalAmount"
+              v-model="form.memberList[scope.$index].originalAmount"
               :controls="false"
               :precision="0"
               :min="0"
+              @change="change"
+               :disabled="!form.memberList[scope.$index].memberRankSettingId"
               placeholder="请输入原价"
             />
           </el-form-item>
         </template>
       </el-table-column>
-      <el-table-column prop="close" key="close" >
+      <el-table-column prop="close" key="close">
         <template slot-scope="scope">
           <div style="color: #fa6400; cursor: pointer">
             <!--  v-if="form.length > 1" v-if="clearable" -->
-            <i
+            <!-- <i
               @click="$listeners.remove && $listeners.remove(scope.$index)"
               class="el-icon-error"
               style="margin-bottom: 24px"
             ></i>
-            删除
+            删除 -->
           </div>
         </template>
       </el-table-column>
@@ -205,22 +227,104 @@
   </div>
 </template>
 <script>
+import { courseType, boolOptions } from "@/constant";
+import { objectToOptions } from "@/utils";
+import { memberEnumList } from "@/utils/searchArray";
+import { getMemberFee } from "../api";
 export default {
-  props: ["form"],
+  props: ["form", "memberRankList", "organId"],
   data() {
     return {
       charges: [],
       clearable: false,
       isDisabled: false,
       courseUnitPriceSettingsByType: [],
-      boolOptionsOptions: [],
+      boolOptionsOptions: objectToOptions(boolOptions),
+      memberEnumList,
+      memberPrice: {},
     };
   },
   methods: {
-    courseItemChange(row, index) {},
-    priceChange(row, index) {},
-    isOptionDisabled(key) {},
+    changeMemberperiodEnum(val) {
+      if (val == "DAY") {
+        this.$set(
+          this.form.memberList[0],
+          "actualAmount",
+          this.memberPrice.groupPurchaseDayFee * this.form.memberList[0].num
+        );
+        this.$set(
+          this.form.memberList[0],
+          "originalAmount",
+          this.memberPrice.originalDayFee * this.form.memberList[0].num
+        );
+      }
+      if (val == "MONTH") {
+        this.$set(
+          this.form.memberList[0],
+          "actualAmount",
+          this.memberPrice.groupPurchaseMonthFee * this.form.memberList[0].num
+        );
+        this.$set(
+          this.form.memberList[0],
+          "originalAmount",
+          this.memberPrice.originalMonthFee * this.form.memberList[0].num
+        );
+      }
+      if (val == "QUARTERLY") {
+        this.$set(
+          this.form.memberList[0],
+          "actualAmount",
+          this.memberPrice.groupPurchaseQuarterlyFee * this.form.memberList[0].num
+        );
+        this.$set(
+          this.form.memberList[0],
+          "originalAmount",
+          this.memberPrice.originalQuarterlyFee * this.form.memberList[0].num
+        );
+      }
+      if (val == "YEAR_HALF") {
+        this.$set(
+          this.form.memberList[0],
+          "actualAmount",
+          this.memberPrice.groupPurchaseHalfYearFee * this.form.memberList[0].num
+        );
+        this.$set(
+          this.form.memberList[0],
+          "originalAmount",
+          this.memberPrice.originalHalfYearFee * this.form.memberList[0].num
+        );
+      }
+      if (val == "YEAR") {
+        this.$set(
+          this.form.memberList[0],
+          "actualAmount",
+          this.memberPrice.groupPurchaseYearFee * this.form.memberList[0].num
+        );
+        this.$set(
+          this.form.memberList[0],
+          "originalAmount",
+          this.memberPrice.originalYearFee * this.form.memberList[0].num
+        );
+      }
+    },
     change() {},
+    async changeMember(val) {
+      if (val) {
+        try {
+          const res = await getMemberFee({
+            rankId: val,
+            organId: this.organId,
+          });
+          this.memberPrice = res.data;
+          if (!res.data) {
+            this.$bus.$emit("showguide", ["memberList"]);
+            return;
+          }
+        } catch (e) {
+          console.log(e);
+        }
+      }
+    },
   },
 };
 </script>

+ 64 - 42
src/views/resetTeaming/modals/payTeamActive.vue

@@ -2,14 +2,19 @@
   <div class="teamCourseList">
     <p class="coreTitle">乐团活动<span class="dot"></span></p>
     <el-table
-      :data="form.eclass"
+      :data="form.activeList"
       style="width: 100% !important; background: #f9f9f9"
       :header-cell-style="{ background: '#F9F9F9', color: '#444' }"
     >
-      <el-table-column label="活动方案" prop="courseType" key="courseType"  width="170px">
+      <el-table-column
+        label="活动方案"
+        prop="activityId"
+        key="activityId"
+        width="170px"
+      >
         <template slot-scope="scope">
           <el-form-item
-            :prop="'eclass.' + scope.$index + '.courseType'"
+            :prop="'activeList.' + scope.$index + '.activityId'"
             :rules="{
               required: true,
               message: '请选择活动方案',
@@ -18,18 +23,18 @@
           >
             <el-select
               style="width: 90% !important"
-              v-model="form.eclass[scope.$index].courseType"
+              v-model="form.activeList[scope.$index].activityId"
               placeholder="活动方案"
               clearable
-              @change="courseItemChange(scope.row, scope.$index)"
+              @change="courseItemChange(scope.row, scope.$index,form.activeList[scope.$index].activityId)"
               :disabled="isDisabled"
             >
               <el-option
-                v-for="(item, key) in courseUnitPriceSettingsByType"
+                v-for="(item, key) in activeList"
                 :key="key"
-                :disabled="isOptionDisabled(key)"
-                :label="courseType[key]"
-                :value="key"
+                :disabled="isOptionDisabled(item.id)"
+                :label="item.name"
+                :value="item.id"
               ></el-option>
             </el-select>
           </el-form-item>
@@ -37,13 +42,13 @@
       </el-table-column>
       <el-table-column
         label="是否必选"
-        prop="isStudentOptional"
-        key="isStudentOptional"
-         width="170px"
+        prop="optionalFlag"
+        key="optionalFlag"
+        width="170px"
       >
         <template slot-scope="scope">
           <el-form-item
-            :prop="'eclass.' + scope.$index + '.isStudentOptional'"
+            :prop="'activeList.' + scope.$index + '.optionalFlag'"
             :rules="{
               required: true,
               message: '请选择是必选',
@@ -52,7 +57,7 @@
           >
             <el-select
               style="width: 90% !important"
-              v-model="form.eclass[scope.$index].isStudentOptional"
+              v-model="form.activeList[scope.$index].optionalFlag"
               placeholder="是否必选"
               :disabled="isDisabled"
               clearable
@@ -69,29 +74,28 @@
       </el-table-column>
       <el-table-column
         label="活动课程"
-        prop="courseTotalMinuties"
-        key="courseTotalMinuties"
-         width="170px"
+
+        width="170px"
       >
         <template slot-scope="scope">
-          <p>1v1</p>
+           <el-input style="width: 90% !important" :disabled="true" v-model="form.activeList[scope.$index].vipGroupCategoryNames"></el-input>
         </template>
       </el-table-column>
-            <el-table-column
+      <el-table-column
         label="课时数"
         prop="courseTotalMinuties"
         key="courseTotalMinuties"
-         width="170px"
+        width="170px"
       >
         <template slot-scope="scope">
-          <p>180</p>
+          <el-input style="width: 90% !important" :disabled="true" v-model="form.activeList[scope.$index].num"></el-input>
         </template>
       </el-table-column>
       <el-table-column
         label="现价(元)"
-        prop="courseCurrentPrice"
-        key="courseCurrentPrice"
-         width="170px"
+        prop="actualAmount"
+        key="actualAmount"
+        width="170px"
       >
         <template slot="header">
           <p style="position: relative">
@@ -107,7 +111,7 @@
         </template>
         <template slot-scope="scope">
           <el-form-item
-            :prop="'eclass.' + scope.$index + '.courseCurrentPrice'"
+            :prop="'activeList.' + scope.$index + '.actualAmount'"
             :rules="{
               required: true,
               message: '请输入现价',
@@ -118,7 +122,7 @@
             <el-input-number
               style="width: 90% !important"
               class="number-input"
-              v-model="form.eclass[scope.$index].courseCurrentPrice"
+              v-model="form.activeList[scope.$index].actualAmount"
               :controls="false"
               :precision="0"
               :min="0"
@@ -129,14 +133,14 @@
         </template>
       </el-table-column>
       <el-table-column
-        prop="courseOriginalPrice"
-        key="courseOriginalPrice"
+        prop="originalAmount"
+        key="originalAmount"
         label="原价(元)"
-         width="170px"
+        width="170px"
       >
         <template slot-scope="scope">
           <el-form-item
-            :prop="'eclass.' + scope.$index + '.courseOriginalPrice'"
+            :prop="'activeList.' + scope.$index + '.originalAmount'"
             :rules="{
               required: true,
               message: '请输入原价',
@@ -146,7 +150,7 @@
             <el-input-number
               style="width: 90% !important"
               class="number-input"
-              v-model="form.eclass[scope.$index].courseOriginalPrice"
+              v-model="form.activeList[scope.$index].originalAmount"
               :controls="false"
               :precision="0"
               :min="0"
@@ -155,14 +159,12 @@
           </el-form-item>
         </template>
       </el-table-column>
-      <el-table-column prop="close" key="close" >
+      <el-table-column prop="close" key="close">
         <template slot-scope="scope">
-          <div style="color:#FA6400;cursor: pointer;">
+          <div style="color: #fa6400; cursor: pointer"  @click="$listeners.remove && $listeners.remove(scope.$index)"  v-if="form.activeList.length > 1">
             <!--  v-if="form.length > 1" v-if="clearable" -->
             <i
-              @click="$listeners.remove && $listeners.remove(scope.$index)"
               class="el-icon-error"
-              style="margin-bottom: 24px;  "
             ></i>
             删除
           </div>
@@ -170,25 +172,45 @@
       </el-table-column>
     </el-table>
     <!--          v-if="!isCommon && $listeners.create"  @click="$listeners.create"-->
-    <el-button icon="el-icon-plus" plain class="addBtn">新增活动</el-button>
+    <el-button icon="el-icon-plus" plain class="addBtn" @click="$listeners.create">新增活动</el-button>
   </div>
 </template>
 <script>
+import { courseType, boolOptions } from "@/constant";
+import { objectToOptions } from "@/utils";
 export default {
-  props: ["form"],
+  props: ["form",'activeList'],
   data() {
     return {
-       charges: [],
+      charges: [],
       clearable: false,
       isDisabled: false,
       courseUnitPriceSettingsByType: [],
-      boolOptionsOptions: [],
+     boolOptionsOptions: objectToOptions(boolOptions),
     };
   },
   methods: {
-    courseItemChange(row, index) {},
-    priceChange(row, index) {},
-    isOptionDisabled(key) {},
+    courseItemChange(row, index,id) {
+      this.activeList.forEach(element => {
+        if(id == element.id){
+          // this.$set(this.form.activeList[index],'name',element.name)
+           this.$set(this.form.activeList[index],'num',element.maxCourseNum)
+          this.$set(this.form.activeList[index],'vipGroupCategoryNames',element.vipGroupCategoryNames)
+          this.$set(this.form.activeList[index],'actualAmount',element.marketPrice)
+          this.$set(this.form.activeList[index],'originalAmount',element.originalPrice)
+        }
+      });
+      console.log(row,index)
+      // 修改活动名称  活动价格
+
+      // this.$listeners.priceChange(item, index);
+      // this.$refs.form.validateField(`form.${index}.courseTotalMinuties`);
+    },
+    isOptionDisabled(key) {
+
+      const selected = this.form.activeList.map((item) => item.activityId);
+      return selected.includes(key);
+    },
     change() {},
   },
 };

+ 41 - 54
src/views/resetTeaming/modals/payTeamCourse.vue

@@ -3,20 +3,20 @@
     <p class="coreTitle">乐团课<span class="dot"></span></p>
     <div class="teamCourseChiose">
       <el-form-item
-        label="缴费类型"
+        label="加课方式"
         prop="leixing"
         :rules="[
           {
             required: true,
-            message: '请选择缴费类型',
+            message: '请选择加课方式',
             trigger: 'change',
           },
         ]"
       >
         <!-- &&courseViewType != 2 -->
         <el-radio-group style="width: 100%" v-model="form.leixing">
-          <el-radio label="1">乐团续费</el-radio>
-          <el-radio label="2">临时加课</el-radio>
+          <el-radio label="1">标准课程</el-radio>
+          <el-radio label="2">自定义课程</el-radio>
         </el-radio-group>
       </el-form-item>
       <!-- !this.rowDetail&&       v-if="
@@ -25,7 +25,7 @@
                     courseViewType != 2
                   "-->
       <el-form-item
-
+        v-if="form.leixing == 1"
         label="收费标准"
         prop="musicGroupOrganizationCourseSettingId"
         :rules="[
@@ -57,7 +57,12 @@
       style="width: 100% !important; background: #f9f9f9"
       :header-cell-style="{ background: '#F9F9F9', color: '#444' }"
     >
-      <el-table-column label="课程类型" prop="courseType" key="courseType"  width="170px">
+      <el-table-column
+        label="课程类型"
+        prop="courseType"
+        key="courseType"
+        width="170px"
+      >
         <template slot-scope="scope">
           <el-form-item
             :prop="'eclass.' + scope.$index + '.courseType'"
@@ -87,42 +92,10 @@
         </template>
       </el-table-column>
       <el-table-column
-        label="是否可选"
-        prop="isStudentOptional"
-        key="isStudentOptional"
-         width="170px"
-      >
-        <template slot-scope="scope">
-          <el-form-item
-            :prop="'eclass.' + scope.$index + '.isStudentOptional'"
-            :rules="{
-              required: true,
-              message: '请选择是否可选',
-              trigger: 'change',
-            }"
-          >
-            <el-select
-              style="width: 90% !important"
-              v-model="form.eclass[scope.$index].isStudentOptional"
-              placeholder="是否可选"
-              :disabled="isDisabled"
-              clearable
-            >
-              <el-option
-                v-for="(item, index) in boolOptionsOptions"
-                :key="index"
-                :label="item.label"
-                :value="item.value"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-        </template>
-      </el-table-column>
-      <el-table-column
         label="课程时长(分钟)"
         prop="courseTotalMinuties"
         key="courseTotalMinuties"
-         width="170px"
+        width="170px"
       >
         <template slot-scope="scope">
           <el-form-item
@@ -135,9 +108,6 @@
               },
             ]"
           >
-            <!--    @change="
-                            $listeners.priceChange(scope.row, scope.$index)
-                          " -->
             <el-input-number
               style="width: 90% !important"
               class="number-input"
@@ -146,6 +116,7 @@
               :precision="0"
               :min="0"
               :disabled="isDisabled"
+              @change="$listeners.priceChange(scope.row, scope.$index)"
               placeholder="课程时长"
             />
           </el-form-item>
@@ -155,7 +126,7 @@
         label="现价(元)"
         prop="courseCurrentPrice"
         key="courseCurrentPrice"
-         width="170px"
+        width="170px"
       >
         <template slot="header">
           <p style="position: relative">
@@ -196,7 +167,7 @@
         prop="courseOriginalPrice"
         key="courseOriginalPrice"
         label="原价(元)"
-         width="170px"
+        width="170px"
       >
         <template slot-scope="scope">
           <el-form-item
@@ -221,10 +192,10 @@
       </el-table-column>
       <el-table-column prop="close" key="close" >
         <template slot-scope="scope">
-          <div style="color:#FA6400;cursor: pointer;">
+          <div style="color: #fa6400; cursor: pointer"  v-if="!isDisabled&&form.eclass.length>1"  @click="$listeners.remove && $listeners.remove(scope.$index)">
             <!--  v-if="form.length > 1" v-if="clearable" -->
             <i
-              @click="$listeners.remove && $listeners.remove(scope.$index)"
+
               class="el-icon-error"
             ></i>
             删除
@@ -232,28 +203,44 @@
         </template>
       </el-table-column>
     </el-table>
-    <!--          v-if="!isCommon && $listeners.create"  @click="$listeners.create"-->
-    <el-button icon="el-icon-plus" plain class="addBtn">新增课程类型</el-button>
+    <!--          v-if="!isCommon && $listeners.create"  -->
+    <el-button icon="el-icon-plus" plain class="addBtn" @click="$listeners.create" v-if="!isDisabled" >新增课程类型</el-button>
   </div>
 </template>
 <script>
+import { courseType, boolOptions } from "@/constant";
+import { objectToOptions } from "@/utils";
 export default {
-  props: ["form"],
+  props: ["form", "charges", "courseUnitPriceSettingsByType"],
   data() {
     return {
-       charges: [],
       clearable: false,
-      isDisabled: false,
-      courseUnitPriceSettingsByType: [],
-      boolOptionsOptions: [],
+
+      courseType,
+      courseTypeOptions: this.courseUnitPriceSettingsByType,
+      boolOptionsOptions: objectToOptions(boolOptions),
     };
   },
+  mounted() {
+    console.log(
+      this.courseUnitPriceSettingsByType,
+      "courseUnitPriceSettingsByType"
+    );
+  },
   methods: {
     courseItemChange(row, index) {},
     priceChange(row, index) {},
-    isOptionDisabled(key) {},
+    isOptionDisabled(key) {
+       const selected = this.form.eclass.map(item => item.courseType)
+      return selected.includes(key)
+    },
     change() {},
   },
+  computed:{
+    isDisabled(){
+      return this.form.leixing == 1
+    }
+  }
 };
 </script>
 <style lang="scss" scoped>

+ 3 - 5
vue.config.js

@@ -16,17 +16,15 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // http://47.99.212.176:8000
 // //  https://online.dayaedu.com
 // let target = 'https://online.dayaedu.com' //线上
-<<<<<<< HEAD
+
 // let target = 'http://192.168.3.227:8000' // 何国威
-// let target = 'http://192.168.3.250:8000' //邹璇
+let target = 'http://192.168.3.250:8000' //邹璇
 // let target = 'http://192.168.3.112:8000' //勇哥
-let target = 'http://dev.dayaedu.com' // 开发环境
-=======
+
 // let target = 'http://192.168.3.139:8000' // 箭河
 // let target = 'http://192.168.3.124:8000' //邹璇
 let target = 'http://192.168.3.119:8000' //勇哥
 // let target = 'http://dev.dayaedu.com' // 开发环境
->>>>>>> master
 // let target = 'https://test.dayaedu.com' //测试环境
 // let target = 'http://192.168.3.134:8000' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/