Przeglądaj źródła

Merge branch 'master' into 03/03Lebao

lex-xin 4 lat temu
rodzic
commit
5555bf6a9a
85 zmienionych plików z 1035 dodań i 617 usunięć
  1. 0 0
      dist/index.html
  2. 0 0
      dist/static/css/app.56a9afe2.css
  3. 0 0
      dist/static/css/chunk-18bbf854.3301d8ed.css
  4. 0 0
      dist/static/css/chunk-230c01ed.19ab9496.css
  5. 1 1
      dist/static/css/chunk-2fa64fd2.f356e152.css
  6. 0 0
      dist/static/css/chunk-375143f9.6f848db2.css
  7. 0 0
      dist/static/css/chunk-37b6e1ba.77240a08.css
  8. 0 0
      dist/static/css/chunk-4e38170a.756d25eb.css
  9. 0 0
      dist/static/css/chunk-4e52956a.9ab2243b.css
  10. 0 0
      dist/static/css/chunk-50b7e0ed.2ab55b68.css
  11. 0 0
      dist/static/css/chunk-55053db0.97024566.css
  12. 0 1
      dist/static/css/chunk-6ba78541.d3132269.css
  13. 0 0
      dist/static/css/chunk-6fa86530.4de4ad80.css
  14. 1 0
      dist/static/css/chunk-7ec59306.541045a7.css
  15. 0 0
      dist/static/css/chunk-91193b0c.5fb18d04.css
  16. 0 0
      dist/static/css/chunk-a5095080.ebb8e846.css
  17. 0 1
      dist/static/css/chunk-ce3ca416.a6d441b0.css
  18. 0 0
      dist/static/css/chunk-d163e384.c30f03a6.css
  19. 1 1
      dist/static/css/chunk-df9f4870.794cb9d3.css
  20. 1 0
      dist/static/css/chunk-f1806e10.1b3a5dc4.css
  21. 0 0
      dist/static/css/chunk-f18606e8.d3cdf353.css
  22. 0 0
      dist/static/js/app.3587e2b5.js
  23. 0 0
      dist/static/js/app.a619198b.js
  24. 0 0
      dist/static/js/chunk-0c51fa7e.349a0f60.js
  25. 0 0
      dist/static/js/chunk-18bbf854.1350a350.js
  26. 0 0
      dist/static/js/chunk-1f32103d.8646537d.js
  27. 0 0
      dist/static/js/chunk-22a6ff98.f8af6f95.js
  28. 0 0
      dist/static/js/chunk-230c01ed.389945c5.js
  29. 0 0
      dist/static/js/chunk-2d53cf59.0166eb6b.js
  30. 0 0
      dist/static/js/chunk-2e3062be.269fd640.js
  31. 0 0
      dist/static/js/chunk-2e3062be.3ace2c9f.js
  32. 0 0
      dist/static/js/chunk-2f15fc64.2d937ecb.js
  33. 0 0
      dist/static/js/chunk-2fa64fd2.be0dc8f8.js
  34. 0 0
      dist/static/js/chunk-375143f9.74438dc4.js
  35. 0 0
      dist/static/js/chunk-37b6e1ba.a88eaded.js
  36. 0 0
      dist/static/js/chunk-3b914591.279f886d.js
  37. 0 0
      dist/static/js/chunk-41ce9a8e.f0b8c971.js
  38. 0 0
      dist/static/js/chunk-48436ec2.00f8dc5a.js
  39. 0 0
      dist/static/js/chunk-4d6710e9.10c8bd94.js
  40. 0 0
      dist/static/js/chunk-4d6710e9.5ae30b1f.js
  41. 0 0
      dist/static/js/chunk-4e38170a.646e3240.js
  42. 0 0
      dist/static/js/chunk-4e52956a.f21c177c.js
  43. 0 0
      dist/static/js/chunk-50b7e0ed.b85ca5d4.js
  44. 0 0
      dist/static/js/chunk-514f55de.6d425c50.js
  45. 0 0
      dist/static/js/chunk-55053db0.cae8d875.js
  46. 0 0
      dist/static/js/chunk-699177e7.dee1756c.js
  47. 0 0
      dist/static/js/chunk-6ba78541.d1c3e125.js
  48. 0 0
      dist/static/js/chunk-6c997872.b8602d11.js
  49. 0 0
      dist/static/js/chunk-6fa86530.c8e314d3.js
  50. 0 0
      dist/static/js/chunk-7ec59306.4d9b241f.js
  51. 0 0
      dist/static/js/chunk-7f91ee0d.08ec081e.js
  52. 0 0
      dist/static/js/chunk-7f91ee0d.5c818979.js
  53. 0 0
      dist/static/js/chunk-91193b0c.45589e11.js
  54. 0 0
      dist/static/js/chunk-9c191ff2.89258c59.js
  55. 0 0
      dist/static/js/chunk-a5095080.2a6ee0ac.js
  56. 0 0
      dist/static/js/chunk-b2f19fac.2558e31d.js
  57. 0 0
      dist/static/js/chunk-b7b314ec.e3cc8cc5.js
  58. 0 0
      dist/static/js/chunk-ce3ca416.e6443b79.js
  59. 0 0
      dist/static/js/chunk-d163e384.a57ccf08.js
  60. 0 0
      dist/static/js/chunk-df9f4870.011c3b69.js
  61. 0 0
      dist/static/js/chunk-f1806e10.4d1684ec.js
  62. 0 0
      dist/static/js/chunk-f18606e8.6882b7c0.js
  63. 0 0
      dist/static/js/chunk-f95af620.0101f79f.js
  64. 1 1
      src/components/filter-search/index.vue
  65. 1 1
      src/layout/components/AppMain.vue
  66. 9 3
      src/layout/components/Sidebar/index.vue
  67. 80 11
      src/layout/index.vue
  68. 101 60
      src/views/buildVip/index.vue
  69. 234 145
      src/views/categroyManager/vipActiveList.vue
  70. 481 310
      src/views/categroyManager/vipNewActive.vue
  71. 1 1
      src/views/main/baseinfo/business.vue
  72. 1 1
      src/views/main/baseinfo/management.vue
  73. 3 2
      src/views/main/constant.js
  74. 7 1
      src/views/reaplceMusicPlayer/index.vue
  75. 3 3
      src/views/resetTeaming/modals/subject-preview.vue
  76. 3 2
      src/views/serverDetail/index.vue
  77. 1 3
      src/views/studentManager/components/studentVip.vue
  78. 69 38
      src/views/teacherManager/teacherOperation/components/salarySet.vue
  79. 1 1
      src/views/teamBuild/modals/accessories.vue
  80. 1 1
      src/views/teamBuild/signupList.vue
  81. 1 1
      src/views/teamDetail/teamCourseList.vue
  82. 0 1
      src/views/teamDetail/teamList.vue
  83. 4 0
      src/views/vipClass/vipDetail/components/fnanceInfo.vue
  84. 27 24
      src/views/workBenchManager/payAppeal.vue
  85. 2 3
      vue.config.js

Plik diff jest za duży
+ 0 - 0
dist/index.html


Plik diff jest za duży
+ 0 - 0
dist/static/css/app.56a9afe2.css


+ 0 - 0
dist/static/css/chunk-1f32103d.3301d8ed.css → dist/static/css/chunk-18bbf854.3301d8ed.css


+ 0 - 0
dist/static/css/chunk-3b914591.19ab9496.css → dist/static/css/chunk-230c01ed.19ab9496.css


+ 1 - 1
dist/static/css/chunk-22a6ff98.e3654ad7.css → dist/static/css/chunk-2fa64fd2.f356e152.css

@@ -1 +1 @@
-.btnList[data-v-005e3ff4]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.code-url[data-v-005e3ff4]{margin-top:10px}
+.btnList[data-v-f3ed46a2]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.code-url[data-v-f3ed46a2]{margin-top:10px}

Plik diff jest za duży
+ 0 - 0
dist/static/css/chunk-375143f9.6f848db2.css


Plik diff jest za duży
+ 0 - 0
dist/static/css/chunk-37b6e1ba.77240a08.css


Plik diff jest za duży
+ 0 - 0
dist/static/css/chunk-4e38170a.756d25eb.css


Plik diff jest za duży
+ 0 - 0
dist/static/css/chunk-4e52956a.9ab2243b.css


Plik diff jest za duży
+ 0 - 0
dist/static/css/chunk-50b7e0ed.2ab55b68.css


Plik diff jest za duży
+ 0 - 0
dist/static/css/chunk-55053db0.97024566.css


+ 0 - 1
dist/static/css/chunk-6ba78541.d3132269.css

