mo 4 سال پیش
والد
کامیت
8fa82a767d
2فایلهای تغییر یافته به همراه115 افزوده شده و 65 حذف شده
  1. 8 0
      src/views/resetTeaming/modals/payment-cycle.vue
  2. 107 65
      src/views/teamBuild/components/soundSetComponents/soundSetCore.vue

+ 8 - 0
src/views/resetTeaming/modals/payment-cycle.vue

@@ -48,6 +48,7 @@
         v-model="form.paymentDate"
         type="daterange"
         style="width: 100%;"
+          :picker-options="pickerOptions"
         range-separator="至"
         start-placeholder="开始日期"
         end-placeholder="结束日期">
@@ -60,6 +61,7 @@
     >
       <el-date-picker
         v-model="form.paymentValid"
+         :picker-options="pickerOptions"
         type="daterange"
         style="width: 100%;"
         range-separator="至"
@@ -77,6 +79,12 @@ export default {
   data() {
     return {
       paymentPatternTypeOptions: objectToOptions(paymentPatternType),
+         pickerOptions: {
+        firstDayOfWeek: 1,
+        disabledDate (time) {
+          return time.getTime() + 86400000 <= new Date().getTime();
+        },
+      },
     }
   },
   methods: {

+ 107 - 65
src/views/teamBuild/components/soundSetComponents/soundSetCore.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <div class="soundBtnWrap">
+    <div :class="isField ? 'soundBtnWrap' : 'soundBtnFixed'">
       <el-button
         type="primary"
         @click="allin"
@@ -17,6 +17,7 @@
         >添加</el-button
       >
     </div>
+    <div class="wall"></div>
     <div class="coreWrap">
       <el-checkbox-group v-model="checkList" @change="lookCheck">
         <el-collapse v-model="chioseActiveSound">
@@ -66,9 +67,15 @@
                   :value="item.id"
                 >
                   <span style="float: left">{{ item.name }}</span>
-                  <span style="float: right; color: #8492a6; font-size: 13px; padding-right:20px">{{
-                    item.groupPurchasePrice|moneyFormat
-                  }}元</span>
+                  <span
+                    style="
+                      float: right;
+                      color: #8492a6;
+                      font-size: 13px;
+                      padding-right: 20px;
+                    "
+                    >{{ item.groupPurchasePrice | moneyFormat }}元</span
+                  >
                 </el-option>
               </el-select>
             </div>
@@ -120,36 +127,41 @@ export default {
       teamStatus: "", // 乐团状态
       checkList: [],
       basdisabled: false,
-      teamid:''
+      teamid: "",
+      isField: true,
     };
   },
   mounted() {
-      if(this.$route.query.id){
-       this.teamid = this.$route.query.id;
+    if (this.$route.query.id) {
+      this.teamid = this.$route.query.id;
+      window.addEventListener("scroll", this.getScroll);
     }
     this.init();
   },
+  destroyed() {
+    window.removeEventListener("scroll", this.getScroll);
+  },
   activated() {
-    if(this.teamid&&this.teamid != this.$route.query.id){
-      this.init()
-    }else{
-      if(this.activeSoundList.length <1 ){
-         this.init()
+    if (this.teamid && this.teamid != this.$route.query.id) {
+      this.init();
+    } else {
+      if (this.activeSoundList.length < 1) {
+        this.init();
       }
     }
-      this.teamStatus = this.$route.query.type;
-     if (
-        this.teamStatus == "look" ||
-        this.teamStatus == "teamAudit" ||
-        this.teamStatus == "feeAudit"
-      ) {
-        this.basdisabled = true;
-      } else {
-        this.basdisabled = false;
-      }
+    this.teamStatus = this.$route.query.type;
+    if (
+      this.teamStatus == "look" ||
+      this.teamStatus == "teamAudit" ||
+      this.teamStatus == "feeAudit"
+    ) {
+      this.basdisabled = true;
+    } else {
+      this.basdisabled = false;
+    }
   },
-  deactivated(){
-    this.activeSoundList = []
+  deactivated() {
+    this.activeSoundList = [];
   },
   methods: {
     init() {
@@ -474,20 +486,22 @@ export default {
             //  zheli
 
             // 把第3步单独拆出来做成独立的模块
-            this.$confirm('乐团创建成功,是否提交审核?', '提示', {
-              confirmButtonText: '确定',
-              cancelButtonText: '取消',
-              type: 'warning'
-            }).then(() => {
-              this.teamStatus = 'teamDraft'
-              this.teamid = res.data
-              this.submitInfo(1)
-            }).catch(() => {
-              this.$store.dispatch('delVisitedViews', this.$route)
-              this.$router.push({
-                path: '/business/teamDetail'
+            this.$confirm("乐团创建成功,是否提交审核?", "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning",
+            })
+              .then(() => {
+                this.teamStatus = "teamDraft";
+                this.teamid = res.data;
+                this.submitInfo(1);
               })
-            });
+              .catch(() => {
+                this.$store.dispatch("delVisitedViews", this.$route);
+                this.$router.push({
+                  path: "/business/teamDetail",
+                });
+              });
           }
         });
       } else {
@@ -505,14 +519,14 @@ export default {
             // this.$emit("chiosetab", 2);
 
             // 创建乐团,只会到声部了
-            let query = this.$route.query
-            this.$store.dispatch('delVisitedViews', this.$route)
+            let query = this.$route.query;
+            this.$store.dispatch("delVisitedViews", this.$route);
             this.$router.push({
-              path: '/business/teamDetail',
+              path: "/business/teamDetail",
               query: {
-                ...query
-              }
-            })
+                ...query,
+              },
+            });
           }
         });
       }
