Selaa lähdekoodia

添加新生专享

lex-xin 4 vuotta sitten
vanhempi
commit
425236fa94

+ 47 - 1
src/views/categroyManager/vipActiveList.vue

@@ -65,6 +65,18 @@
             <el-option label="关闭" :value="false"></el-option>
           </el-select>
         </el-form-item>
+        <el-form-item prop="applyToStudentType">
+          <el-select
+            filterable
+            style="width: 180px !important"
+            v-model="searchForm.applyToStudentType"
+            clearable
+            placeholder="是否新生专享"
+          >
+            <el-option label="是" :value="1"></el-option>
+            <el-option label="否" :value="-1"></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item>
           <el-button native-type="submit" type="danger">搜索</el-button>
         </el-form-item>
@@ -105,6 +117,13 @@
             label="适用课时类型"
             :formatter="fommatterCourseType"
           ></el-table-column>
+
+          <el-table-column
+            align="center"
+            label="适用课时类型"
+            :formatter="formatStudentType"
+          ></el-table-column>
+
           <el-table-column label="结算标准">
             <template slot-scope="scope">
               <div>
@@ -240,6 +259,16 @@
               ></el-option>
             </select-all>
           </el-form-item>
+          <el-form-item label="是否新生专享" label-width="120px" prop="applyToStudentType">
+            <el-select
+              v-model.trim="resetForm.applyToStudentType"
+              style="width: 100% !important"
+              clearable
+            >
+              <el-option label="是" :value="1"></el-option>
+              <el-option label="否" :value="-1"></el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item label="活动描述" label-width="120px" prop="desc">
             <el-input
               type="textarea"
@@ -551,7 +580,7 @@ export default {
         total: 0, // 总条数
         page_size: [10, 20, 40, 50], // 选择限制显示条数
       },
-      searchForm: { organId: null, enable: null, search: "" },
+      searchForm: { organId: null, enable: null, search: "", applyToStudentType: null },
       dialogVisible: false,
       resetForm: {
         name: "",
@@ -559,6 +588,7 @@ export default {
         activeTime: [],
         courseTime: [],
         stauts: [],
+        applyToStudentType: null,
         organ: [],
       }, // 修改信息
       resetFormRules: {
@@ -590,6 +620,9 @@ export default {
         stauts: [
           { required: true, message: "请选择活动形式", trigger: "blur" },
         ],
+        applyToStudentType: [
+          { required: true, message: "请选择是否新生专享", trigger: "change" },
+        ],
       },
       courseStatusList: [],
       activeType: "",
@@ -814,6 +847,7 @@ export default {
       let search = this.searchForm.search;
       vipGroupActivity({
         organId: this.searchForm.organId,
+        applyToStudentType: this.searchForm.applyToStudentType,
         rows: this.rules.limit,
         page: this.rules.page,
         enable,
@@ -862,6 +896,16 @@ export default {
       }
       return str;
     },
+    formatStudentType(row) {
+      let str = null
+      if(row.applyToStudentType == -1) {
+        str = '否'
+      }
+      if(row.applyToStudentType == 1) {
+        str = '是'
+      }
+      return str
+    },
     // 格式化启用状态
     fommatterEnable(row) {
       switch (row.enable) {
@@ -881,6 +925,7 @@ export default {
       this.activeId = row.id;
       this.dialogVisible = true;
       this.resetForm.name = row.name;
+      this.resetForm.applyToStudentType = row.applyToStudentType;
       this.resetForm.desc = row.description;
 
       if (row.organId) {
@@ -1077,6 +1122,7 @@ export default {
                 endTime,
                 name: this.resetForm.name,
                 description: this.resetForm.desc,
+                applyToStudentType: this.resetForm.applyToStudentType,
                 organId,
                 type,
                 vipGroupCategoryIdList,

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

@@ -56,6 +56,15 @@
             ></el-option>
           </select-all>
         </el-form-item>
+        <el-form-item label="是否新生专享" prop="applyToStudentType">
+          <el-select
+            v-model.trim="vipform.applyToStudentType"
+            clearable
+          >
+            <el-option label="是" value="1"></el-option>
+            <el-option label="否" value="-1"></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="活动描述" prop="desc">
           <el-input
             type="textarea"
@@ -358,8 +367,8 @@
       class="btnWrap"
       style="justify-content: flex-start; padding-left: 120px"
     >
-      <el-button type="info" @click="onReSet">重置</el-button>
       <el-button type="primary" @click="submitFrom">确定</el-button>
+      <el-button type="info" @click="onReSet">重置</el-button>
       <!-- <div class="okBtn"
            @click="submitFrom">确定</div> -->
     </div>
@@ -413,6 +422,7 @@ export default {
         stauts: [
           { required: true, message: "请选择活动形式", trigger: "blur" },
         ],
+        applyToStudentType: [{ required: true, message: '请选择是否新生专享' }]
       },
       courseStatusList: [], // 获取所有课程形式
       activeType: "",
@@ -642,6 +652,7 @@ export default {
                   endTime,
                   name: this.vipform.name,
                   description: this.vipform.desc,
+                  applyToStudentType: this.vipform.applyToStudentType,
                   organId,
                   type,
                   vipGroupCategoryIdList,

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

@@ -498,7 +498,7 @@
             <el-option :value="0" label="否"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="是否是新用户" prop="isNewUser">
+        <!-- <el-form-item label="是否是新用户" prop="isNewUser">
           <template #label>
             <p style="position: relative; display: inline-block">
               是否是新用户
@@ -521,7 +521,7 @@
             <el-option :value="1" label="是"></el-option>
             <el-option :value="0" label="否"></el-option>
           </el-select>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item label="关心包" prop="carePackage">
           <el-select
             class="multiple"
@@ -727,7 +727,7 @@ export default {
         operatingTag: null,
         teacherId: null,
         subjectIdList: null,
-        isNewUser: null,
+        isNewUser: 1,
         carePackage: 0,
         comeOnPackage: 0,
         school:null