Explorar el Código

准备开始缴费详情

1
mo hace 3 años
padre
commit
df0abf0eed

+ 16 - 3
src/store/modules/permission.js

@@ -306,6 +306,19 @@ function setDetailRoute(accessedRoutes) {
           }
         },
         {
+          name: '学员缴费设置',
+          path: 'studentPaySet',
+          component: () => import('@/views/resetTeaming/components/payInfoDetail'),
+          hidden: true,
+          meta: {
+            noCache: '1',
+            title: '学员缴费设置',
+            belongTopMenu: "/business",
+            activeMenu: '/teamList',
+            id: 'xx3'
+          }
+        },
+        {
           name: '乐团详情',
           path: 'resetTeaming',
           component: () => import('@/views/resetTeaming/index'),
@@ -821,7 +834,7 @@ function setDetailRoute(accessedRoutes) {
         // /parameter/adminManager adminOperation
       ])
     }
-    if(route.path == '/platformManager') {
+    if (route.path == '/platformManager') {
       route.children = route.children.concat([{
         name: '添加&修改',
         path: 'serviceOperation',
@@ -836,8 +849,8 @@ function setDetailRoute(accessedRoutes) {
         }
       }])
     }
-    if(route.path == '/federationManager') {
-      if(!route.children) {
+    if (route.path == '/federationManager') {
+      if (!route.children) {
         route.children = []
       }
       route.children = route.children.concat([{

+ 15 - 5
src/views/categroyManager/modals/baseInfo.vue

@@ -60,7 +60,7 @@
             clearable
             style="width: 400px !important"
             :disabled="isDisabled || status != 'DRAFT'"
-             @change="changeActivityChannel"
+            @change="changeActivityChannel"
           >
             <el-option label="乐团渠道" :value="1"></el-option>
             <el-option label="常规活动" :value="2"></el-option>
@@ -205,7 +205,8 @@
             ></i>
           </el-tooltip>
         </el-form-item> -->
-          <el-form-item label="营销活动售价" prop="marketPrice">
+        </div>
+          <el-form-item label="活动售价" prop="marketPrice">
             <el-input
               style="width: 400px"
               type="number"
@@ -224,7 +225,16 @@
               ></i>
             </el-tooltip>
           </el-form-item>
-        </div>
+        <el-form-item label="活动原价" prop="originalPrice">
+          <el-input
+            style="width: 400px"
+            type="number"
+            v-model.trim="baseForm.originalPrice"
+            :disabled="isDisabled || status != 'DRAFT'"
+          >
+            <template slot="append">元</template>
+          </el-input>
+        </el-form-item>
       </el-form>
     </div>
   </div>
@@ -407,9 +417,9 @@ export default {
     changeActivityType(val) {
       this.$emit("resetPayInfo");
     },
-    changeActivityChannel(){
+    changeActivityChannel(val) {
       this.$emit("resetPayInfo");
-      this.$meit('resetBaseChannel')
+      this.$emit("resetBaseChannel",val);
     },
     submitFrom() {
       this.$refs.form.validate((isok) => {

+ 31 - 9
src/views/categroyManager/modals/payInfo.vue

@@ -60,7 +60,7 @@
             </el-select>
           </el-form-item>
         </el-row>
-        <el-row>
+        <el-row v-if="activityChannel == 2">
           <el-form-item
             :rules="[
               { required: true, message: '请选择上课模式', trigger: 'change' },
@@ -83,7 +83,7 @@
             </el-select>
           </el-form-item>
         </el-row>
-        <el-row>
+        <el-row v-if="activityChannel == 2">
           <el-form-item
             label="课程调整方式"
             prop="allowOnlineToOffline"
@@ -127,7 +127,7 @@
             </el-input>
           </el-form-item>
         </el-row>
-        <el-row>
+        <el-row v-if="activityChannel == 2">
           <el-form-item
             label="是否限制课时数"
             prop="isLimitNum"
@@ -152,7 +152,7 @@
             </el-select>
           </el-form-item>
         </el-row>
-        <el-row v-if="payForm.isLimitNum">
+        <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">
+        <el-row v-if="payForm.isLimitNum&&activityChannel == 2">
           <el-form-item
             prop="maxCourseNum"
             label="最大课时数"
@@ -196,6 +196,27 @@
             </el-input>
           </el-form-item>
         </el-row>
+
+        <el-row v-if="activityChannel == 1">
+           <el-form-item
+            prop="minCourseNum"
+            label="课时数"
+            :rules="[
+              { required: true, message: '请输入课时数', trigger: 'blur' },
+            ]"
+          >
+            <el-input
+              @change="handleMinChange"
+              v-model.number="payForm.minCourseNum"
+              type="number"
+              style="width: 400px"
+              placeholder="课时数"
+              :disabled="isDisabled"
+            >
+              <template slot="append">课时</template>
+            </el-input>
+          </el-form-item>
+        </el-row>
       </div>
       <div v-else>
         <el-row>
@@ -245,7 +266,7 @@
           </el-form-item>
         </el-row>
       </div>
-      <el-row>
+      <el-row v-if="activityChannel == 2">
         <!--  {
               pattern: /^100$|^(\d|[1-9]\d)(\.\d{1,8})*$/,
               message: '请输入正确的折扣',
@@ -269,7 +290,7 @@
           </el-input>
         </el-form-item>
       </el-row>
-      <el-row>
+      <el-row v-if="activityChannel == 2">
         <el-form-item prop="fullMinusCourseTimes" label="满赠达标数量">
           <el-input
             v-model.number="payForm.fullMinusCourseTimes"
@@ -282,7 +303,7 @@
           </el-input>
         </el-form-item>
       </el-row>
-      <el-row>
+      <el-row v-if="activityChannel == 2">
         <el-col>
           <el-form-item
             label="赠送类型"
@@ -492,7 +513,7 @@ import { vipResetTypeList } from "@/utils/searchArray";
 const MIN_NUMBER = 1;
 const MAX_NUMBER = 999;
 export default {
-  props: ["payForm", "activeType", "remberList", "isDisabled"],
+  props: ["payForm", "activeType", "remberList", "isDisabled",'activityChannel'],
   data() {
     return {
       coureTimerList: [],
@@ -500,6 +521,7 @@ export default {
     };
   },
   async mounted() {
+    console.log(this.activityChannel)
     await this.$store.dispatch("setVipGroupCategory");
   },
   methods: {

+ 29 - 12
src/views/categroyManager/vipNewActive.vue

@@ -21,19 +21,21 @@
         v-if="active == 1"
         ref="baseForm"
         @resetPayInfo="resetPayInfo"
-         @resetBaseChannel="resetBaseChannel"
+        @resetBaseChannel="resetBaseChannel"
         :isDisabled="isDisabled"
         :status="statuss"
       />
+
+
       <payInfo
         :payForm="payForm"
         ref="payInfo"
         :activeType="baseForm.activityType"
+        :activityChannel="baseForm.activityChannel"
         @changeCourseType="changeCourseType"
         @changeGiveCourseType="changeGiveCourseType"
         @chageSalary="chageSalary"
         @resetIsLimitNum="resetIsLimitNum"
-
         v-if="active == 2"
         :remberList="remberList"
         :isDisabled="isDisabled || statuss != 'DRAFT'"
@@ -112,7 +114,6 @@ const payBaseForm = {
   maxCourseNum: null,
   memberRankId: null,
   periodEnum: null,
-
   discount: 100,
   fullMinusCourseTimes: null,
   giveCourseType: null,
@@ -122,7 +123,7 @@ const payBaseForm = {
   giveCourseNum: null,
   giveMemberRankId: null,
   giveMemberTime: null,
-  giveAllowOnlineToOffline:null
+  giveAllowOnlineToOffline: null,
 };
 const baseSalaryForm = {
   vipOnlineSalarySettlement: {
@@ -171,7 +172,8 @@ export default {
         studentMaxUsedTimes: "",
         isPayToBalance: "",
         marketPrice: "",
-        aceicityChannel:null,
+        activityChannel: null,
+        originalPrice:null
       },
       title: "新建课程活动方案",
       payForm: {
@@ -241,17 +243,30 @@ export default {
         ...payBaseForm,
       };
     },
-    resetBaseChannel(){},
+    resetBaseChannel(val) {
+      this.$set(this.baseForm, "courseTime", []);
+      this.$set(this.baseForm, "activityType", null);
+      this.$set(this.baseForm, "applyToStudentType", []);
+      this.$set(this.baseForm, "studentMaxUsedTimes", null);
+      this.$set(this.baseForm, "isPayToBalance", null);
+      this.$set(this.baseForm, "marketPrice", null);
+      this.$set(this.baseForm, "originalPrice", null);
+      if(val == 1){
+         this.$set(this.baseForm, "activityType", 0);
+         this.$set(this.payForm, "allowOnlineToOffline",1);
+         this.$set(this.payForm, "teachMode", -1);
+      }
+    },
     changeCourseType(val) {
       // this.$emit("changeCourseType", val);
       if (val == "PRACTICE") {
         this.$set(this.payForm, "vipGroupCategoryIdList", "");
         this.$set(this.payForm, "teachMode", "");
         this.$set(this.payForm, "singleCourseTime", 25);
-        this.$set(this.payForm, "allowOnlineToOffline", []);
+        this.$set(this.payForm, "allowOnlineToOffline", '');
       } else {
         this.$set(this.payForm, "singleCourseTime", 45);
-        this.$set(this.payForm, "allowOnlineToOffline", []);
+        this.$set(this.payForm, "allowOnlineToOffline", '');
         this.$set(this.payForm, "vipGroupCategoryIdList", "");
         this.$set(this.payForm, "teachMode", "");
       }
@@ -276,7 +291,6 @@ export default {
       this.$set(this.payForm, "givePeriod", null);
       this.$set(this.payForm, "giveTeachMode", "");
       this.$set(this.payForm, "giveAllowOnlineToOffline", "");
-
     },
     chageSalary() {
       this.salaryForm = null;
@@ -331,6 +345,9 @@ export default {
       // let vipGroupCategoryIdList =
       //   this.payForm.vipGroupCategoryIdList.join(",");
       let vipGroupSalarySettlement = this.salaryForm;
+      if(this.baseForm.activityChannel == 1){
+        this.payForm.maxCourseNum = this.payForm.minCourseNum;
+      }
       let obj = {
         ...this.baseForm,
         ...this.payForm,
@@ -432,8 +449,8 @@ export default {
         studentMaxUsedTimes: data.studentMaxUsedTimes,
         isPayToBalance: Number(data.payToBalance),
         id: this.$route.query.id,
-        activityChannel:data.activityChannel
-
+        activityChannel: data.activityChannel,
+        originalPrice:data.originalPrice
       });
       // this.baseForm = {
       //   name: data.name,
@@ -483,7 +500,7 @@ export default {
         giveMemberRankId: data.giveMemberRankId,
         givePeriod: data.givePeriodEnum,
         giveMemberTime: data.giveMemberTime ? data.giveMemberTime : null,
-         giveAllowOnlineToOffline:data.giveAllowOnlineToOffline+''
+        giveAllowOnlineToOffline: data.giveAllowOnlineToOffline + "",
       };
       // 格式化缴费金额
       if (data.salarySettlementJson && data.salarySettlementJson != "null") {

+ 1 - 1
src/views/courseRulersManager/components/offlineTeamRules.vue

@@ -297,7 +297,7 @@
           开始的课程,旷课签到时间为
           <span style="color: #f56c6c; margin-right: 4px">{{
             addFormMinuteAddS("12:00:00", form["143"])
-          }}</span>。
+          }}</span>以后
         </p>
         <p class="subtitle">未签到:</p>
         <el-row>

+ 42 - 0
src/views/resetTeaming/components/payInfoDetail.vue

@@ -0,0 +1,42 @@
+<template>
+  <div class="m-container">
+    <el-page-header
+      @back="goback"
+      style="padding-bottom: 30px"
+      content="创建学员缴费"
+    >
+    </el-page-header>
+  </div>
+</template>
+<script>
+export default {
+  data() {
+    return {};
+  },
+  mounted(){},
+  methods:{
+    goback(){
+         let query = this.$route.query;
+      if (query.type == "resetTeam") {
+        this.$store.dispatch("delVisitedViews", this.$route);
+        this.$router.push({
+          path: "/business/resetTeaming",
+          query: { ...this.$route.query },
+        });
+      } else if (query.type == "look") {
+        this.$store.dispatch("delVisitedViews", this.$route);
+        this.$router.push({
+          path: "/business/resetTeaming",
+          query: { ...this.$route.query },
+        });
+      } else if (query.type == "PRE_BUILD_FEE" || query.type == "feeAudit") {
+        this.$store.dispatch("delVisitedViews", this.$route);
+        this.$router.push({
+          path: "/business/resetTeaming",
+          query: { ...this.$route.query },
+        });
+      }
+    }
+  }
+};
+</script>

+ 16 - 14
src/views/resetTeaming/components/resetPayList.vue

@@ -674,21 +674,23 @@ export default {
       this.paymentType = val
     },
     newUserPay() {
+      let query = this.$route.query;
+      this.$router.push({path:'/business/studentPaySet',query:{...query}})
       // 判断一下乐团是课程缴费 还是会员缴费 且乐团状态为创建缴费中
-      if (
-        this.baseInfo?.musicGroup?.courseViewType == 2 &&
-        this.team_status == "PRE_BUILD_FEE"
-      ) {
-        this.payFormType = "user";
-        this.isNew = true;
-        this.activeRow = null;
-        this.memberVisible = true;
-      } else {
-        this.payFormType = "user";
-        this.isNew = true;
-        this.activeRow = null;
-        this.userVisible = true;
-      }
+      // if (
+      //   this.baseInfo?.musicGroup?.courseViewType == 2 &&
+      //   this.team_status == "PRE_BUILD_FEE"
+      // ) {
+      //   this.payFormType = "user";
+      //   this.isNew = true;
+      //   this.activeRow = null;
+      //   this.memberVisible = true;
+      // } else {
+      //   this.payFormType = "user";
+      //   this.isNew = true;
+      //   this.activeRow = null;
+      //   this.userVisible = true;
+      // }
     },
     newSchoolPay() {
       this.payFormType = "school";