lex-xin 5 vuotta sitten
vanhempi
commit
1bf327bf8e

+ 5 - 0
src/views/main/index.vue

@@ -19,6 +19,11 @@
               <p class="msg" v-else>--</p>
             </div>
             <div class="info">
+              <p class="sub">筹备中</p>
+              <p class='msg' v-if="dataInfo.musicDatas">{{ dataInfo.musicDatas.prepare_num_ }}</p>
+              <p class="msg" v-else>--</p>
+            </div>
+            <div class="info">
               <p class="sub">进行中</p>
               <p class='msg' v-if="dataInfo.musicDatas">{{ dataInfo.musicDatas.progress_num_ }}</p>
               <p class="msg" v-else>--</p>

+ 45 - 7
src/views/teamDetail/components/studentList.vue

@@ -434,6 +434,7 @@
               <el-select placeholder="选择乐器"
                          filterable
                          clearable
+                         @change="onInstrumentChange"
                          v-model="maskForm.musicGoodsIdList">
                 <el-option v-for="(item, index) in INSTRUMENTLIST"
                            :key="index"
@@ -445,10 +446,11 @@
           <el-col :span="1">&nbsp;</el-col>
           <el-col :span="11">
             <el-form-item>
-              <el-input v-model="maskForm.musicPrice"
+              <el-input type="number" @mousewheel.native.prevent :disabled="kitStatus" v-model="maskForm.musicPrice"
                         placeholder="输入金额">
                 <el-select v-model="maskForm.kitGroupPurchaseType"
                            style="width: 80px !important;"
+                           @change="onKitGroupChnage"
                            slot="prepend">
                   <el-option label="免费"
                              value="FREE"></el-option>
@@ -742,7 +744,8 @@ export default {
         studentName: '',
         payMoney: '',
         payMonth: []
-      }
+      },
+      kitStatus: false, // 乐器提供方式
     }
   },
   components: {
@@ -824,6 +827,33 @@ export default {
         }
       })
     },
+    onInstrumentChange(value) { // 乐器切换时
+      let tempkitType = this.maskForm.kitGroupPurchaseType
+      if(tempkitType == 'GROUP') {
+        this.INSTRUMENTLIST.forEach(item => {
+          if(item.value == value) {
+            this.maskForm.musicPrice = item.marketPrice
+          }
+        })
+      }
+    },
+    onKitGroupChnage(value) { // 乐器提供方式
+      this.kitStatus = false
+      if(value == 'FREE') {
+        this.kitStatus = true
+        this.maskForm.musicPrice = 0
+      } else if(value == 'GROUP') {
+        if(this.INSTRUMENTLIST.length > 0 && this.maskForm.musicGoodsIdList) {
+          this.INSTRUMENTLIST.forEach(item => {
+            if(item.value == this.maskForm.musicGoodsIdList) {
+              this.maskForm.musicPrice = item.marketPrice
+            }
+          })
+        }
+      } else if(value == 'LEASE') {
+        this.maskForm.musicPrice = null
+      }
+    },
     onMusicGroupExport () {
       let url = '/api-web/export/musicGroupStudent'
       let data = {
@@ -968,10 +998,6 @@ export default {
         mixClass: '',
         highClass: '',
         snapClass: [], --> */
-
-
-
-
           let maskForm = this.maskForm
           if (!maskForm.signClass && !maskForm.mixClass && !maskForm.highClass) {
             if (!maskForm.snapClass || !(maskForm.snapClass && maskForm.snapClass.length >= 1)) {
@@ -979,6 +1005,17 @@ export default {
               return;
             }
           }
+
+          if(maskForm.musicGoodsIdList && (maskForm.musicPrice === '' || maskForm.musicPrice === null)) {
+            this.$message.error('请输入乐器金额')
+            return
+          }
+
+          if(maskForm.instrGoodsIdList && maskForm.instrGoodsIdList.length > 0 && (maskForm.instrPrice === '' || maskForm.instrPrice === null)) {
+            this.$message.error('请输入辅件金额')
+            return
+          }
+
           let snapClassIds;
 
           maskForm.snapClass ? snapClassIds = maskForm.snapClass.join(',') : snapClassIds = null
@@ -1059,7 +1096,8 @@ export default {
           result.forEach(item => {
             tempArr.push({
               label: item.name,
-              value: item.id
+              value: item.id,
+              marketPrice: item.marketPrice
             })
           })
           if (type == 'ACCESSORIES') {

+ 4 - 0
src/views/timedTask/index.vue

@@ -23,6 +23,10 @@
                            prop="timeExp"
                            label="表达式">
           </el-table-column>
+          <el-table-column align='center'
+                           prop="modifyOn"
+                           label="最后执行时间">
+          </el-table-column>
           <el-table-column prop="status"
                            align='center'
                            label="任务状态">