This commit is contained in:
@@ -152,12 +152,11 @@
|
||||
</ElSelect>
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<!-- 只有流量重置周期为每月时才显示套餐周期类型 -->
|
||||
<ElCol :span="12" v-if="form.data_reset_cycle === 'monthly'">
|
||||
<ElCol :span="12">
|
||||
<ElFormItem label="套餐周期类型" prop="calendar_type">
|
||||
<ElSelect
|
||||
v-model="form.calendar_type"
|
||||
placeholder="请选择套餐周期类型"
|
||||
placeholder="请选择套餐周期类型(可选)"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
>
|
||||
@@ -815,10 +814,6 @@
|
||||
watch(
|
||||
() => form.data_reset_cycle,
|
||||
(cycle) => {
|
||||
// 不是每月时清空套餐周期类型
|
||||
if (cycle !== 'monthly') {
|
||||
form.calendar_type = undefined
|
||||
}
|
||||
// 不是每日且calendar_type不是按天时,清空套餐天数
|
||||
if (cycle !== 'daily' && form.calendar_type !== 'by_day') {
|
||||
form.duration_days = undefined
|
||||
@@ -1101,8 +1096,8 @@
|
||||
if (form.data_reset_cycle) {
|
||||
data.data_reset_cycle = form.data_reset_cycle
|
||||
}
|
||||
// 只有流量重置周期为 monthly 时,才传递 calendar_type
|
||||
if (form.data_reset_cycle === 'monthly' && form.calendar_type) {
|
||||
// calendar_type 是可选字段,有值就传递
|
||||
if (form.calendar_type) {
|
||||
data.calendar_type = form.calendar_type
|
||||
}
|
||||
// 当流量重置周期为每日,或套餐周期类型为按天时,传递套餐天数
|
||||
|
||||
Reference in New Issue
Block a user