|  | @@ -38,6 +38,33 @@
 | 
	
		
			
				|  |  |                           prop="expectNum"
 | 
	
		
			
				|  |  |                           label="预计缴费人数"></el-table-column>
 | 
	
		
			
				|  |  |          <el-table-column align="center"
 | 
	
		
			
				|  |  | +                         prop="paymentPattern"
 | 
	
		
			
				|  |  | +                         label="缴费方式">
 | 
	
		
			
				|  |  | +            <template slot-scope="scope">
 | 
	
		
			
				|  |  | +              <div>
 | 
	
		
			
				|  |  | +                {{scope.row.paymentPattern | teamPayStatus}}
 | 
	
		
			
				|  |  | +              </div>
 | 
	
		
			
				|  |  | +            </template>
 | 
	
		
			
				|  |  | +          </el-table-column>
 | 
	
		
			
				|  |  | +        <el-table-column align="center"
 | 
	
		
			
				|  |  | +                         prop="paymentValidStartDate"
 | 
	
		
			
				|  |  | +                         label="缴费有效期开始日期">
 | 
	
		
			
				|  |  | +          <template slot-scope="scope">
 | 
	
		
			
				|  |  | +            <div>
 | 
	
		
			
				|  |  | +              {{scope.row.paymentValidStartDate | formatTimer}}
 | 
	
		
			
				|  |  | +            </div>
 | 
	
		
			
				|  |  | +          </template>
 | 
	
		
			
				|  |  | +        </el-table-column>
 | 
	
		
			
				|  |  | +        <el-table-column align="center"
 | 
	
		
			
				|  |  | +                         prop="paymentValidEndDate"
 | 
	
		
			
				|  |  | +                         label="缴费有效期结束日期">
 | 
	
		
			
				|  |  | +          <template slot-scope="scope">
 | 
	
		
			
				|  |  | +            <div>
 | 
	
		
			
				|  |  | +              {{scope.row.paymentValidEndDate | formatTimer}}
 | 
	
		
			
				|  |  | +            </div>
 | 
	
		
			
				|  |  | +          </template>
 | 
	
		
			
				|  |  | +        </el-table-column>
 | 
	
		
			
				|  |  | +        <el-table-column align="center"
 | 
	
		
			
				|  |  |                           prop="actualNum"
 | 
	
		
			
				|  |  |                           label="实际缴费人数"></el-table-column>
 | 
	
		
			
				|  |  |          <el-table-column align="center"
 | 
	
	
		
			
				|  | @@ -109,9 +136,47 @@
 | 
	
		
			
				|  |  |                        prop="deadlinePaymentDate">
 | 
	
		
			
				|  |  |            <el-date-picker v-model.trim="payForm.deadlinePaymentDate"
 | 
	
		
			
				|  |  |                            type="date"
 | 
	
		
			
				|  |  | -                          :picker-options="bigin"
 | 
	
		
			
				|  |  | +                          :picker-options="beginDate(payForm.startPaymentDate)"
 | 
	
		
			
				|  |  |                            value-format="yyyy-MM-dd"
 | 
	
		
			
				|  |  | -                          placeholder="开始日期"></el-date-picker>
 | 
	
		
			
				|  |  | +                          placeholder="结束日期"></el-date-picker>
 | 
	
		
			
				|  |  | +        </el-form-item>
 | 
	
		
			
				|  |  | +        <el-form-item
 | 
	
		
			
				|  |  | +                      label="缴费方式"
 | 
	
		
			
				|  |  | +                      prop="paymentPattern"
 | 
	
		
			
				|  |  | +                      :rules="[{ required: true, message: '请选择缴费方式'},]">
 | 
	
		
			
				|  |  | +                      <el-select placeholder="缴费方式"
 | 
	
		
			
				|  |  | +                                  style="width: 220px"
 | 
	
		
			
				|  |  | +                                  clearable
 | 
	
		
			
				|  |  | +                                  filterable
 | 
	
		
			
				|  |  | +                                  @change="paymentPatternChange"
 | 
	
		
			
				|  |  | +                                  v-model.trim="payForm.paymentPattern">
 | 
	
		
			
				|  |  | +                                  <el-option :value="0"
 | 
	
		
			
				|  |  | +                                              label="按月"></el-option>
 | 
	
		
			
				|  |  | +                                  <el-option :value="1"
 | 
	
		
			
				|  |  | +                                              label="按季"></el-option>
 | 
	
		
			
				|  |  | +                                  <el-option :value="2"
 | 
	
		
			
				|  |  | +                                              label="一次性"></el-option>
 | 
	
		
			
				|  |  | +                      </el-select>
 | 
	
		
			
				|  |  | +        </el-form-item>
 | 
	
		
			
				|  |  | +        <el-form-item label="缴费有效期开始"
 | 
	
		
			
				|  |  | +                      :rules="[{ required: true, message: '请设置缴费有效期开始日期',trigger: 'blur'}]"
 | 
	
		
			
				|  |  | +                      prop="paymentValidStartDate">
 | 
	
		
			
				|  |  | +          <el-date-picker v-model.trim="payForm.paymentValidStartDate"
 | 
	
		
			
				|  |  | +                          type="date"
 | 
	
		
			
				|  |  | +                          @change="changePaymentStartTime"
 | 
	
		
			
				|  |  | +                          :picker-options="pickerOptions"
 | 
	
		
			
				|  |  | +                          value-format="yyyy-MM-dd"
 | 
	
		
			
				|  |  | +                          placeholder="有效期开始日期"></el-date-picker>
 | 
	
		
			
				|  |  | +        </el-form-item>
 | 
	
		
			
				|  |  | +        <el-form-item label="缴费有效期结束"
 | 
	
		
			
				|  |  | +                      :rules="[{ required: payForm.paymentPattern !== 2, message: '请设置缴费有效期结束日期',trigger: 'blur'}]"
 | 
	
		
			
				|  |  | +                      prop="paymentValidEndDate">
 | 
	
		
			
				|  |  | +          <el-date-picker v-model.trim="payForm.paymentValidEndDate"
 | 
	
		
			
				|  |  | +                          type="date"
 | 
	
		
			
				|  |  | +                          :disabled="payForm.paymentPattern === 2"
 | 
	
		
			
				|  |  | +                          :picker-options="beginDate(payForm.paymentValidStartDate)"
 | 
	
		
			
				|  |  | +                          value-format="yyyy-MM-dd"
 | 
	
		
			
				|  |  | +                          placeholder="有效期结束日期"></el-date-picker>
 | 
	
		
			
				|  |  |          </el-form-item>
 | 
	
		
			
				|  |  |          <el-form-item label="收费类型"
 | 
	
		
			
				|  |  |                        v-if='isNew'
 | 
	
	
		
			
				|  | @@ -208,6 +273,9 @@ export default {
 | 
	
		
			
				|  |  |        payForm: {
 | 
	
		
			
				|  |  |          startPaymentDate: null,
 | 
	
		
			
				|  |  |          deadlinePaymentDate: null,
 | 
	
		
			
				|  |  | +        paymentPattern: null,
 | 
	
		
			
				|  |  | +        paymentValidStartDate: null,
 | 
	
		
			
				|  |  | +        paymentValidEndDate: null,
 | 
	
		
			
				|  |  |          type: null,
 | 
	
		
			
				|  |  |          memo: null
 | 
	
		
			
				|  |  |        },
 | 
	
	
		
			
				|  | @@ -223,7 +291,6 @@ export default {
 | 
	
		
			
				|  |  |        qrcodes: true,
 | 
	
		
			
				|  |  |        qrcode: null,
 | 
	
		
			
				|  |  |        codeUrl: null,
 | 
	
		
			
				|  |  | -      bigin: this.beginDate(),
 | 
	
		
			
				|  |  |        chioseStudentVisible: false,
 | 
	
		
			
				|  |  |        chioseStudentList: [],
 | 
	
		
			
				|  |  |        clearStduent: true
 | 
	
	
		
			
				|  | @@ -253,6 +320,11 @@ export default {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    paymentPatternChange(val) {
 | 
	
		
			
				|  |  | +      if(val === 2) {
 | 
	
		
			
				|  |  | +        this.payForm.paymentValidEndDate = null
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      onCreateQRCode () { // 生成报名二维码
 | 
	
		
			
				|  |  |        this.qrcodeStatus = true
 | 
	
		
			
				|  |  |        let id = this.$route.query.id
 | 
	
	
		
			
				|  | @@ -284,6 +356,14 @@ export default {
 | 
	
		
			
				|  |  |        this.isNew = false
 | 
	
		
			
				|  |  |        this.activeRow = row
 | 
	
		
			
				|  |  |        this.payVisible = true;
 | 
	
		
			
				|  |  | +      this.payForm = {
 | 
	
		
			
				|  |  | +        ...this.payForm,
 | 
	
		
			
				|  |  | +        startPaymentDate: row.startPaymentDate,
 | 
	
		
			
				|  |  | +        deadlinePaymentDate: row.deadlinePaymentDate,
 | 
	
		
			
				|  |  | +        paymentPattern: row.paymentPattern,
 | 
	
		
			
				|  |  | +        paymentValidStartDate: row.paymentValidStartDate,
 | 
	
		
			
				|  |  | +        paymentValidEndDate: row.paymentValidEndDate,
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      detelePay (row) {
 | 
	
		
			
				|  |  |        let id = row.id;
 | 
	
	
		
			
				|  | @@ -320,7 +400,7 @@ export default {
 | 
	
		
			
				|  |  |          type: null,
 | 
	
		
			
				|  |  |          memo: null
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  | -           * 
 | 
	
		
			
				|  |  | +           *
 | 
	
		
			
				|  |  |             */
 | 
	
		
			
				|  |  |            this.chioseStudentVisible = true
 | 
	
		
			
				|  |  |            return
 | 
	
	
		
			
				|  | @@ -341,6 +421,9 @@ export default {
 | 
	
		
			
				|  |  |        obj.musicGroupId = this.$route.query.id
 | 
	
		
			
				|  |  |        obj.startPaymentDate = this.payForm.startPaymentDate + ' 00:00:00'
 | 
	
		
			
				|  |  |        obj.deadlinePaymentDate = this.payForm.deadlinePaymentDate + ' 23:59:59'
 | 
	
		
			
				|  |  | +      obj.paymentValidStartDate = this.payForm.paymentValidStartDate
 | 
	
		
			
				|  |  | +      obj.paymentValidEndDate = this.payForm.paymentValidEndDate
 | 
	
		
			
				|  |  | +      obj.paymentPattern = this.payForm.paymentPattern
 | 
	
		
			
				|  |  |        obj.type = this.payForm.type
 | 
	
		
			
				|  |  |        obj.memo = this.payForm.memo
 | 
	
		
			
				|  |  |        addMusicGroupPaymentCalender(obj).then(res => {
 | 
	
	
		
			
				|  | @@ -367,6 +450,9 @@ export default {
 | 
	
		
			
				|  |  |      changeStartTime (val) {
 | 
	
		
			
				|  |  |        this.payForm.deadlinePaymentDate = this.dateAddDays(val, 3)
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    changePaymentStartTime (val) {
 | 
	
		
			
				|  |  | +      this.payForm.paymentValidEndDate = null
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      dateAddDays (dataStr, dayCount) {
 | 
	
		
			
				|  |  |        let strdate = dataStr; //日期字符串
 | 
	
		
			
				|  |  |        let isdate = new Date(strdate.replace(/-/g, "/"));  //把日期字符串转换成日期格式
 | 
	
	
		
			
				|  | @@ -374,13 +460,12 @@ export default {
 | 
	
		
			
				|  |  |        let pdate = isdate.getFullYear() + "-" + (isdate.getMonth() + 1) + "-" + (isdate.getDate());   //把日期格式转换成字符串
 | 
	
		
			
				|  |  |        return pdate;
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    beginDate () {
 | 
	
		
			
				|  |  | -      let self = this
 | 
	
		
			
				|  |  | +    beginDate (end) {
 | 
	
		
			
				|  |  |        return {
 | 
	
		
			
				|  |  |          firstDayOfWeek: 1,
 | 
	
		
			
				|  |  |          disabledDate (time) {
 | 
	
		
			
				|  |  | -          if (self.payForm.startPaymentDate) {
 | 
	
		
			
				|  |  | -            return new Date(self.payForm.startPaymentDate).getTime() - 86400000 >= time.getTime()
 | 
	
		
			
				|  |  | +          if (end) {
 | 
	
		
			
				|  |  | +            return new Date(end).getTime() - 86400000 >= time.getTime()
 | 
	
		
			
				|  |  |            } else {
 | 
	
		
			
				|  |  |              return time.getTime() + 86400000 < Date.now()
 | 
	
		
			
				|  |  |              //开始时间不选时,结束时间最大值小于等于当天
 | 
	
	
		
			
				|  | @@ -399,6 +484,9 @@ export default {
 | 
	
		
			
				|  |  |        if (!val) {
 | 
	
		
			
				|  |  |          this.payForm = {
 | 
	
		
			
				|  |  |            startPaymentDate: null,
 | 
	
		
			
				|  |  | +          paymentPattern: null,
 | 
	
		
			
				|  |  | +          paymentValidStartDate: null,
 | 
	
		
			
				|  |  | +          paymentValidEndDate: null,
 | 
	
		
			
				|  |  |            type: null,
 | 
	
		
			
				|  |  |            memo: null,
 | 
	
		
			
				|  |  |            deadlinePaymentDate: null
 | 
	
	
		
			
				|  | @@ -444,4 +532,4 @@ export default {
 | 
	
		
			
				|  |  |      padding: 15px 15px 0 15px;
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | -</style>
 | 
	
		
			
				|  |  | +</style>
 |