@@ -1 +0,0 @@
-.computeMoney[data-v-1af66364]{margin-top:10px;float:right}.m-core[data-v-1af66364]{margin-top:30px}.m-core .el-input[data-v-1af66364]{width:180px}.m-core h4[data-v-1af66364]{font-size:16px;background-color:#ccc;color:#fff;width:100%;height:40px;line-height:40px;margin-bottom:20px;padding:0 20px}.vipMsg[data-v-1af66364]{margin-bottom:20px}.planList[data-v-1af66364]{padding:0 25px}.planList .planTop[data-v-1af66364]{height:40px;line-height:40px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;border-bottom:1px solid #ccc;margin-top:20px}.planList .planTop>p[data-v-1af66364]{font-size:14px}.planList .planCore .row[data-v-1af66364]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:nowrap;flex-wrap:nowrap;height:40px;line-height:40px;font-size:14px;text-align:center}.planList .planCore .row div[data-v-1af66364]{width:87px}.okBtn[data-v-1af66364]{width:120px;height:40px;line-height:40px;text-align:center;color:#fff;border-radius:4px;margin-right:20px;cursor:pointer;background-color:#f97215;float:right}

Plik diff jest za duży
+ 0 - 0
dist/static/css/chunk-6fa86530.4de4ad80.css


+ 1 - 0
dist/static/css/chunk-7ec59306.541045a7.css

@@ -0,0 +1 @@
+.titleP[data-v-5f8e8d68]{line-height:30px}

+ 0 - 0
dist/static/css/chunk-f95af620.5fb18d04.css → dist/static/css/chunk-91193b0c.5fb18d04.css


Plik diff jest za duży
+ 0 - 0
dist/static/css/chunk-a5095080.ebb8e846.css


+ 0 - 1
dist/static/css/chunk-ce3ca416.a6d441b0.css

@@ -1 +0,0 @@
-.titleP[data-v-17c4db57]{line-height:30px}

Plik diff jest za duży
+ 0 - 0
dist/static/css/chunk-d163e384.c30f03a6.css


+ 1 - 1
dist/static/css/chunk-2d53cf59.2833bc2b.css → dist/static/css/chunk-df9f4870.794cb9d3.css

@@ -1 +1 @@
-.process[data-v-f049a426]{padding:10px;max-height:600px;overflow-y:auto}.dialog-footer[data-v-0dcea96b]{margin-top:20px;display:block;text-align:right}[data-v-1cadb61a] .el-button+.el-button{margin-left:0}.select[data-v-1cadb61a]{font-size:14px}.btnList[data-v-1cadb61a]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.btnList div[data-v-1cadb61a]{margin-right:15px}
+.process[data-v-f049a426]{padding:10px;max-height:600px;overflow-y:auto}.dialog-footer[data-v-0dcea96b]{margin-top:20px;display:block;text-align:right}[data-v-5871f95a] .el-button+.el-button{margin-left:0}.select[data-v-5871f95a]{font-size:14px}.btnList[data-v-5871f95a]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.btnList div[data-v-5871f95a]{margin-right:15px}

+ 1 - 0
dist/static/css/chunk-f1806e10.1b3a5dc4.css

@@ -0,0 +1 @@
+.computeMoney[data-v-5bc0e5ca]{margin-top:10px;float:right}.m-core[data-v-5bc0e5ca]{margin-top:30px}.m-core .el-input[data-v-5bc0e5ca]{width:180px}.m-core h4[data-v-5bc0e5ca]{font-size:16px;background-color:#ccc;color:#fff;width:100%;height:40px;line-height:40px;margin-bottom:20px;padding:0 20px}.vipMsg[data-v-5bc0e5ca]{margin-bottom:20px}.planList[data-v-5bc0e5ca]{padding:0 25px}.planList .planTop[data-v-5bc0e5ca]{height:40px;line-height:40px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;border-bottom:1px solid #ccc;margin-top:20px}.planList .planTop>p[data-v-5bc0e5ca]{font-size:14px}.planList .planCore .row[data-v-5bc0e5ca]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:nowrap;flex-wrap:nowrap;height:40px;line-height:40px;font-size:14px;text-align:center}.planList .planCore .row div[data-v-5bc0e5ca]{width:87px}.okBtn[data-v-5bc0e5ca]{width:120px;height:40px;line-height:40px;text-align:center;color:#fff;border-radius:4px;margin-right:20px;cursor:pointer;background-color:#f97215;float:right}.submitP[data-v-5bc0e5ca]{margin-bottom:20px;font-size:14px;padding-left:24px}

Plik diff jest za duży
+ 0 - 0
dist/static/css/chunk-f18606e8.d3cdf353.css


Plik diff jest za duży
+ 0 - 0
dist/static/js/app.3587e2b5.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/app.a619198b.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-0c51fa7e.349a0f60.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-18bbf854.1350a350.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-1f32103d.8646537d.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-22a6ff98.f8af6f95.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-230c01ed.389945c5.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-2d53cf59.0166eb6b.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-2e3062be.269fd640.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-2e3062be.3ace2c9f.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-2f15fc64.2d937ecb.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-2fa64fd2.be0dc8f8.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-375143f9.74438dc4.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-37b6e1ba.a88eaded.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-3b914591.279f886d.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-41ce9a8e.f0b8c971.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-48436ec2.00f8dc5a.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-4d6710e9.10c8bd94.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-4d6710e9.5ae30b1f.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-4e38170a.646e3240.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-4e52956a.f21c177c.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-50b7e0ed.b85ca5d4.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-514f55de.6d425c50.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-55053db0.cae8d875.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-699177e7.dee1756c.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-6ba78541.d1c3e125.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-6c997872.b8602d11.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-6fa86530.c8e314d3.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-7ec59306.4d9b241f.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-7f91ee0d.08ec081e.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-7f91ee0d.5c818979.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-91193b0c.45589e11.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-9c191ff2.89258c59.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-a5095080.2a6ee0ac.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-b2f19fac.2558e31d.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-b7b314ec.e3cc8cc5.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-ce3ca416.e6443b79.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-d163e384.a57ccf08.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-df9f4870.011c3b69.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-f1806e10.4d1684ec.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-f18606e8.6882b7c0.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-f95af620.0101f79f.js


+ 1 - 1
src/components/filter-search/index.vue

@@ -84,7 +84,7 @@ export default {
   },
   mounted() {
     this.initSearch = this.$route.query
-    console.log(this.activeItems)
+    // console.log(this.activeItems)
   },
   watch: {
     $route() {

+ 1 - 1
src/layout/components/AppMain.vue

@@ -62,7 +62,7 @@ export default {
 // fix css style bug in open el-dialog
 .el-popup-parent--hidden {
   .fixed-header {
-    padding-right: 15px;
+    // padding-right: 15px;
   }
 }
 </style>

+ 9 - 3
src/layout/components/Sidebar/index.vue

@@ -70,7 +70,6 @@ export default {
     },
     isCollapse () {
       return false
-
     },
     getSidebarMenuActive: function() {
       const route = this.$route;
@@ -106,9 +105,16 @@ export default {
         }
       });
       let index = this.menuOperation(childList.children)
-      // console.log(index)
       let status = index > 1 ? true : false
-      this.$emit('childStatus', status)
+      let routeParentName = sessionStorage.getItem('routeParentName')
+      let params = {
+        status: status
+      }
+      if(routeParentName != meta.belongTopMenu) {
+        params.isCollapse = true
+        sessionStorage.setItem('routeParentName', meta.belongTopMenu)
+      }
+      this.$emit('childStatus', params)
     },
     menuOperation(arr) {
       let index = 0;

+ 80 - 11
src/layout/index.vue

@@ -1,15 +1,22 @@
 <template>
   <!--  :class="classObj" -->
   <div class="app-wrapper">
-    <div v-if="device==='mobile'&&sidebar.opened"
+    <!-- <div v-if="device==='mobile'&&sidebar.opened"
          class="drawer-bg"
-         @click="handleClickOutside" />
+         @click="handleClickOutside" /> -->
     <div :class="{'fixed-header':fixedHeader}" style="width: 100%;">
         <navbar />
     </div>
-    <sidebar class="sidebar-container" @childStatus="childStatus" v-show="onlyStatus" />
-    <div class="main-container" :class="[ onlyStatus ? null : 'noContainer' ]">
-      <div :class="{'fixed-header':fixedHeader, 'noTagView': !onlyStatus}" style="top: 90px;" >
+    <div class="collapse" v-if="onlyStatus" @click="handleClickOutside" :class="[onlyStatus && isCollapse ? null : 'hideSidebar' ]">
+      <div class='box'></div>
+      <div class='box2'>
+        <i :class="[onlyStatus && isCollapse ? 'el-icon-arrow-left' : 'el-icon-arrow-right']"></i>
+      </div>
+      <div class='box3'></div>
+    </div>
+    <sidebar class="sidebar-container" @childStatus="childStatus" :class="[onlyStatus && isCollapse ? null : 'noSide']" />
+    <div class="main-container" :class="[ onlyStatus && isCollapse ? null : 'noContainer' ]">
+      <div :class="{'fixed-header':fixedHeader, 'noTagView': !(onlyStatus && isCollapse)}" style="top: 90px;" >
         <!-- <navbar /> -->
         <tags-view></tags-view>
       </div>
@@ -45,23 +52,27 @@ export default {
       return {
         hideSidebar: false,
         openSidebar: this.sidebar.opened,
-        // withoutAnimation: this.sidebar.withoutAnimation,
+        withoutAnimation: this.sidebar.withoutAnimation,
         // mobile: this.device === 'mobile'
       }
     }
   },
   data() {
     return {
-      onlyStatus: true
+      onlyStatus: true,
+      isCollapse: true, // 是否折叠, true 不折叠,false 折叠
     }
   },
   methods: {
-    childStatus(status) {
-      // console.log(status)
-      this.onlyStatus = status
+    childStatus(params) {
+      this.onlyStatus = params.status
+      if(params.isCollapse) {
+        this.isCollapse = params.isCollapse
+      }
     },
     handleClickOutside () {
-      this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
+      // this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
+      this.isCollapse = !this.isCollapse
     }
   }
 }
@@ -107,6 +118,7 @@ export default {
 
 .hideSidebar .fixed-header {
   width: calc(100% - 54px);
+  transition: width 0.28s;
 }
 
 .mobile .fixed-header {
@@ -125,4 +137,61 @@ export default {
 .noTagView {
   width: 100% !important;
 }
+
+#app .sidebar-container.noSide {
+  width: 0 !important;
+}
+
+.hideSidebar {
+  left: 0 !important;
+  transition: left .28s;
+}
+.collapse {
+  position: fixed;
+  top: 50vh;
+  transition: left .28s;
+  left: 195px;
+  z-index: 999;
+  // background: #d8e0e7;
+  // height: 90px;
+  width: 16px;
+  overflow: hidden;
+  .box,.box3{
+    width:0px;
+    height:0px;
+
+    border-top:16px solid rgba(0,0,0,0);
+    border-right:16px solid  rgba(0,0,0,0);
+    border-bottom:16px solid #d8e0e7;
+    border-left:16px solid  rgba(0,0,0,0);
+  }
+
+  .box2{
+    width:16px;
+    height:60px;
+    background-color: #d8e0e7;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    .el-icon-arrow-left, .el-icon-arrow-right {
+      font-size: 18px;
+      font-weight: bold;
+      color: #fff;
+    }
+  }
+  .box {
+    transform: translate(-23px, 16px)  rotate(225deg);
+  }
+  .box3 {
+    transform: translate(-23px, -16px)  rotate(315deg);
+  }
+  &:hover {
+    .box, .box3 {
+      border-bottom-color: #cbd1d5;
+    }
+    .box2 {
+      background: #cbd1d5;
+    }
+  }
+}
 </style>

+ 101 - 60
src/views/buildVip/index.vue

@@ -138,13 +138,18 @@
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="活动方案" prop="activeType" v-else :rules=' [
-          {
-            required: true,
-            message: "请选择活动方案",
-            trigger: "change",
-          },
-        ]'>
+          <el-form-item
+            label="活动方案"
+            prop="activeType"
+            v-else
+            :rules="[
+              {
+                required: true,
+                message: '请选择活动方案',
+                trigger: 'change',
+              },
+            ]"
+          >
             <el-select
               v-model.trim="leftForm.activeType"
               filterable
@@ -204,6 +209,7 @@
           <el-form-item label="上课学员" prop="students">
             <el-select
               v-model.trim="leftForm.students"
+              collapse-tags
               multiple
               clearable
               placeholder="请输入上课学员"
@@ -238,6 +244,13 @@
           :closable="false"
           class="vipMsg"
         ></el-alert>
+
+        <p class="submitP" v-if="minCourseNum&&maxCourseNum&&this.hotType == 'DISCOUNT'">
+          该活动最小课时数:<span style="color: red">{{ minCourseNum }}</span
+          >节 最大课时数:<span style="color: red">{{ maxCourseNum }}</span
+          >节
+        </p>
+
         <el-form
           :inline="true"
           :model="centerForm"
@@ -492,7 +505,7 @@
       :visible.sync="dialogFormVisible"
     >
       <el-form :model="maskForm" label-position="right" label-width="150px">
-        <el-form-item label="线上课开课时间">
+        <el-form-item label="开课时间">
           <el-date-picker
             v-model.trim="maskForm.courseStartOnline"
             type="date"
@@ -500,14 +513,14 @@
             placeholder="请选择开课时间"
           />
         </el-form-item>
-        <el-form-item label="线下课开课时间">
+        <!-- <el-form-item label="线下课开课时间">
           <el-date-picker
             v-model.trim="maskForm.courseStartOffline"
             type="date"
             :picker-options="courseOption"
             placeholder="请选择开课时间"
           />
-        </el-form-item>
+        </el-form-item> -->
         <div
           class="line"
           style="height: 1px; background: #ccc; margin: 0 25px"
@@ -683,6 +696,8 @@ export default {
       attribute1: "",
       attribute2: "",
       attribute3: "",
+      maxCourseNum: 0,
+      minCourseNum: 0,
       salaryReadonlyFlag: "", // 老师课酬是否可配
       paymentReadonlyFlag: "", // 课程单价是否可配
       lookList: [],
@@ -814,8 +829,6 @@ export default {
         this.giveNum = giveNum || 0;
 
         return parseInt(offline) + parseInt(online) + "+" + giveNum || "";
-      } else if(this.hotType == 'DISCOUNT' && this.attribute3  && this.attribute3 > 0) {
-        return parseInt(this.attribute3)
       }
       return parseInt(offline) + parseInt(online) || "";
     },
@@ -834,13 +847,13 @@ export default {
     }, 100);
     this.init();
   },
