Bläddra i källkod

03/02 19:40

111
261568008@qq.com 5 år sedan
förälder
incheckning
7f54b032d8

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
dist/index.html


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
dist/static/css/chunk-4aab68d7.0d48e678.css


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
dist/static/css/chunk-e8e8b1ba.32210b55.css


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
dist/static/js/app.9e89e01f.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
dist/static/js/app.fcf390d7.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
dist/static/js/chunk-4aab68d7.0b2143e3.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
dist/static/js/chunk-539bcd06.60c092da.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
dist/static/js/chunk-6cc9245e.8cb728cc.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
dist/static/js/chunk-e8e8b1ba.f570006f.js


+ 1 - 1
src/store/modules/tagsView.js

@@ -5,7 +5,7 @@ const tagsView = {
   },
   mutations: {
     ADD_VISITED_VIEWS: (state, view) => {
-      if (state.visitedViews.some(v => v.fullPath === view.fullPath)) {
+      if (state.visitedViews.some(v => v.path === view.path)) {
         state.visitedViews.forEach(v => {
           if (v.path === view.path) {
             v.fullPath = view.fullPath

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 376 - 343
src/views/categroyManager/vipActiveList.vue


+ 247 - 210
src/views/categroyManager/vipNewActive.vue

@@ -2,71 +2,67 @@
   <div class="m-container">
     <!-- <h2><div class="squrt"></div>VIP活动方案新增 </h2> -->
     <h2>
-      <el-page-header @back="onCancel"
-                      :content="'VIP活动方案' + (pageType == 'create' ? '新增' : '修改')"></el-page-header>
+      <el-page-header @back="onCancel" :content="'VIP活动方案' + (pageType == 'create' ? '新增' : '修改')"></el-page-header>
     </h2>
     <div class="m-core">
-      <el-form :label-position="labelPosition"
-               :model="vipform"
-               ref='vipform'
-               :rules='vipformRules'
-               class="vipform">
-        <el-form-item label="活动名称"
-                      prop="name">
-          <el-input style="width:400px"
-                    v-model.trim="vipform.name"></el-input>
+      <el-form
+        :label-position="labelPosition"
+        :model="vipform"
+        ref="vipform"
+        :rules="vipformRules"
+        class="vipform"
+      >
+        <el-form-item label="活动名称" prop="name">
+          <el-input style="width:400px" v-model.trim="vipform.name"></el-input>
         </el-form-item>
-        <el-form-item label="适用分部"
-                      prop="organ">
-          <el-select v-model.trim="vipform.organ"
-                     multiple
-                     filterable
-                     clearable>
-            <el-option v-for='(item,index) in organList'
-                       :key="index"
-                       :label="item.name"
-                       :value="item.id"></el-option>
+        <el-form-item label="适用分部" prop="organ">
+          <el-select v-model.trim="vipform.organ" multiple filterable clearable>
+            <el-option
+              v-for="(item,index) in organList"
+              :key="index"
+              :label="item.name"
+              :value="item.id"
+            ></el-option>
           </el-select>
           <el-button @click="onCheckAllBranch">适用所有分部</el-button>
         </el-form-item>
-        <el-form-item label="活动描述"
-                      prop="desc">
-          <el-input type="textarea"
-                    v-model.trim="vipform.desc"
-                    style="width:400px"
-                    :rows="5"
-                    placeholder="请输入活动说明"></el-input>
+        <el-form-item label="活动描述" prop="desc">
+          <el-input
+            type="textarea"
+            v-model.trim="vipform.desc"
+            style="width:400px"
+            :rows="5"
+            placeholder="请输入活动说明"
+          ></el-input>
         </el-form-item>
-        <el-form-item label="活动时间"
-                      prop="activeTime">
-          <el-date-picker v-model.trim="vipform.activeTime"
-                          type="datetimerange"
-                          range-separator="至"
-                          value-format="yyyy-MM-dd HH:mm:ss"
-                          start-placeholder="开始日期"
-                          end-placeholder="结束日期">
-          </el-date-picker>
+        <el-form-item label="活动时间" prop="activeTime">
+          <el-date-picker
+            v-model.trim="vipform.activeTime"
+            type="datetimerange"
+            range-separator="至"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+          ></el-date-picker>
         </el-form-item>
-        <el-form-item label="课程时间"
-                      prop="courseTime">
-          <el-date-picker v-model.trim="vipform.courseTime"
-                          type="datetimerange"
-                          range-separator="至"
-                          value-format="yyyy-MM-dd HH:mm:ss"
-                          start-placeholder="开始日期"
-                          end-placeholder="结束日期">
-          </el-date-picker>
+        <el-form-item label="课程时间" prop="courseTime">
+          <el-date-picker
+            v-model.trim="vipform.courseTime"
+            type="datetimerange"
+            range-separator="至"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+          ></el-date-picker>
         </el-form-item>
-        <el-form-item label="课程形式"
-                      prop="stauts">
-          <el-select v-model.trim="vipform.stauts"
-                     filterable
-                     clearable
-                     multiple>
-            <el-option v-for="(item,index) in courseStatusList"
-                       :key='index'
-                       :value="item.id"
-                       :label="item.name"></el-option>
+        <el-form-item label="课程形式" prop="stauts">
+          <el-select v-model.trim="vipform.stauts" filterable clearable multiple>
+            <el-option
+              v-for="(item,index) in courseStatusList"
+              :key="index"
+              :value="item.id"
+              :label="item.name"
+            ></el-option>
           </el-select>
         </el-form-item>
       </el-form>
@@ -76,70 +72,76 @@
         </div>
         <div class="right">
           <div class="chioseWrap">
-            <el-checkbox label="线上课"
-                         v-model.trim="online"></el-checkbox>
-            <el-select v-model.trim="onlineSalary"
-                       clearable
-                       filterable>
-              <el-option label="老师默认课酬"
-                         value="TEACHER_DEFAULT"></el-option>
-              <el-option label="课程单价比例折扣"
-                         value="RATIO_DISCOUNT"></el-option>
-              <el-option label="固定课酬"
-                         value="FIXED_SALARY"></el-option>
+            <el-checkbox label="线上课" v-model.trim="online"></el-checkbox>
+            <el-select v-model.trim="onlineSalary" clearable filterable>
+              <el-option label="老师默认课酬" value="TEACHER_DEFAULT"></el-option>
+              <el-option label="实际课程单价比例折扣" value="RATIO_DISCOUNT"></el-option>
+              <el-option label="固定课酬" value="FIXED_SALARY"></el-option>
             </el-select>
-            <el-input placeholder="请输入"
-                      v-if='onlineSalary== "RATIO_DISCOUNT"'
-                      style="width:200px;"
-                      type="number"
-                      @mousewheel.native.prevent
-                      v-model.trim="onlineprice">
+            <el-input
+              placeholder="请输入"
+              v-if="onlineSalary== 'RATIO_DISCOUNT'"
+              style="width:200px;"
+              type="number"
+              @mousewheel.native.prevent
+              v-model.trim="onlineprice"
+            >
               <template slot="append">%</template>
             </el-input>
-            <el-input placeholder="请输入"
-                      v-if='onlineSalary == "FIXED_SALARY"'
-                      style="width:200px;"
-                      type="number"
-                      @mousewheel.native.prevent
-                      v-model.trim="onlineprice">
+            <el-input
+              placeholder="请输入"
+              v-if="onlineSalary == 'FIXED_SALARY'"
+              style="width:200px;"
+              type="number"
+              @mousewheel.native.prevent
+              v-model.trim="onlineprice"
+            >
               <template slot="append">元</template>
             </el-input>
+            <div style="width:200px;" v-if="onlineSalary== 'TEACHER_DEFAULT'"></div>
+            <el-checkbox
+              label="是否参加梯度"
+              style="margin-left:20px;"
+              v-model.trim="onlineClassJoinGradientRewards"
+            ></el-checkbox>
           </div>
           <div class="chioseWrap">
-            <el-checkbox label="线下课"
-                         v-model.trim="unonline"></el-checkbox>
-            <el-select v-model.trim="unonlineSalary"
-                       clearable
-                       filterable>
-              <el-option label="老师默认课酬"
-                         value="TEACHER_DEFAULT"></el-option>
-              <el-option label="课程单价比例折扣"
-                         value="RATIO_DISCOUNT"></el-option>
-              <el-option label="固定课酬"
-                         value="FIXED_SALARY"></el-option>
+            <el-checkbox label="线下课" v-model.trim="unonline"></el-checkbox>
+            <el-select v-model.trim="unonlineSalary" clearable filterable>
+              <el-option label="老师默认课酬" value="TEACHER_DEFAULT"></el-option>
+              <el-option label="实际课程单价比例折扣" value="RATIO_DISCOUNT"></el-option>
+              <el-option label="固定课酬" value="FIXED_SALARY"></el-option>
             </el-select>
-            <el-input placeholder="请输入"
-                      v-if='unonlineSalary== "RATIO_DISCOUNT"'
-                      style="width:200px;"
-                      type="number"
-                      @mousewheel.native.prevent
-                      v-model.trim="unonlineprice">
+            <el-input
+              placeholder="请输入"
+              v-if="unonlineSalary== 'RATIO_DISCOUNT'"
+              style="width:200px;"
+              type="number"
+              @mousewheel.native.prevent
+              v-model.trim="unonlineprice"
+            >
               <template slot="append">%</template>
             </el-input>
-            <el-input placeholder="请输入"
-                      style="width:200px;"
-                      v-if='unonlineSalary== "FIXED_SALARY"'
-                      type="number"
-                      @mousewheel.native.prevent
-                      v-model.trim="unonlineprice">
+            <el-input
+              placeholder="请输入"
+              style="width:200px;"
+              v-if="unonlineSalary== 'FIXED_SALARY'"
+              type="number"
+              @mousewheel.native.prevent
+              v-model.trim="unonlineprice"
+            >
               <template slot="append">元</template>
             </el-input>
+            <div style="width:200px;" v-if="unonlineSalary== 'TEACHER_DEFAULT'"></div>
+            <el-checkbox
+              label="是否参加梯度"
+              style="margin-left:20px;"
+              v-model.trim="offlineClassJoinGradientRewards"
+            ></el-checkbox>
           </div>
           <div class="chioseWrap">
-            <el-checkbox v-model.trim="paymentReadonlyFlag"
-                         label="可自定义单价"></el-checkbox>
-            <el-checkbox v-model.trim="salaryReadonlyFlag"
-                         label="可自定义课酬"></el-checkbox>
+            <el-checkbox v-model.trim="paymentReadonlyFlag" label="可自定义单价"></el-checkbox>
+            <el-checkbox v-model.trim="salaryReadonlyFlag" label="可自定义课酬"></el-checkbox>
           </div>
         </div>
       </div>
@@ -149,133 +151,159 @@
         </div>
         <div class="right">
           <div>
-            <div class="head"
-                 :class="activeType=='BASE_ACTIVITY'?'active':''"
-                 @click="activeType='BASE_ACTIVITY'">基础活动</div>
-            <p class="title"
-               v-if="activeType=='BASE_ACTIVITY'">课程原价</p>
+            <div
+              class="head"
+              :class="activeType=='BASE_ACTIVITY'?'active':''"
+              @click="activeType='BASE_ACTIVITY'"
+            >基础活动</div>
+            <p class="title" v-if="activeType=='BASE_ACTIVITY'">课程原价</p>
           </div>
           <div>
-            <div class="head"
-                 :class="activeType=='DISCOUNT'?'active':''"
-                 @click="activeType='DISCOUNT'">折扣</div>
-            <el-input v-if="activeType=='DISCOUNT'"
-                      v-model.trim="attribute1"
-                      style="width:200px!important"
-                      placeholder="请输入折扣数值">
+            <div
+              class="head"
+              :class="activeType=='DISCOUNT'?'active':''"
+              @click="activeType='DISCOUNT'"
+            >折扣</div>
+            <el-input
+              v-if="activeType=='DISCOUNT'"
+              v-model.trim="attribute1"
+              style="width:200px!important"
+              placeholder="请输入折扣数值"
+            >
               <template slot="append">%</template>
             </el-input>
           </div>
           <div>
-            <div class="head"
-                 :class="activeType=='GIVE_CLASS'?'active':''"
-                 @click="activeType='GIVE_CLASS'">赠送课时</div>
-            <el-input placeholder="多少节开始赠"
-                      v-if="activeType=='GIVE_CLASS'"
-                      v-model.trim="attribute1"
-                      type="number"
-                      @mousewheel.native.prevent
-                      style='margin-right:10px;width:200px!important'>
+            <div
+              class="head"
+              :class="activeType=='GIVE_CLASS'?'active':''"
+              @click="activeType='GIVE_CLASS'"
+            >赠送课时</div>
+            <el-input
+              placeholder="多少节开始赠"
+              v-if="activeType=='GIVE_CLASS'"
+              v-model.trim="attribute1"
+              type="number"
+              @mousewheel.native.prevent
+              style="margin-right:10px;width:200px!important"
+            >
               <template slot="append">节</template>
-            </el-input> <span v-if="activeType=='GIVE_CLASS'">赠</span>
-            <el-input v-if="activeType=='GIVE_CLASS'"
-                      placeholder="请输入赠送课时数"
-                      type="number"
-                      @mousewheel.native.prevent
-                      v-model.trim="attribute2"
-                      style='margin:0 10px;width:200px!important'>
+            </el-input>
+            <span v-if="activeType=='GIVE_CLASS'">赠</span>
+            <el-input
+              v-if="activeType=='GIVE_CLASS'"
+              placeholder="请输入赠送课时数"
+              type="number"
+              @mousewheel.native.prevent
+              v-model.trim="attribute2"
+              style="margin:0 10px;width:200px!important"
+            >
               <template slot="append">节</template>
             </el-input>
-            <el-checkbox v-if="activeType=='GIVE_CLASS'"
-                         v-model.trim="giveClassPaySalaryFlag"
-                         label="赠送课时结算课酬"></el-checkbox>
+            <el-checkbox
+              v-if="activeType=='GIVE_CLASS'"
+              v-model.trim="giveClassPaySalaryFlag"
+              label="赠送课时结算课酬"
+            ></el-checkbox>
           </div>
         </div>
       </div>
     </div>
-    <div class="btnWrap"
-         style="justify-content:flex-start">
-      <div class="closeBtn"
-           @click="onReSet">重置</div>
-      <div class="okBtn"
-           @click='submitFrom'>确定</div>
+    <div class="btnWrap" style="justify-content:flex-start">
+      <div class="closeBtn" @click="onReSet">重置</div>
+      <div class="okBtn" @click="submitFrom">确定</div>
     </div>
   </div>
 </template>
 <script>
-import { vipGroupCategory, addVipActive } from '@/api/vipSeting'
-import { getEmployeeOrgan } from '@/api/buildTeam'
+import { vipGroupCategory, addVipActive } from "@/api/vipSeting";
+import { getEmployeeOrgan } from "@/api/buildTeam";
 export default {
-  name: 'vipNewActive',
-  data () {
+  name: "vipNewActive",
+  data() {
     return {
       pageType: this.$route.query.type,
-      labelPosition: 'left',
+      labelPosition: "left",
       vipform: {
-        name: '',
-        desc: '',
+        name: "",
+        desc: "",
         activeTime: [],
         courseTime: [],
         organ: []
       },
       vipformRules: {
-        name: [{ required: true, message: '请输入活动名称', trigger: 'blur' },
-        { min: 1, max: 25, message: '长度在 1 到 25 个字符', trigger: 'blur' }],
-        desc: [{ required: false, message: '请输入文字描述', trigger: 'blur' },
-        { min: 1, max: 200, message: '长度在 1 到 200 个字符', trigger: 'blur' }],
-        activeTime: [{ required: false, message: '请选择活动时间', trigger: 'blur' }],
-        courseTime: [{ required: false, message: '请选择课程时间', trigger: 'blur' }],
-        organ: [{ required: true, message: '请选择适用分部', trigger: 'blur' }]
+        name: [
+          { required: true, message: "请输入活动名称", trigger: "blur" },
+          { min: 1, max: 25, message: "长度在 1 到 25 个字符", trigger: "blur" }
+        ],
+        desc: [
+          { required: false, message: "请输入文字描述", trigger: "blur" },
+          {
+            min: 1,
+            max: 200,
+            message: "长度在 1 到 200 个字符",
+            trigger: "blur"
+          }
+        ],
+        activeTime: [
+          { required: false, message: "请选择活动时间", trigger: "blur" }
+        ],
+        courseTime: [
+          { required: false, message: "请选择课程时间", trigger: "blur" }
+        ],
+        organ: [{ required: true, message: "请选择适用分部", trigger: "blur" }]
       },
       courseStatusList: [], // 获取所有课程形式
-      activeType: '',
+      activeType: "",
       online: true,
       unonline: true,
-      onlineSalary: 'TEACHER_DEFAULT',
-      unonlineSalary: 'TEACHER_DEFAULT',
-      onlineprice: '',
-      unonlineprice: '',
+      onlineSalary: "TEACHER_DEFAULT",
+      unonlineSalary: "TEACHER_DEFAULT",
+      onlineprice: "",
+      unonlineprice: "",
       salaryReadonlyFlag: true,
       paymentReadonlyFlag: true,
-      attribute1: '',
-      attribute2: '',
-      attribute3: '',
+      attribute1: "",
+      attribute2: "",
+      attribute3: "",
       giveClassPaySalaryFlag: true,
-      organList: []
-    }
+      organList: [],
+      onlineClassJoinGradientRewards: false,
+      offlineClassJoinGradientRewards: false
+    };
   },
-  mounted () {
+  mounted() {
     if (this.$route.query.rules) {
-      this.rules = this.$route.query.rules
+      this.rules = this.$route.query.rules;
     }
     if (this.$route.query.searchForm) {
-      this.searchForm = this.$route.query.searchForm
+      this.searchForm = this.$route.query.searchForm;
     }
     // 首先获取课程形式
     vipGroupCategory().then(res => {
       if (res.code == 200) {
         this.courseStatusList = res.data;
       }
-    })
+    });
     // 适用分部
     getEmployeeOrgan().then(res => {
       if (res.code == 200) {
         this.organList = res.data;
       }
-    })
+    });
   },
   methods: {
-    submitFrom () {
-      this.$refs['vipform'].validate((valid) => {
+    submitFrom() {
+      this.$refs["vipform"].validate(valid => {
         if (valid) {
           // 验证通过
           let coursesStartTime = this.vipform.courseTime[0];
           let coursesEndTime = this.vipform.courseTime[1];
           let startTime = this.vipform.activeTime[0];
           let endTime = this.vipform.activeTime[1];
-          let organId = this.vipform.organ.join(',');
+          let organId = this.vipform.organ.join(",");
           let type = this.activeType;
-          let vipGroupCategoryIdList = this.vipform.stauts.join(',')
+          let vipGroupCategoryIdList = this.vipform.stauts.join(",");
           let onlineSalarySettlement;
           let offlineSalarySettlement;
           if (this.online) {
@@ -283,7 +311,7 @@ export default {
             onlineSalarySettlement = {
               salarySettlementType: this.onlineSalary,
               settlementValue: this.onlineprice
-            }
+            };
           } else {
             onlineSalarySettlement = null;
           }
@@ -292,9 +320,9 @@ export default {
             offlineSalarySettlement = {
               salarySettlementType: this.unonlineSalary,
               settlementValue: this.unonlineprice
-            }
+            };
           } else {
-            offlineSalarySettlement = null
+            offlineSalarySettlement = null;
           }
           let salaryReadonlyFlag = this.salaryReadonlyFlag * 1;
           let paymentReadonlyFlag = this.paymentReadonlyFlag * 1;
@@ -302,7 +330,7 @@ export default {
           let vipGroupSalarySettlement = {
             onlineSalarySettlement,
             offlineSalarySettlement
-          }
+          };
           // 发请求创建活动
           addVipActive({
             coursesStartTime,
@@ -320,52 +348,61 @@ export default {
             giveClassPaySalaryFlag,
             attribute1: this.attribute1,
             attribute2: this.attribute2,
-            attribute3: this.attribute3
-
+            attribute3: this.attribute3,
+            offlineClassJoinGradientRewards:this.offlineClassJoinGradientRewards*1,
+            onlineClassJoinGradientRewards:this.onlineClassJoinGradientRewards*1
           }).then(res => {
             if (res.code == 200) {
-              this.$message.success('恭喜你,活动创建成功')
-              this.$router.push({ path: "/vipClassSet/vipActiveList", query: { rules: this.rules, searchForm: this.searchForm } })
+              this.$message.success("恭喜你,活动创建成功");
+              this.onReSet();
+              this.$router.push({
+                path: "/vipClassSet/vipActiveList",
+                query: { rules: this.rules, searchForm: this.searchForm }
+              });
             }
-          })
+          });
         } else {
-          this.$message.error('请填写必要参数')
+          this.$message.error("请填写必要参数");
         }
-      })
-
+      });
 
       // 线上线下课 勾选就传不勾选就不传
       // addVipActive().then(res => { })
     },
-    onCheckAllBranch () {
+    onCheckAllBranch() {
       // 选择所有分部
-      this.vipform.organ = []
+      this.vipform.organ = [];
       this.organList.forEach(item => {
-        this.vipform.organ.push(item.id)
-      })
+        this.vipform.organ.push(item.id);
+      });
     },
-    onCancel () {
-      this.$router.push({ path: "/vipClassSet/vipActiveList", query: { rules: this.rules, searchForm: this.searchForm } })
+    onCancel() {
+      this.$router.push({
+        path: "/vipClassSet/vipActiveList",
+        query: { rules: this.rules, searchForm: this.searchForm }
+      });
     },
-    onReSet () {
+    onReSet() {
       this.vipform = {
-        name: '',
-        desc: '',
+        name: "",
+        desc: "",
         activeTime: [],
-        courseTime: [],
-      }
-      this.activeType = ''
-      this.online = true
-      this.unonline = true
-      this.salaryReadonlyFlag = true
-      this.onlineSalary = 'TEACHER_DEFAULT'
-      this.unonlineSalary = 'TEACHER_DEFAULT'
-      this.onlineprice = ''
-      this.unonlineprice = ''
-      this.$refs.vipform.resetFields()
+        courseTime: []
+      };
+      this.activeType = "";
+      this.online = true;
+      this.unonline = true;
+      this.salaryReadonlyFlag = true;
+      this.onlineSalary = "TEACHER_DEFAULT";
+      this.unonlineSalary = "TEACHER_DEFAULT";
+      this.onlineprice = "";
+      this.unonlineprice = "";
+      this.onlineClassJoinGradientRewards = false;
+       this.offlineClassJoinGradientRewards = false;
+      this.$refs.vipform.resetFields();
     }
-  },
-}
+  }
+};
 </script>
 <style lang="scss" scoped>
 .m-core {

Vissa filer visades inte eftersom för många filer har ändrats