Forráskód Böngészése

Merge branch 'online' into iteration_active11

王新雷 4 éve
szülő
commit
4821378d90

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/index.html


+ 0 - 1
dist/static/css/chunk-6d5d7025.46d64102.css

@@ -1 +0,0 @@
-.right-code .title[data-v-9391d9fc]{font-size:18px;text-align:center;padding-bottom:8px}.newBand[data-v-9391d9fc]{display:inline-block}.el-input[data-v-9391d9fc]{width:180px!important}

+ 1 - 0
dist/static/css/chunk-e29c4bd8.262c5511.css

@@ -0,0 +1 @@
+.right-code .title[data-v-080514fc]{font-size:18px;text-align:center;padding-bottom:8px}.newBand[data-v-080514fc]{display:inline-block}.el-input[data-v-080514fc]{width:180px!important}

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/static/js/app.e8669169.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/static/js/chunk-6d5d7025.c19273ce.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/static/js/chunk-e29c4bd8.1d93a4e5.js


+ 25 - 10
src/views/sporadicManager/sporadicList.vue

@@ -198,7 +198,9 @@
                     @mousewheel.native.prevent
                     :disabled='!isNew'></el-input>
         </el-form-item>
-        <el-form-item label="报名人数"
+        <el-form-item label="缴费人数"
+                      prop="maxNum"
+                      :rules="[{ required: true, validator: validMaxNum, trigger: 'blur' }]"
                       v-show="maskForm.type == 12">
           <el-input v-model.trim="maskForm.maxNum"
                     type="number"
@@ -388,11 +390,21 @@ import {
 import load from '@/utils/loading'
 // import QRCode from 'qrcodejs2'
 import vueQr from 'vue-qr'
+let validMaxNum = (rule, value, callback) => {
+  if (value == '' && typeof value == 'string' || value == null) {
+    callback(new Error('请输入缴费人数'))
+  } else if (value < 0) {
+    callback(new Error('输入缴费人数必须大于0'))
+  } else {
+    callback()
+  }
+}
 export default {
   name: 'sporadicList',
   components: { pagination, vueQr },
   data () {
     return {
+      validMaxNum: validMaxNum,
       zeroVisible: false,
       qrCodeUrl: null,
       searchForm: {
@@ -590,9 +602,8 @@ export default {
       maskForm.organId = row.organId
       maskForm.money = row.amount
       maskForm.subMoney = row.discountAmount
-      maskForm.maxNum = row.maxNum ? row.maxNum : null
+      maskForm.maxNum = row.maxNum
       maskForm.musicGroupId = row.musicGroupId ? row.musicGroupId : null
-      // this.$refs['maskForm'].clearValidate()
       if (row.userId) {
         queryUserMusicInfos({ userId: row.userId }).then(studentInfo => {
           if (studentInfo.code == 200) {
@@ -623,13 +634,16 @@ export default {
         this.zeroVisible = false
         return
       }
-
-      updateZero(cleanDeep({ id: maskForm.id, maxNum: maskForm.maxNum })).then(res => {
-        if (res.code == 200) {
-            this.$message.success('更新成功')
-            this.zeroVisible = false;
-            this.getList()
-          }
+      this.$refs['maskForm'].validate(item => {
+        if(item) {
+          updateZero(cleanDeep({ id: maskForm.id, maxNum: maskForm.maxNum })).then(res => {
+            if (res.code == 200) {
+                this.$message.success('更新成功')
+                this.zeroVisible = false;
+                this.getList()
+              }
+          })
+        }
       })
     },
     addZero () {
@@ -813,6 +827,7 @@ export default {
           money: '',
           desc: '',
           title: '',
+          maxNum: null,
           code: ''
         }
         // this.$refs['maskForm'].resetFields()

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott