diff --git a/src/views/incomePayments/meetManage/OtherMeetingForm.vue b/src/views/incomePayments/meetManage/OtherMeetingForm.vue index b1b57a9..a42eee4 100644 --- a/src/views/incomePayments/meetManage/OtherMeetingForm.vue +++ b/src/views/incomePayments/meetManage/OtherMeetingForm.vue @@ -13,7 +13,7 @@ - @@ -33,7 +33,8 @@ - + 汇款 线上缴费 打包 @@ -181,7 +182,7 @@ export default { // 缴费方式为打包 payModeBool: true, // 缴费方式为线上缴费 - onlinePayModeBool:false, + onlinePayModeBool: false, // 回显的邮寄联系人 selectPostPerson: null, validatorRules: { @@ -197,15 +198,15 @@ export default { rules: [{required: true, message: '请选择发票类型'}], validateTrigger: 'change' }, - orderCode:{ + orderCode: { rules: [{required: true, message: '请输入订单号后四位'}], validateTrigger: 'blur' } }, // 是否可编辑 - isEditBool:false, + isEditBool: false, // 是否需要发票 - needInvoiceBool:true, + needInvoiceBool: true, } }, watch: { @@ -232,34 +233,34 @@ export default { /* * 清空邮寄联系人 地址 邮编 * */ - clearFormItem(){ - this.form.resetFields(['postContactId','postContactAddress','postCode']) + clearFormItem() { + this.form.resetFields(['postContactId', 'postContactAddress', 'postCode']) }, /* * 选择了联系人后给邮寄联系人和地址赋值 * */ setAddressVal(val) { - val = Object.assign({}, {postContactId: val.id, postContactAddress: val.contactAddress,postCode:val.postalCode}) + val = Object.assign({}, {postContactId: val.id, postContactAddress: val.contactAddress, postCode: val.postalCode}) this.$nextTick(() => { - this.form.setFieldsValue(pick(val, 'postContactId', 'postContactAddress','postCode')) + this.form.setFieldsValue(pick(val, 'postContactId', 'postContactAddress', 'postCode')) }) }, /* * 选择联系人之后地址邮编复制 * */ - changePost(val){ - if(val === undefined){ + changePost(val) { + if (val === undefined) { this.clearFormItem() } - getContactsById({id:val}).then(res => { - if(res.success){ + getContactsById({id: val}).then(res => { + if (res.success) { this.setAddressVal(res.result) } }) }, /* - * 抵达时间禁用 + * 离开时间禁用 * */ disabledEndDate(endValue) { const startValueTemp = this.form.getFieldValue('arrivalTime') @@ -269,21 +270,32 @@ export default { } return startValue.valueOf() > endValue.valueOf() }, + /* + * 抵达时间禁用 + * */ + disabledStartDate(endValue) { + const startValueTemp = this.form.getFieldValue('departureTime') + const startValue = startValueTemp && moment(startValueTemp, 'YYYY-MM-DD') + if (!endValue || !startValue) { + return false + } + return startValue.valueOf() < endValue.valueOf() - 86400000 + }, /* * 缴费方式选择 * */ changePayMode(e) { if (e.target.value === 3) { this.payModeBool = true - this.$emit('isPack',true) + this.$emit('isPack', true) } else { this.payModeBool = false - this.$emit('isPack',false) + this.$emit('isPack', false) } // 缴费方式为线上 要输入订单后四位 - if(e.target.value === 2){ + if (e.target.value === 2) { this.onlinePayModeBool = true - }else { + } else { this.onlinePayModeBool = false } }, @@ -321,11 +333,11 @@ export default { /* * 选择发票 * */ - changeInvoice(val){ - if(val === '0'){ + changeInvoice(val) { + if (val === '0') { // 不需要发票 this.needInvoiceBool = true - }else { + } else { this.needInvoiceBool = false } }, diff --git a/src/views/incomePayments/meetManage/modules/SeminarVipForm.vue b/src/views/incomePayments/meetManage/modules/SeminarVipForm.vue index 5087261..bdf9938 100644 --- a/src/views/incomePayments/meetManage/modules/SeminarVipForm.vue +++ b/src/views/incomePayments/meetManage/modules/SeminarVipForm.vue @@ -87,7 +87,7 @@ - @@ -126,6 +126,7 @@ @@ -164,6 +165,7 @@ @@ -410,6 +412,39 @@ export default { return startValue.valueOf() > endValue.valueOf() }, /* + * 入住酒店时间禁用 + * */ + disabledStartDate(endValue){ + const startValueTemp = this.form.getFieldValue('outHotelTime') + const startValue = startValueTemp && moment(startValueTemp, 'YYYY-MM-DD') + if (!endValue || !startValue) { + return false + } + return startValue.valueOf() < endValue.valueOf() - 86400000 + }, + /* + * 离开时间禁用 + * */ + disabledDepartureTimeEndDate(endValue) { + const startValueTemp = this.form.getFieldValue('arrivalTime') + const startValue = startValueTemp && moment(startValueTemp, 'YYYY-MM-DD') + if (!endValue || !startValue) { + return false + } + return startValue.valueOf() > endValue.valueOf() + }, + /* + * 抵达时间禁用 + * */ + disabledArrivalTimeEndDate(endValue) { + const startValueTemp = this.form.getFieldValue('departureTime') + const startValue = startValueTemp && moment(startValueTemp, 'YYYY-MM-DD') + if (!endValue || !startValue) { + return false + } + return startValue.valueOf() < endValue.valueOf() - 86400000 + }, + /* * 编辑回显值 * */ setFormVal(record) {