Ver Fonte

提交测试

1
mo há 3 anos atrás
pai
commit
71079da012

+ 2 - 1
src/constant/index.js

@@ -43,6 +43,7 @@ export const courseType = {
   DEMO: '试听课',
   PRACTICE: '网管课',
   COMM: '对外课',
+  MEMBER:'会员'
 }
 
 export const boolOptions = {
@@ -324,4 +325,4 @@ export const orderType = {
   REPLACEMENT: '乐器置换',
   ADD_STUDENT: '进行中乐团加学员',
   OTHER: "其他",
-}
+}

+ 4 - 4
src/views/accompanyManager/accompanyList.vue

@@ -22,7 +22,7 @@
       </div>
       <div
         class="newBand"
-        v-permission="'/buildVip'"
+        v-permission="'/newPractice'"
         @click="newPractice"
         style="width: 120px"
       >
@@ -248,9 +248,9 @@
           <el-table-column align="center" label="是否续费" fixed="right">
             <template slot-scope="scope">
               <div>
-                <p v-if="scope.row.buyMonths == 0">免费</p>
-                <p v-if="scope.row.buyMonths > 0">
-                  {{ scope.row.beRenewGroupId > 0 ? "续费" : "首充" }}
+                <p v-if="scope.row.type=='FREE'|| scope.row.type=='CARE_PACKAGE' || scope.row.type=='TRIAL' " >免费</p>
+                <p v-if="scope.row.type=='CHARGE'||scope.row.type=='COME_ON_PACKAGE'">
+                   {{ scope.row.beRenewGroupId > 0 ? "续费" : "首充" }}
                 </p>
               </div>
             </template>

+ 27 - 26
src/views/buildVip/index.vue

@@ -213,7 +213,7 @@
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="每课时长">
+          <el-form-item label="每课时长" prop="classTime">
             <el-select
               v-model.trim="leftForm.classTime"
               :disabled="timeTable.length > 0"
@@ -837,6 +837,13 @@ export default {
             trigger: "change",
           },
         ],
+        classTime: [
+          {
+            required: true,
+            message: "请选择报每课时长",
+            trigger: "change",
+          },
+        ],
       },
       id: "",
       studentList: [],
