Selaa lähdekoodia

修改样式及功能

lex-xin 4 vuotta sitten
vanhempi
commit
2d7481e39d

+ 22 - 5
src/views/categroyManager/vipActiveList.vue

@@ -31,6 +31,7 @@
         <el-form-item prop="search">
           <el-input
             v-model.trim="searchForm.search"
+            clearable
             placeholder="请输入活动编号、名称"
           ></el-input>
         </el-form-item>
@@ -419,6 +420,7 @@
               <el-input
                 v-if="activeType == 'DISCOUNT'"
                 v-model.trim="attribute1"
+                type="number"
                 placeholder="请输入折扣数值"
               >
                 <template slot="append">%</template>
@@ -436,6 +438,7 @@
                 placeholder="多少节开始赠"
                 v-if="activeType == 'GIVE_CLASS'"
                 v-model.trim="attribute1"
+                type="number"
                 style="margin-right: 10px"
               ></el-input>
               <span v-if="activeType == 'GIVE_CLASS'">赠</span>
@@ -443,6 +446,7 @@
                 v-if="activeType == 'GIVE_CLASS'"
                 placeholder="请输入赠送课时数"
                 v-model.trim="attribute2"
+                type="number"
                 style="margin: 0 10px"
               ></el-input>
               <!-- <el-checkbox v-if="activeType=='GIVE_CLASS'"
@@ -891,9 +895,22 @@ export default {
           endTime = this.resetForm.activeTime[1] || null;
           let organId = this.resetForm.organ.join(",");
           let type = this.activeType;
+          if(!type) {
+            this.$message.error('请选择活动类型')
+            return
+          }
           if (type == "DISCOUNT") {
-            if (this.attribute1 < 0 ) {
-              this.$message.error("折扣必须大于0");
+            if (!this.attribute1 || this.attribute1 < 0 ) {
+              this.$message.error("折扣必须大于等于0");
+              return;
+            }
+          } else if(type == 'GIVE_CLASS') {
+            if(!this.attribute1) {
+              this.$message.error("请输入多少节开始赠");
+              return;
+            }
+            if(!this.attribute2) {
+              this.$message.error("请输入赠送课时数");
               return;
             }
           }
@@ -991,11 +1008,11 @@ export default {
     },
     gotoNewActive() {
       // 带参数 searchForm: { organId: null } 搜索条件
-      let rules = JSON.stringify(this.rules);
-      let searchForm = JSON.stringify(this.searchForm);
+      // let rules = JSON.stringify(this.rules);
+      // let searchForm = JSON.stringify(this.searchForm);
       this.$router.push({
         path: "/vipClassSet/vipNewActive?type=create",
-        query: { rules, searchForm },
+        // query: { rules, searchForm },
       });
     },
     closeVipform() {

+ 17 - 4
src/views/categroyManager/vipNewActive.vue

@@ -352,10 +352,23 @@ export default {
           let endTime = this.vipform.activeTime[1];
           let organId = this.vipform.organ.join(",");
           let type = this.activeType;
-          if (type == 'DISCOUNT') {
-            if (this.attribute1 < 0 ) {
-              this.$message.error('折扣必须大于0')
-              return
+          if(!type) {
+            this.$message.error('请选择活动类型')
+            return
+          }
+          if (type == "DISCOUNT") {
+            if (!this.attribute1 || this.attribute1 < 0 ) {
+              this.$message.error("折扣必须大于等于0");
+              return;
+            }
+          } else if(type == 'GIVE_CLASS') {
+            if(!this.attribute1) {
+              this.$message.error("请输入多少节开始赠");
+              return;
+            }
+            if(!this.attribute2) {
+              this.$message.error("请输入赠送课时数");
+              return;
             }
           }
           let vipGroupCategoryIdList = this.vipform.stauts.join(",");

+ 6 - 35
src/views/studentManager/studentList.vue

@@ -536,15 +536,9 @@
         >
       </div>
     </el-dialog>
+    <!-- 学员激活列表 -->
+    <qr-code v-model="qrcodeStatus" title="学员激活列表" :codeUrl="qrcodeUrl" />
 
-    <el-dialog title="学员激活列表" :visible.sync="qrcodeStatus" width="300px">
-      <div class="right-code">
-        <!-- <h2 class="title">学员激活列表</h2> -->
-        <div id="qrcode" class="qrcode code" ref="qrCodeUrl" style="display: flex;justify-content: center;"></div>
-        <!-- <p class="code-url"
-        v-if="codeUrl2">{{ codeUrl2 }}</p>-->
-      </div>
-    </el-dialog>
     <el-dialog
       title="修改密码"
       :visible.sync="passwrodVisiable"
@@ -615,12 +609,11 @@ import {
   studentHasCourse,
   getLatest,
 } from "@/api/studentManager";
+import qrCode from '@/components/QrCode/index';
 import cleanDeep from "clean-deep";
 import { vaildStudentUrl } from "@/utils/validate";
 import { getEmployeeOrgan, resetPassword2, getTeacher } from "@/api/buildTeam";
 import { subjectListTree } from "@/api/specialSetting";
-import QRCode from "qrcodejs2";
-import store from "@/store";
 import axios from "axios";
 import qs from "qs";
 import { packageStatus } from '@/constant/index'
@@ -629,7 +622,7 @@ import load from "@/utils/loading";
 import { permission } from "@/utils/directivePage";
 export default {
   name: "studentList",
-  components: { pagination },
+  components: { pagination, qrCode },
   data() {
     return {
       studentVisible: false,
@@ -694,7 +687,7 @@ export default {
       active: null,
       maskName: "新增学员",
       qrcodeStatus: false,
-      qrcodes: true,
+      qrcodeUrl: null,
       activeRow: null,
       passwrodVisiable: false,
       passwrodForm: {
@@ -718,25 +711,7 @@ export default {
     onCreateQRCode() {
       // 生成报名二维码
       this.qrcodeStatus = true;
-      // let id = this.$route.query.id
-      // let teamName = this.$route.query.name
-
-      setTimeout(() => {
-        if (this.qrcodes) {
-          this.qrcodes = false;
-          this.qrcode = new QRCode("qrcode", {
-            width: 250,
-            height: 250,
-            colorDark: "#000000",
-            colorLight: "#ffffff",
-            correctLevel: QRCode.CorrectLevel.H,
-          });
-        }
-        // vaildStudentUrl() + `/#/sporadicLogin?id=${刷刷刷}`
-        this.qrcode.clear();
-        this.qrcode.makeCode(vaildStudentUrl() + `/#/queryStudentPer`);
-        // this.codeUrl = vaildStudentUrl() + '/#/login?musicGroupId=' + id
-      }, 500);
+      this.qrcodeUrl = vaildStudentUrl() + `/#/queryStudentPer`
     },
     getList() {
       let params = this.searchForm;
@@ -1055,10 +1030,6 @@ export default {
   }
 }
 /deep/.studentInfo {
-  .el-dialog__body {
-    padding-top: 0;
-    padding-bottom: 0;
-  }
   .multiple.el-select {
     width: 185px !important;
   }

+ 1 - 0
src/views/teamBuild/signupList.vue

@@ -1350,6 +1350,7 @@ export default {
       // this.visitForm.studentName = row.studentName;
       // this.visitForm.musicGroupId = this.teamid;
       // this.visitForm.studentId = row.studentId;
+      row.userId = row.studentId
       this.detail = row
       this.visitVisiable = true;
     },