|
@@ -817,7 +817,7 @@ export default {
|
|
|
this.giveNum = giveNum || 0;
|
|
|
|
|
|
return parseInt(offline) + parseInt(online) + "+" + giveNum || "";
|
|
|
- } else if(this.hotType == 'DISCOUNT') {
|
|
|
+ } else if(this.hotType == 'DISCOUNT' && this.attribute3) {
|
|
|
return parseInt(this.attribute3)
|
|
|
}
|
|
|
return parseInt(offline) + parseInt(online) || "";
|
|
@@ -870,7 +870,8 @@ export default {
|
|
|
},
|
|
|
onCourseNumChange(type) {
|
|
|
let centerForm = this.centerForm
|
|
|
- if(this.hotType == 'DISCOUNT') {
|
|
|
+ // 折扣类型,并且设置的排课数有值
|
|
|
+ if(this.hotType == 'DISCOUNT' && this.attribute3) {
|
|
|
// 判断线上或线下总和等于排课次数
|
|
|
console.log((parseInt(centerForm.onlineCourseNum) + parseInt(centerForm.offlineCourseNum)), this.attribute3)
|
|
|
if((parseInt(centerForm.onlineCourseNum) + parseInt(centerForm.offlineCourseNum)) > this.attribute3) {
|
|
@@ -1657,7 +1658,7 @@ export default {
|
|
|
if (vali) {
|
|
|
|
|
|
let centerForm = this.centerForm
|
|
|
- if(this.hotType == 'DISCOUNT') {
|
|
|
+ if(this.hotType == 'DISCOUNT' && this.attribute3) {
|
|
|
// 判断线上或线下总和大于排课次数
|
|
|
if((parseInt(centerForm.onlineCourseNum) + parseInt(centerForm.offlineCourseNum)) != this.attribute3) {
|
|
|
this.$message.error('线上课数加线下课数必须等于待排课数')
|