@@ -933,6 +940,8 @@ export default {
           this.teacherList = sotrage.teacherList;
           this.isMusicTheory = sotrage.isMusicTheory;
           this.chioseStudent = sotrage.chioseStudent;
+          this.maxCourseNum = sotrage.maxCourseNum;
+          this.minCourseNum = sotrage.minCourseNum;
           if (this.leftForm?.courseType) {
             this.changePrice(this.leftForm.courseType);
           }
@@ -956,6 +965,8 @@ export default {
           this.timeTable = sotrage.timeTable;
           this.educationList = sotrage.educationList;
           this.courseTypeList = sotrage.courseTypeList;
+          this.maxCourseNum = sotrage.maxCourseNum;
+          this.minCourseNum = sotrage.minCourseNum;
           // 为了刷新线上课单价和线下课单价
           await vipGroupCategory({
             organId: sotrage?.leftForm?.classOrganId,
@@ -1003,6 +1014,9 @@ export default {
       studentLimit: this.studentLimit,
       isMusicTheory: this.isMusicTheory,
       chioseStudent: this.chioseStudent,
+      maxCourseNum: this.maxCourseNum,
+      minCourseNum: this.minCourseNum,
+
       // computationalBtn:this.computationalBtn,
     };
     if (this.courseType == "PRACTICE") {
@@ -1076,6 +1090,7 @@ export default {
       this.chioseStudent = [];
       this.$refs["leftForm"].resetFields();
       localStorage.removeItem("newVip");
+      localStorage.removeItem(`newPractice`);
     },
     async init() {
       if (this.$route.query.rules) {
@@ -1248,6 +1263,9 @@ export default {
       this.leftForm.courseEnd = "";
       this.hasOnline = true;
       this.hasOffline = true;
+      this.maxCourseNum = 0;
+      this.minCourseNum = 0;
+      this.rightForm.discount = 100;
 
       if (val) {
         for (let i in this.courseTypeList) {
@@ -1289,28 +1307,6 @@ export default {
             // 存储课酬是否可配置
             this.salaryReadonlyFlag = this.activeList[i].salaryReadonlyFlag;
             this.paymentReadonlyFlag = this.activeList[i].paymentReadonlyFlag;
-            //  hasOnline: false, hasOffline: false 还需要判断type类型 根据活动id获取
-            // if (this.activeList[i].salarySettlementJson) {
-            //   let obj = JSON.parse(this.activeList[i].salarySettlementJson);
-            //   if (obj && obj.onlineSalarySettlement) {
-            //     // 有线上课
-            //     this.hasOnline = true;
-            //     this.onlineSalary =
-            //       obj.onlineSalarySettlement.salarySettlementType;
-            //     //  ('线上:' + this.onlineSalary)
-            //   } else {
-            //     this.hasOnline = false;
-            //   }
-            //   if (obj && obj.offlineSalarySettlement) {
-            //     // 有线下课
-            //     this.hasOffline = true;
-            //     this.offlineSalary =
-            //       obj.offlineSalarySettlement.salarySettlementType;
-            //     //  ('线下:' + this.offlineSalary)
-            //   } else {
-            //     this.hasOffline = false;
-            //   }
-            // }
             if (this.courseType == "PRACTICE") {
               this.hasOffline = false;
               this.hasOnline = true;
@@ -1352,6 +1348,11 @@ export default {
             });
           }
         }
+      } else {
+        if (this.courseType == "PRACTICE") {
+          this.hasOffline = false;
+          this.hasOnline = true;
+        }
       }
       // 重置课程单价
     },
@@ -1830,7 +1831,7 @@ export default {
           onlineTeacherSalary: this.rightForm.onlineCourse || 0,
           offlineTeacherSalary: this.rightForm.offlineCourse || 0,
           giveTeachMode: this.centerForm.radio,
-          subjectIdList: this.leftForm.subject,
+          subjectId: this.leftForm.subject,
           educationalTeacherId: this.leftForm.educationalTeacherId,
           organId: this.leftForm.classOrganId,
           firstStudentId: this.leftForm.students[0] || null,
@@ -1839,7 +1840,8 @@ export default {
       } else {
         studentIdList = this.leftForm.students.join(",") || null;
         obj.vipGroupApplyBaseInfo = {
-         studentIdList, // 这个不要了
+          studentId: studentIdList, // 这个不要了
+          studentIdList,
           vipGroupStudentCoursePrices: this.activeStudentList,
           coursesExpireDate: this.leftForm.courseEnd,
           teacherSchoolId: this.leftForm.section,
@@ -1910,7 +1912,6 @@ export default {
           }
         });
       } else {
-        createPractice;
         // 新增
         createVip(obj).then((res) => {
           if (res.code == 200) {

+ 1 - 1
src/views/categroyManager/modals/baseInfo.vue

@@ -234,7 +234,7 @@ export default {
           { required: false, message: "请选择课程时间", trigger: "blur" },
         ],
         studentMaxUsedTimes: [
-          { required: true, message: "请输入购买次数", trigger: "blur" },
+          { required: false, message: "请输入购买次数", trigger: "blur" },
         ],
         organ: [{ required: true, message: "请选择适用分部", trigger: "blur" }],
         stauts: [

+ 2 - 3
src/views/categroyManager/modals/payInfo.vue

@@ -49,7 +49,6 @@
               style="width: 400px"
               @visible-change="$forceUpdate()"
               clearable
-              multiple
               :disabled="isDisabled"
             >
               <el-option
@@ -393,7 +392,7 @@
           </el-input>
         </el-form-item>
       </el-row>
-      <el-row v-if="payForm.giveCourseType == 'MEMBER'">
+      <el-row v-if="payForm.giveCourseType == 'MEMBER'&&payForm.fullMinusCourseTimes">
         <el-form-item
           label="赠送会员名称"
           prop="giveMemberRankId"
@@ -421,7 +420,7 @@
         <el-form-item
           prop="givePeriod"
           label="赠送会员时长"
-          v-if="payForm.giveCourseType == 'MEMBER'"
+          v-if="payForm.giveCourseType == 'MEMBER'&&payForm.fullMinusCourseTimes"
           :rules="[
             { required: true, message: '请输入赠送会员时长', trigger: 'blur' },
           ]"

+ 61 - 27
src/views/categroyManager/vipActiveList.vue

@@ -2,7 +2,7 @@
   <div class="m-container">
     <h2>
       <div class="squrt"></div>
-      VIP活动管理
+      活动管理
     </h2>
 
     <div class="m-core">
@@ -18,7 +18,7 @@
         style="margin-bottom: 20px"
         v-permission="'export/vipGroupActivity'"
         @click="onExport"
-        >VIP活动导出</el-button
+        >活动导出</el-button
       >
       <save-form
         :inline="true"
@@ -109,25 +109,66 @@
               <copy-text>{{ scope.row.id }}</copy-text>
             </template>
           </el-table-column>
+          <el-table-column align="center" prop="name" label="活动名称">
+            <template slot-scope="scope">
+              <copy-text>{{ scope.row.name }}</copy-text>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="activityType"
+            label="活动类型"
+          >
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.activityType?'会员活动':'课程活动'}}
+            </div>
+          </template>
+          </el-table-column>
           <el-table-column
             align="center"
             prop="type"
+            label="活动购买"
+          >
+          <template slot-scope="scope">
+            <div>
+              <p v-if="scope.row.activityType">会员</p>
+                <p v-else>{{scope.row.courseType |courseTypeFormat}}</p>
+            </div>
+          </template>
+          </el-table-column>
+          <!-- <el-table-column
+            align="center"
+            prop="type"
             :formatter="fommatterType"
-            label="活动类型"
-          ></el-table-column>
-          <el-table-column align="center" prop="name" label="活动名称">
+            label="是否赠送"
+          ></el-table-column> -->
+          <el-table-column
+            align="center"
+            prop="type"
+            label="赠送类型"
+          >
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.giveCourseType | courseTypeFormat}}
+            </div>
+          </template>
+          </el-table-column>
+          <el-table-column align="center" width="150px" label="活动持续时间">
             <template slot-scope="scope">
-              <copy-text>{{ scope.row.name }}</copy-text>
+              <div>
+                <p>{{ scope.row.startTime }}</p>
+                <p>{{ scope.row.endTime }}</p>
+              </div>
             </template>
           </el-table-column>
-
-          <el-table-column
+          <!-- <el-table-column
             align="center"
             prop="vipGroupCategoryNames"
             label="适用课程形式"
-          ></el-table-column>
+          ></el-table-column> -->
 
-          <el-table-column
+          <!-- <el-table-column
             align="center"
             label="适用课时类型"
             :formatter="fommatterCourseType"
@@ -142,16 +183,16 @@
             align="center"
             label="使用学员"
             :formatter="formatStudentType"
-          ></el-table-column>
+          ></el-table-column> -->
 
-          <el-table-column label="结算标准">
+          <!-- <el-table-column label="结算标准">
             <template slot-scope="scope">
               <div>
                 <p>{{ scope.row.salarySettlementJson | onlineDesc }}</p>
                 <p>{{ scope.row.salarySettlementJson | unonlineDesc }}</p>
               </div>
             </template>
-          </el-table-column>
+          </el-table-column> -->
           <!-- <el-table-column align="center" label="结算说明">
             <template slot-scope="scope">
               <div>
@@ -162,26 +203,19 @@
           </el-table-column> -->
           <el-table-column
             align="center"
-            label="启用状态"
+            label="活动状态"
             prop="enable"
             :formatter="fommatterEnable"
           ></el-table-column>
-          <el-table-column align="center" width="150px" label="活动持续时间">
-            <template slot-scope="scope">
-              <div>
-                <p>{{ scope.row.startTime }}</p>
-                <p>{{ scope.row.endTime }}</p>
-              </div>
-            </template>
-          </el-table-column>
-          <el-table-column align="center" width="150px" label="课程安排时间">
+
+          <!-- <el-table-column align="center" width="150px" label="课程安排时间">
             <template slot-scope="scope">
               <div>
                 <p>{{ scope.row.coursesStartTime }}</p>
                 <p>{{ scope.row.coursesEndTime }}</p>
               </div>
             </template>
-          </el-table-column>
+          </el-table-column> -->
           <el-table-column align="center" label="操作">
             <template slot-scope="scope">
               <div>
@@ -193,7 +227,7 @@
                   >查看</el-button
                 >
                 <el-button
-                style="margin-left:0px"
+                  style="margin-left: 0px"
                   type="text"
                   v-permission="'vipGroupActivity/update'"
                   @click="reset(scope.row)"
@@ -564,8 +598,8 @@ export default {
         query: { id: row.id },
       });
     },
-    look(row){
-           this.$router.push({
+    look(row) {
+      this.$router.push({
         path: "/operateManager/vipNewActive?type=look",
         query: { id: row.id },
       });

+ 13 - 11
src/views/categroyManager/vipNewActive.vue

@@ -98,7 +98,7 @@ import {
 import cleanDeep from "clean-deep";
 const payBaseForm = {
   courseType: "",
-  vipGroupCategoryIdList: [],
+  vipGroupCategoryIdList: '',
   applyToStudentType: [],
   teachMode: null,
   allowOnlineToOffline: "",
@@ -193,11 +193,11 @@ export default {
       //   this.active--;
       //   console.log(this.active);
       // } else {
-        this.$store.dispatch("delVisitedViews", this.$route);
-        this.$router.push({
-          path: "/vipActiveManager/vipActiveList",
-          query: { rules: this.rules, searchForm: this.searchForm },
-        });
+      this.$store.dispatch("delVisitedViews", this.$route);
+      this.$router.push({
+        path: "/vipActiveManager/vipActiveList",
+        query: { rules: this.rules, searchForm: this.searchForm },
+      });
       // }
     },
     next() {
@@ -234,14 +234,14 @@ export default {
     changeCourseType(val) {
       // this.$emit("changeCourseType", val);
       if (val == "PRACTICE") {
-        this.$set(this.payForm, "vipGroupCategoryIdList", []);
+        this.$set(this.payForm, "vipGroupCategoryIdList", '');
         this.$set(this.payForm, "teachMode", "");
         this.$set(this.payForm, "singleCourseTime", 25);
         this.$set(this.payForm, "allowOnlineToOffline", []);
       } else {
         this.$set(this.payForm, "singleCourseTime", 45);
         this.$set(this.payForm, "allowOnlineToOffline", []);
-        this.$set(this.payForm, "vipGroupCategoryIdList", []);
+        this.$set(this.payForm, "vipGroupCategoryIdList", '');
         this.$set(this.payForm, "teachMode", "");
       }
       // vip
@@ -291,15 +291,15 @@ export default {
         endTime = this.baseForm.activeTime[1];
       }
       let organId = this.baseForm.organ.join(",");
-
+      this.baseForm.studentMaxUsedTimes?this.baseForm.studentMaxUsedTimes:this.baseForm.studentMaxUsedTimes=-1
       for (let item in this.salaryForm) {
         if (this.salaryForm[item].salarySettlementType == "TEACHER_DEFAULT") {
           this.salaryForm[item].settlementValue = null;
         }
       }
       let applyToStudentType = this.baseForm.applyToStudentType.join(",");
-      let vipGroupCategoryIdList =
-        this.payForm.vipGroupCategoryIdList.join(",");
+      // let vipGroupCategoryIdList =
+      //   this.payForm.vipGroupCategoryIdList.join(",");
       let vipGroupSalarySettlement = this.salaryForm;
       let obj = {
         ...this.baseForm,
@@ -325,6 +325,8 @@ export default {
                 }),
               });
             } else {
+              localStorage.removeItem("newVip");
+              localStorage.removeItem(`newPractice`);
               this.$message.success("活动修改成功");
               this.$store.dispatch("delVisitedViews", this.$route);
               this.$router.push({

+ 2 - 2
vue.config.js

@@ -17,10 +17,10 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // //  https://online.dayaedu.com
 // let target = 'https://online.dayaedu.com' //线上
 // let target = 'http://192.168.3.139:8000' // 箭河
-let target = 'http://192.168.3.124:8000' //邹璇
+// let target = 'http://192.168.3.124:8000' //邹璇
 // let target = 'http://192.168.3.112:8000' //勇哥
 // let target = 'http://dev.dayaedu.com' // 开发环境
-// let target = 'https://test.dayaedu.com' //测试环境
+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/
 module.exports = {