-  // activated() {
-  //   Object.assign(this.$data, this.$options.data());
-  //   setTimeout(() => {
-  //     this.$refs["leftForm"].resetFields();
-  //   }, 100);
-  //   this.init();
-  // },
+  activated() {
+    // Object.assign(this.$data, this.$options.data());
+    // setTimeout(() => {
+    //   this.$refs["leftForm"].resetFields();
+    // }, 100);
+    // this.init();
+  },
   methods: {
     async init() {
       if (this.$route.query.rules) {
@@ -866,19 +879,20 @@ export default {
       this.courseOption = this.coursesDate();
     },
     onCourseNumChange(type) {
-      let centerForm = this.centerForm
       // 折扣类型,并且设置的排课数有值
-      if(this.hotType == 'DISCOUNT' && this.attribute3 && this.attribute3 > 0) {
-        // 判断线上或线下总和等于排课次数
-        // console.log((parseInt(centerForm.onlineCourseNum) + parseInt(centerForm.offlineCourseNum)), this.attribute3)
-        let onlineNum = centerForm.onlineCourseNum || 0
-        let offlineNum = centerForm.offlineCourseNum || 0
-        if((parseInt(onlineNum) + parseInt(offlineNum)) > this.attribute3) {
-          if(type == 'online') {
-            this.$message.error('线上课数加线下课数必须等于待排课数')
-          } else if(type == 'offline') {
-            this.$message.error('线上课数加线下课数必须等于待排课数')
-          }
+      let centerForm = this.centerForm;
+      if (
+        this.hotType == "DISCOUNT" &&
+        this.maxCourseNum &&
+        this.minCourseNum
+      ) {
+        // 判断线上或线下总和大于排课次数
+        let onlineNum = centerForm.onlineCourseNum || 0;
+        let offlineNum = centerForm.offlineCourseNum || 0;
+        let allNUm = parseInt(onlineNum) + parseInt(offlineNum);
+        if (allNUm > this.maxCourseNum || allNUm < this.minCourseNum) {
+          this.$message.error("待排课数不可超过该活动限制");
+          return;
         }
       }
     },
@@ -984,6 +998,7 @@ export default {
     },
     // 选择活动方案
     chioseActive(val) {
+      console.log(val)
       this.rightForm.offlineCourse = "";
       this.rightForm.onlineCourse = "";
       // this.rightForm.onlinePrice = '';
@@ -992,7 +1007,8 @@ export default {
       this.timeTable = [];
       this.attribute1 = "";
       this.attribute2 = "";
-      this.attribute3 = ""
+      this.attribute3 = "";
+
       this.giveNum = 0;
       this.isGiveClass = false;
       this.leftForm.courseStart = "";
@@ -1023,11 +1039,12 @@ export default {
         // 根须活动id获取 相应的值
         for (let i in this.activeList) {
           if (this.activeList[i].id == val) {
-            console.log(this.activeList[i])
             // 如果是买赠就必须选择赠课类型
             // 报名开始 报名结束 课程开始 课程结束 // 判断是否有线上,线下课 并同步状态
             // this.leftForm.signUpStart = this.activeList[i].startTime;
             // this.leftForm.signUpEnd = this.activeList[i].endTime;
+            this.maxCourseNum = this.activeList[i].maxCourseNum || 0;
+            this.minCourseNum = this.activeList[i].minCourseNum || 0;
             this.leftForm.courseStart = this.activeList[i].coursesStartTime;
             this.leftForm.courseEnd = this.activeList[i].coursesEndTime;
             // 获取活动种类并保存
@@ -1077,7 +1094,6 @@ export default {
       }
       // 拿到相应的值插入数组
       let endTime = this.MinutesTest(startTime, this.leftForm.classTime);
-
       let str;
       switch (courseType) {
         case "ONLINE": {
@@ -1146,10 +1162,11 @@ export default {
           id: Date.now(),
         });
       }
-      // console.log(this.lookList)
+      console.log(this.lookList)
       // let courseType = this.maskForm.type;
       // // let week = ;this.maskForm.week
       // let startTime = this.maskForm.startTime;
+      //  根据时间排序
       this.maskForm.type = "";
       this.maskForm.week = "";
       this.maskForm.startTime = "";
@@ -1220,24 +1237,32 @@ export default {
       } else if (giveClassType == "OFFLINE") {
         offline += giveNum;
       }
-
-      // 这里判断是否选择了排课开始时间
-      if (online && !this.maskForm.courseStartOnline) {
-        this.$message.error("选择了线上课 但没有线上课开始时间");
+      if( !this.maskForm.courseStartOnline){
+         this.$message.error("请选择课程开始时间");
         return;
       }
 
-      if (offline && !this.maskForm.courseStartOffline) {
-        this.$message.error("选择了线下课 但没有线下课开始时间");
-        return;
-      }
+
+
+      // 这里判断是否选择了排课开始时间
+      // if (online && !this.maskForm.courseStartOnline) {
+      //   this.$message.error("选择了线上课 但没有线上课开始时间");
+      //   return;
+      // }
+
+      // if (offline && !this.maskForm.courseStartOffline) {
+      //   this.$message.error("选择了线下课 但没有线下课开始时间");
+      //   return;
+      // }
       let date, date1;
-      if (this.maskForm.courseStartOnline) {
-        date = new Date(this.maskForm.courseStartOnline.getTime());
-      }
-      if (this.maskForm.courseStartOffline) {
-        date1 = new Date(this.maskForm.courseStartOffline.getTime());
-      }
+      date = new Date(this.maskForm.courseStartOnline.getTime());
+       date1 = new Date(this.maskForm.courseStartOnline.getTime());
+      // if (this.maskForm.courseStartOnline) {
+      //   date = new Date(this.maskForm.courseStartOnline.getTime());
+      // }
+      // if (this.maskForm.courseStartOffline) {
+      //   date1 = new Date(this.maskForm.courseStartOffline.getTime());
+      // }
       // let startWeekday = this.maskForm.courseStart.getDay();
       let onlineList = []; // 装线上课的数组
       let offlineList = []; //装线下课的数组
@@ -1326,6 +1351,12 @@ export default {
         }
       }
       // console.log(this.timeTable);
+
+      this.timeTable.sort((a,b)=>{
+        let aStr = dayjs(dayjs(a.classDate).format('YYYY-MM-DD')+' '+a.startClassTimeStr+':00').valueOf()
+        let bStr =  dayjs(dayjs(b.classDate).format('YYYY-MM-DD')+' '+b.startClassTimeStr+':00').valueOf()
+         return aStr-bStr
+      })
       this.dialogFormVisible = false;
     },
     getThinkDate(date, num) {
@@ -1513,7 +1544,7 @@ export default {
                 //   message: '提交成功!'
                 // });
                 this.$message.success("提交成功");
-                this.$store.dispatch('delVisitedViews', this.$route)
+                this.$store.dispatch("delVisitedViews", this.$route);
                 this.$router.push({
                   path: "/vipManager/vipList",
                   query: {
@@ -1524,7 +1555,7 @@ export default {
               });
             } else {
               this.$message.success("恭喜您创建成功");
-              this.$store.dispatch('delVisitedViews', this.$route)
+              this.$store.dispatch("delVisitedViews", this.$route);
               this.$router.push({
                 path: "/vipManager/vipList",
                 query: {
@@ -1634,7 +1665,7 @@ export default {
       }
     },
     onCancel() {
-      this.$store.dispatch('delVisitedViews', this.$route)
+      this.$store.dispatch("delVisitedViews", this.$route);
       this.$router.push({
         path: "/vipManager/vipList",
         query: {
@@ -1655,15 +1686,20 @@ export default {
 
       this.$refs["leftForm"].validate((vali) => {
         if (vali) {
-
-          let centerForm = this.centerForm
-          if(this.hotType == 'DISCOUNT' && this.attribute3 && this.attribute3 > 0) {
+          let centerForm = this.centerForm;
+          if (
+            this.hotType == "DISCOUNT" &&
+            this.maxCourseNum &&
+            this.minCourseNum
+          ) {
             // 判断线上或线下总和大于排课次数
-            let onlineNum = centerForm.onlineCourseNum || 0
-            let offlineNum = centerForm.offlineCourseNum || 0
-            if((parseInt(onlineNum) + parseInt(offlineNum)) != this.attribute3) {
-              this.$message.error('线上课数加线下课数必须等于待排课数')
-              return
+            let onlineNum = centerForm.onlineCourseNum || 0;
+            let offlineNum = centerForm.offlineCourseNum || 0;
+            let allNUm = parseInt(onlineNum) + parseInt(offlineNum);
+            if (allNUm > this.maxCourseNum || allNUm < this.minCourseNum) {
+              this.$message.error("待排课数不可超过该活动限制");
+
+              return;
             }
           }
           this.dialogFormVisible = true;
@@ -1920,4 +1956,9 @@ export default {
   background-color: #f97215;
   float: right;
 }
+.submitP {
+  margin-bottom: 20px;
+  font-size: 14px;
+  padding-left: 24px;
+}
 </style>

+ 234 - 145
src/views/categroyManager/vipActiveList.vue

@@ -82,12 +82,8 @@
               <copy-text>{{ scope.row.id }}</copy-text>
             </template>
           </el-table-column>
-          <el-table-column
-            align="center"
-            prop="name"
-            label="活动名称"
-          >
-           <template slot-scope="scope">
+          <el-table-column align="center" prop="name" label="活动名称">
+            <template slot-scope="scope">
               <copy-text>{{ scope.row.name }}</copy-text>
             </template>
           </el-table-column>
@@ -402,7 +398,10 @@
             <div>
               <div
                 class="head"
-                @click="activeType = 'BASE_ACTIVITY'"
+                @click="()=>{this.$refs['form'].resetFields();activeType = 'BASE_ACTIVITY'; courseNumForm = {
+                    minCourseNum: null,
+                    maxCourseNum: null,
+                  };}"
                 :class="activeType == 'BASE_ACTIVITY' ? 'active' : ''"
               >
                 基础活动
@@ -425,17 +424,43 @@
               >
                 <template slot="append">%</template>
               </el-input>
-              <el-input v-if="activeType=='DISCOUNT'"
-                      v-model.number="attribute3"
-                      type="number"
-                      style="margin-left: 10px;width:200px!important"
-                      placeholder="请输入课时数">
-              </el-input>
+              <el-form
+                :model="courseNumForm"
+                :inline="true"
+                ref="form"
+                :rules="activeType == 'DISCOUNT'?courseNumrules:{}"
+                v-show="activeType == 'DISCOUNT'"
+              >
+                <el-form-item prop="minCourseNum">
+                  <el-input
+                    @change="handleMinChange"
+                    v-model.number="courseNumForm.minCourseNum"
+                    type="number"
+                    style="margin-left: 10px; width: 120px !important"
+                    placeholder="最小课时数"
+                  >
+                  </el-input>
+                </el-form-item>
+                <el-form-item prop="maxCourseNum">
+                  <el-input
+                    @change="handleMaxChange"
+
+                    v-model.number="courseNumForm.maxCourseNum"
+                    type="number"
+                    style="margin-left: 10px; width: 120px !important"
+                    placeholder="最大课时数"
+                  >
+                  </el-input>
+                </el-form-item>
+              </el-form>
             </div>
             <div>
               <div
                 class="head"
-                @click="activeType = 'GIVE_CLASS'"
+                @click="()=>{this.$refs['form'].resetFields();activeType = 'GIVE_CLASS'; courseNumForm = {
+                    minCourseNum: null,
+                    maxCourseNum: null,
+                  };}"
                 :class="activeType == 'GIVE_CLASS' ? 'active' : ''"
               >
                 赠送课时
@@ -470,6 +495,8 @@
   </div>
 </template>
 <script>
+const MIN_NUMBER = 1;
+const MAX_NUMBER = 999;
 import pagination from "@/components/Pagination/index";
 import {
   vipGroupActivity,
@@ -478,9 +505,9 @@ import {
   resetVipActive,
   removeVipActive,
 } from "@/api/vipSeting";
-import qs from 'qs';
-import { Export } from '@/utils/downLoadFile'
-import cleanDeep from 'clean-deep'
+import qs from "qs";
+import { Export } from "@/utils/downLoadFile";
+import cleanDeep from "clean-deep";
 export default {
   name: "vipActiveList",
   components: { pagination },
@@ -549,10 +576,25 @@ export default {
       paymentReadonlyFlag: true,
       attribute1: "",
       attribute2: "",
-      attribute3: "",
       giveClassPaySalaryFlag: false,
       activeId: "",
       isReset: false,
+      courseNumForm: {
+        minCourseNum: "",
+        maxCourseNum: "",
+      },
+      courseNumrules: {
+        minCourseNum: [
+          { required: true, message: "请输入最小课时数", trigger: "blur" },
+          { validator: this.validateCom, trigger: "blur" },
+          { validator: this.validateMin, trigger: "blur" },
+        ],
+        maxCourseNum: [
+          { required: true, message: "请输入最大课时数", trigger: "blur" },
+          { validator: this.validateCom, trigger: "blur" },
+          { validator: this.validateMax, trigger: "blur" },
+        ],
+      },
     };
   },
   // created() {
@@ -687,19 +729,23 @@ export default {
       this.getList();
     },
     // 导出
-    async onExport () {
+    async onExport() {
       const { ...rest } = this.searchForm;
-      let obj =  {
+      let obj = {
         ...rest,
         page: this.rules.page,
         rows: this.rules.limit,
       };
-      await Export(this, {
-        url: '/api-web/export/vipGroupActivity',
-        fileName: '活动列表.xlsx',
-        method: 'post',
-        params: qs.stringify(cleanDeep(obj))
-      }, '您确定活动列表?')
+      await Export(
+        this,
+        {
+          url: "/api-web/export/vipGroupActivity",
+          fileName: "活动列表.xlsx",
+          method: "post",
+          params: qs.stringify(cleanDeep(obj)),
+        },
+        "您确定活动列表?"
+      );
     },
     loadNumber(event) {
       var el = event.currentTarget;
@@ -872,134 +918,140 @@ export default {
       this.activeType = row.type;
       this.attribute1 = row.attribute1;
       this.attribute2 = row.attribute2;
-      this.attribute3 = row.attribute3;
-      this.giveClassPaySalaryFlag =
-        row.giveClassPaySalaryFlag == 1 ? true : false;
+      (this.courseNumForm.minCourseNum = row.minCourseNum),
+        (this.courseNumForm.maxCourseNum = row.maxCourseNum),
+        (this.giveClassPaySalaryFlag =
+          row.giveClassPaySalaryFlag == 1 ? true : false);
     },
     // 点击确认按钮发送修改请求
     resetRow() {
-      this.$refs["vipform"].validate((valid) => {
-        if (valid) {
-          // 验证通过
-          let coursesStartTime;
-          let coursesEndTime;
-          let startTime;
-          let endTime;
-          if (!this.resetForm.courseTime) {
-            this.resetForm.courseTime = [];
-            // coursesStartTime = null;
-            // coursesEndTime = null;
-          }
-          if (!this.resetForm.activeTime) {
-            this.resetForm.activeTime = [];
-            // startTime = null;
-            // endTime = null;
-          }
-          let id = this.activeId;
-          coursesStartTime = this.resetForm.courseTime[0] || null;
-          coursesEndTime = this.resetForm.courseTime[1] || null;
-          startTime = this.resetForm.activeTime[0] || null;
-          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 || this.attribute1 < 0 ) { // 勇哥要求将折扣设置大于100%
-              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.resetForm.stauts.join(",");
-          let onlineSalarySettlement;
-          let offlineSalarySettlement;
-          if (this.online) {
-            // 勾选线上
-
-            // 判断勾选的是折扣还是现金
-            if (this.onlineSalary == "RATIO_DISCOUNT") {
-              if (this.onlineprice < 0 || this.onlineprice > 100) {
-                this.$message.error("折扣比必须大于0且小于100");
-                return;
+      this.$refs.form.validate((isok) => {
+        if (isok) {
+          this.$refs["vipform"].validate((valid) => {
+            if (valid) {
+              // 验证通过
+              let coursesStartTime;
+              let coursesEndTime;
+              let startTime;
+              let endTime;
+              if (!this.resetForm.courseTime) {
+                this.resetForm.courseTime = [];
+                // coursesStartTime = null;
+                // coursesEndTime = null;
               }
-            } else if (this.onlineSalary == "TEACHER_DEFAULT") {
-              this.onlineprice = 0;
-            }
-            onlineSalarySettlement = {
-              salarySettlementType: this.onlineSalary,
-              settlementValue: this.onlineprice,
-            };
-          } else {
-            onlineSalarySettlement = null;
-          }
-          if (this.unonline) {
-            // 勾选线下
-            if (this.unonlineSalary == "RATIO_DISCOUNT") {
-              if (this.unonlineprice < 0 || this.unonlineprice > 100) {
-                this.$message.error("折扣比必须大于0且小于100");
+              if (!this.resetForm.activeTime) {
+                this.resetForm.activeTime = [];
+                // startTime = null;
+                // endTime = null;
+              }
+              let id = this.activeId;
+              coursesStartTime = this.resetForm.courseTime[0] || null;
+              coursesEndTime = this.resetForm.courseTime[1] || null;
+              startTime = this.resetForm.activeTime[0] || null;
+              endTime = this.resetForm.activeTime[1] || null;
+              let organId = this.resetForm.organ.join(",");
+              let type = this.activeType;
+              if (!type) {
+                this.$message.error("请选择活动类型");
                 return;
               }
-            } else if (this.unonlineSalary == "TEACHER_DEFAULT") {
-              this.unonlineprice = 0;
-            }
-            offlineSalarySettlement = {
-              salarySettlementType: this.unonlineSalary,
-              settlementValue: this.unonlineprice,
-            };
-          } else {
-            offlineSalarySettlement = null;
-          }
-          let salaryReadonlyFlag = this.salaryReadonlyFlag * 1;
-          let paymentReadonlyFlag = this.paymentReadonlyFlag * 1;
-          // let giveClassPaySalaryFlag = this.giveClassPaySalaryFlag * 1;
-          let vipGroupSalarySettlement = {
-            onlineSalarySettlement,
-            offlineSalarySettlement,
-          };
+              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.resetForm.stauts.join(",");
+              let onlineSalarySettlement;
+              let offlineSalarySettlement;
+              if (this.online) {
+                // 勾选线上
 
-          // 发请求创建活动
-          resetVipActive({
-            paymentReadonlyFlag,
-            id,
-            coursesStartTime,
-            coursesEndTime,
-            startTime,
-            endTime,
-            name: this.resetForm.name,
-            description: this.resetForm.desc,
-            organId,
-            type,
-            vipGroupCategoryIdList,
-            vipGroupSalarySettlement,
-            salaryReadonlyFlag,
-            giveClassPaySalaryFlag: 1,
-            attribute1: this.attribute1,
-            attribute2: this.attribute2,
-            attribute3: this.attribute3,
-            onlineClassJoinGradientRewards:
-              this.onlineClassJoinGradientRewards * 1,
-            offlineClassJoinGradientRewards:
-              this.offlineClassJoinGradientRewards * 1,
-          }).then((res) => {
-            if (res.code == 200) {
-              this.$message.success("恭喜你,活动修改成功");
-              this.dialogVisible = false;
-              this.getList();
+                // 判断勾选的是折扣还是现金
+                if (this.onlineSalary == "RATIO_DISCOUNT") {
+                  if (this.onlineprice < 0 || this.onlineprice > 100) {
+                    this.$message.error("折扣比必须大于0且小于100");
+                    return;
+                  }
+                } else if (this.onlineSalary == "TEACHER_DEFAULT") {
+                  this.onlineprice = 0;
+                }
+                onlineSalarySettlement = {
+                  salarySettlementType: this.onlineSalary,
+                  settlementValue: this.onlineprice,
+                };
+              } else {
+                onlineSalarySettlement = null;
+              }
+              if (this.unonline) {
+                // 勾选线下
+                if (this.unonlineSalary == "RATIO_DISCOUNT") {
+                  if (this.unonlineprice < 0 || this.unonlineprice > 100) {
+                    this.$message.error("折扣比必须大于0且小于100");
+                    return;
+                  }
+                } else if (this.unonlineSalary == "TEACHER_DEFAULT") {
+                  this.unonlineprice = 0;
+                }
+                offlineSalarySettlement = {
+                  salarySettlementType: this.unonlineSalary,
+                  settlementValue: this.unonlineprice,
+                };
+              } else {
+                offlineSalarySettlement = null;
+              }
+              let salaryReadonlyFlag = this.salaryReadonlyFlag * 1;
+              let paymentReadonlyFlag = this.paymentReadonlyFlag * 1;
+              // let giveClassPaySalaryFlag = this.giveClassPaySalaryFlag * 1;
+              let vipGroupSalarySettlement = {
+                onlineSalarySettlement,
+                offlineSalarySettlement,
+              };
+
+              // 发请求创建活动
+              resetVipActive({
+                paymentReadonlyFlag,
+                id,
+                coursesStartTime,
+                coursesEndTime,
+                startTime,
+                endTime,
+                name: this.resetForm.name,
+                description: this.resetForm.desc,
+                organId,
+                type,
+                vipGroupCategoryIdList,
+                vipGroupSalarySettlement,
+                salaryReadonlyFlag,
+                giveClassPaySalaryFlag: 1,
+                attribute1: this.attribute1,
+                attribute2: this.attribute2,
+                minCourseNum: this.courseNumForm.minCourseNum,
+                maxCourseNum: this.courseNumForm.maxCourseNum,
+                onlineClassJoinGradientRewards:
+                  this.onlineClassJoinGradientRewards * 1,
+                offlineClassJoinGradientRewards:
+                  this.offlineClassJoinGradientRewards * 1,
+              }).then((res) => {
+                if (res.code == 200) {
+                  this.$message.success("恭喜你,活动修改成功");
+                  this.dialogVisible = false;
+                  this.getList();
+                }
+              });
+            } else {
+              this.$message.error("请填写必要参数");
             }
           });
-        } else {
-          this.$message.error("请填写必要参数");
         }
       });
     },
@@ -1026,6 +1078,43 @@ export default {
       this.$refs["vipform"].resetFields();
       this.dialogVisible = false;
     },
+    resetForms() {
+      this.$refs.form.resetFields();
+    },
+    handleMinChange() {
+      this.$refs.form.validateField("maxCourseNum");
+    },
+    handleMaxChange() {
+      this.$refs.form.validateField("minCourseNum");
+    },
+    validateCom(rule, value, callback) {
+      const one = Number(value);
+      if (Number.isInteger(one)) {
+        if (one < MIN_NUMBER) {
+          return callback(new Error("输入值必须大于0"));
+        } else if (one > MAX_NUMBER) {
+          return callback(new Error("输入值必须小于999"));
+        }
+        return callback();
+      }
+      return callback(new Error("输入值必须为正整数"));
+    },
+    validateMin(rule, value, callback) {
+      const one = Number(value);
+      const max = Number(this.courseNumForm.maxCourseNum);
+      if (!max || one <= max) {
+        return callback();
+      }
+      return callback(new Error("输入值不得大于最大课时数"));
+    },
+    validateMax(rule, value, callback) {
+      const one = Number(value);
+      const min = Number(this.courseNumForm.minCourseNum);
+      if (!min || one >= min) {
+        return callback();
+      }
+      return callback(new Error("输入值不得小于最小课时数"));
+    },
   },
 };
 </script>

+ 481 - 310
src/views/categroyManager/vipNewActive.vue

@@ -2,162 +2,196 @@
   <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"
-               label-width="120px"
-               :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"
+        label-width="120px"
+        :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">
-          <select-all v-model.trim="vipform.organ"
-           style="width:400px"
-                     multiple
-                     filterable
-                     @visible-change="$forceUpdate()"
-                     @change="onOrganChange"
-                     clearable>
-            <el-option v-for="(item,index) in selects.branchs"
-                       :key="index"
-                       :label="item.name"
-                       :value="item.id"></el-option>
+        <el-form-item label="适用分部" prop="organ">
+          <select-all
+            v-model.trim="vipform.organ"
+            style="width: 400px"
+            multiple
+            filterable
+            @visible-change="$forceUpdate()"
+            @change="onOrganChange"
+            clearable
+          >
+            <el-option
+              v-for="(item, index) in selects.branchs"
+              :key="index"
+              :label="item.name"
+              :value="item.id"
+            ></el-option>
           </select-all>
           <!-- <el-button @click="onCheckAllBranch">适用所有分部</el-button> -->
         </el-form-item>
-        <el-form-item label="课程形式"
-                      prop="stauts">
-          <select-all v-model.trim="vipform.stauts"
-                       style="width:400px"
-                     @visible-change="$forceUpdate()"
-                     clearable
-                     multiple>
-            <el-option v-for="item in selects.vipGroupCategory"
-                       :key="item.id"
-                       :value="item.id"
-                       :label="item.name"></el-option>
+        <el-form-item label="课程形式" prop="stauts">
+          <select-all
+            v-model.trim="vipform.stauts"
+            style="width: 400px"
+            @visible-change="$forceUpdate()"
+            clearable
+            multiple
+          >
+            <el-option
+              v-for="item in selects.vipGroupCategory"
+              :key="item.id"
+              :value="item.id"
+              :label="item.name"
+            ></el-option>
           </select-all>
         </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="开始日期"
-                          :picker-options="{
-                            firstDayOfWeek:1
-                          }"
-                          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="开始日期"
+            :picker-options="{
+              firstDayOfWeek: 1,
+            }"
+            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="开始日期"
-                          :picker-options="{
-                            firstDayOfWeek:1
-                          }"
-                          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="开始日期"
+            :picker-options="{
+              firstDayOfWeek: 1,
+            }"
+            end-placeholder="结束日期"
+          ></el-date-picker>
         </el-form-item>
       </el-form>
       <el-alert
         title="活动适用范围&结算标准:"
         type="info"
         :closable="false"
-        class="alert">
+        class="alert"
+      >
       </el-alert>
-      <div class="activeRange" style="padding-left: 120px;">
+      <div class="activeRange" style="padding-left: 120px">
         <!-- <div class="left">
           <p>活动适用范围&结算标准:</p>
         </div> -->
         <div class="right">
           <div class="chioseWrap">
-            <el-checkbox label="线上课"
-                         v-model.trim="online"></el-checkbox>
-            <el-select v-model.trim="onlineSalary"
-            disabled
-                       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"
+              disabled
+              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>
+            <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
-                       disabled
-                       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
+              disabled
+              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>
+            <div
+              style="width: 200px"
+              v-if="unonlineSalary == 'TEACHER_DEFAULT'"
+            ></div>
             <!-- <el-checkbox label="是否参加梯度"
                          style="margin-left:20px;"
                          v-model.trim="offlineClassJoinGradientRewards"></el-checkbox> -->
@@ -173,9 +207,10 @@
       <el-alert
         title="活动类型:"
         type="info"
-        style="margin-bottom: 15px;"
+        style="margin-bottom: 15px"
         :closable="false"
-        class="alert">
+        class="alert"
+      >
       </el-alert>
       <div class="activeType">
         <!-- <div class="left">
@@ -183,48 +218,105 @@
         </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="
+                () => {
+                  this.$refs['form'].resetFields();
+                  activeType = 'BASE_ACTIVITY';
+                  courseNumForm = {
+                    minCourseNum: null,
+                    maxCourseNum: null,
+                  };
+                }
+              "
+            >
+              基础活动
+            </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>
-            <el-input v-if="activeType=='DISCOUNT'"
-                      v-model.number="attribute3"
-                      type="number"
-                      style="margin-left: 10px;width:200px!important"
-                      placeholder="请输入课时数">
-            </el-input>
+            <el-form
+              :model="courseNumForm"
+              :inline="true"
+              ref="form"
+              v-show="activeType == 'DISCOUNT'"
+              :rules="activeType == 'DISCOUNT' ? courseNumrules : {}"
+            >
+              <el-form-item prop="minCourseNum">
+                <el-input
+                  @change="handleMinChange"
+                  v-model.number="courseNumForm.minCourseNum"
+                  type="number"
+                  style="margin-left: 10px; width: 120px !important"
+                  placeholder="最小课时数"
+                >
+                </el-input>
+              </el-form-item>
+              <el-form-item prop="maxCourseNum">
+                <el-input
+                  @change="handleMaxChange"
+                  v-model.number="courseNumForm.maxCourseNum"
+                  type="number"
+                  style="margin-left: 10px; width: 120px !important"
+                  placeholder="最大课时数"
+                >
+                </el-input>
+              </el-form-item>
+            </el-form>
           </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="
+                () => {
+                  this.$refs['form'].resetFields();
+                  activeType = 'GIVE_CLASS';
+                      courseNumForm = {
+                    minCourseNum: null,
+                    maxCourseNum: null,
+                  };
+                }
+              "
+            >
+              赠送课时
+            </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">
+            <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
@@ -236,7 +328,10 @@
         </div>
       </div>
     </div>
-    <div class="btnWrap" style="justify-content:flex-start; padding-left: 120px">
+    <div
+      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>
       <!-- <div class="okBtn"
@@ -247,24 +342,31 @@
 <script>
 import { vipGroupCategory, addVipActive } from "@/api/vipSeting";
 import { getEmployeeOrgan } from "@/api/buildTeam";
-import cleanDeep from 'clean-deep';
+import cleanDeep from "clean-deep";
+const MIN_NUMBER = 1;
+const MAX_NUMBER = 999;
 export default {
   name: "vipNewActive",
-  data () {
+  data() {
     return {
-      pageType: '',
+      pageType: "",
       labelPosition: "right",
       vipform: {
         name: "",
         desc: "",
         activeTime: [],
         courseTime: [],
-        organ: []
+        organ: [],
       },
       vipformRules: {
         name: [
           { required: true, message: "请输入活动名称", trigger: "blur" },
-          { min: 1, max: 25, message: "长度在 1 到 25 个字符", trigger: "blur" }
+          {
+            min: 1,
+            max: 25,
+            message: "长度在 1 到 25 个字符",
+            trigger: "blur",
+          },
         ],
         desc: [
           { required: false, message: "请输入文字描述", trigger: "blur" },
@@ -272,17 +374,19 @@ export default {
             min: 1,
             max: 200,
             message: "长度在 1 到 200 个字符",
-            trigger: "blur"
-          }
+            trigger: "blur",
+          },
         ],
         activeTime: [
-          { required: false, message: "请选择活动时间", trigger: "blur" }
+          { required: false, message: "请选择活动时间", trigger: "blur" },
         ],
         courseTime: [
-          { required: false, message: "请选择课程时间", trigger: "blur" }
+          { required: false, message: "请选择课程时间", trigger: "blur" },
         ],
         organ: [{ required: true, message: "请选择适用分部", trigger: "blur" }],
-        stauts: [{ required: true, message: "请选择活动形式", trigger: "blur" }]
+        stauts: [
+          { required: true, message: "请选择活动形式", trigger: "blur" },
+        ],
       },
       courseStatusList: [], // 获取所有课程形式
       activeType: "",
@@ -296,15 +400,30 @@ export default {
       paymentReadonlyFlag: false,
       attribute1: "",
       attribute2: "",
-      attribute3: "",
+      courseNumForm: {
+        minCourseNum: "",
+        maxCourseNum: "",
+      },
       giveClassPaySalaryFlag: true,
       organList: [],
       onlineClassJoinGradientRewards: false,
-      offlineClassJoinGradientRewards: false
+      offlineClassJoinGradientRewards: false,
+      courseNumrules: {
+        minCourseNum: [
+          { required: true, message: "请输入最小课时数", trigger: "blur" },
+          { validator: this.validateCom, trigger: "blur" },
+          { validator: this.validateMin, trigger: "blur" },
+        ],
+        maxCourseNum: [
+          { required: true, message: "请输入最大课时数", trigger: "blur" },
+          { validator: this.validateCom, trigger: "blur" },
+          { validator: this.validateMax, trigger: "blur" },
+        ],
+      },
     };
   },
-  activated () {
-    this.onReSet()
+  activated() {
+    this.onReSet();
     // if (this.$route.query.rules) {
     //   this.rules = this.$route.query.rules;
     // }
@@ -312,11 +431,11 @@ export default {
     //   this.searchForm = this.$route.query.searchForm;
     // }
 
-    this.pageType = this.$route.query.type
+    this.pageType = this.$route.query.type;
     this.$refs.vipform.resetFields();
   },
 
-  async mounted () {
+  async mounted() {
     // 首先获取课程形式
     // vipGroupCategory().then(res => {
     //   if (res.code == 200) {
@@ -330,10 +449,10 @@ export default {
     //   }
     // });
     // 获取类型
-    await this.$store.dispatch('setVipGroupCategory')
+    await this.$store.dispatch("setVipGroupCategory");
     // 获取分部
-    await this.$store.dispatch('setBranchs')
-    this.onReSet()
+    await this.$store.dispatch("setBranchs");
+    this.onReSet();
     // if (this.$route.query.rules) {
     //   this.rules = this.$route.query.rules;
     // }
@@ -341,165 +460,217 @@ export default {
     //   this.searchForm = this.$route.query.searchForm;
     // }
 
-    this.pageType = this.$route.query.type
+    this.pageType = this.$route.query.type;
     this.$refs.vipform.resetFields();
   },
 
   methods: {
-    changeStauts (val) {
-      console.log(val)
+    resetForm() {
+      this.$refs.form.resetFields();
     },
-    submitFrom () {
-      this.$refs["vipform"].validate(valid => {
-        if (valid) {
-          // 验证通过
-          let coursesStartTime = null,
-              coursesEndTime = null,
-              startTime = null,
-              endTime = null
-          if(this.vipform.courseTime && this.vipform.courseTime.length > 0) {
-            coursesStartTime = this.vipform.courseTime[0];
-            coursesEndTime = this.vipform.courseTime[1];
-          }
-          if(this.vipform.activeTime && this.vipform.activeTime.length > 0) {
-            startTime = this.vipform.activeTime[0];
-            endTime = this.vipform.activeTime[1];
-          }
-          let organId = this.vipform.organ.join(",");
-          let type = this.activeType;
-          if(!type) {
-            this.$message.error('请选择活动类型')
-            return
-          }
-          if (type == "DISCOUNT") {
-            if (!this.attribute1 || this.attribute1 < 0 ) { // 勇哥要求将折扣设置大于100%
-              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(",");
-          let onlineSalarySettlement;
-          let offlineSalarySettlement;
-          if (this.online) {
-            // 勾选线上
-            if (this.onlineSalary == 'RATIO_DISCOUNT') {
-              if (this.onlineprice < 0 || this.onlineprice > 100) {
-                this.$message.error('折扣比必须大于0且小于100')
-                return
+    handleMinChange() {
+      this.$refs.form.validateField("maxCourseNum");
+    },
+    handleMaxChange() {
+      this.$refs.form.validateField("minCourseNum");
+    },
+    validateCom(rule, value, callback) {
+      const one = Number(value);
+      if (Number.isInteger(one)) {
+        if (one < MIN_NUMBER) {
+          return callback(new Error("输入值必须大于0"));
+        } else if (one > MAX_NUMBER) {
+          return callback(new Error("输入值必须小于999"));
+        }
+        return callback();
+      }
+      return callback(new Error("输入值必须为正整数"));
+    },
+    validateMin(rule, value, callback) {
+      const one = Number(value);
+      const max = Number(this.courseNumForm.maxCourseNum);
+      if (!max || one <= max) {
+        return callback();
+      }
+      return callback(new Error("输入值不得大于最大课时数"));
+    },
+    validateMax(rule, value, callback) {
+      const one = Number(value);
+      const min = Number(this.courseNumForm.minCourseNum);
+      if (!min || one >= min) {
+        return callback();
+      }
+      return callback(new Error("输入值不得小于最小课时数"));
+    },
+    changeStauts(val) {
+      console.log(val);
+    },
+    submitFrom() {
+      this.$refs.form.validate((isok) => {
+        if (isok) {
+          this.$refs["vipform"].validate((valid) => {
+            if (valid) {
+              // 验证通过
+              let coursesStartTime = null,
+                coursesEndTime = null,
+                startTime = null,
+                endTime = null;
+              if (
+                this.vipform.courseTime &&
+                this.vipform.courseTime.length > 0
+              ) {
+                coursesStartTime = this.vipform.courseTime[0];
+                coursesEndTime = this.vipform.courseTime[1];
               }
-            }else if(this.onlineSalary == 'TEACHER_DEFAULT'){
-              this.onlineprice = 0;
-            }
-            onlineSalarySettlement = {
-              salarySettlementType: this.onlineSalary,
-              settlementValue: this.onlineprice
-            };
-          } else {
-            onlineSalarySettlement = null;
-          }
-          if (this.unonline) {
-            // 勾选线下
-            if (this.unonlineSalary == 'RATIO_DISCOUNT') {
-              if (this.unonlineprice < 0 || this.unonlineprice > 100) {
-                this.$message.error('折扣比必须大于0且小于100')
-                return
+              if (
+                this.vipform.activeTime &&
+                this.vipform.activeTime.length > 0
+              ) {
+                startTime = this.vipform.activeTime[0];
+                endTime = this.vipform.activeTime[1];
               }
-            }else if(this.unonlineSalary == 'TEACHER_DEFAULT'){
-              this.unonlineprice = 0;
-            }
-            offlineSalarySettlement = {
-              salarySettlementType: this.unonlineSalary,
-              settlementValue: this.unonlineprice
-            };
-          } else {
-            offlineSalarySettlement = null;
-          }
-          let salaryReadonlyFlag = this.salaryReadonlyFlag * 1;
-          let paymentReadonlyFlag = this.paymentReadonlyFlag * 1;
-          // let giveClassPaySalaryFlag = this.giveClassPaySalaryFlag * 1;
-          let vipGroupSalarySettlement = {
-            onlineSalarySettlement,
-            offlineSalarySettlement
-          };
-          // 发请求创建活动
-          addVipActive(cleanDeep({
-            coursesStartTime,
-            coursesEndTime,
-            startTime,
-            endTime,
-            name: this.vipform.name,
-            description: this.vipform.desc,
-            organId,
-            type,
-            vipGroupCategoryIdList,
-            vipGroupSalarySettlement,
-            salaryReadonlyFlag,
-            paymentReadonlyFlag,
-            giveClassPaySalaryFlag: 1,
-            attribute1: this.attribute1,
-            attribute2: this.attribute2,
-            attribute3: this.attribute3,
-            offlineClassJoinGradientRewards: this.offlineClassJoinGradientRewards * 1,
-            onlineClassJoinGradientRewards: this.onlineClassJoinGradientRewards * 1
-          })).then(res => {
-            if (res.code == 200) {
-              this.$message.success("恭喜你,活动创建成功");
-              this.onReSet();
-              this.$store.dispatch('delVisitedViews', this.$route)
-              this.$router.push({
-                path: "/vipActiveManager/vipActiveList"
+              let organId = this.vipform.organ.join(",");
+              let type = this.activeType;
+              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(",");
+              let onlineSalarySettlement;
+              let offlineSalarySettlement;
+              if (this.online) {
+                // 勾选线上
+                if (this.onlineSalary == "RATIO_DISCOUNT") {
+                  if (this.onlineprice < 0 || this.onlineprice > 100) {
+                    this.$message.error("折扣比必须大于0且小于100");
+                    return;
+                  }
+                } else if (this.onlineSalary == "TEACHER_DEFAULT") {
+                  this.onlineprice = 0;
+                }
+                onlineSalarySettlement = {
+                  salarySettlementType: this.onlineSalary,
+                  settlementValue: this.onlineprice,
+                };
+              } else {
+                onlineSalarySettlement = null;
+              }
+              if (this.unonline) {
+                // 勾选线下
+                if (this.unonlineSalary == "RATIO_DISCOUNT") {
+                  if (this.unonlineprice < 0 || this.unonlineprice > 100) {
+                    this.$message.error("折扣比必须大于0且小于100");
+                    return;
+                  }
+                } else if (this.unonlineSalary == "TEACHER_DEFAULT") {
+                  this.unonlineprice = 0;
+                }
+                offlineSalarySettlement = {
+                  salarySettlementType: this.unonlineSalary,
+                  settlementValue: this.unonlineprice,
+                };
+              } else {
+                offlineSalarySettlement = null;
+              }
+              let salaryReadonlyFlag = this.salaryReadonlyFlag * 1;
+              let paymentReadonlyFlag = this.paymentReadonlyFlag * 1;
+              // let giveClassPaySalaryFlag = this.giveClassPaySalaryFlag * 1;
+              let vipGroupSalarySettlement = {
+                onlineSalarySettlement,
+                offlineSalarySettlement,
+              };
+              // 发请求创建活动
+              addVipActive(
+                cleanDeep({
+                  coursesStartTime,
+                  coursesEndTime,
+                  startTime,
+                  endTime,
+                  name: this.vipform.name,
+                  description: this.vipform.desc,
+                  organId,
+                  type,
+                  vipGroupCategoryIdList,
+                  vipGroupSalarySettlement,
+                  salaryReadonlyFlag,
+                  paymentReadonlyFlag,
+                  giveClassPaySalaryFlag: 1,
+                  attribute1: this.attribute1,
+                  attribute2: this.attribute2,
+                  minCourseNum: this.courseNumForm.minCourseNum,
+                  maxCourseNum: this.courseNumForm.maxCourseNum,
+                  offlineClassJoinGradientRewards:
+                    this.offlineClassJoinGradientRewards * 1,
+                  onlineClassJoinGradientRewards:
+                    this.onlineClassJoinGradientRewards * 1,
+                })
+              ).then((res) => {
+                if (res.code == 200) {
+                  this.$message.success("恭喜你,活动创建成功");
+                  this.onReSet();
+                  this.$store.dispatch("delVisitedViews", this.$route);
+                  this.$router.push({
+                    path: "/vipActiveManager/vipActiveList",
+                  });
+                }
+              });
+            } else {
+              this.$nextTick(() => {
+                let isError = document.getElementsByClassName("is-error");
+                isError[0].scrollIntoView({
+                  block: "center",
+                  behavior: "smooth",
+                });
               });
+              // this.$message.error("请填写必要参数");
             }
           });
-        } else {
-          this.$nextTick(() => {
-            let isError = document.getElementsByClassName('is-error')
-            isError[0].scrollIntoView({
-              block: 'center',
-              behavior: 'smooth',
-            })
-          })
-          // this.$message.error("请填写必要参数");
         }
       });
 
       // 线上线下课 勾选就传不勾选就不传
       // addVipActive().then(res => { })
     },
-    onOrganChange () {
-      this.$forceUpdate()
+    onOrganChange() {
+      this.$forceUpdate();
     },
-    onCheckAllBranch () {
+    onCheckAllBranch() {
       // 选择所有分部
-      let vipform = this.vipform
+      let vipform = this.vipform;
       vipform.organ = [];
-      this.selects.branchs.forEach(item => {
+      this.selects.branchs.forEach((item) => {
         vipform.organ.push(item.id);
       });
-      this.$forceUpdate()
+      this.$forceUpdate();
     },
-    onCancel () {
-      this.$store.dispatch('delVisitedViews', this.$route)
+    onCancel() {
+      this.$store.dispatch("delVisitedViews", this.$route);
       this.$router.push({
         path: "/vipActiveManager/vipActiveList",
-        query: { rules: this.rules, searchForm: this.searchForm }
+        query: { rules: this.rules, searchForm: this.searchForm },
       });
     },
-    onReSet () {
+    onReSet() {
       this.vipform = {
         name: "",
         desc: "",
         activeTime: [],
-        courseTime: []
+        courseTime: [],
       };
       this.activeType = "";
       this.online = true;
@@ -511,13 +682,13 @@ export default {
       this.unonlineprice = "";
       this.onlineClassJoinGradientRewards = false;
       this.offlineClassJoinGradientRewards = false;
-      this.attribute1 = ''
-      this.attribute2 = ''
-      this.attribute3 = ''
+      this.attribute1 = "";
+      this.attribute2 = "";
+      this.courseNumForm.maxCourseNum = "";
+      this.courseNumForm.minCourseNum = "";
       this.$refs.vipform.resetFields();
-
-    }
-  }
+    },
+  },
 };
 </script>
 <style lang="scss" scoped>

+ 1 - 1
src/views/main/baseinfo/business.vue

@@ -205,7 +205,7 @@ export default {
         console.log(error);
       }
       this.loading = false;
-      this.dataInfo = data;
+      // this.dataInfo = data;
       this.$emit("resetDate", data);
     },
   },

+ 1 - 1
src/views/main/baseinfo/management.vue

@@ -250,7 +250,7 @@ export default {
       } catch (error) {
         console.log(error);
       }
-      this.dataInfo = data;
+      console.log(data)
       this.loading = false;
       this.$emit("resetDate", data);
     },

+ 3 - 2
src/views/main/constant.js

@@ -3,7 +3,7 @@ import dayjs from 'dayjs'
 export const descs = {
   STUDENT_REGISTRATION_NUM: '截止到昨日,系统注册学员总数',
   CHARGE_STUDENT_CHANGE_RATE: '截止到昨日,注册学员现金付费率(有订单交易成功的都算,导入的也算)',
-  ACTIVATION_RATE: '截止到昨日,筹备中或进行中乐团在读学员和有VIP或网管课学员激活率',
+  ACTIVATION_RATE: '截止到昨日,筹备中或进行中乐团在读学员和有VIP或网管课学员激活率(VIP网管课最后一节课在6个月前则不纳入统计)',
   SCHOOL: '截止到昨日,存在【进行中】乐团的【合作单位】总数',
   PROGRESS_MUSIC_GROUP_NUM: '截止到昨日,【进行中】乐团总数',
   TEACHER_NUM: '截止到昨日,非冻结,且离职时间在昨日之后的老师总数',
@@ -234,7 +234,8 @@ export const errorType = {
     permission: '/serverDetail',
     query: {
       searchType: 'TEACHER_SERVE_ERROR',
-      unDone:1
+      unDone:1,
+      reminded: 0
     },
   }
 }

+ 7 - 1
src/views/reaplceMusicPlayer/index.vue

@@ -124,7 +124,7 @@
               <div>{{ scope.row.openPay ? "是" : "否" }}</div>
             </template>
           </el-table-column>
-          <el-table-column align="center" prop="studentId" label="操作">
+          <el-table-column align="center" width="180px" label="操作">
             <template slot-scope="scope">
               <div>
                 <el-button type="text" @click="lookDetail(scope.row)" v-if="permission('replacementInstrumentActivity/queryPage')"
@@ -149,6 +149,10 @@
                   "
                   >开启缴费</el-button
                 >
+                <el-button
+                  type="text"
+                  @click="onCreateQRCode(scope.row, '缴费链接')"
+                  v-if="scope.row.openPay">缴费链接</el-button>
               </div>
             </template>
           </el-table-column>
@@ -347,6 +351,8 @@ export default {
           str =
             vaildTeachingUrl() +
             `/#/questionStatistics?o=${row.organId}&c=${row.cooperationOrganId}`;
+        } else if(name == '缴费链接') {
+          str = vaildStudentUrl() + `/#/questionGoodsSale?` + encodeURIComponent(encode(`cid=${row.cooperationOrganId}`));
         }
         // vaildTeachingUrl
         // this.qrcode.makeCode(

+ 3 - 3
src/views/resetTeaming/modals/subject-preview.vue

@@ -594,9 +594,9 @@ export default {
                     tempCourse.forEach(item => {
                         m += parseFloat(item.courseCurrentPrice)
                         // 不可选的课程才会减免课程费用
-                        if (!item.isStudentOptional) {
-                            tempGroupRemissionCourseFee += parseFloat(item.courseCurrentPrice)
-                        }
+                        // if (!item.isStudentOptional) {
+                        //     tempGroupRemissionCourseFee += parseFloat(item.courseCurrentPrice)
+                        // }
                     });
                     marketPrice += parseFloat(m)
                     buyList.unshift({

+ 3 - 2
src/views/serverDetail/index.vue

@@ -59,8 +59,8 @@
             clearable
             placeholder="是否提醒"
           >
-            <el-option label="是" :value="1"></el-option>
-            <el-option label="否" :value="0"></el-option>
+            <el-option label="是" value="1"></el-option>
+            <el-option label="否" value="0"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item prop="operatorId">
@@ -289,6 +289,7 @@ export default {
       if (this.$route.query.searchType) {
         this.searchForm.organId = this.$route.query.organId * 1 || "";
         this.searchForm.unDone = this.$route.query.unDone+'' || ""
+         this.searchForm.reminded = this.$route.query.reminded+'' || ""
         const dayjs = this.$helpers.dayjs;
         let nowDate = dayjs(new Date()).format("YYYY-MM-DD");
         this.orderDate = [

+ 1 - 3
src/views/studentManager/components/studentVip.vue

@@ -110,12 +110,11 @@
       />
 
       <el-dialog :title="dialogTitle" :visible.sync="dialogTableVisible">
-        <el-table :data="gridData">
+        <el-table :data="gridData" :header-cell-style="{ background: '#EDEEF0', color: '#444' }">
           <el-table-column
             prop="courseDate"
             label="时间"
             align="center"
-            width="150"
           >
             <template slot-scope="scope">{{
               scope.row.courseDate | dateForMinFormat
@@ -125,7 +124,6 @@
             prop="classGroupName"
             label="课程名称"
             align="center"
-            width="200"
           ></el-table-column>
           <el-table-column label="课程类型" align="center">
             <template slot-scope="scope">{{

+ 69 - 38
src/views/teacherManager/teacherOperation/components/salarySet.vue

@@ -179,9 +179,15 @@
           </el-table-column>
         </el-table>
 
-        <el-form style="margin-top: 20px;">
-          <el-form-item required label="生效日期">
-            <el-date-picker v-model.trim="startDate"
+        <el-form style="margin-top: 20px;" ref="salaryForm" :model="updateForm" :rules="rules">
+          <el-form-item label="是否结算课酬" label-width="120px" prop="isSettlementSalary" :rules="[{ required: true, message: '请选择是否结算课酬', trigger: 'change'}]">
+              <el-select v-model.trim="updateForm.isSettlementSalary" style="width: 220px !important;">
+                <el-option label="是" :value="1"></el-option>
+                <el-option label="否" :value="0"></el-option>
+              </el-select>
+          </el-form-item>
+          <el-form-item label="生效日期" label-width="120px" prop="startDate" :rules="[{ required: true, message: '请选择生效日期', trigger: 'change'}]">
+            <el-date-picker v-model.trim="updateForm.startDate"
                             type="date"
                             value-format="yyyy-MM-dd"
                             :picker-options="pickerOptions"
@@ -208,7 +214,9 @@ import {
   teacherSalaryList,
   teacherSalaryBatchUpset,
   teacherDefaultPracticeGroupSalary,
-  PracticeGroupSalaryUpdate
+  PracticeGroupSalaryUpdate,
+  teacherGet,
+  teacherUpdate
 } from "@/api/teacherManager";
 import { sysConfigList } from "@/api/generalSettings";
 import { findTeacherDefaultSalary } from "@/api/vipSeting";
@@ -320,7 +328,11 @@ export default {
       musicGroupTable: [],
       ruleList: [],
       vipList: [],
-      startDate: null,
+      updateForm: {
+        startDate: null,
+        isSettlementSalary: null,
+      },
+      rules: {},
       accompanyTable: [
         {
           assistantTeacherSalary: 30,
@@ -354,6 +366,13 @@ export default {
       if (this.$route.query.rules) {
         this.Frules = this.$route.query.rules;
       }
+      teacherGet({ teacherId: this.teacherId }).then((res) => {
+          if (res.code == 200) {
+            let result = res.data;
+            this.updateForm.isSettlementSalary = result.isSettlementSalary ? 1 : 0
+          }
+        });
+
       // 获取课程形态 设置vip课酬
       findTeacherDefaultSalary({ userId: this.teacherId }).then(res => {
         if (res.code == 200 && res.data.length > 0) {
@@ -558,51 +577,63 @@ export default {
           return;
         }
       });
-      // 判断输入的值是否正确
-      if (!this.startDate) {
-        this.$message.error("请填写生效日期");
-        return;
-      }
       if (!checkStatus) {
         return
       }
-      this.$confirm("您确定更改老师课酬", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      })
-        .then(() => {
-          let params = teamTable.concat(temps)
-          teacherSalaryBatchUpset({
-            teacherDefaultMusicGroupSalaries: params,
-            startDate: this.startDate
-          }).then(res => {
-            if (res.code == 200) {
-              // 判断输入的值是否正确
-              vipGroupSalarySet({
-                teacherDefaultVipGroupSalaries: this.vipTable,
-                startDate: this.startDate
+      this.$refs['salaryForm'].validate((valid) => {
+        if(valid) {
+          this.$confirm("您确定更改老师课酬", "提示", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          })
+            .then(async () => {
+              let params = teamTable.concat(temps)
+              let updateForm = this.updateForm
+              let res = await teacherUpdate({ id: this.teacherId, isSettlementSalary: updateForm.isSettlementSalary })
+              if(res.code != 200) {
+                this.$message.error(res.msg)
+                return
+              }
+              teacherSalaryBatchUpset({
+                teacherDefaultMusicGroupSalaries: params,
+                startDate: updateForm.startDate
               }).then(res => {
                 if (res.code == 200) {
-                  PracticeGroupSalaryUpdate({
-                    startDate: this.startDate,
-                    teacherDefaultPracticeGroupSalaries: this.accompanyTable
+                  // 判断输入的值是否正确
+                  vipGroupSalarySet({
+                    teacherDefaultVipGroupSalaries: this.vipTable,
+                    startDate: updateForm.startDate
                   }).then(res => {
                     if (res.code == 200) {
-                      this.$message.success("保存成功");
-                      this.$store.dispatch('delVisitedViews', this.$route)
-                      this.$router.push({
-                        path: "/teacherManager/teacherList",
-                        query: { rules: this.Frules, search: this.Fsearch }
+                      PracticeGroupSalaryUpdate({
+                        startDate: updateForm.startDate,
+                        teacherDefaultPracticeGroupSalaries: this.accompanyTable
+                      }).then(res => {
+                        if (res.code == 200) {
+                          this.$message.success("保存成功");
+                          this.$store.dispatch('delVisitedViews', this.$route)
+                          this.$router.push({
+                            path: "/teacherManager/teacherList",
+                            query: { rules: this.Frules, search: this.Fsearch }
+                          });
+                        }
                       });
                     }
                   });
                 }
               });
-            }
-          });
-        })
-        .catch(() => { });
+            })
+            .catch(() => { });
+        }
+      })
+      // 判断输入的值是否正确
+      // if (!this.startDate) {
+      //   this.$message.error("请填写生效日期");
+      //   return;
+      // }
+      
+      
     }
   }
 };

+ 1 - 1
src/views/teamBuild/modals/accessories.vue

@@ -89,7 +89,7 @@
           name: item.name,
           price:item.price,
           id: item.id,
-          subs: item.goodsList ? item.goodsList.map(sub => sub.name) : []
+          subs: item.childGoodsList ? item.childGoodsList.map(sub => sub.name) : []
         }))
         if (options.length) {
           this.type = 'group'

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

@@ -1041,7 +1041,7 @@ export default {
       let id = this.id;
       this.codeStatus = true;
       if (type == "payment") {
-        this.codeTitle = "学员报名接";
+        this.codeTitle = "学员报名接";
         this.qrCodeUrl = vaildStudentUrl() + "/#/login?musicGroupId=" + id;
       } else if (type == "detail") {
         let teamName = this.$route.query.name;

+ 1 - 1
src/views/teamDetail/teamCourseList.vue

@@ -234,7 +234,7 @@
           ></el-table-column>
           <el-table-column
             align="center"
-            width="150px"
+            width="170px"
             prop="musicGroupId"
             label="乐团/课程组编号"
           >

+ 0 - 1
src/views/teamDetail/teamList.vue

@@ -465,7 +465,6 @@ export default {
         chargeTypeId: this.topForm.payType || null,
         musicGroupName: this.topForm.teamName || null,
         musicGroupStatus: this.topForm.status || null,
-        musicGroupId: this.$route.query.search,
         searchType: this.$route.query.searchType,
       }).then((res) => {
         if (res.code == 200) {

+ 4 - 0
src/views/vipClass/vipDetail/components/fnanceInfo.vue

@@ -51,6 +51,10 @@
     <div class="tableWrap">
       <el-table :header-cell-style="{background:'#EDEEF0',color:'#444'}"
                 :data="tableList">
+        <el-table-column label="课程编号"
+                         align="center"
+                         prop="courseScheduleId">
+        </el-table-column>
         <el-table-column label="上课时间"
                          align="center"
                          prop="classDate">

+ 27 - 24
src/views/workBenchManager/payAppeal.vue

@@ -171,7 +171,7 @@
     </div>
     <el-dialog title="考勤申诉" :visible.sync="dialogVisible" width="500px">
       <div>
-        <el-form ref="visibleForm" :model="visibleForm" class="visibleForm">
+        <el-form ref="visibleForm" :model="visibleForm" label-width="100px" class="visibleForm">
           <el-form-item label="签到时间">
             {{ visibleForm.signInTime }}
           </el-form-item>
@@ -191,6 +191,10 @@
               </el-col>
             </el-row>
           </el-form-item>
+          <el-form-item label="申诉考勤状态">
+            <el-checkbox v-if="visibleForm.complaintsType == 'SIGN_IN' || visibleForm.complaintsType == 'ALL'" disabled :value="true">签到状态</el-checkbox>
+            <el-checkbox v-if="visibleForm.complaintsType == 'SIGN_OUT' || visibleForm.complaintsType == 'ALL'" disabled :value="true">签退状态</el-checkbox>
+          </el-form-item>
           <el-form-item
             label="申诉内容"
             :rules="[
@@ -200,7 +204,7 @@
           >
             <el-input
               type="textarea"
-              :rows="5"
+              :rows="4"
               :disabled="visibleForm.complaintsStatusEnum != '2'"
               v-model.trim="visibleForm.complaintsContent"
             ></el-input>
@@ -214,13 +218,13 @@
           >
             <el-input
               type="textarea"
-              :rows="5"
+              :rows="4"
               :disabled="visibleForm.complaintsStatusEnum != '2'"
               v-model.trim="visibleForm.disposeContent"
             ></el-input>
           </el-form-item>
           <!--  -->
-          <el-form-item
+          <!-- <el-form-item
             label="请选择需要补正的状态"
             v-if="visibleForm.complaintsStatusEnum == '2'"
           >
@@ -235,7 +239,7 @@
               :disabled="visibleForm.complaintsStatusEnum != '2'"
               >签退状态</el-checkbox
             >
-          </el-form-item>
+          </el-form-item> -->
         </el-form>
       </div>
       <div slot="footer" v-if="visibleForm.complaintsStatusEnum == '2'">
@@ -295,6 +299,7 @@ export default {
         teacherAttendanceId: null,
         reSignInStatus: null,
         reSignOutStatus: null,
+        complaintsType: null,
         url: null,
       },
     };
@@ -352,28 +357,25 @@ export default {
         this.$refs["visibleForm"].validate((flag) => {
           if (flag) {
             let obj = {};
-            if (
-              !this.visibleForm.reSignInStatus &&
-              !this.visibleForm.reSignOutStatus
-            ) {
-              this.$message.error("请修正签到状态或签退状态");
-              return;
-            }
-            let str = "是否将此课程的";
-            //visibleForm.reSignInStatus
-            if (this.visibleForm.reSignInStatus) {
-              obj.signInStatus = 1;
-              str += "【签到状态】";
-            }
-            if (this.visibleForm.reSignOutStatus) {
-              obj.signOutStatus = 1;
-              str += "【签退状态】";
-            }
-            str += "修正为正常";
+            // if (
+            //   !this.visibleForm.reSignInStatus &&
+            //   !this.visibleForm.reSignOutStatus
+            // ) {
+            //   this.$message.error("请修正签到状态或签退状态");
+            //   return;
+            // }
+            // let str = "是否将此课程的";
+            // if (this.visibleForm.complaintsType == 'SIGN_IN' || this.visibleForm.complaintsType == 'ALL') {
+            //   str += "【签到状态】";
+            // }
+            // if (this.visibleForm.complaintsType == 'SIGN_OUT' || this.visibleForm.complaintsType == 'ALL') {
+            //   str += "【签退状态】";
+            // }
+            // str += "修正为正常";
             obj.content = this.visibleForm.disposeContent;
             obj.teacherAttendanceId = this.visibleForm.teacherAttendanceId;
 
-            this.$confirm(str, "是否", {
+            this.$confirm('您是否同意该申诉?', "是否", {
               confirmButtonText: "确定",
               cancelButtonText: "取消",
               type: "warning",
@@ -430,6 +432,7 @@ export default {
         // reSignOutStatus: row.signOutStatus == 1 ? true : false,
         reSignInStatus: null,
         reSignOutStatus: null,
+        complaintsType: row.complaintsType,
         srcList: row.url.split(","),
       };
       this.dialogVisible = true;

+ 2 - 3
vue.config.js

@@ -66,9 +66,8 @@ module.exports = {
       // let target = 'http://dev.dayaedu.com'
       // 'http://dev.dayaedu.com'
       '/api-auth': {
-        target: target,
-        // target: 'http://47.114.176.40:8000',
-        // target : 'https://test.dayaedu.com',
+        // target: 'https://test.dayaedu.com',
+        target : target,
         changeOrigin: true,
         pathRewrite: {
           '^api-auth': ''

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików