|  | @@ -198,7 +198,9 @@
 | 
											
												
													
														|  |                      @mousewheel.native.prevent
 |  |                      @mousewheel.native.prevent
 | 
											
												
													
														|  |                      :disabled='!isNew'></el-input>
 |  |                      :disabled='!isNew'></el-input>
 | 
											
												
													
														|  |          </el-form-item>
 |  |          </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">
 |  |                        v-show="maskForm.type == 12">
 | 
											
												
													
														|  |            <el-input v-model.trim="maskForm.maxNum"
 |  |            <el-input v-model.trim="maskForm.maxNum"
 | 
											
												
													
														|  |                      type="number"
 |  |                      type="number"
 | 
											
										
											
												
													
														|  | @@ -388,11 +390,21 @@ import {
 | 
											
												
													
														|  |  import load from '@/utils/loading'
 |  |  import load from '@/utils/loading'
 | 
											
												
													
														|  |  // import QRCode from 'qrcodejs2'
 |  |  // import QRCode from 'qrcodejs2'
 | 
											
												
													
														|  |  import vueQr from 'vue-qr'
 |  |  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 {
 |  |  export default {
 | 
											
												
													
														|  |    name: 'sporadicList',
 |  |    name: 'sporadicList',
 | 
											
												
													
														|  |    components: { pagination, vueQr },
 |  |    components: { pagination, vueQr },
 | 
											
												
													
														|  |    data () {
 |  |    data () {
 | 
											
												
													
														|  |      return {
 |  |      return {
 | 
											
												
													
														|  | 
 |  | +      validMaxNum: validMaxNum,
 | 
											
												
													
														|  |        zeroVisible: false,
 |  |        zeroVisible: false,
 | 
											
												
													
														|  |        qrCodeUrl: null,
 |  |        qrCodeUrl: null,
 | 
											
												
													
														|  |        searchForm: {
 |  |        searchForm: {
 | 
											
										
											
												
													
														|  | @@ -590,9 +602,8 @@ export default {
 | 
											
												
													
														|  |        maskForm.organId = row.organId
 |  |        maskForm.organId = row.organId
 | 
											
												
													
														|  |        maskForm.money = row.amount
 |  |        maskForm.money = row.amount
 | 
											
												
													
														|  |        maskForm.subMoney = row.discountAmount
 |  |        maskForm.subMoney = row.discountAmount
 | 
											
												
													
														|  | -      maskForm.maxNum = row.maxNum ? row.maxNum : null
 |  | 
 | 
											
												
													
														|  | 
 |  | +      maskForm.maxNum = row.maxNum
 | 
											
												
													
														|  |        maskForm.musicGroupId = row.musicGroupId ? row.musicGroupId : null
 |  |        maskForm.musicGroupId = row.musicGroupId ? row.musicGroupId : null
 | 
											
												
													
														|  | -      // this.$refs['maskForm'].clearValidate()
 |  | 
 | 
											
												
													
														|  |        if (row.userId) {
 |  |        if (row.userId) {
 | 
											
												
													
														|  |          queryUserMusicInfos({ userId: row.userId }).then(studentInfo => {
 |  |          queryUserMusicInfos({ userId: row.userId }).then(studentInfo => {
 | 
											
												
													
														|  |            if (studentInfo.code == 200) {
 |  |            if (studentInfo.code == 200) {
 | 
											
										
											
												
													
														|  | @@ -623,13 +634,16 @@ export default {
 | 
											
												
													
														|  |          this.zeroVisible = false
 |  |          this.zeroVisible = false
 | 
											
												
													
														|  |          return
 |  |          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 () {
 |  |      addZero () {
 | 
											
										
											
												
													
														|  | @@ -813,6 +827,7 @@ export default {
 | 
											
												
													
														|  |            money: '',
 |  |            money: '',
 | 
											
												
													
														|  |            desc: '',
 |  |            desc: '',
 | 
											
												
													
														|  |            title: '',
 |  |            title: '',
 | 
											
												
													
														|  | 
 |  | +          maxNum: null,
 | 
											
												
													
														|  |            code: ''
 |  |            code: ''
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |          // this.$refs['maskForm'].resetFields()
 |  |          // this.$refs['maskForm'].resetFields()
 |