|
@@ -373,7 +373,7 @@
|
|
end-placeholder="结束时间">
|
|
end-placeholder="结束时间">
|
|
</el-time-picker>
|
|
</el-time-picker>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="领取红包时间" prop="lastJoinTime">
|
|
|
|
|
|
+ <el-form-item v-if="joinTimeSwitch" label="领取红包时间" prop="lastJoinTime">
|
|
<el-time-picker
|
|
<el-time-picker
|
|
v-model="course.form.joinTime"
|
|
v-model="course.form.joinTime"
|
|
value-format="HH:mm:ss"
|
|
value-format="HH:mm:ss"
|
|
@@ -412,7 +412,7 @@
|
|
>
|
|
>
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="领取红包时间" prop="joinTime" label-width="110px">
|
|
|
|
|
|
+ <el-form-item v-if="joinTimeSwitch" label="领取红包时间" prop="joinTime" label-width="110px">
|
|
<el-date-picker
|
|
<el-date-picker
|
|
v-model="updateCourse.form.joinTime"
|
|
v-model="updateCourse.form.joinTime"
|
|
type="datetime"
|
|
type="datetime"
|
|
@@ -606,7 +606,7 @@ import RedPacket from './redPacket.vue'
|
|
import BatchRedPacket from './batchRedPacket.vue'
|
|
import BatchRedPacket from './batchRedPacket.vue'
|
|
import CourseStatistics from './statistics.vue'
|
|
import CourseStatistics from './statistics.vue'
|
|
import Da from "element-ui/src/locale/lang/da";
|
|
import Da from "element-ui/src/locale/lang/da";
|
|
-
|
|
|
|
|
|
+import { getConfigByKey } from '@/api/system/config'
|
|
export default {
|
|
export default {
|
|
name: "Period",
|
|
name: "Period",
|
|
components: {
|
|
components: {
|
|
@@ -683,6 +683,7 @@ export default {
|
|
ids: [],
|
|
ids: [],
|
|
form: {},
|
|
form: {},
|
|
},
|
|
},
|
|
|
|
+ joinTimeSwitch:true,
|
|
updateCourse: {
|
|
updateCourse: {
|
|
open: false,
|
|
open: false,
|
|
loading: true,
|
|
loading: true,
|
|
@@ -1397,6 +1398,17 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
handleAddCourse() {
|
|
handleAddCourse() {
|
|
|
|
+ const key = "joinTime.switch.config"
|
|
|
|
+ getConfigByKey(key).then(response => {
|
|
|
|
+ const {code,data} = response
|
|
|
|
+ if (code === 200) {
|
|
|
|
+ let value = data?.configValue
|
|
|
|
+ console.log(value)
|
|
|
|
+ if (value) {
|
|
|
|
+ this.joinTimeSwitch = value=='0'?true:false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
this.course.addOpen = true;
|
|
this.course.addOpen = true;
|
|
this.course.form = {
|
|
this.course.form = {
|
|
periodId: this.course.queryParams.periodId,
|
|
periodId: this.course.queryParams.periodId,
|
|
@@ -1413,6 +1425,17 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
handleUpdateCourse() {
|
|
handleUpdateCourse() {
|
|
|
|
+ const key = "joinTime.switch.config"
|
|
|
|
+ getConfigByKey(key).then(response => {
|
|
|
|
+ const {code,data} = response
|
|
|
|
+ if (code === 200) {
|
|
|
|
+ let value = data?.configValue
|
|
|
|
+ console.log(value)
|
|
|
|
+ if (value) {
|
|
|
|
+ this.joinTimeSwitch = value=='0'?true:false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
this.updateCourse.open = true;
|
|
this.updateCourse.open = true;
|
|
this.updateCourse.form = {
|
|
this.updateCourse.form = {
|
|
ids: this.updateCourse.ids,
|
|
ids: this.updateCourse.ids,
|
|
@@ -1505,7 +1528,7 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
// 检查领取红包时间是否正确
|
|
// 检查领取红包时间是否正确
|
|
- if (!this.updateCourse.form.joinTime) {
|
|
|
|
|
|
+ if (!this.updateCourse.form.joinTime&&this.joinTimeSwitch) {
|
|
this.$message.error('请选择领取红包时间');
|
|
this.$message.error('请选择领取红包时间');
|
|
return;
|
|
return;
|
|
}
|
|
}
|