@@ -522,27 +536,24 @@ export default {
         this.$message.error("请至少勾选一个");
         return;
       }
-         this.$confirm("确定删除选中声部?", "提示", {
-      confirmButtonText: "确定",
-      cancelButtonText: "取消",
-      type: "warning"
-    })
-      .then(() => {
-        for (let i = 0; i < this.activeSoundList.length; i++) {
-        let index = this.checkList.indexOf(this.activeSoundList[i].id);
-        if (index != -1) {
-          this.activeSoundList.splice(i, 1);
-          this.activeSound.splice(i, 1);
-          i--;
-        }
-      }
-      this.checkList = [];
-      this.$message.success('删除成功')
+      this.$confirm("确定删除选中声部?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
       })
-      .catch(() => { });
-
-
-
+        .then(() => {
+          for (let i = 0; i < this.activeSoundList.length; i++) {
+            let index = this.checkList.indexOf(this.activeSoundList[i].id);
+            if (index != -1) {
+              this.activeSoundList.splice(i, 1);
+              this.activeSound.splice(i, 1);
+              i--;
+            }
+          }
+          this.checkList = [];
+          this.$message.success("删除成功");
+        })
+        .catch(() => {});
     },
     allin() {
       this.checkList = [];
@@ -581,10 +592,24 @@ export default {
         ownershipType: this.topfor.ownershipType,
         repairUserId: this.topfor.repairUserId,
         feeType: this.topfor.feeType,
-        directorUserId:this.topfor.head
+        directorUserId: this.topfor.head,
       };
       return obj;
     },
+    getScroll() {
+      this.scrollTop =
+        window.pageYOffset ||
+        document.documentElement.scrollTop ||
+        document.body.scrollTop;
+      if (
+        !!document.documentElement.scrollTop &&
+        document.documentElement.scrollTop >= 210
+      ) {
+        this.isField = false;
+      } else {
+        this.isField = true;
+      }
+    },
   },
   watch: {
     activeSoundList: {
@@ -612,9 +637,26 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
-.soundBtnWrap {
+.wall {
+  height: 60px;
   margin-bottom: 20px;
 }
+.soundBtnWrap {
+  width: 100%;
+  position: absolute;
+  background-color: #fff;
+  z-index: 100;
+  padding: 20px;
+}
+.soundBtnFixed {
+  top: 86px;
+  left: 205px;
+  width: 100%;
+  position: fixed;
+  background-color: #fff;
+  z-index: 100;
+  padding: 20px;
+}
 /deep/.el-collapse-item__header {
   background-color: #edeef0;
 }