|
@@ -122,6 +122,36 @@
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</el-container>
|
|
</el-container>
|
|
</el-card>
|
|
</el-card>
|
|
|
|
+ <!-- 话费充值设置 -->
|
|
|
|
+ <el-card>
|
|
|
|
+ <el-container direction="vertical">
|
|
|
|
+ <h3 style="margin-bottom:20px">话费充值设置:</h3>
|
|
|
|
+ <el-form label-width="120px" ref="phoneForm" :model="phoneForm" :rules="phoneRules">
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="回调时间:"
|
|
|
|
+ prop="time_out"
|
|
|
|
+ style="margin-bottom: 10px;">
|
|
|
|
+ <el-input
|
|
|
|
+ size="small"
|
|
|
|
+ v-model.number="phoneForm.time_out"
|
|
|
|
+ autocomplete="off"
|
|
|
|
+ style="width: 140px;margin-right:10px"
|
|
|
|
+ ></el-input>
|
|
|
|
+ <span style="color:rgb(255 1 1 / 0.7);margin-left:10px;font-size:12px;">单位分钟,建议设置3分钟及以上时间</span>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="充值质量:">
|
|
|
|
+ <el-radio-group v-model="phoneForm.quality">
|
|
|
|
+ <el-radio :label="1">普通通道</el-radio>
|
|
|
|
+ <el-radio :label="2">快速通道</el-radio>
|
|
|
|
+ <el-radio :label="3">普通+快速通道</el-radio>
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-button type="primary" size="small" @click="onSetTime">设置</el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ </el-container>
|
|
|
|
+ </el-card>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -135,7 +165,8 @@ import {
|
|
updateKey,
|
|
updateKey,
|
|
onSubUser,
|
|
onSubUser,
|
|
addwphone,
|
|
addwphone,
|
|
- delwphone
|
|
|
|
|
|
+ delwphone,
|
|
|
|
+ phonrRec
|
|
} from "@/api";
|
|
} from "@/api";
|
|
export default {
|
|
export default {
|
|
name: 'pageView',
|
|
name: 'pageView',
|
|
@@ -177,6 +208,13 @@ export default {
|
|
callback()
|
|
callback()
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
+ var checkTime = (rule, value, callback) => {
|
|
|
|
+ if (value < 3) {
|
|
|
|
+ return callback(new Error('回调时间必须输入大于等于3的数字'));
|
|
|
|
+ } else {
|
|
|
|
+ callback()
|
|
|
|
+ }
|
|
|
|
+ };
|
|
return {
|
|
return {
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
pageNumber: 1,
|
|
pageNumber: 1,
|
|
@@ -248,6 +286,18 @@ export default {
|
|
{validator: checkAmount, trigger: 'blur'}
|
|
{validator: checkAmount, trigger: 'blur'}
|
|
]
|
|
]
|
|
},
|
|
},
|
|
|
|
+ // 话费充值设置
|
|
|
|
+ phoneForm: {
|
|
|
|
+ time_out: '',
|
|
|
|
+ quality: 1
|
|
|
|
+ },
|
|
|
|
+ phoneRules: {
|
|
|
|
+ time_out: [
|
|
|
|
+ { required: true, message: '请输入回调时间', trigger: 'blur' },
|
|
|
|
+ { required: true, type: 'number', message: '回调时间必须为数字值', trigger: 'blur'},
|
|
|
|
+ { validator: checkTime, trigger: 'blur'}
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -365,6 +415,8 @@ export default {
|
|
this.userForm.phone = res.datas.contact_phone != 'null' ? res.datas.contact_phone : ''
|
|
this.userForm.phone = res.datas.contact_phone != 'null' ? res.datas.contact_phone : ''
|
|
this.balanceForm.alarm_amount = res.datas.alarm_amount != 'null' ? res.datas.alarm_amount : ''
|
|
this.balanceForm.alarm_amount = res.datas.alarm_amount != 'null' ? res.datas.alarm_amount : ''
|
|
this.warningList = res.datas.warning_phone
|
|
this.warningList = res.datas.warning_phone
|
|
|
|
+ this.phoneForm.time_out = res.datas.timeout
|
|
|
|
+ this.phoneForm.quality = res.datas.quality
|
|
}
|
|
}
|
|
} catch (error) {
|
|
} catch (error) {
|
|
console.log(error);
|
|
console.log(error);
|
|
@@ -541,6 +593,23 @@ export default {
|
|
this.$message.error('设置余额预警失败')
|
|
this.$message.error('设置余额预警失败')
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 设置回调时间
|
|
|
|
+ async onSetTime() {
|
|
|
|
+ try {
|
|
|
|
+ let param = new URLSearchParams()
|
|
|
|
+ param.append('quality', this.phoneForm.quality)
|
|
|
|
+ param.append('time_out', this.phoneForm.time_out)
|
|
|
|
+ const res = await phonrRec(param)
|
|
|
|
+ // console.log('设置-话费', res);
|
|
|
|
+ if (res && res.code == 200) {
|
|
|
|
+ this.getUserInfo()
|
|
|
|
+ this.$message.success('设置话费充值成功')
|
|
|
|
+ }
|
|
|
|
+ } catch (error) {
|
|
|
|
+ console.log(error);
|
|
|
|
+ this.$message.error('设置话费充值失败')
|
|
|
|
+ }
|
|
|
|
+ }
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|